From 0536674054e35f14b7c0402ee22e1b5bc96f8d08 Mon Sep 17 00:00:00 2001 From: JP Cen Date: Wed, 24 Apr 2024 16:51:37 -0400 Subject: [PATCH] 0.9.17 --- main.js | 1155 ++++++++++++++++++++++++++----------------------- manifest.json | 2 +- styles.css | 86 ++-- 3 files changed, 666 insertions(+), 577 deletions(-) diff --git a/main.js b/main.js index 0e40388..5fea67e 100644 --- a/main.js +++ b/main.js @@ -396,10 +396,10 @@ var require_moment = __commonJS({ function isUndefined2(input) { return input === void 0; } - function isNumber3(input) { + function isNumber4(input) { return typeof input === "number" || Object.prototype.toString.call(input) === "[object Number]"; } - function isDate3(input) { + function isDate4(input) { return input instanceof Date || Object.prototype.toString.call(input) === "[object Date]"; } function map2(arr, fn) { @@ -937,7 +937,7 @@ var require_moment = __commonJS({ if (typeof token2 === "string") { token2 = [token2]; } - if (isNumber3(callback)) { + if (isNumber4(callback)) { func = function(input, array) { array[callback] = toInt(input); }; @@ -1115,7 +1115,7 @@ var require_moment = __commonJS({ value = toInt(value); } else { value = mom.localeData().monthsParse(value); - if (!isNumber3(value)) { + if (!isNumber4(value)) { return mom; } } @@ -2388,7 +2388,7 @@ var require_moment = __commonJS({ } if (isMoment(input)) { return new Moment(checkOverflow(input)); - } else if (isDate3(input)) { + } else if (isDate4(input)) { config2._d = input; } else if (isArray5(format8)) { configFromStringAndArray(config2); @@ -2406,7 +2406,7 @@ var require_moment = __commonJS({ var input = config2._i; if (isUndefined2(input)) { config2._d = new Date(hooks.now()); - } else if (isDate3(input)) { + } else if (isDate4(input)) { config2._d = new Date(input.valueOf()); } else if (typeof input === "string") { configFromString(config2); @@ -2417,7 +2417,7 @@ var require_moment = __commonJS({ configFromArray(config2); } else if (isObject4(input)) { configFromObject(config2); - } else if (isNumber3(input)) { + } else if (isNumber4(input)) { config2._d = new Date(input); } else { hooks.createFromInputFallback(config2); @@ -2593,7 +2593,7 @@ var require_moment = __commonJS({ var res, diff2; if (model._isUTC) { res = model.clone(); - diff2 = (isMoment(input) || isDate3(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); + diff2 = (isMoment(input) || isDate4(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); res._d.setTime(res._d.valueOf() + diff2); hooks.updateOffset(res, false); return res; @@ -2727,7 +2727,7 @@ var require_moment = __commonJS({ d: input._days, M: input._months }; - } else if (isNumber3(input) || !isNaN(+input)) { + } else if (isNumber4(input) || !isNaN(+input)) { duration = {}; if (key2) { duration[key2] = +input; @@ -2842,11 +2842,11 @@ var require_moment = __commonJS({ } } var add3 = createAdder(1, "add"), subtract2 = createAdder(-1, "subtract"); - function isString3(input) { + function isString4(input) { return typeof input === "string" || input instanceof String; } function isMomentInput(input) { - return isMoment(input) || isDate3(input) || isString3(input) || isNumber3(input) || isNumberOrStringArray(input) || isMomentInputObject(input) || input === null || input === void 0; + return isMoment(input) || isDate4(input) || isString4(input) || isNumber4(input) || isNumberOrStringArray(input) || isMomentInputObject(input) || input === null || input === void 0; } function isMomentInputObject(input) { var objectTest = isObject4(input) && !isObjectEmpty(input), propertyTest = false, properties3 = [ @@ -2885,7 +2885,7 @@ var require_moment = __commonJS({ var arrayTest = isArray5(input), dataTypeTest = false; if (arrayTest) { dataTypeTest = input.filter(function(item) { - return !isNumber3(item) && isString3(input); + return !isNumber4(item) && isString4(input); }).length === 0; } return arrayTest && dataTypeTest; @@ -3858,7 +3858,7 @@ var require_moment = __commonJS({ return locale3[field](utc, format8); } function listMonthsImpl(format8, index, field) { - if (isNumber3(format8)) { + if (isNumber4(format8)) { index = format8; format8 = void 0; } @@ -3874,7 +3874,7 @@ var require_moment = __commonJS({ } function listWeekdaysImpl(localeSorted, format8, index, field) { if (typeof localeSorted === "boolean") { - if (isNumber3(format8)) { + if (isNumber4(format8)) { index = format8; format8 = void 0; } @@ -3883,7 +3883,7 @@ var require_moment = __commonJS({ format8 = localeSorted; index = format8; localeSorted = false; - if (isNumber3(format8)) { + if (isNumber4(format8)) { index = format8; format8 = void 0; } @@ -4229,7 +4229,7 @@ var require_moment = __commonJS({ hooks.utc = createUTC; hooks.unix = createUnix; hooks.months = listMonths; - hooks.isDate = isDate3; + hooks.isDate = isDate4; hooks.locale = getSetGlobalLocale; hooks.invalid = createInvalid; hooks.duration = createDuration; @@ -12404,7 +12404,7 @@ var require_lodash = __commonJS({ return string3.match(reUnicodeWord) || []; } var runInContext = function runInContext2(context) { - context = context == null ? root : _17.defaults(root.Object(), context, _17.pick(root, contextProps)); + context = context == null ? root : _18.defaults(root.Object(), context, _18.pick(root, contextProps)); var Array2 = context.Array, Date2 = context.Date, Error2 = context.Error, Function2 = context.Function, Math2 = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String2 = context.String, TypeError2 = context.TypeError; var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype; var coreJsData = context["__core-js_shared__"]; @@ -15334,7 +15334,7 @@ var require_lodash = __commonJS({ if (fromIndex < 0) { fromIndex = nativeMax(length + fromIndex, 0); } - return isString3(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1; + return isString4(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1; } var invokeMap = baseRest(function(collection, path, args) { var index = -1, isFunc = typeof path == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : []; @@ -15402,7 +15402,7 @@ var require_lodash = __commonJS({ return 0; } if (isArrayLike(collection)) { - return isString3(collection) ? stringSize(collection) : collection.length; + return isString4(collection) ? stringSize(collection) : collection.length; } var tag2 = getTag2(collection); if (tag2 == mapTag || tag2 == setTag) { @@ -15732,7 +15732,7 @@ var require_lodash = __commonJS({ return value === true || value === false || isObjectLike2(value) && baseGetTag(value) == boolTag; } var isBuffer = nativeIsBuffer || stubFalse; - var isDate3 = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + var isDate4 = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; function isElement(value) { return isObjectLike2(value) && value.nodeType === 1 && !isPlainObject2(value); } @@ -15804,7 +15804,7 @@ var require_lodash = __commonJS({ return baseIsMatch(object, source, getMatchData(source), customizer); } function isNaN2(value) { - return isNumber3(value) && value != +value; + return isNumber4(value) && value != +value; } function isNative(value) { if (isMaskable(value)) { @@ -15818,7 +15818,7 @@ var require_lodash = __commonJS({ function isNil(value) { return value == null; } - function isNumber3(value) { + function isNumber4(value) { return typeof value == "number" || isObjectLike2(value) && baseGetTag(value) == numberTag; } function isPlainObject2(value) { @@ -15837,7 +15837,7 @@ var require_lodash = __commonJS({ return isInteger2(value) && value >= -MAX_SAFE_INTEGER2 && value <= MAX_SAFE_INTEGER2; } var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; - function isString3(value) { + function isString4(value) { return typeof value == "string" || !isArray5(value) && isObjectLike2(value) && baseGetTag(value) == stringTag; } function isSymbol(value) { @@ -15862,7 +15862,7 @@ var require_lodash = __commonJS({ return []; } if (isArrayLike(value)) { - return isString3(value) ? stringToArray(value) : copyArray(value); + return isString4(value) ? stringToArray(value) : copyArray(value); } if (symIterator && value[symIterator]) { return iteratorToArray(value[symIterator]()); @@ -16867,7 +16867,7 @@ var require_lodash = __commonJS({ lodash.isArrayLikeObject = isArrayLikeObject; lodash.isBoolean = isBoolean3; lodash.isBuffer = isBuffer; - lodash.isDate = isDate3; + lodash.isDate = isDate4; lodash.isElement = isElement; lodash.isEmpty = isEmpty; lodash.isEqual = isEqual2; @@ -16884,14 +16884,14 @@ var require_lodash = __commonJS({ lodash.isNative = isNative; lodash.isNil = isNil; lodash.isNull = isNull2; - lodash.isNumber = isNumber3; + lodash.isNumber = isNumber4; lodash.isObject = isObject4; lodash.isObjectLike = isObjectLike2; lodash.isPlainObject = isPlainObject2; lodash.isRegExp = isRegExp2; lodash.isSafeInteger = isSafeInteger; lodash.isSet = isSet; - lodash.isString = isString3; + lodash.isString = isString4; lodash.isSymbol = isSymbol; lodash.isTypedArray = isTypedArray; lodash.isUndefined = isUndefined2; @@ -17138,17 +17138,17 @@ var require_lodash = __commonJS({ } return lodash; }; - var _17 = runInContext(); + var _18 = runInContext(); if (typeof define == "function" && typeof define.amd == "object" && define.amd) { - root._ = _17; + root._ = _18; define(function() { - return _17; + return _18; }); } else if (freeModule) { - (freeModule.exports = _17)._ = _17; - freeExports._ = _17; + (freeModule.exports = _18)._ = _18; + freeExports._ = _18; } else { - root._ = _17; + root._ = _18; } }).call(exports); } @@ -21112,17 +21112,17 @@ var require_jszip_min = __commonJS({ return n4; } function n3(e5, t6, r3, n4, i4, s5) { - var a4, o2, h3 = e5.file, u3 = e5.compression, l2 = s5 !== O2.utf8encode, f2 = I2.transformTo("string", s5(h3.name)), c3 = I2.transformTo("string", O2.utf8encode(h3.name)), d4 = h3.comment, p = I2.transformTo("string", s5(d4)), m4 = I2.transformTo("string", O2.utf8encode(d4)), _17 = c3.length !== h3.name.length, g = m4.length !== d4.length, b2 = "", v2 = "", y3 = "", w2 = h3.dir, k2 = h3.date, x2 = { crc32: 0, compressedSize: 0, uncompressedSize: 0 }; + var a4, o2, h3 = e5.file, u3 = e5.compression, l2 = s5 !== O2.utf8encode, f2 = I2.transformTo("string", s5(h3.name)), c3 = I2.transformTo("string", O2.utf8encode(h3.name)), d4 = h3.comment, p = I2.transformTo("string", s5(d4)), m4 = I2.transformTo("string", O2.utf8encode(d4)), _18 = c3.length !== h3.name.length, g = m4.length !== d4.length, b2 = "", v2 = "", y3 = "", w2 = h3.dir, k2 = h3.date, x2 = { crc32: 0, compressedSize: 0, uncompressedSize: 0 }; t6 && !r3 || (x2.crc32 = e5.crc32, x2.compressedSize = e5.compressedSize, x2.uncompressedSize = e5.uncompressedSize); var S3 = 0; - t6 && (S3 |= 8), l2 || !_17 && !g || (S3 |= 2048); + t6 && (S3 |= 8), l2 || !_18 && !g || (S3 |= 2048); var z2 = 0, C = 0; w2 && (z2 |= 16), "UNIX" === i4 ? (C = 798, z2 |= function(e6, t7) { var r4 = e6; return e6 || (r4 = t7 ? 16893 : 33204), (65535 & r4) << 16; }(h3.unixPermissions, w2)) : (C = 20, z2 |= function(e6) { return 63 & (e6 || 0); - }(h3.dosPermissions)), a4 = k2.getUTCHours(), a4 <<= 6, a4 |= k2.getUTCMinutes(), a4 <<= 5, a4 |= k2.getUTCSeconds() / 2, o2 = k2.getUTCFullYear() - 1980, o2 <<= 4, o2 |= k2.getUTCMonth() + 1, o2 <<= 5, o2 |= k2.getUTCDate(), _17 && (v2 = A(1, 1) + A(B2(f2), 4) + c3, b2 += "up" + A(v2.length, 2) + v2), g && (y3 = A(1, 1) + A(B2(p), 4) + m4, b2 += "uc" + A(y3.length, 2) + y3); + }(h3.dosPermissions)), a4 = k2.getUTCHours(), a4 <<= 6, a4 |= k2.getUTCMinutes(), a4 <<= 5, a4 |= k2.getUTCSeconds() / 2, o2 = k2.getUTCFullYear() - 1980, o2 <<= 4, o2 |= k2.getUTCMonth() + 1, o2 <<= 5, o2 |= k2.getUTCDate(), _18 && (v2 = A(1, 1) + A(B2(f2), 4) + c3, b2 += "up" + A(v2.length, 2) + v2), g && (y3 = A(1, 1) + A(B2(p), 4) + m4, b2 += "uc" + A(y3.length, 2) + y3); var E2 = ""; return E2 += "\n\0", E2 += A(S3, 2), E2 += u3.magic, E2 += A(a4, 2), E2 += A(o2, 2), E2 += A(x2.crc32, 4), E2 += A(x2.compressedSize, 4), E2 += A(x2.uncompressedSize, 4), E2 += A(f2.length, 2), E2 += A(b2.length, 2), { fileRecord: R2.LOCAL_FILE_HEADER + E2 + f2 + b2, dirRecord: R2.CENTRAL_FILE_HEADER + A(C, 2) + E2 + A(p.length, 2) + "\0\0\0\0" + A(z2, 4) + A(n4, 4) + f2 + b2 + p }; } @@ -21318,7 +21318,7 @@ var require_jszip_min = __commonJS({ "use strict"; function s4(e5, t6, r3) { var n4, i4 = u3.getTypeOf(t6), s5 = u3.extend(r3 || {}, f2); - s5.date = s5.date || new Date(), null !== s5.compression && (s5.compression = s5.compression.toUpperCase()), "string" == typeof s5.unixPermissions && (s5.unixPermissions = parseInt(s5.unixPermissions, 8)), s5.unixPermissions && 16384 & s5.unixPermissions && (s5.dir = true), s5.dosPermissions && 16 & s5.dosPermissions && (s5.dir = true), s5.dir && (e5 = g(e5)), s5.createFolders && (n4 = _17(e5)) && b2.call(this, n4, true); + s5.date = s5.date || new Date(), null !== s5.compression && (s5.compression = s5.compression.toUpperCase()), "string" == typeof s5.unixPermissions && (s5.unixPermissions = parseInt(s5.unixPermissions, 8)), s5.unixPermissions && 16384 & s5.unixPermissions && (s5.dir = true), s5.dosPermissions && 16 & s5.dosPermissions && (s5.dir = true), s5.dir && (e5 = g(e5)), s5.createFolders && (n4 = _18(e5)) && b2.call(this, n4, true); var a5 = "string" === i4 && false === s5.binary && false === s5.base64; r3 && void 0 !== r3.binary || (s5.binary = !a5), (t6 instanceof c3 && 0 === t6.uncompressedSize || s5.dir || !t6 || 0 === t6.length) && (s5.base64 = false, s5.binary = true, t6 = "", s5.compression = "STORE", i4 = "string"); var o3 = null; @@ -21326,7 +21326,7 @@ var require_jszip_min = __commonJS({ var h4 = new d4(e5, o3, s5); this.files[e5] = h4; } - var i3 = e4("./utf8"), u3 = e4("./utils"), l2 = e4("./stream/GenericWorker"), a4 = e4("./stream/StreamHelper"), f2 = e4("./defaults"), c3 = e4("./compressedObject"), d4 = e4("./zipObject"), o2 = e4("./generate"), p = e4("./nodejsUtils"), m4 = e4("./nodejs/NodejsStreamInputAdapter"), _17 = function(e5) { + var i3 = e4("./utf8"), u3 = e4("./utils"), l2 = e4("./stream/GenericWorker"), a4 = e4("./stream/StreamHelper"), f2 = e4("./defaults"), c3 = e4("./compressedObject"), d4 = e4("./zipObject"), o2 = e4("./generate"), p = e4("./nodejsUtils"), m4 = e4("./nodejs/NodejsStreamInputAdapter"), _18 = function(e5) { "/" === e5.slice(-1) && (e5 = e5.substring(0, e5.length - 1)); var t6 = e5.lastIndexOf("/"); return 0 < t6 ? e5.substring(0, t6) : ""; @@ -22367,7 +22367,7 @@ var require_jszip_min = __commonJS({ }; }, { "./utils/common": 41, "./utils/strings": 42, "./zlib/deflate": 46, "./zlib/messages": 51, "./zlib/zstream": 53 }], 40: [function(e4, t5, r2) { "use strict"; - var c3 = e4("./zlib/inflate"), d4 = e4("./utils/common"), p = e4("./utils/strings"), m4 = e4("./zlib/constants"), n3 = e4("./zlib/messages"), i3 = e4("./zlib/zstream"), s4 = e4("./zlib/gzheader"), _17 = Object.prototype.toString; + var c3 = e4("./zlib/inflate"), d4 = e4("./utils/common"), p = e4("./utils/strings"), m4 = e4("./zlib/constants"), n3 = e4("./zlib/messages"), i3 = e4("./zlib/zstream"), s4 = e4("./zlib/gzheader"), _18 = Object.prototype.toString; function a4(e5) { if (!(this instanceof a4)) return new a4(e5); @@ -22389,9 +22389,9 @@ var require_jszip_min = __commonJS({ var r3, n4, i4, s5, a5, o3, h3 = this.strm, u3 = this.options.chunkSize, l2 = this.options.dictionary, f2 = false; if (this.ended) return false; - n4 = t6 === ~~t6 ? t6 : true === t6 ? m4.Z_FINISH : m4.Z_NO_FLUSH, "string" == typeof e5 ? h3.input = p.binstring2buf(e5) : "[object ArrayBuffer]" === _17.call(e5) ? h3.input = new Uint8Array(e5) : h3.input = e5, h3.next_in = 0, h3.avail_in = h3.input.length; + n4 = t6 === ~~t6 ? t6 : true === t6 ? m4.Z_FINISH : m4.Z_NO_FLUSH, "string" == typeof e5 ? h3.input = p.binstring2buf(e5) : "[object ArrayBuffer]" === _18.call(e5) ? h3.input = new Uint8Array(e5) : h3.input = e5, h3.next_in = 0, h3.avail_in = h3.input.length; do { - if (0 === h3.avail_out && (h3.output = new d4.Buf8(u3), h3.next_out = 0, h3.avail_out = u3), (r3 = c3.inflate(h3, m4.Z_NO_FLUSH)) === m4.Z_NEED_DICT && l2 && (o3 = "string" == typeof l2 ? p.string2buf(l2) : "[object ArrayBuffer]" === _17.call(l2) ? new Uint8Array(l2) : l2, r3 = c3.inflateSetDictionary(this.strm, o3)), r3 === m4.Z_BUF_ERROR && true === f2 && (r3 = m4.Z_OK, f2 = false), r3 !== m4.Z_STREAM_END && r3 !== m4.Z_OK) + if (0 === h3.avail_out && (h3.output = new d4.Buf8(u3), h3.next_out = 0, h3.avail_out = u3), (r3 = c3.inflate(h3, m4.Z_NO_FLUSH)) === m4.Z_NEED_DICT && l2 && (o3 = "string" == typeof l2 ? p.string2buf(l2) : "[object ArrayBuffer]" === _18.call(l2) ? new Uint8Array(l2) : l2, r3 = c3.inflateSetDictionary(this.strm, o3)), r3 === m4.Z_BUF_ERROR && true === f2 && (r3 = m4.Z_OK, f2 = false), r3 !== m4.Z_STREAM_END && r3 !== m4.Z_OK) return this.onEnd(r3), !(this.ended = true); h3.next_out && (0 !== h3.avail_out && r3 !== m4.Z_STREAM_END && (0 !== h3.avail_in || n4 !== m4.Z_FINISH && n4 !== m4.Z_SYNC_FLUSH) || ("string" === this.options.to ? (i4 = p.utf8border(h3.output, h3.next_out), s5 = h3.next_out - i4, a5 = p.buf2string(h3.output, i4), h3.next_out = s5, h3.avail_out = u3 - s5, s5 && d4.arraySet(h3.output, h3.output, i4, s5, 0), this.onData(a5)) : this.onData(d4.shrinkBuf(h3.output, h3.next_out)))), 0 === h3.avail_in && 0 === h3.avail_out && (f2 = true); } while ((0 < h3.avail_in || 0 === h3.avail_out) && r3 !== m4.Z_STREAM_END); @@ -22529,7 +22529,7 @@ var require_jszip_min = __commonJS({ }; }, {}], 46: [function(e4, t5, r2) { "use strict"; - var h3, c3 = e4("../utils/common"), u3 = e4("./trees"), d4 = e4("./adler32"), p = e4("./crc32"), n3 = e4("./messages"), l2 = 0, f2 = 4, m4 = 0, _17 = -2, g = -1, b2 = 4, i3 = 2, v2 = 8, y3 = 9, s4 = 286, a4 = 30, o2 = 19, w2 = 2 * s4 + 1, k2 = 15, x2 = 3, S3 = 258, z2 = S3 + x2 + 1, C = 42, E2 = 113, A = 1, I2 = 2, O2 = 3, B2 = 4; + var h3, c3 = e4("../utils/common"), u3 = e4("./trees"), d4 = e4("./adler32"), p = e4("./crc32"), n3 = e4("./messages"), l2 = 0, f2 = 4, m4 = 0, _18 = -2, g = -1, b2 = 4, i3 = 2, v2 = 8, y3 = 9, s4 = 286, a4 = 30, o2 = 19, w2 = 2 * s4 + 1, k2 = 15, x2 = 3, S3 = 258, z2 = S3 + x2 + 1, C = 42, E2 = 113, A = 1, I2 = 2, O2 = 3, B2 = 4; function R2(e5, t6) { return e5.msg = n3[t6], t6; } @@ -22638,7 +22638,7 @@ var require_jszip_min = __commonJS({ } function G2(e5) { var t6; - return e5 && e5.state ? (e5.total_in = e5.total_out = 0, e5.data_type = i3, (t6 = e5.state).pending = 0, t6.pending_out = 0, t6.wrap < 0 && (t6.wrap = -t6.wrap), t6.status = t6.wrap ? C : E2, e5.adler = 2 === t6.wrap ? 0 : 1, t6.last_flush = l2, u3._tr_init(t6), m4) : R2(e5, _17); + return e5 && e5.state ? (e5.total_in = e5.total_out = 0, e5.data_type = i3, (t6 = e5.state).pending = 0, t6.pending_out = 0, t6.wrap < 0 && (t6.wrap = -t6.wrap), t6.status = t6.wrap ? C : E2, e5.adler = 2 === t6.wrap ? 0 : 1, t6.last_flush = l2, u3._tr_init(t6), m4) : R2(e5, _18); } function K2(e5) { var t6 = G2(e5); @@ -22648,10 +22648,10 @@ var require_jszip_min = __commonJS({ } function Y2(e5, t6, r3, n4, i4, s5) { if (!e5) - return _17; + return _18; var a5 = 1; if (t6 === g && (t6 = 6), n4 < 0 ? (a5 = 0, n4 = -n4) : 15 < n4 && (a5 = 2, n4 -= 16), i4 < 1 || y3 < i4 || r3 !== v2 || n4 < 8 || 15 < n4 || t6 < 0 || 9 < t6 || s5 < 0 || b2 < s5) - return R2(e5, _17); + return R2(e5, _18); 8 === n4 && (n4 = 9); var o3 = new H3(); return (e5.state = o3).strm = e5, o3.wrap = a5, o3.gzhead = null, o3.w_bits = n4, o3.w_size = 1 << o3.w_bits, o3.w_mask = o3.w_size - 1, o3.hash_bits = i4 + 7, o3.hash_size = 1 << o3.hash_bits, o3.hash_mask = o3.hash_size - 1, o3.hash_shift = ~~((o3.hash_bits + x2 - 1) / x2), o3.window = new c3.Buf8(2 * o3.w_size), o3.head = new c3.Buf16(o3.hash_size), o3.prev = new c3.Buf16(o3.w_size), o3.lit_bufsize = 1 << i4 + 6, o3.pending_buf_size = 4 * o3.lit_bufsize, o3.pending_buf = new c3.Buf8(o3.pending_buf_size), o3.d_buf = 1 * o3.lit_bufsize, o3.l_buf = 3 * o3.lit_bufsize, o3.level = t6, o3.strategy = s5, o3.method = r3, K2(e5); @@ -22676,13 +22676,13 @@ var require_jszip_min = __commonJS({ }), new M3(4, 4, 8, 4, Z), new M3(4, 5, 16, 8, Z), new M3(4, 6, 32, 32, Z), new M3(4, 4, 16, 16, W), new M3(8, 16, 32, 32, W), new M3(8, 16, 128, 128, W), new M3(8, 32, 128, 256, W), new M3(32, 128, 258, 1024, W), new M3(32, 258, 258, 4096, W)], r2.deflateInit = function(e5, t6) { return Y2(e5, t6, v2, 15, 8, 0); }, r2.deflateInit2 = Y2, r2.deflateReset = K2, r2.deflateResetKeep = G2, r2.deflateSetHeader = function(e5, t6) { - return e5 && e5.state ? 2 !== e5.state.wrap ? _17 : (e5.state.gzhead = t6, m4) : _17; + return e5 && e5.state ? 2 !== e5.state.wrap ? _18 : (e5.state.gzhead = t6, m4) : _18; }, r2.deflate = function(e5, t6) { var r3, n4, i4, s5; if (!e5 || !e5.state || 5 < t6 || t6 < 0) - return e5 ? R2(e5, _17) : _17; + return e5 ? R2(e5, _18) : _18; if (n4 = e5.state, !e5.output || !e5.input && 0 !== e5.avail_in || 666 === n4.status && t6 !== f2) - return R2(e5, 0 === e5.avail_out ? -5 : _17); + return R2(e5, 0 === e5.avail_out ? -5 : _18); if (n4.strm = e5, r3 = n4.last_flush, n4.last_flush = t6, n4.status === C) if (2 === n4.wrap) e5.adler = 0, U(n4, 31), U(n4, 139), U(n4, 8), n4.gzhead ? (U(n4, (n4.gzhead.text ? 1 : 0) + (n4.gzhead.hcrc ? 2 : 0) + (n4.gzhead.extra ? 4 : 0) + (n4.gzhead.name ? 8 : 0) + (n4.gzhead.comment ? 16 : 0)), U(n4, 255 & n4.gzhead.time), U(n4, n4.gzhead.time >> 8 & 255), U(n4, n4.gzhead.time >> 16 & 255), U(n4, n4.gzhead.time >> 24 & 255), U(n4, 9 === n4.level ? 2 : 2 <= n4.strategy || n4.level < 2 ? 4 : 0), U(n4, 255 & n4.gzhead.os), n4.gzhead.extra && n4.gzhead.extra.length && (U(n4, 255 & n4.gzhead.extra.length), U(n4, n4.gzhead.extra.length >> 8 & 255)), n4.gzhead.hcrc && (e5.adler = p(e5.adler, n4.pending_buf, n4.pending, 0)), n4.gzindex = 0, n4.status = 69) : (U(n4, 0), U(n4, 0), U(n4, 0), U(n4, 0), U(n4, 0), U(n4, 9 === n4.level ? 2 : 2 <= n4.strategy || n4.level < 2 ? 4 : 0), U(n4, 3), n4.status = E2); @@ -22769,13 +22769,13 @@ var require_jszip_min = __commonJS({ return t6 !== f2 ? m4 : n4.wrap <= 0 ? 1 : (2 === n4.wrap ? (U(n4, 255 & e5.adler), U(n4, e5.adler >> 8 & 255), U(n4, e5.adler >> 16 & 255), U(n4, e5.adler >> 24 & 255), U(n4, 255 & e5.total_in), U(n4, e5.total_in >> 8 & 255), U(n4, e5.total_in >> 16 & 255), U(n4, e5.total_in >> 24 & 255)) : (P3(n4, e5.adler >>> 16), P3(n4, 65535 & e5.adler)), F(e5), 0 < n4.wrap && (n4.wrap = -n4.wrap), 0 !== n4.pending ? m4 : 1); }, r2.deflateEnd = function(e5) { var t6; - return e5 && e5.state ? (t6 = e5.state.status) !== C && 69 !== t6 && 73 !== t6 && 91 !== t6 && 103 !== t6 && t6 !== E2 && 666 !== t6 ? R2(e5, _17) : (e5.state = null, t6 === E2 ? R2(e5, -3) : m4) : _17; + return e5 && e5.state ? (t6 = e5.state.status) !== C && 69 !== t6 && 73 !== t6 && 91 !== t6 && 103 !== t6 && t6 !== E2 && 666 !== t6 ? R2(e5, _18) : (e5.state = null, t6 === E2 ? R2(e5, -3) : m4) : _18; }, r2.deflateSetDictionary = function(e5, t6) { var r3, n4, i4, s5, a5, o3, h4, u4, l3 = t6.length; if (!e5 || !e5.state) - return _17; + return _18; if (2 === (s5 = (r3 = e5.state).wrap) || 1 === s5 && r3.status !== C || r3.lookahead) - return _17; + return _18; for (1 === s5 && (e5.adler = d4(e5.adler, t6, l3, 0)), r3.wrap = 0, l3 >= r3.w_size && (0 === s5 && (D2(r3.head), r3.strstart = 0, r3.block_start = 0, r3.insert = 0), u4 = new c3.Buf8(r3.w_size), c3.arraySet(u4, t6, l3 - r3.w_size, r3.w_size, 0), t6 = u4, l3 = r3.w_size), a5 = e5.avail_in, o3 = e5.next_in, h4 = e5.input, e5.avail_in = l3, e5.next_in = 0, e5.input = t6, j(r3); r3.lookahead >= x2; ) { for (n4 = r3.strstart, i4 = r3.lookahead - (x2 - 1); r3.ins_h = (r3.ins_h << r3.hash_shift ^ r3.window[n4 + x2 - 1]) & r3.hash_mask, r3.prev[n4 & r3.w_mask] = r3.head[r3.ins_h], r3.head[r3.ins_h] = n4, n4++, --i4; ) ; @@ -22791,8 +22791,8 @@ var require_jszip_min = __commonJS({ }, {}], 48: [function(e4, t5, r2) { "use strict"; t5.exports = function(e5, t6) { - var r3, n3, i3, s4, a4, o2, h3, u3, l2, f2, c3, d4, p, m4, _17, g, b2, v2, y3, w2, k2, x2, S3, z2, C; - r3 = e5.state, n3 = e5.next_in, z2 = e5.input, i3 = n3 + (e5.avail_in - 5), s4 = e5.next_out, C = e5.output, a4 = s4 - (t6 - e5.avail_out), o2 = s4 + (e5.avail_out - 257), h3 = r3.dmax, u3 = r3.wsize, l2 = r3.whave, f2 = r3.wnext, c3 = r3.window, d4 = r3.hold, p = r3.bits, m4 = r3.lencode, _17 = r3.distcode, g = (1 << r3.lenbits) - 1, b2 = (1 << r3.distbits) - 1; + var r3, n3, i3, s4, a4, o2, h3, u3, l2, f2, c3, d4, p, m4, _18, g, b2, v2, y3, w2, k2, x2, S3, z2, C; + r3 = e5.state, n3 = e5.next_in, z2 = e5.input, i3 = n3 + (e5.avail_in - 5), s4 = e5.next_out, C = e5.output, a4 = s4 - (t6 - e5.avail_out), o2 = s4 + (e5.avail_out - 257), h3 = r3.dmax, u3 = r3.wsize, l2 = r3.whave, f2 = r3.wnext, c3 = r3.window, d4 = r3.hold, p = r3.bits, m4 = r3.lencode, _18 = r3.distcode, g = (1 << r3.lenbits) - 1, b2 = (1 << r3.distbits) - 1; e: do { p < 15 && (d4 += z2[n3++] << p, p += 8, d4 += z2[n3++] << p, p += 8), v2 = m4[d4 & g]; @@ -22813,12 +22813,12 @@ var require_jszip_min = __commonJS({ e5.msg = "invalid literal/length code", r3.mode = 30; break e; } - w2 = 65535 & v2, (y3 &= 15) && (p < y3 && (d4 += z2[n3++] << p, p += 8), w2 += d4 & (1 << y3) - 1, d4 >>>= y3, p -= y3), p < 15 && (d4 += z2[n3++] << p, p += 8, d4 += z2[n3++] << p, p += 8), v2 = _17[d4 & b2]; + w2 = 65535 & v2, (y3 &= 15) && (p < y3 && (d4 += z2[n3++] << p, p += 8), w2 += d4 & (1 << y3) - 1, d4 >>>= y3, p -= y3), p < 15 && (d4 += z2[n3++] << p, p += 8, d4 += z2[n3++] << p, p += 8), v2 = _18[d4 & b2]; r: for (; ; ) { if (d4 >>>= y3 = v2 >>> 24, p -= y3, !(16 & (y3 = v2 >>> 16 & 255))) { if (0 == (64 & y3)) { - v2 = _17[(65535 & v2) + (d4 & (1 << y3) - 1)]; + v2 = _18[(65535 & v2) + (d4 & (1 << y3) - 1)]; continue r; } e5.msg = "invalid distance code", r3.mode = 30; @@ -22920,7 +22920,7 @@ var require_jszip_min = __commonJS({ r2.inflateReset = o2, r2.inflateReset2 = h3, r2.inflateResetKeep = a4, r2.inflateInit = function(e5) { return u3(e5, 15); }, r2.inflateInit2 = u3, r2.inflate = function(e5, t6) { - var r3, n4, i4, s5, a5, o3, h4, u4, l3, f3, c4, d4, p, m4, _17, g, b2, v2, y3, w2, k2, x2, S3, z2, C = 0, E2 = new I2.Buf8(4), A = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; + var r3, n4, i4, s5, a5, o3, h4, u4, l3, f3, c4, d4, p, m4, _18, g, b2, v2, y3, w2, k2, x2, S3, z2, C = 0, E2 = new I2.Buf8(4), A = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; if (!e5 || !e5.state || !e5.output || !e5.input && 0 !== e5.avail_in) return U; 12 === (r3 = e5.state).mode && (r3.mode = 13), a5 = e5.next_out, i4 = e5.output, h4 = e5.avail_out, s5 = e5.next_in, n4 = e5.input, o3 = e5.avail_in, u4 = r3.hold, l3 = r3.bits, f3 = o3, c4 = h4, x2 = N; @@ -23131,39 +23131,39 @@ var require_jszip_min = __commonJS({ r3.have = 0, r3.mode = 19; case 19: for (; r3.have < r3.nlen + r3.ndist; ) { - for (; g = (C = r3.lencode[u4 & (1 << r3.lenbits) - 1]) >>> 16 & 255, b2 = 65535 & C, !((_17 = C >>> 24) <= l3); ) { + for (; g = (C = r3.lencode[u4 & (1 << r3.lenbits) - 1]) >>> 16 & 255, b2 = 65535 & C, !((_18 = C >>> 24) <= l3); ) { if (0 === o3) break e; o3--, u4 += n4[s5++] << l3, l3 += 8; } if (b2 < 16) - u4 >>>= _17, l3 -= _17, r3.lens[r3.have++] = b2; + u4 >>>= _18, l3 -= _18, r3.lens[r3.have++] = b2; else { if (16 === b2) { - for (z2 = _17 + 2; l3 < z2; ) { + for (z2 = _18 + 2; l3 < z2; ) { if (0 === o3) break e; o3--, u4 += n4[s5++] << l3, l3 += 8; } - if (u4 >>>= _17, l3 -= _17, 0 === r3.have) { + if (u4 >>>= _18, l3 -= _18, 0 === r3.have) { e5.msg = "invalid bit length repeat", r3.mode = 30; break; } k2 = r3.lens[r3.have - 1], d4 = 3 + (3 & u4), u4 >>>= 2, l3 -= 2; } else if (17 === b2) { - for (z2 = _17 + 3; l3 < z2; ) { + for (z2 = _18 + 3; l3 < z2; ) { if (0 === o3) break e; o3--, u4 += n4[s5++] << l3, l3 += 8; } - l3 -= _17, k2 = 0, d4 = 3 + (7 & (u4 >>>= _17)), u4 >>>= 3, l3 -= 3; + l3 -= _18, k2 = 0, d4 = 3 + (7 & (u4 >>>= _18)), u4 >>>= 3, l3 -= 3; } else { - for (z2 = _17 + 7; l3 < z2; ) { + for (z2 = _18 + 7; l3 < z2; ) { if (0 === o3) break e; o3--, u4 += n4[s5++] << l3, l3 += 8; } - l3 -= _17, k2 = 0, d4 = 11 + (127 & (u4 >>>= _17)), u4 >>>= 7, l3 -= 7; + l3 -= _18, k2 = 0, d4 = 11 + (127 & (u4 >>>= _18)), u4 >>>= 7, l3 -= 7; } if (r3.have + d4 > r3.nlen + r3.ndist) { e5.msg = "invalid bit length repeat", r3.mode = 30; @@ -23196,20 +23196,20 @@ var require_jszip_min = __commonJS({ e5.next_out = a5, e5.avail_out = h4, e5.next_in = s5, e5.avail_in = o3, r3.hold = u4, r3.bits = l3, R2(e5, c4), a5 = e5.next_out, i4 = e5.output, h4 = e5.avail_out, s5 = e5.next_in, n4 = e5.input, o3 = e5.avail_in, u4 = r3.hold, l3 = r3.bits, 12 === r3.mode && (r3.back = -1); break; } - for (r3.back = 0; g = (C = r3.lencode[u4 & (1 << r3.lenbits) - 1]) >>> 16 & 255, b2 = 65535 & C, !((_17 = C >>> 24) <= l3); ) { + for (r3.back = 0; g = (C = r3.lencode[u4 & (1 << r3.lenbits) - 1]) >>> 16 & 255, b2 = 65535 & C, !((_18 = C >>> 24) <= l3); ) { if (0 === o3) break e; o3--, u4 += n4[s5++] << l3, l3 += 8; } if (g && 0 == (240 & g)) { - for (v2 = _17, y3 = g, w2 = b2; g = (C = r3.lencode[w2 + ((u4 & (1 << v2 + y3) - 1) >> v2)]) >>> 16 & 255, b2 = 65535 & C, !(v2 + (_17 = C >>> 24) <= l3); ) { + for (v2 = _18, y3 = g, w2 = b2; g = (C = r3.lencode[w2 + ((u4 & (1 << v2 + y3) - 1) >> v2)]) >>> 16 & 255, b2 = 65535 & C, !(v2 + (_18 = C >>> 24) <= l3); ) { if (0 === o3) break e; o3--, u4 += n4[s5++] << l3, l3 += 8; } u4 >>>= v2, l3 -= v2, r3.back += v2; } - if (u4 >>>= _17, l3 -= _17, r3.back += _17, r3.length = b2, 0 === g) { + if (u4 >>>= _18, l3 -= _18, r3.back += _18, r3.length = b2, 0 === g) { r3.mode = 26; break; } @@ -23233,20 +23233,20 @@ var require_jszip_min = __commonJS({ } r3.was = r3.length, r3.mode = 23; case 23: - for (; g = (C = r3.distcode[u4 & (1 << r3.distbits) - 1]) >>> 16 & 255, b2 = 65535 & C, !((_17 = C >>> 24) <= l3); ) { + for (; g = (C = r3.distcode[u4 & (1 << r3.distbits) - 1]) >>> 16 & 255, b2 = 65535 & C, !((_18 = C >>> 24) <= l3); ) { if (0 === o3) break e; o3--, u4 += n4[s5++] << l3, l3 += 8; } if (0 == (240 & g)) { - for (v2 = _17, y3 = g, w2 = b2; g = (C = r3.distcode[w2 + ((u4 & (1 << v2 + y3) - 1) >> v2)]) >>> 16 & 255, b2 = 65535 & C, !(v2 + (_17 = C >>> 24) <= l3); ) { + for (v2 = _18, y3 = g, w2 = b2; g = (C = r3.distcode[w2 + ((u4 & (1 << v2 + y3) - 1) >> v2)]) >>> 16 & 255, b2 = 65535 & C, !(v2 + (_18 = C >>> 24) <= l3); ) { if (0 === o3) break e; o3--, u4 += n4[s5++] << l3, l3 += 8; } u4 >>>= v2, l3 -= v2, r3.back += v2; } - if (u4 >>>= _17, l3 -= _17, r3.back += _17, 64 & g) { + if (u4 >>>= _18, l3 -= _18, r3.back += _18, 64 & g) { e5.msg = "invalid distance code", r3.mode = 30; break; } @@ -23342,7 +23342,7 @@ var require_jszip_min = __commonJS({ "use strict"; var D2 = e4("../utils/common"), F = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], N = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], U = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0], P3 = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64]; t5.exports = function(e5, t6, r3, n3, i3, s4, a4, o2) { - var h3, u3, l2, f2, c3, d4, p, m4, _17, g = o2.bits, b2 = 0, v2 = 0, y3 = 0, w2 = 0, k2 = 0, x2 = 0, S3 = 0, z2 = 0, C = 0, E2 = 0, A = null, I2 = 0, O2 = new D2.Buf16(16), B2 = new D2.Buf16(16), R2 = null, T3 = 0; + var h3, u3, l2, f2, c3, d4, p, m4, _18, g = o2.bits, b2 = 0, v2 = 0, y3 = 0, w2 = 0, k2 = 0, x2 = 0, S3 = 0, z2 = 0, C = 0, E2 = 0, A = null, I2 = 0, O2 = new D2.Buf16(16), B2 = new D2.Buf16(16), R2 = null, T3 = 0; for (b2 = 0; b2 <= 15; b2++) O2[b2] = 0; for (v2 = 0; v2 < n3; v2++) @@ -23365,7 +23365,7 @@ var require_jszip_min = __commonJS({ if (d4 = 0 === e5 ? (A = R2 = a4, 19) : 1 === e5 ? (A = F, I2 -= 257, R2 = N, T3 -= 257, 256) : (A = U, R2 = P3, -1), b2 = y3, c3 = s4, S3 = v2 = E2 = 0, l2 = -1, f2 = (C = 1 << (x2 = k2)) - 1, 1 === e5 && 852 < C || 2 === e5 && 592 < C) return 1; for (; ; ) { - for (p = b2 - S3, _17 = a4[v2] < d4 ? (m4 = 0, a4[v2]) : a4[v2] > d4 ? (m4 = R2[T3 + a4[v2]], A[I2 + a4[v2]]) : (m4 = 96, 0), h3 = 1 << b2 - S3, y3 = u3 = 1 << x2; i3[c3 + (E2 >> S3) + (u3 -= h3)] = p << 24 | m4 << 16 | _17 | 0, 0 !== u3; ) + for (p = b2 - S3, _18 = a4[v2] < d4 ? (m4 = 0, a4[v2]) : a4[v2] > d4 ? (m4 = R2[T3 + a4[v2]], A[I2 + a4[v2]]) : (m4 = 96, 0), h3 = 1 << b2 - S3, y3 = u3 = 1 << x2; i3[c3 + (E2 >> S3) + (u3 -= h3)] = p << 24 | m4 << 16 | _18 | 0, 0 !== u3; ) ; for (h3 = 1 << b2 - 1; E2 & h3; ) h3 >>= 1; @@ -23394,7 +23394,7 @@ var require_jszip_min = __commonJS({ for (var t6 = e5.length; 0 <= --t6; ) e5[t6] = 0; } - var s4 = 0, a4 = 29, u3 = 256, l2 = u3 + 1 + a4, f2 = 30, c3 = 19, _17 = 2 * l2 + 1, g = 15, d4 = 16, p = 7, m4 = 256, b2 = 16, v2 = 17, y3 = 18, w2 = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], k2 = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], x2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], S3 = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], z2 = new Array(2 * (l2 + 2)); + var s4 = 0, a4 = 29, u3 = 256, l2 = u3 + 1 + a4, f2 = 30, c3 = 19, _18 = 2 * l2 + 1, g = 15, d4 = 16, p = 7, m4 = 256, b2 = 16, v2 = 17, y3 = 18, w2 = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], k2 = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], x2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], S3 = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], z2 = new Array(2 * (l2 + 2)); n3(z2); var C = new Array(2 * f2); n3(C); @@ -23468,7 +23468,7 @@ var require_jszip_min = __commonJS({ } function Y2(e5, t6) { var r3, n4, i4, s5 = t6.dyn_tree, a5 = t6.stat_desc.static_tree, o3 = t6.stat_desc.has_stree, h4 = t6.stat_desc.elems, u4 = -1; - for (e5.heap_len = 0, e5.heap_max = _17, r3 = 0; r3 < h4; r3++) + for (e5.heap_len = 0, e5.heap_max = _18, r3 = 0; r3 < h4; r3++) 0 !== s5[2 * r3] ? (e5.heap[++e5.heap_len] = u4 = r3, e5.depth[r3] = 0) : s5[2 * r3 + 1] = 0; for (; e5.heap_len < 2; ) s5[2 * (i4 = e5.heap[++e5.heap_len] = u4 < 2 ? ++u4 : 0)] = 1, e5.depth[i4] = 0, e5.opt_len--, o3 && (e5.static_len -= a5[2 * i4 + 1]); @@ -23480,7 +23480,7 @@ var require_jszip_min = __commonJS({ var r4, n5, i5, s6, a6, o4, h5 = t7.dyn_tree, u5 = t7.max_code, l3 = t7.stat_desc.static_tree, f3 = t7.stat_desc.has_stree, c4 = t7.stat_desc.extra_bits, d5 = t7.stat_desc.extra_base, p2 = t7.stat_desc.max_length, m5 = 0; for (s6 = 0; s6 <= g; s6++) e6.bl_count[s6] = 0; - for (h5[2 * e6.heap[e6.heap_max] + 1] = 0, r4 = e6.heap_max + 1; r4 < _17; r4++) + for (h5[2 * e6.heap[e6.heap_max] + 1] = 0, r4 = e6.heap_max + 1; r4 < _18; r4++) p2 < (s6 = h5[2 * h5[2 * (n5 = e6.heap[r4]) + 1] + 1] + 1) && (s6 = p2, m5++), h5[2 * n5 + 1] = s6, u5 < n5 || (e6.bl_count[s6]++, a6 = 0, d5 <= n5 && (a6 = c4[n5 - d5]), o4 = h5[2 * n5], e6.opt_len += o4 * (s6 + a6), f3 && (e6.static_len += o4 * (l3[2 * n5 + 1] + a6))); if (0 !== m5) { do { @@ -31671,11 +31671,11 @@ var parseProperty = (field, value) => { case "date": { if (value instanceof Date) { - const dateString = format(new Date(value), "yyyy-MM-dd"); + const dateString = format(value, "yyyy-MM-dd"); if (typeof dateString === "string") return dateString; } - if (typeof value != "string") + if (!(typeof value === "string")) return ""; return value; } @@ -32044,7 +32044,7 @@ var SpaceManager = class { return this.primarySpaceAdapter.saveSpaceTemplate(frames, name317); } resolvePath(path, source) { - if (!source) + if (!source || !path) return path; if (path.indexOf("http") == 0) return path; @@ -36815,7 +36815,7 @@ var fieldTypes = [ multi: true, multiType: "option-multi", icon: "ui//list", - configKeys: ["options"], + configKeys: ["options", "source"], description: i18n_default.properties.option.description }, { @@ -36871,6 +36871,7 @@ var fieldTypes = [ multi: true, multiType: "icon-multi", icon: "ui//gem", + restricted: true, description: i18n_default.properties.icon.description }, { @@ -36886,6 +36887,7 @@ var fieldTypes = [ type: "color", label: i18n_default.properties.color.label, icon: "ui//mk-make-image", + restricted: true, description: i18n_default.properties.color.description }, { @@ -42880,8 +42882,8 @@ var nameForField = (field, superstate) => { var stringIsConst = (str) => { const hasQuotesAtStartEndOnly = /^["'](?:[^"\\]|\\.)*["'](?:;)?$/.test(str); const fixedStr = str?.replace(/;+$/, ""); - const isNumber3 = !isNaN(parseFloat(fixedStr)) && !isNaN(fixedStr); - return hasQuotesAtStartEndOnly || isNumber3 || fixedStr == "false" || fixedStr == "true" || str == null || str == ""; + const isNumber4 = !isNaN(parseFloat(fixedStr)) && !isNaN(fixedStr); + return hasQuotesAtStartEndOnly || isNumber4 || fixedStr == "false" || fixedStr == "true" || str == null || str == ""; }; var kitWithProps = (root, props, styles2, actions) => { return frameRootWithProps({ ...root, node: { ...root.node, type: "frame", ref: "spaces://$kit/#*" + root.id }, children: [] }, props, styles2, actions); @@ -42934,7 +42936,7 @@ var generateCodeForProp = (value, isClosure) => { var buildExecutable = (root) => { const treeNode = { ...root, execActions: {}, execProps: {}, execStyles: {}, execPropsOptions: {} }; const { sortedKeys, dependencies: dependencies314 } = sortKeysByDependencies(treeNode.node.props, `${treeNode.id}.props`); - const { sortedKeys: _17, dependencies: styleDependencies } = sortKeysByDependencies(treeNode.node.styles, `${treeNode.id}.styles`); + const { sortedKeys: _18, dependencies: styleDependencies } = sortKeysByDependencies(treeNode.node.styles, `${treeNode.id}.styles`); treeNode.execPropsOptions.props = sortedKeys.map((f2) => { return { name: f2, @@ -46456,7 +46458,7 @@ var showSpacesMenu = (e4, superstate, saveLink, includeDefaults, canAdd) => { { name: i18n_default.buttons.tag, value: "tag" }, { name: i18n_default.menu.folder, value: "folder" } ], - saveOptions: (_17, value) => { + saveOptions: (_18, value) => { saveLink(value[0], !options.some((f2) => f2.value == value[0])); }, placeholder: i18n_default.labels.spaceSelectPlaceholder, @@ -54236,7 +54238,7 @@ var createNumber = /* @__PURE__ */ factory(name20, dependencies20, (_ref) => { typed: typed2 } = _ref; var number3 = typed2("number", { - "": function _17() { + "": function _18() { return 0; }, number: function number4(x2) { @@ -54302,7 +54304,7 @@ var createString = /* @__PURE__ */ factory(name21, dependencies21, (_ref) => { typed: typed2 } = _ref; return typed2(name21, { - "": function _17() { + "": function _18() { return ""; }, number: format2, @@ -54330,7 +54332,7 @@ var createBoolean = /* @__PURE__ */ factory(name22, dependencies22, (_ref) => { typed: typed2 } = _ref; return typed2(name22, { - "": function _17() { + "": function _18() { return false; }, boolean: function boolean(x2) { @@ -54371,7 +54373,7 @@ var createBignumber = /* @__PURE__ */ factory(name23, dependencies23, (_ref) => BigNumber } = _ref; return typed2("bignumber", { - "": function _17() { + "": function _18() { return new BigNumber(0); }, number: function number3(x2) { @@ -54422,7 +54424,7 @@ var createComplex = /* @__PURE__ */ factory(name24, dependencies24, (_ref) => { Complex: Complex2 } = _ref; return typed2("complex", { - "": function _17() { + "": function _18() { return Complex2.ZERO; }, number: function number3(x2) { @@ -54512,7 +54514,7 @@ var createMatrix = /* @__PURE__ */ factory(name26, dependencies26, (_ref) => { SparseMatrix } = _ref; return typed2(name26, { - "": function _17() { + "": function _18() { return _create([]); }, string: function string3(format7) { @@ -54578,7 +54580,7 @@ var createMatrixFromFunction = /* @__PURE__ */ factory(name27, dependencies27, ( m4 = matrix(format7); } m4.resize(size); - m4.forEach(function(_17, index) { + m4.forEach(function(_18, index) { var val = fn(index); if (isZero(val)) return; @@ -58526,7 +58528,7 @@ var createIdentity = /* @__PURE__ */ factory(name94, dependencies93, (_ref) => { SparseMatrix } = _ref; return typed2(name94, { - "": function _17() { + "": function _18() { return config2.matrix === "Matrix" ? matrix([]) : []; }, string: function string3(format7) { @@ -58772,7 +58774,7 @@ var createOnes = /* @__PURE__ */ factory(name98, dependencies97, (_ref) => { BigNumber } = _ref; return typed2("ones", { - "": function _17() { + "": function _18() { return config2.matrix === "Array" ? _ones([]) : _ones([], "default"); }, "...number | BigNumber | string": function numberBigNumberString(size) { @@ -59110,7 +59112,7 @@ var createRotationMatrix = /* @__PURE__ */ factory(name103, dependencies102, (_r sin: sin2 } = _ref; return typed2(name103, { - "": function _17() { + "": function _18() { return config2.matrix === "Matrix" ? matrix([]) : []; }, string: function string3(format7) { @@ -59562,7 +59564,7 @@ var createZeros = /* @__PURE__ */ factory(name110, dependencies109, (_ref) => { BigNumber } = _ref; return typed2(name110, { - "": function _17() { + "": function _18() { return config2.matrix === "Array" ? _zeros([]) : _zeros([], "default"); }, "...number | BigNumber | string": function numberBigNumberString(size) { @@ -59656,12 +59658,12 @@ var createFft = /* @__PURE__ */ factory(name111, dependencies110, (_ref) => { function _1dFft(arr, dim) { var size = arraySize(arr); if (dim !== 0) - return new Array(size[0]).fill(0).map((_17, i3) => _1dFft(arr[i3], dim - 1)); + return new Array(size[0]).fill(0).map((_18, i3) => _1dFft(arr[i3], dim - 1)); if (size.length === 1) return _fft(arr); function _transpose(arr2) { var size2 = arraySize(arr2); - return new Array(size2[1]).fill(0).map((_17, j) => new Array(size2[0]).fill(0).map((_18, i3) => arr2[i3][j])); + return new Array(size2[1]).fill(0).map((_18, j) => new Array(size2[0]).fill(0).map((_19, i3) => arr2[i3][j])); } return _transpose(_1dFft(_transpose(arr), 1)); } @@ -59673,11 +59675,11 @@ var createFft = /* @__PURE__ */ factory(name111, dependencies110, (_ref) => { chirp.push(pow2(w2, divideScalar(pow2(i3, 2), 2))); } var N2 = pow2(2, ceil2(log24(n3 + n3 - 1))); - var xp = [...new Array(n3).fill(0).map((_17, i4) => multiplyScalar(arr[i4], chirp[n3 - 1 + i4])), ...new Array(N2 - n3).fill(0)]; - var ichirp = [...new Array(n3 + n3 - 1).fill(0).map((_17, i4) => divideScalar(1, chirp[i4])), ...new Array(N2 - (n3 + n3 - 1)).fill(0)]; + var xp = [...new Array(n3).fill(0).map((_18, i4) => multiplyScalar(arr[i4], chirp[n3 - 1 + i4])), ...new Array(N2 - n3).fill(0)]; + var ichirp = [...new Array(n3 + n3 - 1).fill(0).map((_18, i4) => divideScalar(1, chirp[i4])), ...new Array(N2 - (n3 + n3 - 1)).fill(0)]; var fftXp = _fft(xp); var fftIchirp = _fft(ichirp); - var fftProduct = new Array(N2).fill(0).map((_17, i4) => multiplyScalar(fftXp[i4], fftIchirp[i4])); + var fftProduct = new Array(N2).fill(0).map((_18, i4) => multiplyScalar(fftXp[i4], fftIchirp[i4])); var ifftProduct = dotDivide(conj(_ndFft(conj(fftProduct))), N2); var ret = []; for (var _i = n3 - 1; _i < n3 + n3 - 1; _i++) { @@ -59690,7 +59692,7 @@ var createFft = /* @__PURE__ */ factory(name111, dependencies110, (_ref) => { if (len === 1) return [arr[0]]; if (len % 2 === 0) { - var ret = [..._fft(arr.filter((_17, i3) => i3 % 2 === 0), len / 2), ..._fft(arr.filter((_17, i3) => i3 % 2 === 1), len / 2)]; + var ret = [..._fft(arr.filter((_18, i3) => i3 % 2 === 0), len / 2), ..._fft(arr.filter((_18, i3) => i3 % 2 === 1), len / 2)]; for (var k2 = 0; k2 < len / 2; k2++) { var p = ret[k2]; var q2 = multiplyScalar(ret[k2 + len / 2], exp2(multiplyScalar(multiplyScalar(tau2, I2), divideScalar(-k2, len)))); @@ -60104,7 +60106,7 @@ var createMode = /* @__PURE__ */ factory(name116, dependencies115, (_ref) => { } = _ref; return typed2(name116, { "Array | Matrix": _mode, - "...": function _17(args) { + "...": function _18(args) { return _mode(args); } }); @@ -60166,7 +60168,7 @@ var createProd = /* @__PURE__ */ factory(name117, dependencies116, (_ref) => { "Array | Matrix, number | BigNumber": function ArrayMatrixNumberBigNumber(array, dim) { throw new Error("prod(A, dim) is not yet supported"); }, - "...": function _17(args) { + "...": function _18(args) { return _prod(args); } }); @@ -62732,7 +62734,7 @@ var createMax = /* @__PURE__ */ factory(name156, dependencies155, (_ref) => { "Array | Matrix, number | BigNumber": function ArrayMatrixNumberBigNumber(array, dim) { return reduce(array, dim.valueOf(), _largest); }, - "...": function _17(args) { + "...": function _18(args) { if (containsCollections(args)) { throw new TypeError("Scalar values expected in function max"); } @@ -62784,7 +62786,7 @@ var createMin = /* @__PURE__ */ factory(name157, dependencies156, (_ref) => { "Array | Matrix, number | BigNumber": function ArrayMatrixNumberBigNumber(array, dim) { return reduce(array, dim.valueOf(), _smallest); }, - "...": function _17(args) { + "...": function _18(args) { if (containsCollections(args)) { throw new TypeError("Scalar values expected in function min"); } @@ -66727,7 +66729,7 @@ var createSparse = /* @__PURE__ */ factory(name164, dependencies163, (_ref) => { SparseMatrix } = _ref; return typed2(name164, { - "": function _17() { + "": function _18() { return new SparseMatrix([]); }, string: function string3(datatype) { @@ -72476,7 +72478,7 @@ var createParser = /* @__PURE__ */ factory(name227, dependencies226, (_ref) => { Parser: Parser4 } = _ref; return typed2(name227, { - "": function _17() { + "": function _18() { return new Parser4(); } }); @@ -77151,7 +77153,7 @@ var createChain = /* @__PURE__ */ factory(name241, dependencies240, (_ref) => { Chain } = _ref; return typed2(name241, { - "": function _17() { + "": function _18() { return new Chain(); }, any: function any(value) { @@ -77223,7 +77225,7 @@ var createDet = /* @__PURE__ */ factory(name242, dependencies241, (_ref) => { return subtractScalar(multiply(matrix2[0][0], matrix2[1][1]), multiply(matrix2[1][0], matrix2[0][1])); } else { var negated = false; - var rowIndices = new Array(rows).fill(0).map((_17, i4) => i4); + var rowIndices = new Array(rows).fill(0).map((_18, i4) => i4); for (var k2 = 0; k2 < rows; k2++) { var k_ = rowIndices[k2]; if (isZero(matrix2[k_][k2])) { @@ -77486,8 +77488,8 @@ var createPinv = /* @__PURE__ */ factory(name244, dependencies243, (_ref) => { } function _rankFact(mat, rows, cols) { var rref = _rref(mat, rows, cols); - var C = mat.map((_17, i3) => _17.filter((_18, j) => j < rows && !_isZero(dot(rref[j], rref[j])))); - var F = rref.filter((_17, i3) => !_isZero(dot(rref[i3], rref[i3]))); + var C = mat.map((_18, i3) => _18.filter((_19, j) => j < rows && !_isZero(dot(rref[j], rref[j])))); + var F = rref.filter((_18, i3) => !_isZero(dot(rref[i3], rref[i3]))); return { C, F @@ -77883,7 +77885,7 @@ function createComplexEigs(_ref) { function randomOrthogonalVector(N, orthog, type) { var big = type === "BigNumber"; var cplx = type === "Complex"; - var v2 = Array(N).fill(0).map((_17) => 2 * Math.random() - 1); + var v2 = Array(N).fill(0).map((_18) => 2 * Math.random() - 1); if (big) { v2 = v2.map((n3) => bignumber(n3)); } @@ -79190,7 +79192,7 @@ var createSum = /* @__PURE__ */ factory(name254, dependencies253, (_ref) => { return typed2(name254, { "Array | Matrix": _sum, "Array | Matrix, number | BigNumber": _nsumDim, - "...": function _17(args) { + "...": function _18(args) { if (containsCollections(args)) { throw new TypeError("Scalar values expected in function sum"); } @@ -79242,7 +79244,7 @@ var createCumSum = /* @__PURE__ */ factory(name255, dependencies254, (_ref) => { "Matrix, number | BigNumber": function MatrixNumberBigNumber(matrix, dim) { return matrix.create(_ncumSumDim(matrix.valueOf(), dim)); }, - "...": function _17(args) { + "...": function _18(args) { if (containsCollections(args)) { throw new TypeError("All values expected to be scalar in function cumsum"); } @@ -79313,7 +79315,7 @@ var createMean = /* @__PURE__ */ factory(name256, dependencies255, (_ref) => { return typed2(name256, { "Array | Matrix": _mean, "Array | Matrix, number | BigNumber": _nmeanDim, - "...": function _17(args) { + "...": function _18(args) { if (containsCollections(args)) { throw new TypeError("Scalar values expected in function mean"); } @@ -79398,7 +79400,7 @@ var createMedian = /* @__PURE__ */ factory(name257, dependencies256, (_ref) => { "Array | Matrix, number | BigNumber": function ArrayMatrixNumberBigNumber(array, dim) { throw new Error("median(A, dim) is not yet supported"); }, - "...": function _17(args) { + "...": function _18(args) { if (containsCollections(args)) { throw new TypeError("Scalar values expected in function median"); } @@ -79420,7 +79422,7 @@ var createMad = /* @__PURE__ */ factory(name258, dependencies257, (_ref) => { } = _ref; return typed2(name258, { "Array | Matrix": _mad, - "...": function _17(args) { + "...": function _18(args) { return _mad(args); } }); @@ -79467,7 +79469,7 @@ var createVariance = /* @__PURE__ */ factory(name259, dependencies258, (_ref) => return _varDim(array, dim, DEFAULT_NORMALIZATION); }, "Array | Matrix, number | BigNumber, string": _varDim, - "...": function _17(args) { + "...": function _18(args) { return _var(args, DEFAULT_NORMALIZATION); } }); @@ -79635,7 +79637,7 @@ var createStd = /* @__PURE__ */ factory(name261, dependencies260, (_ref) => { "Array | Matrix, string": _std, "Array | Matrix, number | BigNumber": _std, "Array | Matrix, number | BigNumber, string": _std, - "...": function _17(args) { + "...": function _18(args) { return _std(args); } }); @@ -84878,6 +84880,7 @@ function create(factories, config2) { } // src/core/utils/formula/formulas.ts +var import_lodash6 = __toESM(require_lodash()); var prop = (args, math, scope) => { if (args.length !== 1) { return ""; @@ -85102,8 +85105,14 @@ var formulas = { }, "formatDate": formatDateString, "parseDate": (str) => { - if (str?.length > 0) - return new Date(str) ?? ""; + if ((0, import_lodash6.isNumber)(str)) { + return new Date(str); + } + if ((0, import_lodash6.isString)(str)) + return new Date(str); + if ((0, import_lodash6.isDate)(str)) + return str; + return ""; } }; @@ -85506,7 +85515,7 @@ var serializePathState = (pathState) => { var stringifyJob = (job) => `${job.type}:${job.path}`; // src/core/superstate/superstate.ts -var import_lodash7 = __toESM(require_lodash()); +var import_lodash8 = __toESM(require_lodash()); // src/core/utils/contexts/predicate/filter.ts var stringEqual = (value, filterValue) => { @@ -87773,7 +87782,7 @@ var resultForFilters = (filters, props) => { }; // src/core/utils/commands/actions.ts -var import_lodash6 = __toESM(require_lodash()); +var import_lodash7 = __toESM(require_lodash()); var parseActionString = (actionString) => { return safelyParseJSON(actionString); }; @@ -87800,7 +87809,7 @@ var runActionTree = async (superstate, actionTree, instance) => { }; const action = superstate.cli.commandForAction(actionTree.action); if (action.schema.type == "builtin") { - if (action.schema.id == "loop" && (0, import_lodash6.isArray)(instance.result)) { + if (action.schema.id == "loop" && (0, import_lodash7.isArray)(instance.result)) { const loopResults = await Promise.all( instance.result.map( (item) => Promise.all( @@ -88234,10 +88243,10 @@ function inlineWorker(scriptText, name317) { // src/core/superstate/workers/indexer.worker.ts function Worker2() { - return inlineWorker(`"use strict";var rx=Object.create;var kh=Object.defineProperty;var nx=Object.getOwnPropertyDescriptor;var ix=Object.getOwnPropertyNames;var ax=Object.getPrototypeOf,sx=Object.prototype.hasOwnProperty;var Ch=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var ox=(e,r,a,u)=>{if(r&&typeof r=="object"||typeof r=="function")for(let l of ix(r))!sx.call(e,l)&&l!==a&&kh(e,l,{get:()=>r[l],enumerable:!(u=nx(r,l))||u.enumerable});return e};var yf=(e,r,a)=>(a=e!=null?rx(ax(e)):{},ox(r||!e||!e.__esModule?kh(a,"default",{value:e,enumerable:!0}):a,e));var xf=Ch((ra,es)=>{(function(){var e,r="4.17.21",a=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",p="Invalid \`variable\` option passed into \`_.template\`",v="__lodash_hash_undefined__",C=500,T="__lodash_placeholder__",A=1,R=2,V=4,K=1,re=2,N=1,_e=2,Le=4,ye=8,de=16,We=32,ze=64,$e=128,Pe=256,tt=512,je=30,pr="...",jt=800,me=16,at=1,mt=2,Rt=3,Oe=1/0,Qe=9007199254740991,Wt=17976931348623157e292,xt=0/0,Pt=4294967295,mi=Pt-1,fa=Pt>>>1,hn=[["ary",$e],["bind",N],["bindKey",_e],["curry",ye],["curryRight",de],["flip",tt],["partial",We],["partialRight",ze],["rearg",Pe]],H="[object Arguments]",gi="[object Array]",Ko="[object AsyncFunction]",Er="[object Boolean]",pn="[object Date]",Zo="[object DOMException]",yi="[object Error]",xi="[object Function]",hs="[object GeneratorFunction]",Yt="[object Map]",Yn="[object Number]",Xo="[object Null]",dr="[object Object]",ps="[object Promise]",Jo="[object Proxy]",mr="[object RegExp]",De="[object Set]",st="[object String]",dn="[object Symbol]",ds="[object Undefined]",Ue="[object WeakMap]",eu="[object WeakSet]",Dr="[object ArrayBuffer]",nt="[object DataView]",te="[object Float32Array]",Ir="[object Float64Array]",mn="[object Int8Array]",vi="[object Int16Array]",ca="[object Int32Array]",ha="[object Uint8Array]",wi="[object Uint8ClampedArray]",ct="[object Uint16Array]",Si="[object Uint32Array]",pa=/\\b__p \\+= '';/g,_i=/\\b(__p \\+=) '' \\+/g,Ae=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g,da=/&(?:amp|lt|gt|quot|#39);/g,ma=/[&<>"']/g,bi=RegExp(da.source),ga=RegExp(ma.source),ki=/<%-([\\s\\S]+?)%>/g,gn=/<%([\\s\\S]+?)%>/g,Bn=/<%=([\\s\\S]+?)%>/g,tu=/\\.|\\[(?:[^[\\]]*|(["'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,Ci=/^\\w*$/,ru=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,qr=/[\\\\^$.*+?()[\\]{}|]/g,Ti=RegExp(qr.source),Y=/^\\s+/,nu=/\\s/,iu=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,vt=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,ya=/,? & /,Ce=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,Vn=/[()=,{}\\[\\]\\/\\s]/,au=/\\\\(\\\\)?/g,ot=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,Qt=/\\w*$/,Kt=/^[-+]0x[0-9a-f]+$/i,Ke=/^0b[01]+$/i,Bt=/^\\[object .+?Constructor\\]$/,gr=/^0o[0-7]+$/i,Gr=/^(?:0|[1-9]\\d*)$/,su=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,Pi=/($^)/,ou=/['\\n\\r\\u2028\\u2029\\\\]/g,Re="\\\\ud800-\\\\udfff",Ei="\\\\u0300-\\\\u036f",uu="\\\\ufe20-\\\\ufe2f",ms="\\\\u20d0-\\\\u20ff",xa=Ei+uu+ms,gs="\\\\u2700-\\\\u27bf",ys="a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff",lu="\\\\xac\\\\xb1\\\\xd7\\\\xf7",fu="\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf",cu="\\\\u2000-\\\\u206f",hu=" \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000",va="A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde",wa="\\\\ufe0e\\\\ufe0f",xs=lu+fu+cu+hu,Sa="['\\u2019]",pu="["+Re+"]",_a="["+xs+"]",Mr="["+xa+"]",ba="\\\\d+",du="["+gs+"]",vs="["+ys+"]",yn="[^"+Re+xs+ba+gs+ys+va+"]",xn="\\\\ud83c[\\\\udffb-\\\\udfff]",ws="(?:"+Mr+"|"+xn+")",vn="[^"+Re+"]",Vt="(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}",ka="[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]",wn="["+va+"]",Ss="\\\\u200d",_s="(?:"+vs+"|"+yn+")",mu="(?:"+wn+"|"+yn+")",bs="(?:"+Sa+"(?:d|ll|m|re|s|t|ve))?",ks="(?:"+Sa+"(?:D|LL|M|RE|S|T|VE))?",Cs=ws+"?",Di="["+wa+"]?",gu="(?:"+Ss+"(?:"+[vn,Vt,ka].join("|")+")"+Di+Cs+")*",Ts="\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])",yu="\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])",Ps=Di+Cs+gu,xu="(?:"+[du,Vt,ka].join("|")+")"+Ps,vu="(?:"+[vn+Mr+"?",Mr,Vt,ka,pu].join("|")+")",wu=RegExp(Sa,"g"),Su=RegExp(Mr,"g"),Ca=RegExp(xn+"(?="+xn+")|"+vu+Ps,"g"),_u=RegExp([wn+"?"+vs+"+"+bs+"(?="+[_a,wn,"$"].join("|")+")",mu+"+"+ks+"(?="+[_a,wn+_s,"$"].join("|")+")",wn+"?"+_s+"+"+bs,wn+"+"+ks,yu,Ts,ba,xu].join("|"),"g"),bu=RegExp("["+Ss+Re+xa+wa+"]"),ku=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Cu=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Tu=-1,Fe={};Fe[te]=Fe[Ir]=Fe[mn]=Fe[vi]=Fe[ca]=Fe[ha]=Fe[wi]=Fe[ct]=Fe[Si]=!0,Fe[H]=Fe[gi]=Fe[Dr]=Fe[Er]=Fe[nt]=Fe[pn]=Fe[yi]=Fe[xi]=Fe[Yt]=Fe[Yn]=Fe[dr]=Fe[mr]=Fe[De]=Fe[st]=Fe[Ue]=!1;var Ie={};Ie[H]=Ie[gi]=Ie[Dr]=Ie[nt]=Ie[Er]=Ie[pn]=Ie[te]=Ie[Ir]=Ie[mn]=Ie[vi]=Ie[ca]=Ie[Yt]=Ie[Yn]=Ie[dr]=Ie[mr]=Ie[De]=Ie[st]=Ie[dn]=Ie[ha]=Ie[wi]=Ie[ct]=Ie[Si]=!0,Ie[yi]=Ie[xi]=Ie[Ue]=!1;var Pu={\\u00C0:"A",\\u00C1:"A",\\u00C2:"A",\\u00C3:"A",\\u00C4:"A",\\u00C5:"A",\\u00E0:"a",\\u00E1:"a",\\u00E2:"a",\\u00E3:"a",\\u00E4:"a",\\u00E5:"a",\\u00C7:"C",\\u00E7:"c",\\u00D0:"D",\\u00F0:"d",\\u00C8:"E",\\u00C9:"E",\\u00CA:"E",\\u00CB:"E",\\u00E8:"e",\\u00E9:"e",\\u00EA:"e",\\u00EB:"e",\\u00CC:"I",\\u00CD:"I",\\u00CE:"I",\\u00CF:"I",\\u00EC:"i",\\u00ED:"i",\\u00EE:"i",\\u00EF:"i",\\u00D1:"N",\\u00F1:"n",\\u00D2:"O",\\u00D3:"O",\\u00D4:"O",\\u00D5:"O",\\u00D6:"O",\\u00D8:"O",\\u00F2:"o",\\u00F3:"o",\\u00F4:"o",\\u00F5:"o",\\u00F6:"o",\\u00F8:"o",\\u00D9:"U",\\u00DA:"U",\\u00DB:"U",\\u00DC:"U",\\u00F9:"u",\\u00FA:"u",\\u00FB:"u",\\u00FC:"u",\\u00DD:"Y",\\u00FD:"y",\\u00FF:"y",\\u00C6:"Ae",\\u00E6:"ae",\\u00DE:"Th",\\u00FE:"th",\\u00DF:"ss",\\u0100:"A",\\u0102:"A",\\u0104:"A",\\u0101:"a",\\u0103:"a",\\u0105:"a",\\u0106:"C",\\u0108:"C",\\u010A:"C",\\u010C:"C",\\u0107:"c",\\u0109:"c",\\u010B:"c",\\u010D:"c",\\u010E:"D",\\u0110:"D",\\u010F:"d",\\u0111:"d",\\u0112:"E",\\u0114:"E",\\u0116:"E",\\u0118:"E",\\u011A:"E",\\u0113:"e",\\u0115:"e",\\u0117:"e",\\u0119:"e",\\u011B:"e",\\u011C:"G",\\u011E:"G",\\u0120:"G",\\u0122:"G",\\u011D:"g",\\u011F:"g",\\u0121:"g",\\u0123:"g",\\u0124:"H",\\u0126:"H",\\u0125:"h",\\u0127:"h",\\u0128:"I",\\u012A:"I",\\u012C:"I",\\u012E:"I",\\u0130:"I",\\u0129:"i",\\u012B:"i",\\u012D:"i",\\u012F:"i",\\u0131:"i",\\u0134:"J",\\u0135:"j",\\u0136:"K",\\u0137:"k",\\u0138:"k",\\u0139:"L",\\u013B:"L",\\u013D:"L",\\u013F:"L",\\u0141:"L",\\u013A:"l",\\u013C:"l",\\u013E:"l",\\u0140:"l",\\u0142:"l",\\u0143:"N",\\u0145:"N",\\u0147:"N",\\u014A:"N",\\u0144:"n",\\u0146:"n",\\u0148:"n",\\u014B:"n",\\u014C:"O",\\u014E:"O",\\u0150:"O",\\u014D:"o",\\u014F:"o",\\u0151:"o",\\u0154:"R",\\u0156:"R",\\u0158:"R",\\u0155:"r",\\u0157:"r",\\u0159:"r",\\u015A:"S",\\u015C:"S",\\u015E:"S",\\u0160:"S",\\u015B:"s",\\u015D:"s",\\u015F:"s",\\u0161:"s",\\u0162:"T",\\u0164:"T",\\u0166:"T",\\u0163:"t",\\u0165:"t",\\u0167:"t",\\u0168:"U",\\u016A:"U",\\u016C:"U",\\u016E:"U",\\u0170:"U",\\u0172:"U",\\u0169:"u",\\u016B:"u",\\u016D:"u",\\u016F:"u",\\u0171:"u",\\u0173:"u",\\u0174:"W",\\u0175:"w",\\u0176:"Y",\\u0177:"y",\\u0178:"Y",\\u0179:"Z",\\u017B:"Z",\\u017D:"Z",\\u017A:"z",\\u017C:"z",\\u017E:"z",\\u0132:"IJ",\\u0133:"ij",\\u0152:"Oe",\\u0153:"oe",\\u0149:"'n",\\u017F:"s"},Ta={"&":"&","<":"<",">":">",'"':""","'":"'"},Pa={"&":"&","<":"<",">":">",""":'"',"'":"'"},Eu={"\\\\":"\\\\","'":"'","\\n":"n","\\r":"r","\\u2028":"u2028","\\u2029":"u2029"},Es=parseFloat,Ds=parseInt,Is=typeof global=="object"&&global&&global.Object===Object&&global,Du=typeof self=="object"&&self&&self.Object===Object&&self,rt=Is||Du||Function("return this")(),Ea=typeof ra=="object"&&ra&&!ra.nodeType&&ra,Or=Ea&&typeof es=="object"&&es&&!es.nodeType&&es,Ne=Or&&Or.exports===Ea,zr=Ne&&Is.process,ut=function(){try{var b=Or&&Or.require&&Or.require("util").types;return b||zr&&zr.binding&&zr.binding("util")}catch{}}(),Ms=ut&&ut.isArrayBuffer,Da=ut&&ut.isDate,Os=ut&&ut.isMap,As=ut&&ut.isRegExp,Un=ut&&ut.isSet,yr=ut&&ut.isTypedArray;function ht(b,D,P){switch(P.length){case 0:return b.call(D);case 1:return b.call(D,P[0]);case 2:return b.call(D,P[0],P[1]);case 3:return b.call(D,P[0],P[1],P[2])}return b.apply(D,P)}function Iu(b,D,P,B){for(var Z=-1,xe=b==null?0:b.length;++Z-1}function Ia(b,D,P){for(var B=-1,Z=b==null?0:b.length;++B-1;);return P}function Bs(b,D){for(var P=b.length;P--&&Sn(D,b[P],0)>-1;);return P}function Lu(b,D){for(var P=b.length,B=0;P--;)b[P]===D&&++B;return B}var Vs=Hn(Pu),Ru=Hn(Ta);function Wu(b){return"\\\\"+Eu[b]}function Yu(b,D){return b==null?e:b[D]}function Xt(b){return bu.test(b)}function Bu(b){return ku.test(b)}function Vu(b){for(var D,P=[];!(D=b.next()).done;)P.push(D.value);return P}function Wa(b){var D=-1,P=Array(b.size);return b.forEach(function(B,Z){P[++D]=[Z,B]}),P}function qn(b,D){return function(P){return b(D(P))}}function Ut(b,D){for(var P=-1,B=b.length,Z=0,xe=[];++P-1}function ro(t,n){var s=this.__data__,f=It(s,t);return f<0?(++this.size,s.push([t,n])):s[f][1]=n,this}wr.prototype.clear=ml,wr.prototype.delete=to,wr.prototype.get=gl,wr.prototype.has=yl,wr.prototype.set=ro;function Sr(t){var n=-1,s=t==null?0:t.length;for(this.clear();++n=n?t:n)),t}function St(t,n,s,f,d,x){var w,_=n&A,k=n&R,I=n&V;if(s&&(w=d?s(t,f,d,x):s(t)),w!==e)return w;if(!Ve(t))return t;var M=ee(t);if(M){if(w=Md(t),!_)return Mt(t,w)}else{var O=yt(t),W=O==xi||O==hs;if(On(t))return mc(t,_);if(O==dr||O==H||W&&!d){if(w=k||W?{}:Fc(t),!_)return k?wd(t,Tl(w,t)):vd(t,Ua(w,t))}else{if(!Ie[O])return d?t:{};w=Od(t,O,_)}}x||(x=new Ht);var q=x.get(t);if(q)return q;x.set(t,w),lh(t)?t.forEach(function(Q){w.add(St(Q,n,s,Q,t,x))}):oh(t)&&t.forEach(function(Q,ue){w.set(ue,St(Q,n,s,ue,t,x))});var j=I?k?$l:zl:k?At:lt,ae=M?e:j(t);return He(ae||t,function(Q,ue){ae&&(ue=Q,Q=t[ue]),ei(w,ue,St(Q,n,s,ue,t,x))}),w}function Ha(t){var n=lt(t);return function(s){return oo(s,t,n)}}function oo(t,n,s){var f=s.length;if(t==null)return!f;for(t=se(t);f--;){var d=s[f],x=n[d],w=t[d];if(w===e&&!(d in t)||!x(w))return!1}return!0}function uo(t,n,s){if(typeof t!="function")throw new Et(l);return Xa(function(){t.apply(e,s)},n)}function _t(t,n,s,f){var d=-1,x=Mi,w=!0,_=t.length,k=[],I=n.length;if(!_)return k;s&&(n=Ee(n,gt(s))),f?(x=Ia,w=!1):n.length>=a&&(x=_n,w=!1,n=new Kr(n));e:for(;++d<_;){var M=t[d],O=s==null?M:s(M);if(M=f||M!==0?M:0,w&&O===O){for(var W=I;W--;)if(n[W]===O)continue e;k.push(M)}else x(n,O,f)||k.push(M)}return k}var Wr=wc(Jt),lo=wc(Ga,!0);function Pl(t,n){var s=!0;return Wr(t,function(f,d,x){return s=!!n(f,d,x),s}),s}function Ki(t,n,s){for(var f=-1,d=t.length;++fd?0:d+s),f=f===e||f>d?d:ne(f),f<0&&(f+=d),f=s>f?0:ch(f);s0&&s(_)?n>1?it(_,n-1,s,f,d):Zt(d,_):f||(d[d.length]=_)}return d}var qa=Sc(),co=Sc(!0);function Jt(t,n){return t&&qa(t,n,lt)}function Ga(t,n){return t&&co(t,n,lt)}function er(t,n){return Ar(n,function(s){return rn(t[s])})}function Xr(t,n){n=In(n,t);for(var s=0,f=n.length;t!=null&&sn}function Dl(t,n){return t!=null&&be.call(t,n)}function Il(t,n){return t!=null&&n in se(t)}function Ml(t,n,s){return t>=Be(n,s)&&t=120&&M.length>=120)?new Kr(w&&M):e}M=t[0];var O=-1,W=_[0];e:for(;++O-1;)_!==t&&jr.call(_,k,1),jr.call(t,k,1);return t}function oc(t,n){for(var s=t?n.length:0,f=s-1;s--;){var d=n[s];if(s==f||d!==x){var x=d;tn(d)?jr.call(t,d,1):Yl(t,d)}}return t}function Ll(t,n){return t+jn(Js()*(n-t+1))}function ud(t,n,s,f){for(var d=-1,x=qe(Bi((n-t)/(s||1)),0),w=P(x);x--;)w[f?x:++d]=t,t+=s;return w}function Rl(t,n){var s="";if(!t||n<1||n>Qe)return s;do n%2&&(s+=t),n=jn(n/2),n&&(t+=t);while(n);return s}function oe(t,n){return ef(Rc(t,n,Ft),t+"")}function ld(t){return so(ta(t))}function fd(t,n){var s=ta(t);return ko(s,Zr(n,0,s.length))}function Qa(t,n,s,f){if(!Ve(t))return t;n=In(n,t);for(var d=-1,x=n.length,w=x-1,_=t;_!=null&&++dd?0:d+n),s=s>d?d:s,s<0&&(s+=d),d=n>s?0:s-n>>>0,n>>>=0;for(var x=P(d);++f>>1,w=t[x];w!==null&&!Gt(w)&&(s?w<=n:w=a){var I=n?null:kd(t);if(I)return bn(I);w=!1,d=_n,k=new Kr}else k=n?[]:_;e:for(;++f=f?t:nr(t,n,s)}var dc=Ju||function(t){return rt.clearTimeout(t)};function mc(t,n){if(n)return t.slice();var s=t.length,f=zs?zs(s):new t.constructor(s);return t.copy(f),f}function Hl(t){var n=new t.constructor(t.byteLength);return new Ri(n).set(new Ri(t)),n}function md(t,n){var s=n?Hl(t.buffer):t.buffer;return new t.constructor(s,t.byteOffset,t.byteLength)}function gd(t){var n=new t.constructor(t.source,Qt.exec(t));return n.lastIndex=t.lastIndex,n}function yd(t){return Jn?se(Jn.call(t)):{}}function gc(t,n){var s=n?Hl(t.buffer):t.buffer;return new t.constructor(s,t.byteOffset,t.length)}function yc(t,n){if(t!==n){var s=t!==e,f=t===null,d=t===t,x=Gt(t),w=n!==e,_=n===null,k=n===n,I=Gt(n);if(!_&&!I&&!x&&t>n||x&&w&&k&&!_&&!I||f&&w&&k||!s&&k||!d)return 1;if(!f&&!x&&!I&&t=_)return k;var I=s[f];return k*(I=="desc"?-1:1)}}return t.index-n.index}function xc(t,n,s,f){for(var d=-1,x=t.length,w=s.length,_=-1,k=n.length,I=qe(x-w,0),M=P(k+I),O=!f;++_1?s[d-1]:e,w=d>2?s[2]:e;for(x=t.length>3&&typeof x=="function"?(d--,x):e,w&&bt(s[0],s[1],w)&&(x=d<3?e:x,d=1),n=se(n);++f-1?d[x?n[w]:w]:e}}function kc(t){return en(function(n){var s=n.length,f=s,d=Dt.prototype.thru;for(t&&n.reverse();f--;){var x=n[f];if(typeof x!="function")throw new Et(l);if(d&&!w&&_o(x)=="wrapper")var w=new Dt([],!0)}for(f=w?f:s;++f1&&he.reverse(),M&&k_))return!1;var I=x.get(t),M=x.get(n);if(I&&M)return I==n&&M==t;var O=-1,W=!0,q=s&re?new Kr:e;for(x.set(t,n),x.set(n,t);++O<_;){var j=t[O],ae=n[O];if(f)var Q=w?f(ae,j,O,n,t,x):f(j,ae,O,t,n,x);if(Q!==e){if(Q)continue;W=!1;break}if(q){if(!Oa(n,function(ue,he){if(!_n(q,he)&&(j===ue||d(j,ue,s,f,x)))return q.push(he)})){W=!1;break}}else if(!(j===ae||d(j,ae,s,f,x))){W=!1;break}}return x.delete(t),x.delete(n),W}function Td(t,n,s,f,d,x,w){switch(s){case nt:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case Dr:return!(t.byteLength!=n.byteLength||!x(new Ri(t),new Ri(n)));case Er:case pn:case Yn:return Cr(+t,+n);case yi:return t.name==n.name&&t.message==n.message;case mr:case st:return t==n+"";case Yt:var _=Wa;case De:var k=f&K;if(_||(_=bn),t.size!=n.size&&!k)return!1;var I=w.get(t);if(I)return I==n;f|=re,w.set(t,n);var M=Mc(_(t),_(n),f,d,x,w);return w.delete(t),M;case dn:if(Jn)return Jn.call(t)==Jn.call(n)}return!1}function Pd(t,n,s,f,d,x){var w=s&K,_=zl(t),k=_.length,I=zl(n),M=I.length;if(k!=M&&!w)return!1;for(var O=k;O--;){var W=_[O];if(!(w?W in n:be.call(n,W)))return!1}var q=x.get(t),j=x.get(n);if(q&&j)return q==n&&j==t;var ae=!0;x.set(t,n),x.set(n,t);for(var Q=w;++O1?"& ":"")+n[f],n=n.join(s>2?", ":" "),t.replace(iu,\`{ + return inlineWorker(`"use strict";var nx=Object.create;var Ch=Object.defineProperty;var ix=Object.getOwnPropertyDescriptor;var ax=Object.getOwnPropertyNames;var sx=Object.getPrototypeOf,ox=Object.prototype.hasOwnProperty;var Th=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var ux=(e,r,a,u)=>{if(r&&typeof r=="object"||typeof r=="function")for(let l of ax(r))!ox.call(e,l)&&l!==a&&Ch(e,l,{get:()=>r[l],enumerable:!(u=ix(r,l))||u.enumerable});return e};var Ao=(e,r,a)=>(a=e!=null?nx(sx(e)):{},ux(r||!e||!e.__esModule?Ch(a,"default",{value:e,enumerable:!0}):a,e));var Fo=Th((ra,es)=>{(function(){var e,r="4.17.21",a=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",p="Invalid \`variable\` option passed into \`_.template\`",v="__lodash_hash_undefined__",C=500,T="__lodash_placeholder__",A=1,R=2,V=4,K=1,re=2,N=1,_e=2,Le=4,ye=8,de=16,We=32,ze=64,$e=128,Pe=256,tt=512,je=30,pr="...",jt=800,me=16,at=1,mt=2,Rt=3,Oe=1/0,Qe=9007199254740991,Wt=17976931348623157e292,xt=0/0,Pt=4294967295,mi=Pt-1,fa=Pt>>>1,hn=[["ary",$e],["bind",N],["bindKey",_e],["curry",ye],["curryRight",de],["flip",tt],["partial",We],["partialRight",ze],["rearg",Pe]],H="[object Arguments]",gi="[object Array]",Xo="[object AsyncFunction]",Er="[object Boolean]",pn="[object Date]",Jo="[object DOMException]",yi="[object Error]",xi="[object Function]",hs="[object GeneratorFunction]",Yt="[object Map]",Yn="[object Number]",eu="[object Null]",dr="[object Object]",ps="[object Promise]",tu="[object Proxy]",mr="[object RegExp]",De="[object Set]",st="[object String]",dn="[object Symbol]",ds="[object Undefined]",Ue="[object WeakMap]",ru="[object WeakSet]",Dr="[object ArrayBuffer]",nt="[object DataView]",te="[object Float32Array]",Ir="[object Float64Array]",mn="[object Int8Array]",vi="[object Int16Array]",ca="[object Int32Array]",ha="[object Uint8Array]",wi="[object Uint8ClampedArray]",ct="[object Uint16Array]",Si="[object Uint32Array]",pa=/\\b__p \\+= '';/g,_i=/\\b(__p \\+=) '' \\+/g,Ae=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g,da=/&(?:amp|lt|gt|quot|#39);/g,ma=/[&<>"']/g,bi=RegExp(da.source),ga=RegExp(ma.source),ki=/<%-([\\s\\S]+?)%>/g,gn=/<%([\\s\\S]+?)%>/g,Bn=/<%=([\\s\\S]+?)%>/g,nu=/\\.|\\[(?:[^[\\]]*|(["'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,Ci=/^\\w*$/,iu=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,qr=/[\\\\^$.*+?()[\\]{}|]/g,Ti=RegExp(qr.source),Y=/^\\s+/,au=/\\s/,su=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,vt=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,ya=/,? & /,Ce=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,Vn=/[()=,{}\\[\\]\\/\\s]/,ou=/\\\\(\\\\)?/g,ot=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,Qt=/\\w*$/,Kt=/^[-+]0x[0-9a-f]+$/i,Ke=/^0b[01]+$/i,Bt=/^\\[object .+?Constructor\\]$/,gr=/^0o[0-7]+$/i,Gr=/^(?:0|[1-9]\\d*)$/,uu=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,Pi=/($^)/,lu=/['\\n\\r\\u2028\\u2029\\\\]/g,Re="\\\\ud800-\\\\udfff",Ei="\\\\u0300-\\\\u036f",fu="\\\\ufe20-\\\\ufe2f",ms="\\\\u20d0-\\\\u20ff",xa=Ei+fu+ms,gs="\\\\u2700-\\\\u27bf",ys="a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff",cu="\\\\xac\\\\xb1\\\\xd7\\\\xf7",hu="\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf",pu="\\\\u2000-\\\\u206f",du=" \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000",va="A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde",wa="\\\\ufe0e\\\\ufe0f",xs=cu+hu+pu+du,Sa="['\\u2019]",mu="["+Re+"]",_a="["+xs+"]",Mr="["+xa+"]",ba="\\\\d+",gu="["+gs+"]",vs="["+ys+"]",yn="[^"+Re+xs+ba+gs+ys+va+"]",xn="\\\\ud83c[\\\\udffb-\\\\udfff]",ws="(?:"+Mr+"|"+xn+")",vn="[^"+Re+"]",Vt="(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}",ka="[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]",wn="["+va+"]",Ss="\\\\u200d",_s="(?:"+vs+"|"+yn+")",yu="(?:"+wn+"|"+yn+")",bs="(?:"+Sa+"(?:d|ll|m|re|s|t|ve))?",ks="(?:"+Sa+"(?:D|LL|M|RE|S|T|VE))?",Cs=ws+"?",Di="["+wa+"]?",xu="(?:"+Ss+"(?:"+[vn,Vt,ka].join("|")+")"+Di+Cs+")*",Ts="\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])",vu="\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])",Ps=Di+Cs+xu,wu="(?:"+[gu,Vt,ka].join("|")+")"+Ps,Su="(?:"+[vn+Mr+"?",Mr,Vt,ka,mu].join("|")+")",_u=RegExp(Sa,"g"),bu=RegExp(Mr,"g"),Ca=RegExp(xn+"(?="+xn+")|"+Su+Ps,"g"),ku=RegExp([wn+"?"+vs+"+"+bs+"(?="+[_a,wn,"$"].join("|")+")",yu+"+"+ks+"(?="+[_a,wn+_s,"$"].join("|")+")",wn+"?"+_s+"+"+bs,wn+"+"+ks,vu,Ts,ba,wu].join("|"),"g"),Cu=RegExp("["+Ss+Re+xa+wa+"]"),Tu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Pu=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Eu=-1,Fe={};Fe[te]=Fe[Ir]=Fe[mn]=Fe[vi]=Fe[ca]=Fe[ha]=Fe[wi]=Fe[ct]=Fe[Si]=!0,Fe[H]=Fe[gi]=Fe[Dr]=Fe[Er]=Fe[nt]=Fe[pn]=Fe[yi]=Fe[xi]=Fe[Yt]=Fe[Yn]=Fe[dr]=Fe[mr]=Fe[De]=Fe[st]=Fe[Ue]=!1;var Ie={};Ie[H]=Ie[gi]=Ie[Dr]=Ie[nt]=Ie[Er]=Ie[pn]=Ie[te]=Ie[Ir]=Ie[mn]=Ie[vi]=Ie[ca]=Ie[Yt]=Ie[Yn]=Ie[dr]=Ie[mr]=Ie[De]=Ie[st]=Ie[dn]=Ie[ha]=Ie[wi]=Ie[ct]=Ie[Si]=!0,Ie[yi]=Ie[xi]=Ie[Ue]=!1;var Du={\\u00C0:"A",\\u00C1:"A",\\u00C2:"A",\\u00C3:"A",\\u00C4:"A",\\u00C5:"A",\\u00E0:"a",\\u00E1:"a",\\u00E2:"a",\\u00E3:"a",\\u00E4:"a",\\u00E5:"a",\\u00C7:"C",\\u00E7:"c",\\u00D0:"D",\\u00F0:"d",\\u00C8:"E",\\u00C9:"E",\\u00CA:"E",\\u00CB:"E",\\u00E8:"e",\\u00E9:"e",\\u00EA:"e",\\u00EB:"e",\\u00CC:"I",\\u00CD:"I",\\u00CE:"I",\\u00CF:"I",\\u00EC:"i",\\u00ED:"i",\\u00EE:"i",\\u00EF:"i",\\u00D1:"N",\\u00F1:"n",\\u00D2:"O",\\u00D3:"O",\\u00D4:"O",\\u00D5:"O",\\u00D6:"O",\\u00D8:"O",\\u00F2:"o",\\u00F3:"o",\\u00F4:"o",\\u00F5:"o",\\u00F6:"o",\\u00F8:"o",\\u00D9:"U",\\u00DA:"U",\\u00DB:"U",\\u00DC:"U",\\u00F9:"u",\\u00FA:"u",\\u00FB:"u",\\u00FC:"u",\\u00DD:"Y",\\u00FD:"y",\\u00FF:"y",\\u00C6:"Ae",\\u00E6:"ae",\\u00DE:"Th",\\u00FE:"th",\\u00DF:"ss",\\u0100:"A",\\u0102:"A",\\u0104:"A",\\u0101:"a",\\u0103:"a",\\u0105:"a",\\u0106:"C",\\u0108:"C",\\u010A:"C",\\u010C:"C",\\u0107:"c",\\u0109:"c",\\u010B:"c",\\u010D:"c",\\u010E:"D",\\u0110:"D",\\u010F:"d",\\u0111:"d",\\u0112:"E",\\u0114:"E",\\u0116:"E",\\u0118:"E",\\u011A:"E",\\u0113:"e",\\u0115:"e",\\u0117:"e",\\u0119:"e",\\u011B:"e",\\u011C:"G",\\u011E:"G",\\u0120:"G",\\u0122:"G",\\u011D:"g",\\u011F:"g",\\u0121:"g",\\u0123:"g",\\u0124:"H",\\u0126:"H",\\u0125:"h",\\u0127:"h",\\u0128:"I",\\u012A:"I",\\u012C:"I",\\u012E:"I",\\u0130:"I",\\u0129:"i",\\u012B:"i",\\u012D:"i",\\u012F:"i",\\u0131:"i",\\u0134:"J",\\u0135:"j",\\u0136:"K",\\u0137:"k",\\u0138:"k",\\u0139:"L",\\u013B:"L",\\u013D:"L",\\u013F:"L",\\u0141:"L",\\u013A:"l",\\u013C:"l",\\u013E:"l",\\u0140:"l",\\u0142:"l",\\u0143:"N",\\u0145:"N",\\u0147:"N",\\u014A:"N",\\u0144:"n",\\u0146:"n",\\u0148:"n",\\u014B:"n",\\u014C:"O",\\u014E:"O",\\u0150:"O",\\u014D:"o",\\u014F:"o",\\u0151:"o",\\u0154:"R",\\u0156:"R",\\u0158:"R",\\u0155:"r",\\u0157:"r",\\u0159:"r",\\u015A:"S",\\u015C:"S",\\u015E:"S",\\u0160:"S",\\u015B:"s",\\u015D:"s",\\u015F:"s",\\u0161:"s",\\u0162:"T",\\u0164:"T",\\u0166:"T",\\u0163:"t",\\u0165:"t",\\u0167:"t",\\u0168:"U",\\u016A:"U",\\u016C:"U",\\u016E:"U",\\u0170:"U",\\u0172:"U",\\u0169:"u",\\u016B:"u",\\u016D:"u",\\u016F:"u",\\u0171:"u",\\u0173:"u",\\u0174:"W",\\u0175:"w",\\u0176:"Y",\\u0177:"y",\\u0178:"Y",\\u0179:"Z",\\u017B:"Z",\\u017D:"Z",\\u017A:"z",\\u017C:"z",\\u017E:"z",\\u0132:"IJ",\\u0133:"ij",\\u0152:"Oe",\\u0153:"oe",\\u0149:"'n",\\u017F:"s"},Ta={"&":"&","<":"<",">":">",'"':""","'":"'"},Pa={"&":"&","<":"<",">":">",""":'"',"'":"'"},Iu={"\\\\":"\\\\","'":"'","\\n":"n","\\r":"r","\\u2028":"u2028","\\u2029":"u2029"},Es=parseFloat,Ds=parseInt,Is=typeof global=="object"&&global&&global.Object===Object&&global,Mu=typeof self=="object"&&self&&self.Object===Object&&self,rt=Is||Mu||Function("return this")(),Ea=typeof ra=="object"&&ra&&!ra.nodeType&&ra,Or=Ea&&typeof es=="object"&&es&&!es.nodeType&&es,Ne=Or&&Or.exports===Ea,zr=Ne&&Is.process,ut=function(){try{var b=Or&&Or.require&&Or.require("util").types;return b||zr&&zr.binding&&zr.binding("util")}catch{}}(),Ms=ut&&ut.isArrayBuffer,Da=ut&&ut.isDate,Os=ut&&ut.isMap,As=ut&&ut.isRegExp,Un=ut&&ut.isSet,yr=ut&&ut.isTypedArray;function ht(b,D,P){switch(P.length){case 0:return b.call(D);case 1:return b.call(D,P[0]);case 2:return b.call(D,P[0],P[1]);case 3:return b.call(D,P[0],P[1],P[2])}return b.apply(D,P)}function Ou(b,D,P,B){for(var Z=-1,xe=b==null?0:b.length;++Z-1}function Ia(b,D,P){for(var B=-1,Z=b==null?0:b.length;++B-1;);return P}function Bs(b,D){for(var P=b.length;P--&&Sn(D,b[P],0)>-1;);return P}function Wu(b,D){for(var P=b.length,B=0;P--;)b[P]===D&&++B;return B}var Vs=Hn(Du),Yu=Hn(Ta);function Bu(b){return"\\\\"+Iu[b]}function Vu(b,D){return b==null?e:b[D]}function Xt(b){return Cu.test(b)}function Uu(b){return Tu.test(b)}function Hu(b){for(var D,P=[];!(D=b.next()).done;)P.push(D.value);return P}function Wa(b){var D=-1,P=Array(b.size);return b.forEach(function(B,Z){P[++D]=[Z,B]}),P}function qn(b,D){return function(P){return b(D(P))}}function Ut(b,D){for(var P=-1,B=b.length,Z=0,xe=[];++P-1}function ro(t,n){var s=this.__data__,f=It(s,t);return f<0?(++this.size,s.push([t,n])):s[f][1]=n,this}wr.prototype.clear=yl,wr.prototype.delete=to,wr.prototype.get=xl,wr.prototype.has=vl,wr.prototype.set=ro;function Sr(t){var n=-1,s=t==null?0:t.length;for(this.clear();++n=n?t:n)),t}function St(t,n,s,f,d,x){var w,_=n&A,k=n&R,I=n&V;if(s&&(w=d?s(t,f,d,x):s(t)),w!==e)return w;if(!Ve(t))return t;var M=ee(t);if(M){if(w=Od(t),!_)return Mt(t,w)}else{var O=yt(t),W=O==xi||O==hs;if(On(t))return gc(t,_);if(O==dr||O==H||W&&!d){if(w=k||W?{}:Nc(t),!_)return k?Sd(t,El(w,t)):wd(t,Ua(w,t))}else{if(!Ie[O])return d?t:{};w=Ad(t,O,_)}}x||(x=new Ht);var q=x.get(t);if(q)return q;x.set(t,w),fh(t)?t.forEach(function(Q){w.add(St(Q,n,s,Q,t,x))}):uh(t)&&t.forEach(function(Q,ue){w.set(ue,St(Q,n,s,ue,t,x))});var j=I?k?Ql:jl:k?At:lt,ae=M?e:j(t);return He(ae||t,function(Q,ue){ae&&(ue=Q,Q=t[ue]),ei(w,ue,St(Q,n,s,ue,t,x))}),w}function Ha(t){var n=lt(t);return function(s){return oo(s,t,n)}}function oo(t,n,s){var f=s.length;if(t==null)return!f;for(t=se(t);f--;){var d=s[f],x=n[d],w=t[d];if(w===e&&!(d in t)||!x(w))return!1}return!0}function uo(t,n,s){if(typeof t!="function")throw new Et(l);return Xa(function(){t.apply(e,s)},n)}function _t(t,n,s,f){var d=-1,x=Mi,w=!0,_=t.length,k=[],I=n.length;if(!_)return k;s&&(n=Ee(n,gt(s))),f?(x=Ia,w=!1):n.length>=a&&(x=_n,w=!1,n=new Kr(n));e:for(;++d<_;){var M=t[d],O=s==null?M:s(M);if(M=f||M!==0?M:0,w&&O===O){for(var W=I;W--;)if(n[W]===O)continue e;k.push(M)}else x(n,O,f)||k.push(M)}return k}var Wr=Sc(Jt),lo=Sc(Ga,!0);function Dl(t,n){var s=!0;return Wr(t,function(f,d,x){return s=!!n(f,d,x),s}),s}function Ki(t,n,s){for(var f=-1,d=t.length;++fd?0:d+s),f=f===e||f>d?d:ne(f),f<0&&(f+=d),f=s>f?0:hh(f);s0&&s(_)?n>1?it(_,n-1,s,f,d):Zt(d,_):f||(d[d.length]=_)}return d}var qa=_c(),co=_c(!0);function Jt(t,n){return t&&qa(t,n,lt)}function Ga(t,n){return t&&co(t,n,lt)}function er(t,n){return Ar(n,function(s){return rn(t[s])})}function Xr(t,n){n=In(n,t);for(var s=0,f=n.length;t!=null&&sn}function Ml(t,n){return t!=null&&be.call(t,n)}function Ol(t,n){return t!=null&&n in se(t)}function Al(t,n,s){return t>=Be(n,s)&&t=120&&M.length>=120)?new Kr(w&&M):e}M=t[0];var O=-1,W=_[0];e:for(;++O-1;)_!==t&&jr.call(_,k,1),jr.call(t,k,1);return t}function uc(t,n){for(var s=t?n.length:0,f=s-1;s--;){var d=n[s];if(s==f||d!==x){var x=d;tn(d)?jr.call(t,d,1):Vl(t,d)}}return t}function Wl(t,n){return t+jn(Js()*(n-t+1))}function ld(t,n,s,f){for(var d=-1,x=qe(Bi((n-t)/(s||1)),0),w=P(x);x--;)w[f?x:++d]=t,t+=s;return w}function Yl(t,n){var s="";if(!t||n<1||n>Qe)return s;do n%2&&(s+=t),n=jn(n/2),n&&(t+=t);while(n);return s}function oe(t,n){return rf(Wc(t,n,Ft),t+"")}function fd(t){return so(ta(t))}function cd(t,n){var s=ta(t);return ko(s,Zr(n,0,s.length))}function Qa(t,n,s,f){if(!Ve(t))return t;n=In(n,t);for(var d=-1,x=n.length,w=x-1,_=t;_!=null&&++dd?0:d+n),s=s>d?d:s,s<0&&(s+=d),d=n>s?0:s-n>>>0,n>>>=0;for(var x=P(d);++f>>1,w=t[x];w!==null&&!Gt(w)&&(s?w<=n:w=a){var I=n?null:Cd(t);if(I)return bn(I);w=!1,d=_n,k=new Kr}else k=n?[]:_;e:for(;++f=f?t:nr(t,n,s)}var mc=tl||function(t){return rt.clearTimeout(t)};function gc(t,n){if(n)return t.slice();var s=t.length,f=zs?zs(s):new t.constructor(s);return t.copy(f),f}function Gl(t){var n=new t.constructor(t.byteLength);return new Ri(n).set(new Ri(t)),n}function gd(t,n){var s=n?Gl(t.buffer):t.buffer;return new t.constructor(s,t.byteOffset,t.byteLength)}function yd(t){var n=new t.constructor(t.source,Qt.exec(t));return n.lastIndex=t.lastIndex,n}function xd(t){return Jn?se(Jn.call(t)):{}}function yc(t,n){var s=n?Gl(t.buffer):t.buffer;return new t.constructor(s,t.byteOffset,t.length)}function xc(t,n){if(t!==n){var s=t!==e,f=t===null,d=t===t,x=Gt(t),w=n!==e,_=n===null,k=n===n,I=Gt(n);if(!_&&!I&&!x&&t>n||x&&w&&k&&!_&&!I||f&&w&&k||!s&&k||!d)return 1;if(!f&&!x&&!I&&t=_)return k;var I=s[f];return k*(I=="desc"?-1:1)}}return t.index-n.index}function vc(t,n,s,f){for(var d=-1,x=t.length,w=s.length,_=-1,k=n.length,I=qe(x-w,0),M=P(k+I),O=!f;++_1?s[d-1]:e,w=d>2?s[2]:e;for(x=t.length>3&&typeof x=="function"?(d--,x):e,w&&bt(s[0],s[1],w)&&(x=d<3?e:x,d=1),n=se(n);++f-1?d[x?n[w]:w]:e}}function Cc(t){return en(function(n){var s=n.length,f=s,d=Dt.prototype.thru;for(t&&n.reverse();f--;){var x=n[f];if(typeof x!="function")throw new Et(l);if(d&&!w&&_o(x)=="wrapper")var w=new Dt([],!0)}for(f=w?f:s;++f1&&he.reverse(),M&&k_))return!1;var I=x.get(t),M=x.get(n);if(I&&M)return I==n&&M==t;var O=-1,W=!0,q=s&re?new Kr:e;for(x.set(t,n),x.set(n,t);++O<_;){var j=t[O],ae=n[O];if(f)var Q=w?f(ae,j,O,n,t,x):f(j,ae,O,t,n,x);if(Q!==e){if(Q)continue;W=!1;break}if(q){if(!Oa(n,function(ue,he){if(!_n(q,he)&&(j===ue||d(j,ue,s,f,x)))return q.push(he)})){W=!1;break}}else if(!(j===ae||d(j,ae,s,f,x))){W=!1;break}}return x.delete(t),x.delete(n),W}function Pd(t,n,s,f,d,x,w){switch(s){case nt:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case Dr:return!(t.byteLength!=n.byteLength||!x(new Ri(t),new Ri(n)));case Er:case pn:case Yn:return Cr(+t,+n);case yi:return t.name==n.name&&t.message==n.message;case mr:case st:return t==n+"";case Yt:var _=Wa;case De:var k=f&K;if(_||(_=bn),t.size!=n.size&&!k)return!1;var I=w.get(t);if(I)return I==n;f|=re,w.set(t,n);var M=Oc(_(t),_(n),f,d,x,w);return w.delete(t),M;case dn:if(Jn)return Jn.call(t)==Jn.call(n)}return!1}function Ed(t,n,s,f,d,x){var w=s&K,_=jl(t),k=_.length,I=jl(n),M=I.length;if(k!=M&&!w)return!1;for(var O=k;O--;){var W=_[O];if(!(w?W in n:be.call(n,W)))return!1}var q=x.get(t),j=x.get(n);if(q&&j)return q==n&&j==t;var ae=!0;x.set(t,n),x.set(n,t);for(var Q=w;++O1?"& ":"")+n[f],n=n.join(s>2?", ":" "),t.replace(su,\`{ /* [wrapped with \`+n+\`] */ -\`)}function Fd(t){return ee(t)||ai(t)||!!(Qs&&t&&t[Qs])}function tn(t,n){var s=typeof t;return n=n??Qe,!!n&&(s=="number"||s!="symbol"&&Gr.test(t))&&t>-1&&t%1==0&&t0){if(++n>=jt)return arguments[0]}else n=0;return t.apply(e,arguments)}}function ko(t,n){var s=-1,f=t.length,d=f-1;for(n=n===e?f:n;++s1?t[n-1]:e;return s=typeof s=="function"?(t.pop(),s):e,Qc(t,s)});function Kc(t){var n=g(t);return n.__chain__=!0,n}function Gm(t,n){return n(t),t}function Co(t,n){return n(t)}var zm=en(function(t){var n=t.length,s=n?t[0]:0,f=this.__wrapped__,d=function(x){return Qi(x,t)};return n>1||this.__actions__.length||!(f instanceof ie)||!tn(s)?this.thru(d):(f=f.slice(s,+s+(n?1:0)),f.__actions__.push({func:Co,args:[d],thisArg:e}),new Dt(f,this.__chain__).thru(function(x){return n&&!x.length&&x.push(e),x}))});function $m(){return Kc(this)}function jm(){return new Dt(this.value(),this.__chain__)}function Qm(){this.__values__===e&&(this.__values__=fh(this.value()));var t=this.__index__>=this.__values__.length,n=t?e:this.__values__[this.__index__++];return{done:t,value:n}}function Km(){return this}function Zm(t){for(var n,s=this;s instanceof Gi;){var f=Hc(s);f.__index__=0,f.__values__=e,n?d.__wrapped__=f:n=f;var d=f;s=s.__wrapped__}return d.__wrapped__=t,n}function Xm(){var t=this.__wrapped__;if(t instanceof ie){var n=t;return this.__actions__.length&&(n=new ie(this)),n=n.reverse(),n.__actions__.push({func:Co,args:[tf],thisArg:e}),new Dt(n,this.__chain__)}return this.thru(tf)}function Jm(){return hc(this.__wrapped__,this.__actions__)}var eg=yo(function(t,n,s){be.call(t,s)?++t[s]:_r(t,s,1)});function tg(t,n,s){var f=ee(t)?Ii:Pl;return s&&bt(t,n,s)&&(n=e),f(t,$(n,3))}function rg(t,n){var s=ee(t)?Ar:fo;return s(t,$(n,3))}var ng=bc(qc),ig=bc(Gc);function ag(t,n){return it(To(t,n),1)}function sg(t,n){return it(To(t,n),Oe)}function og(t,n,s){return s=s===e?1:ne(s),it(To(t,n),s)}function Zc(t,n){var s=ee(t)?He:Wr;return s(t,$(n,3))}function Xc(t,n){var s=ee(t)?Mu:lo;return s(t,$(n,3))}var ug=yo(function(t,n,s){be.call(t,s)?t[s].push(n):_r(t,s,[n])});function lg(t,n,s,f){t=Ot(t)?t:ta(t),s=s&&!f?ne(s):0;var d=t.length;return s<0&&(s=qe(d+s,0)),Mo(t)?s<=d&&t.indexOf(n,s)>-1:!!d&&Sn(t,n,s)>-1}var fg=oe(function(t,n,s){var f=-1,d=typeof n=="function",x=Ot(t)?P(t.length):[];return Wr(t,function(w){x[++f]=d?ht(n,w,s):tr(w,n,s)}),x}),cg=yo(function(t,n,s){_r(t,s,n)});function To(t,n){var s=ee(t)?Ee:E;return s(t,$(n,3))}function hg(t,n,s,f){return t==null?[]:(ee(n)||(n=n==null?[]:[n]),s=f?e:s,ee(s)||(s=s==null?[]:[s]),kr(t,n,s))}var pg=yo(function(t,n,s){t[s?0:1].push(n)},function(){return[[],[]]});function dg(t,n,s){var f=ee(t)?Ma:Ws,d=arguments.length<3;return f(t,$(n,4),s,d,Wr)}function mg(t,n,s){var f=ee(t)?Ou:Ws,d=arguments.length<3;return f(t,$(n,4),s,d,lo)}function gg(t,n){var s=ee(t)?Ar:fo;return s(t,Do($(n,3)))}function yg(t){var n=ee(t)?so:ld;return n(t)}function xg(t,n,s){(s?bt(t,n,s):n===e)?n=1:n=ne(n);var f=ee(t)?bl:fd;return f(t,n)}function vg(t){var n=ee(t)?kl:hd;return n(t)}function wg(t){if(t==null)return 0;if(Ot(t))return Mo(t)?Fr(t):t.length;var n=yt(t);return n==Yt||n==De?t.size:h(t).length}function Sg(t,n,s){var f=ee(t)?Oa:pd;return s&&bt(t,n,s)&&(n=e),f(t,$(n,3))}var _g=oe(function(t,n){if(t==null)return[];var s=n.length;return s>1&&bt(t,n[0],n[1])?n=[]:s>2&&bt(n[0],n[1],n[2])&&(n=[n[0]]),kr(t,it(n,1),[])}),Po=el||function(){return rt.Date.now()};function bg(t,n){if(typeof n!="function")throw new Et(l);return t=ne(t),function(){if(--t<1)return n.apply(this,arguments)}}function Jc(t,n,s){return n=s?e:n,n=t&&n==null?t.length:n,Jr(t,$e,e,e,e,e,n)}function eh(t,n){var s;if(typeof n!="function")throw new Et(l);return t=ne(t),function(){return--t>0&&(s=n.apply(this,arguments)),t<=1&&(n=e),s}}var nf=oe(function(t,n,s){var f=N;if(s.length){var d=Ut(s,Ji(nf));f|=We}return Jr(t,f,n,s,d)}),th=oe(function(t,n,s){var f=N|_e;if(s.length){var d=Ut(s,Ji(th));f|=We}return Jr(n,f,t,s,d)});function rh(t,n,s){n=s?e:n;var f=Jr(t,ye,e,e,e,e,e,n);return f.placeholder=rh.placeholder,f}function nh(t,n,s){n=s?e:n;var f=Jr(t,de,e,e,e,e,e,n);return f.placeholder=nh.placeholder,f}function ih(t,n,s){var f,d,x,w,_,k,I=0,M=!1,O=!1,W=!0;if(typeof t!="function")throw new Et(l);n=ar(n)||0,Ve(s)&&(M=!!s.leading,O="maxWait"in s,x=O?qe(ar(s.maxWait)||0,n):x,W="trailing"in s?!!s.trailing:W);function q(Je){var Tr=f,an=d;return f=d=e,I=Je,w=t.apply(an,Tr),w}function j(Je){return I=Je,_=Xa(ue,n),M?q(Je):w}function ae(Je){var Tr=Je-k,an=Je-I,bh=n-Tr;return O?Be(bh,x-an):bh}function Q(Je){var Tr=Je-k,an=Je-I;return k===e||Tr>=n||Tr<0||O&&an>=x}function ue(){var Je=Po();if(Q(Je))return he(Je);_=Xa(ue,ae(Je))}function he(Je){return _=e,W&&f?q(Je):(f=d=e,w)}function zt(){_!==e&&dc(_),I=0,f=k=d=_=e}function kt(){return _===e?w:he(Po())}function $t(){var Je=Po(),Tr=Q(Je);if(f=arguments,d=this,k=Je,Tr){if(_===e)return j(k);if(O)return dc(_),_=Xa(ue,n),q(k)}return _===e&&(_=Xa(ue,n)),w}return $t.cancel=zt,$t.flush=kt,$t}var kg=oe(function(t,n){return uo(t,1,n)}),Cg=oe(function(t,n,s){return uo(t,ar(n)||0,s)});function Tg(t){return Jr(t,tt)}function Eo(t,n){if(typeof t!="function"||n!=null&&typeof n!="function")throw new Et(l);var s=function(){var f=arguments,d=n?n.apply(this,f):f[0],x=s.cache;if(x.has(d))return x.get(d);var w=t.apply(this,f);return s.cache=x.set(d,w)||x,w};return s.cache=new(Eo.Cache||Sr),s}Eo.Cache=Sr;function Do(t){if(typeof t!="function")throw new Et(l);return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}function Pg(t){return eh(2,t)}var Eg=dd(function(t,n){n=n.length==1&&ee(n[0])?Ee(n[0],gt($())):Ee(it(n,1),gt($()));var s=n.length;return oe(function(f){for(var d=-1,x=Be(f.length,s);++d=n}),ai=po(function(){return arguments}())?po:function(t){return Ge(t)&&be.call(t,"callee")&&!js.call(t,"callee")},ee=P.isArray,Hg=Ms?gt(Ms):Ol;function Ot(t){return t!=null&&Io(t.length)&&!rn(t)}function Xe(t){return Ge(t)&&Ot(t)}function qg(t){return t===!0||t===!1||Ge(t)&&pt(t)==Er}var On=Ks||gf,Gg=Da?gt(Da):Al;function zg(t){return Ge(t)&&t.nodeType===1&&!Ja(t)}function $g(t){if(t==null)return!0;if(Ot(t)&&(ee(t)||typeof t=="string"||typeof t.splice=="function"||On(t)||ea(t)||ai(t)))return!t.length;var n=yt(t);if(n==Yt||n==De)return!t.size;if(Za(t))return!h(t).length;for(var s in t)if(be.call(t,s))return!1;return!0}function jg(t,n){return ti(t,n)}function Qg(t,n,s){s=typeof s=="function"?s:e;var f=s?s(t,n):e;return f===e?ti(t,n,e,s):!!f}function sf(t){if(!Ge(t))return!1;var n=pt(t);return n==yi||n==Zo||typeof t.message=="string"&&typeof t.name=="string"&&!Ja(t)}function Kg(t){return typeof t=="number"&&Qn(t)}function rn(t){if(!Ve(t))return!1;var n=pt(t);return n==xi||n==hs||n==Ko||n==Jo}function sh(t){return typeof t=="number"&&t==ne(t)}function Io(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Qe}function Ve(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}function Ge(t){return t!=null&&typeof t=="object"}var oh=Os?gt(Os):ja;function Zg(t,n){return t===n||Yr(t,n,Ql(n))}function Xg(t,n,s){return s=typeof s=="function"?s:e,Yr(t,n,Ql(n),s)}function Jg(t){return uh(t)&&t!=+t}function e0(t){if(Rd(t))throw new Z(u);return ri(t)}function t0(t){return t===null}function r0(t){return t==null}function uh(t){return typeof t=="number"||Ge(t)&&pt(t)==Yn}function Ja(t){if(!Ge(t)||pt(t)!=dr)return!1;var n=Wi(t);if(n===null)return!0;var s=be.call(n,"constructor")&&n.constructor;return typeof s=="function"&&s instanceof s&&zn.call(s)==Ku}var of=As?gt(As):le;function n0(t){return sh(t)&&t>=-Qe&&t<=Qe}var lh=Un?gt(Un):i;function Mo(t){return typeof t=="string"||!ee(t)&&Ge(t)&&pt(t)==st}function Gt(t){return typeof t=="symbol"||Ge(t)&&pt(t)==dn}var ea=yr?gt(yr):o;function i0(t){return t===e}function a0(t){return Ge(t)&&yt(t)==Ue}function s0(t){return Ge(t)&&pt(t)==eu}var o0=So(S),u0=So(function(t,n){return t<=n});function fh(t){if(!t)return[];if(Ot(t))return Mo(t)?wt(t):Mt(t);if($n&&t[$n])return Vu(t[$n]());var n=yt(t),s=n==Yt?Wa:n==De?bn:ta;return s(t)}function nn(t){if(!t)return t===0?t:0;if(t=ar(t),t===Oe||t===-Oe){var n=t<0?-1:1;return n*Wt}return t===t?t:0}function ne(t){var n=nn(t),s=n%1;return n===n?s?n-s:n:0}function ch(t){return t?Zr(ne(t),0,Pt):0}function ar(t){if(typeof t=="number")return t;if(Gt(t))return xt;if(Ve(t)){var n=typeof t.valueOf=="function"?t.valueOf():t;t=Ve(n)?n+"":n}if(typeof t!="string")return t===0?t:+t;t=Ys(t);var s=Ke.test(t);return s||gr.test(t)?Ds(t.slice(2),s?2:8):Kt.test(t)?xt:+t}function hh(t){return Br(t,At(t))}function l0(t){return t?Zr(ne(t),-Qe,Qe):t===0?t:0}function Te(t){return t==null?"":qt(t)}var f0=Zi(function(t,n){if(Za(n)||Ot(n)){Br(n,lt(n),t);return}for(var s in n)be.call(n,s)&&ei(t,s,n[s])}),ph=Zi(function(t,n){Br(n,At(n),t)}),Oo=Zi(function(t,n,s,f){Br(n,At(n),t,f)}),c0=Zi(function(t,n,s,f){Br(n,lt(n),t,f)}),h0=en(Qi);function p0(t,n){var s=En(t);return n==null?s:Ua(s,n)}var d0=oe(function(t,n){t=se(t);var s=-1,f=n.length,d=f>2?n[2]:e;for(d&&bt(n[0],n[1],d)&&(f=1);++s1),x}),Br(t,$l(t),s),f&&(s=St(s,A|R|V,Cd));for(var d=n.length;d--;)Yl(s,n[d]);return s});function O0(t,n){return mh(t,Do($(n)))}var A0=en(function(t,n){return t==null?{}:sd(t,n)});function mh(t,n){if(t==null)return{};var s=Ee($l(t),function(f){return[f]});return n=$(n),sc(t,s,function(f,d){return n(f,d[0])})}function F0(t,n,s){n=In(n,t);var f=-1,d=n.length;for(d||(d=1,t=e);++fn){var f=t;t=n,n=f}if(s||t%1||n%1){var d=Js();return Be(t+d*(n-t+Es("1e-"+((d+"").length-1))),n)}return Ll(t,n)}var G0=Xi(function(t,n,s){return n=n.toLowerCase(),t+(s?xh(n):n)});function xh(t){return ff(Te(t).toLowerCase())}function vh(t){return t=Te(t),t&&t.replace(su,Vs).replace(Su,"")}function z0(t,n,s){t=Te(t),n=qt(n);var f=t.length;s=s===e?f:Zr(ne(s),0,f);var d=s;return s-=n.length,s>=0&&t.slice(s,d)==n}function $0(t){return t=Te(t),t&&ga.test(t)?t.replace(ma,Ru):t}function j0(t){return t=Te(t),t&&Ti.test(t)?t.replace(qr,"\\\\$&"):t}var Q0=Xi(function(t,n,s){return t+(s?"-":"")+n.toLowerCase()}),K0=Xi(function(t,n,s){return t+(s?" ":"")+n.toLowerCase()}),Z0=_c("toLowerCase");function X0(t,n,s){t=Te(t),n=ne(n);var f=n?Fr(t):0;if(!n||f>=n)return t;var d=(n-f)/2;return wo(jn(d),s)+t+wo(Bi(d),s)}function J0(t,n,s){t=Te(t),n=ne(n);var f=n?Fr(t):0;return n&&f>>0,s?(t=Te(t),t&&(typeof n=="string"||n!=null&&!of(n))&&(n=qt(n),!n&&Xt(t))?Mn(wt(t),0,s):t.split(n,s)):[]}var sy=Xi(function(t,n,s){return t+(s?" ":"")+ff(n)});function oy(t,n,s){return t=Te(t),s=s==null?0:Zr(ne(s),0,t.length),n=qt(n),t.slice(s,s+n.length)==n}function uy(t,n,s){var f=g.templateSettings;s&&bt(t,n,s)&&(n=e),t=Te(t),n=Oo({},n,f,Dc);var d=Oo({},n.imports,f.imports,Dc),x=lt(d),w=Ra(d,x),_,k,I=0,M=n.interpolate||Pi,O="__p += '",W=xr((n.escape||Pi).source+"|"+M.source+"|"+(M===Bn?ot:Pi).source+"|"+(n.evaluate||Pi).source+"|$","g"),q="//# sourceURL="+(be.call(n,"sourceURL")?(n.sourceURL+"").replace(/\\s/g," "):"lodash.templateSources["+ ++Tu+"]")+\` -\`;t.replace(W,function(Q,ue,he,zt,kt,$t){return he||(he=zt),O+=t.slice(I,$t).replace(ou,Wu),ue&&(_=!0,O+=\`' + +\`)}function Nd(t){return ee(t)||ai(t)||!!(Qs&&t&&t[Qs])}function tn(t,n){var s=typeof t;return n=n??Qe,!!n&&(s=="number"||s!="symbol"&&Gr.test(t))&&t>-1&&t%1==0&&t0){if(++n>=jt)return arguments[0]}else n=0;return t.apply(e,arguments)}}function ko(t,n){var s=-1,f=t.length,d=f-1;for(n=n===e?f:n;++s1?t[n-1]:e;return s=typeof s=="function"?(t.pop(),s):e,Kc(t,s)});function Zc(t){var n=g(t);return n.__chain__=!0,n}function zm(t,n){return n(t),t}function Co(t,n){return n(t)}var $m=en(function(t){var n=t.length,s=n?t[0]:0,f=this.__wrapped__,d=function(x){return Qi(x,t)};return n>1||this.__actions__.length||!(f instanceof ie)||!tn(s)?this.thru(d):(f=f.slice(s,+s+(n?1:0)),f.__actions__.push({func:Co,args:[d],thisArg:e}),new Dt(f,this.__chain__).thru(function(x){return n&&!x.length&&x.push(e),x}))});function jm(){return Zc(this)}function Qm(){return new Dt(this.value(),this.__chain__)}function Km(){this.__values__===e&&(this.__values__=ch(this.value()));var t=this.__index__>=this.__values__.length,n=t?e:this.__values__[this.__index__++];return{done:t,value:n}}function Zm(){return this}function Xm(t){for(var n,s=this;s instanceof Gi;){var f=qc(s);f.__index__=0,f.__values__=e,n?d.__wrapped__=f:n=f;var d=f;s=s.__wrapped__}return d.__wrapped__=t,n}function Jm(){var t=this.__wrapped__;if(t instanceof ie){var n=t;return this.__actions__.length&&(n=new ie(this)),n=n.reverse(),n.__actions__.push({func:Co,args:[nf],thisArg:e}),new Dt(n,this.__chain__)}return this.thru(nf)}function eg(){return pc(this.__wrapped__,this.__actions__)}var tg=yo(function(t,n,s){be.call(t,s)?++t[s]:_r(t,s,1)});function rg(t,n,s){var f=ee(t)?Ii:Dl;return s&&bt(t,n,s)&&(n=e),f(t,$(n,3))}function ng(t,n){var s=ee(t)?Ar:fo;return s(t,$(n,3))}var ig=kc(Gc),ag=kc(zc);function sg(t,n){return it(To(t,n),1)}function og(t,n){return it(To(t,n),Oe)}function ug(t,n,s){return s=s===e?1:ne(s),it(To(t,n),s)}function Xc(t,n){var s=ee(t)?He:Wr;return s(t,$(n,3))}function Jc(t,n){var s=ee(t)?Au:lo;return s(t,$(n,3))}var lg=yo(function(t,n,s){be.call(t,s)?t[s].push(n):_r(t,s,[n])});function fg(t,n,s,f){t=Ot(t)?t:ta(t),s=s&&!f?ne(s):0;var d=t.length;return s<0&&(s=qe(d+s,0)),Mo(t)?s<=d&&t.indexOf(n,s)>-1:!!d&&Sn(t,n,s)>-1}var cg=oe(function(t,n,s){var f=-1,d=typeof n=="function",x=Ot(t)?P(t.length):[];return Wr(t,function(w){x[++f]=d?ht(n,w,s):tr(w,n,s)}),x}),hg=yo(function(t,n,s){_r(t,s,n)});function To(t,n){var s=ee(t)?Ee:E;return s(t,$(n,3))}function pg(t,n,s,f){return t==null?[]:(ee(n)||(n=n==null?[]:[n]),s=f?e:s,ee(s)||(s=s==null?[]:[s]),kr(t,n,s))}var dg=yo(function(t,n,s){t[s?0:1].push(n)},function(){return[[],[]]});function mg(t,n,s){var f=ee(t)?Ma:Ws,d=arguments.length<3;return f(t,$(n,4),s,d,Wr)}function gg(t,n,s){var f=ee(t)?Fu:Ws,d=arguments.length<3;return f(t,$(n,4),s,d,lo)}function yg(t,n){var s=ee(t)?Ar:fo;return s(t,Do($(n,3)))}function xg(t){var n=ee(t)?so:fd;return n(t)}function vg(t,n,s){(s?bt(t,n,s):n===e)?n=1:n=ne(n);var f=ee(t)?Cl:cd;return f(t,n)}function wg(t){var n=ee(t)?Tl:pd;return n(t)}function Sg(t){if(t==null)return 0;if(Ot(t))return Mo(t)?Fr(t):t.length;var n=yt(t);return n==Yt||n==De?t.size:h(t).length}function _g(t,n,s){var f=ee(t)?Oa:dd;return s&&bt(t,n,s)&&(n=e),f(t,$(n,3))}var bg=oe(function(t,n){if(t==null)return[];var s=n.length;return s>1&&bt(t,n[0],n[1])?n=[]:s>2&&bt(n[0],n[1],n[2])&&(n=[n[0]]),kr(t,it(n,1),[])}),Po=rl||function(){return rt.Date.now()};function kg(t,n){if(typeof n!="function")throw new Et(l);return t=ne(t),function(){if(--t<1)return n.apply(this,arguments)}}function eh(t,n,s){return n=s?e:n,n=t&&n==null?t.length:n,Jr(t,$e,e,e,e,e,n)}function th(t,n){var s;if(typeof n!="function")throw new Et(l);return t=ne(t),function(){return--t>0&&(s=n.apply(this,arguments)),t<=1&&(n=e),s}}var sf=oe(function(t,n,s){var f=N;if(s.length){var d=Ut(s,Ji(sf));f|=We}return Jr(t,f,n,s,d)}),rh=oe(function(t,n,s){var f=N|_e;if(s.length){var d=Ut(s,Ji(rh));f|=We}return Jr(n,f,t,s,d)});function nh(t,n,s){n=s?e:n;var f=Jr(t,ye,e,e,e,e,e,n);return f.placeholder=nh.placeholder,f}function ih(t,n,s){n=s?e:n;var f=Jr(t,de,e,e,e,e,e,n);return f.placeholder=ih.placeholder,f}function ah(t,n,s){var f,d,x,w,_,k,I=0,M=!1,O=!1,W=!0;if(typeof t!="function")throw new Et(l);n=ar(n)||0,Ve(s)&&(M=!!s.leading,O="maxWait"in s,x=O?qe(ar(s.maxWait)||0,n):x,W="trailing"in s?!!s.trailing:W);function q(Je){var Tr=f,an=d;return f=d=e,I=Je,w=t.apply(an,Tr),w}function j(Je){return I=Je,_=Xa(ue,n),M?q(Je):w}function ae(Je){var Tr=Je-k,an=Je-I,kh=n-Tr;return O?Be(kh,x-an):kh}function Q(Je){var Tr=Je-k,an=Je-I;return k===e||Tr>=n||Tr<0||O&&an>=x}function ue(){var Je=Po();if(Q(Je))return he(Je);_=Xa(ue,ae(Je))}function he(Je){return _=e,W&&f?q(Je):(f=d=e,w)}function zt(){_!==e&&mc(_),I=0,f=k=d=_=e}function kt(){return _===e?w:he(Po())}function $t(){var Je=Po(),Tr=Q(Je);if(f=arguments,d=this,k=Je,Tr){if(_===e)return j(k);if(O)return mc(_),_=Xa(ue,n),q(k)}return _===e&&(_=Xa(ue,n)),w}return $t.cancel=zt,$t.flush=kt,$t}var Cg=oe(function(t,n){return uo(t,1,n)}),Tg=oe(function(t,n,s){return uo(t,ar(n)||0,s)});function Pg(t){return Jr(t,tt)}function Eo(t,n){if(typeof t!="function"||n!=null&&typeof n!="function")throw new Et(l);var s=function(){var f=arguments,d=n?n.apply(this,f):f[0],x=s.cache;if(x.has(d))return x.get(d);var w=t.apply(this,f);return s.cache=x.set(d,w)||x,w};return s.cache=new(Eo.Cache||Sr),s}Eo.Cache=Sr;function Do(t){if(typeof t!="function")throw new Et(l);return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}function Eg(t){return th(2,t)}var Dg=md(function(t,n){n=n.length==1&&ee(n[0])?Ee(n[0],gt($())):Ee(it(n,1),gt($()));var s=n.length;return oe(function(f){for(var d=-1,x=Be(f.length,s);++d=n}),ai=po(function(){return arguments}())?po:function(t){return Ge(t)&&be.call(t,"callee")&&!js.call(t,"callee")},ee=P.isArray,qg=Ms?gt(Ms):Fl;function Ot(t){return t!=null&&Io(t.length)&&!rn(t)}function Xe(t){return Ge(t)&&Ot(t)}function Gg(t){return t===!0||t===!1||Ge(t)&&pt(t)==Er}var On=Ks||xf,zg=Da?gt(Da):Nl;function $g(t){return Ge(t)&&t.nodeType===1&&!Ja(t)}function jg(t){if(t==null)return!0;if(Ot(t)&&(ee(t)||typeof t=="string"||typeof t.splice=="function"||On(t)||ea(t)||ai(t)))return!t.length;var n=yt(t);if(n==Yt||n==De)return!t.size;if(Za(t))return!h(t).length;for(var s in t)if(be.call(t,s))return!1;return!0}function Qg(t,n){return ti(t,n)}function Kg(t,n,s){s=typeof s=="function"?s:e;var f=s?s(t,n):e;return f===e?ti(t,n,e,s):!!f}function uf(t){if(!Ge(t))return!1;var n=pt(t);return n==yi||n==Jo||typeof t.message=="string"&&typeof t.name=="string"&&!Ja(t)}function Zg(t){return typeof t=="number"&&Qn(t)}function rn(t){if(!Ve(t))return!1;var n=pt(t);return n==xi||n==hs||n==Xo||n==tu}function oh(t){return typeof t=="number"&&t==ne(t)}function Io(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Qe}function Ve(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}function Ge(t){return t!=null&&typeof t=="object"}var uh=Os?gt(Os):ja;function Xg(t,n){return t===n||Yr(t,n,Zl(n))}function Jg(t,n,s){return s=typeof s=="function"?s:e,Yr(t,n,Zl(n),s)}function e0(t){return lh(t)&&t!=+t}function t0(t){if(Wd(t))throw new Z(u);return ri(t)}function r0(t){return t===null}function n0(t){return t==null}function lh(t){return typeof t=="number"||Ge(t)&&pt(t)==Yn}function Ja(t){if(!Ge(t)||pt(t)!=dr)return!1;var n=Wi(t);if(n===null)return!0;var s=be.call(n,"constructor")&&n.constructor;return typeof s=="function"&&s instanceof s&&zn.call(s)==Xu}var lf=As?gt(As):le;function i0(t){return oh(t)&&t>=-Qe&&t<=Qe}var fh=Un?gt(Un):i;function Mo(t){return typeof t=="string"||!ee(t)&&Ge(t)&&pt(t)==st}function Gt(t){return typeof t=="symbol"||Ge(t)&&pt(t)==dn}var ea=yr?gt(yr):o;function a0(t){return t===e}function s0(t){return Ge(t)&&yt(t)==Ue}function o0(t){return Ge(t)&&pt(t)==ru}var u0=So(S),l0=So(function(t,n){return t<=n});function ch(t){if(!t)return[];if(Ot(t))return Mo(t)?wt(t):Mt(t);if($n&&t[$n])return Hu(t[$n]());var n=yt(t),s=n==Yt?Wa:n==De?bn:ta;return s(t)}function nn(t){if(!t)return t===0?t:0;if(t=ar(t),t===Oe||t===-Oe){var n=t<0?-1:1;return n*Wt}return t===t?t:0}function ne(t){var n=nn(t),s=n%1;return n===n?s?n-s:n:0}function hh(t){return t?Zr(ne(t),0,Pt):0}function ar(t){if(typeof t=="number")return t;if(Gt(t))return xt;if(Ve(t)){var n=typeof t.valueOf=="function"?t.valueOf():t;t=Ve(n)?n+"":n}if(typeof t!="string")return t===0?t:+t;t=Ys(t);var s=Ke.test(t);return s||gr.test(t)?Ds(t.slice(2),s?2:8):Kt.test(t)?xt:+t}function ph(t){return Br(t,At(t))}function f0(t){return t?Zr(ne(t),-Qe,Qe):t===0?t:0}function Te(t){return t==null?"":qt(t)}var c0=Zi(function(t,n){if(Za(n)||Ot(n)){Br(n,lt(n),t);return}for(var s in n)be.call(n,s)&&ei(t,s,n[s])}),dh=Zi(function(t,n){Br(n,At(n),t)}),Oo=Zi(function(t,n,s,f){Br(n,At(n),t,f)}),h0=Zi(function(t,n,s,f){Br(n,lt(n),t,f)}),p0=en(Qi);function d0(t,n){var s=En(t);return n==null?s:Ua(s,n)}var m0=oe(function(t,n){t=se(t);var s=-1,f=n.length,d=f>2?n[2]:e;for(d&&bt(n[0],n[1],d)&&(f=1);++s1),x}),Br(t,Ql(t),s),f&&(s=St(s,A|R|V,Td));for(var d=n.length;d--;)Vl(s,n[d]);return s});function A0(t,n){return gh(t,Do($(n)))}var F0=en(function(t,n){return t==null?{}:od(t,n)});function gh(t,n){if(t==null)return{};var s=Ee(Ql(t),function(f){return[f]});return n=$(n),oc(t,s,function(f,d){return n(f,d[0])})}function N0(t,n,s){n=In(n,t);var f=-1,d=n.length;for(d||(d=1,t=e);++fn){var f=t;t=n,n=f}if(s||t%1||n%1){var d=Js();return Be(t+d*(n-t+Es("1e-"+((d+"").length-1))),n)}return Wl(t,n)}var z0=Xi(function(t,n,s){return n=n.toLowerCase(),t+(s?vh(n):n)});function vh(t){return hf(Te(t).toLowerCase())}function wh(t){return t=Te(t),t&&t.replace(uu,Vs).replace(bu,"")}function $0(t,n,s){t=Te(t),n=qt(n);var f=t.length;s=s===e?f:Zr(ne(s),0,f);var d=s;return s-=n.length,s>=0&&t.slice(s,d)==n}function j0(t){return t=Te(t),t&&ga.test(t)?t.replace(ma,Yu):t}function Q0(t){return t=Te(t),t&&Ti.test(t)?t.replace(qr,"\\\\$&"):t}var K0=Xi(function(t,n,s){return t+(s?"-":"")+n.toLowerCase()}),Z0=Xi(function(t,n,s){return t+(s?" ":"")+n.toLowerCase()}),X0=bc("toLowerCase");function J0(t,n,s){t=Te(t),n=ne(n);var f=n?Fr(t):0;if(!n||f>=n)return t;var d=(n-f)/2;return wo(jn(d),s)+t+wo(Bi(d),s)}function ey(t,n,s){t=Te(t),n=ne(n);var f=n?Fr(t):0;return n&&f>>0,s?(t=Te(t),t&&(typeof n=="string"||n!=null&&!lf(n))&&(n=qt(n),!n&&Xt(t))?Mn(wt(t),0,s):t.split(n,s)):[]}var oy=Xi(function(t,n,s){return t+(s?" ":"")+hf(n)});function uy(t,n,s){return t=Te(t),s=s==null?0:Zr(ne(s),0,t.length),n=qt(n),t.slice(s,s+n.length)==n}function ly(t,n,s){var f=g.templateSettings;s&&bt(t,n,s)&&(n=e),t=Te(t),n=Oo({},n,f,Ic);var d=Oo({},n.imports,f.imports,Ic),x=lt(d),w=Ra(d,x),_,k,I=0,M=n.interpolate||Pi,O="__p += '",W=xr((n.escape||Pi).source+"|"+M.source+"|"+(M===Bn?ot:Pi).source+"|"+(n.evaluate||Pi).source+"|$","g"),q="//# sourceURL="+(be.call(n,"sourceURL")?(n.sourceURL+"").replace(/\\s/g," "):"lodash.templateSources["+ ++Eu+"]")+\` +\`;t.replace(W,function(Q,ue,he,zt,kt,$t){return he||(he=zt),O+=t.slice(I,$t).replace(lu,Bu),ue&&(_=!0,O+=\`' + __e(\`+ue+\`) + '\`),kt&&(k=!0,O+=\`'; \`+kt+\`; @@ -88253,17 +88262,17 @@ __p += '\`),he&&(O+=\`' + function print() { __p += __j.call(arguments, '') } \`:\`; \`)+O+\`return __p -}\`;var ae=Sh(function(){return xe(x,q+"return "+O).apply(e,w)});if(ae.source=O,sf(ae))throw ae;return ae}function ly(t){return Te(t).toLowerCase()}function fy(t){return Te(t).toUpperCase()}function cy(t,n,s){if(t=Te(t),t&&(s||n===e))return Ys(t);if(!t||!(n=qt(n)))return t;var f=wt(t),d=wt(n),x=Me(f,d),w=Bs(f,d)+1;return Mn(f,x,w).join("")}function hy(t,n,s){if(t=Te(t),t&&(s||n===e))return t.slice(0,Ai(t)+1);if(!t||!(n=qt(n)))return t;var f=wt(t),d=Bs(f,wt(n))+1;return Mn(f,0,d).join("")}function py(t,n,s){if(t=Te(t),t&&(s||n===e))return t.replace(Y,"");if(!t||!(n=qt(n)))return t;var f=wt(t),d=Me(f,wt(n));return Mn(f,d).join("")}function dy(t,n){var s=je,f=pr;if(Ve(n)){var d="separator"in n?n.separator:d;s="length"in n?ne(n.length):s,f="omission"in n?qt(n.omission):f}t=Te(t);var x=t.length;if(Xt(t)){var w=wt(t);x=w.length}if(s>=x)return t;var _=s-Fr(f);if(_<1)return f;var k=w?Mn(w,0,_).join(""):t.slice(0,_);if(d===e)return k+f;if(w&&(_+=k.length-_),of(d)){if(t.slice(_).search(d)){var I,M=k;for(d.global||(d=xr(d.source,Te(Qt.exec(d))+"g")),d.lastIndex=0;I=d.exec(M);)var O=I.index;k=k.slice(0,O===e?_:O)}}else if(t.indexOf(qt(d),_)!=_){var W=k.lastIndexOf(d);W>-1&&(k=k.slice(0,W))}return k+f}function my(t){return t=Te(t),t&&bi.test(t)?t.replace(da,qu):t}var gy=Xi(function(t,n,s){return t+(s?" ":"")+n.toUpperCase()}),ff=_c("toUpperCase");function wh(t,n,s){return t=Te(t),n=s?e:n,n===e?Bu(t)?$u(t):Fu(t):t.match(n)||[]}var Sh=oe(function(t,n){try{return ht(t,e,n)}catch(s){return sf(s)?s:new Z(s)}}),yy=en(function(t,n){return He(n,function(s){s=Vr(s),_r(t,s,nf(t[s],t))}),t});function xy(t){var n=t==null?0:t.length,s=$();return t=n?Ee(t,function(f){if(typeof f[1]!="function")throw new Et(l);return[s(f[0]),f[1]]}):[],oe(function(f){for(var d=-1;++dQe)return[];var s=Pt,f=Be(t,Pt);n=$(n),t-=Pt;for(var d=La(f,n);++s0||n<0)?new ie(s):(t<0?s=s.takeRight(-t):t&&(s=s.drop(t)),n!==e&&(n=ne(n),s=n<0?s.dropRight(-n):s.take(n-t)),s)},ie.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},ie.prototype.toArray=function(){return this.take(Pt)},Jt(ie.prototype,function(t,n){var s=/^(?:filter|find|map|reject)|While$/.test(n),f=/^(?:head|last)$/.test(n),d=g[f?"take"+(n=="last"?"Right":""):n],x=f||/^find/.test(n);!d||(g.prototype[n]=function(){var w=this.__wrapped__,_=f?[1]:arguments,k=w instanceof ie,I=_[0],M=k||ee(w),O=function(ue){var he=d.apply(g,Zt([ue],_));return f&&W?he[0]:he};M&&s&&typeof I=="function"&&I.length!=1&&(k=M=!1);var W=this.__chain__,q=!!this.__actions__.length,j=x&&!W,ae=k&&!q;if(!x&&M){w=ae?w:new ie(this);var Q=t.apply(w,_);return Q.__actions__.push({func:Co,args:[O],thisArg:e}),new Dt(Q,W)}return j&&ae?t.apply(this,_):(Q=this.thru(O),j?f?Q.value()[0]:Q.value():Q)})}),He(["pop","push","shift","sort","splice","unshift"],function(t){var n=Gn[t],s=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",f=/^(?:pop|shift)$/.test(t);g.prototype[t]=function(){var d=arguments;if(f&&!this.__chain__){var x=this.value();return n.apply(ee(x)?x:[],d)}return this[s](function(w){return n.apply(ee(w)?w:[],d)})}}),Jt(ie.prototype,function(t,n){var s=g[n];if(s){var f=s.name+"";be.call(Pn,f)||(Pn[f]=[]),Pn[f].push({name:n,func:s})}}),Pn[xo(e,_e).name]=[{name:"wrapper",func:e}],ie.prototype.clone=ul,ie.prototype.reverse=ll,ie.prototype.value=fl,g.prototype.at=zm,g.prototype.chain=$m,g.prototype.commit=jm,g.prototype.next=Qm,g.prototype.plant=Zm,g.prototype.reverse=Xm,g.prototype.toJSON=g.prototype.valueOf=g.prototype.value=Jm,g.prototype.first=g.prototype.head,$n&&(g.prototype[$n]=Km),g},Nr=ju();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(rt._=Nr,define(function(){return Nr})):Or?((Or.exports=Nr)._=Nr,Ea._=Nr):rt._=Nr}).call(ra)});var Jh=Ch((Bf,ia)=>{(function(e,r){typeof Bf=="object"&&typeof ia<"u"?ia.exports=r():typeof define=="function"&&define.amd?define(r):e.moment=r()})(Bf,function(){"use strict";var e;function r(){return e.apply(null,arguments)}function a(i){e=i}function u(i){return i instanceof Array||Object.prototype.toString.call(i)==="[object Array]"}function l(i){return i!=null&&Object.prototype.toString.call(i)==="[object Object]"}function p(i,o){return Object.prototype.hasOwnProperty.call(i,o)}function v(i){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(i).length===0;var o;for(o in i)if(p(i,o))return!1;return!0}function C(i){return i===void 0}function T(i){return typeof i=="number"||Object.prototype.toString.call(i)==="[object Number]"}function A(i){return i instanceof Date||Object.prototype.toString.call(i)==="[object Date]"}function R(i,o){var c=[],h,m=i.length;for(h=0;h>>0,h;for(h=0;h0)for(c=0;c=x)return t;var _=s-Fr(f);if(_<1)return f;var k=w?Mn(w,0,_).join(""):t.slice(0,_);if(d===e)return k+f;if(w&&(_+=k.length-_),lf(d)){if(t.slice(_).search(d)){var I,M=k;for(d.global||(d=xr(d.source,Te(Qt.exec(d))+"g")),d.lastIndex=0;I=d.exec(M);)var O=I.index;k=k.slice(0,O===e?_:O)}}else if(t.indexOf(qt(d),_)!=_){var W=k.lastIndexOf(d);W>-1&&(k=k.slice(0,W))}return k+f}function gy(t){return t=Te(t),t&&bi.test(t)?t.replace(da,zu):t}var yy=Xi(function(t,n,s){return t+(s?" ":"")+n.toUpperCase()}),hf=bc("toUpperCase");function Sh(t,n,s){return t=Te(t),n=s?e:n,n===e?Uu(t)?Qu(t):Lu(t):t.match(n)||[]}var _h=oe(function(t,n){try{return ht(t,e,n)}catch(s){return uf(s)?s:new Z(s)}}),xy=en(function(t,n){return He(n,function(s){s=Vr(s),_r(t,s,sf(t[s],t))}),t});function vy(t){var n=t==null?0:t.length,s=$();return t=n?Ee(t,function(f){if(typeof f[1]!="function")throw new Et(l);return[s(f[0]),f[1]]}):[],oe(function(f){for(var d=-1;++dQe)return[];var s=Pt,f=Be(t,Pt);n=$(n),t-=Pt;for(var d=La(f,n);++s0||n<0)?new ie(s):(t<0?s=s.takeRight(-t):t&&(s=s.drop(t)),n!==e&&(n=ne(n),s=n<0?s.dropRight(-n):s.take(n-t)),s)},ie.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},ie.prototype.toArray=function(){return this.take(Pt)},Jt(ie.prototype,function(t,n){var s=/^(?:filter|find|map|reject)|While$/.test(n),f=/^(?:head|last)$/.test(n),d=g[f?"take"+(n=="last"?"Right":""):n],x=f||/^find/.test(n);!d||(g.prototype[n]=function(){var w=this.__wrapped__,_=f?[1]:arguments,k=w instanceof ie,I=_[0],M=k||ee(w),O=function(ue){var he=d.apply(g,Zt([ue],_));return f&&W?he[0]:he};M&&s&&typeof I=="function"&&I.length!=1&&(k=M=!1);var W=this.__chain__,q=!!this.__actions__.length,j=x&&!W,ae=k&&!q;if(!x&&M){w=ae?w:new ie(this);var Q=t.apply(w,_);return Q.__actions__.push({func:Co,args:[O],thisArg:e}),new Dt(Q,W)}return j&&ae?t.apply(this,_):(Q=this.thru(O),j?f?Q.value()[0]:Q.value():Q)})}),He(["pop","push","shift","sort","splice","unshift"],function(t){var n=Gn[t],s=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",f=/^(?:pop|shift)$/.test(t);g.prototype[t]=function(){var d=arguments;if(f&&!this.__chain__){var x=this.value();return n.apply(ee(x)?x:[],d)}return this[s](function(w){return n.apply(ee(w)?w:[],d)})}}),Jt(ie.prototype,function(t,n){var s=g[n];if(s){var f=s.name+"";be.call(Pn,f)||(Pn[f]=[]),Pn[f].push({name:n,func:s})}}),Pn[xo(e,_e).name]=[{name:"wrapper",func:e}],ie.prototype.clone=fl,ie.prototype.reverse=cl,ie.prototype.value=hl,g.prototype.at=$m,g.prototype.chain=jm,g.prototype.commit=Qm,g.prototype.next=Km,g.prototype.plant=Xm,g.prototype.reverse=Jm,g.prototype.toJSON=g.prototype.valueOf=g.prototype.value=eg,g.prototype.first=g.prototype.head,$n&&(g.prototype[$n]=Zm),g},Nr=Ku();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(rt._=Nr,define(function(){return Nr})):Or?((Or.exports=Nr)._=Nr,Ea._=Nr):rt._=Nr}).call(ra)});var ep=Th((Bf,ia)=>{(function(e,r){typeof Bf=="object"&&typeof ia<"u"?ia.exports=r():typeof define=="function"&&define.amd?define(r):e.moment=r()})(Bf,function(){"use strict";var e;function r(){return e.apply(null,arguments)}function a(i){e=i}function u(i){return i instanceof Array||Object.prototype.toString.call(i)==="[object Array]"}function l(i){return i!=null&&Object.prototype.toString.call(i)==="[object Object]"}function p(i,o){return Object.prototype.hasOwnProperty.call(i,o)}function v(i){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(i).length===0;var o;for(o in i)if(p(i,o))return!1;return!0}function C(i){return i===void 0}function T(i){return typeof i=="number"||Object.prototype.toString.call(i)==="[object Number]"}function A(i){return i instanceof Date||Object.prototype.toString.call(i)==="[object Date]"}function R(i,o){var c=[],h,m=i.length;for(h=0;h>>0,h;for(h=0;h0)for(c=0;c=0;return(S?c?"+":"":"-")+Math.pow(10,Math.max(0,m)).toString().substr(1)+h}var Pt=/(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,mi=/(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,fa={},hn={};function H(i,o,c,h){var m=h;typeof h=="string"&&(m=function(){return this[h]()}),i&&(hn[i]=m),o&&(hn[o[0]]=function(){return xt(m.apply(this,arguments),o[1],o[2])}),c&&(hn[c]=function(){return this.localeData().ordinal(m.apply(this,arguments),i)})}function gi(i){return i.match(/\\[[\\s\\S]/)?i.replace(/^\\[|\\]$/g,""):i.replace(/\\\\/g,"")}function Ko(i){var o=i.match(Pt),c,h;for(c=0,h=o.length;c=0&&mi.test(i);)i=i.replace(mi,h),mi.lastIndex=0,c-=1;return i}var Zo={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function yi(i){var o=this._longDateFormat[i],c=this._longDateFormat[i.toUpperCase()];return o||!c?o:(this._longDateFormat[i]=c.match(Pt).map(function(h){return h==="MMMM"||h==="MM"||h==="DD"||h==="dddd"?h.slice(1):h}).join(""),this._longDateFormat[i])}var xi="Invalid date";function hs(){return this._invalidDate}var Yt="%d",Yn=/\\d{1,2}/;function Xo(i){return this._ordinal.replace("%d",i)}var dr={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function ps(i,o,c,h){var m=this._relativeTime[c];return me(m)?m(i,o,c,h):m.replace(/%d/i,i)}function Jo(i,o){var c=this._relativeTime[i>0?"future":"past"];return me(c)?c(o):c.replace(/%s/i,o)}var mr={};function De(i,o){var c=i.toLowerCase();mr[c]=mr[c+"s"]=mr[o]=i}function st(i){return typeof i=="string"?mr[i]||mr[i.toLowerCase()]:void 0}function dn(i){var o={},c,h;for(h in i)p(i,h)&&(c=st(h),c&&(o[c]=i[h]));return o}var ds={};function Ue(i,o){ds[i]=o}function eu(i){var o=[],c;for(c in i)p(i,c)&&o.push({unit:c,priority:ds[c]});return o.sort(function(h,m){return h.priority-m.priority}),o}function Dr(i){return i%4===0&&i%100!==0||i%400===0}function nt(i){return i<0?Math.ceil(i)||0:Math.floor(i)}function te(i){var o=+i,c=0;return o!==0&&isFinite(o)&&(c=nt(o)),c}function Ir(i,o){return function(c){return c!=null?(vi(this,i,c),r.updateOffset(this,o),this):mn(this,i)}}function mn(i,o){return i.isValid()?i._d["get"+(i._isUTC?"UTC":"")+o]():NaN}function vi(i,o,c){i.isValid()&&!isNaN(c)&&(o==="FullYear"&&Dr(i.year())&&i.month()===1&&i.date()===29?(c=te(c),i._d["set"+(i._isUTC?"UTC":"")+o](c,i.month(),Ei(c,i.month()))):i._d["set"+(i._isUTC?"UTC":"")+o](c))}function ca(i){return i=st(i),me(this[i])?this[i]():this}function ha(i,o){if(typeof i=="object"){i=dn(i);var c=eu(i),h,m=c.length;for(h=0;h68?1900:2e3)};var ba=Ir("FullYear",!0);function du(){return Dr(this.year())}function vs(i,o,c,h,m,S,E){var G;return i<100&&i>=0?(G=new Date(i+400,o,c,h,m,S,E),isFinite(G.getFullYear())&&G.setFullYear(i)):G=new Date(i,o,c,h,m,S,E),G}function yn(i){var o,c;return i<100&&i>=0?(c=Array.prototype.slice.call(arguments),c[0]=i+400,o=new Date(Date.UTC.apply(null,c)),isFinite(o.getUTCFullYear())&&o.setUTCFullYear(i)):o=new Date(Date.UTC.apply(null,arguments)),o}function xn(i,o,c){var h=7+o-c,m=(7+yn(i,0,h).getUTCDay()-o)%7;return-m+h-1}function ws(i,o,c,h,m){var S=(7+c-h)%7,E=xn(i,h,m),G=1+7*(o-1)+S+E,J,ve;return G<=0?(J=i-1,ve=Mr(J)+G):G>Mr(i)?(J=i+1,ve=G-Mr(i)):(J=i,ve=G),{year:J,dayOfYear:ve}}function vn(i,o,c){var h=xn(i.year(),o,c),m=Math.floor((i.dayOfYear()-h-1)/7)+1,S,E;return m<1?(E=i.year()-1,S=m+Vt(E,o,c)):m>Vt(i.year(),o,c)?(S=m-Vt(i.year(),o,c),E=i.year()+1):(E=i.year(),S=m),{week:S,year:E}}function Vt(i,o,c){var h=xn(i,o,c),m=xn(i+1,o,c);return(Mr(i)-h+m)/7}H("w",["ww",2],"wo","week"),H("W",["WW",2],"Wo","isoWeek"),De("week","w"),De("isoWeek","W"),Ue("week",5),Ue("isoWeek",5),Y("w",Ae),Y("ww",Ae,ct),Y("W",Ae),Y("WW",Ae,ct),Vn(["w","ww","W","WW"],function(i,o,c,h){o[h.substr(0,1)]=te(i)});function ka(i){return vn(i,this._week.dow,this._week.doy).week}var wn={dow:0,doy:6};function Ss(){return this._week.dow}function _s(){return this._week.doy}function mu(i){var o=this.localeData().week(this);return i==null?o:this.add((i-o)*7,"d")}function bs(i){var o=vn(this,1,4).week;return i==null?o:this.add((i-o)*7,"d")}H("d",0,"do","day"),H("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),H("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),H("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),H("e",0,0,"weekday"),H("E",0,0,"isoWeekday"),De("day","d"),De("weekday","e"),De("isoWeekday","E"),Ue("day",11),Ue("weekday",11),Ue("isoWeekday",11),Y("d",Ae),Y("e",Ae),Y("E",Ae),Y("dd",function(i,o){return o.weekdaysMinRegex(i)}),Y("ddd",function(i,o){return o.weekdaysShortRegex(i)}),Y("dddd",function(i,o){return o.weekdaysRegex(i)}),Vn(["dd","ddd","dddd"],function(i,o,c,h){var m=c._locale.weekdaysParse(i,h,c._strict);m!=null?o.d=m:N(c).invalidWeekday=i}),Vn(["d","e","E"],function(i,o,c,h){o[h]=te(i)});function ks(i,o){return typeof i!="string"?i:isNaN(i)?(i=o.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function Cs(i,o){return typeof i=="string"?o.weekdaysParse(i)%7||7:isNaN(i)?null:i}function Di(i,o){return i.slice(o,7).concat(i.slice(0,o))}var gu="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ts="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),yu="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ps=qr,xu=qr,vu=qr;function wu(i,o){var c=u(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(o)?"format":"standalone"];return i===!0?Di(c,this._week.dow):i?c[i.day()]:c}function Su(i){return i===!0?Di(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function Ca(i){return i===!0?Di(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function _u(i,o,c){var h,m,S,E=i.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],h=0;h<7;++h)S=K([2e3,1]).day(h),this._minWeekdaysParse[h]=this.weekdaysMin(S,"").toLocaleLowerCase(),this._shortWeekdaysParse[h]=this.weekdaysShort(S,"").toLocaleLowerCase(),this._weekdaysParse[h]=this.weekdays(S,"").toLocaleLowerCase();return c?o==="dddd"?(m=Re.call(this._weekdaysParse,E),m!==-1?m:null):o==="ddd"?(m=Re.call(this._shortWeekdaysParse,E),m!==-1?m:null):(m=Re.call(this._minWeekdaysParse,E),m!==-1?m:null):o==="dddd"?(m=Re.call(this._weekdaysParse,E),m!==-1||(m=Re.call(this._shortWeekdaysParse,E),m!==-1)?m:(m=Re.call(this._minWeekdaysParse,E),m!==-1?m:null)):o==="ddd"?(m=Re.call(this._shortWeekdaysParse,E),m!==-1||(m=Re.call(this._weekdaysParse,E),m!==-1)?m:(m=Re.call(this._minWeekdaysParse,E),m!==-1?m:null)):(m=Re.call(this._minWeekdaysParse,E),m!==-1||(m=Re.call(this._weekdaysParse,E),m!==-1)?m:(m=Re.call(this._shortWeekdaysParse,E),m!==-1?m:null))}function bu(i,o,c){var h,m,S;if(this._weekdaysParseExact)return _u.call(this,i,o,c);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),h=0;h<7;h++){if(m=K([2e3,1]).day(h),c&&!this._fullWeekdaysParse[h]&&(this._fullWeekdaysParse[h]=new RegExp("^"+this.weekdays(m,"").replace(".","\\\\.?")+"$","i"),this._shortWeekdaysParse[h]=new RegExp("^"+this.weekdaysShort(m,"").replace(".","\\\\.?")+"$","i"),this._minWeekdaysParse[h]=new RegExp("^"+this.weekdaysMin(m,"").replace(".","\\\\.?")+"$","i")),this._weekdaysParse[h]||(S="^"+this.weekdays(m,"")+"|^"+this.weekdaysShort(m,"")+"|^"+this.weekdaysMin(m,""),this._weekdaysParse[h]=new RegExp(S.replace(".",""),"i")),c&&o==="dddd"&&this._fullWeekdaysParse[h].test(i))return h;if(c&&o==="ddd"&&this._shortWeekdaysParse[h].test(i))return h;if(c&&o==="dd"&&this._minWeekdaysParse[h].test(i))return h;if(!c&&this._weekdaysParse[h].test(i))return h}}function ku(i){if(!this.isValid())return i!=null?this:NaN;var o=this._isUTC?this._d.getUTCDay():this._d.getDay();return i!=null?(i=ks(i,this.localeData()),this.add(i-o,"d")):o}function Cu(i){if(!this.isValid())return i!=null?this:NaN;var o=(this.day()+7-this.localeData()._week.dow)%7;return i==null?o:this.add(i-o,"d")}function Tu(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var o=Cs(i,this.localeData());return this.day(this.day()%7?o:o-7)}else return this.day()||7}function Fe(i){return this._weekdaysParseExact?(p(this,"_weekdaysRegex")||Ta.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(p(this,"_weekdaysRegex")||(this._weekdaysRegex=Ps),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ie(i){return this._weekdaysParseExact?(p(this,"_weekdaysRegex")||Ta.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(p(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=xu),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Pu(i){return this._weekdaysParseExact?(p(this,"_weekdaysRegex")||Ta.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(p(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=vu),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ta(){function i(dt,rr){return rr.length-dt.length}var o=[],c=[],h=[],m=[],S,E,G,J,ve;for(S=0;S<7;S++)E=K([2e3,1]).day(S),G=vt(this.weekdaysMin(E,"")),J=vt(this.weekdaysShort(E,"")),ve=vt(this.weekdays(E,"")),o.push(G),c.push(J),h.push(ve),m.push(G),m.push(J),m.push(ve);o.sort(i),c.sort(i),h.sort(i),m.sort(i),this._weekdaysRegex=new RegExp("^("+m.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Pa(){return this.hours()%12||12}function Eu(){return this.hours()||24}H("H",["HH",2],0,"hour"),H("h",["hh",2],0,Pa),H("k",["kk",2],0,Eu),H("hmm",0,0,function(){return""+Pa.apply(this)+xt(this.minutes(),2)}),H("hmmss",0,0,function(){return""+Pa.apply(this)+xt(this.minutes(),2)+xt(this.seconds(),2)}),H("Hmm",0,0,function(){return""+this.hours()+xt(this.minutes(),2)}),H("Hmmss",0,0,function(){return""+this.hours()+xt(this.minutes(),2)+xt(this.seconds(),2)});function Es(i,o){H(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),o)})}Es("a",!0),Es("A",!1),De("hour","h"),Ue("hour",13);function Ds(i,o){return o._meridiemParse}Y("a",Ds),Y("A",Ds),Y("H",Ae),Y("h",Ae),Y("k",Ae),Y("HH",Ae,ct),Y("hh",Ae,ct),Y("kk",Ae,ct),Y("hmm",da),Y("hmmss",ma),Y("Hmm",da),Y("Hmmss",ma),Ce(["H","HH"],Ke),Ce(["k","kk"],function(i,o,c){var h=te(i);o[Ke]=h===24?0:h}),Ce(["a","A"],function(i,o,c){c._isPm=c._locale.isPM(i),c._meridiem=i}),Ce(["h","hh"],function(i,o,c){o[Ke]=te(i),N(c).bigHour=!0}),Ce("hmm",function(i,o,c){var h=i.length-2;o[Ke]=te(i.substr(0,h)),o[Bt]=te(i.substr(h)),N(c).bigHour=!0}),Ce("hmmss",function(i,o,c){var h=i.length-4,m=i.length-2;o[Ke]=te(i.substr(0,h)),o[Bt]=te(i.substr(h,2)),o[gr]=te(i.substr(m)),N(c).bigHour=!0}),Ce("Hmm",function(i,o,c){var h=i.length-2;o[Ke]=te(i.substr(0,h)),o[Bt]=te(i.substr(h))}),Ce("Hmmss",function(i,o,c){var h=i.length-4,m=i.length-2;o[Ke]=te(i.substr(0,h)),o[Bt]=te(i.substr(h,2)),o[gr]=te(i.substr(m))});function Is(i){return(i+"").toLowerCase().charAt(0)==="p"}var Du=/[ap]\\.?m?\\.?/i,rt=Ir("Hours",!0);function Ea(i,o,c){return i>11?c?"pm":"PM":c?"am":"AM"}var Or={calendar:Qe,longDateFormat:Zo,invalidDate:xi,ordinal:Yt,dayOfMonthOrdinalParse:Yn,relativeTime:dr,months:uu,monthsShort:ms,week:wn,weekdays:gu,weekdaysMin:yu,weekdaysShort:Ts,meridiemParse:Du},Ne={},zr={},ut;function Ms(i,o){var c,h=Math.min(i.length,o.length);for(c=0;c0;){if(m=Un(S.slice(0,c).join("-")),m)return m;if(h&&h.length>=c&&Ms(S,h)>=c-1)break;c--}o++}return ut}function As(i){return i.match("^[^/\\\\\\\\]*$")!=null}function Un(i){var o=null,c;if(Ne[i]===void 0&&typeof ia<"u"&&ia&&ia.exports&&As(i))try{o=ut._abbr,c=require,c("./locale/"+i),yr(o)}catch{Ne[i]=null}return Ne[i]}function yr(i,o){var c;return i&&(C(o)?c=He(i):c=ht(i,o),c?ut=c:typeof console<"u"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),ut._abbr}function ht(i,o){if(o!==null){var c,h=Or;if(o.abbr=i,Ne[i]!=null)jt("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),h=Ne[i]._config;else if(o.parentLocale!=null)if(Ne[o.parentLocale]!=null)h=Ne[o.parentLocale]._config;else if(c=Un(o.parentLocale),c!=null)h=c._config;else return zr[o.parentLocale]||(zr[o.parentLocale]=[]),zr[o.parentLocale].push({name:i,config:o}),null;return Ne[i]=new Rt(mt(h,o)),zr[i]&&zr[i].forEach(function(m){ht(m.name,m.config)}),yr(i),Ne[i]}else return delete Ne[i],null}function Iu(i,o){if(o!=null){var c,h,m=Or;Ne[i]!=null&&Ne[i].parentLocale!=null?Ne[i].set(mt(Ne[i]._config,o)):(h=Un(i),h!=null&&(m=h._config),o=mt(m,o),h==null&&(o.abbr=i),c=new Rt(o),c.parentLocale=Ne[i],Ne[i]=c),yr(i)}else Ne[i]!=null&&(Ne[i].parentLocale!=null?(Ne[i]=Ne[i].parentLocale,i===yr()&&yr(i)):Ne[i]!=null&&delete Ne[i]);return Ne[i]}function He(i){var o;if(i&&i._locale&&i._locale._abbr&&(i=i._locale._abbr),!i)return ut;if(!u(i)){if(o=Un(i),o)return o;i=[i]}return Os(i)}function Mu(){return Oe(Ne)}function Ii(i){var o,c=i._a;return c&&N(i).overflow===-2&&(o=c[Qt]<0||c[Qt]>11?Qt:c[Kt]<1||c[Kt]>Ei(c[ot],c[Qt])?Kt:c[Ke]<0||c[Ke]>24||c[Ke]===24&&(c[Bt]!==0||c[gr]!==0||c[Gr]!==0)?Ke:c[Bt]<0||c[Bt]>59?Bt:c[gr]<0||c[gr]>59?gr:c[Gr]<0||c[Gr]>999?Gr:-1,N(i)._overflowDayOfYear&&(oKt)&&(o=Kt),N(i)._overflowWeeks&&o===-1&&(o=su),N(i)._overflowWeekday&&o===-1&&(o=Pi),N(i).overflow=o),i}var Ar=/^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,Mi=/^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,Ia=/Z|[+-]\\d\\d(?::?\\d\\d)?/,Ee=[["YYYYYY-MM-DD",/[+-]\\d{6}-\\d\\d-\\d\\d/],["YYYY-MM-DD",/\\d{4}-\\d\\d-\\d\\d/],["GGGG-[W]WW-E",/\\d{4}-W\\d\\d-\\d/],["GGGG-[W]WW",/\\d{4}-W\\d\\d/,!1],["YYYY-DDD",/\\d{4}-\\d{3}/],["YYYY-MM",/\\d{4}-\\d\\d/,!1],["YYYYYYMMDD",/[+-]\\d{10}/],["YYYYMMDD",/\\d{8}/],["GGGG[W]WWE",/\\d{4}W\\d{3}/],["GGGG[W]WW",/\\d{4}W\\d{2}/,!1],["YYYYDDD",/\\d{7}/],["YYYYMM",/\\d{6}/,!1],["YYYY",/\\d{4}/,!1]],Zt=[["HH:mm:ss.SSSS",/\\d\\d:\\d\\d:\\d\\d\\.\\d+/],["HH:mm:ss,SSSS",/\\d\\d:\\d\\d:\\d\\d,\\d+/],["HH:mm:ss",/\\d\\d:\\d\\d:\\d\\d/],["HH:mm",/\\d\\d:\\d\\d/],["HHmmss.SSSS",/\\d\\d\\d\\d\\d\\d\\.\\d+/],["HHmmss,SSSS",/\\d\\d\\d\\d\\d\\d,\\d+/],["HHmmss",/\\d\\d\\d\\d\\d\\d/],["HHmm",/\\d\\d\\d\\d/],["HH",/\\d\\d/]],Ma=/^\\/?Date\\((-?\\d+)/i,Ou=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,Oa={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Fs(i){var o,c,h=i._i,m=Ar.exec(h)||Mi.exec(h),S,E,G,J,ve=Ee.length,dt=Zt.length;if(m){for(N(i).iso=!0,o=0,c=ve;oMr(E)||i._dayOfYear===0)&&(N(i)._overflowDayOfYear=!0),c=yn(E,0,i._dayOfYear),i._a[Qt]=c.getUTCMonth(),i._a[Kt]=c.getUTCDate()),o=0;o<3&&i._a[o]==null;++o)i._a[o]=h[o]=m[o];for(;o<7;o++)i._a[o]=h[o]=i._a[o]==null?o===2?1:0:i._a[o];i._a[Ke]===24&&i._a[Bt]===0&&i._a[gr]===0&&i._a[Gr]===0&&(i._nextDay=!0,i._a[Ke]=0),i._d=(i._useUTC?yn:vs).apply(null,h),S=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[Ke]=24),i._w&&typeof i._w.d<"u"&&i._w.d!==S&&(N(i).weekdayMismatch=!0)}}function Ws(i){var o,c,h,m,S,E,G,J,ve;o=i._w,o.GG!=null||o.W!=null||o.E!=null?(S=1,E=4,c=$r(o.GG,i._a[ot],vn(Me(),1,4).year),h=$r(o.W,1),m=$r(o.E,1),(m<1||m>7)&&(J=!0)):(S=i._locale._week.dow,E=i._locale._week.doy,ve=vn(Me(),S,E),c=$r(o.gg,i._a[ot],ve.year),h=$r(o.w,ve.week),o.d!=null?(m=o.d,(m<0||m>6)&&(J=!0)):o.e!=null?(m=o.e+S,(o.e<0||o.e>6)&&(J=!0)):m=S),h<1||h>Vt(c,S,E)?N(i)._overflowWeeks=!0:J!=null?N(i)._overflowWeekday=!0:(G=ws(c,h,m,S,E),i._a[ot]=G.year,i._dayOfYear=G.dayOfYear)}r.ISO_8601=function(){},r.RFC_2822=function(){};function Fa(i){if(i._f===r.ISO_8601){Fs(i);return}if(i._f===r.RFC_2822){Ls(i);return}i._a=[],N(i).empty=!0;var o=""+i._i,c,h,m,S,E,G=o.length,J=0,ve,dt;for(m=pn(i._f,i._locale).match(Pt)||[],dt=m.length,c=0;c0&&N(i).unusedInput.push(E),o=o.slice(o.indexOf(h)+h.length),J+=h.length),hn[S]?(h?N(i).empty=!1:N(i).unusedTokens.push(S),au(S,h,i)):i._strict&&!h&&N(i).unusedTokens.push(S);N(i).charsLeftOver=G-J,o.length>0&&N(i).unusedInput.push(o),i._a[Ke]<=12&&N(i).bigHour===!0&&i._a[Ke]>0&&(N(i).bigHour=void 0),N(i).parsedDateParts=i._a.slice(0),N(i).meridiem=i._meridiem,i._a[Ke]=Na(i._locale,i._a[Ke],i._meridiem),ve=N(i).era,ve!==null&&(i._a[ot]=i._locale.erasConvertYear(ve,i._a[ot])),Hn(i),Ii(i)}function Na(i,o,c){var h;return c==null?o:i.meridiemHour!=null?i.meridiemHour(o,c):(i.isPM!=null&&(h=i.isPM(c),h&&o<12&&(o+=12),!h&&o===12&&(o=0)),o)}function La(i){var o,c,h,m,S,E,G=!1,J=i._f.length;if(J===0){N(i).invalidFormat=!0,i._d=new Date(NaN);return}for(m=0;mthis?this:i:ye()});function Vs(i,o){var c,h;if(o.length===1&&u(o[0])&&(o=o[0]),!o.length)return Me();for(c=o[0],h=1;hthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function D(){if(!C(this._isDSTShifted))return this._isDSTShifted;var i={},o;return ze(i,this),i=gt(i),i._a?(o=i._isUTC?K(i._a):Me(i._a),this._isDSTShifted=this.isValid()&&Uu(i._a,o.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function P(){return this.isValid()?!this._isUTC:!1}function B(){return this.isValid()?this._isUTC:!1}function Z(){return this.isValid()?this._isUTC&&this._offset===0:!1}var xe=/^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,Ze=/^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function se(i,o){var c=i,h=null,m,S,E;return Ut(i)?c={ms:i._milliseconds,d:i._days,M:i._months}:T(i)||!isNaN(+i)?(c={},o?c[o]=+i:c.milliseconds=+i):(h=xe.exec(i))?(m=h[1]==="-"?-1:1,c={y:0,d:te(h[Kt])*m,h:te(h[Ke])*m,m:te(h[Bt])*m,s:te(h[gr])*m,ms:te(bn(h[Gr]*1e3))*m}):(h=Ze.exec(i))?(m=h[1]==="-"?-1:1,c={y:xr(h[2],m),M:xr(h[3],m),w:xr(h[4],m),d:xr(h[5],m),h:xr(h[6],m),m:xr(h[7],m),s:xr(h[8],m)}):c==null?c={}:typeof c=="object"&&("from"in c||"to"in c)&&(E=Et(Me(c.from),Me(c.to)),c={},c.ms=E.milliseconds,c.M=E.months),S=new qn(c),Ut(i)&&p(i,"_locale")&&(S._locale=i._locale),Ut(i)&&p(i,"_isValid")&&(S._isValid=i._isValid),S}se.fn=qn.prototype,se.invalid=Wa;function xr(i,o){var c=i&&parseFloat(i.replace(",","."));return(isNaN(c)?0:c)*o}function Hs(i,o){var c={};return c.months=o.month()-i.month()+(o.year()-i.year())*12,i.clone().add(c.months,"M").isAfter(o)&&--c.months,c.milliseconds=+o-+i.clone().add(c.months,"M"),c}function Et(i,o){var c;return i.isValid()&&o.isValid()?(o=wt(o,i),i.isBefore(o)?c=Hs(i,o):(c=Hs(o,i),c.milliseconds=-c.milliseconds,c.months=-c.months),c):{milliseconds:0,months:0}}function Gn(i,o){return function(c,h){var m,S;return h!==null&&!isNaN(+h)&&(jt(o,"moment()."+o+"(period, number) is deprecated. Please use moment()."+o+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),S=c,c=h,h=S),m=se(c,h),qs(this,m,i),this}}function qs(i,o,c,h){var m=o._milliseconds,S=bn(o._days),E=bn(o._months);!i.isValid()||(h=h??!0,E&&va(i,mn(i,"Month")+E*c),S&&vi(i,"Date",mn(i,"Date")+S*c),m&&i._d.setTime(i._d.valueOf()+m*c),h&&r.updateOffset(i,S||E))}var kn=Gn(1,"add"),Fi=Gn(-1,"subtract");function zn(i){return typeof i=="string"||i instanceof String}function be(i){return Pe(i)||A(i)||zn(i)||T(i)||Gs(i)||Qu(i)||i===null||i===void 0}function Qu(i){var o=l(i)&&!v(i),c=!1,h=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],m,S,E=h.length;for(m=0;mc.valueOf():c.valueOf()9999?Er(c,o?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):me(Date.prototype.toISOString)?o?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Er(c,"Z")):Er(c,o?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Qr(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var i="moment",o="",c,h,m,S;return this.isLocal()||(i=this.utcOffset()===0?"moment.utc":"moment.parseZone",o="Z"),c="["+i+'("]',h=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",m="-MM-DD[T]HH:mm:ss.SSS",S=o+'[")]',this.format(c+h+m+S)}function Yi(i){i||(i=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var o=Er(this,i);return this.localeData().postformat(o)}function Ju(i,o){return this.isValid()&&(Pe(i)&&i.isValid()||Me(i).isValid())?se({to:this,from:i}).locale(this.locale()).humanize(!o):this.localeData().invalidDate()}function el(i){return this.from(Me(),i)}function tl(i,o){return this.isValid()&&(Pe(i)&&i.isValid()||Me(i).isValid())?se({from:this,to:i}).locale(this.locale()).humanize(!o):this.localeData().invalidDate()}function Bi(i){return this.to(Me(),i)}function jn(i){var o;return i===void 0?this._locale._abbr:(o=He(i),o!=null&&(this._locale=o),this)}var Vi=je("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(i){return i===void 0?this.localeData():this.locale(i)});function Ks(){return this._locale}var Qn=1e3,Cn=60*Qn,Ui=60*Cn,qe=(365*400+97)*24*Ui;function Be(i,o){return(i%o+o)%o}function Zs(i,o,c){return i<100&&i>=0?new Date(i+400,o,c)-qe:new Date(i,o,c).valueOf()}function Xs(i,o,c){return i<100&&i>=0?Date.UTC(i+400,o,c)-qe:Date.UTC(i,o,c)}function Js(i){var o,c;if(i=st(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(c=this._isUTC?Xs:Zs,i){case"year":o=c(this.year(),0,1);break;case"quarter":o=c(this.year(),this.month()-this.month()%3,1);break;case"month":o=c(this.year(),this.month(),1);break;case"week":o=c(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":o=c(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":o=c(this.year(),this.month(),this.date());break;case"hour":o=this._d.valueOf(),o-=Be(o+(this._isUTC?0:this.utcOffset()*Cn),Ui);break;case"minute":o=this._d.valueOf(),o-=Be(o,Cn);break;case"second":o=this._d.valueOf(),o-=Be(o,Qn);break}return this._d.setTime(o),r.updateOffset(this,!0),this}function rl(i){var o,c;if(i=st(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(c=this._isUTC?Xs:Zs,i){case"year":o=c(this.year()+1,0,1)-1;break;case"quarter":o=c(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":o=c(this.year(),this.month()+1,1)-1;break;case"week":o=c(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":o=c(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":o=c(this.year(),this.month(),this.date()+1)-1;break;case"hour":o=this._d.valueOf(),o+=Ui-Be(o+(this._isUTC?0:this.utcOffset()*Cn),Ui)-1;break;case"minute":o=this._d.valueOf(),o+=Cn-Be(o,Cn)-1;break;case"second":o=this._d.valueOf(),o+=Qn-Be(o,Qn)-1;break}return this._d.setTime(o),r.updateOffset(this,!0),this}function Ya(){return this._d.valueOf()-(this._offset||0)*6e4}function Kn(){return Math.floor(this.valueOf()/1e3)}function Ba(){return new Date(this.valueOf())}function Tn(){var i=this;return[i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function Zn(){var i=this;return{years:i.year(),months:i.month(),date:i.date(),hours:i.hours(),minutes:i.minutes(),seconds:i.seconds(),milliseconds:i.milliseconds()}}function Xn(){return this.isValid()?this.toISOString():null}function Hi(){return Le(this)}function Pn(){return V({},N(this))}function nl(){return N(this).overflow}function il(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}H("N",0,0,"eraAbbr"),H("NN",0,0,"eraAbbr"),H("NNN",0,0,"eraAbbr"),H("NNNN",0,0,"eraName"),H("NNNNN",0,0,"eraNarrow"),H("y",["y",1],"yo","eraYear"),H("y",["yy",2],0,"eraYear"),H("y",["yyy",3],0,"eraYear"),H("y",["yyyy",4],0,"eraYear"),Y("N",ie),Y("NN",ie),Y("NNN",ie),Y("NNNN",ul),Y("NNNNN",ll),Ce(["N","NN","NNN","NNNN","NNNNN"],function(i,o,c,h){var m=c._locale.erasParse(i,h,c._strict);m?N(c).era=m:N(c).invalidEra=i}),Y("y",gn),Y("yy",gn),Y("yyy",gn),Y("yyyy",gn),Y("yo",fl),Ce(["y","yy","yyy","yyyy"],ot),Ce(["yo"],function(i,o,c,h){var m;c._locale._eraYearOrdinalRegex&&(m=i.match(c._locale._eraYearOrdinalRegex)),c._locale.eraYearOrdinalParse?o[ot]=c._locale.eraYearOrdinalParse(i,m):o[ot]=parseInt(i,10)});function al(i,o){var c,h,m,S=this._eras||He("en")._eras;for(c=0,h=S.length;c=0)return S[h]}function ol(i,o){var c=i.since<=i.until?1:-1;return o===void 0?r(i.since).year():r(i.since).year()+(o-i.offset)*c}function qi(){var i,o,c,h=this.localeData().eras();for(i=0,o=h.length;iS&&(o=S),gl.call(this,i,o,c,h,m))}function gl(i,o,c,h,m){var S=ws(i,o,c,h,m),E=yn(S.year,0,S.dayOfYear);return this.year(E.getUTCFullYear()),this.month(E.getUTCMonth()),this.date(E.getUTCDate()),this}H("Q",0,"Qo","quarter"),De("quarter","Q"),Ue("quarter",7),Y("Q",wi),Ce("Q",function(i,o){o[Qt]=(te(i)-1)*3});function yl(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}H("D",["DD",2],"Do","date"),De("date","D"),Ue("date",9),Y("D",Ae),Y("DD",Ae,ct),Y("Do",function(i,o){return i?o._dayOfMonthOrdinalParse||o._ordinalParse:o._dayOfMonthOrdinalParseLenient}),Ce(["D","DD"],Kt),Ce("Do",function(i,o){o[Kt]=te(i.match(Ae)[0])});var ro=Ir("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear"),De("dayOfYear","DDD"),Ue("dayOfYear",4),Y("DDD",bi),Y("DDDD",Si),Ce(["DDD","DDDD"],function(i,o,c){c._dayOfYear=te(i)});function Sr(i){var o=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return i==null?o:this.add(i-o,"d")}H("m",["mm",2],0,"minute"),De("minute","m"),Ue("minute",14),Y("m",Ae),Y("mm",Ae,ct),Ce(["m","mm"],Bt);var xl=Ir("Minutes",!1);H("s",["ss",2],0,"second"),De("second","s"),Ue("second",15),Y("s",Ae),Y("ss",Ae,ct),Ce(["s","ss"],gr);var vl=Ir("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)}),H(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),H(0,["SSS",3],0,"millisecond"),H(0,["SSSS",4],0,function(){return this.millisecond()*10}),H(0,["SSSSS",5],0,function(){return this.millisecond()*100}),H(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),H(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),H(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),H(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),De("millisecond","ms"),Ue("millisecond",16),Y("S",bi,wi),Y("SS",bi,ct),Y("SSS",bi,Si);var Rr,no;for(Rr="SSSS";Rr.length<=9;Rr+="S")Y(Rr,gn);function wl(i,o){o[Gr]=te(("0."+i)*1e3)}for(Rr="S";Rr.length<=9;Rr+="S")Ce(Rr,wl);no=Ir("Milliseconds",!1),H("z",0,0,"zoneAbbr"),H("zz",0,0,"zoneName");function Kr(){return this._isUTC?"UTC":""}function Sl(){return this._isUTC?"Coordinated Universal Time":""}var F=$e.prototype;F.add=kn,F.calendar=Zu,F.clone=Xu,F.diff=js,F.endOf=rl,F.format=Yi,F.from=Ju,F.fromNow=el,F.to=tl,F.toNow=Bi,F.get=ca,F.invalidAt=nl,F.isAfter=Li,F.isBefore=Lr,F.isBetween=Ri,F.isSame=zs,F.isSameOrAfter=Wi,F.isSameOrBefore=$s,F.isValid=Hi,F.lang=Vi,F.locale=jn,F.localeData=Ks,F.max=Lu,F.min=Bs,F.parsingFlags=Pn,F.set=ha,F.startOf=Js,F.subtract=Fi,F.toArray=Tn,F.toObject=Zn,F.toDate=Ba,F.toISOString=$n,F.inspect=Qr,typeof Symbol<"u"&&Symbol.for!=null&&(F[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),F.toJSON=Xn,F.toString=Qs,F.unix=Kn,F.valueOf=Ya,F.creationData=il,F.eraName=qi,F.eraNarrow=Jn,F.eraAbbr=eo,F.eraYear=g,F.year=ba,F.isLeapYear=du,F.weekYear=cl,F.isoWeekYear=hl,F.quarter=F.quarters=yl,F.month=wa,F.daysInMonth=xs,F.week=F.weeks=mu,F.isoWeek=F.isoWeeks=bs,F.weeksInYear=wr,F.weeksInWeekYear=ml,F.isoWeeksInYear=pl,F.isoWeeksInISOWeekYear=dl,F.date=ro,F.day=F.days=ku,F.weekday=Cu,F.isoWeekday=Tu,F.dayOfYear=Sr,F.hour=F.hours=rt,F.minute=F.minutes=xl,F.second=F.seconds=vl,F.millisecond=F.milliseconds=no,F.utcOffset=qu,F.utc=zu,F.local=$u,F.parseZone=ju,F.hasAlignedHourOffset=Nr,F.isDST=b,F.isLocal=P,F.isUtcOffset=B,F.isUtc=Z,F.isUTC=Z,F.zoneAbbr=Kr,F.zoneName=Sl,F.dates=je("dates accessor is deprecated. Use date instead.",ro),F.months=je("months accessor is deprecated. Use month instead",wa),F.years=je("years accessor is deprecated. Use year instead",ba),F.zone=je("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Gu),F.isDSTShifted=je("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",D);function Ht(i){return Me(i*1e3)}function _l(){return Me.apply(null,arguments).parseZone()}function io(i){return i}var ge=Rt.prototype;ge.calendar=Wt,ge.longDateFormat=yi,ge.invalidDate=hs,ge.ordinal=Xo,ge.preparse=io,ge.postformat=io,ge.relativeTime=ps,ge.pastFuture=Jo,ge.set=at,ge.eras=al,ge.erasParse=sl,ge.erasConvertYear=ol,ge.erasAbbrRegex=Gi,ge.erasNameRegex=En,ge.erasNarrowRegex=Dt,ge.months=lu,ge.monthsShort=fu,ge.monthsParse=hu,ge.monthsRegex=pu,ge.monthsShortRegex=Sa,ge.week=ka,ge.firstDayOfYear=_s,ge.firstDayOfWeek=Ss,ge.weekdays=wu,ge.weekdaysMin=Ca,ge.weekdaysShort=Su,ge.weekdaysParse=bu,ge.weekdaysRegex=Fe,ge.weekdaysShortRegex=Ie,ge.weekdaysMinRegex=Pu,ge.isPM=Is,ge.meridiem=Ea;function $i(i,o,c,h){var m=He(),S=K().set(h,o);return m[c](S,i)}function ao(i,o,c){if(T(i)&&(o=i,i=void 0),i=i||"",o!=null)return $i(i,o,c,"month");var h,m=[];for(h=0;h<12;h++)m[h]=$i(i,h,c,"month");return m}function ji(i,o,c,h){typeof i=="boolean"?(T(o)&&(c=o,o=void 0),o=o||""):(o=i,c=o,i=!1,T(o)&&(c=o,o=void 0),o=o||"");var m=He(),S=i?m._week.dow:0,E,G=[];if(c!=null)return $i(o,(c+S)%7,h,"day");for(E=0;E<7;E++)G[E]=$i(o,(E+S)%7,h,"day");return G}function so(i,o){return ao(i,o,"months")}function bl(i,o){return ao(i,o,"monthsShort")}function kl(i,o,c){return ji(i,o,c,"weekdays")}function Va(i,o,c){return ji(i,o,c,"weekdaysShort")}function ei(i,o,c){return ji(i,o,c,"weekdaysMin")}yr("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\\d{1,2}(th|st|nd|rd)/,ordinal:function(i){var o=i%10,c=te(i%100/10)===1?"th":o===1?"st":o===2?"nd":o===3?"rd":"th";return i+c}}),r.lang=je("moment.lang is deprecated. Use moment.locale instead.",yr),r.langData=je("moment.langData is deprecated. Use moment.localeData instead.",He);var It=Math.abs;function Cl(){var i=this._data;return this._milliseconds=It(this._milliseconds),this._days=It(this._days),this._months=It(this._months),i.milliseconds=It(i.milliseconds),i.seconds=It(i.seconds),i.minutes=It(i.minutes),i.hours=It(i.hours),i.months=It(i.months),i.years=It(i.years),this}function Ua(i,o,c,h){var m=se(o,c);return i._milliseconds+=h*m._milliseconds,i._days+=h*m._days,i._months+=h*m._months,i._bubble()}function Tl(i,o){return Ua(this,i,o,1)}function _r(i,o){return Ua(this,i,o,-1)}function Qi(i){return i<0?Math.floor(i):Math.ceil(i)}function Zr(){var i=this._milliseconds,o=this._days,c=this._months,h=this._data,m,S,E,G,J;return i>=0&&o>=0&&c>=0||i<=0&&o<=0&&c<=0||(i+=Qi(Ha(c)+o)*864e5,o=0,c=0),h.milliseconds=i%1e3,m=nt(i/1e3),h.seconds=m%60,S=nt(m/60),h.minutes=S%60,E=nt(S/60),h.hours=E%24,o+=nt(E/24),J=nt(St(o)),c+=J,o-=Qi(Ha(J)),G=nt(c/12),c%=12,h.days=o,h.months=c,h.years=G,this}function St(i){return i*4800/146097}function Ha(i){return i*146097/4800}function oo(i){if(!this.isValid())return NaN;var o,c,h=this._milliseconds;if(i=st(i),i==="month"||i==="quarter"||i==="year")switch(o=this._days+h/864e5,c=this._months+St(o),i){case"month":return c;case"quarter":return c/3;case"year":return c/12}else switch(o=this._days+Math.round(Ha(this._months)),i){case"week":return o/7+h/6048e5;case"day":return o+h/864e5;case"hour":return o*24+h/36e5;case"minute":return o*1440+h/6e4;case"second":return o*86400+h/1e3;case"millisecond":return Math.floor(o*864e5)+h;default:throw new Error("Unknown unit "+i)}}function uo(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+te(this._months/12)*31536e6:NaN}function _t(i){return function(){return this.as(i)}}var Wr=_t("ms"),lo=_t("s"),Pl=_t("m"),Ki=_t("h"),El=_t("d"),fo=_t("w"),it=_t("M"),qa=_t("Q"),co=_t("y");function Jt(){return se(this)}function Ga(i){return i=st(i),this.isValid()?this[i+"s"]():NaN}function er(i){return function(){return this.isValid()?this._data[i]:NaN}}var Xr=er("milliseconds"),ho=er("seconds"),pt=er("minutes"),za=er("hours"),Dl=er("days"),Il=er("months"),Ml=er("years");function $a(){return nt(this.days()/7)}var br=Math.round,tr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function po(i,o,c,h,m){return m.relativeTime(o||1,!!c,i,h)}function Ol(i,o,c,h){var m=se(i).abs(),S=br(m.as("s")),E=br(m.as("m")),G=br(m.as("h")),J=br(m.as("d")),ve=br(m.as("M")),dt=br(m.as("w")),rr=br(m.as("y")),kr=S<=c.ss&&["s",S]||S0,kr[4]=h,po.apply(null,kr)}function Al(i){return i===void 0?br:typeof i=="function"?(br=i,!0):!1}function ti(i,o){return tr[i]===void 0?!1:o===void 0?tr[i]:(tr[i]=o,i==="s"&&(tr.ss=o-1),!0)}function Fl(i,o){if(!this.isValid())return this.localeData().invalidDate();var c=!1,h=tr,m,S;return typeof i=="object"&&(o=i,i=!1),typeof i=="boolean"&&(c=i),typeof o=="object"&&(h=Object.assign({},tr,o),o.s!=null&&o.ss==null&&(h.ss=o.s-1)),m=this.localeData(),S=Ol(this,!c,h,m),c&&(S=m.pastFuture(+this,S)),m.postformat(S)}var ja=Math.abs;function Yr(i){return(i>0)-(i<0)||+i}function ri(){if(!this.isValid())return this.localeData().invalidDate();var i=ja(this._milliseconds)/1e3,o=ja(this._days),c=ja(this._months),h,m,S,E,G=this.asSeconds(),J,ve,dt,rr;return G?(h=nt(i/60),m=nt(h/60),i%=60,h%=60,S=nt(c/12),c%=12,E=i?i.toFixed(3).replace(/\\.?0+$/,""):"",J=G<0?"-":"",ve=Yr(this._months)!==Yr(G)?"-":"",dt=Yr(this._days)!==Yr(G)?"-":"",rr=Yr(this._milliseconds)!==Yr(G)?"-":"",J+"P"+(S?ve+S+"Y":"")+(c?ve+c+"M":"")+(o?dt+o+"D":"")+(m||h||i?"T":"")+(m?rr+m+"H":"")+(h?rr+h+"M":"")+(i?rr+E+"S":"")):"P0D"}var le=qn.prototype;le.isValid=Vu,le.abs=Cl,le.add=Tl,le.subtract=_r,le.as=oo,le.asMilliseconds=Wr,le.asSeconds=lo,le.asMinutes=Pl,le.asHours=Ki,le.asDays=El,le.asWeeks=fo,le.asMonths=it,le.asQuarters=qa,le.asYears=co,le.valueOf=uo,le._bubble=Zr,le.clone=Jt,le.get=Ga,le.milliseconds=Xr,le.seconds=ho,le.minutes=pt,le.hours=za,le.days=Dl,le.weeks=$a,le.months=Il,le.years=Ml,le.humanize=Fl,le.toISOString=ri,le.toString=ri,le.toJSON=ri,le.locale=jn,le.localeData=Ks,le.toIsoString=je("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ri),le.lang=Vi,H("X",0,0,"unix"),H("x",0,0,"valueOf"),Y("x",Bn),Y("X",ru),Ce("X",function(i,o,c){c._d=new Date(parseFloat(i)*1e3)}),Ce("x",function(i,o,c){c._d=new Date(te(i))});return r.version="2.29.4",a(Me),r.fn=F,r.min=Ru,r.max=Wu,r.now=Yu,r.utc=K,r.unix=Ht,r.months=so,r.isDate=A,r.locale=yr,r.invalid=ye,r.duration=se,r.isMoment=Pe,r.weekdays=kl,r.parseZone=_l,r.localeData=He,r.isDuration=Ut,r.monthsShort=bl,r.weekdaysMin=ei,r.defineLocale=ht,r.updateLocale=Iu,r.locales=Mu,r.weekdaysShort=Va,r.normalizeUnits=st,r.relativeTimeRounding=Al,r.relativeTimeThreshold=ti,r.calendarFormat=Ku,r.prototype=F,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r})});var Yo=yf(xf());var sn=e=>[...new Set(e)];var Th=(e,r)=>e.sort(function(a,u){let l=r.indexOf(a),p=r.indexOf(u);return l>p?l!=-1&&p==-1?-1:1:p!=-1&&l==-1?1:-1});var on="File";var Ao=e=>e.lastIndexOf("/")!=-1?e.lastIndexOf(".")!=-1?Ph(e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("."))):e.substring(e.lastIndexOf("/")+1):e.lastIndexOf(".")!=-1?e.substring(0,e.lastIndexOf(".")):e;function vf(e){return Array.isArray(e)?e:typeof e=="string"?[e]:[]}var Eh=(e,r)=>r.indexOf(e)>0?r.indexOf(e):r.length;var Fo=e=>"spaces://"+e;var Ph=e=>e.charAt(0)=="/"?e.substring(1):e;function si(e){return si=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},si(e)}function Nt(e){if(e===null||e===!0||e===!1)return NaN;var r=Number(e);return isNaN(r)?r:r<0?Math.ceil(r):Math.floor(r)}function ke(e,r){if(r.length1?"s":"")+" required, but only "+r.length+" present")}function et(e){ke(1,arguments);var r=Object.prototype.toString.call(e);return e instanceof Date||si(e)==="object"&&r==="[object Date]"?new Date(e.getTime()):typeof e=="number"||r==="[object Number]"?new Date(e):((typeof e=="string"||r==="[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 wf(e,r){ke(2,arguments);var a=et(e).getTime(),u=Nt(r);return new Date(a+u)}var ux={};function An(){return ux}function Sf(e){var r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),e.getTime()-r.getTime()}function _f(e){return ke(1,arguments),e instanceof Date||si(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function bf(e){if(ke(1,arguments),!_f(e)&&typeof e!="number")return!1;var r=et(e);return!isNaN(Number(r))}function kf(e,r){ke(2,arguments);var a=Nt(r);return wf(e,-a)}var lx=864e5;function Cf(e){ke(1,arguments);var r=et(e),a=r.getTime();r.setUTCMonth(0,1),r.setUTCHours(0,0,0,0);var u=r.getTime(),l=a-u;return Math.floor(l/lx)+1}function Fn(e){ke(1,arguments);var r=1,a=et(e),u=a.getUTCDay(),l=(u=l.getTime()?a+1:r.getTime()>=v.getTime()?a:a-1}function Tf(e){ke(1,arguments);var r=ts(e),a=new Date(0);a.setUTCFullYear(r,0,4),a.setUTCHours(0,0,0,0);var u=Fn(a);return u}var fx=6048e5;function Pf(e){ke(1,arguments);var r=et(e),a=Fn(r).getTime()-Tf(r).getTime();return Math.round(a/fx)+1}function Nn(e,r){var a,u,l,p,v,C,T,A;ke(1,arguments);var R=An(),V=Nt((a=(u=(l=(p=r?.weekStartsOn)!==null&&p!==void 0?p:r==null||(v=r.locale)===null||v===void 0||(C=v.options)===null||C===void 0?void 0:C.weekStartsOn)!==null&&l!==void 0?l:R.weekStartsOn)!==null&&u!==void 0?u:(T=R.locale)===null||T===void 0||(A=T.options)===null||A===void 0?void 0:A.weekStartsOn)!==null&&a!==void 0?a:0);if(!(V>=0&&V<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var K=et(e),re=K.getUTCDay(),N=(re=1&&re<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var N=new Date(0);N.setUTCFullYear(V+1,0,re),N.setUTCHours(0,0,0,0);var _e=Nn(N,r),Le=new Date(0);Le.setUTCFullYear(V,0,re),Le.setUTCHours(0,0,0,0);var ye=Nn(Le,r);return R.getTime()>=_e.getTime()?V+1:R.getTime()>=ye.getTime()?V:V-1}function Ef(e,r){var a,u,l,p,v,C,T,A;ke(1,arguments);var R=An(),V=Nt((a=(u=(l=(p=r?.firstWeekContainsDate)!==null&&p!==void 0?p:r==null||(v=r.locale)===null||v===void 0||(C=v.options)===null||C===void 0?void 0:C.firstWeekContainsDate)!==null&&l!==void 0?l:R.firstWeekContainsDate)!==null&&u!==void 0?u:(T=R.locale)===null||T===void 0||(A=T.options)===null||A===void 0?void 0:A.firstWeekContainsDate)!==null&&a!==void 0?a:1),K=rs(e,r),re=new Date(0);re.setUTCFullYear(K,0,V),re.setUTCHours(0,0,0,0);var N=Nn(re,r);return N}var cx=6048e5;function Df(e,r){ke(1,arguments);var a=et(e),u=Nn(a,r).getTime()-Ef(a,r).getTime();return Math.round(u/cx)+1}function Se(e,r){for(var a=e<0?"-":"",u=Math.abs(e).toString();u.length0?u:1-u;return Se(a==="yy"?l%100:l,a.length)},M:function(r,a){var u=r.getUTCMonth();return a==="M"?String(u+1):Se(u+1,2)},d:function(r,a){return Se(r.getUTCDate(),a.length)},a:function(r,a){var u=r.getUTCHours()/12>=1?"pm":"am";switch(a){case"a":case"aa":return u.toUpperCase();case"aaa":return u;case"aaaaa":return u[0];case"aaaa":default:return u==="am"?"a.m.":"p.m."}},h:function(r,a){return Se(r.getUTCHours()%12||12,a.length)},H:function(r,a){return Se(r.getUTCHours(),a.length)},m:function(r,a){return Se(r.getUTCMinutes(),a.length)},s:function(r,a){return Se(r.getUTCSeconds(),a.length)},S:function(r,a){var u=a.length,l=r.getUTCMilliseconds(),p=Math.floor(l*Math.pow(10,u-3));return Se(p,a.length)}},un=hx;var na={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},px={G:function(r,a,u){var l=r.getUTCFullYear()>0?1:0;switch(a){case"G":case"GG":case"GGG":return u.era(l,{width:"abbreviated"});case"GGGGG":return u.era(l,{width:"narrow"});case"GGGG":default:return u.era(l,{width:"wide"})}},y:function(r,a,u){if(a==="yo"){var l=r.getUTCFullYear(),p=l>0?l:1-l;return u.ordinalNumber(p,{unit:"year"})}return un.y(r,a)},Y:function(r,a,u,l){var p=rs(r,l),v=p>0?p:1-p;if(a==="YY"){var C=v%100;return Se(C,2)}return a==="Yo"?u.ordinalNumber(v,{unit:"year"}):Se(v,a.length)},R:function(r,a){var u=ts(r);return Se(u,a.length)},u:function(r,a){var u=r.getUTCFullYear();return Se(u,a.length)},Q:function(r,a,u){var l=Math.ceil((r.getUTCMonth()+1)/3);switch(a){case"Q":return String(l);case"QQ":return Se(l,2);case"Qo":return u.ordinalNumber(l,{unit:"quarter"});case"QQQ":return u.quarter(l,{width:"abbreviated",context:"formatting"});case"QQQQQ":return u.quarter(l,{width:"narrow",context:"formatting"});case"QQQQ":default:return u.quarter(l,{width:"wide",context:"formatting"})}},q:function(r,a,u){var l=Math.ceil((r.getUTCMonth()+1)/3);switch(a){case"q":return String(l);case"qq":return Se(l,2);case"qo":return u.ordinalNumber(l,{unit:"quarter"});case"qqq":return u.quarter(l,{width:"abbreviated",context:"standalone"});case"qqqqq":return u.quarter(l,{width:"narrow",context:"standalone"});case"qqqq":default:return u.quarter(l,{width:"wide",context:"standalone"})}},M:function(r,a,u){var l=r.getUTCMonth();switch(a){case"M":case"MM":return un.M(r,a);case"Mo":return u.ordinalNumber(l+1,{unit:"month"});case"MMM":return u.month(l,{width:"abbreviated",context:"formatting"});case"MMMMM":return u.month(l,{width:"narrow",context:"formatting"});case"MMMM":default:return u.month(l,{width:"wide",context:"formatting"})}},L:function(r,a,u){var l=r.getUTCMonth();switch(a){case"L":return String(l+1);case"LL":return Se(l+1,2);case"Lo":return u.ordinalNumber(l+1,{unit:"month"});case"LLL":return u.month(l,{width:"abbreviated",context:"standalone"});case"LLLLL":return u.month(l,{width:"narrow",context:"standalone"});case"LLLL":default:return u.month(l,{width:"wide",context:"standalone"})}},w:function(r,a,u,l){var p=Df(r,l);return a==="wo"?u.ordinalNumber(p,{unit:"week"}):Se(p,a.length)},I:function(r,a,u){var l=Pf(r);return a==="Io"?u.ordinalNumber(l,{unit:"week"}):Se(l,a.length)},d:function(r,a,u){return a==="do"?u.ordinalNumber(r.getUTCDate(),{unit:"date"}):un.d(r,a)},D:function(r,a,u){var l=Cf(r);return a==="Do"?u.ordinalNumber(l,{unit:"dayOfYear"}):Se(l,a.length)},E:function(r,a,u){var l=r.getUTCDay();switch(a){case"E":case"EE":case"EEE":return u.day(l,{width:"abbreviated",context:"formatting"});case"EEEEE":return u.day(l,{width:"narrow",context:"formatting"});case"EEEEEE":return u.day(l,{width:"short",context:"formatting"});case"EEEE":default:return u.day(l,{width:"wide",context:"formatting"})}},e:function(r,a,u,l){var p=r.getUTCDay(),v=(p-l.weekStartsOn+8)%7||7;switch(a){case"e":return String(v);case"ee":return Se(v,2);case"eo":return u.ordinalNumber(v,{unit:"day"});case"eee":return u.day(p,{width:"abbreviated",context:"formatting"});case"eeeee":return u.day(p,{width:"narrow",context:"formatting"});case"eeeeee":return u.day(p,{width:"short",context:"formatting"});case"eeee":default:return u.day(p,{width:"wide",context:"formatting"})}},c:function(r,a,u,l){var p=r.getUTCDay(),v=(p-l.weekStartsOn+8)%7||7;switch(a){case"c":return String(v);case"cc":return Se(v,a.length);case"co":return u.ordinalNumber(v,{unit:"day"});case"ccc":return u.day(p,{width:"abbreviated",context:"standalone"});case"ccccc":return u.day(p,{width:"narrow",context:"standalone"});case"cccccc":return u.day(p,{width:"short",context:"standalone"});case"cccc":default:return u.day(p,{width:"wide",context:"standalone"})}},i:function(r,a,u){var l=r.getUTCDay(),p=l===0?7:l;switch(a){case"i":return String(p);case"ii":return Se(p,a.length);case"io":return u.ordinalNumber(p,{unit:"day"});case"iii":return u.day(l,{width:"abbreviated",context:"formatting"});case"iiiii":return u.day(l,{width:"narrow",context:"formatting"});case"iiiiii":return u.day(l,{width:"short",context:"formatting"});case"iiii":default:return u.day(l,{width:"wide",context:"formatting"})}},a:function(r,a,u){var l=r.getUTCHours(),p=l/12>=1?"pm":"am";switch(a){case"a":case"aa":return u.dayPeriod(p,{width:"abbreviated",context:"formatting"});case"aaa":return u.dayPeriod(p,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return u.dayPeriod(p,{width:"narrow",context:"formatting"});case"aaaa":default:return u.dayPeriod(p,{width:"wide",context:"formatting"})}},b:function(r,a,u){var l=r.getUTCHours(),p;switch(l===12?p=na.noon:l===0?p=na.midnight:p=l/12>=1?"pm":"am",a){case"b":case"bb":return u.dayPeriod(p,{width:"abbreviated",context:"formatting"});case"bbb":return u.dayPeriod(p,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return u.dayPeriod(p,{width:"narrow",context:"formatting"});case"bbbb":default:return u.dayPeriod(p,{width:"wide",context:"formatting"})}},B:function(r,a,u){var l=r.getUTCHours(),p;switch(l>=17?p=na.evening:l>=12?p=na.afternoon:l>=4?p=na.morning:p=na.night,a){case"B":case"BB":case"BBB":return u.dayPeriod(p,{width:"abbreviated",context:"formatting"});case"BBBBB":return u.dayPeriod(p,{width:"narrow",context:"formatting"});case"BBBB":default:return u.dayPeriod(p,{width:"wide",context:"formatting"})}},h:function(r,a,u){if(a==="ho"){var l=r.getUTCHours()%12;return l===0&&(l=12),u.ordinalNumber(l,{unit:"hour"})}return un.h(r,a)},H:function(r,a,u){return a==="Ho"?u.ordinalNumber(r.getUTCHours(),{unit:"hour"}):un.H(r,a)},K:function(r,a,u){var l=r.getUTCHours()%12;return a==="Ko"?u.ordinalNumber(l,{unit:"hour"}):Se(l,a.length)},k:function(r,a,u){var l=r.getUTCHours();return l===0&&(l=24),a==="ko"?u.ordinalNumber(l,{unit:"hour"}):Se(l,a.length)},m:function(r,a,u){return a==="mo"?u.ordinalNumber(r.getUTCMinutes(),{unit:"minute"}):un.m(r,a)},s:function(r,a,u){return a==="so"?u.ordinalNumber(r.getUTCSeconds(),{unit:"second"}):un.s(r,a)},S:function(r,a){return un.S(r,a)},X:function(r,a,u,l){var p=l._originalDate||r,v=p.getTimezoneOffset();if(v===0)return"Z";switch(a){case"X":return Mh(v);case"XXXX":case"XX":return oi(v);case"XXXXX":case"XXX":default:return oi(v,":")}},x:function(r,a,u,l){var p=l._originalDate||r,v=p.getTimezoneOffset();switch(a){case"x":return Mh(v);case"xxxx":case"xx":return oi(v);case"xxxxx":case"xxx":default:return oi(v,":")}},O:function(r,a,u,l){var p=l._originalDate||r,v=p.getTimezoneOffset();switch(a){case"O":case"OO":case"OOO":return"GMT"+Ih(v,":");case"OOOO":default:return"GMT"+oi(v,":")}},z:function(r,a,u,l){var p=l._originalDate||r,v=p.getTimezoneOffset();switch(a){case"z":case"zz":case"zzz":return"GMT"+Ih(v,":");case"zzzz":default:return"GMT"+oi(v,":")}},t:function(r,a,u,l){var p=l._originalDate||r,v=Math.floor(p.getTime()/1e3);return Se(v,a.length)},T:function(r,a,u,l){var p=l._originalDate||r,v=p.getTime();return Se(v,a.length)}};function Ih(e,r){var a=e>0?"-":"+",u=Math.abs(e),l=Math.floor(u/60),p=u%60;if(p===0)return a+String(l);var v=r||"";return a+String(l)+v+Se(p,2)}function Mh(e,r){if(e%60===0){var a=e>0?"-":"+";return a+Se(Math.abs(e)/60,2)}return oi(e,r)}function oi(e,r){var a=r||"",u=e>0?"-":"+",l=Math.abs(e),p=Se(Math.floor(l/60),2),v=Se(l%60,2);return u+p+a+v}var Oh=px;var Ah=function(r,a){switch(r){case"P":return a.date({width:"short"});case"PP":return a.date({width:"medium"});case"PPP":return a.date({width:"long"});case"PPPP":default:return a.date({width:"full"})}},Fh=function(r,a){switch(r){case"p":return a.time({width:"short"});case"pp":return a.time({width:"medium"});case"ppp":return a.time({width:"long"});case"pppp":default:return a.time({width:"full"})}},dx=function(r,a){var u=r.match(/(P+)(p+)?/)||[],l=u[1],p=u[2];if(!p)return Ah(r,a);var v;switch(l){case"P":v=a.dateTime({width:"short"});break;case"PP":v=a.dateTime({width:"medium"});break;case"PPP":v=a.dateTime({width:"long"});break;case"PPPP":default:v=a.dateTime({width:"full"});break}return v.replace("{{date}}",Ah(l,a)).replace("{{time}}",Fh(p,a))},mx={p:Fh,P:dx},Nh=mx;var gx=["D","DD"],yx=["YY","YYYY"];function Lh(e){return gx.indexOf(e)!==-1}function Rh(e){return yx.indexOf(e)!==-1}function If(e,r,a){if(e==="YYYY")throw new RangeError("Use \`yyyy\` instead of \`YYYY\` (in \`".concat(r,"\`) for formatting years to the input \`").concat(a,"\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use \`yy\` instead of \`YY\` (in \`".concat(r,"\`) for formatting years to the input \`").concat(a,"\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use \`d\` instead of \`D\` (in \`".concat(r,"\`) for formatting days of the month to the input \`").concat(a,"\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use \`dd\` instead of \`DD\` (in \`".concat(r,"\`) for formatting days of the month to the input \`").concat(a,"\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var xx={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"}},vx=function(r,a,u){var l,p=xx[r];return typeof p=="string"?l=p:a===1?l=p.one:l=p.other.replace("{{count}}",a.toString()),u!=null&&u.addSuffix?u.comparison&&u.comparison>0?"in "+l:l+" ago":l},Wh=vx;function ns(e){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=r.width?String(r.width):e.defaultWidth,u=e.formats[a]||e.formats[e.defaultWidth];return u}}var wx={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Sx={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},_x={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},bx={date:ns({formats:wx,defaultWidth:"full"}),time:ns({formats:Sx,defaultWidth:"full"}),dateTime:ns({formats:_x,defaultWidth:"full"})},Yh=bx;var kx={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Cx=function(r,a,u,l){return kx[r]},Bh=Cx;function ui(e){return function(r,a){var u=a!=null&&a.context?String(a.context):"standalone",l;if(u==="formatting"&&e.formattingValues){var p=e.defaultFormattingWidth||e.defaultWidth,v=a!=null&&a.width?String(a.width):p;l=e.formattingValues[v]||e.formattingValues[p]}else{var C=e.defaultWidth,T=a!=null&&a.width?String(a.width):e.defaultWidth;l=e.values[T]||e.values[C]}var A=e.argumentCallback?e.argumentCallback(r):r;return l[A]}}var Tx={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Px={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ex={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"]},Dx={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"]},Ix={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"}},Mx={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"}},Ox=function(r,a){var u=Number(r),l=u%100;if(l>20||l<10)switch(l%10){case 1:return u+"st";case 2:return u+"nd";case 3:return u+"rd"}return u+"th"},Ax={ordinalNumber:Ox,era:ui({values:Tx,defaultWidth:"wide"}),quarter:ui({values:Px,defaultWidth:"wide",argumentCallback:function(r){return r-1}}),month:ui({values:Ex,defaultWidth:"wide"}),day:ui({values:Dx,defaultWidth:"wide"}),dayPeriod:ui({values:Ix,defaultWidth:"wide",formattingValues:Mx,defaultFormattingWidth:"wide"})},Vh=Ax;function li(e){return function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=a.width,l=u&&e.matchPatterns[u]||e.matchPatterns[e.defaultMatchWidth],p=r.match(l);if(!p)return null;var v=p[0],C=u&&e.parsePatterns[u]||e.parsePatterns[e.defaultParseWidth],T=Array.isArray(C)?Nx(C,function(V){return V.test(v)}):Fx(C,function(V){return V.test(v)}),A;A=e.valueCallback?e.valueCallback(T):T,A=a.valueCallback?a.valueCallback(A):A;var R=r.slice(v.length);return{value:A,rest:R}}}function Fx(e,r){for(var a in e)if(e.hasOwnProperty(a)&&r(e[a]))return a}function Nx(e,r){for(var a=0;a1&&arguments[1]!==void 0?arguments[1]:{},u=r.match(e.matchPattern);if(!u)return null;var l=u[0],p=r.match(e.parsePattern);if(!p)return null;var v=e.valueCallback?e.valueCallback(p[0]):p[0];v=a.valueCallback?a.valueCallback(v):v;var C=r.slice(l.length);return{value:v,rest:C}}}var Lx=/^(\\d+)(th|st|nd|rd)?/i,Rx=/\\d+/i,Wx={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},Yx={any:[/^b/i,/^(a|c)/i]},Bx={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Vx={any:[/1/i,/2/i,/3/i,/4/i]},Ux={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},Hx={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]},qx={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},Gx={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]},zx={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},$x={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}},jx={ordinalNumber:Mf({matchPattern:Lx,parsePattern:Rx,valueCallback:function(r){return parseInt(r,10)}}),era:li({matchPatterns:Wx,defaultMatchWidth:"wide",parsePatterns:Yx,defaultParseWidth:"any"}),quarter:li({matchPatterns:Bx,defaultMatchWidth:"wide",parsePatterns:Vx,defaultParseWidth:"any",valueCallback:function(r){return r+1}}),month:li({matchPatterns:Ux,defaultMatchWidth:"wide",parsePatterns:Hx,defaultParseWidth:"any"}),day:li({matchPatterns:qx,defaultMatchWidth:"wide",parsePatterns:Gx,defaultParseWidth:"any"}),dayPeriod:li({matchPatterns:zx,defaultMatchWidth:"any",parsePatterns:$x,defaultParseWidth:"any"})},Uh=jx;var Qx={code:"en-US",formatDistance:Wh,formatLong:Yh,formatRelative:Bh,localize:Vh,match:Uh,options:{weekStartsOn:0,firstWeekContainsDate:1}},Hh=Qx;var qh=Hh;var Kx=/[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g,Zx=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Xx=/^'([^]*?)'?$/,Jx=/''/g,ev=/[a-zA-Z]/;function fi(e,r,a){var u,l,p,v,C,T,A,R,V,K,re,N,_e,Le,ye,de,We,ze;ke(2,arguments);var $e=String(r),Pe=An(),tt=(u=(l=a?.locale)!==null&&l!==void 0?l:Pe.locale)!==null&&u!==void 0?u:qh,je=Nt((p=(v=(C=(T=a?.firstWeekContainsDate)!==null&&T!==void 0?T:a==null||(A=a.locale)===null||A===void 0||(R=A.options)===null||R===void 0?void 0:R.firstWeekContainsDate)!==null&&C!==void 0?C:Pe.firstWeekContainsDate)!==null&&v!==void 0?v:(V=Pe.locale)===null||V===void 0||(K=V.options)===null||K===void 0?void 0:K.firstWeekContainsDate)!==null&&p!==void 0?p:1);if(!(je>=1&&je<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var pr=Nt((re=(N=(_e=(Le=a?.weekStartsOn)!==null&&Le!==void 0?Le:a==null||(ye=a.locale)===null||ye===void 0||(de=ye.options)===null||de===void 0?void 0:de.weekStartsOn)!==null&&_e!==void 0?_e:Pe.weekStartsOn)!==null&&N!==void 0?N:(We=Pe.locale)===null||We===void 0||(ze=We.options)===null||ze===void 0?void 0:ze.weekStartsOn)!==null&&re!==void 0?re:0);if(!(pr>=0&&pr<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!tt.localize)throw new RangeError("locale must contain localize property");if(!tt.formatLong)throw new RangeError("locale must contain formatLong property");var jt=et(e);if(!bf(jt))throw new RangeError("Invalid time value");var me=Sf(jt),at=kf(jt,me),mt={firstWeekContainsDate:je,weekStartsOn:pr,locale:tt,_originalDate:jt},Rt=$e.match(Zx).map(function(Oe){var Qe=Oe[0];if(Qe==="p"||Qe==="P"){var Wt=Nh[Qe];return Wt(Oe,tt.formatLong)}return Oe}).join("").match(Kx).map(function(Oe){if(Oe==="''")return"'";var Qe=Oe[0];if(Qe==="'")return tv(Oe);var Wt=Oh[Qe];if(Wt)return!(a!=null&&a.useAdditionalWeekYearTokens)&&Rh(Oe)&&If(Oe,r,String(e)),!(a!=null&&a.useAdditionalDayOfYearTokens)&&Lh(Oe)&&If(Oe,r,String(e)),Wt(at,Oe,tt.localize,mt);if(Qe.match(ev))throw new RangeError("Format string contains an unescaped latin alphabet character \`"+Qe+"\`");return Oe}).join("");return Rt}function tv(e){var r=e.match(Xx);return r?r[1].replace(Jx,"'"):e}var Of=(e,r)=>{if(e instanceof Date)return"date";if(typeof e=="string"){if(/\\/\\/(\\S+?(?:jpe?g|png|gif|svg))/gi.test(e)||e.includes("unsplash"))return"image";if(/^\\d{4}-\\d{2}-\\d{2}$/.test(e))return"date";if(r=="tag"||r=="tags")return"tag";if(/\\[\\[.*?\\]\\]/.test(e))return"link"}else{if(typeof e=="number")return"number";if(typeof e=="boolean")return"boolean";if(e)if(Array.isArray(e)||typeof e=="string"&&e.indexOf(",")>-1){let a=Array.isArray(e)?e:[];if(typeof e=="string"&&e.indexOf(",")>-1&&(a=sr(e)),r=="tag"||r=="tags")return"tag-multi";if(a.length==1&&Array.isArray(a[0])&&a[0].length==1&&typeof a[0][0]=="string")return"link";let u=sn(a.map(l=>Of(l,r)));return u.length==1&&u[0]=="link"?"link-multi":u.some(l=>l=="object")?"object-multi":"option-multi"}else{if(e.isLuxonDateTime)return"date";if(e.isLuxonDuration)return"duration";if(e.type=="file")return"link";if(typeof e=="object"&&!Array.isArray(e)&&e!==null)return"object"}else return"unknown"}return"text"};var Gh=e=>e.map(r=>r.replace(",","\\\\,")).join(", "),ci=e=>e.map(r=>r.replace(",","\\\\,")).join(", ");var sr=e=>(e?.replace("\\\\,",",").match(/(\\\\.|[^,])+/g)??[]).map(r=>r.trim()),Af=(e,r)=>{switch(Of(r,e)){case"object":return JSON.stringify(r);case"number":return r.toString();case"boolean":return r?"true":"false";case"date":{if(r instanceof Date){let u=fi(new Date(r),"yyyy-MM-dd");if(typeof u=="string")return u}return typeof r!="string"?"":r}break;case"duration":return Gh(Object.keys(r.values).reduce((u,l)=>[...u,...r.values[l]>0?[r.values[l]+" "+l]:[]],[]));case"option-multi":case"link-multi":return typeof r=="string"?is(r):ci(r.map(u=>u?typeof u=="string"?is(u):u.path?u.path:Array.isArray(r)&&u.length==1&&Array.isArray(u[0])&&u[0].length==1&&typeof u[0][0]=="string"?u[0][0]:JSON.stringify(u):""));case"link":return Array.isArray(r)&&r.length==1&&Array.isArray(r[0])&&r[0].length==1&&typeof r[0][0]=="string"?r[0][0]:typeof r=="string"?is(r):r.path;case"text":case"tag":case"image":return r}return""};var is=e=>{if(!e)return"";let r=/\\[\\[(.*?)\\]\\]/g.exec(e),a=r?.length>1?r[1].substring(0,Eh("|",r[1])):e;return a||e};var No=(e,r)=>e==r,Ff=(e,r)=>(e??"").length==0,Nf=(e,r)=>(e??"").toLowerCase().includes((r??"").toLowerCase()),Lf=(e,r)=>parseFloat(e)>parseFloat(r),Rf=(e,r)=>parseInt(e)>parseInt(r),zh=(e,r)=>{let a=isNaN(Date.parse(e))?new Date(parseInt(e)):new Date(e),u=isNaN(Date.parse(r))?new Date(parseInt(r)):new Date(r);return a.valueOf()>u.valueOf()},$h=(e,r)=>{let a=isNaN(Date.parse(e))?new Date(parseInt(e)):new Date(e),u=isNaN(Date.parse(r))?new Date(parseInt(r)):new Date(r);return a.valueOf(){let a=e?sr(e):[];return(r?sr(r):[]).some(l=>a.some(p=>p==l))},jh=(e,r)=>{if(!e)return!1;let a=new Date(\`\${e.toString().replace(".",":")}\`),u=new Date(\`\${r}\`);return a.getMonth()===u.getMonth()&&a.getDate()===u.getDate()},Qh=e=>{if(!e)return!1;let r=new Date(\`\${e.toString()}T00:00\`),a=new Date;return r.getMonth()===a.getMonth()&&r.getDate()===a.getDate()};var as={isNotEmpty:{type:["text","file","link","link-multi","fileprop","image"],fn:(e,r)=>!Ff(e,""),valueType:"none"},isEmpty:{type:["text","file","link","link-multi","fileprop","image"],fn:(e,r)=>Ff(e,""),valueType:"none"},include:{fn:(e,r)=>Nf(e,r),type:["text","file","link","link-multi","fileprop","image"],valueType:"text"},notInclude:{type:["text","file","link","link-multi","fileprop","image"],fn:(e,r)=>!Nf(e,r),valueType:"text"},is:{type:["text","file","link","context","fileprop"],fn:(e,r)=>No(e,r),valueType:"text"},isNot:{type:["text","file","link","context","fileprop"],fn:(e,r)=>!No(e,r),valueType:"text"},equal:{type:["number"],fn:(e,r)=>No(e,r),valueType:"number"},isGreatThan:{type:["number"],fn:(e,r)=>Lf(e,r),valueType:"number"},isLessThan:{type:["number"],fn:(e,r)=>Rf(e,r),valueType:"number"},isLessThanOrEqual:{type:["number"],fn:(e,r)=>!Lf(e,r),valueType:"number"},isGreatThanOrEqual:{type:["number"],fn:(e,r)=>!Rf(e,r),valueType:"number"},dateBefore:{type:["date","fileprop"],fn:(e,r)=>$h(e,r),valueType:"date"},dateAfter:{type:["date","fileprop"],fn:(e,r)=>zh(e,r),valueType:"date"},isSameDate:{type:["date"],fn:(e,r)=>jh(e,r),valueType:"date"},isSameDateAsToday:{type:["date"],fn:(e,r)=>Qh(e,r),valueType:"none"},isAnyInList:{type:["option","context","option-multi","context-multi","tags-multi","tags"],fn:(e,r)=>Wf(e,r),valueType:"list"},isNoneInList:{type:["option","context","option-multi","context-multi","tags-multi","tags"],fn:(e,r)=>!Wf(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 rv=(e,r)=>r.reduce((u,l)=>{let[p,v]=u,C=l.type=="path"?Zh(v,l):l.type=="frontmatter"?Kh(v,l):Xh(v,l),T=v.filter(A=>!C.includes(A));return[[...p,...C],T]},[[],e])[0],nv=(e,r)=>r.reduce((a,u)=>u.type=="path"?Zh(a,u):u.type=="frontmatter"?Kh(a,u):Xh(a,u),e),Kh=(e,r)=>e.filter(a=>{let u=a.metadata?.property;if(!u||!u[r.field])return!1;let l=as[r.fn],p=!0;return l&&(p=l.fn(Af(r.field,u[r.field]),r.value)),p}),Zh=(e,r)=>e.filter(a=>{let u="";r.field=="outlinks"?u=ci(a.outlinks??[]):r.field=="inlinks"?u=ci(a.inlinks??[]):r.field=="tags"&&(u=ci(a.tags??[]));let l=as[r.fn],p=!0;return l&&(p=l.fn(u,r.value)),p}),Xh=(e,r)=>e.filter(a=>{let u=as[r.fn],l=!0;return u&&(l=u.fn(a.metadata?.[r.type]?.[r.field],r.value)),l}),Yf=(e,r)=>e.reduce((u,l)=>!u||l.filters.length==0?!1:l.type=="any"?rv([r],l.filters).length>0:nv([r],l.filters).length>0,!0);var ep=yf(Jh()),Vf=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",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)",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"},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",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 Smart Search",addItem:"Add Item",addProperty:"Add 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",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:"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:"Smart Search",filesAndFolders:"Files and Folders"},labels:{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",renameSectionSmart:"Edit Smart Space",renameSection:"Edit Space",createSectionSmart:"New Smart 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",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",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."},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"},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=ep.default.locale();["en"].includes(r)&&(this.lang=r)}get texts(){return this.all.en}},fe=new Vf().texts;var WS=[{type:"unknown",label:"",restricted:!0,icon:"ui//file-question"},{type:"text",label:fe.properties.text.label,metadata:!0,icon:"ui//text",description:fe.properties.text.description},{type:"number",label:fe.properties.number.label,metadata:!0,icon:"ui//binary",configKeys:["unit"],description:fe.properties.number.description},{type:"boolean",label:fe.properties.boolean.label,metadata:!0,icon:"ui//check-square",description:fe.properties.boolean.description},{type:"date",label:fe.properties.date.label,metadata:!0,icon:"ui//calendar",configKeys:["format"],description:fe.properties.date.description},{type:"option",label:fe.properties.option.label,multi:!0,multiType:"option-multi",icon:"ui//list",configKeys:["options"],description:fe.properties.option.description},{type:"tags",label:fe.properties.tags.label,icon:"ui//tags",description:fe.properties.tags.description},{type:"file",label:fe.properties.file.label,restricted:!0,icon:"ui//mk-make-h3"},{type:"fileprop",label:fe.properties.fileProperty.label,icon:"ui//formula",configKeys:["field","value"],description:fe.properties.fileProperty.description},{type:"link",label:fe.properties.link.label,multi:!0,multiType:"link-multi",metadata:!0,icon:"ui//file-text",description:fe.properties.link.description},{type:"context",label:fe.properties.context.label,icon:"ui//mk-make-note",multi:!0,multiType:"context-multi",configKeys:["space"],description:fe.properties.context.description},{type:"object",label:fe.properties.object.label,multi:!0,multiType:"object-multi",metadata:!0,icon:"ui//list-tree",configKeys:["type"],description:fe.properties.object.description},{type:"icon",label:fe.properties.icon.label,multi:!0,multiType:"icon-multi",icon:"ui//gem",description:fe.properties.icon.description},{type:"image",label:fe.properties.image.label,multi:!0,multiType:"image-multi",metadata:!0,icon:"ui//mk-make-image",description:fe.properties.image.description},{type:"color",label:fe.properties.color.label,icon:"ui//mk-make-image",description:fe.properties.color.description},{type:"space",label:fe.properties.space.label,icon:"ui//layout-grid",restricted:!0,description:fe.properties.space.description},{type:"table",label:fe.properties.space.label,icon:"ui//layout-grid",restricted:!0,description:fe.properties.space.description},{type:"super",label:fe.properties.super.label,icon:"ui//zap",restricted:!0,configKeys:["dynamic","field"]},{type:"input",label:fe.properties.super.label,icon:"ui//input",restricted:!0}];var hi="files",Wo={id:hi,name:"Files",type:"db",primary:"true"},iv="filesView",av={id:iv,name:"All",type:"view",def:JSON.stringify({db:hi,icon:"ui//file-stack"})},sv="main",ov=e=>({id:e,name:e,type:"frame",def:"",predicate:"",primary:"true"}),YS={uniques:[],cols:["id","name","type","def","predicate","primary"],rows:[ov(sv),av]},Lo={uniques:[],cols:["id","name","type","def","predicate","primary"],rows:[Wo]},tp={uniques:["name,schemaId"],cols:["name","schemaId","type","value","attrs","hidden","unique","primary"]},Ro={...tp,rows:[{name:on,schemaId:hi,type:"file",primary:"true",hidden:"",unique:"",attrs:"",value:""},{name:fe.properties.fileProperty.createdTime,schemaId:hi,type:"fileprop",value:on+".ctime",hidden:"",unique:"",attrs:"",primary:"true"}]};var BS=[{name:fe.properties.defaultField,schemaId:"",type:"text",primary:"true"}],Uf={...tp,rows:[{name:on,schemaId:hi,type:"file",primary:"true",hidden:"",unique:"",attrs:"",value:""}]};var VS={schema:Wo,cols:Ro.rows,rows:[]},US={schema:Wo,cols:Ro.rows,rows:[]},HS={schema:Wo,cols:Uf.rows,rows:[]},rp=(e,r)=>e.filter(a=>r.find(u=>u.id==a.schemaId&&u.type=="db")).reduce((a,u)=>({...a,...a[u.schemaId]?{[u.schemaId]:{uniques:u.unique=="true"?[...a[u.schemaId].uniques,u.name]:a[u.schemaId].uniques,cols:[...a[u.schemaId].cols,u.name],rows:[]}}:{[u.schemaId]:{uniques:u.unique=="true"?[u.name]:[],cols:[u.name],rows:[]}}}),{});var qS={m_schema:Lo,m_fields:Ro,...rp(Ro.rows,Lo.rows)},GS={m_schema:Lo,m_fields:Uf,...rp(Uf.rows,Lo.rows)};var np=(e,r)=>e.hiddenExtensions.some(a=>r.endsWith(a))||r.startsWith(e.spacesFolder+"/#")||e.hiddenFiles.some(a=>a==r);var ip=(e,r,a)=>{if(!e)return{changed:!1,cache:null};if(!r)return{changed:!1,cache:{path:e.path,frames:{},schemas:[]}};let u=Object.values(r).map(C=>C.schema),l=u.filter(C=>C.type=="frame").reduce((C,T)=>({...C,[T.id]:r[T.id]}),{}),p={path:e.path,frames:l,schemas:u},v=!0;return a&&Yo.default.isEqual(p,a)&&(v=!1),{changed:v,cache:p}},ap=(e,r,a,u,l)=>{let p={};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:p,dbExists:!1}};let v=Object.values(r).map(de=>de.schema),C=v.find(de=>de.primary=="true"),T=r[C.id],A=r,R=T.cols?.filter(de=>de.type.startsWith("context"))??[],V=T.cols?.filter(de=>de.type.startsWith("link"))??[],K=sn(R.map(de=>de.value));R.forEach(de=>{p[de.name]={},T.rows.forEach(We=>{sr(We[de.name]).forEach(ze=>p[de.name][ze]=[...p[de.name][ze]??[],We[on]])})});let re=A[hi]?.rows?.map(de=>de[on])??[],N=Th(a??[],re),_e=sn(T.rows.reduce((de,We)=>sn([...de,...[...R,...V].flatMap(ze=>sr(We[ze.name]).map($e=>is($e)))]),[])),Le={cols:T.cols,path:e.path,contexts:K,outlinks:_e,paths:N,tables:A,schemas:v,space:e,spaceMap:p,dbExists:l},ye=!0;return u&&Yo.default.isEqual(Le,u)&&(ye=!0),{changed:ye,cache:Le}},sp=(e,r,a,u)=>{let l={};for(let[p,v]of e){let C=a.get(p)?.defPath??p,T=e.get(C)??v,A=v?.parent??"",R=v?.type??"",V=v?.subtype??"",K=T?.label,re=u?.get(p),{changed:N,cache:_e}=Hf(p,r,a,T,K,R,V,A,re);l[p]={changed:N,cache:_e}}return l},Hf=(e,r,a,u,l,p,v,C,T)=>{let A=(me,at,mt)=>me?.length>0||me?.length>0?me:at=="space"?mt=="Spaces/Home"?"ui//home":mt=="/"?"ui//vault":mt.startsWith("spaces://#")?"ui//tags":"ui//folder":"ui//file",R={label:u?.label,path:e,name:Ao(e),displayName:Ao(e)},V=[],K=u?.tags?.map(me=>me)??[],re=np(r,e),N=(me,at,mt=new Set)=>{let Rt=[];for(let Oe of at){let Qe=me.get(Oe)?.contexts??[];for(let Wt of Qe)mt.has(Wt)||(Rt.push(Wt),mt.add(Wt),Rt.push(...N(me,[Fo(Wt)],mt)))}return Rt};if(a.has(C))for(let me of a.get(C).contexts??[])V.push(me);V.push(...K);let _e=l?.name,Le=u?.properties?vf(u.properties[r.fmKeyAlias]):[],ye=A(l?.sticker,p,e),de=l?.color??"",We=u?.inlinks??[],ze=u?.links??[],$e=r.spacesUseAlias?Le[0]??_e:_e,Pe={...R,name:_e,tags:sn(V),type:p,subtype:v,displayName:$e,parent:C,label:{name:_e,sticker:ye,color:de,thumbnail:l?.thumbnail??"",preview:l?.preview??""},metadata:{...u},inlinks:We,outlinks:ze},tt=[];for(let me of V)tt.push(Fo(me));for(let[me,at]of a){if(at.defPath==e&&(re=!0),at.space&&at.space.path==C){tt.push(me);continue}if(at.metadata?.filters?.length>0&&Yf(at.metadata.filters,Pe)){tt.push(me);continue}if(at.metadata?.links?.length>0&&(at.metadata?.links??[]).find(Rt=>Rt==Pe.path)){tt.push(me);continue}}let je=N(a,tt);tt.push(...je.map(me=>Fo(me))),Pe.tags.push(...je);let pr=re?{...Pe,spaces:[],hidden:re}:{...Pe,spaces:sn(tt),hidden:re},jt=!0;return T&&Yo.default.isEqual(pr,T)&&(jt=!1),{changed:jt,cache:pr}};var uv=(e,r,a)=>{if(e.length!==1)return"";let u=e.map(function(v){return v.compile().evaluate(a)}),l=a.get(u[0]),p=a.get("$properties")?.[u[0]]?.type;return(p=="file"||p=="link"||p=="context")&&(p.includes("multi")?l=sr(l).map(v=>a.get("$paths").get(v)??v):l=a.get("$paths").get(l)??l),l??""};uv.rawArgs=!0;var lv=(e,r,a)=>{if((e.length-1)%2!==0)return"";for(let u=0;u{if(e.length<1||e.length>2)return"";let u=e[0].compile().evaluate(a);u instanceof Date||(u=new Date(u));let l=e[1]?.compile().evaluate(a);return l?.length>0?fi(u,l):fi(u,a.get("$settings")?.dateFormat??"yyyy-MM-dd")};fv.rawArgs=!0;var hv=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239],hp=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],pv="\\u200C\\u200D\\xB7\\u0300-\\u036F\\u0387\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u0669\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u06F0-\\u06F9\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07C0-\\u07C9\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u0898-\\u089F\\u08CA-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096F\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09E6-\\u09EF\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A66-\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AE6-\\u0AEF\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B55-\\u0B57\\u0B62\\u0B63\\u0B66-\\u0B6F\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C04\\u0C3C\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0CE6-\\u0CEF\\u0CF3\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D66-\\u0D6F\\u0D81-\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0E50-\\u0E59\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECE\\u0ED0-\\u0ED9\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1040-\\u1049\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F-\\u109D\\u135D-\\u135F\\u1369-\\u1371\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u180F-\\u1819\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u194F\\u19D0-\\u19DA\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AB0-\\u1ABD\\u1ABF-\\u1ACE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BB0-\\u1BB9\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1C40-\\u1C49\\u1C50-\\u1C59\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DFF\\u200C\\u200D\\u203F\\u2040\\u2054\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\u30FB\\uA620-\\uA629\\uA66F\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA82C\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8D0-\\uA8D9\\uA8E0-\\uA8F1\\uA8FF-\\uA909\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9D0-\\uA9D9\\uA9E5\\uA9F0-\\uA9F9\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA50-\\uAA59\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF10-\\uFF19\\uFF3F\\uFF65",pp="\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u0870-\\u0887\\u0889-\\u088E\\u08A0-\\u08C9\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C5D\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D04-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u1711\\u171F-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4C\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309B-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7CA\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7D9\\uA7F2-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC",qf={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Gf="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",dv={5:Gf,"5module":Gf+" export import",6:Gf+" const class extends export import super"},mv=/^in(stanceof)?$/,gv=new RegExp("["+pp+"]"),yv=new RegExp("["+pp+pv+"]");function $f(e,r){for(var a=65536,u=0;ue)return!1;if(a+=r[u+1],a>=e)return!0}return!1}function ln(e,r){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&gv.test(String.fromCharCode(e)):r===!1?!1:$f(e,hp)}function aa(e,r){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&yv.test(String.fromCharCode(e)):r===!1?!1:$f(e,hp)||$f(e,hv)}var we=function(r,a){a===void 0&&(a={}),this.label=r,this.keyword=a.keyword,this.beforeExpr=!!a.beforeExpr,this.startsExpr=!!a.startsExpr,this.isLoop=!!a.isLoop,this.isAssign=!!a.isAssign,this.prefix=!!a.prefix,this.postfix=!!a.postfix,this.binop=a.binop||null,this.updateContext=null};function or(e,r){return new we(e,{beforeExpr:!0,binop:r})}var ur={beforeExpr:!0},Lt={startsExpr:!0},Kf={};function pe(e,r){return r===void 0&&(r={}),r.keyword=e,Kf[e]=new we(e,r)}var y={num:new we("num",Lt),regexp:new we("regexp",Lt),string:new we("string",Lt),name:new we("name",Lt),privateId:new we("privateId",Lt),eof:new we("eof"),bracketL:new we("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new we("]"),braceL:new we("{",{beforeExpr:!0,startsExpr:!0}),braceR:new we("}"),parenL:new we("(",{beforeExpr:!0,startsExpr:!0}),parenR:new we(")"),comma:new we(",",ur),semi:new we(";",ur),colon:new we(":",ur),dot:new we("."),question:new we("?",ur),questionDot:new we("?."),arrow:new we("=>",ur),template:new we("template"),invalidTemplate:new we("invalidTemplate"),ellipsis:new we("...",ur),backQuote:new we("\`",Lt),dollarBraceL:new we("\${",{beforeExpr:!0,startsExpr:!0}),eq:new we("=",{beforeExpr:!0,isAssign:!0}),assign:new we("_=",{beforeExpr:!0,isAssign:!0}),incDec:new we("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new we("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:or("||",1),logicalAND:or("&&",2),bitwiseOR:or("|",3),bitwiseXOR:or("^",4),bitwiseAND:or("&",5),equality:or("==/!=/===/!==",6),relational:or("/<=/>=",7),bitShift:or("<>/>>>",8),plusMin:new we("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:or("%",10),star:or("*",10),slash:or("/",10),starstar:new we("**",{beforeExpr:!0}),coalesce:or("??",1),_break:pe("break"),_case:pe("case",ur),_catch:pe("catch"),_continue:pe("continue"),_debugger:pe("debugger"),_default:pe("default",ur),_do:pe("do",{isLoop:!0,beforeExpr:!0}),_else:pe("else",ur),_finally:pe("finally"),_for:pe("for",{isLoop:!0}),_function:pe("function",Lt),_if:pe("if"),_return:pe("return",ur),_switch:pe("switch"),_throw:pe("throw",ur),_try:pe("try"),_var:pe("var"),_const:pe("const"),_while:pe("while",{isLoop:!0}),_with:pe("with"),_new:pe("new",{beforeExpr:!0,startsExpr:!0}),_this:pe("this",Lt),_super:pe("super",Lt),_class:pe("class",Lt),_extends:pe("extends",ur),_export:pe("export"),_import:pe("import",Lt),_null:pe("null",Lt),_true:pe("true",Lt),_false:pe("false",Lt),_in:pe("in",{beforeExpr:!0,binop:7}),_instanceof:pe("instanceof",{beforeExpr:!0,binop:7}),_typeof:pe("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:pe("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:pe("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},cr=/\\r\\n?|\\n|\\u2028|\\u2029/,xv=new RegExp(cr.source,"g");function sa(e){return e===10||e===13||e===8232||e===8233}function dp(e,r,a){a===void 0&&(a=e.length);for(var u=r;u>10)+55296,(e&1023)+56320))}var Sv=/(?:[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])/,os=function(r,a){this.line=r,this.column=a};os.prototype.offset=function(r){return new os(this.line,this.column+r)};var qo=function(r,a,u){this.start=a,this.end=u,r.sourceFile!==null&&(this.source=r.sourceFile)};function yp(e,r){for(var a=1,u=0;;){var l=dp(e,u,r);if(l<0)return new os(a,r-u);++a,u=l}}var jf={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},lp=!1;function _v(e){var r={};for(var a in jf)r[a]=e&&ls(e,a)?e[a]:jf[a];if(r.ecmaVersion==="latest"?r.ecmaVersion=1e8:r.ecmaVersion==null?(!lp&&typeof console=="object"&&console.warn&&(lp=!0,console.warn(\`Since Acorn 8.0.0, options.ecmaVersion is required. -Defaulting to 2020, but this will stop working in the future.\`)),r.ecmaVersion=11):r.ecmaVersion>=2015&&(r.ecmaVersion-=2009),r.allowReserved==null&&(r.allowReserved=r.ecmaVersion<5),(!e||e.allowHashBang==null)&&(r.allowHashBang=r.ecmaVersion>=14),op(r.onToken)){var u=r.onToken;r.onToken=function(l){return u.push(l)}}return op(r.onComment)&&(r.onComment=bv(r,r.onComment)),r}function bv(e,r){return function(a,u,l,p,v,C){var T={type:a?"Block":"Line",value:u,start:l,end:p};e.locations&&(T.loc=new qo(this,v,C)),e.ranges&&(T.range=[l,p]),r.push(T)}}var us=1,oa=2,Zf=4,xp=8,vp=16,wp=32,Xf=64,Sp=128,fs=256,Jf=us|oa|fs;function ec(e,r){return oa|(e?Zf:0)|(r?xp:0)}var Vo=0,tc=1,cn=2,_p=3,bp=4,kp=5,ft=function(r,a,u){this.options=r=_v(r),this.sourceFile=r.sourceFile,this.keywords=Ln(dv[r.ecmaVersion>=6?6:r.sourceType==="module"?"5module":5]);var l="";r.allowReserved!==!0&&(l=qf[r.ecmaVersion>=6?6:r.ecmaVersion===5?5:3],r.sourceType==="module"&&(l+=" await")),this.reservedWords=Ln(l);var p=(l?l+" ":"")+qf.strict;this.reservedWordsStrict=Ln(p),this.reservedWordsStrictBind=Ln(p+" "+qf.strictBind),this.input=String(a),this.containsEsc=!1,u?(this.pos=u,this.lineStart=this.input.lastIndexOf(\` -\`,u-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(cr).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=y.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=r.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&r.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(us),this.regexpState=null,this.privateNameStack=[]},Ur={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};ft.prototype.parse=function(){var r=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(r)};Ur.inFunction.get=function(){return(this.currentVarScope().flags&oa)>0};Ur.inGenerator.get=function(){return(this.currentVarScope().flags&xp)>0&&!this.currentVarScope().inClassFieldInit};Ur.inAsync.get=function(){return(this.currentVarScope().flags&Zf)>0&&!this.currentVarScope().inClassFieldInit};Ur.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var r=this.scopeStack[e];if(r.inClassFieldInit||r.flags&fs)return!1;if(r.flags&oa)return(r.flags&Zf)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};Ur.allowSuper.get=function(){var e=this.currentThisScope(),r=e.flags,a=e.inClassFieldInit;return(r&Xf)>0||a||this.options.allowSuperOutsideMethod};Ur.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Sp)>0};Ur.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};Ur.allowNewDotTarget.get=function(){var e=this.currentThisScope(),r=e.flags,a=e.inClassFieldInit;return(r&(oa|fs))>0||a};Ur.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&fs)>0};ft.extend=function(){for(var r=[],a=arguments.length;a--;)r[a]=arguments[a];for(var u=this,l=0;l=,?^&]/.test(l)||l==="!"&&this.input.charAt(u+1)==="=")}e+=r[0].length,lr.lastIndex=e,e+=lr.exec(this.input)[0].length,this.input[e]===";"&&e++}};Ct.eat=function(e){return this.type===e?(this.next(),!0):!1};Ct.isContextual=function(e){return this.type===y.name&&this.value===e&&!this.containsEsc};Ct.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};Ct.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};Ct.canInsertSemicolon=function(){return this.type===y.eof||this.type===y.braceR||cr.test(this.input.slice(this.lastTokEnd,this.start))};Ct.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};Ct.semicolon=function(){!this.eat(y.semi)&&!this.insertSemicolon()&&this.unexpected()};Ct.afterTrailingComma=function(e,r){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),r||this.next(),!0};Ct.expect=function(e){this.eat(e)||this.unexpected()};Ct.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var Go=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Ct.checkPatternErrors=function(e,r){if(!!e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var a=r?e.parenthesizedAssign:e.parenthesizedBind;a>-1&&this.raiseRecoverable(a,r?"Assigning to rvalue":"Parenthesized pattern")}};Ct.checkExpressionErrors=function(e,r){if(!e)return!1;var a=e.shorthandAssign,u=e.doubleProto;if(!r)return a>=0||u>=0;a>=0&&this.raise(a,"Shorthand property assignments are valid only in destructuring patterns"),u>=0&&this.raiseRecoverable(u,"Redefinition of __proto__ property")};Ct.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&u<56320)return!0;if(ln(u,!0)){for(var l=a+1;aa(u=this.input.charCodeAt(l),!0);)++l;if(u===92||u>55295&&u<56320)return!0;var p=this.input.slice(a,l);if(!mv.test(p))return!0}return!1};z.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;lr.lastIndex=this.pos;var e=lr.exec(this.input),r=this.pos+e[0].length,a;return!cr.test(this.input.slice(this.pos,r))&&this.input.slice(r,r+8)==="function"&&(r+8===this.input.length||!(aa(a=this.input.charCodeAt(r+8))||a>55295&&a<56320))};z.parseStatement=function(e,r,a){var u=this.type,l=this.startNode(),p;switch(this.isLet(e)&&(u=y._var,p="let"),u){case y._break:case y._continue:return this.parseBreakContinueStatement(l,u.keyword);case y._debugger:return this.parseDebuggerStatement(l);case y._do:return this.parseDoStatement(l);case y._for:return this.parseForStatement(l);case y._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(l,!1,!e);case y._class:return e&&this.unexpected(),this.parseClass(l,!0);case y._if:return this.parseIfStatement(l);case y._return:return this.parseReturnStatement(l);case y._switch:return this.parseSwitchStatement(l);case y._throw:return this.parseThrowStatement(l);case y._try:return this.parseTryStatement(l);case y._const:case y._var:return p=p||this.value,e&&p!=="var"&&this.unexpected(),this.parseVarStatement(l,p);case y._while:return this.parseWhileStatement(l);case y._with:return this.parseWithStatement(l);case y.braceL:return this.parseBlock(!0,l);case y.semi:return this.parseEmptyStatement(l);case y._export:case y._import:if(this.options.ecmaVersion>10&&u===y._import){lr.lastIndex=this.pos;var v=lr.exec(this.input),C=this.pos+v[0].length,T=this.input.charCodeAt(C);if(T===40||T===46)return this.parseExpressionStatement(l,this.parseExpression())}return this.options.allowImportExportEverywhere||(r||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),u===y._import?this.parseImport(l):this.parseExport(l,a);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(l,!0,!e);var A=this.value,R=this.parseExpression();return u===y.name&&R.type==="Identifier"&&this.eat(y.colon)?this.parseLabeledStatement(l,A,R,e):this.parseExpressionStatement(l,R)}};z.parseBreakContinueStatement=function(e,r){var a=r==="break";this.next(),this.eat(y.semi)||this.insertSemicolon()?e.label=null:this.type!==y.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var u=0;u=6?this.eat(y.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};z.parseForStatement=function(e){this.next();var r=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(rc),this.enterScope(0),this.expect(y.parenL),this.type===y.semi)return r>-1&&this.unexpected(r),this.parseFor(e,null);var a=this.isLet();if(this.type===y._var||this.type===y._const||a){var u=this.startNode(),l=a?"let":this.value;return this.next(),this.parseVar(u,!0,l),this.finishNode(u,"VariableDeclaration"),(this.type===y._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&u.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===y._in?r>-1&&this.unexpected(r):e.await=r>-1),this.parseForIn(e,u)):(r>-1&&this.unexpected(r),this.parseFor(e,u))}var p=this.isContextual("let"),v=!1,C=new Go,T=this.parseExpression(r>-1?"await":!0,C);return this.type===y._in||(v=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===y._in?r>-1&&this.unexpected(r):e.await=r>-1),p&&v&&this.raise(T.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(T,!1,C),this.checkLValPattern(T),this.parseForIn(e,T)):(this.checkExpressionErrors(C,!0),r>-1&&this.unexpected(r),this.parseFor(e,T))};z.parseFunctionStatement=function(e,r,a){return this.next(),this.parseFunction(e,ss|(a?0:Qf),!1,r)};z.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(y._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};z.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(y.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};z.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(y.braceL),this.labels.push(Cv),this.enterScope(0);for(var r,a=!1;this.type!==y.braceR;)if(this.type===y._case||this.type===y._default){var u=this.type===y._case;r&&this.finishNode(r,"SwitchCase"),e.cases.push(r=this.startNode()),r.consequent=[],this.next(),u?r.test=this.parseExpression():(a&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),a=!0,r.test=null),this.expect(y.colon)}else r||this.unexpected(),r.consequent.push(this.parseStatement(null));return this.exitScope(),r&&this.finishNode(r,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};z.parseThrowStatement=function(e){return this.next(),cr.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var Tv=[];z.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),r=e.type==="Identifier";return this.enterScope(r?wp:0),this.checkLValPattern(e,r?bp:cn),this.expect(y.parenR),e};z.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===y._catch){var r=this.startNode();this.next(),this.eat(y.parenL)?r.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),r.param=null,this.enterScope(0)),r.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(r,"CatchClause")}return e.finalizer=this.eat(y._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};z.parseVarStatement=function(e,r,a){return this.next(),this.parseVar(e,!1,r,a),this.semicolon(),this.finishNode(e,"VariableDeclaration")};z.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(rc),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};z.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};z.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};z.parseLabeledStatement=function(e,r,a,u){for(var l=0,p=this.labels;l=0;T--){var A=this.labels[T];if(A.statementStart===e.start)A.statementStart=this.start,A.kind=C;else break}return this.labels.push({name:r,kind:C,statementStart:this.start}),e.body=this.parseStatement(u?u.indexOf("label")===-1?u+"label":u:"label"),this.labels.pop(),e.label=a,this.finishNode(e,"LabeledStatement")};z.parseExpressionStatement=function(e,r){return e.expression=r,this.semicolon(),this.finishNode(e,"ExpressionStatement")};z.parseBlock=function(e,r,a){for(e===void 0&&(e=!0),r===void 0&&(r=this.startNode()),r.body=[],this.expect(y.braceL),e&&this.enterScope(0);this.type!==y.braceR;){var u=this.parseStatement(null);r.body.push(u)}return a&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(r,"BlockStatement")};z.parseFor=function(e,r){return e.init=r,this.expect(y.semi),e.test=this.type===y.semi?null:this.parseExpression(),this.expect(y.semi),e.update=this.type===y.parenR?null:this.parseExpression(),this.expect(y.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};z.parseForIn=function(e,r){var a=this.type===y._in;return this.next(),r.type==="VariableDeclaration"&&r.declarations[0].init!=null&&(!a||this.options.ecmaVersion<8||this.strict||r.kind!=="var"||r.declarations[0].id.type!=="Identifier")&&this.raise(r.start,(a?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=r,e.right=a?this.parseExpression():this.parseMaybeAssign(),this.expect(y.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,a?"ForInStatement":"ForOfStatement")};z.parseVar=function(e,r,a,u){for(e.declarations=[],e.kind=a;;){var l=this.startNode();if(this.parseVarId(l,a),this.eat(y.eq)?l.init=this.parseMaybeAssign(r):!u&&a==="const"&&!(this.type===y._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!u&&l.id.type!=="Identifier"&&!(r&&(this.type===y._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):l.init=null,e.declarations.push(this.finishNode(l,"VariableDeclarator")),!this.eat(y.comma))break}return e};z.parseVarId=function(e,r){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,r==="var"?tc:cn,!1)};var ss=1,Qf=2,Cp=4;z.parseFunction=function(e,r,a,u,l){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!u)&&(this.type===y.star&&r&Qf&&this.unexpected(),e.generator=this.eat(y.star)),this.options.ecmaVersion>=8&&(e.async=!!u),r&ss&&(e.id=r&Cp&&this.type!==y.name?null:this.parseIdent(),e.id&&!(r&Qf)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?tc:cn:_p));var p=this.yieldPos,v=this.awaitPos,C=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ec(e.async,e.generator)),r&ss||(e.id=this.type===y.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,a,!1,l),this.yieldPos=p,this.awaitPos=v,this.awaitIdentPos=C,this.finishNode(e,r&ss?"FunctionDeclaration":"FunctionExpression")};z.parseFunctionParams=function(e){this.expect(y.parenL),e.params=this.parseBindingList(y.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};z.parseClass=function(e,r){this.next();var a=this.strict;this.strict=!0,this.parseClassId(e,r),this.parseClassSuper(e);var u=this.enterClassBody(),l=this.startNode(),p=!1;for(l.body=[],this.expect(y.braceL);this.type!==y.braceR;){var v=this.parseClassElement(e.superClass!==null);v&&(l.body.push(v),v.type==="MethodDefinition"&&v.kind==="constructor"?(p&&this.raiseRecoverable(v.start,"Duplicate constructor in the same class"),p=!0):v.key&&v.key.type==="PrivateIdentifier"&&Pv(u,v)&&this.raiseRecoverable(v.key.start,"Identifier '#"+v.key.name+"' has already been declared"))}return this.strict=a,this.next(),e.body=this.finishNode(l,"ClassBody"),this.exitClassBody(),this.finishNode(e,r?"ClassDeclaration":"ClassExpression")};z.parseClassElement=function(e){if(this.eat(y.semi))return null;var r=this.options.ecmaVersion,a=this.startNode(),u="",l=!1,p=!1,v="method",C=!1;if(this.eatContextual("static")){if(r>=13&&this.eat(y.braceL))return this.parseClassStaticBlock(a),a;this.isClassElementNameStart()||this.type===y.star?C=!0:u="static"}if(a.static=C,!u&&r>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===y.star)&&!this.canInsertSemicolon()?p=!0:u="async"),!u&&(r>=9||!p)&&this.eat(y.star)&&(l=!0),!u&&!p&&!l){var T=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?v=T:u=T)}if(u?(a.computed=!1,a.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),a.key.name=u,this.finishNode(a.key,"Identifier")):this.parseClassElementName(a),r<13||this.type===y.parenL||v!=="method"||l||p){var A=!a.static&&Uo(a,"constructor"),R=A&&e;A&&v!=="method"&&this.raise(a.key.start,"Constructor can't have get/set modifier"),a.kind=A?"constructor":v,this.parseClassMethod(a,l,p,R)}else this.parseClassField(a);return a};z.isClassElementNameStart=function(){return this.type===y.name||this.type===y.privateId||this.type===y.num||this.type===y.string||this.type===y.bracketL||this.type.keyword};z.parseClassElementName=function(e){this.type===y.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};z.parseClassMethod=function(e,r,a,u){var l=e.key;e.kind==="constructor"?(r&&this.raise(l.start,"Constructor can't be a generator"),a&&this.raise(l.start,"Constructor can't be an async method")):e.static&&Uo(e,"prototype")&&this.raise(l.start,"Classes may not have a static property named prototype");var p=e.value=this.parseMethod(r,a,u);return e.kind==="get"&&p.params.length!==0&&this.raiseRecoverable(p.start,"getter should have no params"),e.kind==="set"&&p.params.length!==1&&this.raiseRecoverable(p.start,"setter should have exactly one param"),e.kind==="set"&&p.params[0].type==="RestElement"&&this.raiseRecoverable(p.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};z.parseClassField=function(e){if(Uo(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&Uo(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(y.eq)){var r=this.currentThisScope(),a=r.inClassFieldInit;r.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),r.inClassFieldInit=a}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};z.parseClassStaticBlock=function(e){e.body=[];var r=this.labels;for(this.labels=[],this.enterScope(fs|Xf);this.type!==y.braceR;){var a=this.parseStatement(null);e.body.push(a)}return this.next(),this.exitScope(),this.labels=r,this.finishNode(e,"StaticBlock")};z.parseClassId=function(e,r){this.type===y.name?(e.id=this.parseIdent(),r&&this.checkLValSimple(e.id,cn,!1)):(r===!0&&this.unexpected(),e.id=null)};z.parseClassSuper=function(e){e.superClass=this.eat(y._extends)?this.parseExprSubscripts(null,!1):null};z.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};z.exitClassBody=function(){var e=this.privateNameStack.pop(),r=e.declared,a=e.used;if(!!this.options.checkPrivateFields)for(var u=this.privateNameStack.length,l=u===0?null:this.privateNameStack[u-1],p=0;p=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(r,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==y.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};z.parseExport=function(e,r){if(this.next(),this.eat(y.star))return this.parseExportAllDeclaration(e,r);if(this.eat(y._default))return this.checkExport(r,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(r,e.declaration.declarations):this.checkExport(r,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(r),this.eatContextual("from"))this.type!==y.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var a=0,u=e.specifiers;a=13&&this.type===y.string){var e=this.parseLiteral(this.value);return Sv.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};z.adaptDirectivePrologue=function(e){for(var r=0;r=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var hr=ft.prototype;hr.toAssignable=function(e,r,a){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",a&&this.checkPatternErrors(a,!0);for(var u=0,l=e.properties;u=8&&!C&&T.name==="async"&&!this.canInsertSemicolon()&&this.eat(y._function))return this.overrideContext(Ye.f_expr),this.parseFunction(this.startNodeAt(p,v),0,!1,!0,r);if(l&&!this.canInsertSemicolon()){if(this.eat(y.arrow))return this.parseArrowExpression(this.startNodeAt(p,v),[T],!1,r);if(this.options.ecmaVersion>=8&&T.name==="async"&&this.type===y.name&&!C&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return T=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(y.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(p,v),[T],!0,r)}return T;case y.regexp:var A=this.value;return u=this.parseLiteral(A.value),u.regex={pattern:A.pattern,flags:A.flags},u;case y.num:case y.string:return this.parseLiteral(this.value);case y._null:case y._true:case y._false:return u=this.startNode(),u.value=this.type===y._null?null:this.type===y._true,u.raw=this.type.keyword,this.next(),this.finishNode(u,"Literal");case y.parenL:var R=this.start,V=this.parseParenAndDistinguishExpression(l,r);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(V)&&(e.parenthesizedAssign=R),e.parenthesizedBind<0&&(e.parenthesizedBind=R)),V;case y.bracketL:return u=this.startNode(),this.next(),u.elements=this.parseExprList(y.bracketR,!0,!0,e),this.finishNode(u,"ArrayExpression");case y.braceL:return this.overrideContext(Ye.b_expr),this.parseObj(!1,e);case y._function:return u=this.startNode(),this.next(),this.parseFunction(u,0);case y._class:return this.parseClass(this.startNode(),!1);case y._new:return this.parseNew();case y.backQuote:return this.parseTemplate();case y._import:return this.options.ecmaVersion>=11?this.parseExprImport(a):this.unexpected();default:return this.parseExprAtomDefault()}};X.parseExprAtomDefault=function(){this.unexpected()};X.parseExprImport=function(e){var r=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===y.parenL&&!e)return this.parseDynamicImport(r);if(this.type===y.dot){var a=this.startNodeAt(r.start,r.loc&&r.loc.start);return a.name="import",r.meta=this.finishNode(a,"Identifier"),this.parseImportMeta(r)}else this.unexpected()};X.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(y.parenR)){var r=this.start;this.eat(y.comma)&&this.eat(y.parenR)?this.raiseRecoverable(r,"Trailing comma is not allowed in import()"):this.unexpected(r)}return this.finishNode(e,"ImportExpression")};X.parseImportMeta=function(e){this.next();var r=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),r&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};X.parseLiteral=function(e){var r=this.startNode();return r.value=e,r.raw=this.input.slice(this.start,this.end),r.raw.charCodeAt(r.raw.length-1)===110&&(r.bigint=r.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(r,"Literal")};X.parseParenExpression=function(){this.expect(y.parenL);var e=this.parseExpression();return this.expect(y.parenR),e};X.shouldParseArrow=function(e){return!this.canInsertSemicolon()};X.parseParenAndDistinguishExpression=function(e,r){var a=this.start,u=this.startLoc,l,p=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var v=this.start,C=this.startLoc,T=[],A=!0,R=!1,V=new Go,K=this.yieldPos,re=this.awaitPos,N;for(this.yieldPos=0,this.awaitPos=0;this.type!==y.parenR;)if(A?A=!1:this.expect(y.comma),p&&this.afterTrailingComma(y.parenR,!0)){R=!0;break}else if(this.type===y.ellipsis){N=this.start,T.push(this.parseParenItem(this.parseRestBinding())),this.type===y.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else T.push(this.parseMaybeAssign(!1,V,this.parseParenItem));var _e=this.lastTokEnd,Le=this.lastTokEndLoc;if(this.expect(y.parenR),e&&this.shouldParseArrow(T)&&this.eat(y.arrow))return this.checkPatternErrors(V,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=K,this.awaitPos=re,this.parseParenArrowList(a,u,T,r);(!T.length||R)&&this.unexpected(this.lastTokStart),N&&this.unexpected(N),this.checkExpressionErrors(V,!0),this.yieldPos=K||this.yieldPos,this.awaitPos=re||this.awaitPos,T.length>1?(l=this.startNodeAt(v,C),l.expressions=T,this.finishNodeAt(l,"SequenceExpression",_e,Le)):l=T[0]}else l=this.parseParenExpression();if(this.options.preserveParens){var ye=this.startNodeAt(a,u);return ye.expression=l,this.finishNode(ye,"ParenthesizedExpression")}else return l};X.parseParenItem=function(e){return e};X.parseParenArrowList=function(e,r,a,u){return this.parseArrowExpression(this.startNodeAt(e,r),a,!1,u)};var Ev=[];X.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===y.dot){var r=this.startNodeAt(e.start,e.loc&&e.loc.start);r.name="new",e.meta=this.finishNode(r,"Identifier"),this.next();var a=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),a&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var u=this.start,l=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),u,l,!0,!1),this.eat(y.parenL)?e.arguments=this.parseExprList(y.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Ev,this.finishNode(e,"NewExpression")};X.parseTemplateElement=function(e){var r=e.isTagged,a=this.startNode();return this.type===y.invalidTemplate?(r||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),a.value={raw:this.value,cooked:null}):a.value={raw:this.input.slice(this.start,this.end).replace(/\\r\\n?/g,\` -\`),cooked:this.value},this.next(),a.tail=this.type===y.backQuote,this.finishNode(a,"TemplateElement")};X.parseTemplate=function(e){e===void 0&&(e={});var r=e.isTagged;r===void 0&&(r=!1);var a=this.startNode();this.next(),a.expressions=[];var u=this.parseTemplateElement({isTagged:r});for(a.quasis=[u];!u.tail;)this.type===y.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(y.dollarBraceL),a.expressions.push(this.parseExpression()),this.expect(y.braceR),a.quasis.push(u=this.parseTemplateElement({isTagged:r}));return this.next(),this.finishNode(a,"TemplateLiteral")};X.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===y.name||this.type===y.num||this.type===y.string||this.type===y.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===y.star)&&!cr.test(this.input.slice(this.lastTokEnd,this.start))};X.parseObj=function(e,r){var a=this.startNode(),u=!0,l={};for(a.properties=[],this.next();!this.eat(y.braceR);){if(u)u=!1;else if(this.expect(y.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(y.braceR))break;var p=this.parseProperty(e,r);e||this.checkPropClash(p,l,r),a.properties.push(p)}return this.finishNode(a,e?"ObjectPattern":"ObjectExpression")};X.parseProperty=function(e,r){var a=this.startNode(),u,l,p,v;if(this.options.ecmaVersion>=9&&this.eat(y.ellipsis))return e?(a.argument=this.parseIdent(!1),this.type===y.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(a,"RestElement")):(a.argument=this.parseMaybeAssign(!1,r),this.type===y.comma&&r&&r.trailingComma<0&&(r.trailingComma=this.start),this.finishNode(a,"SpreadElement"));this.options.ecmaVersion>=6&&(a.method=!1,a.shorthand=!1,(e||r)&&(p=this.start,v=this.startLoc),e||(u=this.eat(y.star)));var C=this.containsEsc;return this.parsePropertyName(a),!e&&!C&&this.options.ecmaVersion>=8&&!u&&this.isAsyncProp(a)?(l=!0,u=this.options.ecmaVersion>=9&&this.eat(y.star),this.parsePropertyName(a)):l=!1,this.parsePropertyValue(a,e,u,l,p,v,r,C),this.finishNode(a,"Property")};X.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var r=e.kind==="get"?0:1;if(e.value.params.length!==r){var a=e.value.start;e.kind==="get"?this.raiseRecoverable(a,"getter should have no params"):this.raiseRecoverable(a,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};X.parsePropertyValue=function(e,r,a,u,l,p,v,C){(a||u)&&this.type===y.colon&&this.unexpected(),this.eat(y.colon)?(e.value=r?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,v),e.kind="init"):this.options.ecmaVersion>=6&&this.type===y.parenL?(r&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(a,u)):!r&&!C&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==y.comma&&this.type!==y.braceR&&this.type!==y.eq?((a||u)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((a||u)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=l),e.kind="init",r?e.value=this.parseMaybeDefault(l,p,this.copyNode(e.key)):this.type===y.eq&&v?(v.shorthandAssign<0&&(v.shorthandAssign=this.start),e.value=this.parseMaybeDefault(l,p,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected()};X.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(y.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(y.bracketR),e.key;e.computed=!1}return e.key=this.type===y.num||this.type===y.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};X.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};X.parseMethod=function(e,r,a){var u=this.startNode(),l=this.yieldPos,p=this.awaitPos,v=this.awaitIdentPos;return this.initFunction(u),this.options.ecmaVersion>=6&&(u.generator=e),this.options.ecmaVersion>=8&&(u.async=!!r),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ec(r,u.generator)|Xf|(a?Sp:0)),this.expect(y.parenL),u.params=this.parseBindingList(y.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(u,!1,!0,!1),this.yieldPos=l,this.awaitPos=p,this.awaitIdentPos=v,this.finishNode(u,"FunctionExpression")};X.parseArrowExpression=function(e,r,a,u){var l=this.yieldPos,p=this.awaitPos,v=this.awaitIdentPos;return this.enterScope(ec(a,!1)|vp),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!a),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(r,!0),this.parseFunctionBody(e,!0,!1,u),this.yieldPos=l,this.awaitPos=p,this.awaitIdentPos=v,this.finishNode(e,"ArrowFunctionExpression")};X.parseFunctionBody=function(e,r,a,u){var l=r&&this.type!==y.braceL,p=this.strict,v=!1;if(l)e.body=this.parseMaybeAssign(u),e.expression=!0,this.checkParams(e,!1);else{var C=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!p||C)&&(v=this.strictDirective(this.end),v&&C&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var T=this.labels;this.labels=[],v&&(this.strict=!0),this.checkParams(e,!p&&!v&&!r&&!a&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,kp),e.body=this.parseBlock(!1,void 0,v&&!p),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=T}this.exitScope()};X.isSimpleParamList=function(e){for(var r=0,a=e;r-1||l.functions.indexOf(e)>-1||l.var.indexOf(e)>-1,l.lexical.push(e),this.inModule&&l.flags&us&&delete this.undefinedExports[e]}else if(r===bp){var p=this.currentScope();p.lexical.push(e)}else if(r===_p){var v=this.currentScope();this.treatFunctionsAsVar?u=v.lexical.indexOf(e)>-1:u=v.lexical.indexOf(e)>-1||v.var.indexOf(e)>-1,v.functions.push(e)}else for(var C=this.scopeStack.length-1;C>=0;--C){var T=this.scopeStack[C];if(T.lexical.indexOf(e)>-1&&!(T.flags&wp&&T.lexical[0]===e)||!this.treatFunctionsAsVarInScope(T)&&T.functions.indexOf(e)>-1){u=!0;break}if(T.var.push(e),this.inModule&&T.flags&us&&delete this.undefinedExports[e],T.flags&Jf)break}u&&this.raiseRecoverable(a,"Identifier '"+e+"' has already been declared")};Wn.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};Wn.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};Wn.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var r=this.scopeStack[e];if(r.flags&Jf)return r}};Wn.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var r=this.scopeStack[e];if(r.flags&Jf&&!(r.flags&vp))return r}};var zo=function(r,a,u){this.type="",this.start=a,this.end=0,r.options.locations&&(this.loc=new qo(r,u)),r.options.directSourceFile&&(this.sourceFile=r.options.directSourceFile),r.options.ranges&&(this.range=[a,0])},cs=ft.prototype;cs.startNode=function(){return new zo(this,this.start,this.startLoc)};cs.startNodeAt=function(e,r){return new zo(this,e,r)};function Pp(e,r,a,u){return e.type=r,e.end=a,this.options.locations&&(e.loc.end=u),this.options.ranges&&(e.range[1]=a),e}cs.finishNode=function(e,r){return Pp.call(this,e,r,this.lastTokEnd,this.lastTokEndLoc)};cs.finishNodeAt=function(e,r,a,u){return Pp.call(this,e,r,a,u)};cs.copyNode=function(e){var r=new zo(this,e.start,this.startLoc);for(var a in e)r[a]=e[a];return r};var Ep="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Dp=Ep+" Extended_Pictographic",Ip=Dp,Mp=Ip+" EBase EComp EMod EPres ExtPict",Op=Mp,Iv=Op,Mv={9:Ep,10:Dp,11:Ip,12:Mp,13:Op,14:Iv},Ov="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Av={9:"",10:"",11:"",12:"",13:"",14:Ov},fp="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",Ap="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Fp=Ap+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Np=Fp+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Lp=Np+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Rp=Lp+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Fv=Rp+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz",Nv={9:Ap,10:Fp,11:Np,12:Lp,13:Rp,14:Fv},Wp={};function Lv(e){var r=Wp[e]={binary:Ln(Mv[e]+" "+fp),binaryOfStrings:Ln(Av[e]),nonBinary:{General_Category:Ln(fp),Script:Ln(Nv[e])}};r.nonBinary.Script_Extensions=r.nonBinary.Script,r.nonBinary.gc=r.nonBinary.General_Category,r.nonBinary.sc=r.nonBinary.Script,r.nonBinary.scx=r.nonBinary.Script_Extensions}for(Bo=0,zf=[9,10,11,12,13,14];Bo=6?"uy":"")+(r.options.ecmaVersion>=9?"s":"")+(r.options.ecmaVersion>=13?"d":"")+(r.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Wp[r.options.ecmaVersion>=14?14:r.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};Hr.prototype.reset=function(r,a,u){var l=u.indexOf("v")!==-1,p=u.indexOf("u")!==-1;this.start=r|0,this.source=a+"",this.flags=u,l&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=p&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=p&&this.parser.options.ecmaVersion>=9)};Hr.prototype.raise=function(r){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+r)};Hr.prototype.at=function(r,a){a===void 0&&(a=!1);var u=this.source,l=u.length;if(r>=l)return-1;var p=u.charCodeAt(r);if(!(a||this.switchU)||p<=55295||p>=57344||r+1>=l)return p;var v=u.charCodeAt(r+1);return v>=56320&&v<=57343?(p<<10)+v-56613888:p};Hr.prototype.nextIndex=function(r,a){a===void 0&&(a=!1);var u=this.source,l=u.length;if(r>=l)return l;var p=u.charCodeAt(r),v;return!(a||this.switchU)||p<=55295||p>=57344||r+1>=l||(v=u.charCodeAt(r+1))<56320||v>57343?r+1:r+2};Hr.prototype.current=function(r){return r===void 0&&(r=!1),this.at(this.pos,r)};Hr.prototype.lookahead=function(r){return r===void 0&&(r=!1),this.at(this.nextIndex(this.pos,r),r)};Hr.prototype.advance=function(r){r===void 0&&(r=!1),this.pos=this.nextIndex(this.pos,r)};Hr.prototype.eat=function(r,a){return a===void 0&&(a=!1),this.current(a)===r?(this.advance(a),!0):!1};Hr.prototype.eatChars=function(r,a){a===void 0&&(a=!1);for(var u=this.pos,l=0,p=r;l-1&&this.raise(e.start,"Duplicate regular expression flag"),v==="u"&&(u=!0),v==="v"&&(l=!0)}this.options.ecmaVersion>=15&&u&&l&&this.raise(e.start,"Invalid regular expression flag")};U.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))};U.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var r=0,a=e.backReferenceNames;r=9&&(a=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!a,!0}return e.pos=r,!1};U.regexp_eatQuantifier=function(e,r){return r===void 0&&(r=!1),this.regexp_eatQuantifierPrefix(e,r)?(e.eat(63),!0):!1};U.regexp_eatQuantifierPrefix=function(e,r){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,r)};U.regexp_eatBracedQuantifier=function(e,r){var a=e.pos;if(e.eat(123)){var u=0,l=-1;if(this.regexp_eatDecimalDigits(e)&&(u=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(l=e.lastIntValue),e.eat(125)))return l!==-1&&l=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};U.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};U.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};U.regexp_eatSyntaxCharacter=function(e){var r=e.current();return Yp(r)?(e.lastIntValue=r,e.advance(),!0):!1};function Yp(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}U.regexp_eatPatternCharacters=function(e){for(var r=e.pos,a=0;(a=e.current())!==-1&&!Yp(a);)e.advance();return e.pos!==r};U.regexp_eatExtendedPatternCharacter=function(e){var r=e.current();return r!==-1&&r!==36&&!(r>=40&&r<=43)&&r!==46&&r!==63&&r!==91&&r!==94&&r!==124?(e.advance(),!0):!1};U.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e)){e.groupNames.indexOf(e.lastStringValue)!==-1&&e.raise("Duplicate capture group name"),e.groupNames.push(e.lastStringValue);return}e.raise("Invalid group")}};U.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};U.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=Rn(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=Rn(e.lastIntValue);return!0}return!1};U.regexp_eatRegExpIdentifierStart=function(e){var r=e.pos,a=this.options.ecmaVersion>=11,u=e.current(a);return e.advance(a),u===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,a)&&(u=e.lastIntValue),Rv(u)?(e.lastIntValue=u,!0):(e.pos=r,!1)};function Rv(e){return ln(e,!0)||e===36||e===95}U.regexp_eatRegExpIdentifierPart=function(e){var r=e.pos,a=this.options.ecmaVersion>=11,u=e.current(a);return e.advance(a),u===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,a)&&(u=e.lastIntValue),Wv(u)?(e.lastIntValue=u,!0):(e.pos=r,!1)};function Wv(e){return aa(e,!0)||e===36||e===95||e===8204||e===8205}U.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};U.regexp_eatBackReference=function(e){var r=e.pos;if(this.regexp_eatDecimalEscape(e)){var a=e.lastIntValue;if(e.switchU)return a>e.maxBackReference&&(e.maxBackReference=a),!0;if(a<=e.numCapturingParens)return!0;e.pos=r}return!1};U.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};U.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};U.regexp_eatCControlLetter=function(e){var r=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=r}return!1};U.regexp_eatZero=function(e){return e.current()===48&&!$o(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};U.regexp_eatControlEscape=function(e){var r=e.current();return r===116?(e.lastIntValue=9,e.advance(),!0):r===110?(e.lastIntValue=10,e.advance(),!0):r===118?(e.lastIntValue=11,e.advance(),!0):r===102?(e.lastIntValue=12,e.advance(),!0):r===114?(e.lastIntValue=13,e.advance(),!0):!1};U.regexp_eatControlLetter=function(e){var r=e.current();return Bp(r)?(e.lastIntValue=r%32,e.advance(),!0):!1};function Bp(e){return e>=65&&e<=90||e>=97&&e<=122}U.regexp_eatRegExpUnicodeEscapeSequence=function(e,r){r===void 0&&(r=!1);var a=e.pos,u=r||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var l=e.lastIntValue;if(u&&l>=55296&&l<=56319){var p=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var v=e.lastIntValue;if(v>=56320&&v<=57343)return e.lastIntValue=(l-55296)*1024+(v-56320)+65536,!0}e.pos=p,e.lastIntValue=l}return!0}if(u&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Yv(e.lastIntValue))return!0;u&&e.raise("Invalid unicode escape"),e.pos=a}return!1};function Yv(e){return e>=0&&e<=1114111}U.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var r=e.current();return r!==99&&(!e.switchN||r!==107)?(e.lastIntValue=r,e.advance(),!0):!1};U.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var r=e.current();if(r>=49&&r<=57){do e.lastIntValue=10*e.lastIntValue+(r-48),e.advance();while((r=e.current())>=48&&r<=57);return!0}return!1};var Vp=0,fn=1,fr=2;U.regexp_eatCharacterClassEscape=function(e){var r=e.current();if(Bv(r))return e.lastIntValue=-1,e.advance(),fn;var a=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((a=r===80)||r===112)){e.lastIntValue=-1,e.advance();var u;if(e.eat(123)&&(u=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return a&&u===fr&&e.raise("Invalid property name"),u;e.raise("Invalid property name")}return Vp};function Bv(e){return e===100||e===68||e===115||e===83||e===119||e===87}U.regexp_eatUnicodePropertyValueExpression=function(e){var r=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var a=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var u=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,a,u),fn}}if(e.pos=r,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var l=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,l)}return Vp};U.regexp_validateUnicodePropertyNameAndValue=function(e,r,a){ls(e.unicodeProperties.nonBinary,r)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[r].test(a)||e.raise("Invalid property value")};U.regexp_validateUnicodePropertyNameOrValue=function(e,r){if(e.unicodeProperties.binary.test(r))return fn;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(r))return fr;e.raise("Invalid property name")};U.regexp_eatUnicodePropertyName=function(e){var r=0;for(e.lastStringValue="";Up(r=e.current());)e.lastStringValue+=Rn(r),e.advance();return e.lastStringValue!==""};function Up(e){return Bp(e)||e===95}U.regexp_eatUnicodePropertyValue=function(e){var r=0;for(e.lastStringValue="";Vv(r=e.current());)e.lastStringValue+=Rn(r),e.advance();return e.lastStringValue!==""};function Vv(e){return Up(e)||$o(e)}U.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};U.regexp_eatCharacterClass=function(e){if(e.eat(91)){var r=e.eat(94),a=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),r&&a===fr&&e.raise("Negated character class may contain strings"),!0}return!1};U.regexp_classContents=function(e){return e.current()===93?fn:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),fn)};U.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var r=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var a=e.lastIntValue;e.switchU&&(r===-1||a===-1)&&e.raise("Invalid character class"),r!==-1&&a!==-1&&r>a&&e.raise("Range out of order in character class")}}};U.regexp_eatClassAtom=function(e){var r=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var a=e.current();(a===99||Gp(a))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=r}var u=e.current();return u!==93?(e.lastIntValue=u,e.advance(),!0):!1};U.regexp_eatClassEscape=function(e){var r=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=r}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};U.regexp_classSetExpression=function(e){var r=fn,a;if(!this.regexp_eatClassSetRange(e))if(a=this.regexp_eatClassSetOperand(e)){a===fr&&(r=fr);for(var u=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(a=this.regexp_eatClassSetOperand(e))){a!==fr&&(r=fn);continue}e.raise("Invalid character in character class")}if(u!==e.pos)return r;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(u!==e.pos)return r}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(a=this.regexp_eatClassSetOperand(e),!a)return r;a===fr&&(r=fr)}};U.regexp_eatClassSetRange=function(e){var r=e.pos;if(this.regexp_eatClassSetCharacter(e)){var a=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var u=e.lastIntValue;return a!==-1&&u!==-1&&a>u&&e.raise("Range out of order in character class"),!0}e.pos=r}return!1};U.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?fn:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};U.regexp_eatNestedClass=function(e){var r=e.pos;if(e.eat(91)){var a=e.eat(94),u=this.regexp_classContents(e);if(e.eat(93))return a&&u===fr&&e.raise("Negated character class may contain strings"),u;e.pos=r}if(e.eat(92)){var l=this.regexp_eatCharacterClassEscape(e);if(l)return l;e.pos=r}return null};U.regexp_eatClassStringDisjunction=function(e){var r=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var a=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return a}else e.raise("Invalid escape");e.pos=r}return null};U.regexp_classStringDisjunctionContents=function(e){for(var r=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===fr&&(r=fr);return r};U.regexp_classString=function(e){for(var r=0;this.regexp_eatClassSetCharacter(e);)r++;return r===1?fn:fr};U.regexp_eatClassSetCharacter=function(e){var r=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=r,!1);var a=e.current();return a<0||a===e.lookahead()&&Uv(a)||Hv(a)?!1:(e.advance(),e.lastIntValue=a,!0)};function Uv(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function Hv(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}U.regexp_eatClassSetReservedPunctuator=function(e){var r=e.current();return qv(r)?(e.lastIntValue=r,e.advance(),!0):!1};function qv(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}U.regexp_eatClassControlLetter=function(e){var r=e.current();return $o(r)||r===95?(e.lastIntValue=r%32,e.advance(),!0):!1};U.regexp_eatHexEscapeSequence=function(e){var r=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=r}return!1};U.regexp_eatDecimalDigits=function(e){var r=e.pos,a=0;for(e.lastIntValue=0;$o(a=e.current());)e.lastIntValue=10*e.lastIntValue+(a-48),e.advance();return e.pos!==r};function $o(e){return e>=48&&e<=57}U.regexp_eatHexDigits=function(e){var r=e.pos,a=0;for(e.lastIntValue=0;Hp(a=e.current());)e.lastIntValue=16*e.lastIntValue+qp(a),e.advance();return e.pos!==r};function Hp(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function qp(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}U.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var r=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var a=e.lastIntValue;r<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=r*64+a*8+e.lastIntValue:e.lastIntValue=r*8+a}else e.lastIntValue=r;return!0}return!1};U.regexp_eatOctalDigit=function(e){var r=e.current();return Gp(r)?(e.lastIntValue=r-48,e.advance(),!0):(e.lastIntValue=0,!1)};function Gp(e){return e>=48&&e<=55}U.regexp_eatFixedHexDigits=function(e,r){var a=e.pos;e.lastIntValue=0;for(var u=0;u=this.input.length)return this.finishToken(y.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};ce.readToken=function(e){return ln(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};ce.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var r=this.input.charCodeAt(this.pos+1);return r<=56319||r>=57344?e:(e<<10)+r-56613888};ce.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),r=this.pos,a=this.input.indexOf("*/",this.pos+=2);if(a===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=a+2,this.options.locations)for(var u=void 0,l=r;(u=dp(this.input,l,this.pos))>-1;)++this.curLine,l=this.lineStart=u;this.options.onComment&&this.options.onComment(!0,this.input.slice(r+2,a),r,this.pos,e,this.curPosition())};ce.skipLineComment=function(e){for(var r=this.pos,a=this.options.onComment&&this.curPosition(),u=this.input.charCodeAt(this.pos+=e);this.pos8&&e<14||e>=5760&&mp.test(String.fromCharCode(e)))++this.pos;else break e}}};ce.finishToken=function(e,r){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var a=this.type;this.type=e,this.value=r,this.updateContext(a)};ce.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var r=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&r===46?(this.pos+=3,this.finishToken(y.ellipsis)):(++this.pos,this.finishToken(y.dot))};ce.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(y.assign,2):this.finishOp(y.slash,1)};ce.readToken_mult_modulo_exp=function(e){var r=this.input.charCodeAt(this.pos+1),a=1,u=e===42?y.star:y.modulo;return this.options.ecmaVersion>=7&&e===42&&r===42&&(++a,u=y.starstar,r=this.input.charCodeAt(this.pos+2)),r===61?this.finishOp(y.assign,a+1):this.finishOp(u,a)};ce.readToken_pipe_amp=function(e){var r=this.input.charCodeAt(this.pos+1);if(r===e){if(this.options.ecmaVersion>=12){var a=this.input.charCodeAt(this.pos+2);if(a===61)return this.finishOp(y.assign,3)}return this.finishOp(e===124?y.logicalOR:y.logicalAND,2)}return r===61?this.finishOp(y.assign,2):this.finishOp(e===124?y.bitwiseOR:y.bitwiseAND,1)};ce.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(y.assign,2):this.finishOp(y.bitwiseXOR,1)};ce.readToken_plus_min=function(e){var r=this.input.charCodeAt(this.pos+1);return r===e?r===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||cr.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(y.incDec,2):r===61?this.finishOp(y.assign,2):this.finishOp(y.plusMin,1)};ce.readToken_lt_gt=function(e){var r=this.input.charCodeAt(this.pos+1),a=1;return r===e?(a=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+a)===61?this.finishOp(y.assign,a+1):this.finishOp(y.bitShift,a)):r===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(r===61&&(a=2),this.finishOp(y.relational,a))};ce.readToken_eq_excl=function(e){var r=this.input.charCodeAt(this.pos+1);return r===61?this.finishOp(y.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&r===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(y.arrow)):this.finishOp(e===61?y.eq:y.prefix,1)};ce.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var r=this.input.charCodeAt(this.pos+1);if(r===46){var a=this.input.charCodeAt(this.pos+2);if(a<48||a>57)return this.finishOp(y.questionDot,2)}if(r===63){if(e>=12){var u=this.input.charCodeAt(this.pos+2);if(u===61)return this.finishOp(y.assign,3)}return this.finishOp(y.coalesce,2)}}return this.finishOp(y.question,1)};ce.readToken_numberSign=function(){var e=this.options.ecmaVersion,r=35;if(e>=13&&(++this.pos,r=this.fullCharCodeAtPos(),ln(r,!0)||r===92))return this.finishToken(y.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+Rn(r)+"'")};ce.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(y.parenL);case 41:return++this.pos,this.finishToken(y.parenR);case 59:return++this.pos,this.finishToken(y.semi);case 44:return++this.pos,this.finishToken(y.comma);case 91:return++this.pos,this.finishToken(y.bracketL);case 93:return++this.pos,this.finishToken(y.bracketR);case 123:return++this.pos,this.finishToken(y.braceL);case 125:return++this.pos,this.finishToken(y.braceR);case 58:return++this.pos,this.finishToken(y.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(y.backQuote);case 48:var r=this.input.charCodeAt(this.pos+1);if(r===120||r===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(r===111||r===79)return this.readRadixNumber(8);if(r===98||r===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(y.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Rn(e)+"'")};ce.finishOp=function(e,r){var a=this.input.slice(this.pos,this.pos+r);return this.pos+=r,this.finishToken(e,a)};ce.readRegexp=function(){for(var e,r,a=this.pos;;){this.pos>=this.input.length&&this.raise(a,"Unterminated regular expression");var u=this.input.charAt(this.pos);if(cr.test(u)&&this.raise(a,"Unterminated regular expression"),e)e=!1;else{if(u==="[")r=!0;else if(u==="]"&&r)r=!1;else if(u==="/"&&!r)break;e=u==="\\\\"}++this.pos}var l=this.input.slice(a,this.pos);++this.pos;var p=this.pos,v=this.readWord1();this.containsEsc&&this.unexpected(p);var C=this.regexpState||(this.regexpState=new Hr(this));C.reset(a,l,v),this.validateRegExpFlags(C),this.validateRegExpPattern(C);var T=null;try{T=new RegExp(l,v)}catch{}return this.finishToken(y.regexp,{pattern:l,flags:v,value:T})};ce.readInt=function(e,r,a){for(var u=this.options.ecmaVersion>=12&&r===void 0,l=a&&this.input.charCodeAt(this.pos)===48,p=this.pos,v=0,C=0,T=0,A=r??1/0;T=97?V=R-97+10:R>=65?V=R-65+10:R>=48&&R<=57?V=R-48:V=1/0,V>=e)break;C=R,v=v*e+V}return u&&C===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===p||r!=null&&this.pos-p!==r?null:v};function Gv(e,r){return r?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function zp(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}ce.readRadixNumber=function(e){var r=this.pos;this.pos+=2;var a=this.readInt(e);return a==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(a=zp(this.input.slice(r,this.pos)),++this.pos):ln(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(y.num,a)};ce.readNumber=function(e){var r=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(r,"Invalid number");var a=this.pos-r>=2&&this.input.charCodeAt(r)===48;a&&this.strict&&this.raise(r,"Invalid number");var u=this.input.charCodeAt(this.pos);if(!a&&!e&&this.options.ecmaVersion>=11&&u===110){var l=zp(this.input.slice(r,this.pos));return++this.pos,ln(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(y.num,l)}a&&/[89]/.test(this.input.slice(r,this.pos))&&(a=!1),u===46&&!a&&(++this.pos,this.readInt(10),u=this.input.charCodeAt(this.pos)),(u===69||u===101)&&!a&&(u=this.input.charCodeAt(++this.pos),(u===43||u===45)&&++this.pos,this.readInt(10)===null&&this.raise(r,"Invalid number")),ln(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var p=Gv(this.input.slice(r,this.pos),a);return this.finishToken(y.num,p)};ce.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),r;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var a=++this.pos;r=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,r>1114111&&this.invalidStringToken(a,"Code point out of bounds")}else r=this.readHexChar(4);return r};ce.readString=function(e){for(var r="",a=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var u=this.input.charCodeAt(this.pos);if(u===e)break;u===92?(r+=this.input.slice(a,this.pos),r+=this.readEscapedChar(!1),a=this.pos):u===8232||u===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(sa(u)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return r+=this.input.slice(a,this.pos++),this.finishToken(y.string,r)};var $p={};ce.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===$p)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};ce.invalidStringToken=function(e,r){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw $p;this.raise(e,r)};ce.readTmplToken=function(){for(var e="",r=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var a=this.input.charCodeAt(this.pos);if(a===96||a===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===y.template||this.type===y.invalidTemplate)?a===36?(this.pos+=2,this.finishToken(y.dollarBraceL)):(++this.pos,this.finishToken(y.backQuote)):(e+=this.input.slice(r,this.pos),this.finishToken(y.template,e));if(a===92)e+=this.input.slice(r,this.pos),e+=this.readEscapedChar(!0),r=this.pos;else if(sa(a)){switch(e+=this.input.slice(r,this.pos),++this.pos,a){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=\` +\`+new Error().stack),c=!1}return o.apply(this,arguments)},o)}var pr={};function jt(i,o){r.deprecationHandler!=null&&r.deprecationHandler(i,o),pr[i]||(tt(o),pr[i]=!0)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null;function me(i){return typeof Function<"u"&&i instanceof Function||Object.prototype.toString.call(i)==="[object Function]"}function at(i){var o,c;for(c in i)p(i,c)&&(o=i[c],me(o)?this[c]=o:this["_"+c]=o);this._config=i,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\\d{1,2}/.source)}function mt(i,o){var c=V({},i),h;for(h in o)p(o,h)&&(l(i[h])&&l(o[h])?(c[h]={},V(c[h],i[h]),V(c[h],o[h])):o[h]!=null?c[h]=o[h]:delete c[h]);for(h in i)p(i,h)&&!p(o,h)&&l(i[h])&&(c[h]=V({},c[h]));return c}function Rt(i){i!=null&&this.set(i)}var Oe;Object.keys?Oe=Object.keys:Oe=function(i){var o,c=[];for(o in i)p(i,o)&&c.push(o);return c};var Qe={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function Wt(i,o,c){var h=this._calendar[i]||this._calendar.sameElse;return me(h)?h.call(o,c):h}function xt(i,o,c){var h=""+Math.abs(i),m=o-h.length,S=i>=0;return(S?c?"+":"":"-")+Math.pow(10,Math.max(0,m)).toString().substr(1)+h}var Pt=/(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,mi=/(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,fa={},hn={};function H(i,o,c,h){var m=h;typeof h=="string"&&(m=function(){return this[h]()}),i&&(hn[i]=m),o&&(hn[o[0]]=function(){return xt(m.apply(this,arguments),o[1],o[2])}),c&&(hn[c]=function(){return this.localeData().ordinal(m.apply(this,arguments),i)})}function gi(i){return i.match(/\\[[\\s\\S]/)?i.replace(/^\\[|\\]$/g,""):i.replace(/\\\\/g,"")}function Xo(i){var o=i.match(Pt),c,h;for(c=0,h=o.length;c=0&&mi.test(i);)i=i.replace(mi,h),mi.lastIndex=0,c-=1;return i}var Jo={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function yi(i){var o=this._longDateFormat[i],c=this._longDateFormat[i.toUpperCase()];return o||!c?o:(this._longDateFormat[i]=c.match(Pt).map(function(h){return h==="MMMM"||h==="MM"||h==="DD"||h==="dddd"?h.slice(1):h}).join(""),this._longDateFormat[i])}var xi="Invalid date";function hs(){return this._invalidDate}var Yt="%d",Yn=/\\d{1,2}/;function eu(i){return this._ordinal.replace("%d",i)}var dr={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function ps(i,o,c,h){var m=this._relativeTime[c];return me(m)?m(i,o,c,h):m.replace(/%d/i,i)}function tu(i,o){var c=this._relativeTime[i>0?"future":"past"];return me(c)?c(o):c.replace(/%s/i,o)}var mr={};function De(i,o){var c=i.toLowerCase();mr[c]=mr[c+"s"]=mr[o]=i}function st(i){return typeof i=="string"?mr[i]||mr[i.toLowerCase()]:void 0}function dn(i){var o={},c,h;for(h in i)p(i,h)&&(c=st(h),c&&(o[c]=i[h]));return o}var ds={};function Ue(i,o){ds[i]=o}function ru(i){var o=[],c;for(c in i)p(i,c)&&o.push({unit:c,priority:ds[c]});return o.sort(function(h,m){return h.priority-m.priority}),o}function Dr(i){return i%4===0&&i%100!==0||i%400===0}function nt(i){return i<0?Math.ceil(i)||0:Math.floor(i)}function te(i){var o=+i,c=0;return o!==0&&isFinite(o)&&(c=nt(o)),c}function Ir(i,o){return function(c){return c!=null?(vi(this,i,c),r.updateOffset(this,o),this):mn(this,i)}}function mn(i,o){return i.isValid()?i._d["get"+(i._isUTC?"UTC":"")+o]():NaN}function vi(i,o,c){i.isValid()&&!isNaN(c)&&(o==="FullYear"&&Dr(i.year())&&i.month()===1&&i.date()===29?(c=te(c),i._d["set"+(i._isUTC?"UTC":"")+o](c,i.month(),Ei(c,i.month()))):i._d["set"+(i._isUTC?"UTC":"")+o](c))}function ca(i){return i=st(i),me(this[i])?this[i]():this}function ha(i,o){if(typeof i=="object"){i=dn(i);var c=ru(i),h,m=c.length;for(h=0;h68?1900:2e3)};var ba=Ir("FullYear",!0);function gu(){return Dr(this.year())}function vs(i,o,c,h,m,S,E){var G;return i<100&&i>=0?(G=new Date(i+400,o,c,h,m,S,E),isFinite(G.getFullYear())&&G.setFullYear(i)):G=new Date(i,o,c,h,m,S,E),G}function yn(i){var o,c;return i<100&&i>=0?(c=Array.prototype.slice.call(arguments),c[0]=i+400,o=new Date(Date.UTC.apply(null,c)),isFinite(o.getUTCFullYear())&&o.setUTCFullYear(i)):o=new Date(Date.UTC.apply(null,arguments)),o}function xn(i,o,c){var h=7+o-c,m=(7+yn(i,0,h).getUTCDay()-o)%7;return-m+h-1}function ws(i,o,c,h,m){var S=(7+c-h)%7,E=xn(i,h,m),G=1+7*(o-1)+S+E,J,ve;return G<=0?(J=i-1,ve=Mr(J)+G):G>Mr(i)?(J=i+1,ve=G-Mr(i)):(J=i,ve=G),{year:J,dayOfYear:ve}}function vn(i,o,c){var h=xn(i.year(),o,c),m=Math.floor((i.dayOfYear()-h-1)/7)+1,S,E;return m<1?(E=i.year()-1,S=m+Vt(E,o,c)):m>Vt(i.year(),o,c)?(S=m-Vt(i.year(),o,c),E=i.year()+1):(E=i.year(),S=m),{week:S,year:E}}function Vt(i,o,c){var h=xn(i,o,c),m=xn(i+1,o,c);return(Mr(i)-h+m)/7}H("w",["ww",2],"wo","week"),H("W",["WW",2],"Wo","isoWeek"),De("week","w"),De("isoWeek","W"),Ue("week",5),Ue("isoWeek",5),Y("w",Ae),Y("ww",Ae,ct),Y("W",Ae),Y("WW",Ae,ct),Vn(["w","ww","W","WW"],function(i,o,c,h){o[h.substr(0,1)]=te(i)});function ka(i){return vn(i,this._week.dow,this._week.doy).week}var wn={dow:0,doy:6};function Ss(){return this._week.dow}function _s(){return this._week.doy}function yu(i){var o=this.localeData().week(this);return i==null?o:this.add((i-o)*7,"d")}function bs(i){var o=vn(this,1,4).week;return i==null?o:this.add((i-o)*7,"d")}H("d",0,"do","day"),H("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),H("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),H("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),H("e",0,0,"weekday"),H("E",0,0,"isoWeekday"),De("day","d"),De("weekday","e"),De("isoWeekday","E"),Ue("day",11),Ue("weekday",11),Ue("isoWeekday",11),Y("d",Ae),Y("e",Ae),Y("E",Ae),Y("dd",function(i,o){return o.weekdaysMinRegex(i)}),Y("ddd",function(i,o){return o.weekdaysShortRegex(i)}),Y("dddd",function(i,o){return o.weekdaysRegex(i)}),Vn(["dd","ddd","dddd"],function(i,o,c,h){var m=c._locale.weekdaysParse(i,h,c._strict);m!=null?o.d=m:N(c).invalidWeekday=i}),Vn(["d","e","E"],function(i,o,c,h){o[h]=te(i)});function ks(i,o){return typeof i!="string"?i:isNaN(i)?(i=o.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function Cs(i,o){return typeof i=="string"?o.weekdaysParse(i)%7||7:isNaN(i)?null:i}function Di(i,o){return i.slice(o,7).concat(i.slice(0,o))}var xu="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ts="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),vu="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ps=qr,wu=qr,Su=qr;function _u(i,o){var c=u(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(o)?"format":"standalone"];return i===!0?Di(c,this._week.dow):i?c[i.day()]:c}function bu(i){return i===!0?Di(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function Ca(i){return i===!0?Di(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function ku(i,o,c){var h,m,S,E=i.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],h=0;h<7;++h)S=K([2e3,1]).day(h),this._minWeekdaysParse[h]=this.weekdaysMin(S,"").toLocaleLowerCase(),this._shortWeekdaysParse[h]=this.weekdaysShort(S,"").toLocaleLowerCase(),this._weekdaysParse[h]=this.weekdays(S,"").toLocaleLowerCase();return c?o==="dddd"?(m=Re.call(this._weekdaysParse,E),m!==-1?m:null):o==="ddd"?(m=Re.call(this._shortWeekdaysParse,E),m!==-1?m:null):(m=Re.call(this._minWeekdaysParse,E),m!==-1?m:null):o==="dddd"?(m=Re.call(this._weekdaysParse,E),m!==-1||(m=Re.call(this._shortWeekdaysParse,E),m!==-1)?m:(m=Re.call(this._minWeekdaysParse,E),m!==-1?m:null)):o==="ddd"?(m=Re.call(this._shortWeekdaysParse,E),m!==-1||(m=Re.call(this._weekdaysParse,E),m!==-1)?m:(m=Re.call(this._minWeekdaysParse,E),m!==-1?m:null)):(m=Re.call(this._minWeekdaysParse,E),m!==-1||(m=Re.call(this._weekdaysParse,E),m!==-1)?m:(m=Re.call(this._shortWeekdaysParse,E),m!==-1?m:null))}function Cu(i,o,c){var h,m,S;if(this._weekdaysParseExact)return ku.call(this,i,o,c);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),h=0;h<7;h++){if(m=K([2e3,1]).day(h),c&&!this._fullWeekdaysParse[h]&&(this._fullWeekdaysParse[h]=new RegExp("^"+this.weekdays(m,"").replace(".","\\\\.?")+"$","i"),this._shortWeekdaysParse[h]=new RegExp("^"+this.weekdaysShort(m,"").replace(".","\\\\.?")+"$","i"),this._minWeekdaysParse[h]=new RegExp("^"+this.weekdaysMin(m,"").replace(".","\\\\.?")+"$","i")),this._weekdaysParse[h]||(S="^"+this.weekdays(m,"")+"|^"+this.weekdaysShort(m,"")+"|^"+this.weekdaysMin(m,""),this._weekdaysParse[h]=new RegExp(S.replace(".",""),"i")),c&&o==="dddd"&&this._fullWeekdaysParse[h].test(i))return h;if(c&&o==="ddd"&&this._shortWeekdaysParse[h].test(i))return h;if(c&&o==="dd"&&this._minWeekdaysParse[h].test(i))return h;if(!c&&this._weekdaysParse[h].test(i))return h}}function Tu(i){if(!this.isValid())return i!=null?this:NaN;var o=this._isUTC?this._d.getUTCDay():this._d.getDay();return i!=null?(i=ks(i,this.localeData()),this.add(i-o,"d")):o}function Pu(i){if(!this.isValid())return i!=null?this:NaN;var o=(this.day()+7-this.localeData()._week.dow)%7;return i==null?o:this.add(i-o,"d")}function Eu(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var o=Cs(i,this.localeData());return this.day(this.day()%7?o:o-7)}else return this.day()||7}function Fe(i){return this._weekdaysParseExact?(p(this,"_weekdaysRegex")||Ta.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(p(this,"_weekdaysRegex")||(this._weekdaysRegex=Ps),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ie(i){return this._weekdaysParseExact?(p(this,"_weekdaysRegex")||Ta.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(p(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=wu),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Du(i){return this._weekdaysParseExact?(p(this,"_weekdaysRegex")||Ta.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(p(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Su),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ta(){function i(dt,rr){return rr.length-dt.length}var o=[],c=[],h=[],m=[],S,E,G,J,ve;for(S=0;S<7;S++)E=K([2e3,1]).day(S),G=vt(this.weekdaysMin(E,"")),J=vt(this.weekdaysShort(E,"")),ve=vt(this.weekdays(E,"")),o.push(G),c.push(J),h.push(ve),m.push(G),m.push(J),m.push(ve);o.sort(i),c.sort(i),h.sort(i),m.sort(i),this._weekdaysRegex=new RegExp("^("+m.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Pa(){return this.hours()%12||12}function Iu(){return this.hours()||24}H("H",["HH",2],0,"hour"),H("h",["hh",2],0,Pa),H("k",["kk",2],0,Iu),H("hmm",0,0,function(){return""+Pa.apply(this)+xt(this.minutes(),2)}),H("hmmss",0,0,function(){return""+Pa.apply(this)+xt(this.minutes(),2)+xt(this.seconds(),2)}),H("Hmm",0,0,function(){return""+this.hours()+xt(this.minutes(),2)}),H("Hmmss",0,0,function(){return""+this.hours()+xt(this.minutes(),2)+xt(this.seconds(),2)});function Es(i,o){H(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),o)})}Es("a",!0),Es("A",!1),De("hour","h"),Ue("hour",13);function Ds(i,o){return o._meridiemParse}Y("a",Ds),Y("A",Ds),Y("H",Ae),Y("h",Ae),Y("k",Ae),Y("HH",Ae,ct),Y("hh",Ae,ct),Y("kk",Ae,ct),Y("hmm",da),Y("hmmss",ma),Y("Hmm",da),Y("Hmmss",ma),Ce(["H","HH"],Ke),Ce(["k","kk"],function(i,o,c){var h=te(i);o[Ke]=h===24?0:h}),Ce(["a","A"],function(i,o,c){c._isPm=c._locale.isPM(i),c._meridiem=i}),Ce(["h","hh"],function(i,o,c){o[Ke]=te(i),N(c).bigHour=!0}),Ce("hmm",function(i,o,c){var h=i.length-2;o[Ke]=te(i.substr(0,h)),o[Bt]=te(i.substr(h)),N(c).bigHour=!0}),Ce("hmmss",function(i,o,c){var h=i.length-4,m=i.length-2;o[Ke]=te(i.substr(0,h)),o[Bt]=te(i.substr(h,2)),o[gr]=te(i.substr(m)),N(c).bigHour=!0}),Ce("Hmm",function(i,o,c){var h=i.length-2;o[Ke]=te(i.substr(0,h)),o[Bt]=te(i.substr(h))}),Ce("Hmmss",function(i,o,c){var h=i.length-4,m=i.length-2;o[Ke]=te(i.substr(0,h)),o[Bt]=te(i.substr(h,2)),o[gr]=te(i.substr(m))});function Is(i){return(i+"").toLowerCase().charAt(0)==="p"}var Mu=/[ap]\\.?m?\\.?/i,rt=Ir("Hours",!0);function Ea(i,o,c){return i>11?c?"pm":"PM":c?"am":"AM"}var Or={calendar:Qe,longDateFormat:Jo,invalidDate:xi,ordinal:Yt,dayOfMonthOrdinalParse:Yn,relativeTime:dr,months:fu,monthsShort:ms,week:wn,weekdays:xu,weekdaysMin:vu,weekdaysShort:Ts,meridiemParse:Mu},Ne={},zr={},ut;function Ms(i,o){var c,h=Math.min(i.length,o.length);for(c=0;c0;){if(m=Un(S.slice(0,c).join("-")),m)return m;if(h&&h.length>=c&&Ms(S,h)>=c-1)break;c--}o++}return ut}function As(i){return i.match("^[^/\\\\\\\\]*$")!=null}function Un(i){var o=null,c;if(Ne[i]===void 0&&typeof ia<"u"&&ia&&ia.exports&&As(i))try{o=ut._abbr,c=require,c("./locale/"+i),yr(o)}catch{Ne[i]=null}return Ne[i]}function yr(i,o){var c;return i&&(C(o)?c=He(i):c=ht(i,o),c?ut=c:typeof console<"u"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),ut._abbr}function ht(i,o){if(o!==null){var c,h=Or;if(o.abbr=i,Ne[i]!=null)jt("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),h=Ne[i]._config;else if(o.parentLocale!=null)if(Ne[o.parentLocale]!=null)h=Ne[o.parentLocale]._config;else if(c=Un(o.parentLocale),c!=null)h=c._config;else return zr[o.parentLocale]||(zr[o.parentLocale]=[]),zr[o.parentLocale].push({name:i,config:o}),null;return Ne[i]=new Rt(mt(h,o)),zr[i]&&zr[i].forEach(function(m){ht(m.name,m.config)}),yr(i),Ne[i]}else return delete Ne[i],null}function Ou(i,o){if(o!=null){var c,h,m=Or;Ne[i]!=null&&Ne[i].parentLocale!=null?Ne[i].set(mt(Ne[i]._config,o)):(h=Un(i),h!=null&&(m=h._config),o=mt(m,o),h==null&&(o.abbr=i),c=new Rt(o),c.parentLocale=Ne[i],Ne[i]=c),yr(i)}else Ne[i]!=null&&(Ne[i].parentLocale!=null?(Ne[i]=Ne[i].parentLocale,i===yr()&&yr(i)):Ne[i]!=null&&delete Ne[i]);return Ne[i]}function He(i){var o;if(i&&i._locale&&i._locale._abbr&&(i=i._locale._abbr),!i)return ut;if(!u(i)){if(o=Un(i),o)return o;i=[i]}return Os(i)}function Au(){return Oe(Ne)}function Ii(i){var o,c=i._a;return c&&N(i).overflow===-2&&(o=c[Qt]<0||c[Qt]>11?Qt:c[Kt]<1||c[Kt]>Ei(c[ot],c[Qt])?Kt:c[Ke]<0||c[Ke]>24||c[Ke]===24&&(c[Bt]!==0||c[gr]!==0||c[Gr]!==0)?Ke:c[Bt]<0||c[Bt]>59?Bt:c[gr]<0||c[gr]>59?gr:c[Gr]<0||c[Gr]>999?Gr:-1,N(i)._overflowDayOfYear&&(oKt)&&(o=Kt),N(i)._overflowWeeks&&o===-1&&(o=uu),N(i)._overflowWeekday&&o===-1&&(o=Pi),N(i).overflow=o),i}var Ar=/^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,Mi=/^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,Ia=/Z|[+-]\\d\\d(?::?\\d\\d)?/,Ee=[["YYYYYY-MM-DD",/[+-]\\d{6}-\\d\\d-\\d\\d/],["YYYY-MM-DD",/\\d{4}-\\d\\d-\\d\\d/],["GGGG-[W]WW-E",/\\d{4}-W\\d\\d-\\d/],["GGGG-[W]WW",/\\d{4}-W\\d\\d/,!1],["YYYY-DDD",/\\d{4}-\\d{3}/],["YYYY-MM",/\\d{4}-\\d\\d/,!1],["YYYYYYMMDD",/[+-]\\d{10}/],["YYYYMMDD",/\\d{8}/],["GGGG[W]WWE",/\\d{4}W\\d{3}/],["GGGG[W]WW",/\\d{4}W\\d{2}/,!1],["YYYYDDD",/\\d{7}/],["YYYYMM",/\\d{6}/,!1],["YYYY",/\\d{4}/,!1]],Zt=[["HH:mm:ss.SSSS",/\\d\\d:\\d\\d:\\d\\d\\.\\d+/],["HH:mm:ss,SSSS",/\\d\\d:\\d\\d:\\d\\d,\\d+/],["HH:mm:ss",/\\d\\d:\\d\\d:\\d\\d/],["HH:mm",/\\d\\d:\\d\\d/],["HHmmss.SSSS",/\\d\\d\\d\\d\\d\\d\\.\\d+/],["HHmmss,SSSS",/\\d\\d\\d\\d\\d\\d,\\d+/],["HHmmss",/\\d\\d\\d\\d\\d\\d/],["HHmm",/\\d\\d\\d\\d/],["HH",/\\d\\d/]],Ma=/^\\/?Date\\((-?\\d+)/i,Fu=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,Oa={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Fs(i){var o,c,h=i._i,m=Ar.exec(h)||Mi.exec(h),S,E,G,J,ve=Ee.length,dt=Zt.length;if(m){for(N(i).iso=!0,o=0,c=ve;oMr(E)||i._dayOfYear===0)&&(N(i)._overflowDayOfYear=!0),c=yn(E,0,i._dayOfYear),i._a[Qt]=c.getUTCMonth(),i._a[Kt]=c.getUTCDate()),o=0;o<3&&i._a[o]==null;++o)i._a[o]=h[o]=m[o];for(;o<7;o++)i._a[o]=h[o]=i._a[o]==null?o===2?1:0:i._a[o];i._a[Ke]===24&&i._a[Bt]===0&&i._a[gr]===0&&i._a[Gr]===0&&(i._nextDay=!0,i._a[Ke]=0),i._d=(i._useUTC?yn:vs).apply(null,h),S=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[Ke]=24),i._w&&typeof i._w.d<"u"&&i._w.d!==S&&(N(i).weekdayMismatch=!0)}}function Ws(i){var o,c,h,m,S,E,G,J,ve;o=i._w,o.GG!=null||o.W!=null||o.E!=null?(S=1,E=4,c=$r(o.GG,i._a[ot],vn(Me(),1,4).year),h=$r(o.W,1),m=$r(o.E,1),(m<1||m>7)&&(J=!0)):(S=i._locale._week.dow,E=i._locale._week.doy,ve=vn(Me(),S,E),c=$r(o.gg,i._a[ot],ve.year),h=$r(o.w,ve.week),o.d!=null?(m=o.d,(m<0||m>6)&&(J=!0)):o.e!=null?(m=o.e+S,(o.e<0||o.e>6)&&(J=!0)):m=S),h<1||h>Vt(c,S,E)?N(i)._overflowWeeks=!0:J!=null?N(i)._overflowWeekday=!0:(G=ws(c,h,m,S,E),i._a[ot]=G.year,i._dayOfYear=G.dayOfYear)}r.ISO_8601=function(){},r.RFC_2822=function(){};function Fa(i){if(i._f===r.ISO_8601){Fs(i);return}if(i._f===r.RFC_2822){Ls(i);return}i._a=[],N(i).empty=!0;var o=""+i._i,c,h,m,S,E,G=o.length,J=0,ve,dt;for(m=pn(i._f,i._locale).match(Pt)||[],dt=m.length,c=0;c0&&N(i).unusedInput.push(E),o=o.slice(o.indexOf(h)+h.length),J+=h.length),hn[S]?(h?N(i).empty=!1:N(i).unusedTokens.push(S),ou(S,h,i)):i._strict&&!h&&N(i).unusedTokens.push(S);N(i).charsLeftOver=G-J,o.length>0&&N(i).unusedInput.push(o),i._a[Ke]<=12&&N(i).bigHour===!0&&i._a[Ke]>0&&(N(i).bigHour=void 0),N(i).parsedDateParts=i._a.slice(0),N(i).meridiem=i._meridiem,i._a[Ke]=Na(i._locale,i._a[Ke],i._meridiem),ve=N(i).era,ve!==null&&(i._a[ot]=i._locale.erasConvertYear(ve,i._a[ot])),Hn(i),Ii(i)}function Na(i,o,c){var h;return c==null?o:i.meridiemHour!=null?i.meridiemHour(o,c):(i.isPM!=null&&(h=i.isPM(c),h&&o<12&&(o+=12),!h&&o===12&&(o=0)),o)}function La(i){var o,c,h,m,S,E,G=!1,J=i._f.length;if(J===0){N(i).invalidFormat=!0,i._d=new Date(NaN);return}for(m=0;mthis?this:i:ye()});function Vs(i,o){var c,h;if(o.length===1&&u(o[0])&&(o=o[0]),!o.length)return Me();for(c=o[0],h=1;hthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function D(){if(!C(this._isDSTShifted))return this._isDSTShifted;var i={},o;return ze(i,this),i=gt(i),i._a?(o=i._isUTC?K(i._a):Me(i._a),this._isDSTShifted=this.isValid()&&qu(i._a,o.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function P(){return this.isValid()?!this._isUTC:!1}function B(){return this.isValid()?this._isUTC:!1}function Z(){return this.isValid()?this._isUTC&&this._offset===0:!1}var xe=/^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,Ze=/^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function se(i,o){var c=i,h=null,m,S,E;return Ut(i)?c={ms:i._milliseconds,d:i._days,M:i._months}:T(i)||!isNaN(+i)?(c={},o?c[o]=+i:c.milliseconds=+i):(h=xe.exec(i))?(m=h[1]==="-"?-1:1,c={y:0,d:te(h[Kt])*m,h:te(h[Ke])*m,m:te(h[Bt])*m,s:te(h[gr])*m,ms:te(bn(h[Gr]*1e3))*m}):(h=Ze.exec(i))?(m=h[1]==="-"?-1:1,c={y:xr(h[2],m),M:xr(h[3],m),w:xr(h[4],m),d:xr(h[5],m),h:xr(h[6],m),m:xr(h[7],m),s:xr(h[8],m)}):c==null?c={}:typeof c=="object"&&("from"in c||"to"in c)&&(E=Et(Me(c.from),Me(c.to)),c={},c.ms=E.milliseconds,c.M=E.months),S=new qn(c),Ut(i)&&p(i,"_locale")&&(S._locale=i._locale),Ut(i)&&p(i,"_isValid")&&(S._isValid=i._isValid),S}se.fn=qn.prototype,se.invalid=Wa;function xr(i,o){var c=i&&parseFloat(i.replace(",","."));return(isNaN(c)?0:c)*o}function Hs(i,o){var c={};return c.months=o.month()-i.month()+(o.year()-i.year())*12,i.clone().add(c.months,"M").isAfter(o)&&--c.months,c.milliseconds=+o-+i.clone().add(c.months,"M"),c}function Et(i,o){var c;return i.isValid()&&o.isValid()?(o=wt(o,i),i.isBefore(o)?c=Hs(i,o):(c=Hs(o,i),c.milliseconds=-c.milliseconds,c.months=-c.months),c):{milliseconds:0,months:0}}function Gn(i,o){return function(c,h){var m,S;return h!==null&&!isNaN(+h)&&(jt(o,"moment()."+o+"(period, number) is deprecated. Please use moment()."+o+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),S=c,c=h,h=S),m=se(c,h),qs(this,m,i),this}}function qs(i,o,c,h){var m=o._milliseconds,S=bn(o._days),E=bn(o._months);!i.isValid()||(h=h??!0,E&&va(i,mn(i,"Month")+E*c),S&&vi(i,"Date",mn(i,"Date")+S*c),m&&i._d.setTime(i._d.valueOf()+m*c),h&&r.updateOffset(i,S||E))}var kn=Gn(1,"add"),Fi=Gn(-1,"subtract");function zn(i){return typeof i=="string"||i instanceof String}function be(i){return Pe(i)||A(i)||zn(i)||T(i)||Gs(i)||Zu(i)||i===null||i===void 0}function Zu(i){var o=l(i)&&!v(i),c=!1,h=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],m,S,E=h.length;for(m=0;mc.valueOf():c.valueOf()9999?Er(c,o?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):me(Date.prototype.toISOString)?o?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Er(c,"Z")):Er(c,o?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Qr(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var i="moment",o="",c,h,m,S;return this.isLocal()||(i=this.utcOffset()===0?"moment.utc":"moment.parseZone",o="Z"),c="["+i+'("]',h=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",m="-MM-DD[T]HH:mm:ss.SSS",S=o+'[")]',this.format(c+h+m+S)}function Yi(i){i||(i=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var o=Er(this,i);return this.localeData().postformat(o)}function tl(i,o){return this.isValid()&&(Pe(i)&&i.isValid()||Me(i).isValid())?se({to:this,from:i}).locale(this.locale()).humanize(!o):this.localeData().invalidDate()}function rl(i){return this.from(Me(),i)}function nl(i,o){return this.isValid()&&(Pe(i)&&i.isValid()||Me(i).isValid())?se({from:this,to:i}).locale(this.locale()).humanize(!o):this.localeData().invalidDate()}function Bi(i){return this.to(Me(),i)}function jn(i){var o;return i===void 0?this._locale._abbr:(o=He(i),o!=null&&(this._locale=o),this)}var Vi=je("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(i){return i===void 0?this.localeData():this.locale(i)});function Ks(){return this._locale}var Qn=1e3,Cn=60*Qn,Ui=60*Cn,qe=(365*400+97)*24*Ui;function Be(i,o){return(i%o+o)%o}function Zs(i,o,c){return i<100&&i>=0?new Date(i+400,o,c)-qe:new Date(i,o,c).valueOf()}function Xs(i,o,c){return i<100&&i>=0?Date.UTC(i+400,o,c)-qe:Date.UTC(i,o,c)}function Js(i){var o,c;if(i=st(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(c=this._isUTC?Xs:Zs,i){case"year":o=c(this.year(),0,1);break;case"quarter":o=c(this.year(),this.month()-this.month()%3,1);break;case"month":o=c(this.year(),this.month(),1);break;case"week":o=c(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":o=c(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":o=c(this.year(),this.month(),this.date());break;case"hour":o=this._d.valueOf(),o-=Be(o+(this._isUTC?0:this.utcOffset()*Cn),Ui);break;case"minute":o=this._d.valueOf(),o-=Be(o,Cn);break;case"second":o=this._d.valueOf(),o-=Be(o,Qn);break}return this._d.setTime(o),r.updateOffset(this,!0),this}function il(i){var o,c;if(i=st(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(c=this._isUTC?Xs:Zs,i){case"year":o=c(this.year()+1,0,1)-1;break;case"quarter":o=c(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":o=c(this.year(),this.month()+1,1)-1;break;case"week":o=c(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":o=c(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":o=c(this.year(),this.month(),this.date()+1)-1;break;case"hour":o=this._d.valueOf(),o+=Ui-Be(o+(this._isUTC?0:this.utcOffset()*Cn),Ui)-1;break;case"minute":o=this._d.valueOf(),o+=Cn-Be(o,Cn)-1;break;case"second":o=this._d.valueOf(),o+=Qn-Be(o,Qn)-1;break}return this._d.setTime(o),r.updateOffset(this,!0),this}function Ya(){return this._d.valueOf()-(this._offset||0)*6e4}function Kn(){return Math.floor(this.valueOf()/1e3)}function Ba(){return new Date(this.valueOf())}function Tn(){var i=this;return[i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function Zn(){var i=this;return{years:i.year(),months:i.month(),date:i.date(),hours:i.hours(),minutes:i.minutes(),seconds:i.seconds(),milliseconds:i.milliseconds()}}function Xn(){return this.isValid()?this.toISOString():null}function Hi(){return Le(this)}function Pn(){return V({},N(this))}function al(){return N(this).overflow}function sl(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}H("N",0,0,"eraAbbr"),H("NN",0,0,"eraAbbr"),H("NNN",0,0,"eraAbbr"),H("NNNN",0,0,"eraName"),H("NNNNN",0,0,"eraNarrow"),H("y",["y",1],"yo","eraYear"),H("y",["yy",2],0,"eraYear"),H("y",["yyy",3],0,"eraYear"),H("y",["yyyy",4],0,"eraYear"),Y("N",ie),Y("NN",ie),Y("NNN",ie),Y("NNNN",fl),Y("NNNNN",cl),Ce(["N","NN","NNN","NNNN","NNNNN"],function(i,o,c,h){var m=c._locale.erasParse(i,h,c._strict);m?N(c).era=m:N(c).invalidEra=i}),Y("y",gn),Y("yy",gn),Y("yyy",gn),Y("yyyy",gn),Y("yo",hl),Ce(["y","yy","yyy","yyyy"],ot),Ce(["yo"],function(i,o,c,h){var m;c._locale._eraYearOrdinalRegex&&(m=i.match(c._locale._eraYearOrdinalRegex)),c._locale.eraYearOrdinalParse?o[ot]=c._locale.eraYearOrdinalParse(i,m):o[ot]=parseInt(i,10)});function ol(i,o){var c,h,m,S=this._eras||He("en")._eras;for(c=0,h=S.length;c=0)return S[h]}function ll(i,o){var c=i.since<=i.until?1:-1;return o===void 0?r(i.since).year():r(i.since).year()+(o-i.offset)*c}function qi(){var i,o,c,h=this.localeData().eras();for(i=0,o=h.length;iS&&(o=S),xl.call(this,i,o,c,h,m))}function xl(i,o,c,h,m){var S=ws(i,o,c,h,m),E=yn(S.year,0,S.dayOfYear);return this.year(E.getUTCFullYear()),this.month(E.getUTCMonth()),this.date(E.getUTCDate()),this}H("Q",0,"Qo","quarter"),De("quarter","Q"),Ue("quarter",7),Y("Q",wi),Ce("Q",function(i,o){o[Qt]=(te(i)-1)*3});function vl(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}H("D",["DD",2],"Do","date"),De("date","D"),Ue("date",9),Y("D",Ae),Y("DD",Ae,ct),Y("Do",function(i,o){return i?o._dayOfMonthOrdinalParse||o._ordinalParse:o._dayOfMonthOrdinalParseLenient}),Ce(["D","DD"],Kt),Ce("Do",function(i,o){o[Kt]=te(i.match(Ae)[0])});var ro=Ir("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear"),De("dayOfYear","DDD"),Ue("dayOfYear",4),Y("DDD",bi),Y("DDDD",Si),Ce(["DDD","DDDD"],function(i,o,c){c._dayOfYear=te(i)});function Sr(i){var o=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return i==null?o:this.add(i-o,"d")}H("m",["mm",2],0,"minute"),De("minute","m"),Ue("minute",14),Y("m",Ae),Y("mm",Ae,ct),Ce(["m","mm"],Bt);var wl=Ir("Minutes",!1);H("s",["ss",2],0,"second"),De("second","s"),Ue("second",15),Y("s",Ae),Y("ss",Ae,ct),Ce(["s","ss"],gr);var Sl=Ir("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)}),H(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),H(0,["SSS",3],0,"millisecond"),H(0,["SSSS",4],0,function(){return this.millisecond()*10}),H(0,["SSSSS",5],0,function(){return this.millisecond()*100}),H(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),H(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),H(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),H(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),De("millisecond","ms"),Ue("millisecond",16),Y("S",bi,wi),Y("SS",bi,ct),Y("SSS",bi,Si);var Rr,no;for(Rr="SSSS";Rr.length<=9;Rr+="S")Y(Rr,gn);function _l(i,o){o[Gr]=te(("0."+i)*1e3)}for(Rr="S";Rr.length<=9;Rr+="S")Ce(Rr,_l);no=Ir("Milliseconds",!1),H("z",0,0,"zoneAbbr"),H("zz",0,0,"zoneName");function Kr(){return this._isUTC?"UTC":""}function bl(){return this._isUTC?"Coordinated Universal Time":""}var F=$e.prototype;F.add=kn,F.calendar=Ju,F.clone=el,F.diff=js,F.endOf=il,F.format=Yi,F.from=tl,F.fromNow=rl,F.to=nl,F.toNow=Bi,F.get=ca,F.invalidAt=al,F.isAfter=Li,F.isBefore=Lr,F.isBetween=Ri,F.isSame=zs,F.isSameOrAfter=Wi,F.isSameOrBefore=$s,F.isValid=Hi,F.lang=Vi,F.locale=jn,F.localeData=Ks,F.max=Wu,F.min=Bs,F.parsingFlags=Pn,F.set=ha,F.startOf=Js,F.subtract=Fi,F.toArray=Tn,F.toObject=Zn,F.toDate=Ba,F.toISOString=$n,F.inspect=Qr,typeof Symbol<"u"&&Symbol.for!=null&&(F[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),F.toJSON=Xn,F.toString=Qs,F.unix=Kn,F.valueOf=Ya,F.creationData=sl,F.eraName=qi,F.eraNarrow=Jn,F.eraAbbr=eo,F.eraYear=g,F.year=ba,F.isLeapYear=gu,F.weekYear=pl,F.isoWeekYear=dl,F.quarter=F.quarters=vl,F.month=wa,F.daysInMonth=xs,F.week=F.weeks=yu,F.isoWeek=F.isoWeeks=bs,F.weeksInYear=wr,F.weeksInWeekYear=yl,F.isoWeeksInYear=ml,F.isoWeeksInISOWeekYear=gl,F.date=ro,F.day=F.days=Tu,F.weekday=Pu,F.isoWeekday=Eu,F.dayOfYear=Sr,F.hour=F.hours=rt,F.minute=F.minutes=wl,F.second=F.seconds=Sl,F.millisecond=F.milliseconds=no,F.utcOffset=zu,F.utc=ju,F.local=Qu,F.parseZone=Ku,F.hasAlignedHourOffset=Nr,F.isDST=b,F.isLocal=P,F.isUtcOffset=B,F.isUtc=Z,F.isUTC=Z,F.zoneAbbr=Kr,F.zoneName=bl,F.dates=je("dates accessor is deprecated. Use date instead.",ro),F.months=je("months accessor is deprecated. Use month instead",wa),F.years=je("years accessor is deprecated. Use year instead",ba),F.zone=je("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",$u),F.isDSTShifted=je("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",D);function Ht(i){return Me(i*1e3)}function kl(){return Me.apply(null,arguments).parseZone()}function io(i){return i}var ge=Rt.prototype;ge.calendar=Wt,ge.longDateFormat=yi,ge.invalidDate=hs,ge.ordinal=eu,ge.preparse=io,ge.postformat=io,ge.relativeTime=ps,ge.pastFuture=tu,ge.set=at,ge.eras=ol,ge.erasParse=ul,ge.erasConvertYear=ll,ge.erasAbbrRegex=Gi,ge.erasNameRegex=En,ge.erasNarrowRegex=Dt,ge.months=cu,ge.monthsShort=hu,ge.monthsParse=du,ge.monthsRegex=mu,ge.monthsShortRegex=Sa,ge.week=ka,ge.firstDayOfYear=_s,ge.firstDayOfWeek=Ss,ge.weekdays=_u,ge.weekdaysMin=Ca,ge.weekdaysShort=bu,ge.weekdaysParse=Cu,ge.weekdaysRegex=Fe,ge.weekdaysShortRegex=Ie,ge.weekdaysMinRegex=Du,ge.isPM=Is,ge.meridiem=Ea;function $i(i,o,c,h){var m=He(),S=K().set(h,o);return m[c](S,i)}function ao(i,o,c){if(T(i)&&(o=i,i=void 0),i=i||"",o!=null)return $i(i,o,c,"month");var h,m=[];for(h=0;h<12;h++)m[h]=$i(i,h,c,"month");return m}function ji(i,o,c,h){typeof i=="boolean"?(T(o)&&(c=o,o=void 0),o=o||""):(o=i,c=o,i=!1,T(o)&&(c=o,o=void 0),o=o||"");var m=He(),S=i?m._week.dow:0,E,G=[];if(c!=null)return $i(o,(c+S)%7,h,"day");for(E=0;E<7;E++)G[E]=$i(o,(E+S)%7,h,"day");return G}function so(i,o){return ao(i,o,"months")}function Cl(i,o){return ao(i,o,"monthsShort")}function Tl(i,o,c){return ji(i,o,c,"weekdays")}function Va(i,o,c){return ji(i,o,c,"weekdaysShort")}function ei(i,o,c){return ji(i,o,c,"weekdaysMin")}yr("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\\d{1,2}(th|st|nd|rd)/,ordinal:function(i){var o=i%10,c=te(i%100/10)===1?"th":o===1?"st":o===2?"nd":o===3?"rd":"th";return i+c}}),r.lang=je("moment.lang is deprecated. Use moment.locale instead.",yr),r.langData=je("moment.langData is deprecated. Use moment.localeData instead.",He);var It=Math.abs;function Pl(){var i=this._data;return this._milliseconds=It(this._milliseconds),this._days=It(this._days),this._months=It(this._months),i.milliseconds=It(i.milliseconds),i.seconds=It(i.seconds),i.minutes=It(i.minutes),i.hours=It(i.hours),i.months=It(i.months),i.years=It(i.years),this}function Ua(i,o,c,h){var m=se(o,c);return i._milliseconds+=h*m._milliseconds,i._days+=h*m._days,i._months+=h*m._months,i._bubble()}function El(i,o){return Ua(this,i,o,1)}function _r(i,o){return Ua(this,i,o,-1)}function Qi(i){return i<0?Math.floor(i):Math.ceil(i)}function Zr(){var i=this._milliseconds,o=this._days,c=this._months,h=this._data,m,S,E,G,J;return i>=0&&o>=0&&c>=0||i<=0&&o<=0&&c<=0||(i+=Qi(Ha(c)+o)*864e5,o=0,c=0),h.milliseconds=i%1e3,m=nt(i/1e3),h.seconds=m%60,S=nt(m/60),h.minutes=S%60,E=nt(S/60),h.hours=E%24,o+=nt(E/24),J=nt(St(o)),c+=J,o-=Qi(Ha(J)),G=nt(c/12),c%=12,h.days=o,h.months=c,h.years=G,this}function St(i){return i*4800/146097}function Ha(i){return i*146097/4800}function oo(i){if(!this.isValid())return NaN;var o,c,h=this._milliseconds;if(i=st(i),i==="month"||i==="quarter"||i==="year")switch(o=this._days+h/864e5,c=this._months+St(o),i){case"month":return c;case"quarter":return c/3;case"year":return c/12}else switch(o=this._days+Math.round(Ha(this._months)),i){case"week":return o/7+h/6048e5;case"day":return o+h/864e5;case"hour":return o*24+h/36e5;case"minute":return o*1440+h/6e4;case"second":return o*86400+h/1e3;case"millisecond":return Math.floor(o*864e5)+h;default:throw new Error("Unknown unit "+i)}}function uo(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+te(this._months/12)*31536e6:NaN}function _t(i){return function(){return this.as(i)}}var Wr=_t("ms"),lo=_t("s"),Dl=_t("m"),Ki=_t("h"),Il=_t("d"),fo=_t("w"),it=_t("M"),qa=_t("Q"),co=_t("y");function Jt(){return se(this)}function Ga(i){return i=st(i),this.isValid()?this[i+"s"]():NaN}function er(i){return function(){return this.isValid()?this._data[i]:NaN}}var Xr=er("milliseconds"),ho=er("seconds"),pt=er("minutes"),za=er("hours"),Ml=er("days"),Ol=er("months"),Al=er("years");function $a(){return nt(this.days()/7)}var br=Math.round,tr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function po(i,o,c,h,m){return m.relativeTime(o||1,!!c,i,h)}function Fl(i,o,c,h){var m=se(i).abs(),S=br(m.as("s")),E=br(m.as("m")),G=br(m.as("h")),J=br(m.as("d")),ve=br(m.as("M")),dt=br(m.as("w")),rr=br(m.as("y")),kr=S<=c.ss&&["s",S]||S0,kr[4]=h,po.apply(null,kr)}function Nl(i){return i===void 0?br:typeof i=="function"?(br=i,!0):!1}function ti(i,o){return tr[i]===void 0?!1:o===void 0?tr[i]:(tr[i]=o,i==="s"&&(tr.ss=o-1),!0)}function Ll(i,o){if(!this.isValid())return this.localeData().invalidDate();var c=!1,h=tr,m,S;return typeof i=="object"&&(o=i,i=!1),typeof i=="boolean"&&(c=i),typeof o=="object"&&(h=Object.assign({},tr,o),o.s!=null&&o.ss==null&&(h.ss=o.s-1)),m=this.localeData(),S=Fl(this,!c,h,m),c&&(S=m.pastFuture(+this,S)),m.postformat(S)}var ja=Math.abs;function Yr(i){return(i>0)-(i<0)||+i}function ri(){if(!this.isValid())return this.localeData().invalidDate();var i=ja(this._milliseconds)/1e3,o=ja(this._days),c=ja(this._months),h,m,S,E,G=this.asSeconds(),J,ve,dt,rr;return G?(h=nt(i/60),m=nt(h/60),i%=60,h%=60,S=nt(c/12),c%=12,E=i?i.toFixed(3).replace(/\\.?0+$/,""):"",J=G<0?"-":"",ve=Yr(this._months)!==Yr(G)?"-":"",dt=Yr(this._days)!==Yr(G)?"-":"",rr=Yr(this._milliseconds)!==Yr(G)?"-":"",J+"P"+(S?ve+S+"Y":"")+(c?ve+c+"M":"")+(o?dt+o+"D":"")+(m||h||i?"T":"")+(m?rr+m+"H":"")+(h?rr+h+"M":"")+(i?rr+E+"S":"")):"P0D"}var le=qn.prototype;le.isValid=Hu,le.abs=Pl,le.add=El,le.subtract=_r,le.as=oo,le.asMilliseconds=Wr,le.asSeconds=lo,le.asMinutes=Dl,le.asHours=Ki,le.asDays=Il,le.asWeeks=fo,le.asMonths=it,le.asQuarters=qa,le.asYears=co,le.valueOf=uo,le._bubble=Zr,le.clone=Jt,le.get=Ga,le.milliseconds=Xr,le.seconds=ho,le.minutes=pt,le.hours=za,le.days=Ml,le.weeks=$a,le.months=Ol,le.years=Al,le.humanize=Ll,le.toISOString=ri,le.toString=ri,le.toJSON=ri,le.locale=jn,le.localeData=Ks,le.toIsoString=je("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ri),le.lang=Vi,H("X",0,0,"unix"),H("x",0,0,"valueOf"),Y("x",Bn),Y("X",iu),Ce("X",function(i,o,c){c._d=new Date(parseFloat(i)*1e3)}),Ce("x",function(i,o,c){c._d=new Date(te(i))});return r.version="2.29.4",a(Me),r.fn=F,r.min=Yu,r.max=Bu,r.now=Vu,r.utc=K,r.unix=Ht,r.months=so,r.isDate=A,r.locale=yr,r.invalid=ye,r.duration=se,r.isMoment=Pe,r.weekdays=Tl,r.parseZone=kl,r.localeData=He,r.isDuration=Ut,r.monthsShort=Cl,r.weekdaysMin=ei,r.defineLocale=ht,r.updateLocale=Ou,r.locales=Au,r.weekdaysShort=Va,r.normalizeUnits=st,r.relativeTimeRounding=Nl,r.relativeTimeThreshold=ti,r.calendarFormat=Xu,r.prototype=F,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r})});var Vo=Ao(Fo());var sn=e=>[...new Set(e)];var Ph=(e,r)=>e.sort(function(a,u){let l=r.indexOf(a),p=r.indexOf(u);return l>p?l!=-1&&p==-1?-1:1:p!=-1&&l==-1?1:-1});var on="File";var No=e=>e.lastIndexOf("/")!=-1?e.lastIndexOf(".")!=-1?Eh(e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("."))):e.substring(e.lastIndexOf("/")+1):e.lastIndexOf(".")!=-1?e.substring(0,e.lastIndexOf(".")):e;function vf(e){return Array.isArray(e)?e:typeof e=="string"?[e]:[]}var Dh=(e,r)=>r.indexOf(e)>0?r.indexOf(e):r.length;var Lo=e=>"spaces://"+e;var Eh=e=>e.charAt(0)=="/"?e.substring(1):e;function si(e){return si=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},si(e)}function Nt(e){if(e===null||e===!0||e===!1)return NaN;var r=Number(e);return isNaN(r)?r:r<0?Math.ceil(r):Math.floor(r)}function ke(e,r){if(r.length1?"s":"")+" required, but only "+r.length+" present")}function et(e){ke(1,arguments);var r=Object.prototype.toString.call(e);return e instanceof Date||si(e)==="object"&&r==="[object Date]"?new Date(e.getTime()):typeof e=="number"||r==="[object Number]"?new Date(e):((typeof e=="string"||r==="[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 wf(e,r){ke(2,arguments);var a=et(e).getTime(),u=Nt(r);return new Date(a+u)}var lx={};function An(){return lx}function Sf(e){var r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),e.getTime()-r.getTime()}function _f(e){return ke(1,arguments),e instanceof Date||si(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function bf(e){if(ke(1,arguments),!_f(e)&&typeof e!="number")return!1;var r=et(e);return!isNaN(Number(r))}function kf(e,r){ke(2,arguments);var a=Nt(r);return wf(e,-a)}var fx=864e5;function Cf(e){ke(1,arguments);var r=et(e),a=r.getTime();r.setUTCMonth(0,1),r.setUTCHours(0,0,0,0);var u=r.getTime(),l=a-u;return Math.floor(l/fx)+1}function Fn(e){ke(1,arguments);var r=1,a=et(e),u=a.getUTCDay(),l=(u=l.getTime()?a+1:r.getTime()>=v.getTime()?a:a-1}function Tf(e){ke(1,arguments);var r=ts(e),a=new Date(0);a.setUTCFullYear(r,0,4),a.setUTCHours(0,0,0,0);var u=Fn(a);return u}var cx=6048e5;function Pf(e){ke(1,arguments);var r=et(e),a=Fn(r).getTime()-Tf(r).getTime();return Math.round(a/cx)+1}function Nn(e,r){var a,u,l,p,v,C,T,A;ke(1,arguments);var R=An(),V=Nt((a=(u=(l=(p=r?.weekStartsOn)!==null&&p!==void 0?p:r==null||(v=r.locale)===null||v===void 0||(C=v.options)===null||C===void 0?void 0:C.weekStartsOn)!==null&&l!==void 0?l:R.weekStartsOn)!==null&&u!==void 0?u:(T=R.locale)===null||T===void 0||(A=T.options)===null||A===void 0?void 0:A.weekStartsOn)!==null&&a!==void 0?a:0);if(!(V>=0&&V<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var K=et(e),re=K.getUTCDay(),N=(re=1&&re<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var N=new Date(0);N.setUTCFullYear(V+1,0,re),N.setUTCHours(0,0,0,0);var _e=Nn(N,r),Le=new Date(0);Le.setUTCFullYear(V,0,re),Le.setUTCHours(0,0,0,0);var ye=Nn(Le,r);return R.getTime()>=_e.getTime()?V+1:R.getTime()>=ye.getTime()?V:V-1}function Ef(e,r){var a,u,l,p,v,C,T,A;ke(1,arguments);var R=An(),V=Nt((a=(u=(l=(p=r?.firstWeekContainsDate)!==null&&p!==void 0?p:r==null||(v=r.locale)===null||v===void 0||(C=v.options)===null||C===void 0?void 0:C.firstWeekContainsDate)!==null&&l!==void 0?l:R.firstWeekContainsDate)!==null&&u!==void 0?u:(T=R.locale)===null||T===void 0||(A=T.options)===null||A===void 0?void 0:A.firstWeekContainsDate)!==null&&a!==void 0?a:1),K=rs(e,r),re=new Date(0);re.setUTCFullYear(K,0,V),re.setUTCHours(0,0,0,0);var N=Nn(re,r);return N}var hx=6048e5;function Df(e,r){ke(1,arguments);var a=et(e),u=Nn(a,r).getTime()-Ef(a,r).getTime();return Math.round(u/hx)+1}function Se(e,r){for(var a=e<0?"-":"",u=Math.abs(e).toString();u.length0?u:1-u;return Se(a==="yy"?l%100:l,a.length)},M:function(r,a){var u=r.getUTCMonth();return a==="M"?String(u+1):Se(u+1,2)},d:function(r,a){return Se(r.getUTCDate(),a.length)},a:function(r,a){var u=r.getUTCHours()/12>=1?"pm":"am";switch(a){case"a":case"aa":return u.toUpperCase();case"aaa":return u;case"aaaaa":return u[0];case"aaaa":default:return u==="am"?"a.m.":"p.m."}},h:function(r,a){return Se(r.getUTCHours()%12||12,a.length)},H:function(r,a){return Se(r.getUTCHours(),a.length)},m:function(r,a){return Se(r.getUTCMinutes(),a.length)},s:function(r,a){return Se(r.getUTCSeconds(),a.length)},S:function(r,a){var u=a.length,l=r.getUTCMilliseconds(),p=Math.floor(l*Math.pow(10,u-3));return Se(p,a.length)}},un=px;var na={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},dx={G:function(r,a,u){var l=r.getUTCFullYear()>0?1:0;switch(a){case"G":case"GG":case"GGG":return u.era(l,{width:"abbreviated"});case"GGGGG":return u.era(l,{width:"narrow"});case"GGGG":default:return u.era(l,{width:"wide"})}},y:function(r,a,u){if(a==="yo"){var l=r.getUTCFullYear(),p=l>0?l:1-l;return u.ordinalNumber(p,{unit:"year"})}return un.y(r,a)},Y:function(r,a,u,l){var p=rs(r,l),v=p>0?p:1-p;if(a==="YY"){var C=v%100;return Se(C,2)}return a==="Yo"?u.ordinalNumber(v,{unit:"year"}):Se(v,a.length)},R:function(r,a){var u=ts(r);return Se(u,a.length)},u:function(r,a){var u=r.getUTCFullYear();return Se(u,a.length)},Q:function(r,a,u){var l=Math.ceil((r.getUTCMonth()+1)/3);switch(a){case"Q":return String(l);case"QQ":return Se(l,2);case"Qo":return u.ordinalNumber(l,{unit:"quarter"});case"QQQ":return u.quarter(l,{width:"abbreviated",context:"formatting"});case"QQQQQ":return u.quarter(l,{width:"narrow",context:"formatting"});case"QQQQ":default:return u.quarter(l,{width:"wide",context:"formatting"})}},q:function(r,a,u){var l=Math.ceil((r.getUTCMonth()+1)/3);switch(a){case"q":return String(l);case"qq":return Se(l,2);case"qo":return u.ordinalNumber(l,{unit:"quarter"});case"qqq":return u.quarter(l,{width:"abbreviated",context:"standalone"});case"qqqqq":return u.quarter(l,{width:"narrow",context:"standalone"});case"qqqq":default:return u.quarter(l,{width:"wide",context:"standalone"})}},M:function(r,a,u){var l=r.getUTCMonth();switch(a){case"M":case"MM":return un.M(r,a);case"Mo":return u.ordinalNumber(l+1,{unit:"month"});case"MMM":return u.month(l,{width:"abbreviated",context:"formatting"});case"MMMMM":return u.month(l,{width:"narrow",context:"formatting"});case"MMMM":default:return u.month(l,{width:"wide",context:"formatting"})}},L:function(r,a,u){var l=r.getUTCMonth();switch(a){case"L":return String(l+1);case"LL":return Se(l+1,2);case"Lo":return u.ordinalNumber(l+1,{unit:"month"});case"LLL":return u.month(l,{width:"abbreviated",context:"standalone"});case"LLLLL":return u.month(l,{width:"narrow",context:"standalone"});case"LLLL":default:return u.month(l,{width:"wide",context:"standalone"})}},w:function(r,a,u,l){var p=Df(r,l);return a==="wo"?u.ordinalNumber(p,{unit:"week"}):Se(p,a.length)},I:function(r,a,u){var l=Pf(r);return a==="Io"?u.ordinalNumber(l,{unit:"week"}):Se(l,a.length)},d:function(r,a,u){return a==="do"?u.ordinalNumber(r.getUTCDate(),{unit:"date"}):un.d(r,a)},D:function(r,a,u){var l=Cf(r);return a==="Do"?u.ordinalNumber(l,{unit:"dayOfYear"}):Se(l,a.length)},E:function(r,a,u){var l=r.getUTCDay();switch(a){case"E":case"EE":case"EEE":return u.day(l,{width:"abbreviated",context:"formatting"});case"EEEEE":return u.day(l,{width:"narrow",context:"formatting"});case"EEEEEE":return u.day(l,{width:"short",context:"formatting"});case"EEEE":default:return u.day(l,{width:"wide",context:"formatting"})}},e:function(r,a,u,l){var p=r.getUTCDay(),v=(p-l.weekStartsOn+8)%7||7;switch(a){case"e":return String(v);case"ee":return Se(v,2);case"eo":return u.ordinalNumber(v,{unit:"day"});case"eee":return u.day(p,{width:"abbreviated",context:"formatting"});case"eeeee":return u.day(p,{width:"narrow",context:"formatting"});case"eeeeee":return u.day(p,{width:"short",context:"formatting"});case"eeee":default:return u.day(p,{width:"wide",context:"formatting"})}},c:function(r,a,u,l){var p=r.getUTCDay(),v=(p-l.weekStartsOn+8)%7||7;switch(a){case"c":return String(v);case"cc":return Se(v,a.length);case"co":return u.ordinalNumber(v,{unit:"day"});case"ccc":return u.day(p,{width:"abbreviated",context:"standalone"});case"ccccc":return u.day(p,{width:"narrow",context:"standalone"});case"cccccc":return u.day(p,{width:"short",context:"standalone"});case"cccc":default:return u.day(p,{width:"wide",context:"standalone"})}},i:function(r,a,u){var l=r.getUTCDay(),p=l===0?7:l;switch(a){case"i":return String(p);case"ii":return Se(p,a.length);case"io":return u.ordinalNumber(p,{unit:"day"});case"iii":return u.day(l,{width:"abbreviated",context:"formatting"});case"iiiii":return u.day(l,{width:"narrow",context:"formatting"});case"iiiiii":return u.day(l,{width:"short",context:"formatting"});case"iiii":default:return u.day(l,{width:"wide",context:"formatting"})}},a:function(r,a,u){var l=r.getUTCHours(),p=l/12>=1?"pm":"am";switch(a){case"a":case"aa":return u.dayPeriod(p,{width:"abbreviated",context:"formatting"});case"aaa":return u.dayPeriod(p,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return u.dayPeriod(p,{width:"narrow",context:"formatting"});case"aaaa":default:return u.dayPeriod(p,{width:"wide",context:"formatting"})}},b:function(r,a,u){var l=r.getUTCHours(),p;switch(l===12?p=na.noon:l===0?p=na.midnight:p=l/12>=1?"pm":"am",a){case"b":case"bb":return u.dayPeriod(p,{width:"abbreviated",context:"formatting"});case"bbb":return u.dayPeriod(p,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return u.dayPeriod(p,{width:"narrow",context:"formatting"});case"bbbb":default:return u.dayPeriod(p,{width:"wide",context:"formatting"})}},B:function(r,a,u){var l=r.getUTCHours(),p;switch(l>=17?p=na.evening:l>=12?p=na.afternoon:l>=4?p=na.morning:p=na.night,a){case"B":case"BB":case"BBB":return u.dayPeriod(p,{width:"abbreviated",context:"formatting"});case"BBBBB":return u.dayPeriod(p,{width:"narrow",context:"formatting"});case"BBBB":default:return u.dayPeriod(p,{width:"wide",context:"formatting"})}},h:function(r,a,u){if(a==="ho"){var l=r.getUTCHours()%12;return l===0&&(l=12),u.ordinalNumber(l,{unit:"hour"})}return un.h(r,a)},H:function(r,a,u){return a==="Ho"?u.ordinalNumber(r.getUTCHours(),{unit:"hour"}):un.H(r,a)},K:function(r,a,u){var l=r.getUTCHours()%12;return a==="Ko"?u.ordinalNumber(l,{unit:"hour"}):Se(l,a.length)},k:function(r,a,u){var l=r.getUTCHours();return l===0&&(l=24),a==="ko"?u.ordinalNumber(l,{unit:"hour"}):Se(l,a.length)},m:function(r,a,u){return a==="mo"?u.ordinalNumber(r.getUTCMinutes(),{unit:"minute"}):un.m(r,a)},s:function(r,a,u){return a==="so"?u.ordinalNumber(r.getUTCSeconds(),{unit:"second"}):un.s(r,a)},S:function(r,a){return un.S(r,a)},X:function(r,a,u,l){var p=l._originalDate||r,v=p.getTimezoneOffset();if(v===0)return"Z";switch(a){case"X":return Oh(v);case"XXXX":case"XX":return oi(v);case"XXXXX":case"XXX":default:return oi(v,":")}},x:function(r,a,u,l){var p=l._originalDate||r,v=p.getTimezoneOffset();switch(a){case"x":return Oh(v);case"xxxx":case"xx":return oi(v);case"xxxxx":case"xxx":default:return oi(v,":")}},O:function(r,a,u,l){var p=l._originalDate||r,v=p.getTimezoneOffset();switch(a){case"O":case"OO":case"OOO":return"GMT"+Mh(v,":");case"OOOO":default:return"GMT"+oi(v,":")}},z:function(r,a,u,l){var p=l._originalDate||r,v=p.getTimezoneOffset();switch(a){case"z":case"zz":case"zzz":return"GMT"+Mh(v,":");case"zzzz":default:return"GMT"+oi(v,":")}},t:function(r,a,u,l){var p=l._originalDate||r,v=Math.floor(p.getTime()/1e3);return Se(v,a.length)},T:function(r,a,u,l){var p=l._originalDate||r,v=p.getTime();return Se(v,a.length)}};function Mh(e,r){var a=e>0?"-":"+",u=Math.abs(e),l=Math.floor(u/60),p=u%60;if(p===0)return a+String(l);var v=r||"";return a+String(l)+v+Se(p,2)}function Oh(e,r){if(e%60===0){var a=e>0?"-":"+";return a+Se(Math.abs(e)/60,2)}return oi(e,r)}function oi(e,r){var a=r||"",u=e>0?"-":"+",l=Math.abs(e),p=Se(Math.floor(l/60),2),v=Se(l%60,2);return u+p+a+v}var Ah=dx;var Fh=function(r,a){switch(r){case"P":return a.date({width:"short"});case"PP":return a.date({width:"medium"});case"PPP":return a.date({width:"long"});case"PPPP":default:return a.date({width:"full"})}},Nh=function(r,a){switch(r){case"p":return a.time({width:"short"});case"pp":return a.time({width:"medium"});case"ppp":return a.time({width:"long"});case"pppp":default:return a.time({width:"full"})}},mx=function(r,a){var u=r.match(/(P+)(p+)?/)||[],l=u[1],p=u[2];if(!p)return Fh(r,a);var v;switch(l){case"P":v=a.dateTime({width:"short"});break;case"PP":v=a.dateTime({width:"medium"});break;case"PPP":v=a.dateTime({width:"long"});break;case"PPPP":default:v=a.dateTime({width:"full"});break}return v.replace("{{date}}",Fh(l,a)).replace("{{time}}",Nh(p,a))},gx={p:Nh,P:mx},Lh=gx;var yx=["D","DD"],xx=["YY","YYYY"];function Rh(e){return yx.indexOf(e)!==-1}function Wh(e){return xx.indexOf(e)!==-1}function If(e,r,a){if(e==="YYYY")throw new RangeError("Use \`yyyy\` instead of \`YYYY\` (in \`".concat(r,"\`) for formatting years to the input \`").concat(a,"\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use \`yy\` instead of \`YY\` (in \`".concat(r,"\`) for formatting years to the input \`").concat(a,"\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use \`d\` instead of \`D\` (in \`".concat(r,"\`) for formatting days of the month to the input \`").concat(a,"\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use \`dd\` instead of \`DD\` (in \`".concat(r,"\`) for formatting days of the month to the input \`").concat(a,"\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var vx={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"}},wx=function(r,a,u){var l,p=vx[r];return typeof p=="string"?l=p:a===1?l=p.one:l=p.other.replace("{{count}}",a.toString()),u!=null&&u.addSuffix?u.comparison&&u.comparison>0?"in "+l:l+" ago":l},Yh=wx;function ns(e){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=r.width?String(r.width):e.defaultWidth,u=e.formats[a]||e.formats[e.defaultWidth];return u}}var Sx={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},_x={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},bx={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},kx={date:ns({formats:Sx,defaultWidth:"full"}),time:ns({formats:_x,defaultWidth:"full"}),dateTime:ns({formats:bx,defaultWidth:"full"})},Bh=kx;var Cx={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Tx=function(r,a,u,l){return Cx[r]},Vh=Tx;function ui(e){return function(r,a){var u=a!=null&&a.context?String(a.context):"standalone",l;if(u==="formatting"&&e.formattingValues){var p=e.defaultFormattingWidth||e.defaultWidth,v=a!=null&&a.width?String(a.width):p;l=e.formattingValues[v]||e.formattingValues[p]}else{var C=e.defaultWidth,T=a!=null&&a.width?String(a.width):e.defaultWidth;l=e.values[T]||e.values[C]}var A=e.argumentCallback?e.argumentCallback(r):r;return l[A]}}var Px={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ex={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Dx={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"]},Ix={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"]},Mx={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"}},Ox={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"}},Ax=function(r,a){var u=Number(r),l=u%100;if(l>20||l<10)switch(l%10){case 1:return u+"st";case 2:return u+"nd";case 3:return u+"rd"}return u+"th"},Fx={ordinalNumber:Ax,era:ui({values:Px,defaultWidth:"wide"}),quarter:ui({values:Ex,defaultWidth:"wide",argumentCallback:function(r){return r-1}}),month:ui({values:Dx,defaultWidth:"wide"}),day:ui({values:Ix,defaultWidth:"wide"}),dayPeriod:ui({values:Mx,defaultWidth:"wide",formattingValues:Ox,defaultFormattingWidth:"wide"})},Uh=Fx;function li(e){return function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=a.width,l=u&&e.matchPatterns[u]||e.matchPatterns[e.defaultMatchWidth],p=r.match(l);if(!p)return null;var v=p[0],C=u&&e.parsePatterns[u]||e.parsePatterns[e.defaultParseWidth],T=Array.isArray(C)?Lx(C,function(V){return V.test(v)}):Nx(C,function(V){return V.test(v)}),A;A=e.valueCallback?e.valueCallback(T):T,A=a.valueCallback?a.valueCallback(A):A;var R=r.slice(v.length);return{value:A,rest:R}}}function Nx(e,r){for(var a in e)if(e.hasOwnProperty(a)&&r(e[a]))return a}function Lx(e,r){for(var a=0;a1&&arguments[1]!==void 0?arguments[1]:{},u=r.match(e.matchPattern);if(!u)return null;var l=u[0],p=r.match(e.parsePattern);if(!p)return null;var v=e.valueCallback?e.valueCallback(p[0]):p[0];v=a.valueCallback?a.valueCallback(v):v;var C=r.slice(l.length);return{value:v,rest:C}}}var Rx=/^(\\d+)(th|st|nd|rd)?/i,Wx=/\\d+/i,Yx={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},Bx={any:[/^b/i,/^(a|c)/i]},Vx={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ux={any:[/1/i,/2/i,/3/i,/4/i]},Hx={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},qx={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]},Gx={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},zx={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]},$x={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},jx={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}},Qx={ordinalNumber:Mf({matchPattern:Rx,parsePattern:Wx,valueCallback:function(r){return parseInt(r,10)}}),era:li({matchPatterns:Yx,defaultMatchWidth:"wide",parsePatterns:Bx,defaultParseWidth:"any"}),quarter:li({matchPatterns:Vx,defaultMatchWidth:"wide",parsePatterns:Ux,defaultParseWidth:"any",valueCallback:function(r){return r+1}}),month:li({matchPatterns:Hx,defaultMatchWidth:"wide",parsePatterns:qx,defaultParseWidth:"any"}),day:li({matchPatterns:Gx,defaultMatchWidth:"wide",parsePatterns:zx,defaultParseWidth:"any"}),dayPeriod:li({matchPatterns:$x,defaultMatchWidth:"any",parsePatterns:jx,defaultParseWidth:"any"})},Hh=Qx;var Kx={code:"en-US",formatDistance:Yh,formatLong:Bh,formatRelative:Vh,localize:Uh,match:Hh,options:{weekStartsOn:0,firstWeekContainsDate:1}},qh=Kx;var Gh=qh;var Zx=/[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g,Xx=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Jx=/^'([^]*?)'?$/,ev=/''/g,tv=/[a-zA-Z]/;function fi(e,r,a){var u,l,p,v,C,T,A,R,V,K,re,N,_e,Le,ye,de,We,ze;ke(2,arguments);var $e=String(r),Pe=An(),tt=(u=(l=a?.locale)!==null&&l!==void 0?l:Pe.locale)!==null&&u!==void 0?u:Gh,je=Nt((p=(v=(C=(T=a?.firstWeekContainsDate)!==null&&T!==void 0?T:a==null||(A=a.locale)===null||A===void 0||(R=A.options)===null||R===void 0?void 0:R.firstWeekContainsDate)!==null&&C!==void 0?C:Pe.firstWeekContainsDate)!==null&&v!==void 0?v:(V=Pe.locale)===null||V===void 0||(K=V.options)===null||K===void 0?void 0:K.firstWeekContainsDate)!==null&&p!==void 0?p:1);if(!(je>=1&&je<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var pr=Nt((re=(N=(_e=(Le=a?.weekStartsOn)!==null&&Le!==void 0?Le:a==null||(ye=a.locale)===null||ye===void 0||(de=ye.options)===null||de===void 0?void 0:de.weekStartsOn)!==null&&_e!==void 0?_e:Pe.weekStartsOn)!==null&&N!==void 0?N:(We=Pe.locale)===null||We===void 0||(ze=We.options)===null||ze===void 0?void 0:ze.weekStartsOn)!==null&&re!==void 0?re:0);if(!(pr>=0&&pr<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!tt.localize)throw new RangeError("locale must contain localize property");if(!tt.formatLong)throw new RangeError("locale must contain formatLong property");var jt=et(e);if(!bf(jt))throw new RangeError("Invalid time value");var me=Sf(jt),at=kf(jt,me),mt={firstWeekContainsDate:je,weekStartsOn:pr,locale:tt,_originalDate:jt},Rt=$e.match(Xx).map(function(Oe){var Qe=Oe[0];if(Qe==="p"||Qe==="P"){var Wt=Lh[Qe];return Wt(Oe,tt.formatLong)}return Oe}).join("").match(Zx).map(function(Oe){if(Oe==="''")return"'";var Qe=Oe[0];if(Qe==="'")return rv(Oe);var Wt=Ah[Qe];if(Wt)return!(a!=null&&a.useAdditionalWeekYearTokens)&&Wh(Oe)&&If(Oe,r,String(e)),!(a!=null&&a.useAdditionalDayOfYearTokens)&&Rh(Oe)&&If(Oe,r,String(e)),Wt(at,Oe,tt.localize,mt);if(Qe.match(tv))throw new RangeError("Format string contains an unescaped latin alphabet character \`"+Qe+"\`");return Oe}).join("");return Rt}function rv(e){var r=e.match(Jx);return r?r[1].replace(ev,"'"):e}var Of=(e,r)=>{if(e instanceof Date)return"date";if(typeof e=="string"){if(/\\/\\/(\\S+?(?:jpe?g|png|gif|svg))/gi.test(e)||e.includes("unsplash"))return"image";if(/^\\d{4}-\\d{2}-\\d{2}$/.test(e))return"date";if(r=="tag"||r=="tags")return"tag";if(/\\[\\[.*?\\]\\]/.test(e))return"link"}else{if(typeof e=="number")return"number";if(typeof e=="boolean")return"boolean";if(e)if(Array.isArray(e)||typeof e=="string"&&e.indexOf(",")>-1){let a=Array.isArray(e)?e:[];if(typeof e=="string"&&e.indexOf(",")>-1&&(a=sr(e)),r=="tag"||r=="tags")return"tag-multi";if(a.length==1&&Array.isArray(a[0])&&a[0].length==1&&typeof a[0][0]=="string")return"link";let u=sn(a.map(l=>Of(l,r)));return u.length==1&&u[0]=="link"?"link-multi":u.some(l=>l=="object")?"object-multi":"option-multi"}else{if(e.isLuxonDateTime)return"date";if(e.isLuxonDuration)return"duration";if(e.type=="file")return"link";if(typeof e=="object"&&!Array.isArray(e)&&e!==null)return"object"}else return"unknown"}return"text"};var zh=e=>e.map(r=>r.replace(",","\\\\,")).join(", "),ci=e=>e.map(r=>r.replace(",","\\\\,")).join(", ");var sr=e=>(e?.replace("\\\\,",",").match(/(\\\\.|[^,])+/g)??[]).map(r=>r.trim()),Af=(e,r)=>{switch(Of(r,e)){case"object":return JSON.stringify(r);case"number":return r.toString();case"boolean":return r?"true":"false";case"date":{if(r instanceof Date){let u=fi(r,"yyyy-MM-dd");if(typeof u=="string")return u}return typeof r!="string"?"":r}break;case"duration":return zh(Object.keys(r.values).reduce((u,l)=>[...u,...r.values[l]>0?[r.values[l]+" "+l]:[]],[]));case"option-multi":case"link-multi":return typeof r=="string"?is(r):ci(r.map(u=>u?typeof u=="string"?is(u):u.path?u.path:Array.isArray(r)&&u.length==1&&Array.isArray(u[0])&&u[0].length==1&&typeof u[0][0]=="string"?u[0][0]:JSON.stringify(u):""));case"link":return Array.isArray(r)&&r.length==1&&Array.isArray(r[0])&&r[0].length==1&&typeof r[0][0]=="string"?r[0][0]:typeof r=="string"?is(r):r.path;case"text":case"tag":case"image":return r}return""};var is=e=>{if(!e)return"";let r=/\\[\\[(.*?)\\]\\]/g.exec(e),a=r?.length>1?r[1].substring(0,Dh("|",r[1])):e;return a||e};var Ro=(e,r)=>e==r,Ff=(e,r)=>(e??"").length==0,Nf=(e,r)=>(e??"").toLowerCase().includes((r??"").toLowerCase()),Lf=(e,r)=>parseFloat(e)>parseFloat(r),Rf=(e,r)=>parseInt(e)>parseInt(r),$h=(e,r)=>{let a=isNaN(Date.parse(e))?new Date(parseInt(e)):new Date(e),u=isNaN(Date.parse(r))?new Date(parseInt(r)):new Date(r);return a.valueOf()>u.valueOf()},jh=(e,r)=>{let a=isNaN(Date.parse(e))?new Date(parseInt(e)):new Date(e),u=isNaN(Date.parse(r))?new Date(parseInt(r)):new Date(r);return a.valueOf(){let a=e?sr(e):[];return(r?sr(r):[]).some(l=>a.some(p=>p==l))},Qh=(e,r)=>{if(!e)return!1;let a=new Date(\`\${e.toString().replace(".",":")}\`),u=new Date(\`\${r}\`);return a.getMonth()===u.getMonth()&&a.getDate()===u.getDate()},Kh=e=>{if(!e)return!1;let r=new Date(\`\${e.toString()}T00:00\`),a=new Date;return r.getMonth()===a.getMonth()&&r.getDate()===a.getDate()};var as={isNotEmpty:{type:["text","file","link","link-multi","fileprop","image"],fn:(e,r)=>!Ff(e,""),valueType:"none"},isEmpty:{type:["text","file","link","link-multi","fileprop","image"],fn:(e,r)=>Ff(e,""),valueType:"none"},include:{fn:(e,r)=>Nf(e,r),type:["text","file","link","link-multi","fileprop","image"],valueType:"text"},notInclude:{type:["text","file","link","link-multi","fileprop","image"],fn:(e,r)=>!Nf(e,r),valueType:"text"},is:{type:["text","file","link","context","fileprop"],fn:(e,r)=>Ro(e,r),valueType:"text"},isNot:{type:["text","file","link","context","fileprop"],fn:(e,r)=>!Ro(e,r),valueType:"text"},equal:{type:["number"],fn:(e,r)=>Ro(e,r),valueType:"number"},isGreatThan:{type:["number"],fn:(e,r)=>Lf(e,r),valueType:"number"},isLessThan:{type:["number"],fn:(e,r)=>Rf(e,r),valueType:"number"},isLessThanOrEqual:{type:["number"],fn:(e,r)=>!Lf(e,r),valueType:"number"},isGreatThanOrEqual:{type:["number"],fn:(e,r)=>!Rf(e,r),valueType:"number"},dateBefore:{type:["date","fileprop"],fn:(e,r)=>jh(e,r),valueType:"date"},dateAfter:{type:["date","fileprop"],fn:(e,r)=>$h(e,r),valueType:"date"},isSameDate:{type:["date"],fn:(e,r)=>Qh(e,r),valueType:"date"},isSameDateAsToday:{type:["date"],fn:(e,r)=>Kh(e,r),valueType:"none"},isAnyInList:{type:["option","context","option-multi","context-multi","tags-multi","tags"],fn:(e,r)=>Wf(e,r),valueType:"list"},isNoneInList:{type:["option","context","option-multi","context-multi","tags-multi","tags"],fn:(e,r)=>!Wf(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 nv=(e,r)=>r.reduce((u,l)=>{let[p,v]=u,C=l.type=="path"?Xh(v,l):l.type=="frontmatter"?Zh(v,l):Jh(v,l),T=v.filter(A=>!C.includes(A));return[[...p,...C],T]},[[],e])[0],iv=(e,r)=>r.reduce((a,u)=>u.type=="path"?Xh(a,u):u.type=="frontmatter"?Zh(a,u):Jh(a,u),e),Zh=(e,r)=>e.filter(a=>{let u=a.metadata?.property;if(!u||!u[r.field])return!1;let l=as[r.fn],p=!0;return l&&(p=l.fn(Af(r.field,u[r.field]),r.value)),p}),Xh=(e,r)=>e.filter(a=>{let u="";r.field=="outlinks"?u=ci(a.outlinks??[]):r.field=="inlinks"?u=ci(a.inlinks??[]):r.field=="tags"&&(u=ci(a.tags??[]));let l=as[r.fn],p=!0;return l&&(p=l.fn(u,r.value)),p}),Jh=(e,r)=>e.filter(a=>{let u=as[r.fn],l=!0;return u&&(l=u.fn(a.metadata?.[r.type]?.[r.field],r.value)),l}),Yf=(e,r)=>e.reduce((u,l)=>!u||l.filters.length==0?!1:l.type=="any"?nv([r],l.filters).length>0:iv([r],l.filters).length>0,!0);var tp=Ao(ep()),Vf=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",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)",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"},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",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 Smart Search",addItem:"Add Item",addProperty:"Add 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",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:"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:"Smart Search",filesAndFolders:"Files and Folders"},labels:{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",renameSectionSmart:"Edit Smart Space",renameSection:"Edit Space",createSectionSmart:"New Smart 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",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",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."},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"},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=tp.default.locale();["en"].includes(r)&&(this.lang=r)}get texts(){return this.all.en}},fe=new Vf().texts;var YS=[{type:"unknown",label:"",restricted:!0,icon:"ui//file-question"},{type:"text",label:fe.properties.text.label,metadata:!0,icon:"ui//text",description:fe.properties.text.description},{type:"number",label:fe.properties.number.label,metadata:!0,icon:"ui//binary",configKeys:["unit"],description:fe.properties.number.description},{type:"boolean",label:fe.properties.boolean.label,metadata:!0,icon:"ui//check-square",description:fe.properties.boolean.description},{type:"date",label:fe.properties.date.label,metadata:!0,icon:"ui//calendar",configKeys:["format"],description:fe.properties.date.description},{type:"option",label:fe.properties.option.label,multi:!0,multiType:"option-multi",icon:"ui//list",configKeys:["options","source"],description:fe.properties.option.description},{type:"tags",label:fe.properties.tags.label,icon:"ui//tags",description:fe.properties.tags.description},{type:"file",label:fe.properties.file.label,restricted:!0,icon:"ui//mk-make-h3"},{type:"fileprop",label:fe.properties.fileProperty.label,icon:"ui//formula",configKeys:["field","value"],description:fe.properties.fileProperty.description},{type:"link",label:fe.properties.link.label,multi:!0,multiType:"link-multi",metadata:!0,icon:"ui//file-text",description:fe.properties.link.description},{type:"context",label:fe.properties.context.label,icon:"ui//mk-make-note",multi:!0,multiType:"context-multi",configKeys:["space"],description:fe.properties.context.description},{type:"object",label:fe.properties.object.label,multi:!0,multiType:"object-multi",metadata:!0,icon:"ui//list-tree",configKeys:["type"],description:fe.properties.object.description},{type:"icon",label:fe.properties.icon.label,multi:!0,multiType:"icon-multi",icon:"ui//gem",restricted:!0,description:fe.properties.icon.description},{type:"image",label:fe.properties.image.label,multi:!0,multiType:"image-multi",metadata:!0,icon:"ui//mk-make-image",description:fe.properties.image.description},{type:"color",label:fe.properties.color.label,icon:"ui//mk-make-image",restricted:!0,description:fe.properties.color.description},{type:"space",label:fe.properties.space.label,icon:"ui//layout-grid",restricted:!0,description:fe.properties.space.description},{type:"table",label:fe.properties.space.label,icon:"ui//layout-grid",restricted:!0,description:fe.properties.space.description},{type:"super",label:fe.properties.super.label,icon:"ui//zap",restricted:!0,configKeys:["dynamic","field"]},{type:"input",label:fe.properties.super.label,icon:"ui//input",restricted:!0}];var hi="files",Bo={id:hi,name:"Files",type:"db",primary:"true"},av="filesView",sv={id:av,name:"All",type:"view",def:JSON.stringify({db:hi,icon:"ui//file-stack"})},ov="main",uv=e=>({id:e,name:e,type:"frame",def:"",predicate:"",primary:"true"}),BS={uniques:[],cols:["id","name","type","def","predicate","primary"],rows:[uv(ov),sv]},Wo={uniques:[],cols:["id","name","type","def","predicate","primary"],rows:[Bo]},rp={uniques:["name,schemaId"],cols:["name","schemaId","type","value","attrs","hidden","unique","primary"]},Yo={...rp,rows:[{name:on,schemaId:hi,type:"file",primary:"true",hidden:"",unique:"",attrs:"",value:""},{name:fe.properties.fileProperty.createdTime,schemaId:hi,type:"fileprop",value:on+".ctime",hidden:"",unique:"",attrs:"",primary:"true"}]};var VS=[{name:fe.properties.defaultField,schemaId:"",type:"text",primary:"true"}],Uf={...rp,rows:[{name:on,schemaId:hi,type:"file",primary:"true",hidden:"",unique:"",attrs:"",value:""}]};var US={schema:Bo,cols:Yo.rows,rows:[]},HS={schema:Bo,cols:Yo.rows,rows:[]},qS={schema:Bo,cols:Uf.rows,rows:[]},np=(e,r)=>e.filter(a=>r.find(u=>u.id==a.schemaId&&u.type=="db")).reduce((a,u)=>({...a,...a[u.schemaId]?{[u.schemaId]:{uniques:u.unique=="true"?[...a[u.schemaId].uniques,u.name]:a[u.schemaId].uniques,cols:[...a[u.schemaId].cols,u.name],rows:[]}}:{[u.schemaId]:{uniques:u.unique=="true"?[u.name]:[],cols:[u.name],rows:[]}}}),{});var GS={m_schema:Wo,m_fields:Yo,...np(Yo.rows,Wo.rows)},zS={m_schema:Wo,m_fields:Uf,...np(Uf.rows,Wo.rows)};var ip=(e,r)=>e.hiddenExtensions.some(a=>r.endsWith(a))||r.startsWith(e.spacesFolder+"/#")||e.hiddenFiles.some(a=>a==r);var ap=(e,r,a)=>{if(!e)return{changed:!1,cache:null};if(!r)return{changed:!1,cache:{path:e.path,frames:{},schemas:[]}};let u=Object.values(r).map(C=>C.schema),l=u.filter(C=>C.type=="frame").reduce((C,T)=>({...C,[T.id]:r[T.id]}),{}),p={path:e.path,frames:l,schemas:u},v=!0;return a&&Vo.default.isEqual(p,a)&&(v=!1),{changed:v,cache:p}},sp=(e,r,a,u,l)=>{let p={};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:p,dbExists:!1}};let v=Object.values(r).map(de=>de.schema),C=v.find(de=>de.primary=="true"),T=r[C.id],A=r,R=T.cols?.filter(de=>de.type.startsWith("context"))??[],V=T.cols?.filter(de=>de.type.startsWith("link"))??[],K=sn(R.map(de=>de.value));R.forEach(de=>{p[de.name]={},T.rows.forEach(We=>{sr(We[de.name]).forEach(ze=>p[de.name][ze]=[...p[de.name][ze]??[],We[on]])})});let re=A[hi]?.rows?.map(de=>de[on])??[],N=Ph(a??[],re),_e=sn(T.rows.reduce((de,We)=>sn([...de,...[...R,...V].flatMap(ze=>sr(We[ze.name]).map($e=>is($e)))]),[])),Le={cols:T.cols,path:e.path,contexts:K,outlinks:_e,paths:N,tables:A,schemas:v,space:e,spaceMap:p,dbExists:l},ye=!0;return u&&Vo.default.isEqual(Le,u)&&(ye=!0),{changed:ye,cache:Le}},op=(e,r,a,u)=>{let l={};for(let[p,v]of e){let C=a.get(p)?.defPath??p,T=e.get(C)??v,A=v?.parent??"",R=v?.type??"",V=v?.subtype??"",K=T?.label,re=u?.get(p),{changed:N,cache:_e}=Hf(p,r,a,T,K,R,V,A,re);l[p]={changed:N,cache:_e}}return l},Hf=(e,r,a,u,l,p,v,C,T)=>{let A=(me,at,mt)=>me?.length>0||me?.length>0?me:at=="space"?mt=="Spaces/Home"?"ui//home":mt=="/"?"ui//vault":mt.startsWith("spaces://#")?"ui//tags":"ui//folder":"ui//file",R={label:u?.label,path:e,name:No(e),displayName:No(e)},V=[],K=u?.tags?.map(me=>me)??[],re=ip(r,e),N=(me,at,mt=new Set)=>{let Rt=[];for(let Oe of at){let Qe=me.get(Oe)?.contexts??[];for(let Wt of Qe)mt.has(Wt)||(Rt.push(Wt),mt.add(Wt),Rt.push(...N(me,[Lo(Wt)],mt)))}return Rt};if(a.has(C))for(let me of a.get(C).contexts??[])V.push(me);V.push(...K);let _e=l?.name,Le=u?.properties?vf(u.properties[r.fmKeyAlias]):[],ye=A(l?.sticker,p,e),de=l?.color??"",We=u?.inlinks??[],ze=u?.links??[],$e=r.spacesUseAlias?Le[0]??_e:_e,Pe={...R,name:_e,tags:sn(V),type:p,subtype:v,displayName:$e,parent:C,label:{name:_e,sticker:ye,color:de,thumbnail:l?.thumbnail??"",preview:l?.preview??""},metadata:{...u},inlinks:We,outlinks:ze},tt=[];for(let me of V)tt.push(Lo(me));for(let[me,at]of a){if(at.defPath==e&&(re=!0),at.space&&at.space.path==C){tt.push(me);continue}if(at.metadata?.filters?.length>0&&Yf(at.metadata.filters,Pe)){tt.push(me);continue}if(at.metadata?.links?.length>0&&(at.metadata?.links??[]).find(Rt=>Rt==Pe.path)){tt.push(me);continue}}let je=N(a,tt);tt.push(...je.map(me=>Lo(me))),Pe.tags.push(...je);let pr=re?{...Pe,spaces:[],hidden:re}:{...Pe,spaces:sn(tt),hidden:re},jt=!0;return T&&Vo.default.isEqual(pr,T)&&(jt=!1),{changed:jt,cache:pr}};var qf=Ao(Fo());var lv=(e,r,a)=>{if(e.length!==1)return"";let u=e.map(function(v){return v.compile().evaluate(a)}),l=a.get(u[0]),p=a.get("$properties")?.[u[0]]?.type;return(p=="file"||p=="link"||p=="context")&&(p.includes("multi")?l=sr(l).map(v=>a.get("$paths").get(v)??v):l=a.get("$paths").get(l)??l),l??""};lv.rawArgs=!0;var fv=(e,r,a)=>{if((e.length-1)%2!==0)return"";for(let u=0;u{if(e.length<1||e.length>2)return"";let u=e[0].compile().evaluate(a);u instanceof Date||(u=new Date(u));let l=e[1]?.compile().evaluate(a);return l?.length>0?fi(u,l):fi(u,a.get("$settings")?.dateFormat??"yyyy-MM-dd")};cv.rawArgs=!0;var pv=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239],pp=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],dv="\\u200C\\u200D\\xB7\\u0300-\\u036F\\u0387\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u0669\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u06F0-\\u06F9\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07C0-\\u07C9\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u0898-\\u089F\\u08CA-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096F\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09E6-\\u09EF\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A66-\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AE6-\\u0AEF\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B55-\\u0B57\\u0B62\\u0B63\\u0B66-\\u0B6F\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C04\\u0C3C\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0CE6-\\u0CEF\\u0CF3\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D66-\\u0D6F\\u0D81-\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0E50-\\u0E59\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECE\\u0ED0-\\u0ED9\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1040-\\u1049\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F-\\u109D\\u135D-\\u135F\\u1369-\\u1371\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u180F-\\u1819\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u194F\\u19D0-\\u19DA\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AB0-\\u1ABD\\u1ABF-\\u1ACE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BB0-\\u1BB9\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1C40-\\u1C49\\u1C50-\\u1C59\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DFF\\u200C\\u200D\\u203F\\u2040\\u2054\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\u30FB\\uA620-\\uA629\\uA66F\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA82C\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8D0-\\uA8D9\\uA8E0-\\uA8F1\\uA8FF-\\uA909\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9D0-\\uA9D9\\uA9E5\\uA9F0-\\uA9F9\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA50-\\uAA59\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF10-\\uFF19\\uFF3F\\uFF65",dp="\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u0870-\\u0887\\u0889-\\u088E\\u08A0-\\u08C9\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C5D\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D04-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u1711\\u171F-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4C\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309B-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7CA\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7D9\\uA7F2-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC",Gf={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},zf="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",mv={5:zf,"5module":zf+" export import",6:zf+" const class extends export import super"},gv=/^in(stanceof)?$/,yv=new RegExp("["+dp+"]"),xv=new RegExp("["+dp+dv+"]");function jf(e,r){for(var a=65536,u=0;ue)return!1;if(a+=r[u+1],a>=e)return!0}return!1}function ln(e,r){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&yv.test(String.fromCharCode(e)):r===!1?!1:jf(e,pp)}function aa(e,r){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&xv.test(String.fromCharCode(e)):r===!1?!1:jf(e,pp)||jf(e,pv)}var we=function(r,a){a===void 0&&(a={}),this.label=r,this.keyword=a.keyword,this.beforeExpr=!!a.beforeExpr,this.startsExpr=!!a.startsExpr,this.isLoop=!!a.isLoop,this.isAssign=!!a.isAssign,this.prefix=!!a.prefix,this.postfix=!!a.postfix,this.binop=a.binop||null,this.updateContext=null};function or(e,r){return new we(e,{beforeExpr:!0,binop:r})}var ur={beforeExpr:!0},Lt={startsExpr:!0},Zf={};function pe(e,r){return r===void 0&&(r={}),r.keyword=e,Zf[e]=new we(e,r)}var y={num:new we("num",Lt),regexp:new we("regexp",Lt),string:new we("string",Lt),name:new we("name",Lt),privateId:new we("privateId",Lt),eof:new we("eof"),bracketL:new we("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new we("]"),braceL:new we("{",{beforeExpr:!0,startsExpr:!0}),braceR:new we("}"),parenL:new we("(",{beforeExpr:!0,startsExpr:!0}),parenR:new we(")"),comma:new we(",",ur),semi:new we(";",ur),colon:new we(":",ur),dot:new we("."),question:new we("?",ur),questionDot:new we("?."),arrow:new we("=>",ur),template:new we("template"),invalidTemplate:new we("invalidTemplate"),ellipsis:new we("...",ur),backQuote:new we("\`",Lt),dollarBraceL:new we("\${",{beforeExpr:!0,startsExpr:!0}),eq:new we("=",{beforeExpr:!0,isAssign:!0}),assign:new we("_=",{beforeExpr:!0,isAssign:!0}),incDec:new we("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new we("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:or("||",1),logicalAND:or("&&",2),bitwiseOR:or("|",3),bitwiseXOR:or("^",4),bitwiseAND:or("&",5),equality:or("==/!=/===/!==",6),relational:or("/<=/>=",7),bitShift:or("<>/>>>",8),plusMin:new we("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:or("%",10),star:or("*",10),slash:or("/",10),starstar:new we("**",{beforeExpr:!0}),coalesce:or("??",1),_break:pe("break"),_case:pe("case",ur),_catch:pe("catch"),_continue:pe("continue"),_debugger:pe("debugger"),_default:pe("default",ur),_do:pe("do",{isLoop:!0,beforeExpr:!0}),_else:pe("else",ur),_finally:pe("finally"),_for:pe("for",{isLoop:!0}),_function:pe("function",Lt),_if:pe("if"),_return:pe("return",ur),_switch:pe("switch"),_throw:pe("throw",ur),_try:pe("try"),_var:pe("var"),_const:pe("const"),_while:pe("while",{isLoop:!0}),_with:pe("with"),_new:pe("new",{beforeExpr:!0,startsExpr:!0}),_this:pe("this",Lt),_super:pe("super",Lt),_class:pe("class",Lt),_extends:pe("extends",ur),_export:pe("export"),_import:pe("import",Lt),_null:pe("null",Lt),_true:pe("true",Lt),_false:pe("false",Lt),_in:pe("in",{beforeExpr:!0,binop:7}),_instanceof:pe("instanceof",{beforeExpr:!0,binop:7}),_typeof:pe("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:pe("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:pe("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},cr=/\\r\\n?|\\n|\\u2028|\\u2029/,vv=new RegExp(cr.source,"g");function sa(e){return e===10||e===13||e===8232||e===8233}function mp(e,r,a){a===void 0&&(a=e.length);for(var u=r;u>10)+55296,(e&1023)+56320))}var _v=/(?:[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])/,os=function(r,a){this.line=r,this.column=a};os.prototype.offset=function(r){return new os(this.line,this.column+r)};var zo=function(r,a,u){this.start=a,this.end=u,r.sourceFile!==null&&(this.source=r.sourceFile)};function xp(e,r){for(var a=1,u=0;;){var l=mp(e,u,r);if(l<0)return new os(a,r-u);++a,u=l}}var Qf={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},fp=!1;function bv(e){var r={};for(var a in Qf)r[a]=e&&ls(e,a)?e[a]:Qf[a];if(r.ecmaVersion==="latest"?r.ecmaVersion=1e8:r.ecmaVersion==null?(!fp&&typeof console=="object"&&console.warn&&(fp=!0,console.warn(\`Since Acorn 8.0.0, options.ecmaVersion is required. +Defaulting to 2020, but this will stop working in the future.\`)),r.ecmaVersion=11):r.ecmaVersion>=2015&&(r.ecmaVersion-=2009),r.allowReserved==null&&(r.allowReserved=r.ecmaVersion<5),(!e||e.allowHashBang==null)&&(r.allowHashBang=r.ecmaVersion>=14),up(r.onToken)){var u=r.onToken;r.onToken=function(l){return u.push(l)}}return up(r.onComment)&&(r.onComment=kv(r,r.onComment)),r}function kv(e,r){return function(a,u,l,p,v,C){var T={type:a?"Block":"Line",value:u,start:l,end:p};e.locations&&(T.loc=new zo(this,v,C)),e.ranges&&(T.range=[l,p]),r.push(T)}}var us=1,oa=2,Xf=4,vp=8,wp=16,Sp=32,Jf=64,_p=128,fs=256,ec=us|oa|fs;function tc(e,r){return oa|(e?Xf:0)|(r?vp:0)}var Ho=0,rc=1,cn=2,bp=3,kp=4,Cp=5,ft=function(r,a,u){this.options=r=bv(r),this.sourceFile=r.sourceFile,this.keywords=Ln(mv[r.ecmaVersion>=6?6:r.sourceType==="module"?"5module":5]);var l="";r.allowReserved!==!0&&(l=Gf[r.ecmaVersion>=6?6:r.ecmaVersion===5?5:3],r.sourceType==="module"&&(l+=" await")),this.reservedWords=Ln(l);var p=(l?l+" ":"")+Gf.strict;this.reservedWordsStrict=Ln(p),this.reservedWordsStrictBind=Ln(p+" "+Gf.strictBind),this.input=String(a),this.containsEsc=!1,u?(this.pos=u,this.lineStart=this.input.lastIndexOf(\` +\`,u-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(cr).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=y.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=r.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&r.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(us),this.regexpState=null,this.privateNameStack=[]},Ur={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};ft.prototype.parse=function(){var r=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(r)};Ur.inFunction.get=function(){return(this.currentVarScope().flags&oa)>0};Ur.inGenerator.get=function(){return(this.currentVarScope().flags&vp)>0&&!this.currentVarScope().inClassFieldInit};Ur.inAsync.get=function(){return(this.currentVarScope().flags&Xf)>0&&!this.currentVarScope().inClassFieldInit};Ur.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var r=this.scopeStack[e];if(r.inClassFieldInit||r.flags&fs)return!1;if(r.flags&oa)return(r.flags&Xf)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};Ur.allowSuper.get=function(){var e=this.currentThisScope(),r=e.flags,a=e.inClassFieldInit;return(r&Jf)>0||a||this.options.allowSuperOutsideMethod};Ur.allowDirectSuper.get=function(){return(this.currentThisScope().flags&_p)>0};Ur.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};Ur.allowNewDotTarget.get=function(){var e=this.currentThisScope(),r=e.flags,a=e.inClassFieldInit;return(r&(oa|fs))>0||a};Ur.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&fs)>0};ft.extend=function(){for(var r=[],a=arguments.length;a--;)r[a]=arguments[a];for(var u=this,l=0;l=,?^&]/.test(l)||l==="!"&&this.input.charAt(u+1)==="=")}e+=r[0].length,lr.lastIndex=e,e+=lr.exec(this.input)[0].length,this.input[e]===";"&&e++}};Ct.eat=function(e){return this.type===e?(this.next(),!0):!1};Ct.isContextual=function(e){return this.type===y.name&&this.value===e&&!this.containsEsc};Ct.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};Ct.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};Ct.canInsertSemicolon=function(){return this.type===y.eof||this.type===y.braceR||cr.test(this.input.slice(this.lastTokEnd,this.start))};Ct.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};Ct.semicolon=function(){!this.eat(y.semi)&&!this.insertSemicolon()&&this.unexpected()};Ct.afterTrailingComma=function(e,r){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),r||this.next(),!0};Ct.expect=function(e){this.eat(e)||this.unexpected()};Ct.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var $o=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Ct.checkPatternErrors=function(e,r){if(!!e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var a=r?e.parenthesizedAssign:e.parenthesizedBind;a>-1&&this.raiseRecoverable(a,r?"Assigning to rvalue":"Parenthesized pattern")}};Ct.checkExpressionErrors=function(e,r){if(!e)return!1;var a=e.shorthandAssign,u=e.doubleProto;if(!r)return a>=0||u>=0;a>=0&&this.raise(a,"Shorthand property assignments are valid only in destructuring patterns"),u>=0&&this.raiseRecoverable(u,"Redefinition of __proto__ property")};Ct.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&u<56320)return!0;if(ln(u,!0)){for(var l=a+1;aa(u=this.input.charCodeAt(l),!0);)++l;if(u===92||u>55295&&u<56320)return!0;var p=this.input.slice(a,l);if(!gv.test(p))return!0}return!1};z.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;lr.lastIndex=this.pos;var e=lr.exec(this.input),r=this.pos+e[0].length,a;return!cr.test(this.input.slice(this.pos,r))&&this.input.slice(r,r+8)==="function"&&(r+8===this.input.length||!(aa(a=this.input.charCodeAt(r+8))||a>55295&&a<56320))};z.parseStatement=function(e,r,a){var u=this.type,l=this.startNode(),p;switch(this.isLet(e)&&(u=y._var,p="let"),u){case y._break:case y._continue:return this.parseBreakContinueStatement(l,u.keyword);case y._debugger:return this.parseDebuggerStatement(l);case y._do:return this.parseDoStatement(l);case y._for:return this.parseForStatement(l);case y._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(l,!1,!e);case y._class:return e&&this.unexpected(),this.parseClass(l,!0);case y._if:return this.parseIfStatement(l);case y._return:return this.parseReturnStatement(l);case y._switch:return this.parseSwitchStatement(l);case y._throw:return this.parseThrowStatement(l);case y._try:return this.parseTryStatement(l);case y._const:case y._var:return p=p||this.value,e&&p!=="var"&&this.unexpected(),this.parseVarStatement(l,p);case y._while:return this.parseWhileStatement(l);case y._with:return this.parseWithStatement(l);case y.braceL:return this.parseBlock(!0,l);case y.semi:return this.parseEmptyStatement(l);case y._export:case y._import:if(this.options.ecmaVersion>10&&u===y._import){lr.lastIndex=this.pos;var v=lr.exec(this.input),C=this.pos+v[0].length,T=this.input.charCodeAt(C);if(T===40||T===46)return this.parseExpressionStatement(l,this.parseExpression())}return this.options.allowImportExportEverywhere||(r||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),u===y._import?this.parseImport(l):this.parseExport(l,a);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(l,!0,!e);var A=this.value,R=this.parseExpression();return u===y.name&&R.type==="Identifier"&&this.eat(y.colon)?this.parseLabeledStatement(l,A,R,e):this.parseExpressionStatement(l,R)}};z.parseBreakContinueStatement=function(e,r){var a=r==="break";this.next(),this.eat(y.semi)||this.insertSemicolon()?e.label=null:this.type!==y.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var u=0;u=6?this.eat(y.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};z.parseForStatement=function(e){this.next();var r=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(nc),this.enterScope(0),this.expect(y.parenL),this.type===y.semi)return r>-1&&this.unexpected(r),this.parseFor(e,null);var a=this.isLet();if(this.type===y._var||this.type===y._const||a){var u=this.startNode(),l=a?"let":this.value;return this.next(),this.parseVar(u,!0,l),this.finishNode(u,"VariableDeclaration"),(this.type===y._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&u.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===y._in?r>-1&&this.unexpected(r):e.await=r>-1),this.parseForIn(e,u)):(r>-1&&this.unexpected(r),this.parseFor(e,u))}var p=this.isContextual("let"),v=!1,C=new $o,T=this.parseExpression(r>-1?"await":!0,C);return this.type===y._in||(v=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===y._in?r>-1&&this.unexpected(r):e.await=r>-1),p&&v&&this.raise(T.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(T,!1,C),this.checkLValPattern(T),this.parseForIn(e,T)):(this.checkExpressionErrors(C,!0),r>-1&&this.unexpected(r),this.parseFor(e,T))};z.parseFunctionStatement=function(e,r,a){return this.next(),this.parseFunction(e,ss|(a?0:Kf),!1,r)};z.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(y._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};z.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(y.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};z.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(y.braceL),this.labels.push(Tv),this.enterScope(0);for(var r,a=!1;this.type!==y.braceR;)if(this.type===y._case||this.type===y._default){var u=this.type===y._case;r&&this.finishNode(r,"SwitchCase"),e.cases.push(r=this.startNode()),r.consequent=[],this.next(),u?r.test=this.parseExpression():(a&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),a=!0,r.test=null),this.expect(y.colon)}else r||this.unexpected(),r.consequent.push(this.parseStatement(null));return this.exitScope(),r&&this.finishNode(r,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};z.parseThrowStatement=function(e){return this.next(),cr.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var Pv=[];z.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),r=e.type==="Identifier";return this.enterScope(r?Sp:0),this.checkLValPattern(e,r?kp:cn),this.expect(y.parenR),e};z.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===y._catch){var r=this.startNode();this.next(),this.eat(y.parenL)?r.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),r.param=null,this.enterScope(0)),r.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(r,"CatchClause")}return e.finalizer=this.eat(y._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};z.parseVarStatement=function(e,r,a){return this.next(),this.parseVar(e,!1,r,a),this.semicolon(),this.finishNode(e,"VariableDeclaration")};z.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(nc),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};z.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};z.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};z.parseLabeledStatement=function(e,r,a,u){for(var l=0,p=this.labels;l=0;T--){var A=this.labels[T];if(A.statementStart===e.start)A.statementStart=this.start,A.kind=C;else break}return this.labels.push({name:r,kind:C,statementStart:this.start}),e.body=this.parseStatement(u?u.indexOf("label")===-1?u+"label":u:"label"),this.labels.pop(),e.label=a,this.finishNode(e,"LabeledStatement")};z.parseExpressionStatement=function(e,r){return e.expression=r,this.semicolon(),this.finishNode(e,"ExpressionStatement")};z.parseBlock=function(e,r,a){for(e===void 0&&(e=!0),r===void 0&&(r=this.startNode()),r.body=[],this.expect(y.braceL),e&&this.enterScope(0);this.type!==y.braceR;){var u=this.parseStatement(null);r.body.push(u)}return a&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(r,"BlockStatement")};z.parseFor=function(e,r){return e.init=r,this.expect(y.semi),e.test=this.type===y.semi?null:this.parseExpression(),this.expect(y.semi),e.update=this.type===y.parenR?null:this.parseExpression(),this.expect(y.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};z.parseForIn=function(e,r){var a=this.type===y._in;return this.next(),r.type==="VariableDeclaration"&&r.declarations[0].init!=null&&(!a||this.options.ecmaVersion<8||this.strict||r.kind!=="var"||r.declarations[0].id.type!=="Identifier")&&this.raise(r.start,(a?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=r,e.right=a?this.parseExpression():this.parseMaybeAssign(),this.expect(y.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,a?"ForInStatement":"ForOfStatement")};z.parseVar=function(e,r,a,u){for(e.declarations=[],e.kind=a;;){var l=this.startNode();if(this.parseVarId(l,a),this.eat(y.eq)?l.init=this.parseMaybeAssign(r):!u&&a==="const"&&!(this.type===y._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!u&&l.id.type!=="Identifier"&&!(r&&(this.type===y._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):l.init=null,e.declarations.push(this.finishNode(l,"VariableDeclarator")),!this.eat(y.comma))break}return e};z.parseVarId=function(e,r){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,r==="var"?rc:cn,!1)};var ss=1,Kf=2,Tp=4;z.parseFunction=function(e,r,a,u,l){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!u)&&(this.type===y.star&&r&Kf&&this.unexpected(),e.generator=this.eat(y.star)),this.options.ecmaVersion>=8&&(e.async=!!u),r&ss&&(e.id=r&Tp&&this.type!==y.name?null:this.parseIdent(),e.id&&!(r&Kf)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?rc:cn:bp));var p=this.yieldPos,v=this.awaitPos,C=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(tc(e.async,e.generator)),r&ss||(e.id=this.type===y.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,a,!1,l),this.yieldPos=p,this.awaitPos=v,this.awaitIdentPos=C,this.finishNode(e,r&ss?"FunctionDeclaration":"FunctionExpression")};z.parseFunctionParams=function(e){this.expect(y.parenL),e.params=this.parseBindingList(y.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};z.parseClass=function(e,r){this.next();var a=this.strict;this.strict=!0,this.parseClassId(e,r),this.parseClassSuper(e);var u=this.enterClassBody(),l=this.startNode(),p=!1;for(l.body=[],this.expect(y.braceL);this.type!==y.braceR;){var v=this.parseClassElement(e.superClass!==null);v&&(l.body.push(v),v.type==="MethodDefinition"&&v.kind==="constructor"?(p&&this.raiseRecoverable(v.start,"Duplicate constructor in the same class"),p=!0):v.key&&v.key.type==="PrivateIdentifier"&&Ev(u,v)&&this.raiseRecoverable(v.key.start,"Identifier '#"+v.key.name+"' has already been declared"))}return this.strict=a,this.next(),e.body=this.finishNode(l,"ClassBody"),this.exitClassBody(),this.finishNode(e,r?"ClassDeclaration":"ClassExpression")};z.parseClassElement=function(e){if(this.eat(y.semi))return null;var r=this.options.ecmaVersion,a=this.startNode(),u="",l=!1,p=!1,v="method",C=!1;if(this.eatContextual("static")){if(r>=13&&this.eat(y.braceL))return this.parseClassStaticBlock(a),a;this.isClassElementNameStart()||this.type===y.star?C=!0:u="static"}if(a.static=C,!u&&r>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===y.star)&&!this.canInsertSemicolon()?p=!0:u="async"),!u&&(r>=9||!p)&&this.eat(y.star)&&(l=!0),!u&&!p&&!l){var T=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?v=T:u=T)}if(u?(a.computed=!1,a.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),a.key.name=u,this.finishNode(a.key,"Identifier")):this.parseClassElementName(a),r<13||this.type===y.parenL||v!=="method"||l||p){var A=!a.static&&qo(a,"constructor"),R=A&&e;A&&v!=="method"&&this.raise(a.key.start,"Constructor can't have get/set modifier"),a.kind=A?"constructor":v,this.parseClassMethod(a,l,p,R)}else this.parseClassField(a);return a};z.isClassElementNameStart=function(){return this.type===y.name||this.type===y.privateId||this.type===y.num||this.type===y.string||this.type===y.bracketL||this.type.keyword};z.parseClassElementName=function(e){this.type===y.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};z.parseClassMethod=function(e,r,a,u){var l=e.key;e.kind==="constructor"?(r&&this.raise(l.start,"Constructor can't be a generator"),a&&this.raise(l.start,"Constructor can't be an async method")):e.static&&qo(e,"prototype")&&this.raise(l.start,"Classes may not have a static property named prototype");var p=e.value=this.parseMethod(r,a,u);return e.kind==="get"&&p.params.length!==0&&this.raiseRecoverable(p.start,"getter should have no params"),e.kind==="set"&&p.params.length!==1&&this.raiseRecoverable(p.start,"setter should have exactly one param"),e.kind==="set"&&p.params[0].type==="RestElement"&&this.raiseRecoverable(p.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};z.parseClassField=function(e){if(qo(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&qo(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(y.eq)){var r=this.currentThisScope(),a=r.inClassFieldInit;r.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),r.inClassFieldInit=a}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};z.parseClassStaticBlock=function(e){e.body=[];var r=this.labels;for(this.labels=[],this.enterScope(fs|Jf);this.type!==y.braceR;){var a=this.parseStatement(null);e.body.push(a)}return this.next(),this.exitScope(),this.labels=r,this.finishNode(e,"StaticBlock")};z.parseClassId=function(e,r){this.type===y.name?(e.id=this.parseIdent(),r&&this.checkLValSimple(e.id,cn,!1)):(r===!0&&this.unexpected(),e.id=null)};z.parseClassSuper=function(e){e.superClass=this.eat(y._extends)?this.parseExprSubscripts(null,!1):null};z.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};z.exitClassBody=function(){var e=this.privateNameStack.pop(),r=e.declared,a=e.used;if(!!this.options.checkPrivateFields)for(var u=this.privateNameStack.length,l=u===0?null:this.privateNameStack[u-1],p=0;p=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(r,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==y.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};z.parseExport=function(e,r){if(this.next(),this.eat(y.star))return this.parseExportAllDeclaration(e,r);if(this.eat(y._default))return this.checkExport(r,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(r,e.declaration.declarations):this.checkExport(r,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(r),this.eatContextual("from"))this.type!==y.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var a=0,u=e.specifiers;a=13&&this.type===y.string){var e=this.parseLiteral(this.value);return _v.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};z.adaptDirectivePrologue=function(e){for(var r=0;r=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var hr=ft.prototype;hr.toAssignable=function(e,r,a){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",a&&this.checkPatternErrors(a,!0);for(var u=0,l=e.properties;u=8&&!C&&T.name==="async"&&!this.canInsertSemicolon()&&this.eat(y._function))return this.overrideContext(Ye.f_expr),this.parseFunction(this.startNodeAt(p,v),0,!1,!0,r);if(l&&!this.canInsertSemicolon()){if(this.eat(y.arrow))return this.parseArrowExpression(this.startNodeAt(p,v),[T],!1,r);if(this.options.ecmaVersion>=8&&T.name==="async"&&this.type===y.name&&!C&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return T=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(y.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(p,v),[T],!0,r)}return T;case y.regexp:var A=this.value;return u=this.parseLiteral(A.value),u.regex={pattern:A.pattern,flags:A.flags},u;case y.num:case y.string:return this.parseLiteral(this.value);case y._null:case y._true:case y._false:return u=this.startNode(),u.value=this.type===y._null?null:this.type===y._true,u.raw=this.type.keyword,this.next(),this.finishNode(u,"Literal");case y.parenL:var R=this.start,V=this.parseParenAndDistinguishExpression(l,r);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(V)&&(e.parenthesizedAssign=R),e.parenthesizedBind<0&&(e.parenthesizedBind=R)),V;case y.bracketL:return u=this.startNode(),this.next(),u.elements=this.parseExprList(y.bracketR,!0,!0,e),this.finishNode(u,"ArrayExpression");case y.braceL:return this.overrideContext(Ye.b_expr),this.parseObj(!1,e);case y._function:return u=this.startNode(),this.next(),this.parseFunction(u,0);case y._class:return this.parseClass(this.startNode(),!1);case y._new:return this.parseNew();case y.backQuote:return this.parseTemplate();case y._import:return this.options.ecmaVersion>=11?this.parseExprImport(a):this.unexpected();default:return this.parseExprAtomDefault()}};X.parseExprAtomDefault=function(){this.unexpected()};X.parseExprImport=function(e){var r=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===y.parenL&&!e)return this.parseDynamicImport(r);if(this.type===y.dot){var a=this.startNodeAt(r.start,r.loc&&r.loc.start);return a.name="import",r.meta=this.finishNode(a,"Identifier"),this.parseImportMeta(r)}else this.unexpected()};X.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(y.parenR)){var r=this.start;this.eat(y.comma)&&this.eat(y.parenR)?this.raiseRecoverable(r,"Trailing comma is not allowed in import()"):this.unexpected(r)}return this.finishNode(e,"ImportExpression")};X.parseImportMeta=function(e){this.next();var r=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),r&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};X.parseLiteral=function(e){var r=this.startNode();return r.value=e,r.raw=this.input.slice(this.start,this.end),r.raw.charCodeAt(r.raw.length-1)===110&&(r.bigint=r.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(r,"Literal")};X.parseParenExpression=function(){this.expect(y.parenL);var e=this.parseExpression();return this.expect(y.parenR),e};X.shouldParseArrow=function(e){return!this.canInsertSemicolon()};X.parseParenAndDistinguishExpression=function(e,r){var a=this.start,u=this.startLoc,l,p=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var v=this.start,C=this.startLoc,T=[],A=!0,R=!1,V=new $o,K=this.yieldPos,re=this.awaitPos,N;for(this.yieldPos=0,this.awaitPos=0;this.type!==y.parenR;)if(A?A=!1:this.expect(y.comma),p&&this.afterTrailingComma(y.parenR,!0)){R=!0;break}else if(this.type===y.ellipsis){N=this.start,T.push(this.parseParenItem(this.parseRestBinding())),this.type===y.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else T.push(this.parseMaybeAssign(!1,V,this.parseParenItem));var _e=this.lastTokEnd,Le=this.lastTokEndLoc;if(this.expect(y.parenR),e&&this.shouldParseArrow(T)&&this.eat(y.arrow))return this.checkPatternErrors(V,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=K,this.awaitPos=re,this.parseParenArrowList(a,u,T,r);(!T.length||R)&&this.unexpected(this.lastTokStart),N&&this.unexpected(N),this.checkExpressionErrors(V,!0),this.yieldPos=K||this.yieldPos,this.awaitPos=re||this.awaitPos,T.length>1?(l=this.startNodeAt(v,C),l.expressions=T,this.finishNodeAt(l,"SequenceExpression",_e,Le)):l=T[0]}else l=this.parseParenExpression();if(this.options.preserveParens){var ye=this.startNodeAt(a,u);return ye.expression=l,this.finishNode(ye,"ParenthesizedExpression")}else return l};X.parseParenItem=function(e){return e};X.parseParenArrowList=function(e,r,a,u){return this.parseArrowExpression(this.startNodeAt(e,r),a,!1,u)};var Dv=[];X.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===y.dot){var r=this.startNodeAt(e.start,e.loc&&e.loc.start);r.name="new",e.meta=this.finishNode(r,"Identifier"),this.next();var a=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),a&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var u=this.start,l=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),u,l,!0,!1),this.eat(y.parenL)?e.arguments=this.parseExprList(y.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Dv,this.finishNode(e,"NewExpression")};X.parseTemplateElement=function(e){var r=e.isTagged,a=this.startNode();return this.type===y.invalidTemplate?(r||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),a.value={raw:this.value,cooked:null}):a.value={raw:this.input.slice(this.start,this.end).replace(/\\r\\n?/g,\` +\`),cooked:this.value},this.next(),a.tail=this.type===y.backQuote,this.finishNode(a,"TemplateElement")};X.parseTemplate=function(e){e===void 0&&(e={});var r=e.isTagged;r===void 0&&(r=!1);var a=this.startNode();this.next(),a.expressions=[];var u=this.parseTemplateElement({isTagged:r});for(a.quasis=[u];!u.tail;)this.type===y.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(y.dollarBraceL),a.expressions.push(this.parseExpression()),this.expect(y.braceR),a.quasis.push(u=this.parseTemplateElement({isTagged:r}));return this.next(),this.finishNode(a,"TemplateLiteral")};X.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===y.name||this.type===y.num||this.type===y.string||this.type===y.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===y.star)&&!cr.test(this.input.slice(this.lastTokEnd,this.start))};X.parseObj=function(e,r){var a=this.startNode(),u=!0,l={};for(a.properties=[],this.next();!this.eat(y.braceR);){if(u)u=!1;else if(this.expect(y.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(y.braceR))break;var p=this.parseProperty(e,r);e||this.checkPropClash(p,l,r),a.properties.push(p)}return this.finishNode(a,e?"ObjectPattern":"ObjectExpression")};X.parseProperty=function(e,r){var a=this.startNode(),u,l,p,v;if(this.options.ecmaVersion>=9&&this.eat(y.ellipsis))return e?(a.argument=this.parseIdent(!1),this.type===y.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(a,"RestElement")):(a.argument=this.parseMaybeAssign(!1,r),this.type===y.comma&&r&&r.trailingComma<0&&(r.trailingComma=this.start),this.finishNode(a,"SpreadElement"));this.options.ecmaVersion>=6&&(a.method=!1,a.shorthand=!1,(e||r)&&(p=this.start,v=this.startLoc),e||(u=this.eat(y.star)));var C=this.containsEsc;return this.parsePropertyName(a),!e&&!C&&this.options.ecmaVersion>=8&&!u&&this.isAsyncProp(a)?(l=!0,u=this.options.ecmaVersion>=9&&this.eat(y.star),this.parsePropertyName(a)):l=!1,this.parsePropertyValue(a,e,u,l,p,v,r,C),this.finishNode(a,"Property")};X.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var r=e.kind==="get"?0:1;if(e.value.params.length!==r){var a=e.value.start;e.kind==="get"?this.raiseRecoverable(a,"getter should have no params"):this.raiseRecoverable(a,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};X.parsePropertyValue=function(e,r,a,u,l,p,v,C){(a||u)&&this.type===y.colon&&this.unexpected(),this.eat(y.colon)?(e.value=r?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,v),e.kind="init"):this.options.ecmaVersion>=6&&this.type===y.parenL?(r&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(a,u)):!r&&!C&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==y.comma&&this.type!==y.braceR&&this.type!==y.eq?((a||u)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((a||u)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=l),e.kind="init",r?e.value=this.parseMaybeDefault(l,p,this.copyNode(e.key)):this.type===y.eq&&v?(v.shorthandAssign<0&&(v.shorthandAssign=this.start),e.value=this.parseMaybeDefault(l,p,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected()};X.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(y.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(y.bracketR),e.key;e.computed=!1}return e.key=this.type===y.num||this.type===y.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};X.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};X.parseMethod=function(e,r,a){var u=this.startNode(),l=this.yieldPos,p=this.awaitPos,v=this.awaitIdentPos;return this.initFunction(u),this.options.ecmaVersion>=6&&(u.generator=e),this.options.ecmaVersion>=8&&(u.async=!!r),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(tc(r,u.generator)|Jf|(a?_p:0)),this.expect(y.parenL),u.params=this.parseBindingList(y.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(u,!1,!0,!1),this.yieldPos=l,this.awaitPos=p,this.awaitIdentPos=v,this.finishNode(u,"FunctionExpression")};X.parseArrowExpression=function(e,r,a,u){var l=this.yieldPos,p=this.awaitPos,v=this.awaitIdentPos;return this.enterScope(tc(a,!1)|wp),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!a),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(r,!0),this.parseFunctionBody(e,!0,!1,u),this.yieldPos=l,this.awaitPos=p,this.awaitIdentPos=v,this.finishNode(e,"ArrowFunctionExpression")};X.parseFunctionBody=function(e,r,a,u){var l=r&&this.type!==y.braceL,p=this.strict,v=!1;if(l)e.body=this.parseMaybeAssign(u),e.expression=!0,this.checkParams(e,!1);else{var C=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!p||C)&&(v=this.strictDirective(this.end),v&&C&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var T=this.labels;this.labels=[],v&&(this.strict=!0),this.checkParams(e,!p&&!v&&!r&&!a&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,Cp),e.body=this.parseBlock(!1,void 0,v&&!p),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=T}this.exitScope()};X.isSimpleParamList=function(e){for(var r=0,a=e;r-1||l.functions.indexOf(e)>-1||l.var.indexOf(e)>-1,l.lexical.push(e),this.inModule&&l.flags&us&&delete this.undefinedExports[e]}else if(r===kp){var p=this.currentScope();p.lexical.push(e)}else if(r===bp){var v=this.currentScope();this.treatFunctionsAsVar?u=v.lexical.indexOf(e)>-1:u=v.lexical.indexOf(e)>-1||v.var.indexOf(e)>-1,v.functions.push(e)}else for(var C=this.scopeStack.length-1;C>=0;--C){var T=this.scopeStack[C];if(T.lexical.indexOf(e)>-1&&!(T.flags&Sp&&T.lexical[0]===e)||!this.treatFunctionsAsVarInScope(T)&&T.functions.indexOf(e)>-1){u=!0;break}if(T.var.push(e),this.inModule&&T.flags&us&&delete this.undefinedExports[e],T.flags&ec)break}u&&this.raiseRecoverable(a,"Identifier '"+e+"' has already been declared")};Wn.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};Wn.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};Wn.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var r=this.scopeStack[e];if(r.flags&ec)return r}};Wn.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var r=this.scopeStack[e];if(r.flags&ec&&!(r.flags&wp))return r}};var jo=function(r,a,u){this.type="",this.start=a,this.end=0,r.options.locations&&(this.loc=new zo(r,u)),r.options.directSourceFile&&(this.sourceFile=r.options.directSourceFile),r.options.ranges&&(this.range=[a,0])},cs=ft.prototype;cs.startNode=function(){return new jo(this,this.start,this.startLoc)};cs.startNodeAt=function(e,r){return new jo(this,e,r)};function Ep(e,r,a,u){return e.type=r,e.end=a,this.options.locations&&(e.loc.end=u),this.options.ranges&&(e.range[1]=a),e}cs.finishNode=function(e,r){return Ep.call(this,e,r,this.lastTokEnd,this.lastTokEndLoc)};cs.finishNodeAt=function(e,r,a,u){return Ep.call(this,e,r,a,u)};cs.copyNode=function(e){var r=new jo(this,e.start,this.startLoc);for(var a in e)r[a]=e[a];return r};var Dp="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Ip=Dp+" Extended_Pictographic",Mp=Ip,Op=Mp+" EBase EComp EMod EPres ExtPict",Ap=Op,Mv=Ap,Ov={9:Dp,10:Ip,11:Mp,12:Op,13:Ap,14:Mv},Av="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Fv={9:"",10:"",11:"",12:"",13:"",14:Av},cp="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",Fp="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Np=Fp+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Lp=Np+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Rp=Lp+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Wp=Rp+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Nv=Wp+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz",Lv={9:Fp,10:Np,11:Lp,12:Rp,13:Wp,14:Nv},Yp={};function Rv(e){var r=Yp[e]={binary:Ln(Ov[e]+" "+cp),binaryOfStrings:Ln(Fv[e]),nonBinary:{General_Category:Ln(cp),Script:Ln(Lv[e])}};r.nonBinary.Script_Extensions=r.nonBinary.Script,r.nonBinary.gc=r.nonBinary.General_Category,r.nonBinary.sc=r.nonBinary.Script,r.nonBinary.scx=r.nonBinary.Script_Extensions}for(Uo=0,$f=[9,10,11,12,13,14];Uo<$f.length;Uo+=1)hp=$f[Uo],Rv(hp);var hp,Uo,$f,U=ft.prototype,Hr=function(r){this.parser=r,this.validFlags="gim"+(r.options.ecmaVersion>=6?"uy":"")+(r.options.ecmaVersion>=9?"s":"")+(r.options.ecmaVersion>=13?"d":"")+(r.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Yp[r.options.ecmaVersion>=14?14:r.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};Hr.prototype.reset=function(r,a,u){var l=u.indexOf("v")!==-1,p=u.indexOf("u")!==-1;this.start=r|0,this.source=a+"",this.flags=u,l&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=p&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=p&&this.parser.options.ecmaVersion>=9)};Hr.prototype.raise=function(r){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+r)};Hr.prototype.at=function(r,a){a===void 0&&(a=!1);var u=this.source,l=u.length;if(r>=l)return-1;var p=u.charCodeAt(r);if(!(a||this.switchU)||p<=55295||p>=57344||r+1>=l)return p;var v=u.charCodeAt(r+1);return v>=56320&&v<=57343?(p<<10)+v-56613888:p};Hr.prototype.nextIndex=function(r,a){a===void 0&&(a=!1);var u=this.source,l=u.length;if(r>=l)return l;var p=u.charCodeAt(r),v;return!(a||this.switchU)||p<=55295||p>=57344||r+1>=l||(v=u.charCodeAt(r+1))<56320||v>57343?r+1:r+2};Hr.prototype.current=function(r){return r===void 0&&(r=!1),this.at(this.pos,r)};Hr.prototype.lookahead=function(r){return r===void 0&&(r=!1),this.at(this.nextIndex(this.pos,r),r)};Hr.prototype.advance=function(r){r===void 0&&(r=!1),this.pos=this.nextIndex(this.pos,r)};Hr.prototype.eat=function(r,a){return a===void 0&&(a=!1),this.current(a)===r?(this.advance(a),!0):!1};Hr.prototype.eatChars=function(r,a){a===void 0&&(a=!1);for(var u=this.pos,l=0,p=r;l-1&&this.raise(e.start,"Duplicate regular expression flag"),v==="u"&&(u=!0),v==="v"&&(l=!0)}this.options.ecmaVersion>=15&&u&&l&&this.raise(e.start,"Invalid regular expression flag")};U.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))};U.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var r=0,a=e.backReferenceNames;r=9&&(a=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!a,!0}return e.pos=r,!1};U.regexp_eatQuantifier=function(e,r){return r===void 0&&(r=!1),this.regexp_eatQuantifierPrefix(e,r)?(e.eat(63),!0):!1};U.regexp_eatQuantifierPrefix=function(e,r){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,r)};U.regexp_eatBracedQuantifier=function(e,r){var a=e.pos;if(e.eat(123)){var u=0,l=-1;if(this.regexp_eatDecimalDigits(e)&&(u=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(l=e.lastIntValue),e.eat(125)))return l!==-1&&l=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};U.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};U.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};U.regexp_eatSyntaxCharacter=function(e){var r=e.current();return Bp(r)?(e.lastIntValue=r,e.advance(),!0):!1};function Bp(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}U.regexp_eatPatternCharacters=function(e){for(var r=e.pos,a=0;(a=e.current())!==-1&&!Bp(a);)e.advance();return e.pos!==r};U.regexp_eatExtendedPatternCharacter=function(e){var r=e.current();return r!==-1&&r!==36&&!(r>=40&&r<=43)&&r!==46&&r!==63&&r!==91&&r!==94&&r!==124?(e.advance(),!0):!1};U.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e)){e.groupNames.indexOf(e.lastStringValue)!==-1&&e.raise("Duplicate capture group name"),e.groupNames.push(e.lastStringValue);return}e.raise("Invalid group")}};U.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};U.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=Rn(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=Rn(e.lastIntValue);return!0}return!1};U.regexp_eatRegExpIdentifierStart=function(e){var r=e.pos,a=this.options.ecmaVersion>=11,u=e.current(a);return e.advance(a),u===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,a)&&(u=e.lastIntValue),Wv(u)?(e.lastIntValue=u,!0):(e.pos=r,!1)};function Wv(e){return ln(e,!0)||e===36||e===95}U.regexp_eatRegExpIdentifierPart=function(e){var r=e.pos,a=this.options.ecmaVersion>=11,u=e.current(a);return e.advance(a),u===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,a)&&(u=e.lastIntValue),Yv(u)?(e.lastIntValue=u,!0):(e.pos=r,!1)};function Yv(e){return aa(e,!0)||e===36||e===95||e===8204||e===8205}U.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};U.regexp_eatBackReference=function(e){var r=e.pos;if(this.regexp_eatDecimalEscape(e)){var a=e.lastIntValue;if(e.switchU)return a>e.maxBackReference&&(e.maxBackReference=a),!0;if(a<=e.numCapturingParens)return!0;e.pos=r}return!1};U.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};U.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};U.regexp_eatCControlLetter=function(e){var r=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=r}return!1};U.regexp_eatZero=function(e){return e.current()===48&&!Qo(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};U.regexp_eatControlEscape=function(e){var r=e.current();return r===116?(e.lastIntValue=9,e.advance(),!0):r===110?(e.lastIntValue=10,e.advance(),!0):r===118?(e.lastIntValue=11,e.advance(),!0):r===102?(e.lastIntValue=12,e.advance(),!0):r===114?(e.lastIntValue=13,e.advance(),!0):!1};U.regexp_eatControlLetter=function(e){var r=e.current();return Vp(r)?(e.lastIntValue=r%32,e.advance(),!0):!1};function Vp(e){return e>=65&&e<=90||e>=97&&e<=122}U.regexp_eatRegExpUnicodeEscapeSequence=function(e,r){r===void 0&&(r=!1);var a=e.pos,u=r||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var l=e.lastIntValue;if(u&&l>=55296&&l<=56319){var p=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var v=e.lastIntValue;if(v>=56320&&v<=57343)return e.lastIntValue=(l-55296)*1024+(v-56320)+65536,!0}e.pos=p,e.lastIntValue=l}return!0}if(u&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Bv(e.lastIntValue))return!0;u&&e.raise("Invalid unicode escape"),e.pos=a}return!1};function Bv(e){return e>=0&&e<=1114111}U.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var r=e.current();return r!==99&&(!e.switchN||r!==107)?(e.lastIntValue=r,e.advance(),!0):!1};U.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var r=e.current();if(r>=49&&r<=57){do e.lastIntValue=10*e.lastIntValue+(r-48),e.advance();while((r=e.current())>=48&&r<=57);return!0}return!1};var Up=0,fn=1,fr=2;U.regexp_eatCharacterClassEscape=function(e){var r=e.current();if(Vv(r))return e.lastIntValue=-1,e.advance(),fn;var a=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((a=r===80)||r===112)){e.lastIntValue=-1,e.advance();var u;if(e.eat(123)&&(u=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return a&&u===fr&&e.raise("Invalid property name"),u;e.raise("Invalid property name")}return Up};function Vv(e){return e===100||e===68||e===115||e===83||e===119||e===87}U.regexp_eatUnicodePropertyValueExpression=function(e){var r=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var a=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var u=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,a,u),fn}}if(e.pos=r,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var l=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,l)}return Up};U.regexp_validateUnicodePropertyNameAndValue=function(e,r,a){ls(e.unicodeProperties.nonBinary,r)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[r].test(a)||e.raise("Invalid property value")};U.regexp_validateUnicodePropertyNameOrValue=function(e,r){if(e.unicodeProperties.binary.test(r))return fn;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(r))return fr;e.raise("Invalid property name")};U.regexp_eatUnicodePropertyName=function(e){var r=0;for(e.lastStringValue="";Hp(r=e.current());)e.lastStringValue+=Rn(r),e.advance();return e.lastStringValue!==""};function Hp(e){return Vp(e)||e===95}U.regexp_eatUnicodePropertyValue=function(e){var r=0;for(e.lastStringValue="";Uv(r=e.current());)e.lastStringValue+=Rn(r),e.advance();return e.lastStringValue!==""};function Uv(e){return Hp(e)||Qo(e)}U.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};U.regexp_eatCharacterClass=function(e){if(e.eat(91)){var r=e.eat(94),a=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),r&&a===fr&&e.raise("Negated character class may contain strings"),!0}return!1};U.regexp_classContents=function(e){return e.current()===93?fn:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),fn)};U.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var r=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var a=e.lastIntValue;e.switchU&&(r===-1||a===-1)&&e.raise("Invalid character class"),r!==-1&&a!==-1&&r>a&&e.raise("Range out of order in character class")}}};U.regexp_eatClassAtom=function(e){var r=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var a=e.current();(a===99||zp(a))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=r}var u=e.current();return u!==93?(e.lastIntValue=u,e.advance(),!0):!1};U.regexp_eatClassEscape=function(e){var r=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=r}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};U.regexp_classSetExpression=function(e){var r=fn,a;if(!this.regexp_eatClassSetRange(e))if(a=this.regexp_eatClassSetOperand(e)){a===fr&&(r=fr);for(var u=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(a=this.regexp_eatClassSetOperand(e))){a!==fr&&(r=fn);continue}e.raise("Invalid character in character class")}if(u!==e.pos)return r;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(u!==e.pos)return r}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(a=this.regexp_eatClassSetOperand(e),!a)return r;a===fr&&(r=fr)}};U.regexp_eatClassSetRange=function(e){var r=e.pos;if(this.regexp_eatClassSetCharacter(e)){var a=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var u=e.lastIntValue;return a!==-1&&u!==-1&&a>u&&e.raise("Range out of order in character class"),!0}e.pos=r}return!1};U.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?fn:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};U.regexp_eatNestedClass=function(e){var r=e.pos;if(e.eat(91)){var a=e.eat(94),u=this.regexp_classContents(e);if(e.eat(93))return a&&u===fr&&e.raise("Negated character class may contain strings"),u;e.pos=r}if(e.eat(92)){var l=this.regexp_eatCharacterClassEscape(e);if(l)return l;e.pos=r}return null};U.regexp_eatClassStringDisjunction=function(e){var r=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var a=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return a}else e.raise("Invalid escape");e.pos=r}return null};U.regexp_classStringDisjunctionContents=function(e){for(var r=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===fr&&(r=fr);return r};U.regexp_classString=function(e){for(var r=0;this.regexp_eatClassSetCharacter(e);)r++;return r===1?fn:fr};U.regexp_eatClassSetCharacter=function(e){var r=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=r,!1);var a=e.current();return a<0||a===e.lookahead()&&Hv(a)||qv(a)?!1:(e.advance(),e.lastIntValue=a,!0)};function Hv(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function qv(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}U.regexp_eatClassSetReservedPunctuator=function(e){var r=e.current();return Gv(r)?(e.lastIntValue=r,e.advance(),!0):!1};function Gv(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}U.regexp_eatClassControlLetter=function(e){var r=e.current();return Qo(r)||r===95?(e.lastIntValue=r%32,e.advance(),!0):!1};U.regexp_eatHexEscapeSequence=function(e){var r=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=r}return!1};U.regexp_eatDecimalDigits=function(e){var r=e.pos,a=0;for(e.lastIntValue=0;Qo(a=e.current());)e.lastIntValue=10*e.lastIntValue+(a-48),e.advance();return e.pos!==r};function Qo(e){return e>=48&&e<=57}U.regexp_eatHexDigits=function(e){var r=e.pos,a=0;for(e.lastIntValue=0;qp(a=e.current());)e.lastIntValue=16*e.lastIntValue+Gp(a),e.advance();return e.pos!==r};function qp(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Gp(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}U.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var r=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var a=e.lastIntValue;r<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=r*64+a*8+e.lastIntValue:e.lastIntValue=r*8+a}else e.lastIntValue=r;return!0}return!1};U.regexp_eatOctalDigit=function(e){var r=e.current();return zp(r)?(e.lastIntValue=r-48,e.advance(),!0):(e.lastIntValue=0,!1)};function zp(e){return e>=48&&e<=55}U.regexp_eatFixedHexDigits=function(e,r){var a=e.pos;e.lastIntValue=0;for(var u=0;u=this.input.length)return this.finishToken(y.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};ce.readToken=function(e){return ln(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};ce.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var r=this.input.charCodeAt(this.pos+1);return r<=56319||r>=57344?e:(e<<10)+r-56613888};ce.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),r=this.pos,a=this.input.indexOf("*/",this.pos+=2);if(a===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=a+2,this.options.locations)for(var u=void 0,l=r;(u=mp(this.input,l,this.pos))>-1;)++this.curLine,l=this.lineStart=u;this.options.onComment&&this.options.onComment(!0,this.input.slice(r+2,a),r,this.pos,e,this.curPosition())};ce.skipLineComment=function(e){for(var r=this.pos,a=this.options.onComment&&this.curPosition(),u=this.input.charCodeAt(this.pos+=e);this.pos8&&e<14||e>=5760&&gp.test(String.fromCharCode(e)))++this.pos;else break e}}};ce.finishToken=function(e,r){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var a=this.type;this.type=e,this.value=r,this.updateContext(a)};ce.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var r=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&r===46?(this.pos+=3,this.finishToken(y.ellipsis)):(++this.pos,this.finishToken(y.dot))};ce.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(y.assign,2):this.finishOp(y.slash,1)};ce.readToken_mult_modulo_exp=function(e){var r=this.input.charCodeAt(this.pos+1),a=1,u=e===42?y.star:y.modulo;return this.options.ecmaVersion>=7&&e===42&&r===42&&(++a,u=y.starstar,r=this.input.charCodeAt(this.pos+2)),r===61?this.finishOp(y.assign,a+1):this.finishOp(u,a)};ce.readToken_pipe_amp=function(e){var r=this.input.charCodeAt(this.pos+1);if(r===e){if(this.options.ecmaVersion>=12){var a=this.input.charCodeAt(this.pos+2);if(a===61)return this.finishOp(y.assign,3)}return this.finishOp(e===124?y.logicalOR:y.logicalAND,2)}return r===61?this.finishOp(y.assign,2):this.finishOp(e===124?y.bitwiseOR:y.bitwiseAND,1)};ce.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(y.assign,2):this.finishOp(y.bitwiseXOR,1)};ce.readToken_plus_min=function(e){var r=this.input.charCodeAt(this.pos+1);return r===e?r===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||cr.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(y.incDec,2):r===61?this.finishOp(y.assign,2):this.finishOp(y.plusMin,1)};ce.readToken_lt_gt=function(e){var r=this.input.charCodeAt(this.pos+1),a=1;return r===e?(a=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+a)===61?this.finishOp(y.assign,a+1):this.finishOp(y.bitShift,a)):r===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(r===61&&(a=2),this.finishOp(y.relational,a))};ce.readToken_eq_excl=function(e){var r=this.input.charCodeAt(this.pos+1);return r===61?this.finishOp(y.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&r===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(y.arrow)):this.finishOp(e===61?y.eq:y.prefix,1)};ce.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var r=this.input.charCodeAt(this.pos+1);if(r===46){var a=this.input.charCodeAt(this.pos+2);if(a<48||a>57)return this.finishOp(y.questionDot,2)}if(r===63){if(e>=12){var u=this.input.charCodeAt(this.pos+2);if(u===61)return this.finishOp(y.assign,3)}return this.finishOp(y.coalesce,2)}}return this.finishOp(y.question,1)};ce.readToken_numberSign=function(){var e=this.options.ecmaVersion,r=35;if(e>=13&&(++this.pos,r=this.fullCharCodeAtPos(),ln(r,!0)||r===92))return this.finishToken(y.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+Rn(r)+"'")};ce.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(y.parenL);case 41:return++this.pos,this.finishToken(y.parenR);case 59:return++this.pos,this.finishToken(y.semi);case 44:return++this.pos,this.finishToken(y.comma);case 91:return++this.pos,this.finishToken(y.bracketL);case 93:return++this.pos,this.finishToken(y.bracketR);case 123:return++this.pos,this.finishToken(y.braceL);case 125:return++this.pos,this.finishToken(y.braceR);case 58:return++this.pos,this.finishToken(y.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(y.backQuote);case 48:var r=this.input.charCodeAt(this.pos+1);if(r===120||r===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(r===111||r===79)return this.readRadixNumber(8);if(r===98||r===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(y.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Rn(e)+"'")};ce.finishOp=function(e,r){var a=this.input.slice(this.pos,this.pos+r);return this.pos+=r,this.finishToken(e,a)};ce.readRegexp=function(){for(var e,r,a=this.pos;;){this.pos>=this.input.length&&this.raise(a,"Unterminated regular expression");var u=this.input.charAt(this.pos);if(cr.test(u)&&this.raise(a,"Unterminated regular expression"),e)e=!1;else{if(u==="[")r=!0;else if(u==="]"&&r)r=!1;else if(u==="/"&&!r)break;e=u==="\\\\"}++this.pos}var l=this.input.slice(a,this.pos);++this.pos;var p=this.pos,v=this.readWord1();this.containsEsc&&this.unexpected(p);var C=this.regexpState||(this.regexpState=new Hr(this));C.reset(a,l,v),this.validateRegExpFlags(C),this.validateRegExpPattern(C);var T=null;try{T=new RegExp(l,v)}catch{}return this.finishToken(y.regexp,{pattern:l,flags:v,value:T})};ce.readInt=function(e,r,a){for(var u=this.options.ecmaVersion>=12&&r===void 0,l=a&&this.input.charCodeAt(this.pos)===48,p=this.pos,v=0,C=0,T=0,A=r??1/0;T=97?V=R-97+10:R>=65?V=R-65+10:R>=48&&R<=57?V=R-48:V=1/0,V>=e)break;C=R,v=v*e+V}return u&&C===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===p||r!=null&&this.pos-p!==r?null:v};function zv(e,r){return r?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function $p(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}ce.readRadixNumber=function(e){var r=this.pos;this.pos+=2;var a=this.readInt(e);return a==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(a=$p(this.input.slice(r,this.pos)),++this.pos):ln(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(y.num,a)};ce.readNumber=function(e){var r=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(r,"Invalid number");var a=this.pos-r>=2&&this.input.charCodeAt(r)===48;a&&this.strict&&this.raise(r,"Invalid number");var u=this.input.charCodeAt(this.pos);if(!a&&!e&&this.options.ecmaVersion>=11&&u===110){var l=$p(this.input.slice(r,this.pos));return++this.pos,ln(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(y.num,l)}a&&/[89]/.test(this.input.slice(r,this.pos))&&(a=!1),u===46&&!a&&(++this.pos,this.readInt(10),u=this.input.charCodeAt(this.pos)),(u===69||u===101)&&!a&&(u=this.input.charCodeAt(++this.pos),(u===43||u===45)&&++this.pos,this.readInt(10)===null&&this.raise(r,"Invalid number")),ln(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var p=zv(this.input.slice(r,this.pos),a);return this.finishToken(y.num,p)};ce.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),r;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var a=++this.pos;r=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,r>1114111&&this.invalidStringToken(a,"Code point out of bounds")}else r=this.readHexChar(4);return r};ce.readString=function(e){for(var r="",a=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var u=this.input.charCodeAt(this.pos);if(u===e)break;u===92?(r+=this.input.slice(a,this.pos),r+=this.readEscapedChar(!1),a=this.pos):u===8232||u===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(sa(u)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return r+=this.input.slice(a,this.pos++),this.finishToken(y.string,r)};var jp={};ce.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===jp)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};ce.invalidStringToken=function(e,r){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw jp;this.raise(e,r)};ce.readTmplToken=function(){for(var e="",r=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var a=this.input.charCodeAt(this.pos);if(a===96||a===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===y.template||this.type===y.invalidTemplate)?a===36?(this.pos+=2,this.finishToken(y.dollarBraceL)):(++this.pos,this.finishToken(y.backQuote)):(e+=this.input.slice(r,this.pos),this.finishToken(y.template,e));if(a===92)e+=this.input.slice(r,this.pos),e+=this.readEscapedChar(!0),r=this.pos;else if(sa(a)){switch(e+=this.input.slice(r,this.pos),++this.pos,a){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=\` \`;break;default:e+=String.fromCharCode(a);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),r=this.pos}else++this.pos}};ce.readInvalidTemplateToken=function(){for(;this.pos=48&&r<=55){var u=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],l=parseInt(u,8);return l>255&&(u=u.slice(0,-1),l=parseInt(u,8)),this.pos+=u.length-1,r=this.input.charCodeAt(this.pos),(u!=="0"||r===56||r===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-u.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(l)}return sa(r)?"":String.fromCharCode(r)}};ce.readHexChar=function(e){var r=this.pos,a=this.readInt(16,e);return a===null&&this.invalidStringToken(r,"Bad character escape sequence"),a};ce.readWord1=function(){this.containsEsc=!1;for(var e="",r=!0,a=this.pos,u=this.options.ecmaVersion>=6;this.pos":9,"<=":9,">=":9,in:9,instanceof:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"%":12,"/":12,"**":13},di=17;function la(e,r){let{generator:a}=e;if(e.write("("),r!=null&&r.length>0){a[r[0].type](r[0],e);let{length:u}=r;for(let l=1;l=48&&r<=55){var u=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],l=parseInt(u,8);return l>255&&(u=u.slice(0,-1),l=parseInt(u,8)),this.pos+=u.length-1,r=this.input.charCodeAt(this.pos),(u!=="0"||r===56||r===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-u.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(l)}return sa(r)?"":String.fromCharCode(r)}};ce.readHexChar=function(e){var r=this.pos,a=this.readInt(16,e);return a===null&&this.invalidStringToken(r,"Bad character escape sequence"),a};ce.readWord1=function(){this.containsEsc=!1;for(var e="",r=!0,a=this.pos,u=this.options.ecmaVersion>=6;this.pos":9,"<=":9,">=":9,in:9,instanceof:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"%":12,"/":12,"**":13},di=17;function la(e,r){let{generator:a}=e;if(e.write("("),r!=null&&r.length>0){a[r[0].type](r[0],e);let{length:u}=r;for(let l=1;l0){e.write(u);for(let v=1;v0){a.VariableDeclarator(u[0],e);for(let p=1;p0){r.write(u),l&&e.comments!=null&&Tt(r,e.comments,p,u);let{length:C}=v;for(let T=0;T0){for(;l0&&r.write(", ");let p=a[l],v=p.type[6];if(v==="D")r.write(p.local.name,p),l++;else if(v==="N")r.write("* as "+p.local.name,p),l++;else break}if(l0)for(let l=0;;){let p=a[l],{name:v}=p.local;if(r.write(v,p),v!==p.exported.name&&r.write(" as "+p.exported.name),++l "),e.body.type[0]==="O"?(r.write("("),this.ObjectExpression(e.body,r),r.write(")")):this[e.body.type](e.body,r)},ThisExpression(e,r){r.write("this",e)},Super(e,r){r.write("super",e)},RestElement:Zp=function(e,r){r.write("..."),this[e.argument.type](e.argument,r)},SpreadElement:Zp,YieldExpression(e,r){r.write(e.delegate?"yield*":"yield"),e.argument&&(r.write(" "),this[e.argument.type](e.argument,r))},AwaitExpression(e,r){r.write("await ",e),Qo(r,e.argument,e)},TemplateLiteral(e,r){let{quasis:a,expressions:u}=e;r.write("\`");let{length:l}=u;for(let v=0;v0){let{elements:a}=e,{length:u}=a;for(let l=0;;){let p=a[l];if(p!=null&&this[p.type](p,r),++l0){r.write(u),l&&e.comments!=null&&Tt(r,e.comments,p,u);let v=","+u,{properties:C}=e,{length:T}=C;for(let A=0;;){let R=C[A];if(l&&R.comments!=null&&Tt(r,R.comments,p,u),r.write(p),this[R.type](R,r),++A0){let{properties:a}=e,{length:u}=a;for(let l=0;this[a[l].type](a[l],r),++l1||l[0]==="U"&&(l[1]==="n"||l[1]==="p")&&u.prefix&&u.operator[0]===a&&(a==="+"||a==="-"))&&r.write(" "),p?(r.write(a.length>1?" (":"("),this[l](u,r),r.write(")")):this[l](u,r)}else this[e.argument.type](e.argument,r),r.write(e.operator)},UpdateExpression(e,r){e.prefix?(r.write(e.operator),this[e.argument.type](e.argument,r)):(this[e.argument.type](e.argument,r),r.write(e.operator))},AssignmentExpression(e,r){this[e.left.type](e.left,r),r.write(" "+e.operator+" "),this[e.right.type](e.right,r)},AssignmentPattern(e,r){this[e.left.type](e.left,r),r.write(" = "),this[e.right.type](e.right,r)},BinaryExpression:Xp=function(e,r){let a=e.operator==="in";a&&r.write("("),Qo(r,e.left,e,!1),r.write(" "+e.operator+" "),Qo(r,e.right,e,!0),a&&r.write(")")},LogicalExpression:Xp,ConditionalExpression(e,r){let{test:a}=e,u=r.expressionsPrecedence[a.type];u===di||u<=r.expressionsPrecedence.ConditionalExpression?(r.write("("),this[a.type](a,r),r.write(")")):this[a.type](a,r),r.write(" ? "),this[e.consequent.type](e.consequent,r),r.write(" : "),this[e.alternate.type](e.alternate,r)},NewExpression(e,r){r.write("new ");let a=r.expressionsPrecedence[e.callee.type];a===di||a{let{payload:r,job:a}=e.data,u;a.type=="path"?u=rd(r):a.type=="context"?u=nd(r):a.type=="frames"?u=ad(r):a.type=="paths"&&(u=id(r));try{postMessage({job:a,result:u})}catch(l){console.log(l),postMessage({job:a,result:{$error:\`Failed to index \${a.type} \${a.path}: \${l}\`}})}}; +\`,v):(e.write("/*"),Zv(e,v.value,a,u),e.write("*/"+u))}}function Xv(e){let r=e;for(;r!=null;){let{type:a}=r;if(a[0]==="C"&&a[1]==="a")return!0;if(a[0]==="M"&&a[1]==="e"&&a[2]==="m")r=r.object;else return!1}}function sc(e,r){let{generator:a}=e,{declarations:u}=r;e.write(r.kind+" ");let{length:l}=u;if(l>0){a.VariableDeclarator(u[0],e);for(let p=1;p0){r.write(u),l&&e.comments!=null&&Tt(r,e.comments,p,u);let{length:C}=v;for(let T=0;T0){for(;l0&&r.write(", ");let p=a[l],v=p.type[6];if(v==="D")r.write(p.local.name,p),l++;else if(v==="N")r.write("* as "+p.local.name,p),l++;else break}if(l0)for(let l=0;;){let p=a[l],{name:v}=p.local;if(r.write(v,p),v!==p.exported.name&&r.write(" as "+p.exported.name),++l "),e.body.type[0]==="O"?(r.write("("),this.ObjectExpression(e.body,r),r.write(")")):this[e.body.type](e.body,r)},ThisExpression(e,r){r.write("this",e)},Super(e,r){r.write("super",e)},RestElement:Xp=function(e,r){r.write("..."),this[e.argument.type](e.argument,r)},SpreadElement:Xp,YieldExpression(e,r){r.write(e.delegate?"yield*":"yield"),e.argument&&(r.write(" "),this[e.argument.type](e.argument,r))},AwaitExpression(e,r){r.write("await ",e),Zo(r,e.argument,e)},TemplateLiteral(e,r){let{quasis:a,expressions:u}=e;r.write("\`");let{length:l}=u;for(let v=0;v0){let{elements:a}=e,{length:u}=a;for(let l=0;;){let p=a[l];if(p!=null&&this[p.type](p,r),++l0){r.write(u),l&&e.comments!=null&&Tt(r,e.comments,p,u);let v=","+u,{properties:C}=e,{length:T}=C;for(let A=0;;){let R=C[A];if(l&&R.comments!=null&&Tt(r,R.comments,p,u),r.write(p),this[R.type](R,r),++A0){let{properties:a}=e,{length:u}=a;for(let l=0;this[a[l].type](a[l],r),++l1||l[0]==="U"&&(l[1]==="n"||l[1]==="p")&&u.prefix&&u.operator[0]===a&&(a==="+"||a==="-"))&&r.write(" "),p?(r.write(a.length>1?" (":"("),this[l](u,r),r.write(")")):this[l](u,r)}else this[e.argument.type](e.argument,r),r.write(e.operator)},UpdateExpression(e,r){e.prefix?(r.write(e.operator),this[e.argument.type](e.argument,r)):(this[e.argument.type](e.argument,r),r.write(e.operator))},AssignmentExpression(e,r){this[e.left.type](e.left,r),r.write(" "+e.operator+" "),this[e.right.type](e.right,r)},AssignmentPattern(e,r){this[e.left.type](e.left,r),r.write(" = "),this[e.right.type](e.right,r)},BinaryExpression:Jp=function(e,r){let a=e.operator==="in";a&&r.write("("),Zo(r,e.left,e,!1),r.write(" "+e.operator+" "),Zo(r,e.right,e,!0),a&&r.write(")")},LogicalExpression:Jp,ConditionalExpression(e,r){let{test:a}=e,u=r.expressionsPrecedence[a.type];u===di||u<=r.expressionsPrecedence.ConditionalExpression?(r.write("("),this[a.type](a,r),r.write(")")):this[a.type](a,r),r.write(" ? "),this[e.consequent.type](e.consequent,r),r.write(" : "),this[e.alternate.type](e.alternate,r)},NewExpression(e,r){r.write("new ");let a=r.expressionsPrecedence[e.callee.type];a===di||a{let{payload:r,job:a}=e.data,u;a.type=="path"?u=nd(r):a.type=="context"?u=id(r):a.type=="frames"?u=sd(r):a.type=="paths"&&(u=ad(r));try{postMessage({job:a,result:u})}catch(l){console.log(l),postMessage({job:a,result:{$error:\`Failed to index \${a.type} \${a.path}: \${l}\`}})}}; /** * @license * Lodash @@ -88326,10 +88335,10 @@ var Indexer = class { if (job !== void 0) this.send(job, index); if ("$error" in data2) { - for (const [_17, reject] of calls) + for (const [_18, reject] of calls) reject(data2["$error"]); } else { - for (const [callback, _17] of calls) + for (const [callback, _18] of calls) callback(data2); } } @@ -88446,10 +88455,10 @@ var Indexer = class { // src/core/superstate/workers/runner.worker.ts function Worker3() { - return inlineWorker(`"use strict";var t8=Object.create;var sd=Object.defineProperty;var n8=Object.getOwnPropertyDescriptor;var i8=Object.getOwnPropertyNames;var a8=Object.getPrototypeOf,o8=Object.prototype.hasOwnProperty;var un=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),s8=(e,r)=>{for(var t in r)sd(e,t,{get:r[t],enumerable:!0})},u8=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of i8(r))!o8.call(e,i)&&i!==t&&sd(e,i,{get:()=>r[i],enumerable:!(n=n8(r,i))||n.enumerable});return e};var ci=(e,r,t)=>(t=e!=null?t8(a8(e)):{},u8(r||!e||!e.__esModule?sd(t,"default",{value:e,enumerable:!0}):t,e));var ud=un((Us,lf)=>{(function(){var e,r="4.17.21",t=200,n="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",a="Invalid \`variable\` option passed into \`_.template\`",s="__lodash_hash_undefined__",l=500,f="__lodash_placeholder__",o=1,u=2,p=4,h=1,d=2,x=1,v=2,y=4,w=8,C=16,b=32,A=64,E=128,S=256,O=512,F=30,M="...",_=800,k=16,L=1,Y=2,$=3,V=1/0,q=9007199254740991,R=17976931348623157e292,j=0/0,U=4294967295,oe=U-1,me=U>>>1,ie=[["ary",E],["bind",x],["bindKey",v],["curry",w],["curryRight",C],["flip",O],["partial",b],["partialRight",A],["rearg",S]],H="[object Arguments]",ce="[object Array]",Me="[object AsyncFunction]",pe="[object Boolean]",ge="[object Date]",Se="[object DOMException]",xe="[object Error]",be="[object Function]",De="[object GeneratorFunction]",Ae="[object Map]",ze="[object Number]",Ze="[object Null]",K="[object Object]",te="[object Promise]",ye="[object Proxy]",ee="[object RegExp]",ne="[object Set]",ue="[object String]",Ee="[object Symbol]",Ce="[object Undefined]",Le="[object WeakMap]",Ie="[object WeakSet]",sr="[object ArrayBuffer]",ir="[object DataView]",Xe="[object Float32Array]",Or="[object Float64Array]",re="[object Int8Array]",le="[object Int16Array]",we="[object Int32Array]",Oe="[object Uint8Array]",ke="[object Uint8ClampedArray]",_e="[object Uint16Array]",Pe="[object Uint32Array]",We=/\\b__p \\+= '';/g,B=/\\b(__p \\+=) '' \\+/g,Q=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g,ve=/&(?:amp|lt|gt|quot|#39);/g,Be=/[&<>"']/g,er=RegExp(ve.source),fr=RegExp(Be.source),Zr=/<%-([\\s\\S]+?)%>/g,_t=/<%([\\s\\S]+?)%>/g,Yt=/<%=([\\s\\S]+?)%>/g,Qi=/\\.|\\[(?:[^[\\]]*|(["'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,Ei=/^\\w*$/,Du=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,Ci=/[\\\\^$.*+?()[\\]{}|]/g,Ya=RegExp(Ci.source),rr=/^\\s+/,Su=/\\s/,Nu=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,nn=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,Mo=/,? & /,nt=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,ga=/[()=,{}\\[\\]\\/\\s]/,Au=/\\\\(\\\\)?/g,zt=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,En=/\\w*$/,Cn=/^[-+]0x[0-9a-f]+$/i,At=/^0b[01]+$/i,gn=/^\\[object .+?Constructor\\]$/,Wn=/^0o[0-7]+$/i,Mi=/^(?:0|[1-9]\\d*)$/,Eu=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,Ha=/($^)/,Cu=/['\\n\\r\\u2028\\u2029\\\\]/g,pt="\\\\ud800-\\\\udfff",Ga="\\\\u0300-\\\\u036f",Mu="\\\\ufe20-\\\\ufe2f",fs="\\\\u20d0-\\\\u20ff",_o=Ga+Mu+fs,ls="\\\\u2700-\\\\u27bf",cs="a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff",xa="\\\\xac\\\\xb1\\\\xd7\\\\xf7",Kr="\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf",jt="\\\\u2000-\\\\u206f",_u=" \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000",Xi="A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde",_i="\\\\ufe0e\\\\ufe0f",ps=xa+Kr+jt+_u,Tu="['\\u2019]",im="["+pt+"]",Fu="["+ps+"]",Ji="["+_o+"]",Ou="\\\\d+",am="["+ls+"]",kf="["+cs+"]",$a="[^"+pt+ps+Ou+ls+cs+Xi+"]",Za="\\\\ud83c[\\\\udffb-\\\\udfff]",Rf="(?:"+Ji+"|"+Za+")",Qa="[^"+pt+"]",Vn="(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}",Bu="[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]",Xa="["+Xi+"]",Lf="\\\\u200d",qf="(?:"+kf+"|"+$a+")",om="(?:"+Xa+"|"+$a+")",Uf="(?:"+Tu+"(?:d|ll|m|re|s|t|ve))?",zf="(?:"+Tu+"(?:D|LL|M|RE|S|T|VE))?",Wf=Rf+"?",ms="["+_i+"]?",sm="(?:"+Lf+"(?:"+[Qa,Vn,Bu].join("|")+")"+ms+Wf+")*",Vf="\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])",um="\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])",Yf=ms+Wf+sm,fm="(?:"+[am,Vn,Bu].join("|")+")"+Yf,lm="(?:"+[Qa+Ji+"?",Ji,Vn,Bu,im].join("|")+")",cm=RegExp(Tu,"g"),pm=RegExp(Ji,"g"),Iu=RegExp(Za+"(?="+Za+")|"+lm+Yf,"g"),mm=RegExp([Xa+"?"+kf+"+"+Uf+"(?="+[Fu,Xa,"$"].join("|")+")",om+"+"+zf+"(?="+[Fu,Xa+qf,"$"].join("|")+")",Xa+"?"+qf+"+"+Uf,Xa+"+"+zf,um,Vf,Ou,fm].join("|"),"g"),hm=RegExp("["+Lf+pt+_o+_i+"]"),dm=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,vm=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],gm=-1,dt={};dt[Xe]=dt[Or]=dt[re]=dt[le]=dt[we]=dt[Oe]=dt[ke]=dt[_e]=dt[Pe]=!0,dt[H]=dt[ce]=dt[sr]=dt[pe]=dt[ir]=dt[ge]=dt[xe]=dt[be]=dt[Ae]=dt[ze]=dt[K]=dt[ee]=dt[ne]=dt[ue]=dt[Le]=!1;var mt={};mt[H]=mt[ce]=mt[sr]=mt[ir]=mt[pe]=mt[ge]=mt[Xe]=mt[Or]=mt[re]=mt[le]=mt[we]=mt[Ae]=mt[ze]=mt[K]=mt[ee]=mt[ne]=mt[ue]=mt[Ee]=mt[Oe]=mt[ke]=mt[_e]=mt[Pe]=!0,mt[xe]=mt[be]=mt[Le]=!1;var xm={\\u00C0:"A",\\u00C1:"A",\\u00C2:"A",\\u00C3:"A",\\u00C4:"A",\\u00C5:"A",\\u00E0:"a",\\u00E1:"a",\\u00E2:"a",\\u00E3:"a",\\u00E4:"a",\\u00E5:"a",\\u00C7:"C",\\u00E7:"c",\\u00D0:"D",\\u00F0:"d",\\u00C8:"E",\\u00C9:"E",\\u00CA:"E",\\u00CB:"E",\\u00E8:"e",\\u00E9:"e",\\u00EA:"e",\\u00EB:"e",\\u00CC:"I",\\u00CD:"I",\\u00CE:"I",\\u00CF:"I",\\u00EC:"i",\\u00ED:"i",\\u00EE:"i",\\u00EF:"i",\\u00D1:"N",\\u00F1:"n",\\u00D2:"O",\\u00D3:"O",\\u00D4:"O",\\u00D5:"O",\\u00D6:"O",\\u00D8:"O",\\u00F2:"o",\\u00F3:"o",\\u00F4:"o",\\u00F5:"o",\\u00F6:"o",\\u00F8:"o",\\u00D9:"U",\\u00DA:"U",\\u00DB:"U",\\u00DC:"U",\\u00F9:"u",\\u00FA:"u",\\u00FB:"u",\\u00FC:"u",\\u00DD:"Y",\\u00FD:"y",\\u00FF:"y",\\u00C6:"Ae",\\u00E6:"ae",\\u00DE:"Th",\\u00FE:"th",\\u00DF:"ss",\\u0100:"A",\\u0102:"A",\\u0104:"A",\\u0101:"a",\\u0103:"a",\\u0105:"a",\\u0106:"C",\\u0108:"C",\\u010A:"C",\\u010C:"C",\\u0107:"c",\\u0109:"c",\\u010B:"c",\\u010D:"c",\\u010E:"D",\\u0110:"D",\\u010F:"d",\\u0111:"d",\\u0112:"E",\\u0114:"E",\\u0116:"E",\\u0118:"E",\\u011A:"E",\\u0113:"e",\\u0115:"e",\\u0117:"e",\\u0119:"e",\\u011B:"e",\\u011C:"G",\\u011E:"G",\\u0120:"G",\\u0122:"G",\\u011D:"g",\\u011F:"g",\\u0121:"g",\\u0123:"g",\\u0124:"H",\\u0126:"H",\\u0125:"h",\\u0127:"h",\\u0128:"I",\\u012A:"I",\\u012C:"I",\\u012E:"I",\\u0130:"I",\\u0129:"i",\\u012B:"i",\\u012D:"i",\\u012F:"i",\\u0131:"i",\\u0134:"J",\\u0135:"j",\\u0136:"K",\\u0137:"k",\\u0138:"k",\\u0139:"L",\\u013B:"L",\\u013D:"L",\\u013F:"L",\\u0141:"L",\\u013A:"l",\\u013C:"l",\\u013E:"l",\\u0140:"l",\\u0142:"l",\\u0143:"N",\\u0145:"N",\\u0147:"N",\\u014A:"N",\\u0144:"n",\\u0146:"n",\\u0148:"n",\\u014B:"n",\\u014C:"O",\\u014E:"O",\\u0150:"O",\\u014D:"o",\\u014F:"o",\\u0151:"o",\\u0154:"R",\\u0156:"R",\\u0158:"R",\\u0155:"r",\\u0157:"r",\\u0159:"r",\\u015A:"S",\\u015C:"S",\\u015E:"S",\\u0160:"S",\\u015B:"s",\\u015D:"s",\\u015F:"s",\\u0161:"s",\\u0162:"T",\\u0164:"T",\\u0166:"T",\\u0163:"t",\\u0165:"t",\\u0167:"t",\\u0168:"U",\\u016A:"U",\\u016C:"U",\\u016E:"U",\\u0170:"U",\\u0172:"U",\\u0169:"u",\\u016B:"u",\\u016D:"u",\\u016F:"u",\\u0171:"u",\\u0173:"u",\\u0174:"W",\\u0175:"w",\\u0176:"Y",\\u0177:"y",\\u0178:"Y",\\u0179:"Z",\\u017B:"Z",\\u017D:"Z",\\u017A:"z",\\u017C:"z",\\u017E:"z",\\u0132:"IJ",\\u0133:"ij",\\u0152:"Oe",\\u0153:"oe",\\u0149:"'n",\\u017F:"s"},Pu={"&":"&","<":"<",">":">",'"':""","'":"'"},ku={"&":"&","<":"<",">":">",""":'"',"'":"'"},ym={"\\\\":"\\\\","'":"'","\\n":"n","\\r":"r","\\u2028":"u2028","\\u2029":"u2029"},Hf=parseFloat,Gf=parseInt,$f=typeof global=="object"&&global&&global.Object===Object&&global,bm=typeof self=="object"&&self&&self.Object===Object&&self,Wt=$f||bm||Function("return this")(),Ru=typeof Us=="object"&&Us&&!Us.nodeType&&Us,Ki=Ru&&typeof lf=="object"&&lf&&!lf.nodeType&&lf,vt=Ki&&Ki.exports===Ru,ya=vt&&$f.process,en=function(){try{var he=Ki&&Ki.require&&Ki.require("util").types;return he||ya&&ya.binding&&ya.binding("util")}catch{}}(),Zf=en&&en.isArrayBuffer,Lu=en&&en.isDate,Qf=en&&en.isMap,Xf=en&&en.isRegExp,To=en&&en.isSet,Ti=en&&en.isTypedArray;function an(he,Fe,Ne){switch(Ne.length){case 0:return he.call(Fe);case 1:return he.call(Fe,Ne[0]);case 2:return he.call(Fe,Ne[0],Ne[1]);case 3:return he.call(Fe,Ne[0],Ne[1],Ne[2])}return he.apply(Fe,Ne)}function wm(he,Fe,Ne,nr){for(var Nr=-1,jr=he==null?0:he.length;++Nr-1}function qu(he,Fe,Ne){for(var nr=-1,Nr=he==null?0:he.length;++nr-1;);return Ne}function nl(he,Fe){for(var Ne=he.length;Ne--&&Ja(Fe,he[Ne],0)>-1;);return Ne}function Cm(he,Fe){for(var Ne=he.length,nr=0;Ne--;)he[Ne]===Fe&&++nr;return nr}var il=Fo(xm),Mm=Fo(Pu);function _m(he){return"\\\\"+ym[he]}function Tm(he,Fe){return he==null?e:he[Fe]}function ni(he){return hm.test(he)}function Fm(he){return dm.test(he)}function Om(he){for(var Fe,Ne=[];!(Fe=he.next()).done;)Ne.push(Fe.value);return Ne}function $u(he){var Fe=-1,Ne=Array(he.size);return he.forEach(function(nr,Nr){Ne[++Fe]=[Nr,nr]}),Ne}function Oo(he,Fe){return function(Ne){return he(Fe(Ne))}}function Yn(he,Fe){for(var Ne=-1,nr=he.length,Nr=0,jr=[];++Ne-1}function yl(c,m){var D=this.__data__,I=Tn(D,c);return I<0?(++this.size,D.push([c,m])):D[I][1]=m,this}Bi.prototype.clear=oh,Bi.prototype.delete=xl,Bi.prototype.get=sh,Bi.prototype.has=uh,Bi.prototype.set=yl;function Ii(c){var m=-1,D=c==null?0:c.length;for(this.clear();++m=m?c:m)),c}function yn(c,m,D,I,W,J){var ae,fe=m&o,de=m&u,Re=m&p;if(D&&(ae=W?D(c,I,W,J):D(c)),ae!==e)return ae;if(!Ct(c))return c;var qe=Fr(c);if(qe){if(ae=FI(c),!fe)return Fn(c,ae)}else{var Ve=pn(c),Ke=Ve==be||Ve==De;if(uo(c))return f0(c,fe);if(Ve==K||Ve==H||Ke&&!W){if(ae=de||Ke?{}:M0(c),!fe)return de?bI(c,gh(ae,c)):yI(c,Ju(ae,c))}else{if(!mt[Ve])return W?c:{};ae=OI(c,Ve,fe)}}J||(J=new Hn);var cr=J.get(c);if(cr)return cr;J.set(c,ae),nx(c)?c.forEach(function(Dr){ae.add(yn(Dr,m,D,Dr,c,J))}):rx(c)&&c.forEach(function(Dr,qr){ae.set(qr,yn(Dr,m,D,qr,c,J))});var wr=Re?de?Lh:Rh:de?Bn:rn,Pr=qe?e:wr(c);return Tt(Pr||c,function(Dr,qr){Pr&&(qr=Dr,Dr=c[qr]),Wo(ae,qr,yn(Dr,m,D,qr,c,J))}),ae}function Ku(c){var m=rn(c);return function(D){return Nl(D,c,m)}}function Nl(c,m,D){var I=D.length;if(c==null)return!I;for(c=kr(c);I--;){var W=D[I],J=m[W],ae=c[W];if(ae===e&&!(W in c)||!J(ae))return!1}return!0}function Al(c,m,D){if(typeof c!="function")throw new Mn(i);return uf(function(){c.apply(e,D)},m)}function bn(c,m,D,I){var W=-1,J=ds,ae=!0,fe=c.length,de=[],Re=m.length;if(!fe)return de;D&&(m=ct(m,cn(D))),I?(J=qu,ae=!1):m.length>=t&&(J=Ka,ae=!1,m=new Sa(m));e:for(;++WW?0:W+D),I=I===e||I>W?W:Br(I),I<0&&(I+=W),I=D>I?0:ax(I);D0&&D(fe)?m>1?Ht(fe,m-1,D,I,W):ti(W,fe):I||(W[W.length]=fe)}return W}var ju=d0(),Ml=d0(!0);function ii(c,m){return c&&ju(c,m,rn)}function ef(c,m){return c&&Ml(c,m,rn)}function ai(c,m){return ji(m,function(D){return _a(c[D])})}function Aa(c,m){m=oo(m,c);for(var D=0,I=m.length;c!=null&&Dm}function bh(c,m){return c!=null&&at.call(c,m)}function wh(c,m){return c!=null&&m in kr(c)}function Dh(c,m,D){return c>=Et(m,D)&&c=120&&qe.length>=120)?new Sa(ae&&qe):e}qe=c[0];var Ve=-1,Ke=fe[0];e:for(;++Ve-1;)fe!==c&&wa.call(fe,de,1),wa.call(c,de,1);return c}function r0(c,m){for(var D=c?m.length:0,I=D-1;D--;){var W=m[D];if(D==I||W!==J){var J=W;Ma(W)?wa.call(c,W,1):Th(c,W)}}return c}function Ch(c,m){return c+ko(vl()*(m-c+1))}function uI(c,m,D,I){for(var W=-1,J=Ft(Ns((m-c)/(D||1)),0),ae=Ne(J);J--;)ae[I?J:++W]=c,c+=D;return ae}function Mh(c,m){var D="";if(!c||m<1||m>q)return D;do m%2&&(D+=c),m=ko(m/2),m&&(c+=c);while(m);return D}function Rr(c,m){return Hh(F0(c,m,In),c+"")}function fI(c){return Sl(qs(c))}function lI(c,m){var D=qs(c);return Ul(D,Na(m,0,D.length))}function af(c,m,D,I){if(!Ct(c))return c;m=oo(m,c);for(var W=-1,J=m.length,ae=J-1,fe=c;fe!=null&&++WW?0:W+m),D=D>W?W:D,D<0&&(D+=W),W=m>D?0:D-m>>>0,m>>>=0;for(var J=Ne(W);++I>>1,ae=c[J];ae!==null&&!$n(ae)&&(D?ae<=m:ae=t){var Re=m?null:NI(c);if(Re)return ja(Re);ae=!1,W=Ka,de=new Sa}else de=m?[]:fe;e:for(;++I=I?c:ui(c,m,D)}var u0=Ym||function(c){return Wt.clearTimeout(c)};function f0(c,m){if(m)return c.slice();var D=c.length,I=fl?fl(D):new c.constructor(D);return c.copy(I),I}function Ih(c){var m=new c.constructor(c.byteLength);return new ws(m).set(new ws(c)),m}function dI(c,m){var D=m?Ih(c.buffer):c.buffer;return new c.constructor(D,c.byteOffset,c.byteLength)}function vI(c){var m=new c.constructor(c.source,En.exec(c));return m.lastIndex=c.lastIndex,m}function gI(c){return zo?kr(zo.call(c)):{}}function l0(c,m){var D=m?Ih(c.buffer):c.buffer;return new c.constructor(D,c.byteOffset,c.length)}function c0(c,m){if(c!==m){var D=c!==e,I=c===null,W=c===c,J=$n(c),ae=m!==e,fe=m===null,de=m===m,Re=$n(m);if(!fe&&!Re&&!J&&c>m||J&&ae&&de&&!fe&&!Re||I&&ae&&de||!D&&de||!W)return 1;if(!I&&!J&&!Re&&c=fe)return de;var Re=D[I];return de*(Re=="desc"?-1:1)}}return c.index-m.index}function p0(c,m,D,I){for(var W=-1,J=c.length,ae=D.length,fe=-1,de=m.length,Re=Ft(J-ae,0),qe=Ne(de+Re),Ve=!I;++fe1?D[W-1]:e,ae=W>2?D[2]:e;for(J=c.length>3&&typeof J=="function"?(W--,J):e,ae&&wn(D[0],D[1],ae)&&(J=W<3?e:J,W=1),m=kr(m);++I-1?W[J?m[ae]:ae]:e}}function x0(c){return Ca(function(m){var D=m.length,I=D,W=_n.prototype.thru;for(c&&m.reverse();I--;){var J=m[I];if(typeof J!="function")throw new Mn(i);if(W&&!ae&&Ll(J)=="wrapper")var ae=new _n([],!0)}for(I=ae?I:D;++I1&&Hr.reverse(),qe&&defe))return!1;var Re=J.get(c),qe=J.get(m);if(Re&&qe)return Re==m&&qe==c;var Ve=-1,Ke=!0,cr=D&d?new Sa:e;for(J.set(c,m),J.set(m,c);++Ve1?"& ":"")+m[I],m=m.join(D>2?", ":" "),c.replace(Nu,\`{ + return inlineWorker(`"use strict";var n8=Object.create;var fd=Object.defineProperty;var i8=Object.getOwnPropertyDescriptor;var a8=Object.getOwnPropertyNames;var o8=Object.getPrototypeOf,s8=Object.prototype.hasOwnProperty;var un=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),u8=(e,r)=>{for(var t in r)fd(e,t,{get:r[t],enumerable:!0})},f8=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of a8(r))!s8.call(e,i)&&i!==t&&fd(e,i,{get:()=>r[i],enumerable:!(n=i8(r,i))||n.enumerable});return e};var Xn=(e,r,t)=>(t=e!=null?n8(o8(e)):{},f8(r||!e||!e.__esModule?fd(t,"default",{value:e,enumerable:!0}):t,e));var Xl=un((Us,cf)=>{(function(){var e,r="4.17.21",t=200,n="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",a="Invalid \`variable\` option passed into \`_.template\`",s="__lodash_hash_undefined__",l=500,f="__lodash_placeholder__",o=1,u=2,p=4,h=1,d=2,x=1,v=2,y=4,w=8,C=16,b=32,A=64,E=128,S=256,O=512,F=30,M="...",_=800,k=16,L=1,Y=2,$=3,V=1/0,q=9007199254740991,R=17976931348623157e292,j=0/0,U=4294967295,oe=U-1,me=U>>>1,ie=[["ary",E],["bind",x],["bindKey",v],["curry",w],["curryRight",C],["flip",O],["partial",b],["partialRight",A],["rearg",S]],H="[object Arguments]",ce="[object Array]",Me="[object AsyncFunction]",pe="[object Boolean]",ge="[object Date]",Se="[object DOMException]",xe="[object Error]",be="[object Function]",De="[object GeneratorFunction]",Ae="[object Map]",ze="[object Number]",Ze="[object Null]",K="[object Object]",te="[object Promise]",ye="[object Proxy]",ee="[object RegExp]",ne="[object Set]",ue="[object String]",Ee="[object Symbol]",Ce="[object Undefined]",Le="[object WeakMap]",Ie="[object WeakSet]",sr="[object ArrayBuffer]",ir="[object DataView]",Xe="[object Float32Array]",Or="[object Float64Array]",re="[object Int8Array]",le="[object Int16Array]",we="[object Int32Array]",Oe="[object Uint8Array]",ke="[object Uint8ClampedArray]",_e="[object Uint16Array]",Pe="[object Uint32Array]",We=/\\b__p \\+= '';/g,B=/\\b(__p \\+=) '' \\+/g,Q=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g,ve=/&(?:amp|lt|gt|quot|#39);/g,Be=/[&<>"']/g,er=RegExp(ve.source),fr=RegExp(Be.source),Zr=/<%-([\\s\\S]+?)%>/g,_t=/<%([\\s\\S]+?)%>/g,Yt=/<%=([\\s\\S]+?)%>/g,Qi=/\\.|\\[(?:[^[\\]]*|(["'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,Ei=/^\\w*$/,Su=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,Ci=/[\\\\^$.*+?()[\\]{}|]/g,Ya=RegExp(Ci.source),rr=/^\\s+/,Nu=/\\s/,Au=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,nn=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,Mo=/,? & /,nt=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,ga=/[()=,{}\\[\\]\\/\\s]/,Eu=/\\\\(\\\\)?/g,zt=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,En=/\\w*$/,Cn=/^[-+]0x[0-9a-f]+$/i,At=/^0b[01]+$/i,gn=/^\\[object .+?Constructor\\]$/,Wn=/^0o[0-7]+$/i,Mi=/^(?:0|[1-9]\\d*)$/,Cu=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,Ha=/($^)/,Mu=/['\\n\\r\\u2028\\u2029\\\\]/g,pt="\\\\ud800-\\\\udfff",Ga="\\\\u0300-\\\\u036f",_u="\\\\ufe20-\\\\ufe2f",fs="\\\\u20d0-\\\\u20ff",_o=Ga+_u+fs,ls="\\\\u2700-\\\\u27bf",cs="a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff",xa="\\\\xac\\\\xb1\\\\xd7\\\\xf7",Kr="\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf",jt="\\\\u2000-\\\\u206f",Tu=" \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000",Xi="A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde",_i="\\\\ufe0e\\\\ufe0f",ps=xa+Kr+jt+Tu,Fu="['\\u2019]",om="["+pt+"]",Ou="["+ps+"]",Ji="["+_o+"]",Bu="\\\\d+",sm="["+ls+"]",Rf="["+cs+"]",$a="[^"+pt+ps+Bu+ls+cs+Xi+"]",Za="\\\\ud83c[\\\\udffb-\\\\udfff]",Lf="(?:"+Ji+"|"+Za+")",Qa="[^"+pt+"]",Vn="(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}",Iu="[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]",Xa="["+Xi+"]",qf="\\\\u200d",Uf="(?:"+Rf+"|"+$a+")",um="(?:"+Xa+"|"+$a+")",zf="(?:"+Fu+"(?:d|ll|m|re|s|t|ve))?",Wf="(?:"+Fu+"(?:D|LL|M|RE|S|T|VE))?",Vf=Lf+"?",ms="["+_i+"]?",fm="(?:"+qf+"(?:"+[Qa,Vn,Iu].join("|")+")"+ms+Vf+")*",Yf="\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])",lm="\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])",Hf=ms+Vf+fm,cm="(?:"+[sm,Vn,Iu].join("|")+")"+Hf,pm="(?:"+[Qa+Ji+"?",Ji,Vn,Iu,om].join("|")+")",mm=RegExp(Fu,"g"),hm=RegExp(Ji,"g"),Pu=RegExp(Za+"(?="+Za+")|"+pm+Hf,"g"),dm=RegExp([Xa+"?"+Rf+"+"+zf+"(?="+[Ou,Xa,"$"].join("|")+")",um+"+"+Wf+"(?="+[Ou,Xa+Uf,"$"].join("|")+")",Xa+"?"+Uf+"+"+zf,Xa+"+"+Wf,lm,Yf,Bu,cm].join("|"),"g"),vm=RegExp("["+qf+pt+_o+_i+"]"),gm=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,xm=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ym=-1,dt={};dt[Xe]=dt[Or]=dt[re]=dt[le]=dt[we]=dt[Oe]=dt[ke]=dt[_e]=dt[Pe]=!0,dt[H]=dt[ce]=dt[sr]=dt[pe]=dt[ir]=dt[ge]=dt[xe]=dt[be]=dt[Ae]=dt[ze]=dt[K]=dt[ee]=dt[ne]=dt[ue]=dt[Le]=!1;var mt={};mt[H]=mt[ce]=mt[sr]=mt[ir]=mt[pe]=mt[ge]=mt[Xe]=mt[Or]=mt[re]=mt[le]=mt[we]=mt[Ae]=mt[ze]=mt[K]=mt[ee]=mt[ne]=mt[ue]=mt[Ee]=mt[Oe]=mt[ke]=mt[_e]=mt[Pe]=!0,mt[xe]=mt[be]=mt[Le]=!1;var bm={\\u00C0:"A",\\u00C1:"A",\\u00C2:"A",\\u00C3:"A",\\u00C4:"A",\\u00C5:"A",\\u00E0:"a",\\u00E1:"a",\\u00E2:"a",\\u00E3:"a",\\u00E4:"a",\\u00E5:"a",\\u00C7:"C",\\u00E7:"c",\\u00D0:"D",\\u00F0:"d",\\u00C8:"E",\\u00C9:"E",\\u00CA:"E",\\u00CB:"E",\\u00E8:"e",\\u00E9:"e",\\u00EA:"e",\\u00EB:"e",\\u00CC:"I",\\u00CD:"I",\\u00CE:"I",\\u00CF:"I",\\u00EC:"i",\\u00ED:"i",\\u00EE:"i",\\u00EF:"i",\\u00D1:"N",\\u00F1:"n",\\u00D2:"O",\\u00D3:"O",\\u00D4:"O",\\u00D5:"O",\\u00D6:"O",\\u00D8:"O",\\u00F2:"o",\\u00F3:"o",\\u00F4:"o",\\u00F5:"o",\\u00F6:"o",\\u00F8:"o",\\u00D9:"U",\\u00DA:"U",\\u00DB:"U",\\u00DC:"U",\\u00F9:"u",\\u00FA:"u",\\u00FB:"u",\\u00FC:"u",\\u00DD:"Y",\\u00FD:"y",\\u00FF:"y",\\u00C6:"Ae",\\u00E6:"ae",\\u00DE:"Th",\\u00FE:"th",\\u00DF:"ss",\\u0100:"A",\\u0102:"A",\\u0104:"A",\\u0101:"a",\\u0103:"a",\\u0105:"a",\\u0106:"C",\\u0108:"C",\\u010A:"C",\\u010C:"C",\\u0107:"c",\\u0109:"c",\\u010B:"c",\\u010D:"c",\\u010E:"D",\\u0110:"D",\\u010F:"d",\\u0111:"d",\\u0112:"E",\\u0114:"E",\\u0116:"E",\\u0118:"E",\\u011A:"E",\\u0113:"e",\\u0115:"e",\\u0117:"e",\\u0119:"e",\\u011B:"e",\\u011C:"G",\\u011E:"G",\\u0120:"G",\\u0122:"G",\\u011D:"g",\\u011F:"g",\\u0121:"g",\\u0123:"g",\\u0124:"H",\\u0126:"H",\\u0125:"h",\\u0127:"h",\\u0128:"I",\\u012A:"I",\\u012C:"I",\\u012E:"I",\\u0130:"I",\\u0129:"i",\\u012B:"i",\\u012D:"i",\\u012F:"i",\\u0131:"i",\\u0134:"J",\\u0135:"j",\\u0136:"K",\\u0137:"k",\\u0138:"k",\\u0139:"L",\\u013B:"L",\\u013D:"L",\\u013F:"L",\\u0141:"L",\\u013A:"l",\\u013C:"l",\\u013E:"l",\\u0140:"l",\\u0142:"l",\\u0143:"N",\\u0145:"N",\\u0147:"N",\\u014A:"N",\\u0144:"n",\\u0146:"n",\\u0148:"n",\\u014B:"n",\\u014C:"O",\\u014E:"O",\\u0150:"O",\\u014D:"o",\\u014F:"o",\\u0151:"o",\\u0154:"R",\\u0156:"R",\\u0158:"R",\\u0155:"r",\\u0157:"r",\\u0159:"r",\\u015A:"S",\\u015C:"S",\\u015E:"S",\\u0160:"S",\\u015B:"s",\\u015D:"s",\\u015F:"s",\\u0161:"s",\\u0162:"T",\\u0164:"T",\\u0166:"T",\\u0163:"t",\\u0165:"t",\\u0167:"t",\\u0168:"U",\\u016A:"U",\\u016C:"U",\\u016E:"U",\\u0170:"U",\\u0172:"U",\\u0169:"u",\\u016B:"u",\\u016D:"u",\\u016F:"u",\\u0171:"u",\\u0173:"u",\\u0174:"W",\\u0175:"w",\\u0176:"Y",\\u0177:"y",\\u0178:"Y",\\u0179:"Z",\\u017B:"Z",\\u017D:"Z",\\u017A:"z",\\u017C:"z",\\u017E:"z",\\u0132:"IJ",\\u0133:"ij",\\u0152:"Oe",\\u0153:"oe",\\u0149:"'n",\\u017F:"s"},ku={"&":"&","<":"<",">":">",'"':""","'":"'"},Ru={"&":"&","<":"<",">":">",""":'"',"'":"'"},wm={"\\\\":"\\\\","'":"'","\\n":"n","\\r":"r","\\u2028":"u2028","\\u2029":"u2029"},Gf=parseFloat,$f=parseInt,Zf=typeof global=="object"&&global&&global.Object===Object&&global,Dm=typeof self=="object"&&self&&self.Object===Object&&self,Wt=Zf||Dm||Function("return this")(),Lu=typeof Us=="object"&&Us&&!Us.nodeType&&Us,Ki=Lu&&typeof cf=="object"&&cf&&!cf.nodeType&&cf,vt=Ki&&Ki.exports===Lu,ya=vt&&Zf.process,en=function(){try{var he=Ki&&Ki.require&&Ki.require("util").types;return he||ya&&ya.binding&&ya.binding("util")}catch{}}(),Qf=en&&en.isArrayBuffer,qu=en&&en.isDate,Xf=en&&en.isMap,Jf=en&&en.isRegExp,To=en&&en.isSet,Ti=en&&en.isTypedArray;function an(he,Fe,Ne){switch(Ne.length){case 0:return he.call(Fe);case 1:return he.call(Fe,Ne[0]);case 2:return he.call(Fe,Ne[0],Ne[1]);case 3:return he.call(Fe,Ne[0],Ne[1],Ne[2])}return he.apply(Fe,Ne)}function Sm(he,Fe,Ne,nr){for(var Nr=-1,jr=he==null?0:he.length;++Nr-1}function Uu(he,Fe,Ne){for(var nr=-1,Nr=he==null?0:he.length;++nr-1;);return Ne}function il(he,Fe){for(var Ne=he.length;Ne--&&Ja(Fe,he[Ne],0)>-1;);return Ne}function _m(he,Fe){for(var Ne=he.length,nr=0;Ne--;)he[Ne]===Fe&&++nr;return nr}var al=Fo(bm),Tm=Fo(ku);function Fm(he){return"\\\\"+wm[he]}function Om(he,Fe){return he==null?e:he[Fe]}function ii(he){return vm.test(he)}function Bm(he){return gm.test(he)}function Im(he){for(var Fe,Ne=[];!(Fe=he.next()).done;)Ne.push(Fe.value);return Ne}function Zu(he){var Fe=-1,Ne=Array(he.size);return he.forEach(function(nr,Nr){Ne[++Fe]=[Nr,nr]}),Ne}function Oo(he,Fe){return function(Ne){return he(Fe(Ne))}}function Yn(he,Fe){for(var Ne=-1,nr=he.length,Nr=0,jr=[];++Ne-1}function bl(c,m){var D=this.__data__,I=Tn(D,c);return I<0?(++this.size,D.push([c,m])):D[I][1]=m,this}Bi.prototype.clear=uh,Bi.prototype.delete=yl,Bi.prototype.get=fh,Bi.prototype.has=lh,Bi.prototype.set=bl;function Ii(c){var m=-1,D=c==null?0:c.length;for(this.clear();++m=m?c:m)),c}function yn(c,m,D,I,W,J){var ae,fe=m&o,de=m&u,Re=m&p;if(D&&(ae=W?D(c,I,W,J):D(c)),ae!==e)return ae;if(!Ct(c))return c;var qe=Fr(c);if(qe){if(ae=OI(c),!fe)return Fn(c,ae)}else{var Ve=pn(c),Ke=Ve==be||Ve==De;if(uo(c))return l0(c,fe);if(Ve==K||Ve==H||Ke&&!W){if(ae=de||Ke?{}:_0(c),!fe)return de?wI(c,yh(ae,c)):bI(c,Ku(ae,c))}else{if(!mt[Ve])return W?c:{};ae=BI(c,Ve,fe)}}J||(J=new Hn);var cr=J.get(c);if(cr)return cr;J.set(c,ae),ix(c)?c.forEach(function(Dr){ae.add(yn(Dr,m,D,Dr,c,J))}):tx(c)&&c.forEach(function(Dr,qr){ae.set(qr,yn(Dr,m,D,qr,c,J))});var wr=Re?de?Uh:qh:de?Bn:rn,Pr=qe?e:wr(c);return Tt(Pr||c,function(Dr,qr){Pr&&(qr=Dr,Dr=c[qr]),Wo(ae,qr,yn(Dr,m,D,qr,c,J))}),ae}function ju(c){var m=rn(c);return function(D){return Al(D,c,m)}}function Al(c,m,D){var I=D.length;if(c==null)return!I;for(c=kr(c);I--;){var W=D[I],J=m[W],ae=c[W];if(ae===e&&!(W in c)||!J(ae))return!1}return!0}function El(c,m,D){if(typeof c!="function")throw new Mn(i);return ff(function(){c.apply(e,D)},m)}function bn(c,m,D,I){var W=-1,J=ds,ae=!0,fe=c.length,de=[],Re=m.length;if(!fe)return de;D&&(m=ct(m,cn(D))),I?(J=Uu,ae=!1):m.length>=t&&(J=Ka,ae=!1,m=new Sa(m));e:for(;++WW?0:W+D),I=I===e||I>W?W:Br(I),I<0&&(I+=W),I=D>I?0:ox(I);D0&&D(fe)?m>1?Ht(fe,m-1,D,I,W):ni(W,fe):I||(W[W.length]=fe)}return W}var ef=v0(),_l=v0(!0);function ai(c,m){return c&&ef(c,m,rn)}function rf(c,m){return c&&_l(c,m,rn)}function oi(c,m){return ji(m,function(D){return _a(c[D])})}function Aa(c,m){m=oo(m,c);for(var D=0,I=m.length;c!=null&&Dm}function Dh(c,m){return c!=null&&at.call(c,m)}function Sh(c,m){return c!=null&&m in kr(c)}function Nh(c,m,D){return c>=Et(m,D)&&c=120&&qe.length>=120)?new Sa(ae&&qe):e}qe=c[0];var Ve=-1,Ke=fe[0];e:for(;++Ve-1;)fe!==c&&wa.call(fe,de,1),wa.call(c,de,1);return c}function t0(c,m){for(var D=c?m.length:0,I=D-1;D--;){var W=m[D];if(D==I||W!==J){var J=W;Ma(W)?wa.call(c,W,1):Oh(c,W)}}return c}function _h(c,m){return c+ko(gl()*(m-c+1))}function fI(c,m,D,I){for(var W=-1,J=Ft(Ns((m-c)/(D||1)),0),ae=Ne(J);J--;)ae[I?J:++W]=c,c+=D;return ae}function Th(c,m){var D="";if(!c||m<1||m>q)return D;do m%2&&(D+=c),m=ko(m/2),m&&(c+=c);while(m);return D}function Rr(c,m){return $h(O0(c,m,In),c+"")}function lI(c){return Nl(qs(c))}function cI(c,m){var D=qs(c);return zl(D,Na(m,0,D.length))}function of(c,m,D,I){if(!Ct(c))return c;m=oo(m,c);for(var W=-1,J=m.length,ae=J-1,fe=c;fe!=null&&++WW?0:W+m),D=D>W?W:D,D<0&&(D+=W),W=m>D?0:D-m>>>0,m>>>=0;for(var J=Ne(W);++I>>1,ae=c[J];ae!==null&&!$n(ae)&&(D?ae<=m:ae=t){var Re=m?null:AI(c);if(Re)return ja(Re);ae=!1,W=Ka,de=new Sa}else de=m?[]:fe;e:for(;++I=I?c:fi(c,m,D)}var f0=Gm||function(c){return Wt.clearTimeout(c)};function l0(c,m){if(m)return c.slice();var D=c.length,I=ll?ll(D):new c.constructor(D);return c.copy(I),I}function kh(c){var m=new c.constructor(c.byteLength);return new ws(m).set(new ws(c)),m}function vI(c,m){var D=m?kh(c.buffer):c.buffer;return new c.constructor(D,c.byteOffset,c.byteLength)}function gI(c){var m=new c.constructor(c.source,En.exec(c));return m.lastIndex=c.lastIndex,m}function xI(c){return zo?kr(zo.call(c)):{}}function c0(c,m){var D=m?kh(c.buffer):c.buffer;return new c.constructor(D,c.byteOffset,c.length)}function p0(c,m){if(c!==m){var D=c!==e,I=c===null,W=c===c,J=$n(c),ae=m!==e,fe=m===null,de=m===m,Re=$n(m);if(!fe&&!Re&&!J&&c>m||J&&ae&&de&&!fe&&!Re||I&&ae&&de||!D&&de||!W)return 1;if(!I&&!J&&!Re&&c=fe)return de;var Re=D[I];return de*(Re=="desc"?-1:1)}}return c.index-m.index}function m0(c,m,D,I){for(var W=-1,J=c.length,ae=D.length,fe=-1,de=m.length,Re=Ft(J-ae,0),qe=Ne(de+Re),Ve=!I;++fe1?D[W-1]:e,ae=W>2?D[2]:e;for(J=c.length>3&&typeof J=="function"?(W--,J):e,ae&&wn(D[0],D[1],ae)&&(J=W<3?e:J,W=1),m=kr(m);++I-1?W[J?m[ae]:ae]:e}}function y0(c){return Ca(function(m){var D=m.length,I=D,W=_n.prototype.thru;for(c&&m.reverse();I--;){var J=m[I];if(typeof J!="function")throw new Mn(i);if(W&&!ae&&ql(J)=="wrapper")var ae=new _n([],!0)}for(I=ae?I:D;++I1&&Hr.reverse(),qe&&defe))return!1;var Re=J.get(c),qe=J.get(m);if(Re&&qe)return Re==m&&qe==c;var Ve=-1,Ke=!0,cr=D&d?new Sa:e;for(J.set(c,m),J.set(m,c);++Ve1?"& ":"")+m[I],m=m.join(D>2?", ":" "),c.replace(Au,\`{ /* [wrapped with \`+m+\`] */ -\`)}function II(c){return Fr(c)||$o(c)||!!(pl&&c&&c[pl])}function Ma(c,m){var D=typeof c;return m=m??q,!!m&&(D=="number"||D!="symbol"&&Mi.test(c))&&c>-1&&c%1==0&&c0){if(++m>=_)return arguments[0]}else m=0;return c.apply(e,arguments)}}function Ul(c,m){var D=-1,I=c.length,W=I-1;for(m=m===e?I:m;++D1?c[m-1]:e;return D=typeof D=="function"?(c.pop(),D):e,V0(c,D)});function Y0(c){var m=Z(c);return m.__chain__=!0,m}function H4(c,m){return m(c),c}function zl(c,m){return m(c)}var G4=Ca(function(c){var m=c.length,D=m?c[0]:0,I=this.__wrapped__,W=function(J){return Bs(J,c)};return m>1||this.__actions__.length||!(I instanceof Ir)||!Ma(D)?this.thru(W):(I=I.slice(D,+D+(m?1:0)),I.__actions__.push({func:zl,args:[W],thisArg:e}),new _n(I,this.__chain__).thru(function(J){return m&&!J.length&&J.push(e),J}))});function $4(){return Y0(this)}function Z4(){return new _n(this.value(),this.__chain__)}function Q4(){this.__values__===e&&(this.__values__=ix(this.value()));var c=this.__index__>=this.__values__.length,m=c?e:this.__values__[this.__index__++];return{done:c,value:m}}function X4(){return this}function J4(c){for(var m,D=this;D instanceof _s;){var I=R0(D);I.__index__=0,I.__values__=e,m?W.__wrapped__=I:m=I;var W=I;D=D.__wrapped__}return W.__wrapped__=c,m}function K4(){var c=this.__wrapped__;if(c instanceof Ir){var m=c;return this.__actions__.length&&(m=new Ir(this)),m=m.reverse(),m.__actions__.push({func:zl,args:[Gh],thisArg:e}),new _n(m,this.__chain__)}return this.thru(Gh)}function j4(){return o0(this.__wrapped__,this.__actions__)}var eP=Bl(function(c,m,D){at.call(c,D)?++c[D]:Pi(c,D,1)});function rP(c,m,D){var I=Fr(c)?hs:xh;return D&&wn(c,m,D)&&(m=e),I(c,xr(m,3))}function tP(c,m){var D=Fr(c)?ji:Cl;return D(c,xr(m,3))}var nP=g0(L0),iP=g0(q0);function aP(c,m){return Ht(Wl(c,m),1)}function oP(c,m){return Ht(Wl(c,m),V)}function sP(c,m,D){return D=D===e?1:Br(D),Ht(Wl(c,m),D)}function H0(c,m){var D=Fr(c)?Tt:ia;return D(c,xr(m,3))}function G0(c,m){var D=Fr(c)?Dm:El;return D(c,xr(m,3))}var uP=Bl(function(c,m,D){at.call(c,D)?c[D].push(m):Pi(c,D,[m])});function fP(c,m,D,I){c=On(c)?c:qs(c),D=D&&!I?Br(D):0;var W=c.length;return D<0&&(D=Ft(W+D,0)),$l(c)?D<=W&&c.indexOf(m,D)>-1:!!W&&Ja(c,m,D)>-1}var lP=Rr(function(c,m,D){var I=-1,W=typeof m=="function",J=On(c)?Ne(c.length):[];return ia(c,function(ae){J[++I]=W?an(m,ae,D):oi(ae,m,D)}),J}),cP=Bl(function(c,m,D){Pi(c,D,m)});function Wl(c,m){var D=Fr(c)?ct:Te;return D(c,xr(m,3))}function pP(c,m,D,I){return c==null?[]:(Fr(m)||(m=m==null?[]:[m]),D=I?e:D,Fr(D)||(D=D==null?[]:[D]),Ri(c,m,D))}var mP=Bl(function(c,m,D){c[D?0:1].push(m)},function(){return[[],[]]});function hP(c,m,D){var I=Fr(c)?Uu:rl,W=arguments.length<3;return I(c,xr(m,4),D,W,ia)}function dP(c,m,D){var I=Fr(c)?Sm:rl,W=arguments.length<3;return I(c,xr(m,4),D,W,El)}function vP(c,m){var D=Fr(c)?ji:Cl;return D(c,Hl(xr(m,3)))}function gP(c){var m=Fr(c)?Sl:fI;return m(c)}function xP(c,m,D){(D?wn(c,m,D):m===e)?m=1:m=Br(m);var I=Fr(c)?hh:lI;return I(c,m)}function yP(c){var m=Fr(c)?dh:pI;return m(c)}function bP(c){if(c==null)return 0;if(On(c))return $l(c)?ea(c):c.length;var m=pn(c);return m==Ae||m==ne?c.size:z(c).length}function wP(c,m,D){var I=Fr(c)?zu:mI;return D&&wn(c,m,D)&&(m=e),I(c,xr(m,3))}var DP=Rr(function(c,m){if(c==null)return[];var D=m.length;return D>1&&wn(c,m[0],m[1])?m=[]:D>2&&wn(m[0],m[1],m[2])&&(m=[m[0]]),Ri(c,Ht(m,1),[])}),Vl=Hm||function(){return Wt.Date.now()};function SP(c,m){if(typeof m!="function")throw new Mn(i);return c=Br(c),function(){if(--c<1)return m.apply(this,arguments)}}function $0(c,m,D){return m=D?e:m,m=c&&m==null?c.length:m,Ea(c,E,e,e,e,e,m)}function Z0(c,m){var D;if(typeof m!="function")throw new Mn(i);return c=Br(c),function(){return--c>0&&(D=m.apply(this,arguments)),c<=1&&(m=e),D}}var Zh=Rr(function(c,m,D){var I=x;if(D.length){var W=Yn(D,Rs(Zh));I|=b}return Ea(c,I,m,D,W)}),Q0=Rr(function(c,m,D){var I=x|v;if(D.length){var W=Yn(D,Rs(Q0));I|=b}return Ea(m,I,c,D,W)});function X0(c,m,D){m=D?e:m;var I=Ea(c,w,e,e,e,e,e,m);return I.placeholder=X0.placeholder,I}function J0(c,m,D){m=D?e:m;var I=Ea(c,C,e,e,e,e,e,m);return I.placeholder=J0.placeholder,I}function K0(c,m,D){var I,W,J,ae,fe,de,Re=0,qe=!1,Ve=!1,Ke=!0;if(typeof c!="function")throw new Mn(i);m=li(m)||0,Ct(D)&&(qe=!!D.leading,Ve="maxWait"in D,J=Ve?Ft(li(D.maxWait)||0,m):J,Ke="trailing"in D?!!D.trailing:Ke);function cr(Rt){var qi=I,Fa=W;return I=W=e,Re=Rt,ae=c.apply(Fa,qi),ae}function wr(Rt){return Re=Rt,fe=uf(qr,m),qe?cr(Rt):ae}function Pr(Rt){var qi=Rt-de,Fa=Rt-Re,gx=m-qi;return Ve?Et(gx,J-Fa):gx}function Dr(Rt){var qi=Rt-de,Fa=Rt-Re;return de===e||qi>=m||qi<0||Ve&&Fa>=J}function qr(){var Rt=Vl();if(Dr(Rt))return Hr(Rt);fe=uf(qr,Pr(Rt))}function Hr(Rt){return fe=e,Ke&&I?cr(Rt):(I=W=e,ae)}function Zn(){fe!==e&&u0(fe),Re=0,I=de=W=fe=e}function Dn(){return fe===e?ae:Hr(Vl())}function Qn(){var Rt=Vl(),qi=Dr(Rt);if(I=arguments,W=this,de=Rt,qi){if(fe===e)return wr(de);if(Ve)return u0(fe),fe=uf(qr,m),cr(de)}return fe===e&&(fe=uf(qr,m)),ae}return Qn.cancel=Zn,Qn.flush=Dn,Qn}var NP=Rr(function(c,m){return Al(c,1,m)}),AP=Rr(function(c,m,D){return Al(c,li(m)||0,D)});function EP(c){return Ea(c,O)}function Yl(c,m){if(typeof c!="function"||m!=null&&typeof m!="function")throw new Mn(i);var D=function(){var I=arguments,W=m?m.apply(this,I):I[0],J=D.cache;if(J.has(W))return J.get(W);var ae=c.apply(this,I);return D.cache=J.set(W,ae)||J,ae};return D.cache=new(Yl.Cache||Ii),D}Yl.Cache=Ii;function Hl(c){if(typeof c!="function")throw new Mn(i);return function(){var m=arguments;switch(m.length){case 0:return!c.call(this);case 1:return!c.call(this,m[0]);case 2:return!c.call(this,m[0],m[1]);case 3:return!c.call(this,m[0],m[1],m[2])}return!c.apply(this,m)}}function CP(c){return Z0(2,c)}var MP=hI(function(c,m){m=m.length==1&&Fr(m[0])?ct(m[0],cn(xr())):ct(Ht(m,1),cn(xr()));var D=m.length;return Rr(function(I){for(var W=-1,J=Et(I.length,D);++W=m}),$o=Tl(function(){return arguments}())?Tl:function(c){return Ot(c)&&at.call(c,"callee")&&!cl.call(c,"callee")},Fr=Ne.isArray,VP=Zf?cn(Zf):Sh;function On(c){return c!=null&&Gl(c.length)&&!_a(c)}function kt(c){return Ot(c)&&On(c)}function YP(c){return c===!0||c===!1||Ot(c)&&on(c)==pe}var uo=ml||od,HP=Lu?cn(Lu):Nh;function GP(c){return Ot(c)&&c.nodeType===1&&!ff(c)}function $P(c){if(c==null)return!0;if(On(c)&&(Fr(c)||typeof c=="string"||typeof c.splice=="function"||uo(c)||Ls(c)||$o(c)))return!c.length;var m=pn(c);if(m==Ae||m==ne)return!c.size;if(sf(c))return!z(c).length;for(var D in c)if(at.call(c,D))return!1;return!0}function ZP(c,m){return Vo(c,m)}function QP(c,m,D){D=typeof D=="function"?D:e;var I=D?D(c,m):e;return I===e?Vo(c,m,e,D):!!I}function Xh(c){if(!Ot(c))return!1;var m=on(c);return m==xe||m==Se||typeof c.message=="string"&&typeof c.name=="string"&&!ff(c)}function XP(c){return typeof c=="number"&&Ro(c)}function _a(c){if(!Ct(c))return!1;var m=on(c);return m==be||m==De||m==Me||m==ye}function ex(c){return typeof c=="number"&&c==Br(c)}function Gl(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=q}function Ct(c){var m=typeof c;return c!=null&&(m=="object"||m=="function")}function Ot(c){return c!=null&&typeof c=="object"}var rx=Qf?cn(Qf):nf;function JP(c,m){return c===m||aa(c,m,Uh(m))}function KP(c,m,D){return D=typeof D=="function"?D:e,aa(c,m,Uh(m),D)}function jP(c){return tx(c)&&c!=+c}function e5(c){if(RI(c))throw new Nr(n);return Yo(c)}function r5(c){return c===null}function t5(c){return c==null}function tx(c){return typeof c=="number"||Ot(c)&&on(c)==ze}function ff(c){if(!Ot(c)||on(c)!=K)return!1;var m=Ds(c);if(m===null)return!0;var D=at.call(m,"constructor")&&m.constructor;return typeof D=="function"&&D instanceof D&&Io.call(D)==zm}var Jh=Xf?cn(Xf):Wr;function n5(c){return ex(c)&&c>=-q&&c<=q}var nx=To?cn(To):g;function $l(c){return typeof c=="string"||!Fr(c)&&Ot(c)&&on(c)==ue}function $n(c){return typeof c=="symbol"||Ot(c)&&on(c)==Ee}var Ls=Ti?cn(Ti):N;function i5(c){return c===e}function a5(c){return Ot(c)&&pn(c)==Le}function o5(c){return Ot(c)&&on(c)==Ie}var s5=Rl(se),u5=Rl(function(c,m){return c<=m});function ix(c){if(!c)return[];if(On(c))return $l(c)?xn(c):Fn(c);if(Po&&c[Po])return Om(c[Po]());var m=pn(c),D=m==Ae?$u:m==ne?ja:qs;return D(c)}function Ta(c){if(!c)return c===0?c:0;if(c=li(c),c===V||c===-V){var m=c<0?-1:1;return m*R}return c===c?c:0}function Br(c){var m=Ta(c),D=m%1;return m===m?D?m-D:m:0}function ax(c){return c?Na(Br(c),0,U):0}function li(c){if(typeof c=="number")return c;if($n(c))return j;if(Ct(c)){var m=typeof c.valueOf=="function"?c.valueOf():c;c=Ct(m)?m+"":m}if(typeof c!="string")return c===0?c:+c;c=tl(c);var D=At.test(c);return D||Wn.test(c)?Gf(c.slice(2),D?2:8):Cn.test(c)?j:+c}function ox(c){return oa(c,Bn(c))}function f5(c){return c?Na(Br(c),-q,q):c===0?c:0}function st(c){return c==null?"":Gn(c)}var l5=Ps(function(c,m){if(sf(m)||On(m)){oa(m,rn(m),c);return}for(var D in m)at.call(m,D)&&Wo(c,D,m[D])}),sx=Ps(function(c,m){oa(m,Bn(m),c)}),Zl=Ps(function(c,m,D,I){oa(m,Bn(m),c,I)}),c5=Ps(function(c,m,D,I){oa(m,rn(m),c,I)}),p5=Ca(Bs);function m5(c,m){var D=io(c);return m==null?D:Ju(D,m)}var h5=Rr(function(c,m){c=kr(c);var D=-1,I=m.length,W=I>2?m[2]:e;for(W&&wn(m[0],m[1],W)&&(I=1);++D1),J}),oa(c,Lh(c),D),I&&(D=yn(D,o|u|p,AI));for(var W=m.length;W--;)Th(D,m[W]);return D});function O5(c,m){return fx(c,Hl(xr(m)))}var B5=Ca(function(c,m){return c==null?{}:oI(c,m)});function fx(c,m){if(c==null)return{};var D=ct(Lh(c),function(I){return[I]});return m=xr(m),e0(c,D,function(I,W){return m(I,W[0])})}function I5(c,m,D){m=oo(m,c);var I=-1,W=m.length;for(W||(W=1,c=e);++Im){var I=c;c=m,m=I}if(D||c%1||m%1){var W=vl();return Et(c+W*(m-c+Hf("1e-"+((W+"").length-1))),m)}return Ch(c,m)}var H5=ks(function(c,m,D){return m=m.toLowerCase(),c+(D?px(m):m)});function px(c){return ed(st(c).toLowerCase())}function mx(c){return c=st(c),c&&c.replace(Eu,il).replace(pm,"")}function G5(c,m,D){c=st(c),m=Gn(m);var I=c.length;D=D===e?I:Na(Br(D),0,I);var W=D;return D-=m.length,D>=0&&c.slice(D,W)==m}function $5(c){return c=st(c),c&&fr.test(c)?c.replace(Be,Mm):c}function Z5(c){return c=st(c),c&&Ya.test(c)?c.replace(Ci,"\\\\$&"):c}var Q5=ks(function(c,m,D){return c+(D?"-":"")+m.toLowerCase()}),X5=ks(function(c,m,D){return c+(D?" ":"")+m.toLowerCase()}),J5=v0("toLowerCase");function K5(c,m,D){c=st(c),m=Br(m);var I=m?ea(c):0;if(!m||I>=m)return c;var W=(m-I)/2;return kl(ko(W),D)+c+kl(Ns(W),D)}function j5(c,m,D){c=st(c),m=Br(m);var I=m?ea(c):0;return m&&I>>0,D?(c=st(c),c&&(typeof m=="string"||m!=null&&!Jh(m))&&(m=Gn(m),!m&&ni(c))?so(xn(c),0,D):c.split(m,D)):[]}var o6=ks(function(c,m,D){return c+(D?" ":"")+ed(m)});function s6(c,m,D){return c=st(c),D=D==null?0:Na(Br(D),0,c.length),m=Gn(m),c.slice(D,D+m.length)==m}function u6(c,m,D){var I=Z.templateSettings;D&&wn(c,m,D)&&(m=e),c=st(c),m=Zl({},m,I,S0);var W=Zl({},m.imports,I.imports,S0),J=rn(W),ae=Gu(W,J),fe,de,Re=0,qe=m.interpolate||Ha,Ve="__p += '",Ke=Fi((m.escape||Ha).source+"|"+qe.source+"|"+(qe===Yt?zt:Ha).source+"|"+(m.evaluate||Ha).source+"|$","g"),cr="//# sourceURL="+(at.call(m,"sourceURL")?(m.sourceURL+"").replace(/\\s/g," "):"lodash.templateSources["+ ++gm+"]")+\` -\`;c.replace(Ke,function(Dr,qr,Hr,Zn,Dn,Qn){return Hr||(Hr=Zn),Ve+=c.slice(Re,Qn).replace(Cu,_m),qr&&(fe=!0,Ve+=\`' + +\`)}function PI(c){return Fr(c)||$o(c)||!!(ml&&c&&c[ml])}function Ma(c,m){var D=typeof c;return m=m??q,!!m&&(D=="number"||D!="symbol"&&Mi.test(c))&&c>-1&&c%1==0&&c0){if(++m>=_)return arguments[0]}else m=0;return c.apply(e,arguments)}}function zl(c,m){var D=-1,I=c.length,W=I-1;for(m=m===e?I:m;++D1?c[m-1]:e;return D=typeof D=="function"?(c.pop(),D):e,Y0(c,D)});function H0(c){var m=Z(c);return m.__chain__=!0,m}function G4(c,m){return m(c),c}function Wl(c,m){return m(c)}var $4=Ca(function(c){var m=c.length,D=m?c[0]:0,I=this.__wrapped__,W=function(J){return Bs(J,c)};return m>1||this.__actions__.length||!(I instanceof Ir)||!Ma(D)?this.thru(W):(I=I.slice(D,+D+(m?1:0)),I.__actions__.push({func:Wl,args:[W],thisArg:e}),new _n(I,this.__chain__).thru(function(J){return m&&!J.length&&J.push(e),J}))});function Z4(){return H0(this)}function Q4(){return new _n(this.value(),this.__chain__)}function X4(){this.__values__===e&&(this.__values__=ax(this.value()));var c=this.__index__>=this.__values__.length,m=c?e:this.__values__[this.__index__++];return{done:c,value:m}}function J4(){return this}function K4(c){for(var m,D=this;D instanceof _s;){var I=L0(D);I.__index__=0,I.__values__=e,m?W.__wrapped__=I:m=I;var W=I;D=D.__wrapped__}return W.__wrapped__=c,m}function j4(){var c=this.__wrapped__;if(c instanceof Ir){var m=c;return this.__actions__.length&&(m=new Ir(this)),m=m.reverse(),m.__actions__.push({func:Wl,args:[Zh],thisArg:e}),new _n(m,this.__chain__)}return this.thru(Zh)}function eP(){return s0(this.__wrapped__,this.__actions__)}var rP=Il(function(c,m,D){at.call(c,D)?++c[D]:Pi(c,D,1)});function tP(c,m,D){var I=Fr(c)?hs:bh;return D&&wn(c,m,D)&&(m=e),I(c,xr(m,3))}function nP(c,m){var D=Fr(c)?ji:Ml;return D(c,xr(m,3))}var iP=x0(q0),aP=x0(U0);function oP(c,m){return Ht(Vl(c,m),1)}function sP(c,m){return Ht(Vl(c,m),V)}function uP(c,m,D){return D=D===e?1:Br(D),Ht(Vl(c,m),D)}function G0(c,m){var D=Fr(c)?Tt:ia;return D(c,xr(m,3))}function $0(c,m){var D=Fr(c)?Nm:Cl;return D(c,xr(m,3))}var fP=Il(function(c,m,D){at.call(c,D)?c[D].push(m):Pi(c,D,[m])});function lP(c,m,D,I){c=On(c)?c:qs(c),D=D&&!I?Br(D):0;var W=c.length;return D<0&&(D=Ft(W+D,0)),Zl(c)?D<=W&&c.indexOf(m,D)>-1:!!W&&Ja(c,m,D)>-1}var cP=Rr(function(c,m,D){var I=-1,W=typeof m=="function",J=On(c)?Ne(c.length):[];return ia(c,function(ae){J[++I]=W?an(m,ae,D):si(ae,m,D)}),J}),pP=Il(function(c,m,D){Pi(c,D,m)});function Vl(c,m){var D=Fr(c)?ct:Te;return D(c,xr(m,3))}function mP(c,m,D,I){return c==null?[]:(Fr(m)||(m=m==null?[]:[m]),D=I?e:D,Fr(D)||(D=D==null?[]:[D]),Ri(c,m,D))}var hP=Il(function(c,m,D){c[D?0:1].push(m)},function(){return[[],[]]});function dP(c,m,D){var I=Fr(c)?zu:tl,W=arguments.length<3;return I(c,xr(m,4),D,W,ia)}function vP(c,m,D){var I=Fr(c)?Am:tl,W=arguments.length<3;return I(c,xr(m,4),D,W,Cl)}function gP(c,m){var D=Fr(c)?ji:Ml;return D(c,Gl(xr(m,3)))}function xP(c){var m=Fr(c)?Nl:lI;return m(c)}function yP(c,m,D){(D?wn(c,m,D):m===e)?m=1:m=Br(m);var I=Fr(c)?vh:cI;return I(c,m)}function bP(c){var m=Fr(c)?gh:mI;return m(c)}function wP(c){if(c==null)return 0;if(On(c))return Zl(c)?ea(c):c.length;var m=pn(c);return m==Ae||m==ne?c.size:z(c).length}function DP(c,m,D){var I=Fr(c)?Wu:hI;return D&&wn(c,m,D)&&(m=e),I(c,xr(m,3))}var SP=Rr(function(c,m){if(c==null)return[];var D=m.length;return D>1&&wn(c,m[0],m[1])?m=[]:D>2&&wn(m[0],m[1],m[2])&&(m=[m[0]]),Ri(c,Ht(m,1),[])}),Yl=$m||function(){return Wt.Date.now()};function NP(c,m){if(typeof m!="function")throw new Mn(i);return c=Br(c),function(){if(--c<1)return m.apply(this,arguments)}}function Z0(c,m,D){return m=D?e:m,m=c&&m==null?c.length:m,Ea(c,E,e,e,e,e,m)}function Q0(c,m){var D;if(typeof m!="function")throw new Mn(i);return c=Br(c),function(){return--c>0&&(D=m.apply(this,arguments)),c<=1&&(m=e),D}}var Xh=Rr(function(c,m,D){var I=x;if(D.length){var W=Yn(D,Rs(Xh));I|=b}return Ea(c,I,m,D,W)}),X0=Rr(function(c,m,D){var I=x|v;if(D.length){var W=Yn(D,Rs(X0));I|=b}return Ea(m,I,c,D,W)});function J0(c,m,D){m=D?e:m;var I=Ea(c,w,e,e,e,e,e,m);return I.placeholder=J0.placeholder,I}function K0(c,m,D){m=D?e:m;var I=Ea(c,C,e,e,e,e,e,m);return I.placeholder=K0.placeholder,I}function j0(c,m,D){var I,W,J,ae,fe,de,Re=0,qe=!1,Ve=!1,Ke=!0;if(typeof c!="function")throw new Mn(i);m=ci(m)||0,Ct(D)&&(qe=!!D.leading,Ve="maxWait"in D,J=Ve?Ft(ci(D.maxWait)||0,m):J,Ke="trailing"in D?!!D.trailing:Ke);function cr(Rt){var qi=I,Fa=W;return I=W=e,Re=Rt,ae=c.apply(Fa,qi),ae}function wr(Rt){return Re=Rt,fe=ff(qr,m),qe?cr(Rt):ae}function Pr(Rt){var qi=Rt-de,Fa=Rt-Re,xx=m-qi;return Ve?Et(xx,J-Fa):xx}function Dr(Rt){var qi=Rt-de,Fa=Rt-Re;return de===e||qi>=m||qi<0||Ve&&Fa>=J}function qr(){var Rt=Yl();if(Dr(Rt))return Hr(Rt);fe=ff(qr,Pr(Rt))}function Hr(Rt){return fe=e,Ke&&I?cr(Rt):(I=W=e,ae)}function Zn(){fe!==e&&f0(fe),Re=0,I=de=W=fe=e}function Dn(){return fe===e?ae:Hr(Yl())}function Qn(){var Rt=Yl(),qi=Dr(Rt);if(I=arguments,W=this,de=Rt,qi){if(fe===e)return wr(de);if(Ve)return f0(fe),fe=ff(qr,m),cr(de)}return fe===e&&(fe=ff(qr,m)),ae}return Qn.cancel=Zn,Qn.flush=Dn,Qn}var AP=Rr(function(c,m){return El(c,1,m)}),EP=Rr(function(c,m,D){return El(c,ci(m)||0,D)});function CP(c){return Ea(c,O)}function Hl(c,m){if(typeof c!="function"||m!=null&&typeof m!="function")throw new Mn(i);var D=function(){var I=arguments,W=m?m.apply(this,I):I[0],J=D.cache;if(J.has(W))return J.get(W);var ae=c.apply(this,I);return D.cache=J.set(W,ae)||J,ae};return D.cache=new(Hl.Cache||Ii),D}Hl.Cache=Ii;function Gl(c){if(typeof c!="function")throw new Mn(i);return function(){var m=arguments;switch(m.length){case 0:return!c.call(this);case 1:return!c.call(this,m[0]);case 2:return!c.call(this,m[0],m[1]);case 3:return!c.call(this,m[0],m[1],m[2])}return!c.apply(this,m)}}function MP(c){return Q0(2,c)}var _P=dI(function(c,m){m=m.length==1&&Fr(m[0])?ct(m[0],cn(xr())):ct(Ht(m,1),cn(xr()));var D=m.length;return Rr(function(I){for(var W=-1,J=Et(I.length,D);++W=m}),$o=Fl(function(){return arguments}())?Fl:function(c){return Ot(c)&&at.call(c,"callee")&&!pl.call(c,"callee")},Fr=Ne.isArray,YP=Qf?cn(Qf):Ah;function On(c){return c!=null&&$l(c.length)&&!_a(c)}function kt(c){return Ot(c)&&On(c)}function HP(c){return c===!0||c===!1||Ot(c)&&on(c)==pe}var uo=hl||ud,GP=qu?cn(qu):Eh;function $P(c){return Ot(c)&&c.nodeType===1&&!lf(c)}function ZP(c){if(c==null)return!0;if(On(c)&&(Fr(c)||typeof c=="string"||typeof c.splice=="function"||uo(c)||Ls(c)||$o(c)))return!c.length;var m=pn(c);if(m==Ae||m==ne)return!c.size;if(uf(c))return!z(c).length;for(var D in c)if(at.call(c,D))return!1;return!0}function QP(c,m){return Vo(c,m)}function XP(c,m,D){D=typeof D=="function"?D:e;var I=D?D(c,m):e;return I===e?Vo(c,m,e,D):!!I}function Kh(c){if(!Ot(c))return!1;var m=on(c);return m==xe||m==Se||typeof c.message=="string"&&typeof c.name=="string"&&!lf(c)}function JP(c){return typeof c=="number"&&Ro(c)}function _a(c){if(!Ct(c))return!1;var m=on(c);return m==be||m==De||m==Me||m==ye}function rx(c){return typeof c=="number"&&c==Br(c)}function $l(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=q}function Ct(c){var m=typeof c;return c!=null&&(m=="object"||m=="function")}function Ot(c){return c!=null&&typeof c=="object"}var tx=Xf?cn(Xf):af;function KP(c,m){return c===m||aa(c,m,Wh(m))}function jP(c,m,D){return D=typeof D=="function"?D:e,aa(c,m,Wh(m),D)}function e5(c){return nx(c)&&c!=+c}function r5(c){if(LI(c))throw new Nr(n);return Yo(c)}function t5(c){return c===null}function n5(c){return c==null}function nx(c){return typeof c=="number"||Ot(c)&&on(c)==ze}function lf(c){if(!Ot(c)||on(c)!=K)return!1;var m=Ds(c);if(m===null)return!0;var D=at.call(m,"constructor")&&m.constructor;return typeof D=="function"&&D instanceof D&&Io.call(D)==Vm}var jh=Jf?cn(Jf):Wr;function i5(c){return rx(c)&&c>=-q&&c<=q}var ix=To?cn(To):g;function Zl(c){return typeof c=="string"||!Fr(c)&&Ot(c)&&on(c)==ue}function $n(c){return typeof c=="symbol"||Ot(c)&&on(c)==Ee}var Ls=Ti?cn(Ti):N;function a5(c){return c===e}function o5(c){return Ot(c)&&pn(c)==Le}function s5(c){return Ot(c)&&on(c)==Ie}var u5=Ll(se),f5=Ll(function(c,m){return c<=m});function ax(c){if(!c)return[];if(On(c))return Zl(c)?xn(c):Fn(c);if(Po&&c[Po])return Im(c[Po]());var m=pn(c),D=m==Ae?Zu:m==ne?ja:qs;return D(c)}function Ta(c){if(!c)return c===0?c:0;if(c=ci(c),c===V||c===-V){var m=c<0?-1:1;return m*R}return c===c?c:0}function Br(c){var m=Ta(c),D=m%1;return m===m?D?m-D:m:0}function ox(c){return c?Na(Br(c),0,U):0}function ci(c){if(typeof c=="number")return c;if($n(c))return j;if(Ct(c)){var m=typeof c.valueOf=="function"?c.valueOf():c;c=Ct(m)?m+"":m}if(typeof c!="string")return c===0?c:+c;c=nl(c);var D=At.test(c);return D||Wn.test(c)?$f(c.slice(2),D?2:8):Cn.test(c)?j:+c}function sx(c){return oa(c,Bn(c))}function l5(c){return c?Na(Br(c),-q,q):c===0?c:0}function st(c){return c==null?"":Gn(c)}var c5=Ps(function(c,m){if(uf(m)||On(m)){oa(m,rn(m),c);return}for(var D in m)at.call(m,D)&&Wo(c,D,m[D])}),ux=Ps(function(c,m){oa(m,Bn(m),c)}),Ql=Ps(function(c,m,D,I){oa(m,Bn(m),c,I)}),p5=Ps(function(c,m,D,I){oa(m,rn(m),c,I)}),m5=Ca(Bs);function h5(c,m){var D=io(c);return m==null?D:Ku(D,m)}var d5=Rr(function(c,m){c=kr(c);var D=-1,I=m.length,W=I>2?m[2]:e;for(W&&wn(m[0],m[1],W)&&(I=1);++D1),J}),oa(c,Uh(c),D),I&&(D=yn(D,o|u|p,EI));for(var W=m.length;W--;)Oh(D,m[W]);return D});function B5(c,m){return lx(c,Gl(xr(m)))}var I5=Ca(function(c,m){return c==null?{}:sI(c,m)});function lx(c,m){if(c==null)return{};var D=ct(Uh(c),function(I){return[I]});return m=xr(m),r0(c,D,function(I,W){return m(I,W[0])})}function P5(c,m,D){m=oo(m,c);var I=-1,W=m.length;for(W||(W=1,c=e);++Im){var I=c;c=m,m=I}if(D||c%1||m%1){var W=gl();return Et(c+W*(m-c+Gf("1e-"+((W+"").length-1))),m)}return _h(c,m)}var G5=ks(function(c,m,D){return m=m.toLowerCase(),c+(D?mx(m):m)});function mx(c){return td(st(c).toLowerCase())}function hx(c){return c=st(c),c&&c.replace(Cu,al).replace(hm,"")}function $5(c,m,D){c=st(c),m=Gn(m);var I=c.length;D=D===e?I:Na(Br(D),0,I);var W=D;return D-=m.length,D>=0&&c.slice(D,W)==m}function Z5(c){return c=st(c),c&&fr.test(c)?c.replace(Be,Tm):c}function Q5(c){return c=st(c),c&&Ya.test(c)?c.replace(Ci,"\\\\$&"):c}var X5=ks(function(c,m,D){return c+(D?"-":"")+m.toLowerCase()}),J5=ks(function(c,m,D){return c+(D?" ":"")+m.toLowerCase()}),K5=g0("toLowerCase");function j5(c,m,D){c=st(c),m=Br(m);var I=m?ea(c):0;if(!m||I>=m)return c;var W=(m-I)/2;return Rl(ko(W),D)+c+Rl(Ns(W),D)}function e6(c,m,D){c=st(c),m=Br(m);var I=m?ea(c):0;return m&&I>>0,D?(c=st(c),c&&(typeof m=="string"||m!=null&&!jh(m))&&(m=Gn(m),!m&&ii(c))?so(xn(c),0,D):c.split(m,D)):[]}var s6=ks(function(c,m,D){return c+(D?" ":"")+td(m)});function u6(c,m,D){return c=st(c),D=D==null?0:Na(Br(D),0,c.length),m=Gn(m),c.slice(D,D+m.length)==m}function f6(c,m,D){var I=Z.templateSettings;D&&wn(c,m,D)&&(m=e),c=st(c),m=Ql({},m,I,N0);var W=Ql({},m.imports,I.imports,N0),J=rn(W),ae=$u(W,J),fe,de,Re=0,qe=m.interpolate||Ha,Ve="__p += '",Ke=Fi((m.escape||Ha).source+"|"+qe.source+"|"+(qe===Yt?zt:Ha).source+"|"+(m.evaluate||Ha).source+"|$","g"),cr="//# sourceURL="+(at.call(m,"sourceURL")?(m.sourceURL+"").replace(/\\s/g," "):"lodash.templateSources["+ ++ym+"]")+\` +\`;c.replace(Ke,function(Dr,qr,Hr,Zn,Dn,Qn){return Hr||(Hr=Zn),Ve+=c.slice(Re,Qn).replace(Mu,Fm),qr&&(fe=!0,Ve+=\`' + __e(\`+qr+\`) + '\`),Dn&&(de=!0,Ve+=\`'; \`+Dn+\`; @@ -88465,18 +88474,18 @@ __p += '\`),Hr&&(Ve+=\`' + function print() { __p += __j.call(arguments, '') } \`:\`; \`)+Ve+\`return __p -}\`;var Pr=dx(function(){return jr(J,cr+"return "+Ve).apply(e,ae)});if(Pr.source=Ve,Xh(Pr))throw Pr;return Pr}function f6(c){return st(c).toLowerCase()}function l6(c){return st(c).toUpperCase()}function c6(c,m,D){if(c=st(c),c&&(D||m===e))return tl(c);if(!c||!(m=Gn(m)))return c;var I=xn(c),W=xn(m),J=ht(I,W),ae=nl(I,W)+1;return so(I,J,ae).join("")}function p6(c,m,D){if(c=st(c),c&&(D||m===e))return c.slice(0,gs(c)+1);if(!c||!(m=Gn(m)))return c;var I=xn(c),W=nl(I,xn(m))+1;return so(I,0,W).join("")}function m6(c,m,D){if(c=st(c),c&&(D||m===e))return c.replace(rr,"");if(!c||!(m=Gn(m)))return c;var I=xn(c),W=ht(I,xn(m));return so(I,W).join("")}function h6(c,m){var D=F,I=M;if(Ct(m)){var W="separator"in m?m.separator:W;D="length"in m?Br(m.length):D,I="omission"in m?Gn(m.omission):I}c=st(c);var J=c.length;if(ni(c)){var ae=xn(c);J=ae.length}if(D>=J)return c;var fe=D-ea(I);if(fe<1)return I;var de=ae?so(ae,0,fe).join(""):c.slice(0,fe);if(W===e)return de+I;if(ae&&(fe+=de.length-fe),Jh(W)){if(c.slice(fe).search(W)){var Re,qe=de;for(W.global||(W=Fi(W.source,st(En.exec(W))+"g")),W.lastIndex=0;Re=W.exec(qe);)var Ve=Re.index;de=de.slice(0,Ve===e?fe:Ve)}}else if(c.indexOf(Gn(W),fe)!=fe){var Ke=de.lastIndexOf(W);Ke>-1&&(de=de.slice(0,Ke))}return de+I}function d6(c){return c=st(c),c&&er.test(c)?c.replace(ve,Pm):c}var v6=ks(function(c,m,D){return c+(D?" ":"")+m.toUpperCase()}),ed=v0("toUpperCase");function hx(c,m,D){return c=st(c),m=D?e:m,m===e?Fm(c)?Lm(c):Am(c):c.match(m)||[]}var dx=Rr(function(c,m){try{return an(c,e,m)}catch(D){return Xh(D)?D:new Nr(D)}}),g6=Ca(function(c,m){return Tt(m,function(D){D=sa(D),Pi(c,D,Zh(c[D],c))}),c});function x6(c){var m=c==null?0:c.length,D=xr();return c=m?ct(c,function(I){if(typeof I[1]!="function")throw new Mn(i);return[D(I[0]),I[1]]}):[],Rr(function(I){for(var W=-1;++Wq)return[];var D=U,I=Et(c,U);m=xr(m),c-=U;for(var W=Hu(I,m);++D0||m<0)?new Ir(D):(c<0?D=D.takeRight(-c):c&&(D=D.drop(c)),m!==e&&(m=Br(m),D=m<0?D.dropRight(-m):D.take(m-c)),D)},Ir.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ir.prototype.toArray=function(){return this.take(U)},ii(Ir.prototype,function(c,m){var D=/^(?:filter|find|map|reject)|While$/.test(m),I=/^(?:head|last)$/.test(m),W=Z[I?"take"+(m=="last"?"Right":""):m],J=I||/^find/.test(m);!W||(Z.prototype[m]=function(){var ae=this.__wrapped__,fe=I?[1]:arguments,de=ae instanceof Ir,Re=fe[0],qe=de||Fr(ae),Ve=function(qr){var Hr=W.apply(Z,ti([qr],fe));return I&&Ke?Hr[0]:Hr};qe&&D&&typeof Re=="function"&&Re.length!=1&&(de=qe=!1);var Ke=this.__chain__,cr=!!this.__actions__.length,wr=J&&!Ke,Pr=de&&!cr;if(!J&&qe){ae=Pr?ae:new Ir(this);var Dr=c.apply(ae,fe);return Dr.__actions__.push({func:zl,args:[Ve],thisArg:e}),new _n(Dr,Ke)}return wr&&Pr?c.apply(this,fe):(Dr=this.thru(Ve),wr?I?Dr.value()[0]:Dr.value():Dr)})}),Tt(["pop","push","shift","sort","splice","unshift"],function(c){var m=Bo[c],D=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",I=/^(?:pop|shift)$/.test(c);Z.prototype[c]=function(){var W=arguments;if(I&&!this.__chain__){var J=this.value();return m.apply(Fr(J)?J:[],W)}return this[D](function(ae){return m.apply(Fr(ae)?ae:[],W)})}}),ii(Ir.prototype,function(c,m){var D=Z[m];if(D){var I=D.name+"";at.call(no,I)||(no[I]=[]),no[I].push({name:m,func:D})}}),no[Il(e,v).name]=[{name:"wrapper",func:e}],Ir.prototype.clone=jm,Ir.prototype.reverse=eh,Ir.prototype.value=rh,Z.prototype.at=G4,Z.prototype.chain=$4,Z.prototype.commit=Z4,Z.prototype.next=Q4,Z.prototype.plant=J4,Z.prototype.reverse=K4,Z.prototype.toJSON=Z.prototype.valueOf=Z.prototype.value=j4,Z.prototype.first=Z.prototype.head,Po&&(Z.prototype[Po]=X4),Z},ra=qm();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Wt._=ra,define(function(){return ra})):Ki?((Ki.exports=ra)._=ra,Ru._=ra):Wt._=ra}).call(Us)});var Vx=un((Fd,Ws)=>{(function(e,r){typeof Fd=="object"&&typeof Ws<"u"?Ws.exports=r():typeof define=="function"&&define.amd?define(r):e.moment=r()})(Fd,function(){"use strict";var e;function r(){return e.apply(null,arguments)}function t(g){e=g}function n(g){return g instanceof Array||Object.prototype.toString.call(g)==="[object Array]"}function i(g){return g!=null&&Object.prototype.toString.call(g)==="[object Object]"}function a(g,N){return Object.prototype.hasOwnProperty.call(g,N)}function s(g){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(g).length===0;var N;for(N in g)if(a(g,N))return!1;return!0}function l(g){return g===void 0}function f(g){return typeof g=="number"||Object.prototype.toString.call(g)==="[object Number]"}function o(g){return g instanceof Date||Object.prototype.toString.call(g)==="[object Date]"}function u(g,N){var P=[],z,G=g.length;for(z=0;z>>0,z;for(z=0;z0)for(P=0;P=J)return c;var fe=D-ea(I);if(fe<1)return I;var de=ae?so(ae,0,fe).join(""):c.slice(0,fe);if(W===e)return de+I;if(ae&&(fe+=de.length-fe),jh(W)){if(c.slice(fe).search(W)){var Re,qe=de;for(W.global||(W=Fi(W.source,st(En.exec(W))+"g")),W.lastIndex=0;Re=W.exec(qe);)var Ve=Re.index;de=de.slice(0,Ve===e?fe:Ve)}}else if(c.indexOf(Gn(W),fe)!=fe){var Ke=de.lastIndexOf(W);Ke>-1&&(de=de.slice(0,Ke))}return de+I}function v6(c){return c=st(c),c&&er.test(c)?c.replace(ve,Rm):c}var g6=ks(function(c,m,D){return c+(D?" ":"")+m.toUpperCase()}),td=g0("toUpperCase");function dx(c,m,D){return c=st(c),m=D?e:m,m===e?Bm(c)?Um(c):Cm(c):c.match(m)||[]}var vx=Rr(function(c,m){try{return an(c,e,m)}catch(D){return Kh(D)?D:new Nr(D)}}),x6=Ca(function(c,m){return Tt(m,function(D){D=sa(D),Pi(c,D,Xh(c[D],c))}),c});function y6(c){var m=c==null?0:c.length,D=xr();return c=m?ct(c,function(I){if(typeof I[1]!="function")throw new Mn(i);return[D(I[0]),I[1]]}):[],Rr(function(I){for(var W=-1;++Wq)return[];var D=U,I=Et(c,U);m=xr(m),c-=U;for(var W=Gu(I,m);++D0||m<0)?new Ir(D):(c<0?D=D.takeRight(-c):c&&(D=D.drop(c)),m!==e&&(m=Br(m),D=m<0?D.dropRight(-m):D.take(m-c)),D)},Ir.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ir.prototype.toArray=function(){return this.take(U)},ai(Ir.prototype,function(c,m){var D=/^(?:filter|find|map|reject)|While$/.test(m),I=/^(?:head|last)$/.test(m),W=Z[I?"take"+(m=="last"?"Right":""):m],J=I||/^find/.test(m);!W||(Z.prototype[m]=function(){var ae=this.__wrapped__,fe=I?[1]:arguments,de=ae instanceof Ir,Re=fe[0],qe=de||Fr(ae),Ve=function(qr){var Hr=W.apply(Z,ni([qr],fe));return I&&Ke?Hr[0]:Hr};qe&&D&&typeof Re=="function"&&Re.length!=1&&(de=qe=!1);var Ke=this.__chain__,cr=!!this.__actions__.length,wr=J&&!Ke,Pr=de&&!cr;if(!J&&qe){ae=Pr?ae:new Ir(this);var Dr=c.apply(ae,fe);return Dr.__actions__.push({func:Wl,args:[Ve],thisArg:e}),new _n(Dr,Ke)}return wr&&Pr?c.apply(this,fe):(Dr=this.thru(Ve),wr?I?Dr.value()[0]:Dr.value():Dr)})}),Tt(["pop","push","shift","sort","splice","unshift"],function(c){var m=Bo[c],D=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",I=/^(?:pop|shift)$/.test(c);Z.prototype[c]=function(){var W=arguments;if(I&&!this.__chain__){var J=this.value();return m.apply(Fr(J)?J:[],W)}return this[D](function(ae){return m.apply(Fr(ae)?ae:[],W)})}}),ai(Ir.prototype,function(c,m){var D=Z[m];if(D){var I=D.name+"";at.call(no,I)||(no[I]=[]),no[I].push({name:m,func:D})}}),no[Pl(e,v).name]=[{name:"wrapper",func:e}],Ir.prototype.clone=rh,Ir.prototype.reverse=th,Ir.prototype.value=nh,Z.prototype.at=$4,Z.prototype.chain=Z4,Z.prototype.commit=Q4,Z.prototype.next=X4,Z.prototype.plant=K4,Z.prototype.reverse=j4,Z.prototype.toJSON=Z.prototype.valueOf=Z.prototype.value=eP,Z.prototype.first=Z.prototype.head,Po&&(Z.prototype[Po]=J4),Z},ra=zm();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Wt._=ra,define(function(){return ra})):Ki?((Ki.exports=ra)._=ra,Lu._=ra):Wt._=ra}).call(Us)});var Yx=un((Od,Ws)=>{(function(e,r){typeof Od=="object"&&typeof Ws<"u"?Ws.exports=r():typeof define=="function"&&define.amd?define(r):e.moment=r()})(Od,function(){"use strict";var e;function r(){return e.apply(null,arguments)}function t(g){e=g}function n(g){return g instanceof Array||Object.prototype.toString.call(g)==="[object Array]"}function i(g){return g!=null&&Object.prototype.toString.call(g)==="[object Object]"}function a(g,N){return Object.prototype.hasOwnProperty.call(g,N)}function s(g){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(g).length===0;var N;for(N in g)if(a(g,N))return!1;return!0}function l(g){return g===void 0}function f(g){return typeof g=="number"||Object.prototype.toString.call(g)==="[object Number]"}function o(g){return g instanceof Date||Object.prototype.toString.call(g)==="[object Date]"}function u(g,N){var P=[],z,G=g.length;for(z=0;z>>0,z;for(z=0;z0)for(P=0;P=0;return(se?P?"+":"":"-")+Math.pow(10,Math.max(0,G)).toString().substr(1)+z}var U=/(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,oe=/(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,me={},ie={};function H(g,N,P,z){var G=z;typeof z=="string"&&(G=function(){return this[z]()}),g&&(ie[g]=G),N&&(ie[N[0]]=function(){return j(G.apply(this,arguments),N[1],N[2])}),P&&(ie[P]=function(){return this.localeData().ordinal(G.apply(this,arguments),g)})}function ce(g){return g.match(/\\[[\\s\\S]/)?g.replace(/^\\[|\\]$/g,""):g.replace(/\\\\/g,"")}function Me(g){var N=g.match(U),P,z;for(P=0,z=N.length;P=0&&oe.test(g);)g=g.replace(oe,z),oe.lastIndex=0,P-=1;return g}var Se={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function xe(g){var N=this._longDateFormat[g],P=this._longDateFormat[g.toUpperCase()];return N||!P?N:(this._longDateFormat[g]=P.match(U).map(function(z){return z==="MMMM"||z==="MM"||z==="DD"||z==="dddd"?z.slice(1):z}).join(""),this._longDateFormat[g])}var be="Invalid date";function De(){return this._invalidDate}var Ae="%d",ze=/\\d{1,2}/;function Ze(g){return this._ordinal.replace("%d",g)}var K={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function te(g,N,P,z){var G=this._relativeTime[P];return k(G)?G(g,N,P,z):G.replace(/%d/i,g)}function ye(g,N){var P=this._relativeTime[g>0?"future":"past"];return k(P)?P(N):P.replace(/%s/i,N)}var ee={};function ne(g,N){var P=g.toLowerCase();ee[P]=ee[P+"s"]=ee[N]=g}function ue(g){return typeof g=="string"?ee[g]||ee[g.toLowerCase()]:void 0}function Ee(g){var N={},P,z;for(z in g)a(g,z)&&(P=ue(z),P&&(N[P]=g[z]));return N}var Ce={};function Le(g,N){Ce[g]=N}function Ie(g){var N=[],P;for(P in g)a(g,P)&&N.push({unit:P,priority:Ce[P]});return N.sort(function(z,G){return z.priority-G.priority}),N}function sr(g){return g%4===0&&g%100!==0||g%400===0}function ir(g){return g<0?Math.ceil(g)||0:Math.floor(g)}function Xe(g){var N=+g,P=0;return N!==0&&isFinite(N)&&(P=ir(N)),P}function Or(g,N){return function(P){return P!=null?(le(this,g,P),r.updateOffset(this,N),this):re(this,g)}}function re(g,N){return g.isValid()?g._d["get"+(g._isUTC?"UTC":"")+N]():NaN}function le(g,N,P){g.isValid()&&!isNaN(P)&&(N==="FullYear"&&sr(g.year())&&g.month()===1&&g.date()===29?(P=Xe(P),g._d["set"+(g._isUTC?"UTC":"")+N](P,g.month(),Ga(P,g.month()))):g._d["set"+(g._isUTC?"UTC":"")+N](P))}function we(g){return g=ue(g),k(this[g])?this[g]():this}function Oe(g,N){if(typeof g=="object"){g=Ee(g);var P=Ie(g),z,G=P.length;for(z=0;z68?1900:2e3)};var Ou=Or("FullYear",!0);function am(){return sr(this.year())}function kf(g,N,P,z,G,se,Te){var mr;return g<100&&g>=0?(mr=new Date(g+400,N,P,z,G,se,Te),isFinite(mr.getFullYear())&&mr.setFullYear(g)):mr=new Date(g,N,P,z,G,se,Te),mr}function $a(g){var N,P;return g<100&&g>=0?(P=Array.prototype.slice.call(arguments),P[0]=g+400,N=new Date(Date.UTC.apply(null,P)),isFinite(N.getUTCFullYear())&&N.setUTCFullYear(g)):N=new Date(Date.UTC.apply(null,arguments)),N}function Za(g,N,P){var z=7+N-P,G=(7+$a(g,0,z).getUTCDay()-N)%7;return-G+z-1}function Rf(g,N,P,z,G){var se=(7+P-z)%7,Te=Za(g,z,G),mr=1+7*(N-1)+se+Te,Tr,et;return mr<=0?(Tr=g-1,et=Ji(Tr)+mr):mr>Ji(g)?(Tr=g+1,et=mr-Ji(g)):(Tr=g,et=mr),{year:Tr,dayOfYear:et}}function Qa(g,N,P){var z=Za(g.year(),N,P),G=Math.floor((g.dayOfYear()-z-1)/7)+1,se,Te;return G<1?(Te=g.year()-1,se=G+Vn(Te,N,P)):G>Vn(g.year(),N,P)?(se=G-Vn(g.year(),N,P),Te=g.year()+1):(Te=g.year(),se=G),{week:se,year:Te}}function Vn(g,N,P){var z=Za(g,N,P),G=Za(g+1,N,P);return(Ji(g)-z+G)/7}H("w",["ww",2],"wo","week"),H("W",["WW",2],"Wo","isoWeek"),ne("week","w"),ne("isoWeek","W"),Le("week",5),Le("isoWeek",5),rr("w",Q),rr("ww",Q,_e),rr("W",Q),rr("WW",Q,_e),ga(["w","ww","W","WW"],function(g,N,P,z){N[z.substr(0,1)]=Xe(g)});function Bu(g){return Qa(g,this._week.dow,this._week.doy).week}var Xa={dow:0,doy:6};function Lf(){return this._week.dow}function qf(){return this._week.doy}function om(g){var N=this.localeData().week(this);return g==null?N:this.add((g-N)*7,"d")}function Uf(g){var N=Qa(this,1,4).week;return g==null?N:this.add((g-N)*7,"d")}H("d",0,"do","day"),H("dd",0,0,function(g){return this.localeData().weekdaysMin(this,g)}),H("ddd",0,0,function(g){return this.localeData().weekdaysShort(this,g)}),H("dddd",0,0,function(g){return this.localeData().weekdays(this,g)}),H("e",0,0,"weekday"),H("E",0,0,"isoWeekday"),ne("day","d"),ne("weekday","e"),ne("isoWeekday","E"),Le("day",11),Le("weekday",11),Le("isoWeekday",11),rr("d",Q),rr("e",Q),rr("E",Q),rr("dd",function(g,N){return N.weekdaysMinRegex(g)}),rr("ddd",function(g,N){return N.weekdaysShortRegex(g)}),rr("dddd",function(g,N){return N.weekdaysRegex(g)}),ga(["dd","ddd","dddd"],function(g,N,P,z){var G=P._locale.weekdaysParse(g,z,P._strict);G!=null?N.d=G:x(P).invalidWeekday=g}),ga(["d","e","E"],function(g,N,P,z){N[z]=Xe(g)});function zf(g,N){return typeof g!="string"?g:isNaN(g)?(g=N.weekdaysParse(g),typeof g=="number"?g:null):parseInt(g,10)}function Wf(g,N){return typeof g=="string"?N.weekdaysParse(g)%7||7:isNaN(g)?null:g}function ms(g,N){return g.slice(N,7).concat(g.slice(0,N))}var sm="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Vf="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),um="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Yf=Ci,fm=Ci,lm=Ci;function cm(g,N){var P=n(this._weekdays)?this._weekdays:this._weekdays[g&&g!==!0&&this._weekdays.isFormat.test(N)?"format":"standalone"];return g===!0?ms(P,this._week.dow):g?P[g.day()]:P}function pm(g){return g===!0?ms(this._weekdaysShort,this._week.dow):g?this._weekdaysShort[g.day()]:this._weekdaysShort}function Iu(g){return g===!0?ms(this._weekdaysMin,this._week.dow):g?this._weekdaysMin[g.day()]:this._weekdaysMin}function mm(g,N,P){var z,G,se,Te=g.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],z=0;z<7;++z)se=h([2e3,1]).day(z),this._minWeekdaysParse[z]=this.weekdaysMin(se,"").toLocaleLowerCase(),this._shortWeekdaysParse[z]=this.weekdaysShort(se,"").toLocaleLowerCase(),this._weekdaysParse[z]=this.weekdays(se,"").toLocaleLowerCase();return P?N==="dddd"?(G=pt.call(this._weekdaysParse,Te),G!==-1?G:null):N==="ddd"?(G=pt.call(this._shortWeekdaysParse,Te),G!==-1?G:null):(G=pt.call(this._minWeekdaysParse,Te),G!==-1?G:null):N==="dddd"?(G=pt.call(this._weekdaysParse,Te),G!==-1||(G=pt.call(this._shortWeekdaysParse,Te),G!==-1)?G:(G=pt.call(this._minWeekdaysParse,Te),G!==-1?G:null)):N==="ddd"?(G=pt.call(this._shortWeekdaysParse,Te),G!==-1||(G=pt.call(this._weekdaysParse,Te),G!==-1)?G:(G=pt.call(this._minWeekdaysParse,Te),G!==-1?G:null)):(G=pt.call(this._minWeekdaysParse,Te),G!==-1||(G=pt.call(this._weekdaysParse,Te),G!==-1)?G:(G=pt.call(this._shortWeekdaysParse,Te),G!==-1?G:null))}function hm(g,N,P){var z,G,se;if(this._weekdaysParseExact)return mm.call(this,g,N,P);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),z=0;z<7;z++){if(G=h([2e3,1]).day(z),P&&!this._fullWeekdaysParse[z]&&(this._fullWeekdaysParse[z]=new RegExp("^"+this.weekdays(G,"").replace(".","\\\\.?")+"$","i"),this._shortWeekdaysParse[z]=new RegExp("^"+this.weekdaysShort(G,"").replace(".","\\\\.?")+"$","i"),this._minWeekdaysParse[z]=new RegExp("^"+this.weekdaysMin(G,"").replace(".","\\\\.?")+"$","i")),this._weekdaysParse[z]||(se="^"+this.weekdays(G,"")+"|^"+this.weekdaysShort(G,"")+"|^"+this.weekdaysMin(G,""),this._weekdaysParse[z]=new RegExp(se.replace(".",""),"i")),P&&N==="dddd"&&this._fullWeekdaysParse[z].test(g))return z;if(P&&N==="ddd"&&this._shortWeekdaysParse[z].test(g))return z;if(P&&N==="dd"&&this._minWeekdaysParse[z].test(g))return z;if(!P&&this._weekdaysParse[z].test(g))return z}}function dm(g){if(!this.isValid())return g!=null?this:NaN;var N=this._isUTC?this._d.getUTCDay():this._d.getDay();return g!=null?(g=zf(g,this.localeData()),this.add(g-N,"d")):N}function vm(g){if(!this.isValid())return g!=null?this:NaN;var N=(this.day()+7-this.localeData()._week.dow)%7;return g==null?N:this.add(g-N,"d")}function gm(g){if(!this.isValid())return g!=null?this:NaN;if(g!=null){var N=Wf(g,this.localeData());return this.day(this.day()%7?N:N-7)}else return this.day()||7}function dt(g){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Pu.call(this),g?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Yf),this._weekdaysStrictRegex&&g?this._weekdaysStrictRegex:this._weekdaysRegex)}function mt(g){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Pu.call(this),g?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=fm),this._weekdaysShortStrictRegex&&g?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function xm(g){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Pu.call(this),g?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=lm),this._weekdaysMinStrictRegex&&g?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Pu(){function g(sn,si){return si.length-sn.length}var N=[],P=[],z=[],G=[],se,Te,mr,Tr,et;for(se=0;se<7;se++)Te=h([2e3,1]).day(se),mr=nn(this.weekdaysMin(Te,"")),Tr=nn(this.weekdaysShort(Te,"")),et=nn(this.weekdays(Te,"")),N.push(mr),P.push(Tr),z.push(et),G.push(mr),G.push(Tr),G.push(et);N.sort(g),P.sort(g),z.sort(g),G.sort(g),this._weekdaysRegex=new RegExp("^("+G.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+z.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+P.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+N.join("|")+")","i")}function ku(){return this.hours()%12||12}function ym(){return this.hours()||24}H("H",["HH",2],0,"hour"),H("h",["hh",2],0,ku),H("k",["kk",2],0,ym),H("hmm",0,0,function(){return""+ku.apply(this)+j(this.minutes(),2)}),H("hmmss",0,0,function(){return""+ku.apply(this)+j(this.minutes(),2)+j(this.seconds(),2)}),H("Hmm",0,0,function(){return""+this.hours()+j(this.minutes(),2)}),H("Hmmss",0,0,function(){return""+this.hours()+j(this.minutes(),2)+j(this.seconds(),2)});function Hf(g,N){H(g,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),N)})}Hf("a",!0),Hf("A",!1),ne("hour","h"),Le("hour",13);function Gf(g,N){return N._meridiemParse}rr("a",Gf),rr("A",Gf),rr("H",Q),rr("h",Q),rr("k",Q),rr("HH",Q,_e),rr("hh",Q,_e),rr("kk",Q,_e),rr("hmm",ve),rr("hmmss",Be),rr("Hmm",ve),rr("Hmmss",Be),nt(["H","HH"],At),nt(["k","kk"],function(g,N,P){var z=Xe(g);N[At]=z===24?0:z}),nt(["a","A"],function(g,N,P){P._isPm=P._locale.isPM(g),P._meridiem=g}),nt(["h","hh"],function(g,N,P){N[At]=Xe(g),x(P).bigHour=!0}),nt("hmm",function(g,N,P){var z=g.length-2;N[At]=Xe(g.substr(0,z)),N[gn]=Xe(g.substr(z)),x(P).bigHour=!0}),nt("hmmss",function(g,N,P){var z=g.length-4,G=g.length-2;N[At]=Xe(g.substr(0,z)),N[gn]=Xe(g.substr(z,2)),N[Wn]=Xe(g.substr(G)),x(P).bigHour=!0}),nt("Hmm",function(g,N,P){var z=g.length-2;N[At]=Xe(g.substr(0,z)),N[gn]=Xe(g.substr(z))}),nt("Hmmss",function(g,N,P){var z=g.length-4,G=g.length-2;N[At]=Xe(g.substr(0,z)),N[gn]=Xe(g.substr(z,2)),N[Wn]=Xe(g.substr(G))});function $f(g){return(g+"").toLowerCase().charAt(0)==="p"}var bm=/[ap]\\.?m?\\.?/i,Wt=Or("Hours",!0);function Ru(g,N,P){return g>11?P?"pm":"PM":P?"am":"AM"}var Ki={calendar:q,longDateFormat:Se,invalidDate:be,ordinal:Ae,dayOfMonthOrdinalParse:ze,relativeTime:K,months:Mu,monthsShort:fs,week:Xa,weekdays:sm,weekdaysMin:um,weekdaysShort:Vf,meridiemParse:bm},vt={},ya={},en;function Zf(g,N){var P,z=Math.min(g.length,N.length);for(P=0;P0;){if(G=To(se.slice(0,P).join("-")),G)return G;if(z&&z.length>=P&&Zf(se,z)>=P-1)break;P--}N++}return en}function Xf(g){return g.match("^[^/\\\\\\\\]*$")!=null}function To(g){var N=null,P;if(vt[g]===void 0&&typeof Ws<"u"&&Ws&&Ws.exports&&Xf(g))try{N=en._abbr,P=require,P("./locale/"+g),Ti(N)}catch{vt[g]=null}return vt[g]}function Ti(g,N){var P;return g&&(l(N)?P=Tt(g):P=an(g,N),P?en=P:typeof console<"u"&&console.warn&&console.warn("Locale "+g+" not found. Did you forget to load it?")),en._abbr}function an(g,N){if(N!==null){var P,z=Ki;if(N.abbr=g,vt[g]!=null)_("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),z=vt[g]._config;else if(N.parentLocale!=null)if(vt[N.parentLocale]!=null)z=vt[N.parentLocale]._config;else if(P=To(N.parentLocale),P!=null)z=P._config;else return ya[N.parentLocale]||(ya[N.parentLocale]=[]),ya[N.parentLocale].push({name:g,config:N}),null;return vt[g]=new $(Y(z,N)),ya[g]&&ya[g].forEach(function(G){an(G.name,G.config)}),Ti(g),vt[g]}else return delete vt[g],null}function wm(g,N){if(N!=null){var P,z,G=Ki;vt[g]!=null&&vt[g].parentLocale!=null?vt[g].set(Y(vt[g]._config,N)):(z=To(g),z!=null&&(G=z._config),N=Y(G,N),z==null&&(N.abbr=g),P=new $(N),P.parentLocale=vt[g],vt[g]=P),Ti(g)}else vt[g]!=null&&(vt[g].parentLocale!=null?(vt[g]=vt[g].parentLocale,g===Ti()&&Ti(g)):vt[g]!=null&&delete vt[g]);return vt[g]}function Tt(g){var N;if(g&&g._locale&&g._locale._abbr&&(g=g._locale._abbr),!g)return en;if(!n(g)){if(N=To(g),N)return N;g=[g]}return Qf(g)}function Dm(){return V(vt)}function hs(g){var N,P=g._a;return P&&x(g).overflow===-2&&(N=P[En]<0||P[En]>11?En:P[Cn]<1||P[Cn]>Ga(P[zt],P[En])?Cn:P[At]<0||P[At]>24||P[At]===24&&(P[gn]!==0||P[Wn]!==0||P[Mi]!==0)?At:P[gn]<0||P[gn]>59?gn:P[Wn]<0||P[Wn]>59?Wn:P[Mi]<0||P[Mi]>999?Mi:-1,x(g)._overflowDayOfYear&&(NCn)&&(N=Cn),x(g)._overflowWeeks&&N===-1&&(N=Eu),x(g)._overflowWeekday&&N===-1&&(N=Ha),x(g).overflow=N),g}var ji=/^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,ds=/^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,qu=/Z|[+-]\\d\\d(?::?\\d\\d)?/,ct=[["YYYYYY-MM-DD",/[+-]\\d{6}-\\d\\d-\\d\\d/],["YYYY-MM-DD",/\\d{4}-\\d\\d-\\d\\d/],["GGGG-[W]WW-E",/\\d{4}-W\\d\\d-\\d/],["GGGG-[W]WW",/\\d{4}-W\\d\\d/,!1],["YYYY-DDD",/\\d{4}-\\d{3}/],["YYYY-MM",/\\d{4}-\\d\\d/,!1],["YYYYYYMMDD",/[+-]\\d{10}/],["YYYYMMDD",/\\d{8}/],["GGGG[W]WWE",/\\d{4}W\\d{3}/],["GGGG[W]WW",/\\d{4}W\\d{2}/,!1],["YYYYDDD",/\\d{7}/],["YYYYMM",/\\d{6}/,!1],["YYYY",/\\d{4}/,!1]],ti=[["HH:mm:ss.SSSS",/\\d\\d:\\d\\d:\\d\\d\\.\\d+/],["HH:mm:ss,SSSS",/\\d\\d:\\d\\d:\\d\\d,\\d+/],["HH:mm:ss",/\\d\\d:\\d\\d:\\d\\d/],["HH:mm",/\\d\\d:\\d\\d/],["HHmmss.SSSS",/\\d\\d\\d\\d\\d\\d\\.\\d+/],["HHmmss,SSSS",/\\d\\d\\d\\d\\d\\d,\\d+/],["HHmmss",/\\d\\d\\d\\d\\d\\d/],["HHmm",/\\d\\d\\d\\d/],["HH",/\\d\\d/]],Uu=/^\\/?Date\\((-?\\d+)/i,Sm=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,zu={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Jf(g){var N,P,z=g._i,G=ji.exec(z)||ds.exec(z),se,Te,mr,Tr,et=ct.length,sn=ti.length;if(G){for(x(g).iso=!0,N=0,P=et;NJi(Te)||g._dayOfYear===0)&&(x(g)._overflowDayOfYear=!0),P=$a(Te,0,g._dayOfYear),g._a[En]=P.getUTCMonth(),g._a[Cn]=P.getUTCDate()),N=0;N<3&&g._a[N]==null;++N)g._a[N]=z[N]=G[N];for(;N<7;N++)g._a[N]=z[N]=g._a[N]==null?N===2?1:0:g._a[N];g._a[At]===24&&g._a[gn]===0&&g._a[Wn]===0&&g._a[Mi]===0&&(g._nextDay=!0,g._a[At]=0),g._d=(g._useUTC?$a:kf).apply(null,z),se=g._useUTC?g._d.getUTCDay():g._d.getDay(),g._tzm!=null&&g._d.setUTCMinutes(g._d.getUTCMinutes()-g._tzm),g._nextDay&&(g._a[At]=24),g._w&&typeof g._w.d<"u"&&g._w.d!==se&&(x(g).weekdayMismatch=!0)}}function rl(g){var N,P,z,G,se,Te,mr,Tr,et;N=g._w,N.GG!=null||N.W!=null||N.E!=null?(se=1,Te=4,P=ba(N.GG,g._a[zt],Qa(ht(),1,4).year),z=ba(N.W,1),G=ba(N.E,1),(G<1||G>7)&&(Tr=!0)):(se=g._locale._week.dow,Te=g._locale._week.doy,et=Qa(ht(),se,Te),P=ba(N.gg,g._a[zt],et.year),z=ba(N.w,et.week),N.d!=null?(G=N.d,(G<0||G>6)&&(Tr=!0)):N.e!=null?(G=N.e+se,(N.e<0||N.e>6)&&(Tr=!0)):G=se),z<1||z>Vn(P,se,Te)?x(g)._overflowWeeks=!0:Tr!=null?x(g)._overflowWeekday=!0:(mr=Rf(P,z,G,se,Te),g._a[zt]=mr.year,g._dayOfYear=mr.dayOfYear)}r.ISO_8601=function(){},r.RFC_2822=function(){};function Vu(g){if(g._f===r.ISO_8601){Jf(g);return}if(g._f===r.RFC_2822){jf(g);return}g._a=[],x(g).empty=!0;var N=""+g._i,P,z,G,se,Te,mr=N.length,Tr=0,et,sn;for(G=ge(g._f,g._locale).match(U)||[],sn=G.length,P=0;P0&&x(g).unusedInput.push(Te),N=N.slice(N.indexOf(z)+z.length),Tr+=z.length),ie[se]?(z?x(g).empty=!1:x(g).unusedTokens.push(se),Au(se,z,g)):g._strict&&!z&&x(g).unusedTokens.push(se);x(g).charsLeftOver=mr-Tr,N.length>0&&x(g).unusedInput.push(N),g._a[At]<=12&&x(g).bigHour===!0&&g._a[At]>0&&(x(g).bigHour=void 0),x(g).parsedDateParts=g._a.slice(0),x(g).meridiem=g._meridiem,g._a[At]=Yu(g._locale,g._a[At],g._meridiem),et=x(g).era,et!==null&&(g._a[zt]=g._locale.erasConvertYear(et,g._a[zt])),Fo(g),hs(g)}function Yu(g,N,P){var z;return P==null?N:g.meridiemHour!=null?g.meridiemHour(N,P):(g.isPM!=null&&(z=g.isPM(P),z&&N<12&&(N+=12),!z&&N===12&&(N=0)),N)}function Hu(g){var N,P,z,G,se,Te,mr=!1,Tr=g._f.length;if(Tr===0){x(g).invalidFormat=!0,g._d=new Date(NaN);return}for(G=0;Gthis?this:g:w()});function il(g,N){var P,z;if(N.length===1&&n(N[0])&&(N=N[0]),!N.length)return ht();for(P=N[0],z=1;zthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Fe(){if(!l(this._isDSTShifted))return this._isDSTShifted;var g={},N;return A(g,this),g=cn(g),g._a?(N=g._isUTC?h(g._a):ht(g._a),this._isDSTShifted=this.isValid()&&Bm(g._a,N.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Ne(){return this.isValid()?!this._isUTC:!1}function nr(){return this.isValid()?this._isUTC:!1}function Nr(){return this.isValid()?this._isUTC&&this._offset===0:!1}var jr=/^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,Pt=/^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function kr(g,N){var P=g,z=null,G,se,Te;return Yn(g)?P={ms:g._milliseconds,d:g._days,M:g._months}:f(g)||!isNaN(+g)?(P={},N?P[N]=+g:P.milliseconds=+g):(z=jr.exec(g))?(G=z[1]==="-"?-1:1,P={y:0,d:Xe(z[Cn])*G,h:Xe(z[At])*G,m:Xe(z[gn])*G,s:Xe(z[Wn])*G,ms:Xe(ja(z[Mi]*1e3))*G}):(z=Pt.exec(g))?(G=z[1]==="-"?-1:1,P={y:Fi(z[2],G),M:Fi(z[3],G),w:Fi(z[4],G),d:Fi(z[5],G),h:Fi(z[6],G),m:Fi(z[7],G),s:Fi(z[8],G)}):P==null?P={}:typeof P=="object"&&("from"in P||"to"in P)&&(Te=Mn(ht(P.from),ht(P.to)),P={},P.ms=Te.milliseconds,P.M=Te.months),se=new Oo(P),Yn(g)&&a(g,"_locale")&&(se._locale=g._locale),Yn(g)&&a(g,"_isValid")&&(se._isValid=g._isValid),se}kr.fn=Oo.prototype,kr.invalid=$u;function Fi(g,N){var P=g&&parseFloat(g.replace(",","."));return(isNaN(P)?0:P)*N}function ol(g,N){var P={};return P.months=N.month()-g.month()+(N.year()-g.year())*12,g.clone().add(P.months,"M").isAfter(N)&&--P.months,P.milliseconds=+N-+g.clone().add(P.months,"M"),P}function Mn(g,N){var P;return g.isValid()&&N.isValid()?(N=xn(N,g),g.isBefore(N)?P=ol(g,N):(P=ol(N,g),P.milliseconds=-P.milliseconds,P.months=-P.months),P):{milliseconds:0,months:0}}function Bo(g,N){return function(P,z){var G,se;return z!==null&&!isNaN(+z)&&(_(N,"moment()."+N+"(period, number) is deprecated. Please use moment()."+N+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),se=P,P=z,z=se),G=kr(P,z),sl(this,G,g),this}}function sl(g,N,P,z){var G=N._milliseconds,se=ja(N._days),Te=ja(N._months);!g.isValid()||(z=z??!0,Te&&Xi(g,re(g,"Month")+Te*P),se&&le(g,"Date",re(g,"Date")+se*P),G&&g._d.setTime(g._d.valueOf()+G*P),z&&r.updateOffset(g,se||Te))}var eo=Bo(1,"add"),xs=Bo(-1,"subtract");function Io(g){return typeof g=="string"||g instanceof String}function at(g){return S(g)||o(g)||Io(g)||f(g)||ul(g)||Um(g)||g===null||g===void 0}function Um(g){var N=i(g)&&!s(g),P=!1,z=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],G,se,Te=z.length;for(G=0;GP.valueOf():P.valueOf()9999?pe(P,N?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):k(Date.prototype.toISOString)?N?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",pe(P,"Z")):pe(P,N?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Da(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var g="moment",N="",P,z,G,se;return this.isLocal()||(g=this.utcOffset()===0?"moment.utc":"moment.parseZone",N="Z"),P="["+g+'("]',z=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",G="-MM-DD[T]HH:mm:ss.SSS",se=N+'[")]',this.format(P+z+G+se)}function Ss(g){g||(g=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var N=pe(this,g);return this.localeData().postformat(N)}function Ym(g,N){return this.isValid()&&(S(g)&&g.isValid()||ht(g).isValid())?kr({to:this,from:g}).locale(this.locale()).humanize(!N):this.localeData().invalidDate()}function Hm(g){return this.from(ht(),g)}function Gm(g,N){return this.isValid()&&(S(g)&&g.isValid()||ht(g).isValid())?kr({from:this,to:g}).locale(this.locale()).humanize(!N):this.localeData().invalidDate()}function Ns(g){return this.to(ht(),g)}function ko(g){var N;return g===void 0?this._locale._abbr:(N=Tt(g),N!=null&&(this._locale=N),this)}var As=F("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(g){return g===void 0?this.localeData():this.locale(g)});function ml(){return this._locale}var Ro=1e3,ro=60*Ro,Es=60*ro,Ft=(365*400+97)*24*Es;function Et(g,N){return(g%N+N)%N}function hl(g,N,P){return g<100&&g>=0?new Date(g+400,N,P)-Ft:new Date(g,N,P).valueOf()}function dl(g,N,P){return g<100&&g>=0?Date.UTC(g+400,N,P)-Ft:Date.UTC(g,N,P)}function vl(g){var N,P;if(g=ue(g),g===void 0||g==="millisecond"||!this.isValid())return this;switch(P=this._isUTC?dl:hl,g){case"year":N=P(this.year(),0,1);break;case"quarter":N=P(this.year(),this.month()-this.month()%3,1);break;case"month":N=P(this.year(),this.month(),1);break;case"week":N=P(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":N=P(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":N=P(this.year(),this.month(),this.date());break;case"hour":N=this._d.valueOf(),N-=Et(N+(this._isUTC?0:this.utcOffset()*ro),Es);break;case"minute":N=this._d.valueOf(),N-=Et(N,ro);break;case"second":N=this._d.valueOf(),N-=Et(N,Ro);break}return this._d.setTime(N),r.updateOffset(this,!0),this}function $m(g){var N,P;if(g=ue(g),g===void 0||g==="millisecond"||!this.isValid())return this;switch(P=this._isUTC?dl:hl,g){case"year":N=P(this.year()+1,0,1)-1;break;case"quarter":N=P(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":N=P(this.year(),this.month()+1,1)-1;break;case"week":N=P(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":N=P(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":N=P(this.year(),this.month(),this.date()+1)-1;break;case"hour":N=this._d.valueOf(),N+=Es-Et(N+(this._isUTC?0:this.utcOffset()*ro),Es)-1;break;case"minute":N=this._d.valueOf(),N+=ro-Et(N,ro)-1;break;case"second":N=this._d.valueOf(),N+=Ro-Et(N,Ro)-1;break}return this._d.setTime(N),r.updateOffset(this,!0),this}function Zu(){return this._d.valueOf()-(this._offset||0)*6e4}function Lo(){return Math.floor(this.valueOf()/1e3)}function Qu(){return new Date(this.valueOf())}function to(){var g=this;return[g.year(),g.month(),g.date(),g.hour(),g.minute(),g.second(),g.millisecond()]}function qo(){var g=this;return{years:g.year(),months:g.month(),date:g.date(),hours:g.hours(),minutes:g.minutes(),seconds:g.seconds(),milliseconds:g.milliseconds()}}function Uo(){return this.isValid()?this.toISOString():null}function Cs(){return y(this)}function no(){return p({},x(this))}function Zm(){return x(this).overflow}function Qm(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}H("N",0,0,"eraAbbr"),H("NN",0,0,"eraAbbr"),H("NNN",0,0,"eraAbbr"),H("NNNN",0,0,"eraName"),H("NNNNN",0,0,"eraNarrow"),H("y",["y",1],"yo","eraYear"),H("y",["yy",2],0,"eraYear"),H("y",["yyy",3],0,"eraYear"),H("y",["yyyy",4],0,"eraYear"),rr("N",Ir),rr("NN",Ir),rr("NNN",Ir),rr("NNNN",jm),rr("NNNNN",eh),nt(["N","NN","NNN","NNNN","NNNNN"],function(g,N,P,z){var G=P._locale.erasParse(g,z,P._strict);G?x(P).era=G:x(P).invalidEra=g}),rr("y",_t),rr("yy",_t),rr("yyy",_t),rr("yyyy",_t),rr("yo",rh),nt(["y","yy","yyy","yyyy"],zt),nt(["yo"],function(g,N,P,z){var G;P._locale._eraYearOrdinalRegex&&(G=g.match(P._locale._eraYearOrdinalRegex)),P._locale.eraYearOrdinalParse?N[zt]=P._locale.eraYearOrdinalParse(g,G):N[zt]=parseInt(g,10)});function Xm(g,N){var P,z,G,se=this._eras||Tt("en")._eras;for(P=0,z=se.length;P=0)return se[z]}function Km(g,N){var P=g.since<=g.until?1:-1;return N===void 0?r(g.since).year():r(g.since).year()+(N-g.offset)*P}function Ms(){var g,N,P,z=this.localeData().eras();for(g=0,N=z.length;gse&&(N=se),sh.call(this,g,N,P,z,G))}function sh(g,N,P,z,G){var se=Rf(g,N,P,z,G),Te=$a(se.year,0,se.dayOfYear);return this.year(Te.getUTCFullYear()),this.month(Te.getUTCMonth()),this.date(Te.getUTCDate()),this}H("Q",0,"Qo","quarter"),ne("quarter","Q"),Le("quarter",7),rr("Q",ke),nt("Q",function(g,N){N[En]=(Xe(g)-1)*3});function uh(g){return g==null?Math.ceil((this.month()+1)/3):this.month((g-1)*3+this.month()%3)}H("D",["DD",2],"Do","date"),ne("date","D"),Le("date",9),rr("D",Q),rr("DD",Q,_e),rr("Do",function(g,N){return g?N._dayOfMonthOrdinalParse||N._ordinalParse:N._dayOfMonthOrdinalParseLenient}),nt(["D","DD"],Cn),nt("Do",function(g,N){N[Cn]=Xe(g.match(Q)[0])});var yl=Or("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear"),ne("dayOfYear","DDD"),Le("dayOfYear",4),rr("DDD",er),rr("DDDD",Pe),nt(["DDD","DDDD"],function(g,N,P){P._dayOfYear=Xe(g)});function Ii(g){var N=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return g==null?N:this.add(g-N,"d")}H("m",["mm",2],0,"minute"),ne("minute","m"),Le("minute",14),rr("m",Q),rr("mm",Q,_e),nt(["m","mm"],gn);var fh=Or("Minutes",!1);H("s",["ss",2],0,"second"),ne("second","s"),Le("second",15),rr("s",Q),rr("ss",Q,_e),nt(["s","ss"],Wn);var lh=Or("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)}),H(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),H(0,["SSS",3],0,"millisecond"),H(0,["SSSS",4],0,function(){return this.millisecond()*10}),H(0,["SSSSS",5],0,function(){return this.millisecond()*100}),H(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),H(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),H(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),H(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),ne("millisecond","ms"),Le("millisecond",16),rr("S",er,ke),rr("SS",er,_e),rr("SSS",er,Pe);var na,bl;for(na="SSSS";na.length<=9;na+="S")rr(na,_t);function ch(g,N){N[Mi]=Xe(("0."+g)*1e3)}for(na="S";na.length<=9;na+="S")nt(na,ch);bl=Or("Milliseconds",!1),H("z",0,0,"zoneAbbr"),H("zz",0,0,"zoneName");function Sa(){return this._isUTC?"UTC":""}function ph(){return this._isUTC?"Coordinated Universal Time":""}var Ye=E.prototype;Ye.add=eo,Ye.calendar=Wm,Ye.clone=Vm,Ye.diff=cl,Ye.endOf=$m,Ye.format=Ss,Ye.from=Ym,Ye.fromNow=Hm,Ye.to=Gm,Ye.toNow=Ns,Ye.get=we,Ye.invalidAt=Zm,Ye.isAfter=bs,Ye.isBefore=ta,Ye.isBetween=ws,Ye.isSame=fl,Ye.isSameOrAfter=Ds,Ye.isSameOrBefore=ll,Ye.isValid=Cs,Ye.lang=As,Ye.locale=ko,Ye.localeData=ml,Ye.max=Cm,Ye.min=nl,Ye.parsingFlags=no,Ye.set=Oe,Ye.startOf=vl,Ye.subtract=xs,Ye.toArray=to,Ye.toObject=qo,Ye.toDate=Qu,Ye.toISOString=Po,Ye.inspect=Da,typeof Symbol<"u"&&Symbol.for!=null&&(Ye[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Ye.toJSON=Uo,Ye.toString=pl,Ye.unix=Lo,Ye.valueOf=Zu,Ye.creationData=Qm,Ye.eraName=Ms,Ye.eraNarrow=zo,Ye.eraAbbr=gl,Ye.eraYear=Z,Ye.year=Ou,Ye.isLeapYear=am,Ye.weekYear=th,Ye.isoWeekYear=nh,Ye.quarter=Ye.quarters=uh,Ye.month=_i,Ye.daysInMonth=ps,Ye.week=Ye.weeks=om,Ye.isoWeek=Ye.isoWeeks=Uf,Ye.weeksInYear=Bi,Ye.weeksInWeekYear=oh,Ye.isoWeeksInYear=ih,Ye.isoWeeksInISOWeekYear=ah,Ye.date=yl,Ye.day=Ye.days=dm,Ye.weekday=vm,Ye.isoWeekday=gm,Ye.dayOfYear=Ii,Ye.hour=Ye.hours=Wt,Ye.minute=Ye.minutes=fh,Ye.second=Ye.seconds=lh,Ye.millisecond=Ye.milliseconds=bl,Ye.utcOffset=Pm,Ye.utc=Rm,Ye.local=Lm,Ye.parseZone=qm,Ye.hasAlignedHourOffset=ra,Ye.isDST=he,Ye.isLocal=Ne,Ye.isUtcOffset=nr,Ye.isUtc=Nr,Ye.isUTC=Nr,Ye.zoneAbbr=Sa,Ye.zoneName=ph,Ye.dates=F("dates accessor is deprecated. Use date instead.",yl),Ye.months=F("months accessor is deprecated. Use month instead",_i),Ye.years=F("years accessor is deprecated. Use year instead",Ou),Ye.zone=F("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",km),Ye.isDSTShifted=F("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Fe);function Hn(g){return ht(g*1e3)}function mh(){return ht.apply(null,arguments).parseZone()}function wl(g){return g}var Qr=$.prototype;Qr.calendar=R,Qr.longDateFormat=xe,Qr.invalidDate=De,Qr.ordinal=Ze,Qr.preparse=wl,Qr.postformat=wl,Qr.relativeTime=te,Qr.pastFuture=ye,Qr.set=L,Qr.eras=Xm,Qr.erasParse=Jm,Qr.erasConvertYear=Km,Qr.erasAbbrRegex=_s,Qr.erasNameRegex=io,Qr.erasNarrowRegex=_n,Qr.months=xa,Qr.monthsShort=Kr,Qr.monthsParse=_u,Qr.monthsRegex=im,Qr.monthsShortRegex=Tu,Qr.week=Bu,Qr.firstDayOfYear=qf,Qr.firstDayOfWeek=Lf,Qr.weekdays=cm,Qr.weekdaysMin=Iu,Qr.weekdaysShort=pm,Qr.weekdaysParse=hm,Qr.weekdaysRegex=dt,Qr.weekdaysShortRegex=mt,Qr.weekdaysMinRegex=xm,Qr.isPM=$f,Qr.meridiem=Ru;function Fs(g,N,P,z){var G=Tt(),se=h().set(z,N);return G[P](se,g)}function Dl(g,N,P){if(f(g)&&(N=g,g=void 0),g=g||"",N!=null)return Fs(g,N,P,"month");var z,G=[];for(z=0;z<12;z++)G[z]=Fs(g,z,P,"month");return G}function Os(g,N,P,z){typeof g=="boolean"?(f(N)&&(P=N,N=void 0),N=N||""):(N=g,P=N,g=!1,f(N)&&(P=N,N=void 0),N=N||"");var G=Tt(),se=g?G._week.dow:0,Te,mr=[];if(P!=null)return Fs(N,(P+se)%7,z,"day");for(Te=0;Te<7;Te++)mr[Te]=Fs(N,(Te+se)%7,z,"day");return mr}function Sl(g,N){return Dl(g,N,"months")}function hh(g,N){return Dl(g,N,"monthsShort")}function dh(g,N,P){return Os(g,N,P,"weekdays")}function Xu(g,N,P){return Os(g,N,P,"weekdaysShort")}function Wo(g,N,P){return Os(g,N,P,"weekdaysMin")}Ti("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\\d{1,2}(th|st|nd|rd)/,ordinal:function(g){var N=g%10,P=Xe(g%100/10)===1?"th":N===1?"st":N===2?"nd":N===3?"rd":"th";return g+P}}),r.lang=F("moment.lang is deprecated. Use moment.locale instead.",Ti),r.langData=F("moment.langData is deprecated. Use moment.localeData instead.",Tt);var Tn=Math.abs;function vh(){var g=this._data;return this._milliseconds=Tn(this._milliseconds),this._days=Tn(this._days),this._months=Tn(this._months),g.milliseconds=Tn(g.milliseconds),g.seconds=Tn(g.seconds),g.minutes=Tn(g.minutes),g.hours=Tn(g.hours),g.months=Tn(g.months),g.years=Tn(g.years),this}function Ju(g,N,P,z){var G=kr(N,P);return g._milliseconds+=z*G._milliseconds,g._days+=z*G._days,g._months+=z*G._months,g._bubble()}function gh(g,N){return Ju(this,g,N,1)}function Pi(g,N){return Ju(this,g,N,-1)}function Bs(g){return g<0?Math.floor(g):Math.ceil(g)}function Na(){var g=this._milliseconds,N=this._days,P=this._months,z=this._data,G,se,Te,mr,Tr;return g>=0&&N>=0&&P>=0||g<=0&&N<=0&&P<=0||(g+=Bs(Ku(P)+N)*864e5,N=0,P=0),z.milliseconds=g%1e3,G=ir(g/1e3),z.seconds=G%60,se=ir(G/60),z.minutes=se%60,Te=ir(se/60),z.hours=Te%24,N+=ir(Te/24),Tr=ir(yn(N)),P+=Tr,N-=Bs(Ku(Tr)),mr=ir(P/12),P%=12,z.days=N,z.months=P,z.years=mr,this}function yn(g){return g*4800/146097}function Ku(g){return g*146097/4800}function Nl(g){if(!this.isValid())return NaN;var N,P,z=this._milliseconds;if(g=ue(g),g==="month"||g==="quarter"||g==="year")switch(N=this._days+z/864e5,P=this._months+yn(N),g){case"month":return P;case"quarter":return P/3;case"year":return P/12}else switch(N=this._days+Math.round(Ku(this._months)),g){case"week":return N/7+z/6048e5;case"day":return N+z/864e5;case"hour":return N*24+z/36e5;case"minute":return N*1440+z/6e4;case"second":return N*86400+z/1e3;case"millisecond":return Math.floor(N*864e5)+z;default:throw new Error("Unknown unit "+g)}}function Al(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+Xe(this._months/12)*31536e6:NaN}function bn(g){return function(){return this.as(g)}}var ia=bn("ms"),El=bn("s"),xh=bn("m"),Is=bn("h"),yh=bn("d"),Cl=bn("w"),Ht=bn("M"),ju=bn("Q"),Ml=bn("y");function ii(){return kr(this)}function ef(g){return g=ue(g),this.isValid()?this[g+"s"]():NaN}function ai(g){return function(){return this.isValid()?this._data[g]:NaN}}var Aa=ai("milliseconds"),_l=ai("seconds"),on=ai("minutes"),rf=ai("hours"),bh=ai("days"),wh=ai("months"),Dh=ai("years");function tf(){return ir(this.days()/7)}var ki=Math.round,oi={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Tl(g,N,P,z,G){return G.relativeTime(N||1,!!P,g,z)}function Sh(g,N,P,z){var G=kr(g).abs(),se=ki(G.as("s")),Te=ki(G.as("m")),mr=ki(G.as("h")),Tr=ki(G.as("d")),et=ki(G.as("M")),sn=ki(G.as("w")),si=ki(G.as("y")),Ri=se<=P.ss&&["s",se]||se0,Ri[4]=z,Tl.apply(null,Ri)}function Nh(g){return g===void 0?ki:typeof g=="function"?(ki=g,!0):!1}function Vo(g,N){return oi[g]===void 0?!1:N===void 0?oi[g]:(oi[g]=N,g==="s"&&(oi.ss=N-1),!0)}function Ah(g,N){if(!this.isValid())return this.localeData().invalidDate();var P=!1,z=oi,G,se;return typeof g=="object"&&(N=g,g=!1),typeof g=="boolean"&&(P=g),typeof N=="object"&&(z=Object.assign({},oi,N),N.s!=null&&N.ss==null&&(z.ss=N.s-1)),G=this.localeData(),se=Sh(this,!P,z,G),P&&(se=G.pastFuture(+this,se)),G.postformat(se)}var nf=Math.abs;function aa(g){return(g>0)-(g<0)||+g}function Yo(){if(!this.isValid())return this.localeData().invalidDate();var g=nf(this._milliseconds)/1e3,N=nf(this._days),P=nf(this._months),z,G,se,Te,mr=this.asSeconds(),Tr,et,sn,si;return mr?(z=ir(g/60),G=ir(z/60),g%=60,z%=60,se=ir(P/12),P%=12,Te=g?g.toFixed(3).replace(/\\.?0+$/,""):"",Tr=mr<0?"-":"",et=aa(this._months)!==aa(mr)?"-":"",sn=aa(this._days)!==aa(mr)?"-":"",si=aa(this._milliseconds)!==aa(mr)?"-":"",Tr+"P"+(se?et+se+"Y":"")+(P?et+P+"M":"")+(N?sn+N+"D":"")+(G||z||g?"T":"")+(G?si+G+"H":"")+(z?si+z+"M":"")+(g?si+Te+"S":"")):"P0D"}var Wr=Oo.prototype;Wr.isValid=Om,Wr.abs=vh,Wr.add=gh,Wr.subtract=Pi,Wr.as=Nl,Wr.asMilliseconds=ia,Wr.asSeconds=El,Wr.asMinutes=xh,Wr.asHours=Is,Wr.asDays=yh,Wr.asWeeks=Cl,Wr.asMonths=Ht,Wr.asQuarters=ju,Wr.asYears=Ml,Wr.valueOf=Al,Wr._bubble=Na,Wr.clone=ii,Wr.get=ef,Wr.milliseconds=Aa,Wr.seconds=_l,Wr.minutes=on,Wr.hours=rf,Wr.days=bh,Wr.weeks=tf,Wr.months=wh,Wr.years=Dh,Wr.humanize=Ah,Wr.toISOString=Yo,Wr.toString=Yo,Wr.toJSON=Yo,Wr.locale=ko,Wr.localeData=ml,Wr.toIsoString=F("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Yo),Wr.lang=As,H("X",0,0,"unix"),H("x",0,0,"valueOf"),rr("x",Yt),rr("X",Du),nt("X",function(g,N,P){P._d=new Date(parseFloat(g)*1e3)}),nt("x",function(g,N,P){P._d=new Date(Xe(g))});return r.version="2.29.4",t(ht),r.fn=Ye,r.min=Mm,r.max=_m,r.now=Tm,r.utc=h,r.unix=Hn,r.months=Sl,r.isDate=o,r.locale=Ti,r.invalid=w,r.duration=kr,r.isMoment=S,r.weekdays=dh,r.parseZone=mh,r.localeData=Tt,r.isDuration=Yn,r.monthsShort=hh,r.weekdaysMin=Wo,r.defineLocale=an,r.updateLocale=wm,r.locales=Dm,r.weekdaysShort=Xu,r.normalizeUnits=ue,r.relativeTimeRounding=Nh,r.relativeTimeThreshold=Vo,r.calendarFormat=zm,r.prototype=Ye,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r})});var gc=un((Rd,Ld)=>{(function(e,r){typeof Rd=="object"&&typeof Ld<"u"?Ld.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self,e["'typed'"]=r())})(Rd,function(){"use strict";function e(){return!0}function r(){return!1}function t(){}let n="Argument is not a typed-function.";function i(){function s(re){return typeof re=="object"&&re!==null&&re.constructor===Object}let l=[{name:"number",test:function(re){return typeof re=="number"}},{name:"string",test:function(re){return typeof re=="string"}},{name:"boolean",test:function(re){return typeof re=="boolean"}},{name:"Function",test:function(re){return typeof re=="function"}},{name:"Array",test:Array.isArray},{name:"Date",test:function(re){return re instanceof Date}},{name:"RegExp",test:function(re){return re instanceof RegExp}},{name:"Object",test:s},{name:"null",test:function(re){return re===null}},{name:"undefined",test:function(re){return re===void 0}}],f={name:"any",test:e,isAny:!0},o,u,p=0,h={createCount:0};function d(re){let le=o.get(re);if(le)return le;let we='Unknown type "'+re+'"',Oe=re.toLowerCase(),ke;for(ke of u)if(ke.toLowerCase()===Oe){we+='. Did you mean "'+ke+'" ?';break}throw new TypeError(we)}function x(re){let le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"any",we=le?d(le).index:u.length,Oe=[];for(let _e=0;_e{let Oe=o.get(we);return!Oe.isAny&&Oe.test(re)});return le.length?le:["any"]}function C(re){return re&&typeof re=="function"&&"_typedFunctionData"in re}function b(re,le,we){if(!C(re))throw new TypeError(n);let Oe=we&&we.exact,ke=Array.isArray(le)?le.join(","):le,_e=_(ke),Pe=S(_e);if(!Oe||Pe in re.signatures){let ve=re._typedFunctionData.signatureMap.get(Pe);if(ve)return ve}let We=_e.length,B;if(Oe){B=[];let ve;for(ve in re.signatures)B.push(re._typedFunctionData.signatureMap.get(ve))}else B=re._typedFunctionData.signatures;for(let ve=0;ve!_t.has(Yt.name)))continue}er.push(fr)}}if(B=er,B.length===0)break}let Q;for(Q of B)if(Q.params.length<=We)return Q;throw new TypeError("Signature not found (signature: "+(re.name||"unnamed")+"("+S(_e,", ")+"))")}function A(re,le,we){return b(re,le,we).implementation}function E(re,le){let we=d(le);if(we.test(re))return re;let Oe=we.conversionsTo;if(Oe.length===0)throw new Error("There are no conversions to "+le+" defined.");for(let ke=0;ke1&&arguments[1]!==void 0?arguments[1]:",";return re.map(we=>we.name).join(le)}function O(re){let le=re.indexOf("...")===0,Oe=(le?re.length>3?re.slice(3):"any":re).split("|").map(We=>d(We.trim())),ke=!1,_e=le?"...":"";return{types:Oe.map(function(We){return ke=We.isAny||ke,_e+=We.name+"|",{name:We.name,typeIndex:We.index,test:We.test,isAny:We.isAny,conversion:null,conversionIndex:-1}}),name:_e.slice(0,-1),hasAny:ke,hasConversion:!1,restParam:le}}function F(re){let le=re.types.map(Pe=>Pe.name),we=H(le),Oe=re.hasAny,ke=re.name,_e=we.map(function(Pe){let We=d(Pe.from);return Oe=We.isAny||Oe,ke+="|"+Pe.from,{name:Pe.from,typeIndex:We.index,test:We.test,isAny:We.isAny,conversion:Pe,conversionIndex:Pe.index}});return{types:re.types.concat(_e),name:ke,hasAny:Oe,hasConversion:_e.length>0,restParam:re.restParam}}function M(re){return re.typeSet||(re.typeSet=new Set,re.types.forEach(le=>re.typeSet.add(le.name))),re.typeSet}function _(re){let le=[];if(typeof re!="string")throw new TypeError("Signatures must be strings");let we=re.trim();if(we==="")return le;let Oe=we.split(",");for(let ke=0;ke=ke+1}}else return re.length===0?function(_e){return _e.length===0}:re.length===1?(we=L(re[0]),function(_e){return we(_e[0])&&_e.length===1}):re.length===2?(we=L(re[0]),Oe=L(re[1]),function(_e){return we(_e[0])&&Oe(_e[1])&&_e.length===2}):(le=re.map(L),function(_e){for(let Pe=0;Pe{let ke=V(Oe.params,le),_e;for(_e of ke)we.add(_e)}),we.has("any")?["any"]:Array.from(we)}function j(re,le,we){let Oe,ke,_e=re||"unnamed",Pe=we,We;for(We=0;We{let fr=$(er.params,We),Zr=L(fr);(We0){let er=w(le[We]);return Oe=new TypeError("Unexpected type of argument in function "+_e+" (expected: "+ke.join(" or ")+", actual: "+er.join(" | ")+", index: "+We+")"),Oe.data={category:"wrongType",fn:_e,index:We,actual:er,expected:ke},Oe}}else Pe=Be}let B=Pe.map(function(Be){return k(Be.params)?1/0:Be.params.length});if(le.lengthQ)return Oe=new TypeError("Too many arguments in function "+_e+" (expected: "+Q+", actual: "+le.length+")"),Oe.data={category:"tooManyArgs",fn:_e,index:le.length,expectedLength:Q},Oe;let ve=[];for(let Be=0;Be0)return 1;let Oe=oe(re)-oe(le);return Oe<0?-1:Oe>0?1:0}function ie(re,le){let we=re.params,Oe=le.params,ke=K(we),_e=K(Oe),Pe=k(we),We=k(Oe);if(Pe&&ke.hasAny){if(!We||!_e.hasAny)return 1}else if(We&&_e.hasAny)return-1;let B=0,Q=0,ve;for(ve of we)ve.hasAny&&++B,ve.hasConversion&&++Q;let Be=0,er=0;for(ve of Oe)ve.hasAny&&++Be,ve.hasConversion&&++er;if(B!==Be)return B-Be;if(Pe&&ke.hasConversion){if(!We||!_e.hasConversion)return 1}else if(We&&_e.hasConversion)return-1;if(Q!==er)return Q-er;if(Pe){if(!We)return 1}else if(We)return-1;let fr=(we.length-Oe.length)*(Pe?-1:1);if(fr!==0)return fr;let Zr=[],_t=0;for(let Qi=0;Qi1&&le.sort((ke,_e)=>ke.index-_e.index);let we=le[0].conversionsTo;if(re.length===1)return we;we=we.concat([]);let Oe=new Set(re);for(let ke=1;keke.hasConversion)){let ke=k(re),_e=re.map(Me);we=function(){let We=[],B=ke?arguments.length-1:arguments.length;for(let Q=0;QB.name).join("|"),hasAny:We.some(B=>B.isAny),hasConversion:!1,restParam:!0}),Pe.push(_e)}else Pe=_e.types.map(function(We){return{types:[We],name:We.name,hasAny:We.isAny,hasConversion:We.conversion,restParam:!1}});return ee(Pe,function(We){return le(we,Oe+1,ke.concat([We]))})}else return[ke]}return le(re,0,[])}function ge(re,le){let we=Math.max(re.length,le.length);for(let We=0;We=Oe:Pe?Oe>=ke:Oe===ke}function Se(re){return re.map(le=>Le(le)?Ee(le.referToSelf.callback):Ce(le)?ue(le.referTo.references,le.referTo.callback):le)}function xe(re,le,we){let Oe=[],ke;for(ke of re){let _e=we[ke];if(typeof _e!="number")throw new TypeError('No definition for referenced signature "'+ke+'"');if(_e=le[_e],typeof _e!="function")return!1;Oe.push(_e)}return Oe}function be(re,le,we){let Oe=Se(re),ke=new Array(Oe.length).fill(!1),_e=!0;for(;_e;){_e=!1;let Pe=!0;for(let We=0;We{let Oe=re[we];if(le.test(Oe.toString()))throw new SyntaxError("Using \`this\` to self-reference a function is deprecated since typed-function@3. Use typed.referTo and typed.referToSelf instead.")})}function Ae(re,le){if(h.createCount++,Object.keys(le).length===0)throw new SyntaxError("No signatures provided");h.warnAgainstDeprecatedThis&&De(le);let we=[],Oe=[],ke={},_e=[],Pe;for(Pe in le){if(!Object.prototype.hasOwnProperty.call(le,Pe))continue;let Kr=_(Pe);if(!Kr)continue;we.forEach(function(_i){if(ge(_i,Kr))throw new TypeError('Conflicting signatures "'+S(_i)+'" and "'+S(Kr)+'".')}),we.push(Kr);let jt=Oe.length;Oe.push(le[Pe]);let _u=Kr.map(F),Xi;for(Xi of pe(_u)){let _i=S(Xi);_e.push({params:Xi,name:_i,fn:jt}),Xi.every(ps=>!ps.hasConversion)&&(ke[_i]=jt)}}_e.sort(ie);let We=be(Oe,ke,xa),B;for(B in ke)Object.prototype.hasOwnProperty.call(ke,B)&&(ke[B]=We[ke[B]]);let Q=[],ve=new Map;for(B of _e)ve.has(B.name)||(B.fn=We[B.fn],Q.push(B),ve.set(B.name,B));let Be=Q[0]&&Q[0].params.length<=2&&!k(Q[0].params),er=Q[1]&&Q[1].params.length<=2&&!k(Q[1].params),fr=Q[2]&&Q[2].params.length<=2&&!k(Q[2].params),Zr=Q[3]&&Q[3].params.length<=2&&!k(Q[3].params),_t=Q[4]&&Q[4].params.length<=2&&!k(Q[4].params),Yt=Q[5]&&Q[5].params.length<=2&&!k(Q[5].params),Qi=Be&&er&&fr&&Zr&&_t&&Yt;for(let Kr=0;KrKr.test),ls=Q.map(Kr=>Kr.implementation),cs=function(){for(let jt=Mu;jtS(_(we))),le=K(arguments);if(typeof le!="function")throw new TypeError("Callback function expected as last argument");return ue(re,le)}function ue(re,le){return{referTo:{references:re,callback:le}}}function Ee(re){if(typeof re!="function")throw new TypeError("Callback function expected as first argument");return{referToSelf:{callback:re}}}function Ce(re){return re&&typeof re.referTo=="object"&&Array.isArray(re.referTo.references)&&typeof re.referTo.callback=="function"}function Le(re){return re&&typeof re.referToSelf=="object"&&typeof re.referToSelf.callback=="function"}function Ie(re,le){if(!re)return le;if(le&&le!==re){let we=new Error("Function names do not match (expected: "+re+", actual: "+le+")");throw we.data={actual:le,expected:re},we}return re}function sr(re){let le;for(let we in re)Object.prototype.hasOwnProperty.call(re,we)&&(C(re[we])||typeof re[we].signature=="string")&&(le=Ie(le,re[we].name));return le}function ir(re,le){let we;for(we in le)if(Object.prototype.hasOwnProperty.call(le,we)){if(we in re&&le[we]!==re[we]){let Oe=new Error('Signature "'+we+'" is defined twice');throw Oe.data={signature:we,sourceFunction:le[we],destFunction:re[we]},Oe}re[we]=le[we]}}let Xe=h;h=function(re){let le=typeof re=="string",we=le?1:0,Oe=le?re:"",ke={};for(let _e=we;_eke.from===re.from);if(!we)throw new Error("Attempt to remove nonexistent conversion from "+re.from+" to "+re.to);if(we.convert!==re.convert)throw new Error("Conversion to remove does not match existing conversion");let Oe=le.conversionsTo.indexOf(we);le.conversionsTo.splice(Oe,1)},h.resolve=function(re,le){if(!C(re))throw new TypeError(n);let we=re._typedFunctionData.signatures;for(let Oe=0;Oe{(function(e){"use strict";var r=Math.cosh||function(o){return Math.abs(o)<1e-9?1-o:(Math.exp(o)+Math.exp(-o))*.5},t=Math.sinh||function(o){return Math.abs(o)<1e-9?o:(Math.exp(o)-Math.exp(-o))*.5},n=function(o){var u=Math.PI/4;if(-u>o||o>u)return Math.cos(o)-1;var p=o*o;return p*(p*(p*(p*(p*(p*(p*(p/20922789888e3-1/87178291200)+1/479001600)-1/3628800)+1/40320)-1/720)+1/24)-1/2)},i=function(o,u){var p=Math.abs(o),h=Math.abs(u);return p<3e3&&h<3e3?Math.sqrt(p*p+h*h):(p0&&a();break;case"number":p.im=0,p.re=o;break;default:a()}return isNaN(p.re)||isNaN(p.im),p};function f(o,u){if(!(this instanceof f))return new f(o,u);var p=l(o,u);this.re=p.re,this.im=p.im}f.prototype={re:0,im:0,sign:function(){var o=this.abs();return new f(this.re/o,this.im/o)},add:function(o,u){var p=new f(o,u);return this.isInfinite()&&p.isInfinite()?f.NAN:this.isInfinite()||p.isInfinite()?f.INFINITY:new f(this.re+p.re,this.im+p.im)},sub:function(o,u){var p=new f(o,u);return this.isInfinite()&&p.isInfinite()?f.NAN:this.isInfinite()||p.isInfinite()?f.INFINITY:new f(this.re-p.re,this.im-p.im)},mul:function(o,u){var p=new f(o,u);return this.isInfinite()&&p.isZero()||this.isZero()&&p.isInfinite()?f.NAN:this.isInfinite()||p.isInfinite()?f.INFINITY:p.im===0&&this.im===0?new f(this.re*p.re,0):new f(this.re*p.re-this.im*p.im,this.re*p.im+this.im*p.re)},div:function(o,u){var p=new f(o,u);if(this.isZero()&&p.isZero()||this.isInfinite()&&p.isInfinite())return f.NAN;if(this.isInfinite()||p.isZero())return f.INFINITY;if(this.isZero()||p.isInfinite())return f.ZERO;o=this.re,u=this.im;var h=p.re,d=p.im,x,v;return d===0?new f(o/h,u/h):Math.abs(h)0)return new f(Math.pow(o,p.re),0);if(o===0)switch((p.re%4+4)%4){case 0:return new f(Math.pow(u,p.re),0);case 1:return new f(0,Math.pow(u,p.re));case 2:return new f(-Math.pow(u,p.re),0);case 3:return new f(0,-Math.pow(u,p.re))}}if(o===0&&u===0&&p.re>0&&p.im>=0)return f.ZERO;var h=Math.atan2(u,o),d=s(o,u);return o=Math.exp(p.re*d-p.im*h),u=p.im*d+p.re*h,new f(o*Math.cos(u),o*Math.sin(u))},sqrt:function(){var o=this.re,u=this.im,p=this.abs(),h,d;if(o>=0){if(u===0)return new f(Math.sqrt(o),0);h=.5*Math.sqrt(2*(p+o))}else h=Math.abs(u)/Math.sqrt(2*(p-o));return o<=0?d=.5*Math.sqrt(2*(p-o)):d=Math.abs(u)/Math.sqrt(2*(p+o)),new f(h,u<0?-d:d)},exp:function(){var o=Math.exp(this.re);return this.im,new f(o*Math.cos(this.im),o*Math.sin(this.im))},expm1:function(){var o=this.re,u=this.im;return new f(Math.expm1(o)*Math.cos(u)+n(u),Math.exp(o)*Math.sin(u))},log:function(){var o=this.re,u=this.im;return u===0&&o>0,new f(s(o,u),Math.atan2(u,o))},abs:function(){return i(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){var o=this.re,u=this.im;return new f(Math.sin(o)*r(u),Math.cos(o)*t(u))},cos:function(){var o=this.re,u=this.im;return new f(Math.cos(o)*r(u),-Math.sin(o)*t(u))},tan:function(){var o=2*this.re,u=2*this.im,p=Math.cos(o)+r(u);return new f(Math.sin(o)/p,t(u)/p)},cot:function(){var o=2*this.re,u=2*this.im,p=Math.cos(o)-r(u);return new f(-Math.sin(o)/p,t(u)/p)},sec:function(){var o=this.re,u=this.im,p=.5*r(2*u)+.5*Math.cos(2*o);return new f(Math.cos(o)*r(u)/p,Math.sin(o)*t(u)/p)},csc:function(){var o=this.re,u=this.im,p=.5*r(2*u)-.5*Math.cos(2*o);return new f(Math.sin(o)*r(u)/p,-Math.cos(o)*t(u)/p)},asin:function(){var o=this.re,u=this.im,p=new f(u*u-o*o+1,-2*o*u).sqrt(),h=new f(p.re-u,p.im+o).log();return new f(h.im,-h.re)},acos:function(){var o=this.re,u=this.im,p=new f(u*u-o*o+1,-2*o*u).sqrt(),h=new f(p.re-u,p.im+o).log();return new f(Math.PI/2-h.im,h.re)},atan:function(){var o=this.re,u=this.im;if(o===0){if(u===1)return new f(0,1/0);if(u===-1)return new f(0,-1/0)}var p=o*o+(1-u)*(1-u),h=new f((1-u*u-o*o)/p,-2*o/p).log();return new f(-.5*h.im,.5*h.re)},acot:function(){var o=this.re,u=this.im;if(u===0)return new f(Math.atan2(1,o),0);var p=o*o+u*u;return p!==0?new f(o/p,-u/p).atan():new f(o!==0?o/0:0,u!==0?-u/0:0).atan()},asec:function(){var o=this.re,u=this.im;if(o===0&&u===0)return new f(0,1/0);var p=o*o+u*u;return p!==0?new f(o/p,-u/p).acos():new f(o!==0?o/0:0,u!==0?-u/0:0).acos()},acsc:function(){var o=this.re,u=this.im;if(o===0&&u===0)return new f(Math.PI/2,1/0);var p=o*o+u*u;return p!==0?new f(o/p,-u/p).asin():new f(o!==0?o/0:0,u!==0?-u/0:0).asin()},sinh:function(){var o=this.re,u=this.im;return new f(t(o)*Math.cos(u),r(o)*Math.sin(u))},cosh:function(){var o=this.re,u=this.im;return new f(r(o)*Math.cos(u),t(o)*Math.sin(u))},tanh:function(){var o=2*this.re,u=2*this.im,p=r(o)+Math.cos(u);return new f(t(o)/p,Math.sin(u)/p)},coth:function(){var o=2*this.re,u=2*this.im,p=r(o)-Math.cos(u);return new f(t(o)/p,-Math.sin(u)/p)},csch:function(){var o=this.re,u=this.im,p=Math.cos(2*u)-r(2*o);return new f(-2*t(o)*Math.cos(u)/p,2*r(o)*Math.sin(u)/p)},sech:function(){var o=this.re,u=this.im,p=Math.cos(2*u)+r(2*o);return new f(2*r(o)*Math.cos(u)/p,-2*t(o)*Math.sin(u)/p)},asinh:function(){var o=this.im;this.im=-this.re,this.re=o;var u=this.asin();return this.re=-this.im,this.im=o,o=u.re,u.re=-u.im,u.im=o,u},acosh:function(){var o=this.acos();if(o.im<=0){var u=o.re;o.re=-o.im,o.im=u}else{var u=o.im;o.im=-o.re,o.re=u}return o},atanh:function(){var o=this.re,u=this.im,p=o>1&&u===0,h=1-o,d=1+o,x=h*h+u*u,v=x!==0?new f((d*h-u*u)/x,(u*h+d*u)/x):new f(o!==-1?o/0:0,u!==0?u/0:0),y=v.re;return v.re=s(v.re,v.im)/2,v.im=Math.atan2(v.im,y)/2,p&&(v.im=-v.im),v},acoth:function(){var o=this.re,u=this.im;if(o===0&&u===0)return new f(0,Math.PI/2);var p=o*o+u*u;return p!==0?new f(o/p,-u/p).atanh():new f(o!==0?o/0:0,u!==0?-u/0:0).atanh()},acsch:function(){var o=this.re,u=this.im;if(u===0)return new f(o!==0?Math.log(o+Math.sqrt(o*o+1)):1/0,0);var p=o*o+u*u;return p!==0?new f(o/p,-u/p).asinh():new f(o!==0?o/0:0,u!==0?-u/0:0).asinh()},asech:function(){var o=this.re,u=this.im;if(this.isZero())return f.INFINITY;var p=o*o+u*u;return p!==0?new f(o/p,-u/p).acosh():new f(o!==0?o/0:0,u!==0?-u/0:0).acosh()},inverse:function(){if(this.isZero())return f.INFINITY;if(this.isInfinite())return f.ZERO;var o=this.re,u=this.im,p=o*o+u*u;return new f(o/p,-u/p)},conjugate:function(){return new f(this.re,-this.im)},neg:function(){return new f(-this.re,-this.im)},ceil:function(o){return o=Math.pow(10,o||0),new f(Math.ceil(this.re*o)/o,Math.ceil(this.im*o)/o)},floor:function(o){return o=Math.pow(10,o||0),new f(Math.floor(this.re*o)/o,Math.floor(this.im*o)/o)},round:function(o){return o=Math.pow(10,o||0),new f(Math.round(this.re*o)/o,Math.round(this.im*o)/o)},equals:function(o,u){var p=new f(o,u);return Math.abs(p.re-this.re)<=f.EPSILON&&Math.abs(p.im-this.im)<=f.EPSILON},clone:function(){return new f(this.re,this.im)},toString:function(){var o=this.re,u=this.im,p="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(o){(function(e){"use strict";var r=2e3,t={s:1,n:0,d:1};function n(v,y){if(isNaN(v=parseInt(v,10)))throw d();return v*y}function i(v,y){if(y===0)throw h();var w=Object.create(p.prototype);w.s=v<0?-1:1,v=v<0?-v:v;var C=u(v,y);return w.n=v/C,w.d=y/C,w}function a(v){for(var y={},w=v,C=2,b=4;b<=w;){for(;w%C===0;)w/=C,y[C]=(y[C]||0)+1;b+=1+2*C++}return w!==v?w>1&&(y[w]=(y[w]||0)+1):y[v]=(y[v]||0)+1,y}var s=function(v,y){var w=0,C=1,b=1,A=0,E=0,S=0,O=1,F=1,M=0,_=1,k=1,L=1,Y=1e7,$;if(v!=null)if(y!==void 0){if(w=v,C=y,b=w*C,w%1!==0||C%1!==0)throw x()}else switch(typeof v){case"object":{if("d"in v&&"n"in v)w=v.n,C=v.d,"s"in v&&(w*=v.s);else if(0 in v)w=v[0],1 in v&&(C=v[1]);else throw d();b=w*C;break}case"number":{if(v<0&&(b=v,v=-v),v%1===0)w=v;else if(v>0){for(v>=1&&(F=Math.pow(10,Math.floor(1+Math.log(v)/Math.LN10)),v/=F);_<=Y&&L<=Y;)if($=(M+k)/(_+L),v===$){_+L<=Y?(w=M+k,C=_+L):L>_?(w=k,C=L):(w=M,C=_);break}else v>$?(M+=k,_+=L):(k+=M,L+=_),_>Y?(w=k,C=L):(w=M,C=_);w*=F}else(isNaN(v)||isNaN(y))&&(C=w=NaN);break}case"string":{if(_=v.match(/\\d+|./g),_===null)throw d();if(_[M]==="-"?(b=-1,M++):_[M]==="+"&&M++,_.length===M+1?E=n(_[M++],b):_[M+1]==="."||_[M]==="."?(_[M]!=="."&&(A=n(_[M++],b)),M++,(M+1===_.length||_[M+1]==="("&&_[M+3]===")"||_[M+1]==="'"&&_[M+3]==="'")&&(E=n(_[M],b),O=Math.pow(10,_[M].length),M++),(_[M]==="("&&_[M+2]===")"||_[M]==="'"&&_[M+2]==="'")&&(S=n(_[M+1],b),F=Math.pow(10,_[M+1].length)-1,M+=3)):_[M+1]==="/"||_[M+1]===":"?(E=n(_[M],b),O=n(_[M+2],1),M+=3):_[M+3]==="/"&&_[M+1]===" "&&(A=n(_[M],b),E=n(_[M+2],b),O=n(_[M+4],1),M+=5),_.length<=M){C=O*F,b=w=S+C*A+F*E;break}}default:throw d()}if(C===0)throw h();t.s=b<0?-1:1,t.n=Math.abs(w),t.d=Math.abs(C)};function l(v,y,w){for(var C=1;y>0;v=v*v%w,y>>=1)y&1&&(C=C*v%w);return C}function f(v,y){for(;y%2===0;y/=2);for(;y%5===0;y/=5);if(y===1)return 0;for(var w=10%y,C=1;w!==1;C++)if(w=w*10%y,C>r)return 0;return C}function o(v,y,w){for(var C=1,b=l(10,w,y),A=0;A<300;A++){if(C===b)return A;C=C*10%y,b=b*10%y}return 0}function u(v,y){if(!v)return y;if(!y)return v;for(;;){if(v%=y,!v)return y;if(y%=v,!y)return v}}function p(v,y){if(s(v,y),this instanceof p)v=u(t.d,t.n),this.s=t.s,this.n=t.n/v,this.d=t.d/v;else return i(t.s*t.n,t.d)}var h=function(){return new Error("Division by Zero")},d=function(){return new Error("Invalid argument")},x=function(){return new Error("Parameters must be integer")};p.prototype={s:1,n:0,d:1,abs:function(){return i(this.n,this.d)},neg:function(){return i(-this.s*this.n,this.d)},add:function(v,y){return s(v,y),i(this.s*this.n*t.d+t.s*this.d*t.n,this.d*t.d)},sub:function(v,y){return s(v,y),i(this.s*this.n*t.d-t.s*this.d*t.n,this.d*t.d)},mul:function(v,y){return s(v,y),i(this.s*t.s*this.n*t.n,this.d*t.d)},div:function(v,y){return s(v,y),i(this.s*t.s*this.n*t.d,this.d*t.n)},clone:function(){return i(this.s*this.n,this.d)},mod:function(v,y){if(isNaN(this.n)||isNaN(this.d))return new p(NaN);if(v===void 0)return i(this.s*this.n%this.d,1);if(s(v,y),t.n===0&&this.d===0)throw h();return i(this.s*(t.d*this.n)%(t.n*this.d),t.d*this.d)},gcd:function(v,y){return s(v,y),i(u(t.n,this.n)*u(t.d,this.d),t.d*this.d)},lcm:function(v,y){return s(v,y),t.n===0&&this.n===0?i(0,1):i(t.n*this.n,u(t.n,this.n)*u(t.d,this.d))},ceil:function(v){return v=Math.pow(10,v||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):i(Math.ceil(v*this.s*this.n/this.d),v)},floor:function(v){return v=Math.pow(10,v||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):i(Math.floor(v*this.s*this.n/this.d),v)},round:function(v){return v=Math.pow(10,v||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):i(Math.round(v*this.s*this.n/this.d),v)},inverse:function(){return i(this.s*this.d,this.n)},pow:function(v,y){if(s(v,y),t.d===1)return t.s<0?i(Math.pow(this.s*this.d,t.n),Math.pow(this.n,t.n)):i(Math.pow(this.s*this.n,t.n),Math.pow(this.d,t.n));if(this.s<0)return null;var w=a(this.n),C=a(this.d),b=1,A=1;for(var E in w)if(E!=="1"){if(E==="0"){b=0;break}if(w[E]*=t.n,w[E]%t.d===0)w[E]/=t.d;else return null;b*=Math.pow(E,w[E])}for(var E in C)if(E!=="1"){if(C[E]*=t.n,C[E]%t.d===0)C[E]/=t.d;else return null;A*=Math.pow(E,C[E])}return t.s<0?i(A,b):i(b,A)},equals:function(v,y){return s(v,y),this.s*this.n*t.d===t.s*t.n*this.d},compare:function(v,y){s(v,y);var w=this.s*this.n*t.d-t.s*t.n*this.d;return(0=0;A--)b=b.inverse().add(w[A]);if(Math.abs(b.sub(y).valueOf())0&&(w+=y,w+=" ",C%=b),w+=C,w+="/",w+=b),w},toLatex:function(v){var y,w="",C=this.n,b=this.d;return this.s<0&&(w+="-"),b===1?w+=C:(v&&(y=Math.floor(C/b))>0&&(w+=y,C%=b),w+="\\\\frac{",w+=C,w+="}{",w+=b,w+="}"),w},toContinued:function(){var v,y=this.n,w=this.d,C=[];if(isNaN(y)||isNaN(w))return C;do C.push(Math.floor(y/w)),v=y%w,y=w,w=v;while(y!==1);return C},toString:function(v){var y=this.n,w=this.d;if(isNaN(y)||isNaN(w))return"NaN";v=v||15;var C=f(y,w),b=o(y,w,C),A=this.s<0?"-":"";if(A+=y/w|0,y%=w,y*=10,y&&(A+="."),C){for(var E=b;E--;)A+=y/w|0,y%=w,y*=10;A+="(";for(var E=C;E--;)A+=y/w|0,y%=w,y*=10;A+=")"}else for(var E=v;y&&E--;)A+=y/w|0,y%=w,y*=10;return A}},typeof sv=="object"?(Object.defineProperty(p,"__esModule",{value:!0}),p.default=p,p.Fraction=p,e1.exports=p):e.Fraction=p})(sv)});var gS=un((Voe,vS)=>{vS.exports=function e(r,t){"use strict";var n=/(^([+\\-]?(?:0|[1-9]\\d*)(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)?$|^0x[0-9a-f]+$|\\d+)/gi,i=/(^[ ]*|[ ]*$)/g,a=/(^([\\w ]+,?[\\w ]+)?[\\w ]+,?[\\w ]+\\d+:\\d+(:\\d+)?[\\w ]?|^\\d{1,4}[\\/\\-]\\d{1,4}[\\/\\-]\\d{1,4}|^\\w+, \\w+ \\d+, \\d{4})/,s=/^0x[0-9a-f]+$/i,l=/^0/,f=function(b){return e.insensitive&&(""+b).toLowerCase()||""+b},o=f(r).replace(i,"")||"",u=f(t).replace(i,"")||"",p=o.replace(n,"\\0$1\\0").replace(/\\0$/,"").replace(/^\\0/,"").split("\\0"),h=u.replace(n,"\\0$1\\0").replace(/\\0$/,"").replace(/^\\0/,"").split("\\0"),d=parseInt(o.match(s),16)||p.length!==1&&o.match(a)&&Date.parse(o),x=parseInt(u.match(s),16)||d&&u.match(a)&&Date.parse(u)||null,v,y;if(x){if(dx)return 1}for(var w=0,C=Math.max(p.length,h.length);wy)return 1}return 0}});var B2=un((ope,O2)=>{"use strict";var pg=Object.assign||function(e){for(var r=1;r1&&arguments[1]!==void 0?arguments[1]:{},t=r.preserveFormatting,n=t===void 0?!1:t,i=r.escapeMapFn,a=i===void 0?nz:i,s=String(e),l="",f=a(pg({},rz),n?pg({},tz):{}),o=Object.keys(f),u=function(){var h=!1;o.forEach(function(d,x){h||s.length>=d.length&&s.slice(0,d.length)===d&&(l+=f[o[x]],s=s.slice(d.length,s.length),h=!0)}),h||(l+=s.slice(0,1),s=s.slice(1,s.length))};s;)u();return l}});var tF=un((rF,bg)=>{(function(e,r,t){function n(l){var f=this,o=s();f.next=function(){var u=2091639*f.s0+f.c*23283064365386963e-26;return f.s0=f.s1,f.s1=f.s2,f.s2=u-(f.c=u|0)},f.c=1,f.s0=o(" "),f.s1=o(" "),f.s2=o(" "),f.s0-=o(l),f.s0<0&&(f.s0+=1),f.s1-=o(l),f.s1<0&&(f.s1+=1),f.s2-=o(l),f.s2<0&&(f.s2+=1),o=null}function i(l,f){return f.c=l.c,f.s0=l.s0,f.s1=l.s1,f.s2=l.s2,f}function a(l,f){var o=new n(l),u=f&&f.state,p=o.next;return p.int32=function(){return o.next()*4294967296|0},p.double=function(){return p()+(p()*2097152|0)*11102230246251565e-32},p.quick=p,u&&(typeof u=="object"&&i(u,o),p.state=function(){return i(o,{})}),p}function s(){var l=4022871197,f=function(o){o=String(o);for(var u=0;u>>0,p-=l,p*=l,l=p>>>0,p-=l,l+=p*4294967296}return(l>>>0)*23283064365386963e-26};return f}r&&r.exports?r.exports=a:t&&t.amd?t(function(){return a}):this.alea=a})(rF,typeof bg=="object"&&bg,typeof define=="function"&&define)});var iF=un((nF,wg)=>{(function(e,r,t){function n(s){var l=this,f="";l.x=0,l.y=0,l.z=0,l.w=0,l.next=function(){var u=l.x^l.x<<11;return l.x=l.y,l.y=l.z,l.z=l.w,l.w^=l.w>>>19^u^u>>>8},s===(s|0)?l.x=s:f+=s;for(var o=0;o>>0)/4294967296};return u.double=function(){do var p=f.next()>>>11,h=(f.next()>>>0)/4294967296,d=(p+h)/(1<<21);while(d===0);return d},u.int32=f.next,u.quick=u,o&&(typeof o=="object"&&i(o,f),u.state=function(){return i(f,{})}),u}r&&r.exports?r.exports=a:t&&t.amd?t(function(){return a}):this.xor128=a})(nF,typeof wg=="object"&&wg,typeof define=="function"&&define)});var oF=un((aF,Dg)=>{(function(e,r,t){function n(s){var l=this,f="";l.next=function(){var u=l.x^l.x>>>2;return l.x=l.y,l.y=l.z,l.z=l.w,l.w=l.v,(l.d=l.d+362437|0)+(l.v=l.v^l.v<<4^(u^u<<1))|0},l.x=0,l.y=0,l.z=0,l.w=0,l.v=0,s===(s|0)?l.x=s:f+=s;for(var o=0;o>>4),l.next()}function i(s,l){return l.x=s.x,l.y=s.y,l.z=s.z,l.w=s.w,l.v=s.v,l.d=s.d,l}function a(s,l){var f=new n(s),o=l&&l.state,u=function(){return(f.next()>>>0)/4294967296};return u.double=function(){do var p=f.next()>>>11,h=(f.next()>>>0)/4294967296,d=(p+h)/(1<<21);while(d===0);return d},u.int32=f.next,u.quick=u,o&&(typeof o=="object"&&i(o,f),u.state=function(){return i(f,{})}),u}r&&r.exports?r.exports=a:t&&t.amd?t(function(){return a}):this.xorwow=a})(aF,typeof Dg=="object"&&Dg,typeof define=="function"&&define)});var uF=un((sF,Sg)=>{(function(e,r,t){function n(s){var l=this;l.next=function(){var o=l.x,u=l.i,p,h,d;return p=o[u],p^=p>>>7,h=p^p<<24,p=o[u+1&7],h^=p^p>>>10,p=o[u+3&7],h^=p^p>>>3,p=o[u+4&7],h^=p^p<<7,p=o[u+7&7],p=p^p<<13,h^=p^p<<9,o[u]=h,l.i=u+1&7,h};function f(o,u){var p,h,d=[];if(u===(u|0))h=d[0]=u;else for(u=""+u,p=0;p0;--p)o.next()}f(l,s)}function i(s,l){return l.x=s.x.slice(),l.i=s.i,l}function a(s,l){s==null&&(s=+new Date);var f=new n(s),o=l&&l.state,u=function(){return(f.next()>>>0)/4294967296};return u.double=function(){do var p=f.next()>>>11,h=(f.next()>>>0)/4294967296,d=(p+h)/(1<<21);while(d===0);return d},u.int32=f.next,u.quick=u,o&&(o.x&&i(o,f),u.state=function(){return i(f,{})}),u}r&&r.exports?r.exports=a:t&&t.amd?t(function(){return a}):this.xorshift7=a})(sF,typeof Sg=="object"&&Sg,typeof define=="function"&&define)});var lF=un((fF,Ng)=>{(function(e,r,t){function n(s){var l=this;l.next=function(){var o=l.w,u=l.X,p=l.i,h,d;return l.w=o=o+1640531527|0,d=u[p+34&127],h=u[p=p+1&127],d^=d<<13,h^=h<<17,d^=d>>>15,h^=h>>>12,d=u[p]=d^h,l.i=p,d+(o^o>>>16)|0};function f(o,u){var p,h,d,x,v,y=[],w=128;for(u===(u|0)?(h=u,u=null):(u=u+"\\0",h=0,w=Math.max(w,u.length)),d=0,x=-32;x>>15,h^=h<<4,h^=h>>>13,x>=0&&(v=v+1640531527|0,p=y[x&127]^=h+v,d=p==0?d+1:0);for(d>=128&&(y[(u&&u.length||0)&127]=-1),d=127,x=4*128;x>0;--x)h=y[d+34&127],p=y[d=d+1&127],h^=h<<13,p^=p<<17,h^=h>>>15,p^=p>>>12,y[d]=h^p;o.w=v,o.X=y,o.i=d}f(l,s)}function i(s,l){return l.i=s.i,l.w=s.w,l.X=s.X.slice(),l}function a(s,l){s==null&&(s=+new Date);var f=new n(s),o=l&&l.state,u=function(){return(f.next()>>>0)/4294967296};return u.double=function(){do var p=f.next()>>>11,h=(f.next()>>>0)/4294967296,d=(p+h)/(1<<21);while(d===0);return d},u.int32=f.next,u.quick=u,o&&(o.X&&i(o,f),u.state=function(){return i(f,{})}),u}r&&r.exports?r.exports=a:t&&t.amd?t(function(){return a}):this.xor4096=a})(fF,typeof Ng=="object"&&Ng,typeof define=="function"&&define)});var pF=un((cF,Ag)=>{(function(e,r,t){function n(s){var l=this,f="";l.next=function(){var u=l.b,p=l.c,h=l.d,d=l.a;return u=u<<25^u>>>7^p,p=p-h|0,h=h<<24^h>>>8^d,d=d-u|0,l.b=u=u<<20^u>>>12^p,l.c=p=p-h|0,l.d=h<<16^p>>>16^d,l.a=d-u|0},l.a=0,l.b=0,l.c=-1640531527,l.d=1367130551,s===Math.floor(s)?(l.a=s/4294967296|0,l.b=s|0):f+=s;for(var o=0;o>>0)/4294967296};return u.double=function(){do var p=f.next()>>>11,h=(f.next()>>>0)/4294967296,d=(p+h)/(1<<21);while(d===0);return d},u.int32=f.next,u.quick=u,o&&(typeof o=="object"&&i(o,f),u.state=function(){return i(f,{})}),u}r&&r.exports?r.exports=a:t&&t.amd?t(function(){return a}):this.tychei=a})(cF,typeof Ag=="object"&&Ag,typeof define=="function"&&define)});var mF=un(()=>{});var dF=un((hF,Vp)=>{(function(e,r,t){var n=256,i=6,a=52,s="random",l=t.pow(n,i),f=t.pow(2,a),o=f*2,u=n-1,p;function h(b,A,E){var S=[];A=A==!0?{entropy:!0}:A||{};var O=y(v(A.entropy?[b,C(r)]:b??w(),3),S),F=new d(S),M=function(){for(var _=F.g(i),k=l,L=0;_=o;)_/=2,k/=2,L>>>=1;return(_+L)/k};return M.int32=function(){return F.g(4)|0},M.quick=function(){return F.g(4)/4294967296},M.double=M,y(C(F.S),r),(A.pass||E||function(_,k,L,Y){return Y&&(Y.S&&x(Y,F),_.state=function(){return x(F,{})}),L?(t[s]=_,k):_})(M,O,"global"in A?A.global:this==t,A.state)}function d(b){var A,E=b.length,S=this,O=0,F=S.i=S.j=0,M=S.S=[];for(E||(b=[E++]);O{var bW=tF(),wW=iF(),DW=oF(),SW=uF(),NW=lF(),AW=pF(),ss=dF();ss.alea=bW;ss.xor128=wW;ss.xorwow=DW;ss.xorshift7=SW;ss.xor4096=NW;ss.tychei=AW;vF.exports=ss});var HO=un((L3e,Og)=>{function Fg(){}Fg.prototype={on:function(e,r,t){var n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:r,ctx:t}),this},once:function(e,r,t){var n=this;function i(){n.off(e,i),r.apply(t,arguments)}return i._=r,this.on(e,i,t)},emit:function(e){var r=[].slice.call(arguments,1),t=((this.e||(this.e={}))[e]||[]).slice(),n=0,i=t.length;for(n;n[...new Set(e)];var fo="File";function fd(e){return Array.isArray(e)?e:typeof e=="string"?[e]:[]}function xx(e){return e?typeof e!="string"?e.toString():e:""}var yx=(e,r)=>r.indexOf(e)>0?r.indexOf(e):r.length;function pi(e){return pi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},pi(e)}function Pn(e){if(e===null||e===!0||e===!1)return NaN;var r=Number(e);return isNaN(r)?r:r<0?Math.ceil(r):Math.floor(r)}function ot(e,r){if(r.length1?"s":"")+" required, but only "+r.length+" present")}function Lt(e){ot(1,arguments);var r=Object.prototype.toString.call(e);return e instanceof Date||pi(e)==="object"&&r==="[object Date]"?new Date(e.getTime()):typeof e=="number"||r==="[object Number]"?new Date(e):((typeof e=="string"||r==="[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 ld(e,r){ot(2,arguments);var t=Lt(e).getTime(),n=Pn(r);return new Date(t+n)}var l8={};function lo(){return l8}function cd(e){var r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),e.getTime()-r.getTime()}function pd(e){return ot(1,arguments),e instanceof Date||pi(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function md(e){if(ot(1,arguments),!pd(e)&&typeof e!="number")return!1;var r=Lt(e);return!isNaN(Number(r))}function hd(e,r){ot(2,arguments);var t=Pn(r);return ld(e,-t)}var c8=864e5;function dd(e){ot(1,arguments);var r=Lt(e),t=r.getTime();r.setUTCMonth(0,1),r.setUTCHours(0,0,0,0);var n=r.getTime(),i=t-n;return Math.floor(i/c8)+1}function co(e){ot(1,arguments);var r=1,t=Lt(e),n=t.getUTCDay(),i=(n=i.getTime()?t+1:r.getTime()>=s.getTime()?t:t-1}function vd(e){ot(1,arguments);var r=cf(e),t=new Date(0);t.setUTCFullYear(r,0,4),t.setUTCHours(0,0,0,0);var n=co(t);return n}var p8=6048e5;function gd(e){ot(1,arguments);var r=Lt(e),t=co(r).getTime()-vd(r).getTime();return Math.round(t/p8)+1}function po(e,r){var t,n,i,a,s,l,f,o;ot(1,arguments);var u=lo(),p=Pn((t=(n=(i=(a=r?.weekStartsOn)!==null&&a!==void 0?a:r==null||(s=r.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&i!==void 0?i:u.weekStartsOn)!==null&&n!==void 0?n:(f=u.locale)===null||f===void 0||(o=f.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&t!==void 0?t:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=Lt(e),d=h.getUTCDay(),x=(d=1&&d<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var x=new Date(0);x.setUTCFullYear(p+1,0,d),x.setUTCHours(0,0,0,0);var v=po(x,r),y=new Date(0);y.setUTCFullYear(p,0,d),y.setUTCHours(0,0,0,0);var w=po(y,r);return u.getTime()>=v.getTime()?p+1:u.getTime()>=w.getTime()?p:p-1}function xd(e,r){var t,n,i,a,s,l,f,o;ot(1,arguments);var u=lo(),p=Pn((t=(n=(i=(a=r?.firstWeekContainsDate)!==null&&a!==void 0?a:r==null||(s=r.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&i!==void 0?i:u.firstWeekContainsDate)!==null&&n!==void 0?n:(f=u.locale)===null||f===void 0||(o=f.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&t!==void 0?t:1),h=pf(e,r),d=new Date(0);d.setUTCFullYear(h,0,p),d.setUTCHours(0,0,0,0);var x=po(d,r);return x}var m8=6048e5;function yd(e,r){ot(1,arguments);var t=Lt(e),n=po(t,r).getTime()-xd(t,r).getTime();return Math.round(n/m8)+1}function it(e,r){for(var t=e<0?"-":"",n=Math.abs(e).toString();n.length0?n:1-n;return it(t==="yy"?i%100:i,t.length)},M:function(r,t){var n=r.getUTCMonth();return t==="M"?String(n+1):it(n+1,2)},d:function(r,t){return it(r.getUTCDate(),t.length)},a:function(r,t){var n=r.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(r,t){return it(r.getUTCHours()%12||12,t.length)},H:function(r,t){return it(r.getUTCHours(),t.length)},m:function(r,t){return it(r.getUTCMinutes(),t.length)},s:function(r,t){return it(r.getUTCSeconds(),t.length)},S:function(r,t){var n=t.length,i=r.getUTCMilliseconds(),a=Math.floor(i*Math.pow(10,n-3));return it(a,t.length)}},Oa=h8;var zs={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},d8={G:function(r,t,n){var i=r.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(r,t,n){if(t==="yo"){var i=r.getUTCFullYear(),a=i>0?i:1-i;return n.ordinalNumber(a,{unit:"year"})}return Oa.y(r,t)},Y:function(r,t,n,i){var a=pf(r,i),s=a>0?a:1-a;if(t==="YY"){var l=s%100;return it(l,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):it(s,t.length)},R:function(r,t){var n=cf(r);return it(n,t.length)},u:function(r,t){var n=r.getUTCFullYear();return it(n,t.length)},Q:function(r,t,n){var i=Math.ceil((r.getUTCMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return it(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(r,t,n){var i=Math.ceil((r.getUTCMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return it(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(r,t,n){var i=r.getUTCMonth();switch(t){case"M":case"MM":return Oa.M(r,t);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(r,t,n){var i=r.getUTCMonth();switch(t){case"L":return String(i+1);case"LL":return it(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(r,t,n,i){var a=yd(r,i);return t==="wo"?n.ordinalNumber(a,{unit:"week"}):it(a,t.length)},I:function(r,t,n){var i=gd(r);return t==="Io"?n.ordinalNumber(i,{unit:"week"}):it(i,t.length)},d:function(r,t,n){return t==="do"?n.ordinalNumber(r.getUTCDate(),{unit:"date"}):Oa.d(r,t)},D:function(r,t,n){var i=dd(r);return t==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):it(i,t.length)},E:function(r,t,n){var i=r.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(r,t,n,i){var a=r.getUTCDay(),s=(a-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return it(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(r,t,n,i){var a=r.getUTCDay(),s=(a-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return it(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(r,t,n){var i=r.getUTCDay(),a=i===0?7:i;switch(t){case"i":return String(a);case"ii":return it(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(r,t,n){var i=r.getUTCHours(),a=i/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(r,t,n){var i=r.getUTCHours(),a;switch(i===12?a=zs.noon:i===0?a=zs.midnight:a=i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(r,t,n){var i=r.getUTCHours(),a;switch(i>=17?a=zs.evening:i>=12?a=zs.afternoon:i>=4?a=zs.morning:a=zs.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(r,t,n){if(t==="ho"){var i=r.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return Oa.h(r,t)},H:function(r,t,n){return t==="Ho"?n.ordinalNumber(r.getUTCHours(),{unit:"hour"}):Oa.H(r,t)},K:function(r,t,n){var i=r.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(i,{unit:"hour"}):it(i,t.length)},k:function(r,t,n){var i=r.getUTCHours();return i===0&&(i=24),t==="ko"?n.ordinalNumber(i,{unit:"hour"}):it(i,t.length)},m:function(r,t,n){return t==="mo"?n.ordinalNumber(r.getUTCMinutes(),{unit:"minute"}):Oa.m(r,t)},s:function(r,t,n){return t==="so"?n.ordinalNumber(r.getUTCSeconds(),{unit:"second"}):Oa.s(r,t)},S:function(r,t){return Oa.S(r,t)},X:function(r,t,n,i){var a=i._originalDate||r,s=a.getTimezoneOffset();if(s===0)return"Z";switch(t){case"X":return wx(s);case"XXXX":case"XX":return Zo(s);case"XXXXX":case"XXX":default:return Zo(s,":")}},x:function(r,t,n,i){var a=i._originalDate||r,s=a.getTimezoneOffset();switch(t){case"x":return wx(s);case"xxxx":case"xx":return Zo(s);case"xxxxx":case"xxx":default:return Zo(s,":")}},O:function(r,t,n,i){var a=i._originalDate||r,s=a.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+bx(s,":");case"OOOO":default:return"GMT"+Zo(s,":")}},z:function(r,t,n,i){var a=i._originalDate||r,s=a.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+bx(s,":");case"zzzz":default:return"GMT"+Zo(s,":")}},t:function(r,t,n,i){var a=i._originalDate||r,s=Math.floor(a.getTime()/1e3);return it(s,t.length)},T:function(r,t,n,i){var a=i._originalDate||r,s=a.getTime();return it(s,t.length)}};function bx(e,r){var t=e>0?"-":"+",n=Math.abs(e),i=Math.floor(n/60),a=n%60;if(a===0)return t+String(i);var s=r||"";return t+String(i)+s+it(a,2)}function wx(e,r){if(e%60===0){var t=e>0?"-":"+";return t+it(Math.abs(e)/60,2)}return Zo(e,r)}function Zo(e,r){var t=r||"",n=e>0?"-":"+",i=Math.abs(e),a=it(Math.floor(i/60),2),s=it(i%60,2);return n+a+t+s}var Dx=d8;var Sx=function(r,t){switch(r){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Nx=function(r,t){switch(r){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},v8=function(r,t){var n=r.match(/(P+)(p+)?/)||[],i=n[1],a=n[2];if(!a)return Sx(r,t);var s;switch(i){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",Sx(i,t)).replace("{{time}}",Nx(a,t))},g8={p:Nx,P:v8},Ax=g8;var x8=["D","DD"],y8=["YY","YYYY"];function Ex(e){return x8.indexOf(e)!==-1}function Cx(e){return y8.indexOf(e)!==-1}function bd(e,r,t){if(e==="YYYY")throw new RangeError("Use \`yyyy\` instead of \`YYYY\` (in \`".concat(r,"\`) for formatting years to the input \`").concat(t,"\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use \`yy\` instead of \`YY\` (in \`".concat(r,"\`) for formatting years to the input \`").concat(t,"\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use \`d\` instead of \`D\` (in \`".concat(r,"\`) for formatting days of the month to the input \`").concat(t,"\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use \`dd\` instead of \`DD\` (in \`".concat(r,"\`) for formatting days of the month to the input \`").concat(t,"\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var b8={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"}},w8=function(r,t,n){var i,a=b8[r];return typeof a=="string"?i=a:t===1?i=a.one:i=a.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},Mx=w8;function mf(e){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=r.width?String(r.width):e.defaultWidth,n=e.formats[t]||e.formats[e.defaultWidth];return n}}var D8={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},S8={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},N8={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},A8={date:mf({formats:D8,defaultWidth:"full"}),time:mf({formats:S8,defaultWidth:"full"}),dateTime:mf({formats:N8,defaultWidth:"full"})},_x=A8;var E8={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},C8=function(r,t,n,i){return E8[r]},Tx=C8;function Qo(e){return function(r,t){var n=t!=null&&t.context?String(t.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,s=t!=null&&t.width?String(t.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{var l=e.defaultWidth,f=t!=null&&t.width?String(t.width):e.defaultWidth;i=e.values[f]||e.values[l]}var o=e.argumentCallback?e.argumentCallback(r):r;return i[o]}}var M8={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},_8={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},T8={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"]},F8={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"]},O8={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"}},B8={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"}},I8=function(r,t){var n=Number(r),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},P8={ordinalNumber:I8,era:Qo({values:M8,defaultWidth:"wide"}),quarter:Qo({values:_8,defaultWidth:"wide",argumentCallback:function(r){return r-1}}),month:Qo({values:T8,defaultWidth:"wide"}),day:Qo({values:F8,defaultWidth:"wide"}),dayPeriod:Qo({values:O8,defaultWidth:"wide",formattingValues:B8,defaultFormattingWidth:"wide"})},Fx=P8;function Xo(e){return function(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=r.match(i);if(!a)return null;var s=a[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],f=Array.isArray(l)?R8(l,function(p){return p.test(s)}):k8(l,function(p){return p.test(s)}),o;o=e.valueCallback?e.valueCallback(f):f,o=t.valueCallback?t.valueCallback(o):o;var u=r.slice(s.length);return{value:o,rest:u}}}function k8(e,r){for(var t in e)if(e.hasOwnProperty(t)&&r(e[t]))return t}function R8(e,r){for(var t=0;t1&&arguments[1]!==void 0?arguments[1]:{},n=r.match(e.matchPattern);if(!n)return null;var i=n[0],a=r.match(e.parsePattern);if(!a)return null;var s=e.valueCallback?e.valueCallback(a[0]):a[0];s=t.valueCallback?t.valueCallback(s):s;var l=r.slice(i.length);return{value:s,rest:l}}}var L8=/^(\\d+)(th|st|nd|rd)?/i,q8=/\\d+/i,U8={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},z8={any:[/^b/i,/^(a|c)/i]},W8={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},V8={any:[/1/i,/2/i,/3/i,/4/i]},Y8={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},H8={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]},G8={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},$8={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]},Z8={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},Q8={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}},X8={ordinalNumber:wd({matchPattern:L8,parsePattern:q8,valueCallback:function(r){return parseInt(r,10)}}),era:Xo({matchPatterns:U8,defaultMatchWidth:"wide",parsePatterns:z8,defaultParseWidth:"any"}),quarter:Xo({matchPatterns:W8,defaultMatchWidth:"wide",parsePatterns:V8,defaultParseWidth:"any",valueCallback:function(r){return r+1}}),month:Xo({matchPatterns:Y8,defaultMatchWidth:"wide",parsePatterns:H8,defaultParseWidth:"any"}),day:Xo({matchPatterns:G8,defaultMatchWidth:"wide",parsePatterns:$8,defaultParseWidth:"any"}),dayPeriod:Xo({matchPatterns:Z8,defaultMatchWidth:"any",parsePatterns:Q8,defaultParseWidth:"any"})},Ox=X8;var J8={code:"en-US",formatDistance:Mx,formatLong:_x,formatRelative:Tx,localize:Fx,match:Ox,options:{weekStartsOn:0,firstWeekContainsDate:1}},Bx=J8;var Ix=Bx;var K8=/[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g,j8=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ek=/^'([^]*?)'?$/,rk=/''/g,tk=/[a-zA-Z]/;function Ba(e,r,t){var n,i,a,s,l,f,o,u,p,h,d,x,v,y,w,C,b,A;ot(2,arguments);var E=String(r),S=lo(),O=(n=(i=t?.locale)!==null&&i!==void 0?i:S.locale)!==null&&n!==void 0?n:Ix,F=Pn((a=(s=(l=(f=t?.firstWeekContainsDate)!==null&&f!==void 0?f:t==null||(o=t.locale)===null||o===void 0||(u=o.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&l!==void 0?l:S.firstWeekContainsDate)!==null&&s!==void 0?s:(p=S.locale)===null||p===void 0||(h=p.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(F>=1&&F<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var M=Pn((d=(x=(v=(y=t?.weekStartsOn)!==null&&y!==void 0?y:t==null||(w=t.locale)===null||w===void 0||(C=w.options)===null||C===void 0?void 0:C.weekStartsOn)!==null&&v!==void 0?v:S.weekStartsOn)!==null&&x!==void 0?x:(b=S.locale)===null||b===void 0||(A=b.options)===null||A===void 0?void 0:A.weekStartsOn)!==null&&d!==void 0?d:0);if(!(M>=0&&M<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!O.localize)throw new RangeError("locale must contain localize property");if(!O.formatLong)throw new RangeError("locale must contain formatLong property");var _=Lt(e);if(!md(_))throw new RangeError("Invalid time value");var k=cd(_),L=hd(_,k),Y={firstWeekContainsDate:F,weekStartsOn:M,locale:O,_originalDate:_},$=E.match(j8).map(function(V){var q=V[0];if(q==="p"||q==="P"){var R=Ax[q];return R(V,O.formatLong)}return V}).join("").match(K8).map(function(V){if(V==="''")return"'";var q=V[0];if(q==="'")return nk(V);var R=Dx[q];if(R)return!(t!=null&&t.useAdditionalWeekYearTokens)&&Cx(V)&&bd(V,r,String(e)),!(t!=null&&t.useAdditionalDayOfYearTokens)&&Ex(V)&&bd(V,r,String(e)),R(L,V,O.localize,Y);if(q.match(tk))throw new RangeError("Format string contains an unescaped latin alphabet character \`"+q+"\`");return V}).join("");return $}function nk(e){var r=e.match(ek);return r?r[1].replace(rk,"'"):e}function Dd(e,r){if(pi(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(pi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Sd(e){var r=Dd(e,"string");return pi(r)=="symbol"?r:r+""}function Ur(e,r,t){return r=Sd(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var Nd=(e,r)=>{if(e instanceof Date)return"date";if(typeof e=="string"){if(/\\/\\/(\\S+?(?:jpe?g|png|gif|svg))/gi.test(e)||e.includes("unsplash"))return"image";if(/^\\d{4}-\\d{2}-\\d{2}$/.test(e))return"date";if(r=="tag"||r=="tags")return"tag";if(/\\[\\[.*?\\]\\]/.test(e))return"link"}else{if(typeof e=="number")return"number";if(typeof e=="boolean")return"boolean";if(e)if(Array.isArray(e)||typeof e=="string"&&e.indexOf(",")>-1){let t=Array.isArray(e)?e:[];if(typeof e=="string"&&e.indexOf(",")>-1&&(t=Ui(e)),r=="tag"||r=="tags")return"tag-multi";if(t.length==1&&Array.isArray(t[0])&&t[0].length==1&&typeof t[0][0]=="string")return"link";let n=Ql(t.map(i=>Nd(i,r)));return n.length==1&&n[0]=="link"?"link-multi":n.some(i=>i=="object")?"object-multi":"option-multi"}else{if(e.isLuxonDateTime)return"date";if(e.isLuxonDuration)return"duration";if(e.type=="file")return"link";if(typeof e=="object"&&!Array.isArray(e)&&e!==null)return"object"}else return"unknown"}return"text"};var Px=e=>e.map(r=>r.replace(",","\\\\,")).join(", "),Jo=e=>e.map(r=>r.replace(",","\\\\,")).join(", ");var Ui=e=>(e?.replace("\\\\,",",").match(/(\\\\.|[^,])+/g)??[]).map(r=>r.trim()),Kl=(e,r)=>{switch(Nd(r,e)){case"object":return JSON.stringify(r);case"number":return r.toString();case"boolean":return r?"true":"false";case"date":{if(r instanceof Date){let n=Ba(new Date(r),"yyyy-MM-dd");if(typeof n=="string")return n}return typeof r!="string"?"":r}break;case"duration":return Px(Object.keys(r.values).reduce((n,i)=>[...n,...r.values[i]>0?[r.values[i]+" "+i]:[]],[]));case"option-multi":case"link-multi":return typeof r=="string"?Jl(r):Jo(r.map(n=>n?typeof n=="string"?Jl(n):n.path?n.path:Array.isArray(r)&&n.length==1&&Array.isArray(n[0])&&n[0].length==1&&typeof n[0][0]=="string"?n[0][0]:JSON.stringify(n):""));case"link":return Array.isArray(r)&&r.length==1&&Array.isArray(r[0])&&r[0].length==1&&typeof r[0][0]=="string"?r[0][0]:typeof r=="string"?Jl(r):r.path;case"text":case"tag":case"image":return r}return""},Xl=e=>{let r;try{r=JSON.parse(e)}catch{}return r};var Jl=e=>{if(!e)return"";let r=/\\[\\[(.*?)\\]\\]/g.exec(e),t=r?.length>1?r[1].substring(0,yx("|",r[1])):e;return t||e};var jl=(e,r)=>e==r,Ad=(e,r)=>(e??"").length==0,Ed=(e,r)=>(e??"").toLowerCase().includes((r??"").toLowerCase()),Cd=(e,r)=>parseFloat(e)>parseFloat(r),Md=(e,r)=>parseInt(e)>parseInt(r),kx=(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()>n.valueOf()},Rx=(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?Ui(e):[];return(r?Ui(r):[]).some(i=>t.some(a=>a==i))},Lx=(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()},qx=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 hf={isNotEmpty:{type:["text","file","link","link-multi","fileprop","image"],fn:(e,r)=>!Ad(e,""),valueType:"none"},isEmpty:{type:["text","file","link","link-multi","fileprop","image"],fn:(e,r)=>Ad(e,""),valueType:"none"},include:{fn:(e,r)=>Ed(e,r),type:["text","file","link","link-multi","fileprop","image"],valueType:"text"},notInclude:{type:["text","file","link","link-multi","fileprop","image"],fn:(e,r)=>!Ed(e,r),valueType:"text"},is:{type:["text","file","link","context","fileprop"],fn:(e,r)=>jl(e,r),valueType:"text"},isNot:{type:["text","file","link","context","fileprop"],fn:(e,r)=>!jl(e,r),valueType:"text"},equal:{type:["number"],fn:(e,r)=>jl(e,r),valueType:"number"},isGreatThan:{type:["number"],fn:(e,r)=>Cd(e,r),valueType:"number"},isLessThan:{type:["number"],fn:(e,r)=>Md(e,r),valueType:"number"},isLessThanOrEqual:{type:["number"],fn:(e,r)=>!Cd(e,r),valueType:"number"},isGreatThanOrEqual:{type:["number"],fn:(e,r)=>!Md(e,r),valueType:"number"},dateBefore:{type:["date","fileprop"],fn:(e,r)=>Rx(e,r),valueType:"date"},dateAfter:{type:["date","fileprop"],fn:(e,r)=>kx(e,r),valueType:"date"},isSameDate:{type:["date"],fn:(e,r)=>Lx(e,r),valueType:"date"},isSameDateAsToday:{type:["date"],fn:(e,r)=>qx(e,r),valueType:"none"},isAnyInList:{type:["option","context","option-multi","context-multi","tags-multi","tags"],fn:(e,r)=>_d(e,r),valueType:"list"},isNoneInList:{type:["option","context","option-multi","context-multi","tags-multi","tags"],fn:(e,r)=>!_d(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 ik=(e,r)=>r.reduce((n,i)=>{let[a,s]=n,l=i.type=="path"?zx(s,i):i.type=="frontmatter"?Ux(s,i):Wx(s,i),f=s.filter(o=>!l.includes(o));return[[...a,...l],f]},[[],e])[0],ak=(e,r)=>r.reduce((t,n)=>n.type=="path"?zx(t,n):n.type=="frontmatter"?Ux(t,n):Wx(t,n),e),Ux=(e,r)=>e.filter(t=>{let n=t.metadata?.property;if(!n||!n[r.field])return!1;let i=hf[r.fn],a=!0;return i&&(a=i.fn(Kl(r.field,n[r.field]),r.value)),a}),zx=(e,r)=>e.filter(t=>{let n="";r.field=="outlinks"?n=Jo(t.outlinks??[]):r.field=="inlinks"?n=Jo(t.inlinks??[]):r.field=="tags"&&(n=Jo(t.tags??[]));let i=hf[r.fn],a=!0;return i&&(a=i.fn(n,r.value)),a}),Wx=(e,r)=>e.filter(t=>{let n=hf[r.fn],i=!0;return n&&(i=n.fn(t.metadata?.[r.type]?.[r.field],r.value)),i}),Td=(e,r)=>e.reduce((n,i)=>!n||i.filters.length==0?!1:i.type=="any"?ik([r],i.filters).length>0:ak([r],i.filters).length>0,!0);var Yx=ci(Vx()),Od=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",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)",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"},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",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 Smart Search",addItem:"Add Item",addProperty:"Add 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",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:"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:"Smart Search",filesAndFolders:"Files and Folders"},labels:{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",renameSectionSmart:"Edit Smart Space",renameSection:"Edit Space",createSectionSmart:"New Smart 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",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",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."},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"},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=Yx.default.locale();["en"].includes(r)&&(this.lang=r)}get texts(){return this.all.en}},Vr=new Od().texts;var Hx=(e,r)=>r==fo?Vs.find(t=>t.type=="file"):r=="tags"?Vs.find(t=>t.type=="tags"):r=="aliases"?Vs.find(t=>t.type=="option-multi"):r=="sticker"?Vs.find(t=>e=="icon"):Vs.find(t=>e==t.type)||Vs.find(t=>e==t.multiType),Vs=[{type:"unknown",label:"",restricted:!0,icon:"ui//file-question"},{type:"text",label:Vr.properties.text.label,metadata:!0,icon:"ui//text",description:Vr.properties.text.description},{type:"number",label:Vr.properties.number.label,metadata:!0,icon:"ui//binary",configKeys:["unit"],description:Vr.properties.number.description},{type:"boolean",label:Vr.properties.boolean.label,metadata:!0,icon:"ui//check-square",description:Vr.properties.boolean.description},{type:"date",label:Vr.properties.date.label,metadata:!0,icon:"ui//calendar",configKeys:["format"],description:Vr.properties.date.description},{type:"option",label:Vr.properties.option.label,multi:!0,multiType:"option-multi",icon:"ui//list",configKeys:["options"],description:Vr.properties.option.description},{type:"tags",label:Vr.properties.tags.label,icon:"ui//tags",description:Vr.properties.tags.description},{type:"file",label:Vr.properties.file.label,restricted:!0,icon:"ui//mk-make-h3"},{type:"fileprop",label:Vr.properties.fileProperty.label,icon:"ui//formula",configKeys:["field","value"],description:Vr.properties.fileProperty.description},{type:"link",label:Vr.properties.link.label,multi:!0,multiType:"link-multi",metadata:!0,icon:"ui//file-text",description:Vr.properties.link.description},{type:"context",label:Vr.properties.context.label,icon:"ui//mk-make-note",multi:!0,multiType:"context-multi",configKeys:["space"],description:Vr.properties.context.description},{type:"object",label:Vr.properties.object.label,multi:!0,multiType:"object-multi",metadata:!0,icon:"ui//list-tree",configKeys:["type"],description:Vr.properties.object.description},{type:"icon",label:Vr.properties.icon.label,multi:!0,multiType:"icon-multi",icon:"ui//gem",description:Vr.properties.icon.description},{type:"image",label:Vr.properties.image.label,multi:!0,multiType:"image-multi",metadata:!0,icon:"ui//mk-make-image",description:Vr.properties.image.description},{type:"color",label:Vr.properties.color.label,icon:"ui//mk-make-image",description:Vr.properties.color.description},{type:"space",label:Vr.properties.space.label,icon:"ui//layout-grid",restricted:!0,description:Vr.properties.space.description},{type:"table",label:Vr.properties.space.label,icon:"ui//layout-grid",restricted:!0,description:Vr.properties.space.description},{type:"super",label:Vr.properties.super.label,icon:"ui//zap",restricted:!0,configKeys:["dynamic","field"]},{type:"input",label:Vr.properties.super.label,icon:"ui//input",restricted:!0}];var Ys="files",tc={id:Ys,name:"Files",type:"db",primary:"true"},ok="filesView",sk={id:ok,name:"All",type:"view",def:JSON.stringify({db:Ys,icon:"ui//file-stack"})},uk="main",fk=e=>({id:e,name:e,type:"frame",def:"",predicate:"",primary:"true"}),M$={uniques:[],cols:["id","name","type","def","predicate","primary"],rows:[fk(uk),sk]},ec={uniques:[],cols:["id","name","type","def","predicate","primary"],rows:[tc]},Gx={uniques:["name,schemaId"],cols:["name","schemaId","type","value","attrs","hidden","unique","primary"]},rc={...Gx,rows:[{name:fo,schemaId:Ys,type:"file",primary:"true",hidden:"",unique:"",attrs:"",value:""},{name:Vr.properties.fileProperty.createdTime,schemaId:Ys,type:"fileprop",value:fo+".ctime",hidden:"",unique:"",attrs:"",primary:"true"}]};var _$=[{name:Vr.properties.defaultField,schemaId:"",type:"text",primary:"true"}],Bd={...Gx,rows:[{name:fo,schemaId:Ys,type:"file",primary:"true",hidden:"",unique:"",attrs:"",value:""}]};var T$={schema:tc,cols:rc.rows,rows:[]},F$={schema:tc,cols:rc.rows,rows:[]},O$={schema:tc,cols:Bd.rows,rows:[]},$x=(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 B$={m_schema:ec,m_fields:rc,...$x(rc.rows,ec.rows)},I$={m_schema:ec,m_fields:Bd,...$x(Bd.rows,ec.rows)};var ck=(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 Zx=({field:e,value:r})=>r=="ctime"?{value:\`parseDate(prop('\${e}')['metadata']['file']['\${r}'])\`}:{value:\`prop('\${e}')['metadata']['file']['\${r}']\`},Id=(e,r,t,n)=>{let i=Xl(e);if(i)return r=="fileprop"&&i.field?Zx(i):(r=="option"&&i.source?.length>0&&(i.source=="$commands"?i.options=t.cli.allCommands():i.source=="$links"?i.options=t.spaceManager.allPaths().map(a=>({name:a,value:a})):i.source=="$super"&&(i.options=ck(t,n))),[...Hx(r).configKeys??[],"alias","default"].reduce((a,s)=>({...a,[s]:i[s]}),{}));if(!r)return{};if(!i)if(r=="context")e?.length>0?i={space:e}:i={};else if(r.startsWith("date"))e?.length>0?i={format:e}:i={};else if(r.startsWith("fileprop"))if(e?.length>0){let[a,s]=e.split(".");i=Zx({field:a,value:s})}else i={};else r.startsWith("option")&&(e?.length>0?i={options:Ui(e).map(s=>({name:s,value:s}))}:i={});return i??{}};function Mt(){return Mt=Object.assign?Object.assign.bind():function(e){for(var r=1;re[r])}var jx=["Matrix","Array"],ey=["number","BigNumber","Fraction"];function ty(e,r){function t(n){if(n){var i=$s(e,tr);ry(n,"matrix",jx),ry(n,"number",ey),Pd(e,n);var a=$s(e,tr),s=$s(n,tr);return r("config",a,i,s),a}else return $s(e,tr)}return t.MATRIX_OPTIONS=jx,t.NUMBER_OPTIONS=ey,Object.keys(nc).forEach(n=>{Object.defineProperty(t,n,{get:()=>e[n],enumerable:!0,configurable:!0})}),t}function pk(e,r){return e.indexOf(r)!==-1}function ry(e,r,t){e[r]!==void 0&&!pk(t,e[r])&&console.warn('Warning: Unknown value "'+e[r]+'" for configuration option "'+r+'". Available options: '+t.map(n=>JSON.stringify(n)).join(", ")+".")}var _g={};s8(_g,{createAbs:()=>nb,createAccessorNode:()=>A2,createAcos:()=>rN,createAcosh:()=>nN,createAcot:()=>aN,createAcoth:()=>sN,createAcsc:()=>fN,createAcsch:()=>cN,createAdd:()=>h2,createAddScalar:()=>ob,createAnd:()=>np,createAndTransform:()=>zO,createApply:()=>ou,createApplyTransform:()=>hO,createArg:()=>sw,createArrayNode:()=>E2,createAsec:()=>mN,createAsech:()=>dN,createAsin:()=>gN,createAsinh:()=>xN,createAssignmentNode:()=>_2,createAtan:()=>yN,createAtan2:()=>wN,createAtanh:()=>SN,createAtomicMass:()=>$3,createAvogadro:()=>Z3,createBellNumbers:()=>CF,createBigNumberClass:()=>Xy,createBignumber:()=>q1,createBin:()=>ED,createBitAnd:()=>Yc,createBitAndTransform:()=>VO,createBitNot:()=>tw,createBitOr:()=>Hc,createBitOrTransform:()=>YO,createBitXor:()=>aw,createBlockNode:()=>T2,createBohrMagneton:()=>C3,createBohrRadius:()=>B3,createBoltzmann:()=>Q3,createBoolean:()=>L1,createCatalan:()=>_F,createCbrt:()=>lb,createCeil:()=>cb,createChain:()=>rT,createChainClass:()=>AA,createClassicalElectronRadius:()=>I3,createClone:()=>u1,createColumn:()=>Zc,createColumnTransform:()=>dO,createCombinations:()=>LT,createCombinationsWithRep:()=>zT,createCompare:()=>dS,createCompareNatural:()=>yS,createCompareText:()=>wS,createCompile:()=>X2,createComplex:()=>U1,createComplexClass:()=>jy,createComposition:()=>FF,createConcat:()=>$c,createConcatTransform:()=>MO,createConditionalNode:()=>F2,createConductanceQuantum:()=>M3,createConj:()=>fw,createConstantNode:()=>R2,createCorr:()=>PT,createCos:()=>AN,createCosh:()=>CN,createCot:()=>_N,createCoth:()=>FN,createCoulomb:()=>A3,createCount:()=>Dw,createCreateUnit:()=>jS,createCross:()=>Nw,createCsc:()=>BN,createCsch:()=>PN,createCtranspose:()=>sD,createCube:()=>mb,createCumSum:()=>Lp,createCumSumTransform:()=>kO,createDeepEqual:()=>TS,createDenseMatrixClass:()=>o1,createDerivative:()=>VF,createDet:()=>nT,createDeuteronMass:()=>U3,createDiag:()=>Ew,createDiff:()=>Qc,createDiffTransform:()=>TO,createDistance:()=>ST,createDivide:()=>wT,createDivideScalar:()=>qD,createDot:()=>b2,createDotDivide:()=>jD,createDotMultiply:()=>Zb,createDotPow:()=>JD,createE:()=>o3,createEfimovFactor:()=>G3,createEigs:()=>lT,createElectricConstant:()=>S3,createElectronMass:()=>P3,createElementaryCharge:()=>E3,createEqual:()=>DS,createEqualScalar:()=>O1,createEqualText:()=>NS,createErf:()=>vD,createEvaluate:()=>K2,createExp:()=>db,createExpm:()=>pT,createExpm1:()=>gb,createFactorial:()=>$T,createFalse:()=>e3,createFaraday:()=>X3,createFermiCoupling:()=>k3,createFft:()=>cD,createFibonacciHeapClass:()=>zS,createFilter:()=>Mw,createFilterTransform:()=>gO,createFineStructure:()=>R3,createFirstRadiation:()=>J3,createFix:()=>xb,createFlatten:()=>Tw,createFloor:()=>Uc,createForEach:()=>Ow,createForEachTransform:()=>xO,createFormat:()=>ND,createFraction:()=>z1,createFractionClass:()=>t1,createFreqz:()=>QF,createFunctionAssignmentNode:()=>L2,createFunctionNode:()=>G2,createGamma:()=>VT,createGasConstant:()=>j3,createGcd:()=>Nb,createGetMatrixDataType:()=>Iw,createGravitationConstant:()=>y3,createGravity:()=>uO,createHartreeEnergy:()=>L3,createHasNumericValue:()=>D1,createHelp:()=>j_,createHelpClass:()=>NA,createHex:()=>TD,createHypot:()=>v2,createI:()=>h3,createIdentity:()=>kw,createIfft:()=>mD,createIm:()=>cw,createImmutableDenseMatrixClass:()=>LS,createIndex:()=>S2,createIndexClass:()=>US,createIndexNode:()=>q2,createIndexTransform:()=>yO,createInfinity:()=>t3,createIntersect:()=>NT,createInv:()=>aT,createInverseConductanceQuantum:()=>_3,createInvmod:()=>Gb,createIsInteger:()=>l1,createIsNaN:()=>M1,createIsNegative:()=>x1,createIsNumeric:()=>b1,createIsPositive:()=>N1,createIsPrime:()=>kD,createIsZero:()=>E1,createKldivergence:()=>QT,createKlitzing:()=>O3,createKron:()=>Lw,createLN10:()=>f3,createLN2:()=>u3,createLOG10E:()=>c3,createLOG2E:()=>l3,createLarger:()=>CS,createLargerEq:()=>MS,createLcm:()=>Eb,createLeafCount:()=>BF,createLeftShift:()=>fS,createLgamma:()=>HT,createLog:()=>HD,createLog10:()=>Mb,createLog1p:()=>$D,createLog2:()=>Tb,createLoschmidt:()=>K3,createLsolve:()=>rS,createLsolveAll:()=>aS,createLup:()=>nA,createLusolve:()=>wA,createLyap:()=>bT,createMad:()=>TT,createMagneticConstant:()=>D3,createMagneticFluxQuantum:()=>T3,createMap:()=>Uw,createMapTransform:()=>wO,createMatrix:()=>V1,createMatrixClass:()=>i1,createMatrixFromColumns:()=>Q1,createMatrixFromFunction:()=>H1,createMatrixFromRows:()=>$1,createMax:()=>cp,createMaxTransform:()=>DO,createMean:()=>qp,createMeanTransform:()=>SO,createMedian:()=>MT,createMin:()=>pp,createMinTransform:()=>NO,createMod:()=>zc,createMode:()=>bD,createMolarMass:()=>oO,createMolarMassC12:()=>sO,createMolarPlanckConstant:()=>eO,createMolarVolume:()=>rO,createMultinomial:()=>JT,createMultiply:()=>Bb,createMultiplyScalar:()=>Fb,createNaN:()=>n3,createNeutronMass:()=>z3,createNode:()=>N2,createNorm:()=>x2,createNot:()=>dw,createNthRoot:()=>Pb,createNthRoots:()=>QD,createNuclearMagneton:()=>F3,createNull:()=>r3,createNumber:()=>I1,createNumeric:()=>RD,createObjectNode:()=>U2,createOct:()=>MD,createOnes:()=>Ww,createOperatorNode:()=>z2,createOr:()=>Gc,createOrTransform:()=>WO,createParenthesisNode:()=>W2,createParse:()=>Z2,createParser:()=>rA,createParserClass:()=>j2,createPartitionSelect:()=>BS,createPermutations:()=>eF,createPhi:()=>s3,createPi:()=>i3,createPickRandom:()=>yF,createPinv:()=>sT,createPlanckCharge:()=>pO,createPlanckConstant:()=>b3,createPlanckLength:()=>fO,createPlanckMass:()=>lO,createPlanckTemperature:()=>mO,createPlanckTime:()=>cO,createPolynomialRoot:()=>SA,createPow:()=>zD,createPrint:()=>tp,createPrintTransform:()=>UO,createProd:()=>DD,createProtonMass:()=>q3,createQr:()=>aA,createQuantileSeq:()=>zp,createQuantileSeqTransform:()=>IO,createQuantumOfCirculation:()=>W3,createRandom:()=>wF,createRandomInt:()=>SF,createRange:()=>Kc,createRangeClass:()=>n1,createRangeNode:()=>V2,createRangeTransform:()=>AO,createRationalize:()=>HF,createRe:()=>mw,createReducedPlanckConstant:()=>w3,createRelationalNode:()=>Y2,createReplacer:()=>JF,createReshape:()=>Hw,createResize:()=>Gw,createResolve:()=>qF,createResultSet:()=>Py,createReviver:()=>XF,createRightArithShift:()=>cS,createRightLogShift:()=>mS,createRotate:()=>Zw,createRotationMatrix:()=>Xw,createRound:()=>VD,createRow:()=>jc,createRowTransform:()=>EO,createRydberg:()=>V3,createSQRT1_2:()=>p3,createSQRT2:()=>m3,createSackurTetrode:()=>tO,createSchur:()=>xT,createSec:()=>RN,createSech:()=>qN,createSecondRadiation:()=>nO,createSetCartesian:()=>ZN,createSetDifference:()=>XN,createSetDistinct:()=>KN,createSetIntersect:()=>e2,createSetIsSubset:()=>t2,createSetMultiplicity:()=>i2,createSetPowerset:()=>o2,createSetSize:()=>u2,createSetSymDifference:()=>l2,createSetUnion:()=>p2,createSign:()=>Rb,createSimplify:()=>PF,createSimplifyConstant:()=>kF,createSimplifyCore:()=>LF,createSin:()=>zN,createSinh:()=>VN,createSize:()=>jw,createSlu:()=>yA,createSmaller:()=>AS,createSmallerEq:()=>ES,createSolveODE:()=>dD,createSort:()=>PS,createSpaClass:()=>WS,createSparse:()=>JS,createSparseMatrixClass:()=>B1,createSpeedOfLight:()=>x3,createSplitUnit:()=>J1,createSqrt:()=>Lb,createSqrtm:()=>hT,createSquare:()=>Ub,createSqueeze:()=>rD,createStd:()=>Wp,createStdTransform:()=>FO,createStefanBoltzmann:()=>iO,createStirlingS2:()=>AF,createString:()=>k1,createSubset:()=>ep,createSubsetTransform:()=>CO,createSubtract:()=>Wb,createSubtractScalar:()=>ub,createSum:()=>kp,createSumTransform:()=>BO,createSylvester:()=>vT,createSymbolNode:()=>H2,createSymbolicEqual:()=>zF,createTan:()=>HN,createTanh:()=>GN,createTau:()=>a3,createThomsonCrossSection:()=>Y3,createTo:()=>ID,createTrace:()=>w2,createTranspose:()=>aD,createTrue:()=>jF,createTypeOf:()=>T1,createTyped:()=>Iy,createUnaryMinus:()=>j1,createUnaryPlus:()=>rb,createUnequal:()=>FS,createUnitClass:()=>$S,createUnitFunction:()=>QS,createUppercaseE:()=>v3,createUppercasePi:()=>d3,createUsolve:()=>nS,createUsolveAll:()=>sS,createVacuumImpedance:()=>N3,createVariance:()=>Up,createVarianceTransform:()=>LO,createVersion:()=>g3,createWeakMixingAngle:()=>H3,createWienDisplacement:()=>aO,createXgcd:()=>Yb,createXor:()=>xw,createZeros:()=>fD,createZeta:()=>xD,createZpk2tf:()=>$F});var jd=ci(gc(),1);function He(e){return typeof e=="boolean"?!0:isFinite(e)?e===Math.round(e):!1}var hi=Math.sign||function(e){return e>0?1:e<0?-1:0},ay=Math.log2||function(r){return Math.log(r)/Math.LN2},oy=Math.log10||function(r){return Math.log(r)/Math.LN10},xc=Math.log1p||function(e){return Math.log(e+1)},sy=Math.cbrt||function(r){if(r===0)return r;var t=r<0,n;return t&&(r=-r),isFinite(r)?(n=Math.exp(Math.log(r)/3),n=(r/(n*n)+2*n)/3):n=r,t?-n:n},uy=Math.expm1||function(r){return r>=2e-4||r<=-2e-4?Math.exp(r)-1:r+r*r/2+r*r*r/6};function qd(e,r,t){var n={2:"0b",8:"0o",16:"0x"},i=n[r],a="";if(t){if(t<1)throw new Error("size must be in greater than 0");if(!He(t))throw new Error("size must be an integer");if(e>2**(t-1)-1||e<-(2**(t-1)))throw new Error("Value must be in range [-2^".concat(t-1,", 2^").concat(t-1,"-1]"));if(!He(e))throw new Error("Value must be an integer");e<0&&(e=e+2**t),a="i".concat(t)}var s="";return e<0&&(e=-e,s="-"),"".concat(s).concat(i).concat(e.toString(r)).concat(a)}function Wi(e,r){if(typeof r=="function")return r(e);if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var{notation:t,precision:n,wordSize:i}=Ud(r);switch(t){case"fixed":return zd(e,n);case"exponential":return fy(e,n);case"engineering":return mk(e,n);case"bin":return qd(e,2,i);case"oct":return qd(e,8,i);case"hex":return qd(e,16,i);case"auto":return hk(e,n,r).replace(/((\\.\\d*?)(0+))($|e)/,function(){var a=arguments[2],s=arguments[4];return a!=="."?a+s:s});default:throw new Error('Unknown notation "'+t+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function Ud(e){var r="auto",t,n;if(e!==void 0)if(ar(e))t=e;else if(je(e))t=e.toNumber();else if(fa(e))e.precision!==void 0&&(t=ny(e.precision,()=>{throw new Error('Option "precision" must be a number or BigNumber')})),e.wordSize!==void 0&&(n=ny(e.wordSize,()=>{throw new Error('Option "wordSize" must be a number or BigNumber')})),e.notation&&(r=e.notation);else throw new Error("Unsupported type of options, number, BigNumber, or object expected");return{notation:r,precision:t,wordSize:n}}function Xs(e){var r=String(e).toLowerCase().match(/^(-?)(\\d+\\.?\\d*)(e([+-]?\\d+))?$/);if(!r)throw new SyntaxError("Invalid number "+e);var t=r[1],n=r[2],i=parseFloat(r[4]||"0"),a=n.indexOf(".");i+=a!==-1?a-1:n.length-1;var s=n.replace(".","").replace(/^0*/,function(l){return i-=l.length,""}).replace(/0*$/,"").split("").map(function(l){return parseInt(l)});return s.length===0&&(s.push(0),i++),{sign:t,coefficients:s,exponent:i}}function mk(e,r){if(isNaN(e)||!isFinite(e))return String(e);var t=Xs(e),n=yc(t,r),i=n.exponent,a=n.coefficients,s=i%3===0?i:i<0?i-3-i%3:i-i%3;if(ar(r))for(;r>a.length||i-s+1>a.length;)a.push(0);else for(var l=Math.abs(i-s)-(a.length-1),f=0;f0;)u++,o--;var p=a.slice(u).join(""),h=ar(r)&&p.length||p.match(/[1-9]/)?"."+p:"",d=a.slice(0,u).join("")+h+"e"+(i>=0?"+":"")+s.toString();return n.sign+d}function zd(e,r){if(isNaN(e)||!isFinite(e))return String(e);var t=Xs(e),n=typeof r=="number"?yc(t,t.exponent+1+r):t,i=n.coefficients,a=n.exponent+1,s=a+(r||0);return i.length0?"."+i.join(""):"")+"e"+(a>=0?"+":"")+a}function hk(e,r,t){if(isNaN(e)||!isFinite(e))return String(e);var n=iy(t?.lowerExp,-3),i=iy(t?.upperExp,5),a=Xs(e),s=r?yc(a,r):a;if(s.exponent=i)return fy(e,r);var l=s.coefficients,f=s.exponent;l.length0?f:0;return or){var i=n.splice(r,n.length-r);if(i[0]>=5){var a=r-1;for(n[a]++;n[a]===10;)n.pop(),a===0&&(n.unshift(0),t.exponent++,a++),a--,n[a]++}}return t}function Qs(e){for(var r=[],t=0;t0?!0:e<0?!1:1/e===1/0,n=r>0?!0:r<0?!1:1/r===1/0;return t^n?-e:e}function ny(e,r){if(ar(e))return e;if(je(e))return e.toNumber();r()}function iy(e,r){return ar(e)?e:je(e)?e.toNumber():r}function Wd(e,r,t){var n=e.constructor,i=new n(2),a="";if(t){if(t<1)throw new Error("size must be in greater than 0");if(!He(t))throw new Error("size must be an integer");if(e.greaterThan(i.pow(t-1).sub(1))||e.lessThan(i.pow(t-1).mul(-1)))throw new Error("Value must be in range [-2^".concat(t-1,", 2^").concat(t-1,"-1]"));if(!e.isInteger())throw new Error("Value must be an integer");e.lessThan(0)&&(e=e.add(i.pow(t))),a="i".concat(t)}switch(r){case 2:return"".concat(e.toBinary()).concat(a);case 8:return"".concat(e.toOctal()).concat(a);case 16:return"".concat(e.toHexadecimal()).concat(a);default:throw new Error("Base ".concat(r," not supported "))}}function xy(e,r){if(typeof r=="function")return r(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var{notation:t,precision:n,wordSize:i}=Ud(r);switch(t){case"fixed":return gk(e,n);case"exponential":return vy(e,n);case"engineering":return vk(e,n);case"bin":return Wd(e,2,i);case"oct":return Wd(e,8,i);case"hex":return Wd(e,16,i);case"auto":{var a=gy(r?.lowerExp,-3),s=gy(r?.upperExp,5);if(e.isZero())return"0";var l,f=e.toSignificantDigits(n),o=f.e;return o>=a&&o=0?"+":"")+n.toString()}function vy(e,r){return r!==void 0?e.toExponential(r-1):e.toExponential()}function gk(e,r){return e.toFixed(r)}function gy(e,r){return ar(e)?e:je(e)?e.toNumber():r}function by(e,r){var t=e.length-r.length,n=e.length;return e.substring(t,n)===r}function lr(e,r){var t=xk(e,r);return r&&typeof r=="object"&&"truncate"in r&&t.length>r.truncate?t.substring(0,r.truncate-3)+"...":t}function xk(e,r){if(typeof e=="number")return Wi(e,r);if(je(e))return xy(e,r);if(yk(e))return!r||r.fraction!=="decimal"?e.s*e.n+"/"+e.d:e.toString();if(Array.isArray(e))return wy(e,r);if(yt(e))return Ko(e);if(typeof e=="function")return e.syntax?String(e.syntax):"function";if(e&&typeof e=="object"){if(typeof e.format=="function")return e.format(r);if(e&&e.toString(r)!=={}.toString())return e.toString(r);var t=Object.keys(e).map(n=>Ko(n)+": "+lr(e[n],r));return"{"+t.join(", ")+"}"}return String(e)}function Ko(e){for(var r=String(e),t="",n=0;n/g,">"),r}function wy(e,r){if(Array.isArray(e)){for(var t="[",n=e.length,i=0;ir?1:-1}function pr(e,r,t){if(!(this instanceof pr))throw new SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=r,this.relation=t,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(r)?"["+r.join(", ")+"]":r)+")",this.stack=new Error().stack}pr.prototype=new RangeError;pr.prototype.constructor=RangeError;pr.prototype.name="DimensionError";pr.prototype.isDimensionError=!0;function Xt(e,r,t){if(!(this instanceof Xt))throw new SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=r):(this.min=r,this.max=t),this.min!==void 0&&this.index=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=new Error().stack}Xt.prototype=new RangeError;Xt.prototype.constructor=RangeError;Xt.prototype.name="IndexError";Xt.prototype.isIndexError=!0;function or(e){for(var r=[];Array.isArray(e);)r.push(e.length),e=e[0];return r}function Dy(e,r,t){var n,i=e.length;if(i!==r[t])throw new pr(i,r[t]);if(t")}function Yd(e,r){var t=r.length===0;if(t){if(Array.isArray(e))throw new pr(e.length,0)}else Dy(e,r,0)}function vf(e,r){var t=e.isMatrix?e._size:or(e),n=r._sourceSize;n.forEach((i,a)=>{if(i!==null&&i!==t[a])throw new pr(i,t[a])})}function Xr(e,r){if(e!==void 0){if(!ar(e)||!He(e))throw new TypeError("Index must be an integer (value: "+e+")");if(e<0||typeof r=="number"&&e>=r)throw new Xt(e,r)}}function jo(e){for(var r=0;r=0,f=r%t===0;if(l)if(f)n[a]=-r/t;else throw new Error("Could not replace wildcard, since "+r+" is no multiple of "+-t);return n}function Sy(e){return e.reduce((r,t)=>r*t,1)}function bk(e,r){for(var t=e,n,i=r.length-1;i>0;i--){var a=r[i];n=[];for(var s=t.length/a,l=0;lr.test(t))}function Hd(e,r){return Array.prototype.join.call(e,r)}function Pa(e){if(!Array.isArray(e))throw new TypeError("Array input expected");if(e.length===0)return e;var r=[],t=0;r[0]={value:e[0],identifier:0};for(var n=1;n1)return e.slice(1).reduce(function(t,n){return Ey(t,n,r,0)},e[0]);throw new Error("Wrong number of arguments in function concat")}function wk(){for(var e=arguments.length,r=new Array(e),t=0;th.length),i=Math.max(...n),a=new Array(i).fill(null),s=0;sa[u]&&(a[u]=l[o])}for(var p=0;p1||e[i]>r[a])throw new Error("shape missmatch: missmatch is found in arg with shape (".concat(e,") not possible to broadcast dimension ").concat(n," with size ").concat(e[i]," to size ").concat(r[a]))}}function Zd(e,r){var t=or(e);if(zi(t,r))return e;yf(t,r);var n=wk(t,r),i=n.length,a=[...Array(i-t.length).fill(1),...t],s=Sk(e);t.length!Ak(a)).every(a=>t[a]!==void 0);if(!n){var i=r.filter(a=>t[a]===void 0);throw new Error('Cannot create function "'.concat(e,'", ')+"some dependencies are missing: ".concat(i.map(a=>'"'.concat(a,'"')).join(", "),"."))}}function Ak(e){return e&&e[0]==="?"}function Qd(e){return e&&e[0]==="?"?e.slice(1):e}function gt(e,r){if(Ty(e)&&My(e,r))return e[r];throw typeof e[r]=="function"&&Ac(e,r)?new Error('Cannot access method "'+r+'" as a property'):new Error('No access to property "'+r+'"')}function ca(e,r,t){if(Ty(e)&&My(e,r))return e[r]=t,t;throw new Error('No access to property "'+r+'"')}function Cy(e,r){return r in e}function My(e,r){return!e||typeof e!="object"?!1:$e(Ek,r)?!0:!(r in Object.prototype||r in Function.prototype)}function _y(e,r){if(!Ac(e,r))throw new Error('No access to method "'+r+'"');return e[r]}function Ac(e,r){return e==null||typeof e[r]!="function"||$e(e,r)&&Object.getPrototypeOf&&r in Object.getPrototypeOf(e)?!1:$e(Ck,r)?!0:!(r in Object.prototype||r in Function.prototype)}function Ty(e){return typeof e=="object"&&e&&e.constructor===Object}var Ek={length:!0,name:!0},Ck={toString:!0,valueOf:!0,toLocaleString:!0};var rs=class{constructor(r){this.wrappedObject=r,this[Symbol.iterator]=this.entries}keys(){return Object.keys(this.wrappedObject).values()}get(r){return gt(this.wrappedObject,r)}set(r,t){return ca(this.wrappedObject,r,t),this}has(r){return Cy(this.wrappedObject,r)}entries(){return Fy(this.keys(),r=>[r,this.get(r)])}forEach(r){for(var t of this.keys())r(this.get(t),t,this)}delete(r){delete this.wrappedObject[r]}clear(){for(var r of this.keys())this.delete(r)}get size(){return Object.keys(this.wrappedObject).length}},eu=class{constructor(r,t,n){this.a=r,this.b=t,this.bKeys=n,this[Symbol.iterator]=this.entries}get(r){return this.bKeys.has(r)?this.b.get(r):this.a.get(r)}set(r,t){return this.bKeys.has(r)?this.b.set(r,t):this.a.set(r,t),this}has(r){return this.b.has(r)||this.a.has(r)}keys(){return new Set([...this.a.keys(),...this.b.keys()])[Symbol.iterator]()}entries(){return Fy(this.keys(),r=>[r,this.get(r)])}forEach(r){for(var t of this.keys())r(this.get(t),t,this)}delete(r){return this.bKeys.has(r)?this.b.delete(r):this.a.delete(r)}clear(){this.a.clear(),this.b.clear()}get size(){return[...this.keys()].length}};function Fy(e,r){return{next:()=>{var t=e.next();return t.done?t:{value:r(t.value),done:!1}}}}function go(){return new Map}function ka(e){if(!e)return go();if(Xd(e))return e;if(fa(e))return new rs(e);throw new Error("createMap can create maps from objects or Maps")}function Oy(e){if(e instanceof rs)return e.wrappedObject;var r={};for(var t of e.keys()){var n=e.get(t);ca(r,t,n)}return r}function Xd(e){return e?e instanceof Map||e instanceof rs||typeof e.set=="function"&&typeof e.get=="function"&&typeof e.keys=="function"&&typeof e.has=="function":!1}var By=function(){return By=jd.default.create,jd.default},Mk=["?BigNumber","?Complex","?DenseMatrix","?Fraction"],Iy=T("typed",Mk,function(r){var{BigNumber:t,Complex:n,DenseMatrix:i,Fraction:a}=r,s=By();return s.clear(),s.addTypes([{name:"number",test:ar},{name:"Complex",test:Gt},{name:"BigNumber",test:je},{name:"Fraction",test:Xn},{name:"Unit",test:qt},{name:"identifier",test:l=>yt&&/^(?:[A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u0870-\\u0887\\u0889-\\u088E\\u08A0-\\u08C9\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C5D\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D04-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u1711\\u171F-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4C\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7CA\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7D9\\uA7F2-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]|\\uD800[\\uDC00-\\uDC0B\\uDC0D-\\uDC26\\uDC28-\\uDC3A\\uDC3C\\uDC3D\\uDC3F-\\uDC4D\\uDC50-\\uDC5D\\uDC80-\\uDCFA\\uDE80-\\uDE9C\\uDEA0-\\uDED0\\uDF00-\\uDF1F\\uDF2D-\\uDF40\\uDF42-\\uDF49\\uDF50-\\uDF75\\uDF80-\\uDF9D\\uDFA0-\\uDFC3\\uDFC8-\\uDFCF]|\\uD801[\\uDC00-\\uDC9D\\uDCB0-\\uDCD3\\uDCD8-\\uDCFB\\uDD00-\\uDD27\\uDD30-\\uDD63\\uDD70-\\uDD7A\\uDD7C-\\uDD8A\\uDD8C-\\uDD92\\uDD94\\uDD95\\uDD97-\\uDDA1\\uDDA3-\\uDDB1\\uDDB3-\\uDDB9\\uDDBB\\uDDBC\\uDE00-\\uDF36\\uDF40-\\uDF55\\uDF60-\\uDF67\\uDF80-\\uDF85\\uDF87-\\uDFB0\\uDFB2-\\uDFBA]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC60-\\uDC76\\uDC80-\\uDC9E\\uDCE0-\\uDCF2\\uDCF4\\uDCF5\\uDD00-\\uDD15\\uDD20-\\uDD39\\uDD80-\\uDDB7\\uDDBE\\uDDBF\\uDE00\\uDE10-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE35\\uDE60-\\uDE7C\\uDE80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE4\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2\\uDD00-\\uDD23\\uDE80-\\uDEA9\\uDEB0\\uDEB1\\uDF00-\\uDF1C\\uDF27\\uDF30-\\uDF45\\uDF70-\\uDF81\\uDFB0-\\uDFC4\\uDFE0-\\uDFF6]|\\uD804[\\uDC03-\\uDC37\\uDC71\\uDC72\\uDC75\\uDC83-\\uDCAF\\uDCD0-\\uDCE8\\uDD03-\\uDD26\\uDD44\\uDD47\\uDD50-\\uDD72\\uDD76\\uDD83-\\uDDB2\\uDDC1-\\uDDC4\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDE3F\\uDE40\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEDE\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF50\\uDF5D-\\uDF61]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC5F-\\uDC61\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDEB8\\uDF00-\\uDF1A\\uDF40-\\uDF46]|\\uD806[\\uDC00-\\uDC2B\\uDCA0-\\uDCDF\\uDCFF-\\uDD06\\uDD09\\uDD0C-\\uDD13\\uDD15\\uDD16\\uDD18-\\uDD2F\\uDD3F\\uDD41\\uDDA0-\\uDDA7\\uDDAA-\\uDDD0\\uDDE1\\uDDE3\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE89\\uDE9D\\uDEB0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46\\uDD60-\\uDD65\\uDD67\\uDD68\\uDD6A-\\uDD89\\uDD98\\uDEE0-\\uDEF2\\uDF02\\uDF04-\\uDF10\\uDF12-\\uDF33\\uDFB0]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC80-\\uDD43]|\\uD80B[\\uDF90-\\uDFF0]|[\\uD80C\\uD81C-\\uD820\\uD822\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883\\uD885-\\uD887][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2F\\uDC41-\\uDC46]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE70-\\uDEBE\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE7F\\uDF00-\\uDF4A\\uDF50\\uDF93-\\uDF9F\\uDFE0\\uDFE1\\uDFE3]|\\uD821[\\uDC00-\\uDFF7]|\\uD823[\\uDC00-\\uDCD5\\uDD00-\\uDD08]|\\uD82B[\\uDFF0-\\uDFF3\\uDFF5-\\uDFFB\\uDFFD\\uDFFE]|\\uD82C[\\uDC00-\\uDD22\\uDD32\\uDD50-\\uDD52\\uDD55\\uDD64-\\uDD67\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB]|\\uD837[\\uDF00-\\uDF1E\\uDF25-\\uDF2A]|\\uD838[\\uDC30-\\uDC6D\\uDD00-\\uDD2C\\uDD37-\\uDD3D\\uDD4E\\uDE90-\\uDEAD\\uDEC0-\\uDEEB]|\\uD839[\\uDCD0-\\uDCEB\\uDFE0-\\uDFE6\\uDFE8-\\uDFEB\\uDFED\\uDFEE\\uDFF0-\\uDFFE]|\\uD83A[\\uDC00-\\uDCC4\\uDD00-\\uDD43\\uDD4B]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDEDF\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF39\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A\\uDF50-\\uDFFF]|\\uD888[\\uDC00-\\uDFAF])(?:[0-9A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u0870-\\u0887\\u0889-\\u088E\\u08A0-\\u08C9\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C5D\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D04-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u1711\\u171F-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4C\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7CA\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7D9\\uA7F2-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]|\\uD800[\\uDC00-\\uDC0B\\uDC0D-\\uDC26\\uDC28-\\uDC3A\\uDC3C\\uDC3D\\uDC3F-\\uDC4D\\uDC50-\\uDC5D\\uDC80-\\uDCFA\\uDE80-\\uDE9C\\uDEA0-\\uDED0\\uDF00-\\uDF1F\\uDF2D-\\uDF40\\uDF42-\\uDF49\\uDF50-\\uDF75\\uDF80-\\uDF9D\\uDFA0-\\uDFC3\\uDFC8-\\uDFCF]|\\uD801[\\uDC00-\\uDC9D\\uDCB0-\\uDCD3\\uDCD8-\\uDCFB\\uDD00-\\uDD27\\uDD30-\\uDD63\\uDD70-\\uDD7A\\uDD7C-\\uDD8A\\uDD8C-\\uDD92\\uDD94\\uDD95\\uDD97-\\uDDA1\\uDDA3-\\uDDB1\\uDDB3-\\uDDB9\\uDDBB\\uDDBC\\uDE00-\\uDF36\\uDF40-\\uDF55\\uDF60-\\uDF67\\uDF80-\\uDF85\\uDF87-\\uDFB0\\uDFB2-\\uDFBA]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC60-\\uDC76\\uDC80-\\uDC9E\\uDCE0-\\uDCF2\\uDCF4\\uDCF5\\uDD00-\\uDD15\\uDD20-\\uDD39\\uDD80-\\uDDB7\\uDDBE\\uDDBF\\uDE00\\uDE10-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE35\\uDE60-\\uDE7C\\uDE80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE4\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2\\uDD00-\\uDD23\\uDE80-\\uDEA9\\uDEB0\\uDEB1\\uDF00-\\uDF1C\\uDF27\\uDF30-\\uDF45\\uDF70-\\uDF81\\uDFB0-\\uDFC4\\uDFE0-\\uDFF6]|\\uD804[\\uDC03-\\uDC37\\uDC71\\uDC72\\uDC75\\uDC83-\\uDCAF\\uDCD0-\\uDCE8\\uDD03-\\uDD26\\uDD44\\uDD47\\uDD50-\\uDD72\\uDD76\\uDD83-\\uDDB2\\uDDC1-\\uDDC4\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDE3F\\uDE40\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEDE\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF50\\uDF5D-\\uDF61]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC5F-\\uDC61\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDEB8\\uDF00-\\uDF1A\\uDF40-\\uDF46]|\\uD806[\\uDC00-\\uDC2B\\uDCA0-\\uDCDF\\uDCFF-\\uDD06\\uDD09\\uDD0C-\\uDD13\\uDD15\\uDD16\\uDD18-\\uDD2F\\uDD3F\\uDD41\\uDDA0-\\uDDA7\\uDDAA-\\uDDD0\\uDDE1\\uDDE3\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE89\\uDE9D\\uDEB0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46\\uDD60-\\uDD65\\uDD67\\uDD68\\uDD6A-\\uDD89\\uDD98\\uDEE0-\\uDEF2\\uDF02\\uDF04-\\uDF10\\uDF12-\\uDF33\\uDFB0]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC80-\\uDD43]|\\uD80B[\\uDF90-\\uDFF0]|[\\uD80C\\uD81C-\\uD820\\uD822\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883\\uD885-\\uD887][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2F\\uDC41-\\uDC46]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE70-\\uDEBE\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE7F\\uDF00-\\uDF4A\\uDF50\\uDF93-\\uDF9F\\uDFE0\\uDFE1\\uDFE3]|\\uD821[\\uDC00-\\uDFF7]|\\uD823[\\uDC00-\\uDCD5\\uDD00-\\uDD08]|\\uD82B[\\uDFF0-\\uDFF3\\uDFF5-\\uDFFB\\uDFFD\\uDFFE]|\\uD82C[\\uDC00-\\uDD22\\uDD32\\uDD50-\\uDD52\\uDD55\\uDD64-\\uDD67\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB]|\\uD837[\\uDF00-\\uDF1E\\uDF25-\\uDF2A]|\\uD838[\\uDC30-\\uDC6D\\uDD00-\\uDD2C\\uDD37-\\uDD3D\\uDD4E\\uDE90-\\uDEAD\\uDEC0-\\uDEEB]|\\uD839[\\uDCD0-\\uDCEB\\uDFE0-\\uDFE6\\uDFE8-\\uDFEB\\uDFED\\uDFEE\\uDFF0-\\uDFFE]|\\uD83A[\\uDC00-\\uDCC4\\uDD00-\\uDD43\\uDD4B]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDEDF\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF39\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A\\uDF50-\\uDFFF]|\\uD888[\\uDC00-\\uDFAF])*$/.test(l)},{name:"string",test:yt},{name:"Chain",test:Gs},{name:"Array",test:Ar},{name:"Matrix",test:Ge},{name:"DenseMatrix",test:Ia},{name:"SparseMatrix",test:Jn},{name:"Range",test:mo},{name:"Index",test:ua},{name:"boolean",test:ic},{name:"ResultSet",test:ac},{name:"Help",test:Hs},{name:"function",test:oc},{name:"Date",test:sc},{name:"RegExp",test:uc},{name:"null",test:fc},{name:"undefined",test:lc},{name:"AccessorNode",test:Sn},{name:"ArrayNode",test:$t},{name:"AssignmentNode",test:cc},{name:"BlockNode",test:pc},{name:"ConditionalNode",test:mc},{name:"ConstantNode",test:yr},{name:"FunctionNode",test:fn},{name:"FunctionAssignmentNode",test:mi},{name:"IndexNode",test:kn},{name:"Node",test:Sr},{name:"ObjectNode",test:la},{name:"OperatorNode",test:ut},{name:"ParenthesisNode",test:Zt},{name:"RangeNode",test:hc},{name:"RelationalNode",test:dc},{name:"SymbolNode",test:rt},{name:"Map",test:Xd},{name:"Object",test:fa}]),s.addConversions([{from:"number",to:"BigNumber",convert:function(f){if(t||Jd(f),ly(f)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+f+"). Use function bignumber(x) to convert to BigNumber.");return new t(f)}},{from:"number",to:"Complex",convert:function(f){return n||Ec(f),new n(f,0)}},{from:"BigNumber",to:"Complex",convert:function(f){return n||Ec(f),new n(f.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(f){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(f){return n||Ec(f),new n(f.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(f){a||Kd(f);var o=new a(f);if(o.valueOf()!==f)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+f+"). Use function fraction(x) to convert to Fraction.");return o}},{from:"string",to:"number",convert:function(f){var o=Number(f);if(isNaN(o))throw new Error('Cannot convert "'+f+'" to a number');return o}},{from:"string",to:"BigNumber",convert:function(f){t||Jd(f);try{return new t(f)}catch{throw new Error('Cannot convert "'+f+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(f){a||Kd(f);try{return new a(f)}catch{throw new Error('Cannot convert "'+f+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(f){n||Ec(f);try{return new n(f)}catch{throw new Error('Cannot convert "'+f+'" to Complex')}}},{from:"boolean",to:"number",convert:function(f){return+f}},{from:"boolean",to:"BigNumber",convert:function(f){return t||Jd(f),new t(+f)}},{from:"boolean",to:"Fraction",convert:function(f){return a||Kd(f),new a(+f)}},{from:"boolean",to:"string",convert:function(f){return String(f)}},{from:"Array",to:"Matrix",convert:function(f){return i||_k(),new i(f)}},{from:"Matrix",to:"Array",convert:function(f){return f.valueOf()}}]),s.onMismatch=(l,f,o)=>{var u=s.createError(l,f,o);if(["wrongType","mismatch"].includes(u.data.category)&&f.length===1&&bt(f[0])&&o.some(h=>!h.params.includes(","))){var p=new TypeError("Function '".concat(l,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(l,")'."));throw p.data=u.data,p}throw u},s.onMismatch=(l,f,o)=>{var u=s.createError(l,f,o);if(["wrongType","mismatch"].includes(u.data.category)&&f.length===1&&bt(f[0])&&o.some(h=>!h.params.includes(","))){var p=new TypeError("Function '".concat(l,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(l,")'."));throw p.data=u.data,p}throw u},s});function Jd(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function Ec(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function _k(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function Kd(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}var Tk="ResultSet",Fk=[],Py=T(Tk,Fk,()=>{function e(r){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");this.entries=r||[]}return e.prototype.type="ResultSet",e.prototype.isResultSet=!0,e.prototype.valueOf=function(){return this.entries},e.prototype.toString=function(){return"["+this.entries.join(", ")+"]"},e.prototype.toJSON=function(){return{mathjs:"ResultSet",entries:this.entries}},e.fromJSON=function(r){return new e(r.entries)},e},{isClass:!0});var ru=9e15,wo=1e9,ev="0123456789abcdef",Mc="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",_c="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",rv={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-ru,maxE:ru,crypto:!1},qy,Ra,Er=!0,Fc="[DecimalError] ",bo=Fc+"Invalid argument: ",Uy=Fc+"Precision limit exceeded",zy=Fc+"crypto unavailable",Wy="[object Decimal]",mn=Math.floor,Jt=Math.pow,Ok=/^0b([01]+(\\.[01]*)?|\\.[01]+)(p[+-]?\\d+)?$/i,Bk=/^0x([0-9a-f]+(\\.[0-9a-f]*)?|\\.[0-9a-f]+)(p[+-]?\\d+)?$/i,Ik=/^0o([0-7]+(\\.[0-7]*)?|\\.[0-7]+)(p[+-]?\\d+)?$/i,Vy=/^(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i,Hi=1e7,br=7,Pk=9007199254740991,kk=Mc.length-1,tv=_c.length-1,Ue={toStringTag:Wy};Ue.absoluteValue=Ue.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),dr(e)};Ue.ceil=function(){return dr(new this.constructor(this),this.e+1,2)};Ue.clampedTo=Ue.clamp=function(e,r){var t,n=this,i=n.constructor;if(e=new i(e),r=new i(r),!e.s||!r.s)return new i(NaN);if(e.gt(r))throw Error(bo+r);return t=n.cmp(e),t<0?e:n.cmp(r)>0?r:new i(n)};Ue.comparedTo=Ue.cmp=function(e){var r,t,n,i,a=this,s=a.d,l=(e=new a.constructor(e)).d,f=a.s,o=e.s;if(!s||!l)return!f||!o?NaN:f!==o?f:s===l?0:!s^f<0?1:-1;if(!s[0]||!l[0])return s[0]?f:l[0]?-o:0;if(f!==o)return f;if(a.e!==e.e)return a.e>e.e^f<0?1:-1;for(n=s.length,i=l.length,r=0,t=nl[r]^f<0?1:-1;return n===i?0:n>i^f<0?1:-1};Ue.cosine=Ue.cos=function(){var e,r,t=this,n=t.constructor;return t.d?t.d[0]?(e=n.precision,r=n.rounding,n.precision=e+Math.max(t.e,t.sd())+br,n.rounding=1,t=Rk(n,Zy(n,t)),n.precision=e,n.rounding=r,dr(Ra==2||Ra==3?t.neg():t,e,r,!0)):new n(1):new n(NaN)};Ue.cubeRoot=Ue.cbrt=function(){var e,r,t,n,i,a,s,l,f,o,u=this,p=u.constructor;if(!u.isFinite()||u.isZero())return new p(u);for(Er=!1,a=u.s*Jt(u.s*u,1/3),!a||Math.abs(a)==1/0?(t=ln(u.d),e=u.e,(a=(e-t.length+1)%3)&&(t+=a==1||a==-2?"0":"00"),a=Jt(t,1/3),e=mn((e+1)/3)-(e%3==(e<0?-1:2)),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new p(t),n.s=u.s):n=new p(a.toString()),s=(e=p.precision)+3;;)if(l=n,f=l.times(l).times(l),o=f.plus(u),n=xt(o.plus(u).times(l),o.plus(f),s+2,1),ln(l.d).slice(0,s)===(t=ln(n.d)).slice(0,s))if(t=t.slice(s-3,s+1),t=="9999"||!i&&t=="4999"){if(!i&&(dr(l,e+1,0),l.times(l).times(l).eq(u))){n=l;break}s+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(dr(n,e+1,1),r=!n.times(n).times(n).eq(u));break}return Er=!0,dr(n,e,p.rounding,r)};Ue.decimalPlaces=Ue.dp=function(){var e,r=this.d,t=NaN;if(r){if(e=r.length-1,t=(e-mn(this.e/br))*br,e=r[e],e)for(;e%10==0;e/=10)t--;t<0&&(t=0)}return t};Ue.dividedBy=Ue.div=function(e){return xt(this,new this.constructor(e))};Ue.dividedToIntegerBy=Ue.divToInt=function(e){var r=this,t=r.constructor;return dr(xt(r,new t(e),0,1,1),t.precision,t.rounding)};Ue.equals=Ue.eq=function(e){return this.cmp(e)===0};Ue.floor=function(){return dr(new this.constructor(this),this.e+1,3)};Ue.greaterThan=Ue.gt=function(e){return this.cmp(e)>0};Ue.greaterThanOrEqualTo=Ue.gte=function(e){var r=this.cmp(e);return r==1||r===0};Ue.hyperbolicCosine=Ue.cosh=function(){var e,r,t,n,i,a=this,s=a.constructor,l=new s(1);if(!a.isFinite())return new s(a.s?1/0:NaN);if(a.isZero())return l;t=s.precision,n=s.rounding,s.precision=t+Math.max(a.e,a.sd())+4,s.rounding=1,i=a.d.length,i<32?(e=Math.ceil(i/3),r=(1/Bc(4,e)).toString()):(e=16,r="2.3283064365386962890625e-10"),a=tu(s,1,a.times(r),new s(1),!0);for(var f,o=e,u=new s(8);o--;)f=a.times(a),a=l.minus(f.times(u.minus(f.times(u))));return dr(a,s.precision=t,s.rounding=n,!0)};Ue.hyperbolicSine=Ue.sinh=function(){var e,r,t,n,i=this,a=i.constructor;if(!i.isFinite()||i.isZero())return new a(i);if(r=a.precision,t=a.rounding,a.precision=r+Math.max(i.e,i.sd())+4,a.rounding=1,n=i.d.length,n<3)i=tu(a,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Bc(5,e)),i=tu(a,2,i,i,!0);for(var s,l=new a(5),f=new a(16),o=new a(20);e--;)s=i.times(i),i=i.times(l.plus(s.times(f.times(s).plus(o))))}return a.precision=r,a.rounding=t,dr(i,r,t,!0)};Ue.hyperbolicTangent=Ue.tanh=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+7,n.rounding=1,xt(t.sinh(),t.cosh(),n.precision=e,n.rounding=r)):new n(t.s)};Ue.inverseCosine=Ue.acos=function(){var e,r=this,t=r.constructor,n=r.abs().cmp(1),i=t.precision,a=t.rounding;return n!==-1?n===0?r.isNeg()?Yi(t,i,a):new t(0):new t(NaN):r.isZero()?Yi(t,i+4,a).times(.5):(t.precision=i+6,t.rounding=1,r=r.asin(),e=Yi(t,i+4,a).times(.5),t.precision=i,t.rounding=a,e.minus(r))};Ue.inverseHyperbolicCosine=Ue.acosh=function(){var e,r,t=this,n=t.constructor;return t.lte(1)?new n(t.eq(1)?0:NaN):t.isFinite()?(e=n.precision,r=n.rounding,n.precision=e+Math.max(Math.abs(t.e),t.sd())+4,n.rounding=1,Er=!1,t=t.times(t).minus(1).sqrt().plus(t),Er=!0,n.precision=e,n.rounding=r,t.ln()):new n(t)};Ue.inverseHyperbolicSine=Ue.asinh=function(){var e,r,t=this,n=t.constructor;return!t.isFinite()||t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+2*Math.max(Math.abs(t.e),t.sd())+6,n.rounding=1,Er=!1,t=t.times(t).plus(1).sqrt().plus(t),Er=!0,n.precision=e,n.rounding=r,t.ln())};Ue.inverseHyperbolicTangent=Ue.atanh=function(){var e,r,t,n,i=this,a=i.constructor;return i.isFinite()?i.e>=0?new a(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=a.precision,r=a.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?dr(new a(i),e,r,!0):(a.precision=t=n-i.e,i=xt(i.plus(1),new a(1).minus(i),t+e,1),a.precision=e+4,a.rounding=1,i=i.ln(),a.precision=e,a.rounding=r,i.times(.5))):new a(NaN)};Ue.inverseSine=Ue.asin=function(){var e,r,t,n,i=this,a=i.constructor;return i.isZero()?new a(i):(r=i.abs().cmp(1),t=a.precision,n=a.rounding,r!==-1?r===0?(e=Yi(a,t+4,n).times(.5),e.s=i.s,e):new a(NaN):(a.precision=t+6,a.rounding=1,i=i.div(new a(1).minus(i.times(i)).sqrt().plus(1)).atan(),a.precision=t,a.rounding=n,i.times(2)))};Ue.inverseTangent=Ue.atan=function(){var e,r,t,n,i,a,s,l,f,o=this,u=o.constructor,p=u.precision,h=u.rounding;if(o.isFinite()){if(o.isZero())return new u(o);if(o.abs().eq(1)&&p+4<=tv)return s=Yi(u,p+4,h).times(.25),s.s=o.s,s}else{if(!o.s)return new u(NaN);if(p+4<=tv)return s=Yi(u,p+4,h).times(.5),s.s=o.s,s}for(u.precision=l=p+10,u.rounding=1,t=Math.min(28,l/br+2|0),e=t;e;--e)o=o.div(o.times(o).plus(1).sqrt().plus(1));for(Er=!1,r=Math.ceil(l/br),n=1,f=o.times(o),s=new u(o),i=o;e!==-1;)if(i=i.times(f),a=s.minus(i.div(n+=2)),i=i.times(f),s=a.plus(i.div(n+=2)),s.d[r]!==void 0)for(e=r;s.d[e]===a.d[e]&&e--;);return t&&(s=s.times(2<this.d.length-2};Ue.isNaN=function(){return!this.s};Ue.isNegative=Ue.isNeg=function(){return this.s<0};Ue.isPositive=Ue.isPos=function(){return this.s>0};Ue.isZero=function(){return!!this.d&&this.d[0]===0};Ue.lessThan=Ue.lt=function(e){return this.cmp(e)<0};Ue.lessThanOrEqualTo=Ue.lte=function(e){return this.cmp(e)<1};Ue.logarithm=Ue.log=function(e){var r,t,n,i,a,s,l,f,o=this,u=o.constructor,p=u.precision,h=u.rounding,d=5;if(e==null)e=new u(10),r=!0;else{if(e=new u(e),t=e.d,e.s<0||!t||!t[0]||e.eq(1))return new u(NaN);r=e.eq(10)}if(t=o.d,o.s<0||!t||!t[0]||o.eq(1))return new u(t&&!t[0]?-1/0:o.s!=1?NaN:t?0:1/0);if(r)if(t.length>1)a=!0;else{for(i=t[0];i%10===0;)i/=10;a=i!==1}if(Er=!1,l=p+d,s=yo(o,l),n=r?Tc(u,l+10):yo(e,l),f=xt(s,n,l,1),bf(f.d,i=p,h))do if(l+=10,s=yo(o,l),n=r?Tc(u,l+10):yo(e,l),f=xt(s,n,l,1),!a){+ln(f.d).slice(i+1,i+15)+1==1e14&&(f=dr(f,p+1,0));break}while(bf(f.d,i+=10,h));return Er=!0,dr(f,p,h)};Ue.minus=Ue.sub=function(e){var r,t,n,i,a,s,l,f,o,u,p,h,d=this,x=d.constructor;if(e=new x(e),!d.d||!e.d)return!d.s||!e.s?e=new x(NaN):d.d?e.s=-e.s:e=new x(e.d||d.s!==e.s?d:NaN),e;if(d.s!=e.s)return e.s=-e.s,d.plus(e);if(o=d.d,h=e.d,l=x.precision,f=x.rounding,!o[0]||!h[0]){if(h[0])e.s=-e.s;else if(o[0])e=new x(d);else return new x(f===3?-0:0);return Er?dr(e,l,f):e}if(t=mn(e.e/br),u=mn(d.e/br),o=o.slice(),a=u-t,a){for(p=a<0,p?(r=o,a=-a,s=h.length):(r=h,t=u,s=o.length),n=Math.max(Math.ceil(l/br),s)+2,a>n&&(a=n,r.length=1),r.reverse(),n=a;n--;)r.push(0);r.reverse()}else{for(n=o.length,s=h.length,p=n0;--n)o[s++]=0;for(n=h.length;n>a;){if(o[--n]s?a+1:s+1,i>s&&(i=s,t.length=1),t.reverse();i--;)t.push(0);t.reverse()}for(s=o.length,i=u.length,s-i<0&&(i=s,t=u,u=o,o=t),r=0;i;)r=(o[--i]=o[i]+u[i]+r)/Hi|0,o[i]%=Hi;for(r&&(o.unshift(r),++n),s=o.length;o[--s]==0;)o.pop();return e.d=o,e.e=Oc(o,n),Er?dr(e,l,f):e};Ue.precision=Ue.sd=function(e){var r,t=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(bo+e);return t.d?(r=Yy(t.d),e&&t.e+1>r&&(r=t.e+1)):r=NaN,r};Ue.round=function(){var e=this,r=e.constructor;return dr(new r(e),e.e+1,r.rounding)};Ue.sine=Ue.sin=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+Math.max(t.e,t.sd())+br,n.rounding=1,t=qk(n,Zy(n,t)),n.precision=e,n.rounding=r,dr(Ra>2?t.neg():t,e,r,!0)):new n(NaN)};Ue.squareRoot=Ue.sqrt=function(){var e,r,t,n,i,a,s=this,l=s.d,f=s.e,o=s.s,u=s.constructor;if(o!==1||!l||!l[0])return new u(!o||o<0&&(!l||l[0])?NaN:l?s:1/0);for(Er=!1,o=Math.sqrt(+s),o==0||o==1/0?(r=ln(l),(r.length+f)%2==0&&(r+="0"),o=Math.sqrt(r),f=mn((f+1)/2)-(f<0||f%2),o==1/0?r="5e"+f:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+f),n=new u(r)):n=new u(o.toString()),t=(f=u.precision)+3;;)if(a=n,n=a.plus(xt(s,a,t+2,1)).times(.5),ln(a.d).slice(0,t)===(r=ln(n.d)).slice(0,t))if(r=r.slice(t-3,t+1),r=="9999"||!i&&r=="4999"){if(!i&&(dr(a,f+1,0),a.times(a).eq(s))){n=a;break}t+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(dr(n,f+1,1),e=!n.times(n).eq(s));break}return Er=!0,dr(n,f,u.rounding,e)};Ue.tangent=Ue.tan=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+10,n.rounding=1,t=t.sin(),t.s=1,t=xt(t,new n(1).minus(t.times(t)).sqrt(),e+10,0),n.precision=e,n.rounding=r,dr(Ra==2||Ra==4?t.neg():t,e,r,!0)):new n(NaN)};Ue.times=Ue.mul=function(e){var r,t,n,i,a,s,l,f,o,u=this,p=u.constructor,h=u.d,d=(e=new p(e)).d;if(e.s*=u.s,!h||!h[0]||!d||!d[0])return new p(!e.s||h&&!h[0]&&!d||d&&!d[0]&&!h?NaN:!h||!d?e.s/0:e.s*0);for(t=mn(u.e/br)+mn(e.e/br),f=h.length,o=d.length,f=0;){for(r=0,i=f+n;i>n;)l=a[i]+d[n]*h[i-n-1]+r,a[i--]=l%Hi|0,r=l/Hi|0;a[i]=(a[i]+r)%Hi|0}for(;!a[--s];)a.pop();return r?++t:a.shift(),e.d=a,e.e=Oc(a,t),Er?dr(e,p.precision,p.rounding):e};Ue.toBinary=function(e,r){return av(this,2,e,r)};Ue.toDecimalPlaces=Ue.toDP=function(e,r){var t=this,n=t.constructor;return t=new n(t),e===void 0?t:(Ln(e,0,wo),r===void 0?r=n.rounding:Ln(r,0,8),dr(t,e+t.e+1,r))};Ue.toExponential=function(e,r){var t,n=this,i=n.constructor;return e===void 0?t=pa(n,!0):(Ln(e,0,wo),r===void 0?r=i.rounding:Ln(r,0,8),n=dr(new i(n),e+1,r),t=pa(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+t:t};Ue.toFixed=function(e,r){var t,n,i=this,a=i.constructor;return e===void 0?t=pa(i):(Ln(e,0,wo),r===void 0?r=a.rounding:Ln(r,0,8),n=dr(new a(i),e+i.e+1,r),t=pa(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+t:t};Ue.toFraction=function(e){var r,t,n,i,a,s,l,f,o,u,p,h,d=this,x=d.d,v=d.constructor;if(!x)return new v(d);if(o=t=new v(1),n=f=new v(0),r=new v(n),a=r.e=Yy(x)-d.e-1,s=a%br,r.d[0]=Jt(10,s<0?br+s:s),e==null)e=a>0?r:o;else{if(l=new v(e),!l.isInt()||l.lt(o))throw Error(bo+l);e=l.gt(r)?a>0?r:o:l}for(Er=!1,l=new v(ln(x)),u=v.precision,v.precision=a=x.length*br*2;p=xt(l,r,0,1,1),i=t.plus(p.times(n)),i.cmp(e)!=1;)t=n,n=i,i=o,o=f.plus(p.times(i)),f=i,i=r,r=l.minus(p.times(i)),l=i;return i=xt(e.minus(t),n,0,1,1),f=f.plus(i.times(o)),t=t.plus(i.times(n)),f.s=o.s=d.s,h=xt(o,n,a,1).minus(d).abs().cmp(xt(f,t,a,1).minus(d).abs())<1?[o,n]:[f,t],v.precision=u,Er=!0,h};Ue.toHexadecimal=Ue.toHex=function(e,r){return av(this,16,e,r)};Ue.toNearest=function(e,r){var t=this,n=t.constructor;if(t=new n(t),e==null){if(!t.d)return t;e=new n(1),r=n.rounding}else{if(e=new n(e),r===void 0?r=n.rounding:Ln(r,0,8),!t.d)return e.s?t:e;if(!e.d)return e.s&&(e.s=t.s),e}return e.d[0]?(Er=!1,t=xt(t,e,0,r,1).times(e),Er=!0,dr(t)):(e.s=t.s,t=e),t};Ue.toNumber=function(){return+this};Ue.toOctal=function(e,r){return av(this,8,e,r)};Ue.toPower=Ue.pow=function(e){var r,t,n,i,a,s,l=this,f=l.constructor,o=+(e=new f(e));if(!l.d||!e.d||!l.d[0]||!e.d[0])return new f(Jt(+l,o));if(l=new f(l),l.eq(1))return l;if(n=f.precision,a=f.rounding,e.eq(1))return dr(l,n,a);if(r=mn(e.e/br),r>=e.d.length-1&&(t=o<0?-o:o)<=Pk)return i=Hy(f,l,t,n),e.s<0?new f(1).div(i):dr(i,n,a);if(s=l.s,s<0){if(rf.maxE+1||r0?s/0:0):(Er=!1,f.rounding=l.s=1,t=Math.min(12,(r+"").length),i=nv(e.times(yo(l,n+t)),n),i.d&&(i=dr(i,n+5,1),bf(i.d,n,a)&&(r=n+10,i=dr(nv(e.times(yo(l,r+t)),r),r+5,1),+ln(i.d).slice(n+1,n+15)+1==1e14&&(i=dr(i,n+1,0)))),i.s=s,Er=!0,f.rounding=a,dr(i,n,a))};Ue.toPrecision=function(e,r){var t,n=this,i=n.constructor;return e===void 0?t=pa(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(Ln(e,1,wo),r===void 0?r=i.rounding:Ln(r,0,8),n=dr(new i(n),e,r),t=pa(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+t:t};Ue.toSignificantDigits=Ue.toSD=function(e,r){var t=this,n=t.constructor;return e===void 0?(e=n.precision,r=n.rounding):(Ln(e,1,wo),r===void 0?r=n.rounding:Ln(r,0,8)),dr(new n(t),e,r)};Ue.toString=function(){var e=this,r=e.constructor,t=pa(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()&&!e.isZero()?"-"+t:t};Ue.truncated=Ue.trunc=function(){return dr(new this.constructor(this),this.e+1,1)};Ue.valueOf=Ue.toJSON=function(){var e=this,r=e.constructor,t=pa(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()?"-"+t:t};function ln(e){var r,t,n,i=e.length-1,a="",s=e[0];if(i>0){for(a+=s,r=1;rt)throw Error(bo+e)}function bf(e,r,t,n){var i,a,s,l;for(a=e[0];a>=10;a/=10)--r;return--r<0?(r+=br,i=0):(i=Math.ceil((r+1)/br),r%=br),a=Jt(10,br-r),l=e[i]%a|0,n==null?r<3?(r==0?l=l/100|0:r==1&&(l=l/10|0),s=t<4&&l==99999||t>3&&l==49999||l==5e4||l==0):s=(t<4&&l+1==a||t>3&&l+1==a/2)&&(e[i+1]/a/100|0)==Jt(10,r-2)-1||(l==a/2||l==0)&&(e[i+1]/a/100|0)==0:r<4?(r==0?l=l/1e3|0:r==1?l=l/100|0:r==2&&(l=l/10|0),s=(n||t<4)&&l==9999||!n&&t>3&&l==4999):s=((n||t<4)&&l+1==a||!n&&t>3&&l+1==a/2)&&(e[i+1]/a/1e3|0)==Jt(10,r-3)-1,s}function Cc(e,r,t){for(var n,i=[0],a,s=0,l=e.length;st-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/t|0,i[n]%=t)}return i.reverse()}function Rk(e,r){var t,n,i;if(r.isZero())return r;n=r.d.length,n<32?(t=Math.ceil(n/3),i=(1/Bc(4,t)).toString()):(t=16,i="2.3283064365386962890625e-10"),e.precision+=t,r=tu(e,1,r.times(i),new e(1));for(var a=t;a--;){var s=r.times(r);r=s.times(s).minus(s).times(8).plus(1)}return e.precision-=t,r}var xt=function(){function e(n,i,a){var s,l=0,f=n.length;for(n=n.slice();f--;)s=n[f]*i+l,n[f]=s%a|0,l=s/a|0;return l&&n.unshift(l),n}function r(n,i,a,s){var l,f;if(a!=s)f=a>s?1:-1;else for(l=f=0;li[l]?1:-1;break}return f}function t(n,i,a,s){for(var l=0;a--;)n[a]-=l,l=n[a]1;)n.shift()}return function(n,i,a,s,l,f){var o,u,p,h,d,x,v,y,w,C,b,A,E,S,O,F,M,_,k,L,Y=n.constructor,$=n.s==i.s?1:-1,V=n.d,q=i.d;if(!V||!V[0]||!q||!q[0])return new Y(!n.s||!i.s||(V?q&&V[0]==q[0]:!q)?NaN:V&&V[0]==0||!q?$*0:$/0);for(f?(d=1,u=n.e-i.e):(f=Hi,d=br,u=mn(n.e/d)-mn(i.e/d)),k=q.length,M=V.length,w=new Y($),C=w.d=[],p=0;q[p]==(V[p]||0);p++);if(q[p]>(V[p]||0)&&u--,a==null?(S=a=Y.precision,s=Y.rounding):l?S=a+(n.e-i.e)+1:S=a,S<0)C.push(1),x=!0;else{if(S=S/d+2|0,p=0,k==1){for(h=0,q=q[0],S++;(p1&&(q=e(q,h,f),V=e(V,h,f),k=q.length,M=V.length),F=k,b=V.slice(0,k),A=b.length;A=f/2&&++_;do h=0,o=r(q,b,k,A),o<0?(E=b[0],k!=A&&(E=E*f+(b[1]||0)),h=E/_|0,h>1?(h>=f&&(h=f-1),v=e(q,h,f),y=v.length,A=b.length,o=r(v,b,y,A),o==1&&(h--,t(v,k=10;h/=10)p++;w.e=p+u*d-1,dr(w,l?a+w.e+1:a,s,x)}return w}}();function dr(e,r,t,n){var i,a,s,l,f,o,u,p,h,d=e.constructor;e:if(r!=null){if(p=e.d,!p)return e;for(i=1,l=p[0];l>=10;l/=10)i++;if(a=r-i,a<0)a+=br,s=r,u=p[h=0],f=u/Jt(10,i-s-1)%10|0;else if(h=Math.ceil((a+1)/br),l=p.length,h>=l)if(n){for(;l++<=h;)p.push(0);u=f=0,i=1,a%=br,s=a-br+1}else break e;else{for(u=l=p[h],i=1;l>=10;l/=10)i++;a%=br,s=a-br+i,f=s<0?0:u/Jt(10,i-s-1)%10|0}if(n=n||r<0||p[h+1]!==void 0||(s<0?u:u%Jt(10,i-s-1)),o=t<4?(f||n)&&(t==0||t==(e.s<0?3:2)):f>5||f==5&&(t==4||n||t==6&&(a>0?s>0?u/Jt(10,i-s):0:p[h-1])%10&1||t==(e.s<0?8:7)),r<1||!p[0])return p.length=0,o?(r-=e.e+1,p[0]=Jt(10,(br-r%br)%br),e.e=-r||0):p[0]=e.e=0,e;if(a==0?(p.length=h,l=1,h--):(p.length=h+1,l=Jt(10,br-a),p[h]=s>0?(u/Jt(10,i-s)%Jt(10,s)|0)*l:0),o)for(;;)if(h==0){for(a=1,s=p[0];s>=10;s/=10)a++;for(s=p[0]+=l,l=1;s>=10;s/=10)l++;a!=l&&(e.e++,p[0]==Hi&&(p[0]=1));break}else{if(p[h]+=l,p[h]!=Hi)break;p[h--]=0,l=1}for(a=p.length;p[--a]===0;)p.pop()}return Er&&(e.e>d.maxE?(e.d=null,e.e=NaN):e.e0?a=a.charAt(0)+"."+a.slice(1)+xo(n):s>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(e.e<0?"e":"e+")+e.e):i<0?(a="0."+xo(-i-1)+a,t&&(n=t-s)>0&&(a+=xo(n))):i>=s?(a+=xo(i+1-s),t&&(n=t-i-1)>0&&(a=a+"."+xo(n))):((n=i+1)0&&(i+1===s&&(a+="."),a+=xo(n))),a}function Oc(e,r){var t=e[0];for(r*=br;t>=10;t/=10)r++;return r}function Tc(e,r,t){if(r>kk)throw Er=!0,t&&(e.precision=t),Error(Uy);return dr(new e(Mc),r,1,!0)}function Yi(e,r,t){if(r>tv)throw Error(Uy);return dr(new e(_c),r,t,!0)}function Yy(e){var r=e.length-1,t=r*br+1;if(r=e[r],r){for(;r%10==0;r/=10)t--;for(r=e[0];r>=10;r/=10)t++}return t}function xo(e){for(var r="";e--;)r+="0";return r}function Hy(e,r,t,n){var i,a=new e(1),s=Math.ceil(n/br+4);for(Er=!1;;){if(t%2&&(a=a.times(r),Ry(a.d,s)&&(i=!0)),t=mn(t/2),t===0){t=a.d.length-1,i&&a.d[t]===0&&++a.d[t];break}r=r.times(r),Ry(r.d,s)}return Er=!0,a}function ky(e){return e.d[e.d.length-1]&1}function Gy(e,r,t){for(var n,i=new e(r[0]),a=0;++a17)return new h(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:0/0);for(r==null?(Er=!1,f=x):f=r,l=new h(.03125);e.e>-2;)e=e.times(l),p+=5;for(n=Math.log(Jt(2,p))/Math.LN10*2+5|0,f+=n,t=a=s=new h(1),h.precision=f;;){if(a=dr(a.times(e),f,1),t=t.times(++u),l=s.plus(xt(a,t,f,1)),ln(l.d).slice(0,f)===ln(s.d).slice(0,f)){for(i=p;i--;)s=dr(s.times(s),f,1);if(r==null)if(o<3&&bf(s.d,f-n,d,o))h.precision=f+=10,t=a=l=new h(1),u=0,o++;else return dr(s,h.precision=x,d,Er=!0);else return h.precision=x,s}s=l}}function yo(e,r){var t,n,i,a,s,l,f,o,u,p,h,d=1,x=10,v=e,y=v.d,w=v.constructor,C=w.rounding,b=w.precision;if(v.s<0||!y||!y[0]||!v.e&&y[0]==1&&y.length==1)return new w(y&&!y[0]?-1/0:v.s!=1?NaN:y?0:v);if(r==null?(Er=!1,u=b):u=r,w.precision=u+=x,t=ln(y),n=t.charAt(0),Math.abs(a=v.e)<15e14){for(;n<7&&n!=1||n==1&&t.charAt(1)>3;)v=v.times(e),t=ln(v.d),n=t.charAt(0),d++;a=v.e,n>1?(v=new w("0."+t),a++):v=new w(n+"."+t.slice(1))}else return o=Tc(w,u+2,b).times(a+""),v=yo(new w(n+"."+t.slice(1)),u-x).plus(o),w.precision=b,r==null?dr(v,b,C,Er=!0):v;for(p=v,f=s=v=xt(v.minus(1),v.plus(1),u,1),h=dr(v.times(v),u,1),i=3;;){if(s=dr(s.times(h),u,1),o=f.plus(xt(s,new w(i),u,1)),ln(o.d).slice(0,u)===ln(f.d).slice(0,u))if(f=f.times(2),a!==0&&(f=f.plus(Tc(w,u+2,b).times(a+""))),f=xt(f,new w(d),u,1),r==null)if(bf(f.d,u-x,C,l))w.precision=u+=x,o=s=v=xt(p.minus(1),p.plus(1),u,1),h=dr(v.times(v),u,1),i=l=1;else return dr(f,w.precision=b,C,Er=!0);else return w.precision=b,f;f=o,i+=2}}function $y(e){return String(e.s*e.s/0)}function iv(e,r){var t,n,i;for((t=r.indexOf("."))>-1&&(r=r.replace(".","")),(n=r.search(/e/i))>0?(t<0&&(t=n),t+=+r.slice(n+1),r=r.substring(0,n)):t<0&&(t=r.length),n=0;r.charCodeAt(n)===48;n++);for(i=r.length;r.charCodeAt(i-1)===48;--i);if(r=r.slice(n,i),r){if(i-=n,e.e=t=t-n-1,e.d=[],n=(t+1)%br,t<0&&(n+=br),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(r=r.replace(/(\\d)_(?=\\d)/g,"$1"),Vy.test(r))return iv(e,r)}else if(r==="Infinity"||r==="NaN")return+r||(e.s=NaN),e.e=NaN,e.d=null,e;if(Bk.test(r))t=16,r=r.toLowerCase();else if(Ok.test(r))t=2;else if(Ik.test(r))t=8;else throw Error(bo+r);for(a=r.search(/p/i),a>0?(f=+r.slice(a+1),r=r.substring(2,a)):r=r.slice(2),a=r.indexOf("."),s=a>=0,n=e.constructor,s&&(r=r.replace(".",""),l=r.length,a=l-a,i=Hy(n,new n(t),a,a*2)),o=Cc(r,t,Hi),u=o.length-1,a=u;o[a]===0;--a)o.pop();return a<0?new n(e.s*0):(e.e=Oc(o,u),e.d=o,Er=!1,s&&(e=xt(e,i,l*4)),f&&(e=e.times(Math.abs(f)<54?Jt(2,f):wf.pow(2,f))),Er=!0,e)}function qk(e,r){var t,n=r.d.length;if(n<3)return r.isZero()?r:tu(e,2,r,r);t=1.4*Math.sqrt(n),t=t>16?16:t|0,r=r.times(1/Bc(5,t)),r=tu(e,2,r,r);for(var i,a=new e(5),s=new e(16),l=new e(20);t--;)i=r.times(r),r=r.times(a.plus(i.times(s.times(i).minus(l))));return r}function tu(e,r,t,n,i){var a,s,l,f,o=1,u=e.precision,p=Math.ceil(u/br);for(Er=!1,f=t.times(t),l=new e(n);;){if(s=xt(l.times(f),new e(r++*r++),u,1),l=i?n.plus(s):n.minus(s),n=xt(s.times(f),new e(r++*r++),u,1),s=l.plus(n),s.d[p]!==void 0){for(a=p;s.d[a]===l.d[a]&&a--;);if(a==-1)break}a=l,l=n,n=s,s=a,o++}return Er=!0,s.d.length=p+1,s}function Bc(e,r){for(var t=e;--r;)t*=e;return t}function Zy(e,r){var t,n=r.s<0,i=Yi(e,e.precision,1),a=i.times(.5);if(r=r.abs(),r.lte(a))return Ra=n?4:1,r;if(t=r.divToInt(i),t.isZero())Ra=n?3:2;else{if(r=r.minus(t.times(i)),r.lte(a))return Ra=ky(t)?n?2:3:n?4:1,r;Ra=ky(t)?n?1:4:n?3:2}return r.minus(i).abs()}function av(e,r,t,n){var i,a,s,l,f,o,u,p,h,d=e.constructor,x=t!==void 0;if(x?(Ln(t,1,wo),n===void 0?n=d.rounding:Ln(n,0,8)):(t=d.precision,n=d.rounding),!e.isFinite())u=$y(e);else{for(u=pa(e),s=u.indexOf("."),x?(i=2,r==16?t=t*4-3:r==8&&(t=t*3-2)):i=r,s>=0&&(u=u.replace(".",""),h=new d(1),h.e=u.length-s,h.d=Cc(pa(h),10,i),h.e=h.d.length),p=Cc(u,10,i),a=f=p.length;p[--f]==0;)p.pop();if(!p[0])u=x?"0p+0":"0";else{if(s<0?a--:(e=new d(e),e.d=p,e.e=a,e=xt(e,h,t,n,0,i),p=e.d,a=e.e,o=qy),s=p[t],l=i/2,o=o||p[t+1]!==void 0,o=n<4?(s!==void 0||o)&&(n===0||n===(e.s<0?3:2)):s>l||s===l&&(n===4||o||n===6&&p[t-1]&1||n===(e.s<0?8:7)),p.length=t,o)for(;++p[--t]>i-1;)p[t]=0,t||(++a,p.unshift(1));for(f=p.length;!p[f-1];--f);for(s=0,u="";s1)if(r==16||r==8){for(s=r==16?4:3,--f;f%s;f++)u+="0";for(p=Cc(u,i,r),f=p.length;!p[f-1];--f);for(s=1,u="1.";sf)for(a-=f;a--;)u+="0";else ar)return e.length=r,!0}function Uk(e){return new this(e).abs()}function zk(e){return new this(e).acos()}function Wk(e){return new this(e).acosh()}function Vk(e,r){return new this(e).plus(r)}function Yk(e){return new this(e).asin()}function Hk(e){return new this(e).asinh()}function Gk(e){return new this(e).atan()}function $k(e){return new this(e).atanh()}function Zk(e,r){e=new this(e),r=new this(r);var t,n=this.precision,i=this.rounding,a=n+4;return!e.s||!r.s?t=new this(NaN):!e.d&&!r.d?(t=Yi(this,a,1).times(r.s>0?.25:.75),t.s=e.s):!r.d||e.isZero()?(t=r.s<0?Yi(this,n,i):new this(0),t.s=e.s):!e.d||r.isZero()?(t=Yi(this,a,1).times(.5),t.s=e.s):r.s<0?(this.precision=a,this.rounding=1,t=this.atan(xt(e,r,a,1)),r=Yi(this,a,1),this.precision=n,this.rounding=i,t=e.s<0?t.minus(r):t.plus(r)):t=this.atan(xt(e,r,a,1)),t}function Qk(e){return new this(e).cbrt()}function Xk(e){return dr(e=new this(e),e.e+1,2)}function Jk(e,r,t){return new this(e).clamp(r,t)}function Kk(e){if(!e||typeof e!="object")throw Error(Fc+"Object expected");var r,t,n,i=e.defaults===!0,a=["precision",1,wo,"rounding",0,8,"toExpNeg",-ru,0,"toExpPos",0,ru,"maxE",0,ru,"minE",-ru,0,"modulo",0,9];for(r=0;r=a[r+1]&&n<=a[r+2])this[t]=n;else throw Error(bo+t+": "+n);if(t="crypto",i&&(this[t]=rv[t]),(n=e[t])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(zy);else this[t]=!1;else throw Error(bo+t+": "+n);return this}function jk(e){return new this(e).cos()}function eR(e){return new this(e).cosh()}function Qy(e){var r,t,n;function i(a){var s,l,f,o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,Ly(a)){o.s=a.s,Er?!a.d||a.e>i.maxE?(o.e=NaN,o.d=null):a.e=10;l/=10)s++;Er?s>i.maxE?(o.e=NaN,o.d=null):s=429e7?r[a]=crypto.getRandomValues(new Uint32Array(1))[0]:l[a++]=i%1e7;else if(crypto.randomBytes){for(r=crypto.randomBytes(n*=4);a=214e7?crypto.randomBytes(4).copy(r,a):(l.push(i%1e7),a+=4);a=n/4}else throw Error(zy);else for(;a=10;i/=10)n++;n{var{on:r,config:t}=e,n=ts.clone({precision:t.precision,modulo:ts.EUCLID});return n.prototype=Object.create(n.prototype),n.prototype.type="BigNumber",n.prototype.isBigNumber=!0,n.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},n.fromJSON=function(i){return new n(i.value)},r&&r("config",function(i,a){i.precision!==a.precision&&n.config({precision:i.precision})}),n},{isClass:!0});var tn=ci(Ky(),1);var CR="Complex",MR=[],jy=T(CR,MR,()=>(Object.defineProperty(tn.default,"name",{value:"Complex"}),tn.default.prototype.constructor=tn.default,tn.default.prototype.type="Complex",tn.default.prototype.isComplex=!0,tn.default.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},tn.default.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},tn.default.prototype.format=function(e){var r="",t=this.im,n=this.re,i=Wi(this.re,e),a=Wi(this.im,e),s=ar(e)?e:e?e.precision:null;if(s!==null){var l=Math.pow(10,-s);Math.abs(n/t)r.re?1:e.rer.im?1:e.im(Object.defineProperty(ma.default,"name",{value:"Fraction"}),ma.default.prototype.constructor=ma.default,ma.default.prototype.type="Fraction",ma.default.prototype.isFraction=!0,ma.default.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},ma.default.fromJSON=function(e){return new ma.default(e)},ma.default),{isClass:!0});var FR="Range",OR=[],n1=T(FR,OR,()=>{function e(r,t,n){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");var i=r!=null,a=t!=null,s=n!=null;if(i){if(je(r))r=r.toNumber();else if(typeof r!="number")throw new TypeError("Parameter start must be a number")}if(a){if(je(t))t=t.toNumber();else if(typeof t!="number")throw new TypeError("Parameter end must be a number")}if(s){if(je(n))n=n.toNumber();else if(typeof n!="number")throw new TypeError("Parameter step must be a number")}this.start=i?parseFloat(r):0,this.end=a?parseFloat(t):0,this.step=s?parseFloat(n):1}return e.prototype.type="Range",e.prototype.isRange=!0,e.parse=function(r){if(typeof r!="string")return null;var t=r.split(":"),n=t.map(function(a){return parseFloat(a)}),i=n.some(function(a){return isNaN(a)});if(i)return null;switch(n.length){case 2:return new e(n[0],n[1]);case 3:return new e(n[0],n[2],n[1]);default:return null}},e.prototype.clone=function(){return new e(this.start,this.end,this.step)},e.prototype.size=function(){var r=0,t=this.start,n=this.step,i=this.end,a=i-t;return hi(n)===hi(a)?r=Math.ceil(a/n):a===0&&(r=0),isNaN(r)&&(r=0),[r]},e.prototype.min=function(){var r=this.size()[0];if(r>0)return this.step>0?this.start:this.start+(r-1)*this.step},e.prototype.max=function(){var r=this.size()[0];if(r>0)return this.step>0?this.start+(r-1)*this.step:this.start},e.prototype.forEach=function(r){var t=this.start,n=this.step,i=this.end,a=0;if(n>0)for(;ti;)r(t,[a],this),t+=n,a++},e.prototype.map=function(r){var t=[];return this.forEach(function(n,i,a){t[i[0]]=r(n,i,a)}),t},e.prototype.toArray=function(){var r=[];return this.forEach(function(t,n){r[n[0]]=t}),r},e.prototype.valueOf=function(){return this.toArray()},e.prototype.format=function(r){var t=Wi(this.start,r);return this.step!==1&&(t+=":"+Wi(this.step,r)),t+=":"+Wi(this.end,r),t},e.prototype.toString=function(){return this.format()},e.prototype.toJSON=function(){return{mathjs:"Range",start:this.start,end:this.end,step:this.step}},e.fromJSON=function(r){return new e(r.start,r.end,r.step)},e},{isClass:!0});var BR="Matrix",IR=[],i1=T(BR,IR,()=>{function e(){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator")}return e.prototype.type="Matrix",e.prototype.isMatrix=!0,e.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},e.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},e.prototype.create=function(r,t){throw new Error("Cannot invoke create on a Matrix interface")},e.prototype.subset=function(r,t,n){throw new Error("Cannot invoke subset on a Matrix interface")},e.prototype.get=function(r){throw new Error("Cannot invoke get on a Matrix interface")},e.prototype.set=function(r,t,n){throw new Error("Cannot invoke set on a Matrix interface")},e.prototype.resize=function(r,t){throw new Error("Cannot invoke resize on a Matrix interface")},e.prototype.reshape=function(r,t){throw new Error("Cannot invoke reshape on a Matrix interface")},e.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},e.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},e.prototype.map=function(r,t){throw new Error("Cannot invoke map on a Matrix interface")},e.prototype.forEach=function(r){throw new Error("Cannot invoke forEach on a Matrix interface")},e.prototype[Symbol.iterator]=function(){throw new Error("Cannot iterate a Matrix interface")},e.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},e.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},e.prototype.format=function(r){throw new Error("Cannot invoke format on a Matrix interface")},e.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},e},{isClass:!0});function a1(e){var r=0,t=1,n=Object.create(null),i=Object.create(null),a=0,s=function(f){var o=i[f];if(!!o&&(delete n[o],delete i[f],--r,t===o)){if(!r){a=0,t=1;return}for(;!Object.prototype.hasOwnProperty.call(n,++t););}};return e=Math.abs(e),{hit:function(f){var o=i[f],u=++a;if(n[u]=f,i[f]=u,!o)return++r,r<=e?void 0:(f=n[t],s(f),f);if(delete n[o],t===o)for(;!Object.prototype.hasOwnProperty.call(n,++t););},delete:s,clear:function(){r=a=0,t=1,n=Object.create(null),i=Object.create(null)}}}function ns(e){var{hasher:r,limit:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t=t??Number.POSITIVE_INFINITY,r=r??JSON.stringify,function n(){typeof n.cache!="object"&&(n.cache={values:new Map,lru:a1(t||Number.POSITIVE_INFINITY)});for(var i=[],a=0;a{var{Matrix:r}=e;function t(u,p){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(p&&!yt(p))throw new Error("Invalid datatype: "+p);if(Ge(u))u.type==="DenseMatrix"?(this._data=tr(u._data),this._size=tr(u._size),this._datatype=p||u._datatype):(this._data=u.toArray(),this._size=u.size(),this._datatype=p||u._datatype);else if(u&&Ar(u.data)&&Ar(u.size))this._data=u.data,this._size=u.size,Yd(this._data,this._size),this._datatype=p||u.datatype;else if(Ar(u))this._data=o(u),this._size=or(this._data),Yd(this._data,this._size),this._datatype=p;else{if(u)throw new TypeError("Unsupported type of data ("+_r(u)+")");this._data=[],this._size=[0],this._datatype=p}}t.prototype=new r,t.prototype.createDenseMatrix=function(u,p){return new t(u,p)},Object.defineProperty(t,"name",{value:"DenseMatrix"}),t.prototype.constructor=t,t.prototype.type="DenseMatrix",t.prototype.isDenseMatrix=!0,t.prototype.getDataType=function(){return vo(this._data,_r)},t.prototype.storage=function(){return"dense"},t.prototype.datatype=function(){return this._datatype},t.prototype.create=function(u,p){return new t(u,p)},t.prototype.subset=function(u,p,h){switch(arguments.length){case 1:return n(this,u);case 2:case 3:return a(this,u,p,h);default:throw new SyntaxError("Wrong number of arguments")}},t.prototype.get=function(u){if(!Ar(u))throw new TypeError("Array expected");if(u.length!==this._size.length)throw new pr(u.length,this._size.length);for(var p=0;p");var b=p.max().map(function(S){return S+1});f(u,b,d);var A=x.length,E=0;s(u._data,p,h,A,E)}return u}function s(u,p,h,d,x){var v=x===d-1,y=p.dimension(x);v?y.forEach(function(w,C){Xr(w),u[w]=h[C[0]]}):y.forEach(function(w,C){Xr(w),s(u[w],p,h[C[0]],d,x+1)})}t.prototype.resize=function(u,p,h){if(!bt(u))throw new TypeError("Array or Matrix expected");var d=u.valueOf().map(v=>Array.isArray(v)&&v.length===1?v[0]:v),x=h?this.clone():this;return l(x,d,p)};function l(u,p,h){if(p.length===0){for(var d=u._data;Ar(d);)d=d[0];return d}return u._size=p.slice(0),u._data=Vi(u._data,u._size,h),u}t.prototype.reshape=function(u,p){var h=p?this.clone():this;h._data=gf(h._data,u);var d=h._size.reduce((x,v)=>x*v);return h._size=xf(u,d),h};function f(u,p,h){for(var d=u._size.slice(0),x=!1;d.lengthd[v]&&(d[v]=p[v],x=!0);x&&l(u,d,h)}t.prototype.clone=function(){var u=new t({data:tr(this._data),size:tr(this._size),datatype:this._datatype});return u},t.prototype.size=function(){return this._size.slice(0)},t.prototype.map=function(u){var p=this,h=Ic(u),d=function y(w,C){return Ar(w)?w.map(function(b,A){return y(b,C.concat(A))}):h===1?u(w):h===2?u(w,C):u(w,C,p)},x=d(this._data,[]),v=this._datatype!==void 0?vo(x,_r):void 0;return new t(x,v)},t.prototype.forEach=function(u){var p=this,h=function d(x,v){Ar(x)?x.forEach(function(y,w){d(y,v.concat(w))}):u(x,v,p)};h(this._data,[])},t.prototype[Symbol.iterator]=function*(){var u=function*p(h,d){if(Ar(h))for(var x=0;x[b[w]]);p.push(new t(C,u._datatype))},v=0;v0?u:0,h=u<0?-u:0,d=this._size[0],x=this._size[1],v=Math.min(d-h,x-p),y=[],w=0;w0?h:0,v=h<0?-h:0,y=u[0],w=u[1],C=Math.min(y-v,w-x),b;if(Ar(p)){if(p.length!==C)throw new Error("Invalid value array length");b=function(F){return p[F]}}else if(Ge(p)){var A=p.size();if(A.length!==1||A[0]!==C)throw new Error("Invalid matrix length");b=function(F){return p.get([F])}}else b=function(){return p};d||(d=je(b(0))?b(0).mul(0):0);var E=[];if(u.length>0){E=Vi(E,u,d);for(var S=0;S{var{typed:r}=e;return r(s1,{any:tr})});function Pc(e){var r=e.length,t=e[0].length,n,i,a=[];for(i=0;i=n.length)throw new Xt(r,n.length);return Ge(e)?e.create(kc(e.valueOf(),r,t)):kc(e,r,t)}function kc(e,r,t){var n,i,a,s;if(r<=0)if(Array.isArray(e[0])){for(s=Pc(e),i=[],n=0;n{var{typed:r}=e;return r(f1,{number:He,BigNumber:function(n){return n.isInt()},Fraction:function(n){return n.d===1&&isFinite(n.n)},"Array | Matrix":r.referToSelf(t=>n=>Je(n,t))})});var qn="number",La="number, number";function fv(e){return Math.abs(e)}fv.signature=qn;function lv(e,r){return e+r}lv.signature=La;function cv(e,r){return e-r}cv.signature=La;function pv(e,r){return e*r}pv.signature=La;function qR(e,r){return e/r}qR.signature=La;function mv(e){return-e}mv.signature=qn;function hv(e){return e}hv.signature=qn;function nu(e){return sy(e)}nu.signature=qn;function dv(e){return e*e*e}dv.signature=qn;function vv(e){return Math.exp(e)}vv.signature=qn;function gv(e){return uy(e)}gv.signature=qn;function UR(e,r){if(!He(e)||!He(r))throw new Error("Parameters in function gcd must be integer numbers");for(var t;r!==0;)t=e%r,e=r,r=t;return e<0?-e:e}UR.signature=La;function xv(e,r){if(!He(e)||!He(r))throw new Error("Parameters in function lcm must be integer numbers");if(e===0||r===0)return 0;for(var t,n=e*r;r!==0;)t=r,r=e%t,e=t;return Math.abs(n/e)}xv.signature=La;function c1(e,r){return r?Math.log(e)/Math.log(r):Math.log(e)}function yv(e){return oy(e)}yv.signature=qn;function bv(e){return ay(e)}bv.signature=qn;function zR(e){return xc(e)}zR.signature=qn;function WR(e,r){return r===0?e:e-r*Math.floor(e/r)}WR.signature=La;function wv(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,t=r<0;if(t&&(r=-r),r===0)throw new Error("Root must be non-zero");if(e<0&&Math.abs(r)%2!==1)throw new Error("Root must be odd when a is negative.");if(e===0)return t?1/0:0;if(!isFinite(e))return t?0:e;var n=Math.pow(Math.abs(e),1/r);return n=e<0?-n:n,t?1/n:n}function Rc(e){return hi(e)}Rc.signature=qn;function VR(e){return Math.sqrt(e)}VR.signature=qn;function Dv(e){return e*e}Dv.signature=qn;function Sv(e,r){var t,n,i,a=0,s=1,l=1,f=0;if(!He(e)||!He(r))throw new Error("Parameters in function xgcd must be integer numbers");for(;r;)n=Math.floor(e/r),i=e-n*r,t=a,a=s-n*a,s=t,t=l,l=f-n*l,f=t,e=r,r=i;var o;return e<0?o=[-e,-s,-f]:o=[e,e?s:0,f],o}Sv.signature=La;function Nv(e,r){return e*e<1&&r===1/0||e*e>1&&r===-1/0?0:Math.pow(e,r)}Nv.signature=La;function iu(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!He(r)||r<0||r>15)throw new Error("Number of decimals in function round must be an integer from 0 to 15 inclusive");return parseFloat(zd(e,r))}function YR(e){return Math.abs(e)}YR.signature=qn;var HR="number",au="number, number";function Av(e,r){if(!He(e)||!He(r))throw new Error("Integers expected in function bitAnd");return e&r}Av.signature=au;function Ev(e){if(!He(e))throw new Error("Integer expected in function bitNot");return~e}Ev.signature=HR;function Cv(e,r){if(!He(e)||!He(r))throw new Error("Integers expected in function bitOr");return e|r}Cv.signature=au;function Mv(e,r){if(!He(e)||!He(r))throw new Error("Integers expected in function bitXor");return e^r}Mv.signature=au;function _v(e,r){if(!He(e)||!He(r))throw new Error("Integers expected in function leftShift");return e<>r}Tv.signature=au;function Fv(e,r){if(!He(e)||!He(r))throw new Error("Integers expected in function rightLogShift");return e>>>r}Fv.signature=au;function Kn(e,r){if(r>1;return Kn(e,t)*Kn(t+1,r)}function Ov(e,r){if(!He(e)||e<0)throw new TypeError("Positive integer value expected in function combinations");if(!He(r)||r<0)throw new TypeError("Positive integer value expected in function combinations");if(r>e)throw new TypeError("k must be less than or equal to n");for(var t=e-r,n=1,i=r171?1/0:Kn(1,e-1);if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*Df(1-e));if(e>=171.35)return 1/0;if(e>85){var t=e*e,n=t*e,i=n*e,a=i*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*t)-139/(51840*n)-571/(2488320*i)+163879/(209018880*a)+5246819/(75246796800*a*e))}--e,r=is[0];for(var s=1;s=1;n--)t+=v1[n]/(e+n);return qv+(e+.5)*Math.log(r)-r+Math.log(t)}Sf.signature="number";var Dt="number",QR="number, number";function XR(e){return Math.acos(e)}XR.signature=Dt;function Uv(e){return cy(e)}Uv.signature=Dt;function zv(e){return Math.atan(1/e)}zv.signature=Dt;function Wv(e){return isFinite(e)?(Math.log((e+1)/e)+Math.log(e/(e-1)))/2:0}Wv.signature=Dt;function Vv(e){return Math.asin(1/e)}Vv.signature=Dt;function Yv(e){var r=1/e;return Math.log(r+Math.sqrt(r*r+1))}Yv.signature=Dt;function Hv(e){return Math.acos(1/e)}Hv.signature=Dt;function Gv(e){var r=1/e,t=Math.sqrt(r*r-1);return Math.log(t+r)}Gv.signature=Dt;function JR(e){return Math.asin(e)}JR.signature=Dt;function $v(e){return py(e)}$v.signature=Dt;function KR(e){return Math.atan(e)}KR.signature=Dt;function jR(e,r){return Math.atan2(e,r)}jR.signature=QR;function Zv(e){return my(e)}Zv.signature=Dt;function e9(e){return Math.cos(e)}e9.signature=Dt;function r9(e){return bc(e)}r9.signature=Dt;function Qv(e){return 1/Math.tan(e)}Qv.signature=Dt;function Xv(e){var r=Math.exp(2*e);return(r+1)/(r-1)}Xv.signature=Dt;function Jv(e){return 1/Math.sin(e)}Jv.signature=Dt;function Kv(e){return e===0?Number.POSITIVE_INFINITY:Math.abs(2/(Math.exp(e)-Math.exp(-e)))*hi(e)}Kv.signature=Dt;function jv(e){return 1/Math.cos(e)}jv.signature=Dt;function eg(e){return 2/(Math.exp(e)+Math.exp(-e))}eg.signature=Dt;function t9(e){return Math.sin(e)}t9.signature=Dt;function rg(e){return hy(e)}rg.signature=Dt;function n9(e){return Math.tan(e)}n9.signature=Dt;function i9(e){return wc(e)}i9.signature=Dt;var Nf="number";function a9(e){return He(e)}a9.signature=Nf;function tg(e){return e<0}tg.signature=Nf;function ng(e){return e>0}ng.signature=Nf;function ig(e){return e===0}ig.signature=Nf;function ag(e){return Number.isNaN(e)}ag.signature=Nf;var g1="isNegative",o9=["typed"],x1=T(g1,o9,e=>{var{typed:r}=e;return r(g1,{number:tg,BigNumber:function(n){return n.isNeg()&&!n.isZero()&&!n.isNaN()},Fraction:function(n){return n.s<0},Unit:r.referToSelf(t=>n=>r.find(t,n.valueType())(n.value)),"Array | Matrix":r.referToSelf(t=>n=>Je(n,t))})});var y1="isNumeric",s9=["typed"],b1=T(y1,s9,e=>{var{typed:r}=e;return r(y1,{"number | BigNumber | Fraction | boolean":()=>!0,"Complex | Unit | string | null | undefined | Node":()=>!1,"Array | Matrix":r.referToSelf(t=>n=>Je(n,t))})});var w1="hasNumericValue",u9=["typed","isNumeric"],D1=T(w1,u9,e=>{var{typed:r,isNumeric:t}=e;return r(w1,{boolean:()=>!0,string:function(i){return i.trim().length>0&&!isNaN(Number(i))},any:function(i){return t(i)}})});var S1="isPositive",f9=["typed"],N1=T(S1,f9,e=>{var{typed:r}=e;return r(S1,{number:ng,BigNumber:function(n){return!n.isNeg()&&!n.isZero()&&!n.isNaN()},Fraction:function(n){return n.s>0&&n.n>0},Unit:r.referToSelf(t=>n=>r.find(t,n.valueType())(n.value)),"Array | Matrix":r.referToSelf(t=>n=>Je(n,t))})});var A1="isZero",l9=["typed"],E1=T(A1,l9,e=>{var{typed:r}=e;return r(A1,{number:ig,BigNumber:function(n){return n.isZero()},Complex:function(n){return n.re===0&&n.im===0},Fraction:function(n){return n.d===1&&n.n===0},Unit:r.referToSelf(t=>n=>r.find(t,n.valueType())(n.value)),"Array | Matrix":r.referToSelf(t=>n=>Je(n,t))})});var C1="isNaN",c9=["typed"],M1=T(C1,c9,e=>{var{typed:r}=e;return r(C1,{number:ag,BigNumber:function(n){return n.isNaN()},Fraction:function(n){return!1},Complex:function(n){return n.isNaN()},Unit:function(n){return Number.isNaN(n.value)},"Array | Matrix":function(n){return Je(n,Number.isNaN)}})});var _1="typeOf",p9=["typed"],T1=T(_1,p9,e=>{var{typed:r}=e;return r(_1,{any:_r})});function Ut(e,r,t){if(t==null)return e.eq(r);if(e.eq(r))return!0;if(e.isNaN()||r.isNaN())return!1;if(e.isFinite()&&r.isFinite()){var n=e.minus(r).abs();if(n.isZero())return!0;var i=e.constructor.max(e.abs(),r.abs());return n.lte(i.times(t))}return!1}function F1(e,r,t){return wt(e.re,r.re,t)&&wt(e.im,r.im,t)}var vi=T("compareUnits",["typed"],e=>{var{typed:r}=e;return{"Unit, Unit":r.referToSelf(t=>(n,i)=>{if(!n.equalBase(i))throw new Error("Cannot compare units with different base");return r.find(t,[n.valueType(),i.valueType()])(n.value,i.value)})}});var Lc="equalScalar",m9=["typed","config"],O1=T(Lc,m9,e=>{var{typed:r,config:t}=e,n=vi({typed:r});return r(Lc,{"boolean, boolean":function(a,s){return a===s},"number, number":function(a,s){return wt(a,s,t.epsilon)},"BigNumber, BigNumber":function(a,s){return a.eq(s)||Ut(a,s,t.epsilon)},"Fraction, Fraction":function(a,s){return a.equals(s)},"Complex, Complex":function(a,s){return F1(a,s,t.epsilon)}},n)}),SX=T(Lc,["typed","config"],e=>{var{typed:r,config:t}=e;return r(Lc,{"number, number":function(i,a){return wt(i,a,t.epsilon)}})});var h9="SparseMatrix",d9=["typed","equalScalar","Matrix"],B1=T(h9,d9,e=>{var{typed:r,equalScalar:t,Matrix:n}=e;function i(v,y){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if(y&&!yt(y))throw new Error("Invalid datatype: "+y);if(Ge(v))a(this,v,y);else if(v&&Ar(v.index)&&Ar(v.ptr)&&Ar(v.size))this._values=v.values,this._index=v.index,this._ptr=v.ptr,this._size=v.size,this._datatype=y||v.datatype;else if(Ar(v))s(this,v,y);else{if(v)throw new TypeError("Unsupported type of data ("+_r(v)+")");this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=y}}function a(v,y,w){y.type==="SparseMatrix"?(v._values=y._values?tr(y._values):void 0,v._index=tr(y._index),v._ptr=tr(y._ptr),v._size=tr(y._size),v._datatype=w||y._datatype):s(v,y.valueOf(),w||y._datatype)}function s(v,y,w){v._values=[],v._index=[],v._ptr=[],v._datatype=w;var C=y.length,b=0,A=t,E=0;if(yt(w)&&(A=r.find(t,[w,w])||t,E=r.convert(0,w)),C>0){var S=0;do{v._ptr.push(v._index.length);for(var O=0;O");if(b.length===1){var F=y.dimension(0);F.forEach(function(k,L){Xr(k),v.set([k,0],w[L[0]],C)})}else{var M=y.dimension(0),_=y.dimension(1);M.forEach(function(k,L){Xr(k),_.forEach(function(Y,$){Xr(Y),v.set([k,Y],w[L[0]][$[0]],C)})})}}return v}i.prototype.get=function(v){if(!Ar(v))throw new TypeError("Array expected");if(v.length!==this._size.length)throw new pr(v.length,this._size.length);if(!this._values)throw new Error("Cannot invoke get on a Pattern only matrix");var y=v[0],w=v[1];Xr(y,this._size[0]),Xr(w,this._size[1]);var C=o(y,this._ptr[w],this._ptr[w+1],this._index);return CA-1||b>E-1)&&(h(this,Math.max(C+1,A),Math.max(b+1,E),w),A=this._size[0],E=this._size[1]),Xr(C,A),Xr(b,E);var F=o(C,this._ptr[b],this._ptr[b+1],this._index);return FArray.isArray(A)&&A.length===1?A[0]:A);if(C.length!==2)throw new Error("Only two dimensions matrix are supported");C.forEach(function(A){if(!ar(A)||!He(A)||A<0)throw new TypeError("Invalid size, must contain positive integers (size: "+lr(C)+")")});var b=w?this.clone():this;return h(b,C[0],C[1],y)};function h(v,y,w,C){var b=C||0,A=t,E=0;yt(v._datatype)&&(A=r.find(t,[v._datatype,v._datatype])||t,E=r.convert(0,v._datatype),b=r.convert(b,v._datatype));var S=!A(b,E),O=v._size[0],F=v._size[1],M,_,k;if(w>F){for(_=F;_O){if(S){var L=0;for(_=0;_y-1&&(v._values.splice(k,1),v._index.splice(k,1),$++)}v._ptr[_]=v._values.length}return v._size[0]=y,v._size[1]=w,v}i.prototype.reshape=function(v,y){if(!Ar(v))throw new TypeError("Array expected");if(v.length!==2)throw new Error("Sparse matrices can only be reshaped in two dimensions");v.forEach(function(U){if(!ar(U)||!He(U)||U<=-2||U===0)throw new TypeError("Invalid size, must contain positive integers or -1 (size: "+lr(v)+")")});var w=this._size[0]*this._size[1];v=xf(v,w);var C=v[0]*v[1];if(w!==C)throw new Error("Reshaping sparse matrix will result in the wrong number of elements");var b=y?this.clone():this;if(this._size[0]===v[0]&&this._size[1]===v[1])return b;for(var A=[],E=0;E=y&&q<=w&&k(v._values[V],q-y,L-C)}else{for(var R={},j=Y;j<$;j++){var U=v._index[j];R[U]=v._values[j]}for(var oe=y;oe<=w;oe++){var me=oe in R?R[oe]:0;k(me,oe-y,L-C)}}}return F.push(S.length),new i({values:S,index:O,ptr:F,size:[w-y+1,b-C+1]})}i.prototype.forEach=function(v,y){if(!this._values)throw new Error("Cannot invoke forEach on a Pattern only matrix");for(var w=this,C=this._size[0],b=this._size[1],A=0;A=0;return(se?P?"+":"":"-")+Math.pow(10,Math.max(0,G)).toString().substr(1)+z}var U=/(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,oe=/(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,me={},ie={};function H(g,N,P,z){var G=z;typeof z=="string"&&(G=function(){return this[z]()}),g&&(ie[g]=G),N&&(ie[N[0]]=function(){return j(G.apply(this,arguments),N[1],N[2])}),P&&(ie[P]=function(){return this.localeData().ordinal(G.apply(this,arguments),g)})}function ce(g){return g.match(/\\[[\\s\\S]/)?g.replace(/^\\[|\\]$/g,""):g.replace(/\\\\/g,"")}function Me(g){var N=g.match(U),P,z;for(P=0,z=N.length;P=0&&oe.test(g);)g=g.replace(oe,z),oe.lastIndex=0,P-=1;return g}var Se={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function xe(g){var N=this._longDateFormat[g],P=this._longDateFormat[g.toUpperCase()];return N||!P?N:(this._longDateFormat[g]=P.match(U).map(function(z){return z==="MMMM"||z==="MM"||z==="DD"||z==="dddd"?z.slice(1):z}).join(""),this._longDateFormat[g])}var be="Invalid date";function De(){return this._invalidDate}var Ae="%d",ze=/\\d{1,2}/;function Ze(g){return this._ordinal.replace("%d",g)}var K={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function te(g,N,P,z){var G=this._relativeTime[P];return k(G)?G(g,N,P,z):G.replace(/%d/i,g)}function ye(g,N){var P=this._relativeTime[g>0?"future":"past"];return k(P)?P(N):P.replace(/%s/i,N)}var ee={};function ne(g,N){var P=g.toLowerCase();ee[P]=ee[P+"s"]=ee[N]=g}function ue(g){return typeof g=="string"?ee[g]||ee[g.toLowerCase()]:void 0}function Ee(g){var N={},P,z;for(z in g)a(g,z)&&(P=ue(z),P&&(N[P]=g[z]));return N}var Ce={};function Le(g,N){Ce[g]=N}function Ie(g){var N=[],P;for(P in g)a(g,P)&&N.push({unit:P,priority:Ce[P]});return N.sort(function(z,G){return z.priority-G.priority}),N}function sr(g){return g%4===0&&g%100!==0||g%400===0}function ir(g){return g<0?Math.ceil(g)||0:Math.floor(g)}function Xe(g){var N=+g,P=0;return N!==0&&isFinite(N)&&(P=ir(N)),P}function Or(g,N){return function(P){return P!=null?(le(this,g,P),r.updateOffset(this,N),this):re(this,g)}}function re(g,N){return g.isValid()?g._d["get"+(g._isUTC?"UTC":"")+N]():NaN}function le(g,N,P){g.isValid()&&!isNaN(P)&&(N==="FullYear"&&sr(g.year())&&g.month()===1&&g.date()===29?(P=Xe(P),g._d["set"+(g._isUTC?"UTC":"")+N](P,g.month(),Ga(P,g.month()))):g._d["set"+(g._isUTC?"UTC":"")+N](P))}function we(g){return g=ue(g),k(this[g])?this[g]():this}function Oe(g,N){if(typeof g=="object"){g=Ee(g);var P=Ie(g),z,G=P.length;for(z=0;z68?1900:2e3)};var Bu=Or("FullYear",!0);function sm(){return sr(this.year())}function Rf(g,N,P,z,G,se,Te){var mr;return g<100&&g>=0?(mr=new Date(g+400,N,P,z,G,se,Te),isFinite(mr.getFullYear())&&mr.setFullYear(g)):mr=new Date(g,N,P,z,G,se,Te),mr}function $a(g){var N,P;return g<100&&g>=0?(P=Array.prototype.slice.call(arguments),P[0]=g+400,N=new Date(Date.UTC.apply(null,P)),isFinite(N.getUTCFullYear())&&N.setUTCFullYear(g)):N=new Date(Date.UTC.apply(null,arguments)),N}function Za(g,N,P){var z=7+N-P,G=(7+$a(g,0,z).getUTCDay()-N)%7;return-G+z-1}function Lf(g,N,P,z,G){var se=(7+P-z)%7,Te=Za(g,z,G),mr=1+7*(N-1)+se+Te,Tr,et;return mr<=0?(Tr=g-1,et=Ji(Tr)+mr):mr>Ji(g)?(Tr=g+1,et=mr-Ji(g)):(Tr=g,et=mr),{year:Tr,dayOfYear:et}}function Qa(g,N,P){var z=Za(g.year(),N,P),G=Math.floor((g.dayOfYear()-z-1)/7)+1,se,Te;return G<1?(Te=g.year()-1,se=G+Vn(Te,N,P)):G>Vn(g.year(),N,P)?(se=G-Vn(g.year(),N,P),Te=g.year()+1):(Te=g.year(),se=G),{week:se,year:Te}}function Vn(g,N,P){var z=Za(g,N,P),G=Za(g+1,N,P);return(Ji(g)-z+G)/7}H("w",["ww",2],"wo","week"),H("W",["WW",2],"Wo","isoWeek"),ne("week","w"),ne("isoWeek","W"),Le("week",5),Le("isoWeek",5),rr("w",Q),rr("ww",Q,_e),rr("W",Q),rr("WW",Q,_e),ga(["w","ww","W","WW"],function(g,N,P,z){N[z.substr(0,1)]=Xe(g)});function Iu(g){return Qa(g,this._week.dow,this._week.doy).week}var Xa={dow:0,doy:6};function qf(){return this._week.dow}function Uf(){return this._week.doy}function um(g){var N=this.localeData().week(this);return g==null?N:this.add((g-N)*7,"d")}function zf(g){var N=Qa(this,1,4).week;return g==null?N:this.add((g-N)*7,"d")}H("d",0,"do","day"),H("dd",0,0,function(g){return this.localeData().weekdaysMin(this,g)}),H("ddd",0,0,function(g){return this.localeData().weekdaysShort(this,g)}),H("dddd",0,0,function(g){return this.localeData().weekdays(this,g)}),H("e",0,0,"weekday"),H("E",0,0,"isoWeekday"),ne("day","d"),ne("weekday","e"),ne("isoWeekday","E"),Le("day",11),Le("weekday",11),Le("isoWeekday",11),rr("d",Q),rr("e",Q),rr("E",Q),rr("dd",function(g,N){return N.weekdaysMinRegex(g)}),rr("ddd",function(g,N){return N.weekdaysShortRegex(g)}),rr("dddd",function(g,N){return N.weekdaysRegex(g)}),ga(["dd","ddd","dddd"],function(g,N,P,z){var G=P._locale.weekdaysParse(g,z,P._strict);G!=null?N.d=G:x(P).invalidWeekday=g}),ga(["d","e","E"],function(g,N,P,z){N[z]=Xe(g)});function Wf(g,N){return typeof g!="string"?g:isNaN(g)?(g=N.weekdaysParse(g),typeof g=="number"?g:null):parseInt(g,10)}function Vf(g,N){return typeof g=="string"?N.weekdaysParse(g)%7||7:isNaN(g)?null:g}function ms(g,N){return g.slice(N,7).concat(g.slice(0,N))}var fm="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Yf="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),lm="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Hf=Ci,cm=Ci,pm=Ci;function mm(g,N){var P=n(this._weekdays)?this._weekdays:this._weekdays[g&&g!==!0&&this._weekdays.isFormat.test(N)?"format":"standalone"];return g===!0?ms(P,this._week.dow):g?P[g.day()]:P}function hm(g){return g===!0?ms(this._weekdaysShort,this._week.dow):g?this._weekdaysShort[g.day()]:this._weekdaysShort}function Pu(g){return g===!0?ms(this._weekdaysMin,this._week.dow):g?this._weekdaysMin[g.day()]:this._weekdaysMin}function dm(g,N,P){var z,G,se,Te=g.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],z=0;z<7;++z)se=h([2e3,1]).day(z),this._minWeekdaysParse[z]=this.weekdaysMin(se,"").toLocaleLowerCase(),this._shortWeekdaysParse[z]=this.weekdaysShort(se,"").toLocaleLowerCase(),this._weekdaysParse[z]=this.weekdays(se,"").toLocaleLowerCase();return P?N==="dddd"?(G=pt.call(this._weekdaysParse,Te),G!==-1?G:null):N==="ddd"?(G=pt.call(this._shortWeekdaysParse,Te),G!==-1?G:null):(G=pt.call(this._minWeekdaysParse,Te),G!==-1?G:null):N==="dddd"?(G=pt.call(this._weekdaysParse,Te),G!==-1||(G=pt.call(this._shortWeekdaysParse,Te),G!==-1)?G:(G=pt.call(this._minWeekdaysParse,Te),G!==-1?G:null)):N==="ddd"?(G=pt.call(this._shortWeekdaysParse,Te),G!==-1||(G=pt.call(this._weekdaysParse,Te),G!==-1)?G:(G=pt.call(this._minWeekdaysParse,Te),G!==-1?G:null)):(G=pt.call(this._minWeekdaysParse,Te),G!==-1||(G=pt.call(this._weekdaysParse,Te),G!==-1)?G:(G=pt.call(this._shortWeekdaysParse,Te),G!==-1?G:null))}function vm(g,N,P){var z,G,se;if(this._weekdaysParseExact)return dm.call(this,g,N,P);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),z=0;z<7;z++){if(G=h([2e3,1]).day(z),P&&!this._fullWeekdaysParse[z]&&(this._fullWeekdaysParse[z]=new RegExp("^"+this.weekdays(G,"").replace(".","\\\\.?")+"$","i"),this._shortWeekdaysParse[z]=new RegExp("^"+this.weekdaysShort(G,"").replace(".","\\\\.?")+"$","i"),this._minWeekdaysParse[z]=new RegExp("^"+this.weekdaysMin(G,"").replace(".","\\\\.?")+"$","i")),this._weekdaysParse[z]||(se="^"+this.weekdays(G,"")+"|^"+this.weekdaysShort(G,"")+"|^"+this.weekdaysMin(G,""),this._weekdaysParse[z]=new RegExp(se.replace(".",""),"i")),P&&N==="dddd"&&this._fullWeekdaysParse[z].test(g))return z;if(P&&N==="ddd"&&this._shortWeekdaysParse[z].test(g))return z;if(P&&N==="dd"&&this._minWeekdaysParse[z].test(g))return z;if(!P&&this._weekdaysParse[z].test(g))return z}}function gm(g){if(!this.isValid())return g!=null?this:NaN;var N=this._isUTC?this._d.getUTCDay():this._d.getDay();return g!=null?(g=Wf(g,this.localeData()),this.add(g-N,"d")):N}function xm(g){if(!this.isValid())return g!=null?this:NaN;var N=(this.day()+7-this.localeData()._week.dow)%7;return g==null?N:this.add(g-N,"d")}function ym(g){if(!this.isValid())return g!=null?this:NaN;if(g!=null){var N=Vf(g,this.localeData());return this.day(this.day()%7?N:N-7)}else return this.day()||7}function dt(g){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||ku.call(this),g?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Hf),this._weekdaysStrictRegex&&g?this._weekdaysStrictRegex:this._weekdaysRegex)}function mt(g){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||ku.call(this),g?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=cm),this._weekdaysShortStrictRegex&&g?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function bm(g){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||ku.call(this),g?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=pm),this._weekdaysMinStrictRegex&&g?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function ku(){function g(sn,ui){return ui.length-sn.length}var N=[],P=[],z=[],G=[],se,Te,mr,Tr,et;for(se=0;se<7;se++)Te=h([2e3,1]).day(se),mr=nn(this.weekdaysMin(Te,"")),Tr=nn(this.weekdaysShort(Te,"")),et=nn(this.weekdays(Te,"")),N.push(mr),P.push(Tr),z.push(et),G.push(mr),G.push(Tr),G.push(et);N.sort(g),P.sort(g),z.sort(g),G.sort(g),this._weekdaysRegex=new RegExp("^("+G.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+z.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+P.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+N.join("|")+")","i")}function Ru(){return this.hours()%12||12}function wm(){return this.hours()||24}H("H",["HH",2],0,"hour"),H("h",["hh",2],0,Ru),H("k",["kk",2],0,wm),H("hmm",0,0,function(){return""+Ru.apply(this)+j(this.minutes(),2)}),H("hmmss",0,0,function(){return""+Ru.apply(this)+j(this.minutes(),2)+j(this.seconds(),2)}),H("Hmm",0,0,function(){return""+this.hours()+j(this.minutes(),2)}),H("Hmmss",0,0,function(){return""+this.hours()+j(this.minutes(),2)+j(this.seconds(),2)});function Gf(g,N){H(g,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),N)})}Gf("a",!0),Gf("A",!1),ne("hour","h"),Le("hour",13);function $f(g,N){return N._meridiemParse}rr("a",$f),rr("A",$f),rr("H",Q),rr("h",Q),rr("k",Q),rr("HH",Q,_e),rr("hh",Q,_e),rr("kk",Q,_e),rr("hmm",ve),rr("hmmss",Be),rr("Hmm",ve),rr("Hmmss",Be),nt(["H","HH"],At),nt(["k","kk"],function(g,N,P){var z=Xe(g);N[At]=z===24?0:z}),nt(["a","A"],function(g,N,P){P._isPm=P._locale.isPM(g),P._meridiem=g}),nt(["h","hh"],function(g,N,P){N[At]=Xe(g),x(P).bigHour=!0}),nt("hmm",function(g,N,P){var z=g.length-2;N[At]=Xe(g.substr(0,z)),N[gn]=Xe(g.substr(z)),x(P).bigHour=!0}),nt("hmmss",function(g,N,P){var z=g.length-4,G=g.length-2;N[At]=Xe(g.substr(0,z)),N[gn]=Xe(g.substr(z,2)),N[Wn]=Xe(g.substr(G)),x(P).bigHour=!0}),nt("Hmm",function(g,N,P){var z=g.length-2;N[At]=Xe(g.substr(0,z)),N[gn]=Xe(g.substr(z))}),nt("Hmmss",function(g,N,P){var z=g.length-4,G=g.length-2;N[At]=Xe(g.substr(0,z)),N[gn]=Xe(g.substr(z,2)),N[Wn]=Xe(g.substr(G))});function Zf(g){return(g+"").toLowerCase().charAt(0)==="p"}var Dm=/[ap]\\.?m?\\.?/i,Wt=Or("Hours",!0);function Lu(g,N,P){return g>11?P?"pm":"PM":P?"am":"AM"}var Ki={calendar:q,longDateFormat:Se,invalidDate:be,ordinal:Ae,dayOfMonthOrdinalParse:ze,relativeTime:K,months:_u,monthsShort:fs,week:Xa,weekdays:fm,weekdaysMin:lm,weekdaysShort:Yf,meridiemParse:Dm},vt={},ya={},en;function Qf(g,N){var P,z=Math.min(g.length,N.length);for(P=0;P0;){if(G=To(se.slice(0,P).join("-")),G)return G;if(z&&z.length>=P&&Qf(se,z)>=P-1)break;P--}N++}return en}function Jf(g){return g.match("^[^/\\\\\\\\]*$")!=null}function To(g){var N=null,P;if(vt[g]===void 0&&typeof Ws<"u"&&Ws&&Ws.exports&&Jf(g))try{N=en._abbr,P=require,P("./locale/"+g),Ti(N)}catch{vt[g]=null}return vt[g]}function Ti(g,N){var P;return g&&(l(N)?P=Tt(g):P=an(g,N),P?en=P:typeof console<"u"&&console.warn&&console.warn("Locale "+g+" not found. Did you forget to load it?")),en._abbr}function an(g,N){if(N!==null){var P,z=Ki;if(N.abbr=g,vt[g]!=null)_("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),z=vt[g]._config;else if(N.parentLocale!=null)if(vt[N.parentLocale]!=null)z=vt[N.parentLocale]._config;else if(P=To(N.parentLocale),P!=null)z=P._config;else return ya[N.parentLocale]||(ya[N.parentLocale]=[]),ya[N.parentLocale].push({name:g,config:N}),null;return vt[g]=new $(Y(z,N)),ya[g]&&ya[g].forEach(function(G){an(G.name,G.config)}),Ti(g),vt[g]}else return delete vt[g],null}function Sm(g,N){if(N!=null){var P,z,G=Ki;vt[g]!=null&&vt[g].parentLocale!=null?vt[g].set(Y(vt[g]._config,N)):(z=To(g),z!=null&&(G=z._config),N=Y(G,N),z==null&&(N.abbr=g),P=new $(N),P.parentLocale=vt[g],vt[g]=P),Ti(g)}else vt[g]!=null&&(vt[g].parentLocale!=null?(vt[g]=vt[g].parentLocale,g===Ti()&&Ti(g)):vt[g]!=null&&delete vt[g]);return vt[g]}function Tt(g){var N;if(g&&g._locale&&g._locale._abbr&&(g=g._locale._abbr),!g)return en;if(!n(g)){if(N=To(g),N)return N;g=[g]}return Xf(g)}function Nm(){return V(vt)}function hs(g){var N,P=g._a;return P&&x(g).overflow===-2&&(N=P[En]<0||P[En]>11?En:P[Cn]<1||P[Cn]>Ga(P[zt],P[En])?Cn:P[At]<0||P[At]>24||P[At]===24&&(P[gn]!==0||P[Wn]!==0||P[Mi]!==0)?At:P[gn]<0||P[gn]>59?gn:P[Wn]<0||P[Wn]>59?Wn:P[Mi]<0||P[Mi]>999?Mi:-1,x(g)._overflowDayOfYear&&(NCn)&&(N=Cn),x(g)._overflowWeeks&&N===-1&&(N=Cu),x(g)._overflowWeekday&&N===-1&&(N=Ha),x(g).overflow=N),g}var ji=/^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,ds=/^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,Uu=/Z|[+-]\\d\\d(?::?\\d\\d)?/,ct=[["YYYYYY-MM-DD",/[+-]\\d{6}-\\d\\d-\\d\\d/],["YYYY-MM-DD",/\\d{4}-\\d\\d-\\d\\d/],["GGGG-[W]WW-E",/\\d{4}-W\\d\\d-\\d/],["GGGG-[W]WW",/\\d{4}-W\\d\\d/,!1],["YYYY-DDD",/\\d{4}-\\d{3}/],["YYYY-MM",/\\d{4}-\\d\\d/,!1],["YYYYYYMMDD",/[+-]\\d{10}/],["YYYYMMDD",/\\d{8}/],["GGGG[W]WWE",/\\d{4}W\\d{3}/],["GGGG[W]WW",/\\d{4}W\\d{2}/,!1],["YYYYDDD",/\\d{7}/],["YYYYMM",/\\d{6}/,!1],["YYYY",/\\d{4}/,!1]],ni=[["HH:mm:ss.SSSS",/\\d\\d:\\d\\d:\\d\\d\\.\\d+/],["HH:mm:ss,SSSS",/\\d\\d:\\d\\d:\\d\\d,\\d+/],["HH:mm:ss",/\\d\\d:\\d\\d:\\d\\d/],["HH:mm",/\\d\\d:\\d\\d/],["HHmmss.SSSS",/\\d\\d\\d\\d\\d\\d\\.\\d+/],["HHmmss,SSSS",/\\d\\d\\d\\d\\d\\d,\\d+/],["HHmmss",/\\d\\d\\d\\d\\d\\d/],["HHmm",/\\d\\d\\d\\d/],["HH",/\\d\\d/]],zu=/^\\/?Date\\((-?\\d+)/i,Am=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,Wu={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Kf(g){var N,P,z=g._i,G=ji.exec(z)||ds.exec(z),se,Te,mr,Tr,et=ct.length,sn=ni.length;if(G){for(x(g).iso=!0,N=0,P=et;NJi(Te)||g._dayOfYear===0)&&(x(g)._overflowDayOfYear=!0),P=$a(Te,0,g._dayOfYear),g._a[En]=P.getUTCMonth(),g._a[Cn]=P.getUTCDate()),N=0;N<3&&g._a[N]==null;++N)g._a[N]=z[N]=G[N];for(;N<7;N++)g._a[N]=z[N]=g._a[N]==null?N===2?1:0:g._a[N];g._a[At]===24&&g._a[gn]===0&&g._a[Wn]===0&&g._a[Mi]===0&&(g._nextDay=!0,g._a[At]=0),g._d=(g._useUTC?$a:Rf).apply(null,z),se=g._useUTC?g._d.getUTCDay():g._d.getDay(),g._tzm!=null&&g._d.setUTCMinutes(g._d.getUTCMinutes()-g._tzm),g._nextDay&&(g._a[At]=24),g._w&&typeof g._w.d<"u"&&g._w.d!==se&&(x(g).weekdayMismatch=!0)}}function tl(g){var N,P,z,G,se,Te,mr,Tr,et;N=g._w,N.GG!=null||N.W!=null||N.E!=null?(se=1,Te=4,P=ba(N.GG,g._a[zt],Qa(ht(),1,4).year),z=ba(N.W,1),G=ba(N.E,1),(G<1||G>7)&&(Tr=!0)):(se=g._locale._week.dow,Te=g._locale._week.doy,et=Qa(ht(),se,Te),P=ba(N.gg,g._a[zt],et.year),z=ba(N.w,et.week),N.d!=null?(G=N.d,(G<0||G>6)&&(Tr=!0)):N.e!=null?(G=N.e+se,(N.e<0||N.e>6)&&(Tr=!0)):G=se),z<1||z>Vn(P,se,Te)?x(g)._overflowWeeks=!0:Tr!=null?x(g)._overflowWeekday=!0:(mr=Lf(P,z,G,se,Te),g._a[zt]=mr.year,g._dayOfYear=mr.dayOfYear)}r.ISO_8601=function(){},r.RFC_2822=function(){};function Yu(g){if(g._f===r.ISO_8601){Kf(g);return}if(g._f===r.RFC_2822){el(g);return}g._a=[],x(g).empty=!0;var N=""+g._i,P,z,G,se,Te,mr=N.length,Tr=0,et,sn;for(G=ge(g._f,g._locale).match(U)||[],sn=G.length,P=0;P0&&x(g).unusedInput.push(Te),N=N.slice(N.indexOf(z)+z.length),Tr+=z.length),ie[se]?(z?x(g).empty=!1:x(g).unusedTokens.push(se),Eu(se,z,g)):g._strict&&!z&&x(g).unusedTokens.push(se);x(g).charsLeftOver=mr-Tr,N.length>0&&x(g).unusedInput.push(N),g._a[At]<=12&&x(g).bigHour===!0&&g._a[At]>0&&(x(g).bigHour=void 0),x(g).parsedDateParts=g._a.slice(0),x(g).meridiem=g._meridiem,g._a[At]=Hu(g._locale,g._a[At],g._meridiem),et=x(g).era,et!==null&&(g._a[zt]=g._locale.erasConvertYear(et,g._a[zt])),Fo(g),hs(g)}function Hu(g,N,P){var z;return P==null?N:g.meridiemHour!=null?g.meridiemHour(N,P):(g.isPM!=null&&(z=g.isPM(P),z&&N<12&&(N+=12),!z&&N===12&&(N=0)),N)}function Gu(g){var N,P,z,G,se,Te,mr=!1,Tr=g._f.length;if(Tr===0){x(g).invalidFormat=!0,g._d=new Date(NaN);return}for(G=0;Gthis?this:g:w()});function al(g,N){var P,z;if(N.length===1&&n(N[0])&&(N=N[0]),!N.length)return ht();for(P=N[0],z=1;zthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Fe(){if(!l(this._isDSTShifted))return this._isDSTShifted;var g={},N;return A(g,this),g=cn(g),g._a?(N=g._isUTC?h(g._a):ht(g._a),this._isDSTShifted=this.isValid()&&Pm(g._a,N.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Ne(){return this.isValid()?!this._isUTC:!1}function nr(){return this.isValid()?this._isUTC:!1}function Nr(){return this.isValid()?this._isUTC&&this._offset===0:!1}var jr=/^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,Pt=/^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function kr(g,N){var P=g,z=null,G,se,Te;return Yn(g)?P={ms:g._milliseconds,d:g._days,M:g._months}:f(g)||!isNaN(+g)?(P={},N?P[N]=+g:P.milliseconds=+g):(z=jr.exec(g))?(G=z[1]==="-"?-1:1,P={y:0,d:Xe(z[Cn])*G,h:Xe(z[At])*G,m:Xe(z[gn])*G,s:Xe(z[Wn])*G,ms:Xe(ja(z[Mi]*1e3))*G}):(z=Pt.exec(g))?(G=z[1]==="-"?-1:1,P={y:Fi(z[2],G),M:Fi(z[3],G),w:Fi(z[4],G),d:Fi(z[5],G),h:Fi(z[6],G),m:Fi(z[7],G),s:Fi(z[8],G)}):P==null?P={}:typeof P=="object"&&("from"in P||"to"in P)&&(Te=Mn(ht(P.from),ht(P.to)),P={},P.ms=Te.milliseconds,P.M=Te.months),se=new Oo(P),Yn(g)&&a(g,"_locale")&&(se._locale=g._locale),Yn(g)&&a(g,"_isValid")&&(se._isValid=g._isValid),se}kr.fn=Oo.prototype,kr.invalid=Zu;function Fi(g,N){var P=g&&parseFloat(g.replace(",","."));return(isNaN(P)?0:P)*N}function sl(g,N){var P={};return P.months=N.month()-g.month()+(N.year()-g.year())*12,g.clone().add(P.months,"M").isAfter(N)&&--P.months,P.milliseconds=+N-+g.clone().add(P.months,"M"),P}function Mn(g,N){var P;return g.isValid()&&N.isValid()?(N=xn(N,g),g.isBefore(N)?P=sl(g,N):(P=sl(N,g),P.milliseconds=-P.milliseconds,P.months=-P.months),P):{milliseconds:0,months:0}}function Bo(g,N){return function(P,z){var G,se;return z!==null&&!isNaN(+z)&&(_(N,"moment()."+N+"(period, number) is deprecated. Please use moment()."+N+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),se=P,P=z,z=se),G=kr(P,z),ul(this,G,g),this}}function ul(g,N,P,z){var G=N._milliseconds,se=ja(N._days),Te=ja(N._months);!g.isValid()||(z=z??!0,Te&&Xi(g,re(g,"Month")+Te*P),se&&le(g,"Date",re(g,"Date")+se*P),G&&g._d.setTime(g._d.valueOf()+G*P),z&&r.updateOffset(g,se||Te))}var eo=Bo(1,"add"),xs=Bo(-1,"subtract");function Io(g){return typeof g=="string"||g instanceof String}function at(g){return S(g)||o(g)||Io(g)||f(g)||fl(g)||Wm(g)||g===null||g===void 0}function Wm(g){var N=i(g)&&!s(g),P=!1,z=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],G,se,Te=z.length;for(G=0;GP.valueOf():P.valueOf()9999?pe(P,N?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):k(Date.prototype.toISOString)?N?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",pe(P,"Z")):pe(P,N?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Da(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var g="moment",N="",P,z,G,se;return this.isLocal()||(g=this.utcOffset()===0?"moment.utc":"moment.parseZone",N="Z"),P="["+g+'("]',z=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",G="-MM-DD[T]HH:mm:ss.SSS",se=N+'[")]',this.format(P+z+G+se)}function Ss(g){g||(g=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var N=pe(this,g);return this.localeData().postformat(N)}function Gm(g,N){return this.isValid()&&(S(g)&&g.isValid()||ht(g).isValid())?kr({to:this,from:g}).locale(this.locale()).humanize(!N):this.localeData().invalidDate()}function $m(g){return this.from(ht(),g)}function Zm(g,N){return this.isValid()&&(S(g)&&g.isValid()||ht(g).isValid())?kr({from:this,to:g}).locale(this.locale()).humanize(!N):this.localeData().invalidDate()}function Ns(g){return this.to(ht(),g)}function ko(g){var N;return g===void 0?this._locale._abbr:(N=Tt(g),N!=null&&(this._locale=N),this)}var As=F("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(g){return g===void 0?this.localeData():this.locale(g)});function hl(){return this._locale}var Ro=1e3,ro=60*Ro,Es=60*ro,Ft=(365*400+97)*24*Es;function Et(g,N){return(g%N+N)%N}function dl(g,N,P){return g<100&&g>=0?new Date(g+400,N,P)-Ft:new Date(g,N,P).valueOf()}function vl(g,N,P){return g<100&&g>=0?Date.UTC(g+400,N,P)-Ft:Date.UTC(g,N,P)}function gl(g){var N,P;if(g=ue(g),g===void 0||g==="millisecond"||!this.isValid())return this;switch(P=this._isUTC?vl:dl,g){case"year":N=P(this.year(),0,1);break;case"quarter":N=P(this.year(),this.month()-this.month()%3,1);break;case"month":N=P(this.year(),this.month(),1);break;case"week":N=P(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":N=P(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":N=P(this.year(),this.month(),this.date());break;case"hour":N=this._d.valueOf(),N-=Et(N+(this._isUTC?0:this.utcOffset()*ro),Es);break;case"minute":N=this._d.valueOf(),N-=Et(N,ro);break;case"second":N=this._d.valueOf(),N-=Et(N,Ro);break}return this._d.setTime(N),r.updateOffset(this,!0),this}function Qm(g){var N,P;if(g=ue(g),g===void 0||g==="millisecond"||!this.isValid())return this;switch(P=this._isUTC?vl:dl,g){case"year":N=P(this.year()+1,0,1)-1;break;case"quarter":N=P(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":N=P(this.year(),this.month()+1,1)-1;break;case"week":N=P(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":N=P(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":N=P(this.year(),this.month(),this.date()+1)-1;break;case"hour":N=this._d.valueOf(),N+=Es-Et(N+(this._isUTC?0:this.utcOffset()*ro),Es)-1;break;case"minute":N=this._d.valueOf(),N+=ro-Et(N,ro)-1;break;case"second":N=this._d.valueOf(),N+=Ro-Et(N,Ro)-1;break}return this._d.setTime(N),r.updateOffset(this,!0),this}function Qu(){return this._d.valueOf()-(this._offset||0)*6e4}function Lo(){return Math.floor(this.valueOf()/1e3)}function Xu(){return new Date(this.valueOf())}function to(){var g=this;return[g.year(),g.month(),g.date(),g.hour(),g.minute(),g.second(),g.millisecond()]}function qo(){var g=this;return{years:g.year(),months:g.month(),date:g.date(),hours:g.hours(),minutes:g.minutes(),seconds:g.seconds(),milliseconds:g.milliseconds()}}function Uo(){return this.isValid()?this.toISOString():null}function Cs(){return y(this)}function no(){return p({},x(this))}function Xm(){return x(this).overflow}function Jm(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}H("N",0,0,"eraAbbr"),H("NN",0,0,"eraAbbr"),H("NNN",0,0,"eraAbbr"),H("NNNN",0,0,"eraName"),H("NNNNN",0,0,"eraNarrow"),H("y",["y",1],"yo","eraYear"),H("y",["yy",2],0,"eraYear"),H("y",["yyy",3],0,"eraYear"),H("y",["yyyy",4],0,"eraYear"),rr("N",Ir),rr("NN",Ir),rr("NNN",Ir),rr("NNNN",rh),rr("NNNNN",th),nt(["N","NN","NNN","NNNN","NNNNN"],function(g,N,P,z){var G=P._locale.erasParse(g,z,P._strict);G?x(P).era=G:x(P).invalidEra=g}),rr("y",_t),rr("yy",_t),rr("yyy",_t),rr("yyyy",_t),rr("yo",nh),nt(["y","yy","yyy","yyyy"],zt),nt(["yo"],function(g,N,P,z){var G;P._locale._eraYearOrdinalRegex&&(G=g.match(P._locale._eraYearOrdinalRegex)),P._locale.eraYearOrdinalParse?N[zt]=P._locale.eraYearOrdinalParse(g,G):N[zt]=parseInt(g,10)});function Km(g,N){var P,z,G,se=this._eras||Tt("en")._eras;for(P=0,z=se.length;P=0)return se[z]}function eh(g,N){var P=g.since<=g.until?1:-1;return N===void 0?r(g.since).year():r(g.since).year()+(N-g.offset)*P}function Ms(){var g,N,P,z=this.localeData().eras();for(g=0,N=z.length;gse&&(N=se),fh.call(this,g,N,P,z,G))}function fh(g,N,P,z,G){var se=Lf(g,N,P,z,G),Te=$a(se.year,0,se.dayOfYear);return this.year(Te.getUTCFullYear()),this.month(Te.getUTCMonth()),this.date(Te.getUTCDate()),this}H("Q",0,"Qo","quarter"),ne("quarter","Q"),Le("quarter",7),rr("Q",ke),nt("Q",function(g,N){N[En]=(Xe(g)-1)*3});function lh(g){return g==null?Math.ceil((this.month()+1)/3):this.month((g-1)*3+this.month()%3)}H("D",["DD",2],"Do","date"),ne("date","D"),Le("date",9),rr("D",Q),rr("DD",Q,_e),rr("Do",function(g,N){return g?N._dayOfMonthOrdinalParse||N._ordinalParse:N._dayOfMonthOrdinalParseLenient}),nt(["D","DD"],Cn),nt("Do",function(g,N){N[Cn]=Xe(g.match(Q)[0])});var bl=Or("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear"),ne("dayOfYear","DDD"),Le("dayOfYear",4),rr("DDD",er),rr("DDDD",Pe),nt(["DDD","DDDD"],function(g,N,P){P._dayOfYear=Xe(g)});function Ii(g){var N=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return g==null?N:this.add(g-N,"d")}H("m",["mm",2],0,"minute"),ne("minute","m"),Le("minute",14),rr("m",Q),rr("mm",Q,_e),nt(["m","mm"],gn);var ch=Or("Minutes",!1);H("s",["ss",2],0,"second"),ne("second","s"),Le("second",15),rr("s",Q),rr("ss",Q,_e),nt(["s","ss"],Wn);var ph=Or("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)}),H(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),H(0,["SSS",3],0,"millisecond"),H(0,["SSSS",4],0,function(){return this.millisecond()*10}),H(0,["SSSSS",5],0,function(){return this.millisecond()*100}),H(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),H(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),H(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),H(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),ne("millisecond","ms"),Le("millisecond",16),rr("S",er,ke),rr("SS",er,_e),rr("SSS",er,Pe);var na,wl;for(na="SSSS";na.length<=9;na+="S")rr(na,_t);function mh(g,N){N[Mi]=Xe(("0."+g)*1e3)}for(na="S";na.length<=9;na+="S")nt(na,mh);wl=Or("Milliseconds",!1),H("z",0,0,"zoneAbbr"),H("zz",0,0,"zoneName");function Sa(){return this._isUTC?"UTC":""}function hh(){return this._isUTC?"Coordinated Universal Time":""}var Ye=E.prototype;Ye.add=eo,Ye.calendar=Ym,Ye.clone=Hm,Ye.diff=pl,Ye.endOf=Qm,Ye.format=Ss,Ye.from=Gm,Ye.fromNow=$m,Ye.to=Zm,Ye.toNow=Ns,Ye.get=we,Ye.invalidAt=Xm,Ye.isAfter=bs,Ye.isBefore=ta,Ye.isBetween=ws,Ye.isSame=ll,Ye.isSameOrAfter=Ds,Ye.isSameOrBefore=cl,Ye.isValid=Cs,Ye.lang=As,Ye.locale=ko,Ye.localeData=hl,Ye.max=_m,Ye.min=il,Ye.parsingFlags=no,Ye.set=Oe,Ye.startOf=gl,Ye.subtract=xs,Ye.toArray=to,Ye.toObject=qo,Ye.toDate=Xu,Ye.toISOString=Po,Ye.inspect=Da,typeof Symbol<"u"&&Symbol.for!=null&&(Ye[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Ye.toJSON=Uo,Ye.toString=ml,Ye.unix=Lo,Ye.valueOf=Qu,Ye.creationData=Jm,Ye.eraName=Ms,Ye.eraNarrow=zo,Ye.eraAbbr=xl,Ye.eraYear=Z,Ye.year=Bu,Ye.isLeapYear=sm,Ye.weekYear=ih,Ye.isoWeekYear=ah,Ye.quarter=Ye.quarters=lh,Ye.month=_i,Ye.daysInMonth=ps,Ye.week=Ye.weeks=um,Ye.isoWeek=Ye.isoWeeks=zf,Ye.weeksInYear=Bi,Ye.weeksInWeekYear=uh,Ye.isoWeeksInYear=oh,Ye.isoWeeksInISOWeekYear=sh,Ye.date=bl,Ye.day=Ye.days=gm,Ye.weekday=xm,Ye.isoWeekday=ym,Ye.dayOfYear=Ii,Ye.hour=Ye.hours=Wt,Ye.minute=Ye.minutes=ch,Ye.second=Ye.seconds=ph,Ye.millisecond=Ye.milliseconds=wl,Ye.utcOffset=Rm,Ye.utc=qm,Ye.local=Um,Ye.parseZone=zm,Ye.hasAlignedHourOffset=ra,Ye.isDST=he,Ye.isLocal=Ne,Ye.isUtcOffset=nr,Ye.isUtc=Nr,Ye.isUTC=Nr,Ye.zoneAbbr=Sa,Ye.zoneName=hh,Ye.dates=F("dates accessor is deprecated. Use date instead.",bl),Ye.months=F("months accessor is deprecated. Use month instead",_i),Ye.years=F("years accessor is deprecated. Use year instead",Bu),Ye.zone=F("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Lm),Ye.isDSTShifted=F("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Fe);function Hn(g){return ht(g*1e3)}function dh(){return ht.apply(null,arguments).parseZone()}function Dl(g){return g}var Qr=$.prototype;Qr.calendar=R,Qr.longDateFormat=xe,Qr.invalidDate=De,Qr.ordinal=Ze,Qr.preparse=Dl,Qr.postformat=Dl,Qr.relativeTime=te,Qr.pastFuture=ye,Qr.set=L,Qr.eras=Km,Qr.erasParse=jm,Qr.erasConvertYear=eh,Qr.erasAbbrRegex=_s,Qr.erasNameRegex=io,Qr.erasNarrowRegex=_n,Qr.months=xa,Qr.monthsShort=Kr,Qr.monthsParse=Tu,Qr.monthsRegex=om,Qr.monthsShortRegex=Fu,Qr.week=Iu,Qr.firstDayOfYear=Uf,Qr.firstDayOfWeek=qf,Qr.weekdays=mm,Qr.weekdaysMin=Pu,Qr.weekdaysShort=hm,Qr.weekdaysParse=vm,Qr.weekdaysRegex=dt,Qr.weekdaysShortRegex=mt,Qr.weekdaysMinRegex=bm,Qr.isPM=Zf,Qr.meridiem=Lu;function Fs(g,N,P,z){var G=Tt(),se=h().set(z,N);return G[P](se,g)}function Sl(g,N,P){if(f(g)&&(N=g,g=void 0),g=g||"",N!=null)return Fs(g,N,P,"month");var z,G=[];for(z=0;z<12;z++)G[z]=Fs(g,z,P,"month");return G}function Os(g,N,P,z){typeof g=="boolean"?(f(N)&&(P=N,N=void 0),N=N||""):(N=g,P=N,g=!1,f(N)&&(P=N,N=void 0),N=N||"");var G=Tt(),se=g?G._week.dow:0,Te,mr=[];if(P!=null)return Fs(N,(P+se)%7,z,"day");for(Te=0;Te<7;Te++)mr[Te]=Fs(N,(Te+se)%7,z,"day");return mr}function Nl(g,N){return Sl(g,N,"months")}function vh(g,N){return Sl(g,N,"monthsShort")}function gh(g,N,P){return Os(g,N,P,"weekdays")}function Ju(g,N,P){return Os(g,N,P,"weekdaysShort")}function Wo(g,N,P){return Os(g,N,P,"weekdaysMin")}Ti("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\\d{1,2}(th|st|nd|rd)/,ordinal:function(g){var N=g%10,P=Xe(g%100/10)===1?"th":N===1?"st":N===2?"nd":N===3?"rd":"th";return g+P}}),r.lang=F("moment.lang is deprecated. Use moment.locale instead.",Ti),r.langData=F("moment.langData is deprecated. Use moment.localeData instead.",Tt);var Tn=Math.abs;function xh(){var g=this._data;return this._milliseconds=Tn(this._milliseconds),this._days=Tn(this._days),this._months=Tn(this._months),g.milliseconds=Tn(g.milliseconds),g.seconds=Tn(g.seconds),g.minutes=Tn(g.minutes),g.hours=Tn(g.hours),g.months=Tn(g.months),g.years=Tn(g.years),this}function Ku(g,N,P,z){var G=kr(N,P);return g._milliseconds+=z*G._milliseconds,g._days+=z*G._days,g._months+=z*G._months,g._bubble()}function yh(g,N){return Ku(this,g,N,1)}function Pi(g,N){return Ku(this,g,N,-1)}function Bs(g){return g<0?Math.floor(g):Math.ceil(g)}function Na(){var g=this._milliseconds,N=this._days,P=this._months,z=this._data,G,se,Te,mr,Tr;return g>=0&&N>=0&&P>=0||g<=0&&N<=0&&P<=0||(g+=Bs(ju(P)+N)*864e5,N=0,P=0),z.milliseconds=g%1e3,G=ir(g/1e3),z.seconds=G%60,se=ir(G/60),z.minutes=se%60,Te=ir(se/60),z.hours=Te%24,N+=ir(Te/24),Tr=ir(yn(N)),P+=Tr,N-=Bs(ju(Tr)),mr=ir(P/12),P%=12,z.days=N,z.months=P,z.years=mr,this}function yn(g){return g*4800/146097}function ju(g){return g*146097/4800}function Al(g){if(!this.isValid())return NaN;var N,P,z=this._milliseconds;if(g=ue(g),g==="month"||g==="quarter"||g==="year")switch(N=this._days+z/864e5,P=this._months+yn(N),g){case"month":return P;case"quarter":return P/3;case"year":return P/12}else switch(N=this._days+Math.round(ju(this._months)),g){case"week":return N/7+z/6048e5;case"day":return N+z/864e5;case"hour":return N*24+z/36e5;case"minute":return N*1440+z/6e4;case"second":return N*86400+z/1e3;case"millisecond":return Math.floor(N*864e5)+z;default:throw new Error("Unknown unit "+g)}}function El(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+Xe(this._months/12)*31536e6:NaN}function bn(g){return function(){return this.as(g)}}var ia=bn("ms"),Cl=bn("s"),bh=bn("m"),Is=bn("h"),wh=bn("d"),Ml=bn("w"),Ht=bn("M"),ef=bn("Q"),_l=bn("y");function ai(){return kr(this)}function rf(g){return g=ue(g),this.isValid()?this[g+"s"]():NaN}function oi(g){return function(){return this.isValid()?this._data[g]:NaN}}var Aa=oi("milliseconds"),Tl=oi("seconds"),on=oi("minutes"),tf=oi("hours"),Dh=oi("days"),Sh=oi("months"),Nh=oi("years");function nf(){return ir(this.days()/7)}var ki=Math.round,si={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Fl(g,N,P,z,G){return G.relativeTime(N||1,!!P,g,z)}function Ah(g,N,P,z){var G=kr(g).abs(),se=ki(G.as("s")),Te=ki(G.as("m")),mr=ki(G.as("h")),Tr=ki(G.as("d")),et=ki(G.as("M")),sn=ki(G.as("w")),ui=ki(G.as("y")),Ri=se<=P.ss&&["s",se]||se0,Ri[4]=z,Fl.apply(null,Ri)}function Eh(g){return g===void 0?ki:typeof g=="function"?(ki=g,!0):!1}function Vo(g,N){return si[g]===void 0?!1:N===void 0?si[g]:(si[g]=N,g==="s"&&(si.ss=N-1),!0)}function Ch(g,N){if(!this.isValid())return this.localeData().invalidDate();var P=!1,z=si,G,se;return typeof g=="object"&&(N=g,g=!1),typeof g=="boolean"&&(P=g),typeof N=="object"&&(z=Object.assign({},si,N),N.s!=null&&N.ss==null&&(z.ss=N.s-1)),G=this.localeData(),se=Ah(this,!P,z,G),P&&(se=G.pastFuture(+this,se)),G.postformat(se)}var af=Math.abs;function aa(g){return(g>0)-(g<0)||+g}function Yo(){if(!this.isValid())return this.localeData().invalidDate();var g=af(this._milliseconds)/1e3,N=af(this._days),P=af(this._months),z,G,se,Te,mr=this.asSeconds(),Tr,et,sn,ui;return mr?(z=ir(g/60),G=ir(z/60),g%=60,z%=60,se=ir(P/12),P%=12,Te=g?g.toFixed(3).replace(/\\.?0+$/,""):"",Tr=mr<0?"-":"",et=aa(this._months)!==aa(mr)?"-":"",sn=aa(this._days)!==aa(mr)?"-":"",ui=aa(this._milliseconds)!==aa(mr)?"-":"",Tr+"P"+(se?et+se+"Y":"")+(P?et+P+"M":"")+(N?sn+N+"D":"")+(G||z||g?"T":"")+(G?ui+G+"H":"")+(z?ui+z+"M":"")+(g?ui+Te+"S":"")):"P0D"}var Wr=Oo.prototype;Wr.isValid=Im,Wr.abs=xh,Wr.add=yh,Wr.subtract=Pi,Wr.as=Al,Wr.asMilliseconds=ia,Wr.asSeconds=Cl,Wr.asMinutes=bh,Wr.asHours=Is,Wr.asDays=wh,Wr.asWeeks=Ml,Wr.asMonths=Ht,Wr.asQuarters=ef,Wr.asYears=_l,Wr.valueOf=El,Wr._bubble=Na,Wr.clone=ai,Wr.get=rf,Wr.milliseconds=Aa,Wr.seconds=Tl,Wr.minutes=on,Wr.hours=tf,Wr.days=Dh,Wr.weeks=nf,Wr.months=Sh,Wr.years=Nh,Wr.humanize=Ch,Wr.toISOString=Yo,Wr.toString=Yo,Wr.toJSON=Yo,Wr.locale=ko,Wr.localeData=hl,Wr.toIsoString=F("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Yo),Wr.lang=As,H("X",0,0,"unix"),H("x",0,0,"valueOf"),rr("x",Yt),rr("X",Su),nt("X",function(g,N,P){P._d=new Date(parseFloat(g)*1e3)}),nt("x",function(g,N,P){P._d=new Date(Xe(g))});return r.version="2.29.4",t(ht),r.fn=Ye,r.min=Tm,r.max=Fm,r.now=Om,r.utc=h,r.unix=Hn,r.months=Nl,r.isDate=o,r.locale=Ti,r.invalid=w,r.duration=kr,r.isMoment=S,r.weekdays=gh,r.parseZone=dh,r.localeData=Tt,r.isDuration=Yn,r.monthsShort=vh,r.weekdaysMin=Wo,r.defineLocale=an,r.updateLocale=Sm,r.locales=Nm,r.weekdaysShort=Ju,r.normalizeUnits=ue,r.relativeTimeRounding=Eh,r.relativeTimeThreshold=Vo,r.calendarFormat=Vm,r.prototype=Ye,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r})});var yc=un((Ld,qd)=>{(function(e,r){typeof Ld=="object"&&typeof qd<"u"?qd.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self,e["'typed'"]=r())})(Ld,function(){"use strict";function e(){return!0}function r(){return!1}function t(){}let n="Argument is not a typed-function.";function i(){function s(re){return typeof re=="object"&&re!==null&&re.constructor===Object}let l=[{name:"number",test:function(re){return typeof re=="number"}},{name:"string",test:function(re){return typeof re=="string"}},{name:"boolean",test:function(re){return typeof re=="boolean"}},{name:"Function",test:function(re){return typeof re=="function"}},{name:"Array",test:Array.isArray},{name:"Date",test:function(re){return re instanceof Date}},{name:"RegExp",test:function(re){return re instanceof RegExp}},{name:"Object",test:s},{name:"null",test:function(re){return re===null}},{name:"undefined",test:function(re){return re===void 0}}],f={name:"any",test:e,isAny:!0},o,u,p=0,h={createCount:0};function d(re){let le=o.get(re);if(le)return le;let we='Unknown type "'+re+'"',Oe=re.toLowerCase(),ke;for(ke of u)if(ke.toLowerCase()===Oe){we+='. Did you mean "'+ke+'" ?';break}throw new TypeError(we)}function x(re){let le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"any",we=le?d(le).index:u.length,Oe=[];for(let _e=0;_e{let Oe=o.get(we);return!Oe.isAny&&Oe.test(re)});return le.length?le:["any"]}function C(re){return re&&typeof re=="function"&&"_typedFunctionData"in re}function b(re,le,we){if(!C(re))throw new TypeError(n);let Oe=we&&we.exact,ke=Array.isArray(le)?le.join(","):le,_e=_(ke),Pe=S(_e);if(!Oe||Pe in re.signatures){let ve=re._typedFunctionData.signatureMap.get(Pe);if(ve)return ve}let We=_e.length,B;if(Oe){B=[];let ve;for(ve in re.signatures)B.push(re._typedFunctionData.signatureMap.get(ve))}else B=re._typedFunctionData.signatures;for(let ve=0;ve!_t.has(Yt.name)))continue}er.push(fr)}}if(B=er,B.length===0)break}let Q;for(Q of B)if(Q.params.length<=We)return Q;throw new TypeError("Signature not found (signature: "+(re.name||"unnamed")+"("+S(_e,", ")+"))")}function A(re,le,we){return b(re,le,we).implementation}function E(re,le){let we=d(le);if(we.test(re))return re;let Oe=we.conversionsTo;if(Oe.length===0)throw new Error("There are no conversions to "+le+" defined.");for(let ke=0;ke1&&arguments[1]!==void 0?arguments[1]:",";return re.map(we=>we.name).join(le)}function O(re){let le=re.indexOf("...")===0,Oe=(le?re.length>3?re.slice(3):"any":re).split("|").map(We=>d(We.trim())),ke=!1,_e=le?"...":"";return{types:Oe.map(function(We){return ke=We.isAny||ke,_e+=We.name+"|",{name:We.name,typeIndex:We.index,test:We.test,isAny:We.isAny,conversion:null,conversionIndex:-1}}),name:_e.slice(0,-1),hasAny:ke,hasConversion:!1,restParam:le}}function F(re){let le=re.types.map(Pe=>Pe.name),we=H(le),Oe=re.hasAny,ke=re.name,_e=we.map(function(Pe){let We=d(Pe.from);return Oe=We.isAny||Oe,ke+="|"+Pe.from,{name:Pe.from,typeIndex:We.index,test:We.test,isAny:We.isAny,conversion:Pe,conversionIndex:Pe.index}});return{types:re.types.concat(_e),name:ke,hasAny:Oe,hasConversion:_e.length>0,restParam:re.restParam}}function M(re){return re.typeSet||(re.typeSet=new Set,re.types.forEach(le=>re.typeSet.add(le.name))),re.typeSet}function _(re){let le=[];if(typeof re!="string")throw new TypeError("Signatures must be strings");let we=re.trim();if(we==="")return le;let Oe=we.split(",");for(let ke=0;ke=ke+1}}else return re.length===0?function(_e){return _e.length===0}:re.length===1?(we=L(re[0]),function(_e){return we(_e[0])&&_e.length===1}):re.length===2?(we=L(re[0]),Oe=L(re[1]),function(_e){return we(_e[0])&&Oe(_e[1])&&_e.length===2}):(le=re.map(L),function(_e){for(let Pe=0;Pe{let ke=V(Oe.params,le),_e;for(_e of ke)we.add(_e)}),we.has("any")?["any"]:Array.from(we)}function j(re,le,we){let Oe,ke,_e=re||"unnamed",Pe=we,We;for(We=0;We{let fr=$(er.params,We),Zr=L(fr);(We0){let er=w(le[We]);return Oe=new TypeError("Unexpected type of argument in function "+_e+" (expected: "+ke.join(" or ")+", actual: "+er.join(" | ")+", index: "+We+")"),Oe.data={category:"wrongType",fn:_e,index:We,actual:er,expected:ke},Oe}}else Pe=Be}let B=Pe.map(function(Be){return k(Be.params)?1/0:Be.params.length});if(le.lengthQ)return Oe=new TypeError("Too many arguments in function "+_e+" (expected: "+Q+", actual: "+le.length+")"),Oe.data={category:"tooManyArgs",fn:_e,index:le.length,expectedLength:Q},Oe;let ve=[];for(let Be=0;Be0)return 1;let Oe=oe(re)-oe(le);return Oe<0?-1:Oe>0?1:0}function ie(re,le){let we=re.params,Oe=le.params,ke=K(we),_e=K(Oe),Pe=k(we),We=k(Oe);if(Pe&&ke.hasAny){if(!We||!_e.hasAny)return 1}else if(We&&_e.hasAny)return-1;let B=0,Q=0,ve;for(ve of we)ve.hasAny&&++B,ve.hasConversion&&++Q;let Be=0,er=0;for(ve of Oe)ve.hasAny&&++Be,ve.hasConversion&&++er;if(B!==Be)return B-Be;if(Pe&&ke.hasConversion){if(!We||!_e.hasConversion)return 1}else if(We&&_e.hasConversion)return-1;if(Q!==er)return Q-er;if(Pe){if(!We)return 1}else if(We)return-1;let fr=(we.length-Oe.length)*(Pe?-1:1);if(fr!==0)return fr;let Zr=[],_t=0;for(let Qi=0;Qi1&&le.sort((ke,_e)=>ke.index-_e.index);let we=le[0].conversionsTo;if(re.length===1)return we;we=we.concat([]);let Oe=new Set(re);for(let ke=1;keke.hasConversion)){let ke=k(re),_e=re.map(Me);we=function(){let We=[],B=ke?arguments.length-1:arguments.length;for(let Q=0;QB.name).join("|"),hasAny:We.some(B=>B.isAny),hasConversion:!1,restParam:!0}),Pe.push(_e)}else Pe=_e.types.map(function(We){return{types:[We],name:We.name,hasAny:We.isAny,hasConversion:We.conversion,restParam:!1}});return ee(Pe,function(We){return le(we,Oe+1,ke.concat([We]))})}else return[ke]}return le(re,0,[])}function ge(re,le){let we=Math.max(re.length,le.length);for(let We=0;We=Oe:Pe?Oe>=ke:Oe===ke}function Se(re){return re.map(le=>Le(le)?Ee(le.referToSelf.callback):Ce(le)?ue(le.referTo.references,le.referTo.callback):le)}function xe(re,le,we){let Oe=[],ke;for(ke of re){let _e=we[ke];if(typeof _e!="number")throw new TypeError('No definition for referenced signature "'+ke+'"');if(_e=le[_e],typeof _e!="function")return!1;Oe.push(_e)}return Oe}function be(re,le,we){let Oe=Se(re),ke=new Array(Oe.length).fill(!1),_e=!0;for(;_e;){_e=!1;let Pe=!0;for(let We=0;We{let Oe=re[we];if(le.test(Oe.toString()))throw new SyntaxError("Using \`this\` to self-reference a function is deprecated since typed-function@3. Use typed.referTo and typed.referToSelf instead.")})}function Ae(re,le){if(h.createCount++,Object.keys(le).length===0)throw new SyntaxError("No signatures provided");h.warnAgainstDeprecatedThis&&De(le);let we=[],Oe=[],ke={},_e=[],Pe;for(Pe in le){if(!Object.prototype.hasOwnProperty.call(le,Pe))continue;let Kr=_(Pe);if(!Kr)continue;we.forEach(function(_i){if(ge(_i,Kr))throw new TypeError('Conflicting signatures "'+S(_i)+'" and "'+S(Kr)+'".')}),we.push(Kr);let jt=Oe.length;Oe.push(le[Pe]);let Tu=Kr.map(F),Xi;for(Xi of pe(Tu)){let _i=S(Xi);_e.push({params:Xi,name:_i,fn:jt}),Xi.every(ps=>!ps.hasConversion)&&(ke[_i]=jt)}}_e.sort(ie);let We=be(Oe,ke,xa),B;for(B in ke)Object.prototype.hasOwnProperty.call(ke,B)&&(ke[B]=We[ke[B]]);let Q=[],ve=new Map;for(B of _e)ve.has(B.name)||(B.fn=We[B.fn],Q.push(B),ve.set(B.name,B));let Be=Q[0]&&Q[0].params.length<=2&&!k(Q[0].params),er=Q[1]&&Q[1].params.length<=2&&!k(Q[1].params),fr=Q[2]&&Q[2].params.length<=2&&!k(Q[2].params),Zr=Q[3]&&Q[3].params.length<=2&&!k(Q[3].params),_t=Q[4]&&Q[4].params.length<=2&&!k(Q[4].params),Yt=Q[5]&&Q[5].params.length<=2&&!k(Q[5].params),Qi=Be&&er&&fr&&Zr&&_t&&Yt;for(let Kr=0;KrKr.test),ls=Q.map(Kr=>Kr.implementation),cs=function(){for(let jt=_u;jtS(_(we))),le=K(arguments);if(typeof le!="function")throw new TypeError("Callback function expected as last argument");return ue(re,le)}function ue(re,le){return{referTo:{references:re,callback:le}}}function Ee(re){if(typeof re!="function")throw new TypeError("Callback function expected as first argument");return{referToSelf:{callback:re}}}function Ce(re){return re&&typeof re.referTo=="object"&&Array.isArray(re.referTo.references)&&typeof re.referTo.callback=="function"}function Le(re){return re&&typeof re.referToSelf=="object"&&typeof re.referToSelf.callback=="function"}function Ie(re,le){if(!re)return le;if(le&&le!==re){let we=new Error("Function names do not match (expected: "+re+", actual: "+le+")");throw we.data={actual:le,expected:re},we}return re}function sr(re){let le;for(let we in re)Object.prototype.hasOwnProperty.call(re,we)&&(C(re[we])||typeof re[we].signature=="string")&&(le=Ie(le,re[we].name));return le}function ir(re,le){let we;for(we in le)if(Object.prototype.hasOwnProperty.call(le,we)){if(we in re&&le[we]!==re[we]){let Oe=new Error('Signature "'+we+'" is defined twice');throw Oe.data={signature:we,sourceFunction:le[we],destFunction:re[we]},Oe}re[we]=le[we]}}let Xe=h;h=function(re){let le=typeof re=="string",we=le?1:0,Oe=le?re:"",ke={};for(let _e=we;_eke.from===re.from);if(!we)throw new Error("Attempt to remove nonexistent conversion from "+re.from+" to "+re.to);if(we.convert!==re.convert)throw new Error("Conversion to remove does not match existing conversion");let Oe=le.conversionsTo.indexOf(we);le.conversionsTo.splice(Oe,1)},h.resolve=function(re,le){if(!C(re))throw new TypeError(n);let we=re._typedFunctionData.signatures;for(let Oe=0;Oe{(function(e){"use strict";var r=Math.cosh||function(o){return Math.abs(o)<1e-9?1-o:(Math.exp(o)+Math.exp(-o))*.5},t=Math.sinh||function(o){return Math.abs(o)<1e-9?o:(Math.exp(o)-Math.exp(-o))*.5},n=function(o){var u=Math.PI/4;if(-u>o||o>u)return Math.cos(o)-1;var p=o*o;return p*(p*(p*(p*(p*(p*(p*(p/20922789888e3-1/87178291200)+1/479001600)-1/3628800)+1/40320)-1/720)+1/24)-1/2)},i=function(o,u){var p=Math.abs(o),h=Math.abs(u);return p<3e3&&h<3e3?Math.sqrt(p*p+h*h):(p0&&a();break;case"number":p.im=0,p.re=o;break;default:a()}return isNaN(p.re)||isNaN(p.im),p};function f(o,u){if(!(this instanceof f))return new f(o,u);var p=l(o,u);this.re=p.re,this.im=p.im}f.prototype={re:0,im:0,sign:function(){var o=this.abs();return new f(this.re/o,this.im/o)},add:function(o,u){var p=new f(o,u);return this.isInfinite()&&p.isInfinite()?f.NAN:this.isInfinite()||p.isInfinite()?f.INFINITY:new f(this.re+p.re,this.im+p.im)},sub:function(o,u){var p=new f(o,u);return this.isInfinite()&&p.isInfinite()?f.NAN:this.isInfinite()||p.isInfinite()?f.INFINITY:new f(this.re-p.re,this.im-p.im)},mul:function(o,u){var p=new f(o,u);return this.isInfinite()&&p.isZero()||this.isZero()&&p.isInfinite()?f.NAN:this.isInfinite()||p.isInfinite()?f.INFINITY:p.im===0&&this.im===0?new f(this.re*p.re,0):new f(this.re*p.re-this.im*p.im,this.re*p.im+this.im*p.re)},div:function(o,u){var p=new f(o,u);if(this.isZero()&&p.isZero()||this.isInfinite()&&p.isInfinite())return f.NAN;if(this.isInfinite()||p.isZero())return f.INFINITY;if(this.isZero()||p.isInfinite())return f.ZERO;o=this.re,u=this.im;var h=p.re,d=p.im,x,v;return d===0?new f(o/h,u/h):Math.abs(h)0)return new f(Math.pow(o,p.re),0);if(o===0)switch((p.re%4+4)%4){case 0:return new f(Math.pow(u,p.re),0);case 1:return new f(0,Math.pow(u,p.re));case 2:return new f(-Math.pow(u,p.re),0);case 3:return new f(0,-Math.pow(u,p.re))}}if(o===0&&u===0&&p.re>0&&p.im>=0)return f.ZERO;var h=Math.atan2(u,o),d=s(o,u);return o=Math.exp(p.re*d-p.im*h),u=p.im*d+p.re*h,new f(o*Math.cos(u),o*Math.sin(u))},sqrt:function(){var o=this.re,u=this.im,p=this.abs(),h,d;if(o>=0){if(u===0)return new f(Math.sqrt(o),0);h=.5*Math.sqrt(2*(p+o))}else h=Math.abs(u)/Math.sqrt(2*(p-o));return o<=0?d=.5*Math.sqrt(2*(p-o)):d=Math.abs(u)/Math.sqrt(2*(p+o)),new f(h,u<0?-d:d)},exp:function(){var o=Math.exp(this.re);return this.im,new f(o*Math.cos(this.im),o*Math.sin(this.im))},expm1:function(){var o=this.re,u=this.im;return new f(Math.expm1(o)*Math.cos(u)+n(u),Math.exp(o)*Math.sin(u))},log:function(){var o=this.re,u=this.im;return u===0&&o>0,new f(s(o,u),Math.atan2(u,o))},abs:function(){return i(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){var o=this.re,u=this.im;return new f(Math.sin(o)*r(u),Math.cos(o)*t(u))},cos:function(){var o=this.re,u=this.im;return new f(Math.cos(o)*r(u),-Math.sin(o)*t(u))},tan:function(){var o=2*this.re,u=2*this.im,p=Math.cos(o)+r(u);return new f(Math.sin(o)/p,t(u)/p)},cot:function(){var o=2*this.re,u=2*this.im,p=Math.cos(o)-r(u);return new f(-Math.sin(o)/p,t(u)/p)},sec:function(){var o=this.re,u=this.im,p=.5*r(2*u)+.5*Math.cos(2*o);return new f(Math.cos(o)*r(u)/p,Math.sin(o)*t(u)/p)},csc:function(){var o=this.re,u=this.im,p=.5*r(2*u)-.5*Math.cos(2*o);return new f(Math.sin(o)*r(u)/p,-Math.cos(o)*t(u)/p)},asin:function(){var o=this.re,u=this.im,p=new f(u*u-o*o+1,-2*o*u).sqrt(),h=new f(p.re-u,p.im+o).log();return new f(h.im,-h.re)},acos:function(){var o=this.re,u=this.im,p=new f(u*u-o*o+1,-2*o*u).sqrt(),h=new f(p.re-u,p.im+o).log();return new f(Math.PI/2-h.im,h.re)},atan:function(){var o=this.re,u=this.im;if(o===0){if(u===1)return new f(0,1/0);if(u===-1)return new f(0,-1/0)}var p=o*o+(1-u)*(1-u),h=new f((1-u*u-o*o)/p,-2*o/p).log();return new f(-.5*h.im,.5*h.re)},acot:function(){var o=this.re,u=this.im;if(u===0)return new f(Math.atan2(1,o),0);var p=o*o+u*u;return p!==0?new f(o/p,-u/p).atan():new f(o!==0?o/0:0,u!==0?-u/0:0).atan()},asec:function(){var o=this.re,u=this.im;if(o===0&&u===0)return new f(0,1/0);var p=o*o+u*u;return p!==0?new f(o/p,-u/p).acos():new f(o!==0?o/0:0,u!==0?-u/0:0).acos()},acsc:function(){var o=this.re,u=this.im;if(o===0&&u===0)return new f(Math.PI/2,1/0);var p=o*o+u*u;return p!==0?new f(o/p,-u/p).asin():new f(o!==0?o/0:0,u!==0?-u/0:0).asin()},sinh:function(){var o=this.re,u=this.im;return new f(t(o)*Math.cos(u),r(o)*Math.sin(u))},cosh:function(){var o=this.re,u=this.im;return new f(r(o)*Math.cos(u),t(o)*Math.sin(u))},tanh:function(){var o=2*this.re,u=2*this.im,p=r(o)+Math.cos(u);return new f(t(o)/p,Math.sin(u)/p)},coth:function(){var o=2*this.re,u=2*this.im,p=r(o)-Math.cos(u);return new f(t(o)/p,-Math.sin(u)/p)},csch:function(){var o=this.re,u=this.im,p=Math.cos(2*u)-r(2*o);return new f(-2*t(o)*Math.cos(u)/p,2*r(o)*Math.sin(u)/p)},sech:function(){var o=this.re,u=this.im,p=Math.cos(2*u)+r(2*o);return new f(2*r(o)*Math.cos(u)/p,-2*t(o)*Math.sin(u)/p)},asinh:function(){var o=this.im;this.im=-this.re,this.re=o;var u=this.asin();return this.re=-this.im,this.im=o,o=u.re,u.re=-u.im,u.im=o,u},acosh:function(){var o=this.acos();if(o.im<=0){var u=o.re;o.re=-o.im,o.im=u}else{var u=o.im;o.im=-o.re,o.re=u}return o},atanh:function(){var o=this.re,u=this.im,p=o>1&&u===0,h=1-o,d=1+o,x=h*h+u*u,v=x!==0?new f((d*h-u*u)/x,(u*h+d*u)/x):new f(o!==-1?o/0:0,u!==0?u/0:0),y=v.re;return v.re=s(v.re,v.im)/2,v.im=Math.atan2(v.im,y)/2,p&&(v.im=-v.im),v},acoth:function(){var o=this.re,u=this.im;if(o===0&&u===0)return new f(0,Math.PI/2);var p=o*o+u*u;return p!==0?new f(o/p,-u/p).atanh():new f(o!==0?o/0:0,u!==0?-u/0:0).atanh()},acsch:function(){var o=this.re,u=this.im;if(u===0)return new f(o!==0?Math.log(o+Math.sqrt(o*o+1)):1/0,0);var p=o*o+u*u;return p!==0?new f(o/p,-u/p).asinh():new f(o!==0?o/0:0,u!==0?-u/0:0).asinh()},asech:function(){var o=this.re,u=this.im;if(this.isZero())return f.INFINITY;var p=o*o+u*u;return p!==0?new f(o/p,-u/p).acosh():new f(o!==0?o/0:0,u!==0?-u/0:0).acosh()},inverse:function(){if(this.isZero())return f.INFINITY;if(this.isInfinite())return f.ZERO;var o=this.re,u=this.im,p=o*o+u*u;return new f(o/p,-u/p)},conjugate:function(){return new f(this.re,-this.im)},neg:function(){return new f(-this.re,-this.im)},ceil:function(o){return o=Math.pow(10,o||0),new f(Math.ceil(this.re*o)/o,Math.ceil(this.im*o)/o)},floor:function(o){return o=Math.pow(10,o||0),new f(Math.floor(this.re*o)/o,Math.floor(this.im*o)/o)},round:function(o){return o=Math.pow(10,o||0),new f(Math.round(this.re*o)/o,Math.round(this.im*o)/o)},equals:function(o,u){var p=new f(o,u);return Math.abs(p.re-this.re)<=f.EPSILON&&Math.abs(p.im-this.im)<=f.EPSILON},clone:function(){return new f(this.re,this.im)},toString:function(){var o=this.re,u=this.im,p="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(o){(function(e){"use strict";var r=2e3,t={s:1,n:0,d:1};function n(v,y){if(isNaN(v=parseInt(v,10)))throw d();return v*y}function i(v,y){if(y===0)throw h();var w=Object.create(p.prototype);w.s=v<0?-1:1,v=v<0?-v:v;var C=u(v,y);return w.n=v/C,w.d=y/C,w}function a(v){for(var y={},w=v,C=2,b=4;b<=w;){for(;w%C===0;)w/=C,y[C]=(y[C]||0)+1;b+=1+2*C++}return w!==v?w>1&&(y[w]=(y[w]||0)+1):y[v]=(y[v]||0)+1,y}var s=function(v,y){var w=0,C=1,b=1,A=0,E=0,S=0,O=1,F=1,M=0,_=1,k=1,L=1,Y=1e7,$;if(v!=null)if(y!==void 0){if(w=v,C=y,b=w*C,w%1!==0||C%1!==0)throw x()}else switch(typeof v){case"object":{if("d"in v&&"n"in v)w=v.n,C=v.d,"s"in v&&(w*=v.s);else if(0 in v)w=v[0],1 in v&&(C=v[1]);else throw d();b=w*C;break}case"number":{if(v<0&&(b=v,v=-v),v%1===0)w=v;else if(v>0){for(v>=1&&(F=Math.pow(10,Math.floor(1+Math.log(v)/Math.LN10)),v/=F);_<=Y&&L<=Y;)if($=(M+k)/(_+L),v===$){_+L<=Y?(w=M+k,C=_+L):L>_?(w=k,C=L):(w=M,C=_);break}else v>$?(M+=k,_+=L):(k+=M,L+=_),_>Y?(w=k,C=L):(w=M,C=_);w*=F}else(isNaN(v)||isNaN(y))&&(C=w=NaN);break}case"string":{if(_=v.match(/\\d+|./g),_===null)throw d();if(_[M]==="-"?(b=-1,M++):_[M]==="+"&&M++,_.length===M+1?E=n(_[M++],b):_[M+1]==="."||_[M]==="."?(_[M]!=="."&&(A=n(_[M++],b)),M++,(M+1===_.length||_[M+1]==="("&&_[M+3]===")"||_[M+1]==="'"&&_[M+3]==="'")&&(E=n(_[M],b),O=Math.pow(10,_[M].length),M++),(_[M]==="("&&_[M+2]===")"||_[M]==="'"&&_[M+2]==="'")&&(S=n(_[M+1],b),F=Math.pow(10,_[M+1].length)-1,M+=3)):_[M+1]==="/"||_[M+1]===":"?(E=n(_[M],b),O=n(_[M+2],1),M+=3):_[M+3]==="/"&&_[M+1]===" "&&(A=n(_[M],b),E=n(_[M+2],b),O=n(_[M+4],1),M+=5),_.length<=M){C=O*F,b=w=S+C*A+F*E;break}}default:throw d()}if(C===0)throw h();t.s=b<0?-1:1,t.n=Math.abs(w),t.d=Math.abs(C)};function l(v,y,w){for(var C=1;y>0;v=v*v%w,y>>=1)y&1&&(C=C*v%w);return C}function f(v,y){for(;y%2===0;y/=2);for(;y%5===0;y/=5);if(y===1)return 0;for(var w=10%y,C=1;w!==1;C++)if(w=w*10%y,C>r)return 0;return C}function o(v,y,w){for(var C=1,b=l(10,w,y),A=0;A<300;A++){if(C===b)return A;C=C*10%y,b=b*10%y}return 0}function u(v,y){if(!v)return y;if(!y)return v;for(;;){if(v%=y,!v)return y;if(y%=v,!y)return v}}function p(v,y){if(s(v,y),this instanceof p)v=u(t.d,t.n),this.s=t.s,this.n=t.n/v,this.d=t.d/v;else return i(t.s*t.n,t.d)}var h=function(){return new Error("Division by Zero")},d=function(){return new Error("Invalid argument")},x=function(){return new Error("Parameters must be integer")};p.prototype={s:1,n:0,d:1,abs:function(){return i(this.n,this.d)},neg:function(){return i(-this.s*this.n,this.d)},add:function(v,y){return s(v,y),i(this.s*this.n*t.d+t.s*this.d*t.n,this.d*t.d)},sub:function(v,y){return s(v,y),i(this.s*this.n*t.d-t.s*this.d*t.n,this.d*t.d)},mul:function(v,y){return s(v,y),i(this.s*t.s*this.n*t.n,this.d*t.d)},div:function(v,y){return s(v,y),i(this.s*t.s*this.n*t.d,this.d*t.n)},clone:function(){return i(this.s*this.n,this.d)},mod:function(v,y){if(isNaN(this.n)||isNaN(this.d))return new p(NaN);if(v===void 0)return i(this.s*this.n%this.d,1);if(s(v,y),t.n===0&&this.d===0)throw h();return i(this.s*(t.d*this.n)%(t.n*this.d),t.d*this.d)},gcd:function(v,y){return s(v,y),i(u(t.n,this.n)*u(t.d,this.d),t.d*this.d)},lcm:function(v,y){return s(v,y),t.n===0&&this.n===0?i(0,1):i(t.n*this.n,u(t.n,this.n)*u(t.d,this.d))},ceil:function(v){return v=Math.pow(10,v||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):i(Math.ceil(v*this.s*this.n/this.d),v)},floor:function(v){return v=Math.pow(10,v||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):i(Math.floor(v*this.s*this.n/this.d),v)},round:function(v){return v=Math.pow(10,v||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):i(Math.round(v*this.s*this.n/this.d),v)},inverse:function(){return i(this.s*this.d,this.n)},pow:function(v,y){if(s(v,y),t.d===1)return t.s<0?i(Math.pow(this.s*this.d,t.n),Math.pow(this.n,t.n)):i(Math.pow(this.s*this.n,t.n),Math.pow(this.d,t.n));if(this.s<0)return null;var w=a(this.n),C=a(this.d),b=1,A=1;for(var E in w)if(E!=="1"){if(E==="0"){b=0;break}if(w[E]*=t.n,w[E]%t.d===0)w[E]/=t.d;else return null;b*=Math.pow(E,w[E])}for(var E in C)if(E!=="1"){if(C[E]*=t.n,C[E]%t.d===0)C[E]/=t.d;else return null;A*=Math.pow(E,C[E])}return t.s<0?i(A,b):i(b,A)},equals:function(v,y){return s(v,y),this.s*this.n*t.d===t.s*t.n*this.d},compare:function(v,y){s(v,y);var w=this.s*this.n*t.d-t.s*t.n*this.d;return(0=0;A--)b=b.inverse().add(w[A]);if(Math.abs(b.sub(y).valueOf())0&&(w+=y,w+=" ",C%=b),w+=C,w+="/",w+=b),w},toLatex:function(v){var y,w="",C=this.n,b=this.d;return this.s<0&&(w+="-"),b===1?w+=C:(v&&(y=Math.floor(C/b))>0&&(w+=y,C%=b),w+="\\\\frac{",w+=C,w+="}{",w+=b,w+="}"),w},toContinued:function(){var v,y=this.n,w=this.d,C=[];if(isNaN(y)||isNaN(w))return C;do C.push(Math.floor(y/w)),v=y%w,y=w,w=v;while(y!==1);return C},toString:function(v){var y=this.n,w=this.d;if(isNaN(y)||isNaN(w))return"NaN";v=v||15;var C=f(y,w),b=o(y,w,C),A=this.s<0?"-":"";if(A+=y/w|0,y%=w,y*=10,y&&(A+="."),C){for(var E=b;E--;)A+=y/w|0,y%=w,y*=10;A+="(";for(var E=C;E--;)A+=y/w|0,y%=w,y*=10;A+=")"}else for(var E=v;y&&E--;)A+=y/w|0,y%=w,y*=10;return A}},typeof uv=="object"?(Object.defineProperty(p,"__esModule",{value:!0}),p.default=p,p.Fraction=p,r1.exports=p):e.Fraction=p})(uv)});var xS=un((Yoe,gS)=>{gS.exports=function e(r,t){"use strict";var n=/(^([+\\-]?(?:0|[1-9]\\d*)(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)?$|^0x[0-9a-f]+$|\\d+)/gi,i=/(^[ ]*|[ ]*$)/g,a=/(^([\\w ]+,?[\\w ]+)?[\\w ]+,?[\\w ]+\\d+:\\d+(:\\d+)?[\\w ]?|^\\d{1,4}[\\/\\-]\\d{1,4}[\\/\\-]\\d{1,4}|^\\w+, \\w+ \\d+, \\d{4})/,s=/^0x[0-9a-f]+$/i,l=/^0/,f=function(b){return e.insensitive&&(""+b).toLowerCase()||""+b},o=f(r).replace(i,"")||"",u=f(t).replace(i,"")||"",p=o.replace(n,"\\0$1\\0").replace(/\\0$/,"").replace(/^\\0/,"").split("\\0"),h=u.replace(n,"\\0$1\\0").replace(/\\0$/,"").replace(/^\\0/,"").split("\\0"),d=parseInt(o.match(s),16)||p.length!==1&&o.match(a)&&Date.parse(o),x=parseInt(u.match(s),16)||d&&u.match(a)&&Date.parse(u)||null,v,y;if(x){if(dx)return 1}for(var w=0,C=Math.max(p.length,h.length);wy)return 1}return 0}});var I2=un((spe,B2)=>{"use strict";var mg=Object.assign||function(e){for(var r=1;r1&&arguments[1]!==void 0?arguments[1]:{},t=r.preserveFormatting,n=t===void 0?!1:t,i=r.escapeMapFn,a=i===void 0?iz:i,s=String(e),l="",f=a(mg({},tz),n?mg({},nz):{}),o=Object.keys(f),u=function(){var h=!1;o.forEach(function(d,x){h||s.length>=d.length&&s.slice(0,d.length)===d&&(l+=f[o[x]],s=s.slice(d.length,s.length),h=!0)}),h||(l+=s.slice(0,1),s=s.slice(1,s.length))};s;)u();return l}});var nF=un((tF,wg)=>{(function(e,r,t){function n(l){var f=this,o=s();f.next=function(){var u=2091639*f.s0+f.c*23283064365386963e-26;return f.s0=f.s1,f.s1=f.s2,f.s2=u-(f.c=u|0)},f.c=1,f.s0=o(" "),f.s1=o(" "),f.s2=o(" "),f.s0-=o(l),f.s0<0&&(f.s0+=1),f.s1-=o(l),f.s1<0&&(f.s1+=1),f.s2-=o(l),f.s2<0&&(f.s2+=1),o=null}function i(l,f){return f.c=l.c,f.s0=l.s0,f.s1=l.s1,f.s2=l.s2,f}function a(l,f){var o=new n(l),u=f&&f.state,p=o.next;return p.int32=function(){return o.next()*4294967296|0},p.double=function(){return p()+(p()*2097152|0)*11102230246251565e-32},p.quick=p,u&&(typeof u=="object"&&i(u,o),p.state=function(){return i(o,{})}),p}function s(){var l=4022871197,f=function(o){o=String(o);for(var u=0;u>>0,p-=l,p*=l,l=p>>>0,p-=l,l+=p*4294967296}return(l>>>0)*23283064365386963e-26};return f}r&&r.exports?r.exports=a:t&&t.amd?t(function(){return a}):this.alea=a})(tF,typeof wg=="object"&&wg,typeof define=="function"&&define)});var aF=un((iF,Dg)=>{(function(e,r,t){function n(s){var l=this,f="";l.x=0,l.y=0,l.z=0,l.w=0,l.next=function(){var u=l.x^l.x<<11;return l.x=l.y,l.y=l.z,l.z=l.w,l.w^=l.w>>>19^u^u>>>8},s===(s|0)?l.x=s:f+=s;for(var o=0;o>>0)/4294967296};return u.double=function(){do var p=f.next()>>>11,h=(f.next()>>>0)/4294967296,d=(p+h)/(1<<21);while(d===0);return d},u.int32=f.next,u.quick=u,o&&(typeof o=="object"&&i(o,f),u.state=function(){return i(f,{})}),u}r&&r.exports?r.exports=a:t&&t.amd?t(function(){return a}):this.xor128=a})(iF,typeof Dg=="object"&&Dg,typeof define=="function"&&define)});var sF=un((oF,Sg)=>{(function(e,r,t){function n(s){var l=this,f="";l.next=function(){var u=l.x^l.x>>>2;return l.x=l.y,l.y=l.z,l.z=l.w,l.w=l.v,(l.d=l.d+362437|0)+(l.v=l.v^l.v<<4^(u^u<<1))|0},l.x=0,l.y=0,l.z=0,l.w=0,l.v=0,s===(s|0)?l.x=s:f+=s;for(var o=0;o>>4),l.next()}function i(s,l){return l.x=s.x,l.y=s.y,l.z=s.z,l.w=s.w,l.v=s.v,l.d=s.d,l}function a(s,l){var f=new n(s),o=l&&l.state,u=function(){return(f.next()>>>0)/4294967296};return u.double=function(){do var p=f.next()>>>11,h=(f.next()>>>0)/4294967296,d=(p+h)/(1<<21);while(d===0);return d},u.int32=f.next,u.quick=u,o&&(typeof o=="object"&&i(o,f),u.state=function(){return i(f,{})}),u}r&&r.exports?r.exports=a:t&&t.amd?t(function(){return a}):this.xorwow=a})(oF,typeof Sg=="object"&&Sg,typeof define=="function"&&define)});var fF=un((uF,Ng)=>{(function(e,r,t){function n(s){var l=this;l.next=function(){var o=l.x,u=l.i,p,h,d;return p=o[u],p^=p>>>7,h=p^p<<24,p=o[u+1&7],h^=p^p>>>10,p=o[u+3&7],h^=p^p>>>3,p=o[u+4&7],h^=p^p<<7,p=o[u+7&7],p=p^p<<13,h^=p^p<<9,o[u]=h,l.i=u+1&7,h};function f(o,u){var p,h,d=[];if(u===(u|0))h=d[0]=u;else for(u=""+u,p=0;p0;--p)o.next()}f(l,s)}function i(s,l){return l.x=s.x.slice(),l.i=s.i,l}function a(s,l){s==null&&(s=+new Date);var f=new n(s),o=l&&l.state,u=function(){return(f.next()>>>0)/4294967296};return u.double=function(){do var p=f.next()>>>11,h=(f.next()>>>0)/4294967296,d=(p+h)/(1<<21);while(d===0);return d},u.int32=f.next,u.quick=u,o&&(o.x&&i(o,f),u.state=function(){return i(f,{})}),u}r&&r.exports?r.exports=a:t&&t.amd?t(function(){return a}):this.xorshift7=a})(uF,typeof Ng=="object"&&Ng,typeof define=="function"&&define)});var cF=un((lF,Ag)=>{(function(e,r,t){function n(s){var l=this;l.next=function(){var o=l.w,u=l.X,p=l.i,h,d;return l.w=o=o+1640531527|0,d=u[p+34&127],h=u[p=p+1&127],d^=d<<13,h^=h<<17,d^=d>>>15,h^=h>>>12,d=u[p]=d^h,l.i=p,d+(o^o>>>16)|0};function f(o,u){var p,h,d,x,v,y=[],w=128;for(u===(u|0)?(h=u,u=null):(u=u+"\\0",h=0,w=Math.max(w,u.length)),d=0,x=-32;x>>15,h^=h<<4,h^=h>>>13,x>=0&&(v=v+1640531527|0,p=y[x&127]^=h+v,d=p==0?d+1:0);for(d>=128&&(y[(u&&u.length||0)&127]=-1),d=127,x=4*128;x>0;--x)h=y[d+34&127],p=y[d=d+1&127],h^=h<<13,p^=p<<17,h^=h>>>15,p^=p>>>12,y[d]=h^p;o.w=v,o.X=y,o.i=d}f(l,s)}function i(s,l){return l.i=s.i,l.w=s.w,l.X=s.X.slice(),l}function a(s,l){s==null&&(s=+new Date);var f=new n(s),o=l&&l.state,u=function(){return(f.next()>>>0)/4294967296};return u.double=function(){do var p=f.next()>>>11,h=(f.next()>>>0)/4294967296,d=(p+h)/(1<<21);while(d===0);return d},u.int32=f.next,u.quick=u,o&&(o.X&&i(o,f),u.state=function(){return i(f,{})}),u}r&&r.exports?r.exports=a:t&&t.amd?t(function(){return a}):this.xor4096=a})(lF,typeof Ag=="object"&&Ag,typeof define=="function"&&define)});var mF=un((pF,Eg)=>{(function(e,r,t){function n(s){var l=this,f="";l.next=function(){var u=l.b,p=l.c,h=l.d,d=l.a;return u=u<<25^u>>>7^p,p=p-h|0,h=h<<24^h>>>8^d,d=d-u|0,l.b=u=u<<20^u>>>12^p,l.c=p=p-h|0,l.d=h<<16^p>>>16^d,l.a=d-u|0},l.a=0,l.b=0,l.c=-1640531527,l.d=1367130551,s===Math.floor(s)?(l.a=s/4294967296|0,l.b=s|0):f+=s;for(var o=0;o>>0)/4294967296};return u.double=function(){do var p=f.next()>>>11,h=(f.next()>>>0)/4294967296,d=(p+h)/(1<<21);while(d===0);return d},u.int32=f.next,u.quick=u,o&&(typeof o=="object"&&i(o,f),u.state=function(){return i(f,{})}),u}r&&r.exports?r.exports=a:t&&t.amd?t(function(){return a}):this.tychei=a})(pF,typeof Eg=="object"&&Eg,typeof define=="function"&&define)});var hF=un(()=>{});var vF=un((dF,Hp)=>{(function(e,r,t){var n=256,i=6,a=52,s="random",l=t.pow(n,i),f=t.pow(2,a),o=f*2,u=n-1,p;function h(b,A,E){var S=[];A=A==!0?{entropy:!0}:A||{};var O=y(v(A.entropy?[b,C(r)]:b??w(),3),S),F=new d(S),M=function(){for(var _=F.g(i),k=l,L=0;_=o;)_/=2,k/=2,L>>>=1;return(_+L)/k};return M.int32=function(){return F.g(4)|0},M.quick=function(){return F.g(4)/4294967296},M.double=M,y(C(F.S),r),(A.pass||E||function(_,k,L,Y){return Y&&(Y.S&&x(Y,F),_.state=function(){return x(F,{})}),L?(t[s]=_,k):_})(M,O,"global"in A?A.global:this==t,A.state)}function d(b){var A,E=b.length,S=this,O=0,F=S.i=S.j=0,M=S.S=[];for(E||(b=[E++]);O{var wW=nF(),DW=aF(),SW=sF(),NW=fF(),AW=cF(),EW=mF(),ss=vF();ss.alea=wW;ss.xor128=DW;ss.xorwow=SW;ss.xorshift7=NW;ss.xor4096=AW;ss.tychei=EW;gF.exports=ss});var GO=un((q3e,Bg)=>{function Og(){}Og.prototype={on:function(e,r,t){var n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:r,ctx:t}),this},once:function(e,r,t){var n=this;function i(){n.off(e,i),r.apply(t,arguments)}return i._=r,this.on(e,i,t)},emit:function(e){var r=[].slice.call(arguments,1),t=((this.e||(this.e={}))[e]||[]).slice(),n=0,i=t.length;for(n;n[...new Set(e)];var fo="File";function ld(e){return Array.isArray(e)?e:typeof e=="string"?[e]:[]}function yx(e){return e?typeof e!="string"?e.toString():e:""}var bx=(e,r)=>r.indexOf(e)>0?r.indexOf(e):r.length;function pi(e){return pi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},pi(e)}function Pn(e){if(e===null||e===!0||e===!1)return NaN;var r=Number(e);return isNaN(r)?r:r<0?Math.ceil(r):Math.floor(r)}function ot(e,r){if(r.length1?"s":"")+" required, but only "+r.length+" present")}function Lt(e){ot(1,arguments);var r=Object.prototype.toString.call(e);return e instanceof Date||pi(e)==="object"&&r==="[object Date]"?new Date(e.getTime()):typeof e=="number"||r==="[object Number]"?new Date(e):((typeof e=="string"||r==="[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 cd(e,r){ot(2,arguments);var t=Lt(e).getTime(),n=Pn(r);return new Date(t+n)}var c8={};function lo(){return c8}function pd(e){var r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),e.getTime()-r.getTime()}function md(e){return ot(1,arguments),e instanceof Date||pi(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function hd(e){if(ot(1,arguments),!md(e)&&typeof e!="number")return!1;var r=Lt(e);return!isNaN(Number(r))}function dd(e,r){ot(2,arguments);var t=Pn(r);return cd(e,-t)}var p8=864e5;function vd(e){ot(1,arguments);var r=Lt(e),t=r.getTime();r.setUTCMonth(0,1),r.setUTCHours(0,0,0,0);var n=r.getTime(),i=t-n;return Math.floor(i/p8)+1}function co(e){ot(1,arguments);var r=1,t=Lt(e),n=t.getUTCDay(),i=(n=i.getTime()?t+1:r.getTime()>=s.getTime()?t:t-1}function gd(e){ot(1,arguments);var r=pf(e),t=new Date(0);t.setUTCFullYear(r,0,4),t.setUTCHours(0,0,0,0);var n=co(t);return n}var m8=6048e5;function xd(e){ot(1,arguments);var r=Lt(e),t=co(r).getTime()-gd(r).getTime();return Math.round(t/m8)+1}function po(e,r){var t,n,i,a,s,l,f,o;ot(1,arguments);var u=lo(),p=Pn((t=(n=(i=(a=r?.weekStartsOn)!==null&&a!==void 0?a:r==null||(s=r.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&i!==void 0?i:u.weekStartsOn)!==null&&n!==void 0?n:(f=u.locale)===null||f===void 0||(o=f.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&t!==void 0?t:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=Lt(e),d=h.getUTCDay(),x=(d=1&&d<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var x=new Date(0);x.setUTCFullYear(p+1,0,d),x.setUTCHours(0,0,0,0);var v=po(x,r),y=new Date(0);y.setUTCFullYear(p,0,d),y.setUTCHours(0,0,0,0);var w=po(y,r);return u.getTime()>=v.getTime()?p+1:u.getTime()>=w.getTime()?p:p-1}function yd(e,r){var t,n,i,a,s,l,f,o;ot(1,arguments);var u=lo(),p=Pn((t=(n=(i=(a=r?.firstWeekContainsDate)!==null&&a!==void 0?a:r==null||(s=r.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&i!==void 0?i:u.firstWeekContainsDate)!==null&&n!==void 0?n:(f=u.locale)===null||f===void 0||(o=f.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&t!==void 0?t:1),h=mf(e,r),d=new Date(0);d.setUTCFullYear(h,0,p),d.setUTCHours(0,0,0,0);var x=po(d,r);return x}var h8=6048e5;function bd(e,r){ot(1,arguments);var t=Lt(e),n=po(t,r).getTime()-yd(t,r).getTime();return Math.round(n/h8)+1}function it(e,r){for(var t=e<0?"-":"",n=Math.abs(e).toString();n.length0?n:1-n;return it(t==="yy"?i%100:i,t.length)},M:function(r,t){var n=r.getUTCMonth();return t==="M"?String(n+1):it(n+1,2)},d:function(r,t){return it(r.getUTCDate(),t.length)},a:function(r,t){var n=r.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(r,t){return it(r.getUTCHours()%12||12,t.length)},H:function(r,t){return it(r.getUTCHours(),t.length)},m:function(r,t){return it(r.getUTCMinutes(),t.length)},s:function(r,t){return it(r.getUTCSeconds(),t.length)},S:function(r,t){var n=t.length,i=r.getUTCMilliseconds(),a=Math.floor(i*Math.pow(10,n-3));return it(a,t.length)}},Oa=d8;var zs={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},v8={G:function(r,t,n){var i=r.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(r,t,n){if(t==="yo"){var i=r.getUTCFullYear(),a=i>0?i:1-i;return n.ordinalNumber(a,{unit:"year"})}return Oa.y(r,t)},Y:function(r,t,n,i){var a=mf(r,i),s=a>0?a:1-a;if(t==="YY"){var l=s%100;return it(l,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):it(s,t.length)},R:function(r,t){var n=pf(r);return it(n,t.length)},u:function(r,t){var n=r.getUTCFullYear();return it(n,t.length)},Q:function(r,t,n){var i=Math.ceil((r.getUTCMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return it(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(r,t,n){var i=Math.ceil((r.getUTCMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return it(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(r,t,n){var i=r.getUTCMonth();switch(t){case"M":case"MM":return Oa.M(r,t);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(r,t,n){var i=r.getUTCMonth();switch(t){case"L":return String(i+1);case"LL":return it(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(r,t,n,i){var a=bd(r,i);return t==="wo"?n.ordinalNumber(a,{unit:"week"}):it(a,t.length)},I:function(r,t,n){var i=xd(r);return t==="Io"?n.ordinalNumber(i,{unit:"week"}):it(i,t.length)},d:function(r,t,n){return t==="do"?n.ordinalNumber(r.getUTCDate(),{unit:"date"}):Oa.d(r,t)},D:function(r,t,n){var i=vd(r);return t==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):it(i,t.length)},E:function(r,t,n){var i=r.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(r,t,n,i){var a=r.getUTCDay(),s=(a-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return it(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(r,t,n,i){var a=r.getUTCDay(),s=(a-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return it(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(r,t,n){var i=r.getUTCDay(),a=i===0?7:i;switch(t){case"i":return String(a);case"ii":return it(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(r,t,n){var i=r.getUTCHours(),a=i/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(r,t,n){var i=r.getUTCHours(),a;switch(i===12?a=zs.noon:i===0?a=zs.midnight:a=i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(r,t,n){var i=r.getUTCHours(),a;switch(i>=17?a=zs.evening:i>=12?a=zs.afternoon:i>=4?a=zs.morning:a=zs.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(r,t,n){if(t==="ho"){var i=r.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return Oa.h(r,t)},H:function(r,t,n){return t==="Ho"?n.ordinalNumber(r.getUTCHours(),{unit:"hour"}):Oa.H(r,t)},K:function(r,t,n){var i=r.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(i,{unit:"hour"}):it(i,t.length)},k:function(r,t,n){var i=r.getUTCHours();return i===0&&(i=24),t==="ko"?n.ordinalNumber(i,{unit:"hour"}):it(i,t.length)},m:function(r,t,n){return t==="mo"?n.ordinalNumber(r.getUTCMinutes(),{unit:"minute"}):Oa.m(r,t)},s:function(r,t,n){return t==="so"?n.ordinalNumber(r.getUTCSeconds(),{unit:"second"}):Oa.s(r,t)},S:function(r,t){return Oa.S(r,t)},X:function(r,t,n,i){var a=i._originalDate||r,s=a.getTimezoneOffset();if(s===0)return"Z";switch(t){case"X":return Dx(s);case"XXXX":case"XX":return Zo(s);case"XXXXX":case"XXX":default:return Zo(s,":")}},x:function(r,t,n,i){var a=i._originalDate||r,s=a.getTimezoneOffset();switch(t){case"x":return Dx(s);case"xxxx":case"xx":return Zo(s);case"xxxxx":case"xxx":default:return Zo(s,":")}},O:function(r,t,n,i){var a=i._originalDate||r,s=a.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+wx(s,":");case"OOOO":default:return"GMT"+Zo(s,":")}},z:function(r,t,n,i){var a=i._originalDate||r,s=a.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+wx(s,":");case"zzzz":default:return"GMT"+Zo(s,":")}},t:function(r,t,n,i){var a=i._originalDate||r,s=Math.floor(a.getTime()/1e3);return it(s,t.length)},T:function(r,t,n,i){var a=i._originalDate||r,s=a.getTime();return it(s,t.length)}};function wx(e,r){var t=e>0?"-":"+",n=Math.abs(e),i=Math.floor(n/60),a=n%60;if(a===0)return t+String(i);var s=r||"";return t+String(i)+s+it(a,2)}function Dx(e,r){if(e%60===0){var t=e>0?"-":"+";return t+it(Math.abs(e)/60,2)}return Zo(e,r)}function Zo(e,r){var t=r||"",n=e>0?"-":"+",i=Math.abs(e),a=it(Math.floor(i/60),2),s=it(i%60,2);return n+a+t+s}var Sx=v8;var Nx=function(r,t){switch(r){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Ax=function(r,t){switch(r){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},g8=function(r,t){var n=r.match(/(P+)(p+)?/)||[],i=n[1],a=n[2];if(!a)return Nx(r,t);var s;switch(i){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",Nx(i,t)).replace("{{time}}",Ax(a,t))},x8={p:Ax,P:g8},Ex=x8;var y8=["D","DD"],b8=["YY","YYYY"];function Cx(e){return y8.indexOf(e)!==-1}function Mx(e){return b8.indexOf(e)!==-1}function wd(e,r,t){if(e==="YYYY")throw new RangeError("Use \`yyyy\` instead of \`YYYY\` (in \`".concat(r,"\`) for formatting years to the input \`").concat(t,"\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use \`yy\` instead of \`YY\` (in \`".concat(r,"\`) for formatting years to the input \`").concat(t,"\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use \`d\` instead of \`D\` (in \`".concat(r,"\`) for formatting days of the month to the input \`").concat(t,"\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use \`dd\` instead of \`DD\` (in \`".concat(r,"\`) for formatting days of the month to the input \`").concat(t,"\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var w8={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"}},D8=function(r,t,n){var i,a=w8[r];return typeof a=="string"?i=a:t===1?i=a.one:i=a.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},_x=D8;function hf(e){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=r.width?String(r.width):e.defaultWidth,n=e.formats[t]||e.formats[e.defaultWidth];return n}}var S8={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},N8={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},A8={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},E8={date:hf({formats:S8,defaultWidth:"full"}),time:hf({formats:N8,defaultWidth:"full"}),dateTime:hf({formats:A8,defaultWidth:"full"})},Tx=E8;var C8={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},M8=function(r,t,n,i){return C8[r]},Fx=M8;function Qo(e){return function(r,t){var n=t!=null&&t.context?String(t.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,s=t!=null&&t.width?String(t.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{var l=e.defaultWidth,f=t!=null&&t.width?String(t.width):e.defaultWidth;i=e.values[f]||e.values[l]}var o=e.argumentCallback?e.argumentCallback(r):r;return i[o]}}var _8={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},T8={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},F8={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"]},O8={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"]},B8={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"}},I8={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"}},P8=function(r,t){var n=Number(r),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},k8={ordinalNumber:P8,era:Qo({values:_8,defaultWidth:"wide"}),quarter:Qo({values:T8,defaultWidth:"wide",argumentCallback:function(r){return r-1}}),month:Qo({values:F8,defaultWidth:"wide"}),day:Qo({values:O8,defaultWidth:"wide"}),dayPeriod:Qo({values:B8,defaultWidth:"wide",formattingValues:I8,defaultFormattingWidth:"wide"})},Ox=k8;function Xo(e){return function(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=r.match(i);if(!a)return null;var s=a[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],f=Array.isArray(l)?L8(l,function(p){return p.test(s)}):R8(l,function(p){return p.test(s)}),o;o=e.valueCallback?e.valueCallback(f):f,o=t.valueCallback?t.valueCallback(o):o;var u=r.slice(s.length);return{value:o,rest:u}}}function R8(e,r){for(var t in e)if(e.hasOwnProperty(t)&&r(e[t]))return t}function L8(e,r){for(var t=0;t1&&arguments[1]!==void 0?arguments[1]:{},n=r.match(e.matchPattern);if(!n)return null;var i=n[0],a=r.match(e.parsePattern);if(!a)return null;var s=e.valueCallback?e.valueCallback(a[0]):a[0];s=t.valueCallback?t.valueCallback(s):s;var l=r.slice(i.length);return{value:s,rest:l}}}var q8=/^(\\d+)(th|st|nd|rd)?/i,U8=/\\d+/i,z8={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},W8={any:[/^b/i,/^(a|c)/i]},V8={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Y8={any:[/1/i,/2/i,/3/i,/4/i]},H8={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},G8={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]},$8={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},Z8={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]},Q8={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},X8={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}},J8={ordinalNumber:Dd({matchPattern:q8,parsePattern:U8,valueCallback:function(r){return parseInt(r,10)}}),era:Xo({matchPatterns:z8,defaultMatchWidth:"wide",parsePatterns:W8,defaultParseWidth:"any"}),quarter:Xo({matchPatterns:V8,defaultMatchWidth:"wide",parsePatterns:Y8,defaultParseWidth:"any",valueCallback:function(r){return r+1}}),month:Xo({matchPatterns:H8,defaultMatchWidth:"wide",parsePatterns:G8,defaultParseWidth:"any"}),day:Xo({matchPatterns:$8,defaultMatchWidth:"wide",parsePatterns:Z8,defaultParseWidth:"any"}),dayPeriod:Xo({matchPatterns:Q8,defaultMatchWidth:"any",parsePatterns:X8,defaultParseWidth:"any"})},Bx=J8;var K8={code:"en-US",formatDistance:_x,formatLong:Tx,formatRelative:Fx,localize:Ox,match:Bx,options:{weekStartsOn:0,firstWeekContainsDate:1}},Ix=K8;var Px=Ix;var j8=/[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g,ek=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,rk=/^'([^]*?)'?$/,tk=/''/g,nk=/[a-zA-Z]/;function Ba(e,r,t){var n,i,a,s,l,f,o,u,p,h,d,x,v,y,w,C,b,A;ot(2,arguments);var E=String(r),S=lo(),O=(n=(i=t?.locale)!==null&&i!==void 0?i:S.locale)!==null&&n!==void 0?n:Px,F=Pn((a=(s=(l=(f=t?.firstWeekContainsDate)!==null&&f!==void 0?f:t==null||(o=t.locale)===null||o===void 0||(u=o.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&l!==void 0?l:S.firstWeekContainsDate)!==null&&s!==void 0?s:(p=S.locale)===null||p===void 0||(h=p.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(F>=1&&F<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var M=Pn((d=(x=(v=(y=t?.weekStartsOn)!==null&&y!==void 0?y:t==null||(w=t.locale)===null||w===void 0||(C=w.options)===null||C===void 0?void 0:C.weekStartsOn)!==null&&v!==void 0?v:S.weekStartsOn)!==null&&x!==void 0?x:(b=S.locale)===null||b===void 0||(A=b.options)===null||A===void 0?void 0:A.weekStartsOn)!==null&&d!==void 0?d:0);if(!(M>=0&&M<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!O.localize)throw new RangeError("locale must contain localize property");if(!O.formatLong)throw new RangeError("locale must contain formatLong property");var _=Lt(e);if(!hd(_))throw new RangeError("Invalid time value");var k=pd(_),L=dd(_,k),Y={firstWeekContainsDate:F,weekStartsOn:M,locale:O,_originalDate:_},$=E.match(ek).map(function(V){var q=V[0];if(q==="p"||q==="P"){var R=Ex[q];return R(V,O.formatLong)}return V}).join("").match(j8).map(function(V){if(V==="''")return"'";var q=V[0];if(q==="'")return ik(V);var R=Sx[q];if(R)return!(t!=null&&t.useAdditionalWeekYearTokens)&&Mx(V)&&wd(V,r,String(e)),!(t!=null&&t.useAdditionalDayOfYearTokens)&&Cx(V)&&wd(V,r,String(e)),R(L,V,O.localize,Y);if(q.match(nk))throw new RangeError("Format string contains an unescaped latin alphabet character \`"+q+"\`");return V}).join("");return $}function ik(e){var r=e.match(rk);return r?r[1].replace(tk,"'"):e}function Sd(e,r){if(pi(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(pi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Nd(e){var r=Sd(e,"string");return pi(r)=="symbol"?r:r+""}function Ur(e,r,t){return r=Nd(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var Ad=(e,r)=>{if(e instanceof Date)return"date";if(typeof e=="string"){if(/\\/\\/(\\S+?(?:jpe?g|png|gif|svg))/gi.test(e)||e.includes("unsplash"))return"image";if(/^\\d{4}-\\d{2}-\\d{2}$/.test(e))return"date";if(r=="tag"||r=="tags")return"tag";if(/\\[\\[.*?\\]\\]/.test(e))return"link"}else{if(typeof e=="number")return"number";if(typeof e=="boolean")return"boolean";if(e)if(Array.isArray(e)||typeof e=="string"&&e.indexOf(",")>-1){let t=Array.isArray(e)?e:[];if(typeof e=="string"&&e.indexOf(",")>-1&&(t=Ui(e)),r=="tag"||r=="tags")return"tag-multi";if(t.length==1&&Array.isArray(t[0])&&t[0].length==1&&typeof t[0][0]=="string")return"link";let n=Jl(t.map(i=>Ad(i,r)));return n.length==1&&n[0]=="link"?"link-multi":n.some(i=>i=="object")?"object-multi":"option-multi"}else{if(e.isLuxonDateTime)return"date";if(e.isLuxonDuration)return"duration";if(e.type=="file")return"link";if(typeof e=="object"&&!Array.isArray(e)&&e!==null)return"object"}else return"unknown"}return"text"};var kx=e=>e.map(r=>r.replace(",","\\\\,")).join(", "),Jo=e=>e.map(r=>r.replace(",","\\\\,")).join(", ");var Ui=e=>(e?.replace("\\\\,",",").match(/(\\\\.|[^,])+/g)??[]).map(r=>r.trim()),ec=(e,r)=>{switch(Ad(r,e)){case"object":return JSON.stringify(r);case"number":return r.toString();case"boolean":return r?"true":"false";case"date":{if(r instanceof Date){let n=Ba(r,"yyyy-MM-dd");if(typeof n=="string")return n}return typeof r!="string"?"":r}break;case"duration":return kx(Object.keys(r.values).reduce((n,i)=>[...n,...r.values[i]>0?[r.values[i]+" "+i]:[]],[]));case"option-multi":case"link-multi":return typeof r=="string"?jl(r):Jo(r.map(n=>n?typeof n=="string"?jl(n):n.path?n.path:Array.isArray(r)&&n.length==1&&Array.isArray(n[0])&&n[0].length==1&&typeof n[0][0]=="string"?n[0][0]:JSON.stringify(n):""));case"link":return Array.isArray(r)&&r.length==1&&Array.isArray(r[0])&&r[0].length==1&&typeof r[0][0]=="string"?r[0][0]:typeof r=="string"?jl(r):r.path;case"text":case"tag":case"image":return r}return""},Kl=e=>{let r;try{r=JSON.parse(e)}catch{}return r};var jl=e=>{if(!e)return"";let r=/\\[\\[(.*?)\\]\\]/g.exec(e),t=r?.length>1?r[1].substring(0,bx("|",r[1])):e;return t||e};var rc=(e,r)=>e==r,Ed=(e,r)=>(e??"").length==0,Cd=(e,r)=>(e??"").toLowerCase().includes((r??"").toLowerCase()),Md=(e,r)=>parseFloat(e)>parseFloat(r),_d=(e,r)=>parseInt(e)>parseInt(r),Rx=(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()>n.valueOf()},Lx=(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?Ui(e):[];return(r?Ui(r):[]).some(i=>t.some(a=>a==i))},qx=(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()},Ux=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 df={isNotEmpty:{type:["text","file","link","link-multi","fileprop","image"],fn:(e,r)=>!Ed(e,""),valueType:"none"},isEmpty:{type:["text","file","link","link-multi","fileprop","image"],fn:(e,r)=>Ed(e,""),valueType:"none"},include:{fn:(e,r)=>Cd(e,r),type:["text","file","link","link-multi","fileprop","image"],valueType:"text"},notInclude:{type:["text","file","link","link-multi","fileprop","image"],fn:(e,r)=>!Cd(e,r),valueType:"text"},is:{type:["text","file","link","context","fileprop"],fn:(e,r)=>rc(e,r),valueType:"text"},isNot:{type:["text","file","link","context","fileprop"],fn:(e,r)=>!rc(e,r),valueType:"text"},equal:{type:["number"],fn:(e,r)=>rc(e,r),valueType:"number"},isGreatThan:{type:["number"],fn:(e,r)=>Md(e,r),valueType:"number"},isLessThan:{type:["number"],fn:(e,r)=>_d(e,r),valueType:"number"},isLessThanOrEqual:{type:["number"],fn:(e,r)=>!Md(e,r),valueType:"number"},isGreatThanOrEqual:{type:["number"],fn:(e,r)=>!_d(e,r),valueType:"number"},dateBefore:{type:["date","fileprop"],fn:(e,r)=>Lx(e,r),valueType:"date"},dateAfter:{type:["date","fileprop"],fn:(e,r)=>Rx(e,r),valueType:"date"},isSameDate:{type:["date"],fn:(e,r)=>qx(e,r),valueType:"date"},isSameDateAsToday:{type:["date"],fn:(e,r)=>Ux(e,r),valueType:"none"},isAnyInList:{type:["option","context","option-multi","context-multi","tags-multi","tags"],fn:(e,r)=>Td(e,r),valueType:"list"},isNoneInList:{type:["option","context","option-multi","context-multi","tags-multi","tags"],fn:(e,r)=>!Td(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 ak=(e,r)=>r.reduce((n,i)=>{let[a,s]=n,l=i.type=="path"?Wx(s,i):i.type=="frontmatter"?zx(s,i):Vx(s,i),f=s.filter(o=>!l.includes(o));return[[...a,...l],f]},[[],e])[0],ok=(e,r)=>r.reduce((t,n)=>n.type=="path"?Wx(t,n):n.type=="frontmatter"?zx(t,n):Vx(t,n),e),zx=(e,r)=>e.filter(t=>{let n=t.metadata?.property;if(!n||!n[r.field])return!1;let i=df[r.fn],a=!0;return i&&(a=i.fn(ec(r.field,n[r.field]),r.value)),a}),Wx=(e,r)=>e.filter(t=>{let n="";r.field=="outlinks"?n=Jo(t.outlinks??[]):r.field=="inlinks"?n=Jo(t.inlinks??[]):r.field=="tags"&&(n=Jo(t.tags??[]));let i=df[r.fn],a=!0;return i&&(a=i.fn(n,r.value)),a}),Vx=(e,r)=>e.filter(t=>{let n=df[r.fn],i=!0;return n&&(i=n.fn(t.metadata?.[r.type]?.[r.field],r.value)),i}),Fd=(e,r)=>e.reduce((n,i)=>!n||i.filters.length==0?!1:i.type=="any"?ak([r],i.filters).length>0:ok([r],i.filters).length>0,!0);var Hx=Xn(Yx()),Bd=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",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)",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"},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",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 Smart Search",addItem:"Add Item",addProperty:"Add 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",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:"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:"Smart Search",filesAndFolders:"Files and Folders"},labels:{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",renameSectionSmart:"Edit Smart Space",renameSection:"Edit Space",createSectionSmart:"New Smart 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",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",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."},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"},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=Hx.default.locale();["en"].includes(r)&&(this.lang=r)}get texts(){return this.all.en}},Vr=new Bd().texts;var Gx=(e,r)=>r==fo?Vs.find(t=>t.type=="file"):r=="tags"?Vs.find(t=>t.type=="tags"):r=="aliases"?Vs.find(t=>t.type=="option-multi"):r=="sticker"?Vs.find(t=>e=="icon"):Vs.find(t=>e==t.type)||Vs.find(t=>e==t.multiType),Vs=[{type:"unknown",label:"",restricted:!0,icon:"ui//file-question"},{type:"text",label:Vr.properties.text.label,metadata:!0,icon:"ui//text",description:Vr.properties.text.description},{type:"number",label:Vr.properties.number.label,metadata:!0,icon:"ui//binary",configKeys:["unit"],description:Vr.properties.number.description},{type:"boolean",label:Vr.properties.boolean.label,metadata:!0,icon:"ui//check-square",description:Vr.properties.boolean.description},{type:"date",label:Vr.properties.date.label,metadata:!0,icon:"ui//calendar",configKeys:["format"],description:Vr.properties.date.description},{type:"option",label:Vr.properties.option.label,multi:!0,multiType:"option-multi",icon:"ui//list",configKeys:["options","source"],description:Vr.properties.option.description},{type:"tags",label:Vr.properties.tags.label,icon:"ui//tags",description:Vr.properties.tags.description},{type:"file",label:Vr.properties.file.label,restricted:!0,icon:"ui//mk-make-h3"},{type:"fileprop",label:Vr.properties.fileProperty.label,icon:"ui//formula",configKeys:["field","value"],description:Vr.properties.fileProperty.description},{type:"link",label:Vr.properties.link.label,multi:!0,multiType:"link-multi",metadata:!0,icon:"ui//file-text",description:Vr.properties.link.description},{type:"context",label:Vr.properties.context.label,icon:"ui//mk-make-note",multi:!0,multiType:"context-multi",configKeys:["space"],description:Vr.properties.context.description},{type:"object",label:Vr.properties.object.label,multi:!0,multiType:"object-multi",metadata:!0,icon:"ui//list-tree",configKeys:["type"],description:Vr.properties.object.description},{type:"icon",label:Vr.properties.icon.label,multi:!0,multiType:"icon-multi",icon:"ui//gem",restricted:!0,description:Vr.properties.icon.description},{type:"image",label:Vr.properties.image.label,multi:!0,multiType:"image-multi",metadata:!0,icon:"ui//mk-make-image",description:Vr.properties.image.description},{type:"color",label:Vr.properties.color.label,icon:"ui//mk-make-image",restricted:!0,description:Vr.properties.color.description},{type:"space",label:Vr.properties.space.label,icon:"ui//layout-grid",restricted:!0,description:Vr.properties.space.description},{type:"table",label:Vr.properties.space.label,icon:"ui//layout-grid",restricted:!0,description:Vr.properties.space.description},{type:"super",label:Vr.properties.super.label,icon:"ui//zap",restricted:!0,configKeys:["dynamic","field"]},{type:"input",label:Vr.properties.super.label,icon:"ui//input",restricted:!0}];var Ys="files",ic={id:Ys,name:"Files",type:"db",primary:"true"},sk="filesView",uk={id:sk,name:"All",type:"view",def:JSON.stringify({db:Ys,icon:"ui//file-stack"})},fk="main",lk=e=>({id:e,name:e,type:"frame",def:"",predicate:"",primary:"true"}),_$={uniques:[],cols:["id","name","type","def","predicate","primary"],rows:[lk(fk),uk]},tc={uniques:[],cols:["id","name","type","def","predicate","primary"],rows:[ic]},$x={uniques:["name,schemaId"],cols:["name","schemaId","type","value","attrs","hidden","unique","primary"]},nc={...$x,rows:[{name:fo,schemaId:Ys,type:"file",primary:"true",hidden:"",unique:"",attrs:"",value:""},{name:Vr.properties.fileProperty.createdTime,schemaId:Ys,type:"fileprop",value:fo+".ctime",hidden:"",unique:"",attrs:"",primary:"true"}]};var T$=[{name:Vr.properties.defaultField,schemaId:"",type:"text",primary:"true"}],Id={...$x,rows:[{name:fo,schemaId:Ys,type:"file",primary:"true",hidden:"",unique:"",attrs:"",value:""}]};var F$={schema:ic,cols:nc.rows,rows:[]},O$={schema:ic,cols:nc.rows,rows:[]},B$={schema:ic,cols:Id.rows,rows:[]},Zx=(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 I$={m_schema:tc,m_fields:nc,...Zx(nc.rows,tc.rows)},P$={m_schema:tc,m_fields:Id,...Zx(Id.rows,tc.rows)};var pk=(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 Qx=({field:e,value:r})=>r=="ctime"?{value:\`parseDate(prop('\${e}')['metadata']['file']['\${r}'])\`}:{value:\`prop('\${e}')['metadata']['file']['\${r}']\`},Pd=(e,r,t,n)=>{let i=Kl(e);if(i)return r=="fileprop"&&i.field?Qx(i):(r=="option"&&i.source?.length>0&&(i.source=="$commands"?i.options=t.cli.allCommands():i.source=="$links"?i.options=t.spaceManager.allPaths().map(a=>({name:a,value:a})):i.source=="$super"&&(i.options=pk(t,n))),[...Gx(r).configKeys??[],"alias","default"].reduce((a,s)=>({...a,[s]:i[s]}),{}));if(!r)return{};if(!i)if(r=="context")e?.length>0?i={space:e}:i={};else if(r.startsWith("date"))e?.length>0?i={format:e}:i={};else if(r.startsWith("fileprop"))if(e?.length>0){let[a,s]=e.split(".");i=Qx({field:a,value:s})}else i={};else r.startsWith("option")&&(e?.length>0?i={options:Ui(e).map(s=>({name:s,value:s}))}:i={});return i??{}};function Mt(){return Mt=Object.assign?Object.assign.bind():function(e){for(var r=1;re[r])}var ey=["Matrix","Array"],ry=["number","BigNumber","Fraction"];function ny(e,r){function t(n){if(n){var i=$s(e,tr);ty(n,"matrix",ey),ty(n,"number",ry),kd(e,n);var a=$s(e,tr),s=$s(n,tr);return r("config",a,i,s),a}else return $s(e,tr)}return t.MATRIX_OPTIONS=ey,t.NUMBER_OPTIONS=ry,Object.keys(ac).forEach(n=>{Object.defineProperty(t,n,{get:()=>e[n],enumerable:!0,configurable:!0})}),t}function mk(e,r){return e.indexOf(r)!==-1}function ty(e,r,t){e[r]!==void 0&&!mk(t,e[r])&&console.warn('Warning: Unknown value "'+e[r]+'" for configuration option "'+r+'". Available options: '+t.map(n=>JSON.stringify(n)).join(", ")+".")}var Tg={};u8(Tg,{createAbs:()=>ib,createAccessorNode:()=>E2,createAcos:()=>tN,createAcosh:()=>iN,createAcot:()=>oN,createAcoth:()=>uN,createAcsc:()=>lN,createAcsch:()=>pN,createAdd:()=>d2,createAddScalar:()=>sb,createAnd:()=>ap,createAndTransform:()=>WO,createApply:()=>ou,createApplyTransform:()=>dO,createArg:()=>uw,createArrayNode:()=>C2,createAsec:()=>hN,createAsech:()=>vN,createAsin:()=>xN,createAsinh:()=>yN,createAssignmentNode:()=>T2,createAtan:()=>bN,createAtan2:()=>DN,createAtanh:()=>NN,createAtomicMass:()=>Z3,createAvogadro:()=>Q3,createBellNumbers:()=>MF,createBigNumberClass:()=>Jy,createBignumber:()=>U1,createBin:()=>CD,createBitAnd:()=>Gc,createBitAndTransform:()=>YO,createBitNot:()=>nw,createBitOr:()=>$c,createBitOrTransform:()=>HO,createBitXor:()=>ow,createBlockNode:()=>F2,createBohrMagneton:()=>M3,createBohrRadius:()=>I3,createBoltzmann:()=>X3,createBoolean:()=>q1,createCatalan:()=>TF,createCbrt:()=>cb,createCeil:()=>pb,createChain:()=>tT,createChainClass:()=>EA,createClassicalElectronRadius:()=>P3,createClone:()=>f1,createColumn:()=>Xc,createColumnTransform:()=>vO,createCombinations:()=>qT,createCombinationsWithRep:()=>WT,createCompare:()=>vS,createCompareNatural:()=>bS,createCompareText:()=>DS,createCompile:()=>J2,createComplex:()=>z1,createComplexClass:()=>e1,createComposition:()=>OF,createConcat:()=>Qc,createConcatTransform:()=>_O,createConditionalNode:()=>O2,createConductanceQuantum:()=>_3,createConj:()=>lw,createConstantNode:()=>L2,createCorr:()=>kT,createCos:()=>EN,createCosh:()=>MN,createCot:()=>TN,createCoth:()=>ON,createCoulomb:()=>E3,createCount:()=>Sw,createCreateUnit:()=>eN,createCross:()=>Aw,createCsc:()=>IN,createCsch:()=>kN,createCtranspose:()=>uD,createCube:()=>hb,createCumSum:()=>Up,createCumSumTransform:()=>RO,createDeepEqual:()=>FS,createDenseMatrixClass:()=>s1,createDerivative:()=>YF,createDet:()=>iT,createDeuteronMass:()=>z3,createDiag:()=>Cw,createDiff:()=>Jc,createDiffTransform:()=>FO,createDistance:()=>NT,createDivide:()=>DT,createDivideScalar:()=>UD,createDot:()=>w2,createDotDivide:()=>eS,createDotMultiply:()=>Qb,createDotPow:()=>KD,createE:()=>s3,createEfimovFactor:()=>$3,createEigs:()=>cT,createElectricConstant:()=>N3,createElectronMass:()=>k3,createElementaryCharge:()=>C3,createEqual:()=>SS,createEqualScalar:()=>B1,createEqualText:()=>AS,createErf:()=>gD,createEvaluate:()=>j2,createExp:()=>vb,createExpm:()=>mT,createExpm1:()=>xb,createFactorial:()=>ZT,createFalse:()=>r3,createFaraday:()=>J3,createFermiCoupling:()=>R3,createFft:()=>pD,createFibonacciHeapClass:()=>WS,createFilter:()=>_w,createFilterTransform:()=>xO,createFineStructure:()=>L3,createFirstRadiation:()=>K3,createFix:()=>yb,createFlatten:()=>Fw,createFloor:()=>Wc,createForEach:()=>Bw,createForEachTransform:()=>yO,createFormat:()=>AD,createFraction:()=>W1,createFractionClass:()=>n1,createFreqz:()=>XF,createFunctionAssignmentNode:()=>q2,createFunctionNode:()=>$2,createGamma:()=>YT,createGasConstant:()=>eO,createGcd:()=>Ab,createGetMatrixDataType:()=>Pw,createGravitationConstant:()=>b3,createGravity:()=>fO,createHartreeEnergy:()=>q3,createHasNumericValue:()=>S1,createHelp:()=>eT,createHelpClass:()=>AA,createHex:()=>FD,createHypot:()=>g2,createI:()=>d3,createIdentity:()=>Rw,createIfft:()=>hD,createIm:()=>pw,createImmutableDenseMatrixClass:()=>qS,createIndex:()=>N2,createIndexClass:()=>zS,createIndexNode:()=>U2,createIndexTransform:()=>bO,createInfinity:()=>n3,createIntersect:()=>AT,createInv:()=>oT,createInverseConductanceQuantum:()=>T3,createInvmod:()=>$b,createIsInteger:()=>c1,createIsNaN:()=>_1,createIsNegative:()=>y1,createIsNumeric:()=>w1,createIsPositive:()=>A1,createIsPrime:()=>RD,createIsZero:()=>C1,createKldivergence:()=>XT,createKlitzing:()=>B3,createKron:()=>qw,createLN10:()=>l3,createLN2:()=>f3,createLOG10E:()=>p3,createLOG2E:()=>c3,createLarger:()=>MS,createLargerEq:()=>_S,createLcm:()=>Cb,createLeafCount:()=>IF,createLeftShift:()=>lS,createLgamma:()=>GT,createLog:()=>GD,createLog10:()=>_b,createLog1p:()=>ZD,createLog2:()=>Fb,createLoschmidt:()=>j3,createLsolve:()=>tS,createLsolveAll:()=>oS,createLup:()=>iA,createLusolve:()=>DA,createLyap:()=>wT,createMad:()=>FT,createMagneticConstant:()=>S3,createMagneticFluxQuantum:()=>F3,createMap:()=>zw,createMapTransform:()=>DO,createMatrix:()=>Y1,createMatrixClass:()=>a1,createMatrixFromColumns:()=>X1,createMatrixFromFunction:()=>G1,createMatrixFromRows:()=>Z1,createMax:()=>mp,createMaxTransform:()=>SO,createMean:()=>zp,createMeanTransform:()=>NO,createMedian:()=>_T,createMin:()=>hp,createMinTransform:()=>AO,createMod:()=>Vc,createMode:()=>wD,createMolarMass:()=>sO,createMolarMassC12:()=>uO,createMolarPlanckConstant:()=>rO,createMolarVolume:()=>tO,createMultinomial:()=>KT,createMultiply:()=>Ib,createMultiplyScalar:()=>Ob,createNaN:()=>i3,createNeutronMass:()=>W3,createNode:()=>A2,createNorm:()=>y2,createNot:()=>vw,createNthRoot:()=>kb,createNthRoots:()=>XD,createNuclearMagneton:()=>O3,createNull:()=>t3,createNumber:()=>P1,createNumeric:()=>LD,createObjectNode:()=>z2,createOct:()=>_D,createOnes:()=>Vw,createOperatorNode:()=>W2,createOr:()=>Zc,createOrTransform:()=>VO,createParenthesisNode:()=>V2,createParse:()=>Q2,createParser:()=>tA,createParserClass:()=>eA,createPartitionSelect:()=>IS,createPermutations:()=>rF,createPhi:()=>u3,createPi:()=>a3,createPickRandom:()=>bF,createPinv:()=>uT,createPlanckCharge:()=>mO,createPlanckConstant:()=>w3,createPlanckLength:()=>lO,createPlanckMass:()=>cO,createPlanckTemperature:()=>hO,createPlanckTime:()=>pO,createPolynomialRoot:()=>NA,createPow:()=>WD,createPrint:()=>ip,createPrintTransform:()=>zO,createProd:()=>SD,createProtonMass:()=>U3,createQr:()=>oA,createQuantileSeq:()=>Vp,createQuantileSeqTransform:()=>PO,createQuantumOfCirculation:()=>V3,createRandom:()=>DF,createRandomInt:()=>NF,createRange:()=>ep,createRangeClass:()=>i1,createRangeNode:()=>Y2,createRangeTransform:()=>EO,createRationalize:()=>GF,createRe:()=>hw,createReducedPlanckConstant:()=>D3,createRelationalNode:()=>H2,createReplacer:()=>KF,createReshape:()=>Gw,createResize:()=>$w,createResolve:()=>UF,createResultSet:()=>ky,createReviver:()=>JF,createRightArithShift:()=>pS,createRightLogShift:()=>hS,createRotate:()=>Qw,createRotationMatrix:()=>Jw,createRound:()=>YD,createRow:()=>rp,createRowTransform:()=>CO,createRydberg:()=>Y3,createSQRT1_2:()=>m3,createSQRT2:()=>h3,createSackurTetrode:()=>nO,createSchur:()=>yT,createSec:()=>LN,createSech:()=>UN,createSecondRadiation:()=>iO,createSetCartesian:()=>QN,createSetDifference:()=>JN,createSetDistinct:()=>jN,createSetIntersect:()=>r2,createSetIsSubset:()=>n2,createSetMultiplicity:()=>a2,createSetPowerset:()=>s2,createSetSize:()=>f2,createSetSymDifference:()=>c2,createSetUnion:()=>m2,createSign:()=>Lb,createSimplify:()=>kF,createSimplifyConstant:()=>RF,createSimplifyCore:()=>qF,createSin:()=>WN,createSinh:()=>YN,createSize:()=>eD,createSlu:()=>bA,createSmaller:()=>ES,createSmallerEq:()=>CS,createSolveODE:()=>vD,createSort:()=>kS,createSpaClass:()=>VS,createSparse:()=>KS,createSparseMatrixClass:()=>I1,createSpeedOfLight:()=>y3,createSplitUnit:()=>K1,createSqrt:()=>qb,createSqrtm:()=>dT,createSquare:()=>zb,createSqueeze:()=>tD,createStd:()=>Yp,createStdTransform:()=>OO,createStefanBoltzmann:()=>aO,createStirlingS2:()=>EF,createString:()=>R1,createSubset:()=>tp,createSubsetTransform:()=>MO,createSubtract:()=>Vb,createSubtractScalar:()=>fb,createSum:()=>Lp,createSumTransform:()=>IO,createSylvester:()=>gT,createSymbolNode:()=>G2,createSymbolicEqual:()=>WF,createTan:()=>GN,createTanh:()=>$N,createTau:()=>o3,createThomsonCrossSection:()=>H3,createTo:()=>PD,createTrace:()=>D2,createTranspose:()=>oD,createTrue:()=>e3,createTypeOf:()=>F1,createTyped:()=>Py,createUnaryMinus:()=>eb,createUnaryPlus:()=>tb,createUnequal:()=>OS,createUnitClass:()=>ZS,createUnitFunction:()=>XS,createUppercaseE:()=>g3,createUppercasePi:()=>v3,createUsolve:()=>iS,createUsolveAll:()=>uS,createVacuumImpedance:()=>A3,createVariance:()=>Wp,createVarianceTransform:()=>qO,createVersion:()=>x3,createWeakMixingAngle:()=>G3,createWienDisplacement:()=>oO,createXgcd:()=>Hb,createXor:()=>yw,createZeros:()=>lD,createZeta:()=>yD,createZpk2tf:()=>ZF});var ev=Xn(yc(),1);function He(e){return typeof e=="boolean"?!0:isFinite(e)?e===Math.round(e):!1}var hi=Math.sign||function(e){return e>0?1:e<0?-1:0},oy=Math.log2||function(r){return Math.log(r)/Math.LN2},sy=Math.log10||function(r){return Math.log(r)/Math.LN10},bc=Math.log1p||function(e){return Math.log(e+1)},uy=Math.cbrt||function(r){if(r===0)return r;var t=r<0,n;return t&&(r=-r),isFinite(r)?(n=Math.exp(Math.log(r)/3),n=(r/(n*n)+2*n)/3):n=r,t?-n:n},fy=Math.expm1||function(r){return r>=2e-4||r<=-2e-4?Math.exp(r)-1:r+r*r/2+r*r*r/6};function Ud(e,r,t){var n={2:"0b",8:"0o",16:"0x"},i=n[r],a="";if(t){if(t<1)throw new Error("size must be in greater than 0");if(!He(t))throw new Error("size must be an integer");if(e>2**(t-1)-1||e<-(2**(t-1)))throw new Error("Value must be in range [-2^".concat(t-1,", 2^").concat(t-1,"-1]"));if(!He(e))throw new Error("Value must be an integer");e<0&&(e=e+2**t),a="i".concat(t)}var s="";return e<0&&(e=-e,s="-"),"".concat(s).concat(i).concat(e.toString(r)).concat(a)}function Wi(e,r){if(typeof r=="function")return r(e);if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var{notation:t,precision:n,wordSize:i}=zd(r);switch(t){case"fixed":return Wd(e,n);case"exponential":return ly(e,n);case"engineering":return hk(e,n);case"bin":return Ud(e,2,i);case"oct":return Ud(e,8,i);case"hex":return Ud(e,16,i);case"auto":return dk(e,n,r).replace(/((\\.\\d*?)(0+))($|e)/,function(){var a=arguments[2],s=arguments[4];return a!=="."?a+s:s});default:throw new Error('Unknown notation "'+t+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function zd(e){var r="auto",t,n;if(e!==void 0)if(ar(e))t=e;else if(je(e))t=e.toNumber();else if(fa(e))e.precision!==void 0&&(t=iy(e.precision,()=>{throw new Error('Option "precision" must be a number or BigNumber')})),e.wordSize!==void 0&&(n=iy(e.wordSize,()=>{throw new Error('Option "wordSize" must be a number or BigNumber')})),e.notation&&(r=e.notation);else throw new Error("Unsupported type of options, number, BigNumber, or object expected");return{notation:r,precision:t,wordSize:n}}function Xs(e){var r=String(e).toLowerCase().match(/^(-?)(\\d+\\.?\\d*)(e([+-]?\\d+))?$/);if(!r)throw new SyntaxError("Invalid number "+e);var t=r[1],n=r[2],i=parseFloat(r[4]||"0"),a=n.indexOf(".");i+=a!==-1?a-1:n.length-1;var s=n.replace(".","").replace(/^0*/,function(l){return i-=l.length,""}).replace(/0*$/,"").split("").map(function(l){return parseInt(l)});return s.length===0&&(s.push(0),i++),{sign:t,coefficients:s,exponent:i}}function hk(e,r){if(isNaN(e)||!isFinite(e))return String(e);var t=Xs(e),n=wc(t,r),i=n.exponent,a=n.coefficients,s=i%3===0?i:i<0?i-3-i%3:i-i%3;if(ar(r))for(;r>a.length||i-s+1>a.length;)a.push(0);else for(var l=Math.abs(i-s)-(a.length-1),f=0;f0;)u++,o--;var p=a.slice(u).join(""),h=ar(r)&&p.length||p.match(/[1-9]/)?"."+p:"",d=a.slice(0,u).join("")+h+"e"+(i>=0?"+":"")+s.toString();return n.sign+d}function Wd(e,r){if(isNaN(e)||!isFinite(e))return String(e);var t=Xs(e),n=typeof r=="number"?wc(t,t.exponent+1+r):t,i=n.coefficients,a=n.exponent+1,s=a+(r||0);return i.length0?"."+i.join(""):"")+"e"+(a>=0?"+":"")+a}function dk(e,r,t){if(isNaN(e)||!isFinite(e))return String(e);var n=ay(t?.lowerExp,-3),i=ay(t?.upperExp,5),a=Xs(e),s=r?wc(a,r):a;if(s.exponent=i)return ly(e,r);var l=s.coefficients,f=s.exponent;l.length0?f:0;return or){var i=n.splice(r,n.length-r);if(i[0]>=5){var a=r-1;for(n[a]++;n[a]===10;)n.pop(),a===0&&(n.unshift(0),t.exponent++,a++),a--,n[a]++}}return t}function Qs(e){for(var r=[],t=0;t0?!0:e<0?!1:1/e===1/0,n=r>0?!0:r<0?!1:1/r===1/0;return t^n?-e:e}function iy(e,r){if(ar(e))return e;if(je(e))return e.toNumber();r()}function ay(e,r){return ar(e)?e:je(e)?e.toNumber():r}function Vd(e,r,t){var n=e.constructor,i=new n(2),a="";if(t){if(t<1)throw new Error("size must be in greater than 0");if(!He(t))throw new Error("size must be an integer");if(e.greaterThan(i.pow(t-1).sub(1))||e.lessThan(i.pow(t-1).mul(-1)))throw new Error("Value must be in range [-2^".concat(t-1,", 2^").concat(t-1,"-1]"));if(!e.isInteger())throw new Error("Value must be an integer");e.lessThan(0)&&(e=e.add(i.pow(t))),a="i".concat(t)}switch(r){case 2:return"".concat(e.toBinary()).concat(a);case 8:return"".concat(e.toOctal()).concat(a);case 16:return"".concat(e.toHexadecimal()).concat(a);default:throw new Error("Base ".concat(r," not supported "))}}function yy(e,r){if(typeof r=="function")return r(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var{notation:t,precision:n,wordSize:i}=zd(r);switch(t){case"fixed":return xk(e,n);case"exponential":return gy(e,n);case"engineering":return gk(e,n);case"bin":return Vd(e,2,i);case"oct":return Vd(e,8,i);case"hex":return Vd(e,16,i);case"auto":{var a=xy(r?.lowerExp,-3),s=xy(r?.upperExp,5);if(e.isZero())return"0";var l,f=e.toSignificantDigits(n),o=f.e;return o>=a&&o=0?"+":"")+n.toString()}function gy(e,r){return r!==void 0?e.toExponential(r-1):e.toExponential()}function xk(e,r){return e.toFixed(r)}function xy(e,r){return ar(e)?e:je(e)?e.toNumber():r}function wy(e,r){var t=e.length-r.length,n=e.length;return e.substring(t,n)===r}function lr(e,r){var t=yk(e,r);return r&&typeof r=="object"&&"truncate"in r&&t.length>r.truncate?t.substring(0,r.truncate-3)+"...":t}function yk(e,r){if(typeof e=="number")return Wi(e,r);if(je(e))return yy(e,r);if(bk(e))return!r||r.fraction!=="decimal"?e.s*e.n+"/"+e.d:e.toString();if(Array.isArray(e))return Dy(e,r);if(yt(e))return Ko(e);if(typeof e=="function")return e.syntax?String(e.syntax):"function";if(e&&typeof e=="object"){if(typeof e.format=="function")return e.format(r);if(e&&e.toString(r)!=={}.toString())return e.toString(r);var t=Object.keys(e).map(n=>Ko(n)+": "+lr(e[n],r));return"{"+t.join(", ")+"}"}return String(e)}function Ko(e){for(var r=String(e),t="",n=0;n/g,">"),r}function Dy(e,r){if(Array.isArray(e)){for(var t="[",n=e.length,i=0;ir?1:-1}function pr(e,r,t){if(!(this instanceof pr))throw new SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=r,this.relation=t,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(r)?"["+r.join(", ")+"]":r)+")",this.stack=new Error().stack}pr.prototype=new RangeError;pr.prototype.constructor=RangeError;pr.prototype.name="DimensionError";pr.prototype.isDimensionError=!0;function Xt(e,r,t){if(!(this instanceof Xt))throw new SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=r):(this.min=r,this.max=t),this.min!==void 0&&this.index=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=new Error().stack}Xt.prototype=new RangeError;Xt.prototype.constructor=RangeError;Xt.prototype.name="IndexError";Xt.prototype.isIndexError=!0;function or(e){for(var r=[];Array.isArray(e);)r.push(e.length),e=e[0];return r}function Sy(e,r,t){var n,i=e.length;if(i!==r[t])throw new pr(i,r[t]);if(t")}function Hd(e,r){var t=r.length===0;if(t){if(Array.isArray(e))throw new pr(e.length,0)}else Sy(e,r,0)}function gf(e,r){var t=e.isMatrix?e._size:or(e),n=r._sourceSize;n.forEach((i,a)=>{if(i!==null&&i!==t[a])throw new pr(i,t[a])})}function Xr(e,r){if(e!==void 0){if(!ar(e)||!He(e))throw new TypeError("Index must be an integer (value: "+e+")");if(e<0||typeof r=="number"&&e>=r)throw new Xt(e,r)}}function jo(e){for(var r=0;r=0,f=r%t===0;if(l)if(f)n[a]=-r/t;else throw new Error("Could not replace wildcard, since "+r+" is no multiple of "+-t);return n}function Ny(e){return e.reduce((r,t)=>r*t,1)}function wk(e,r){for(var t=e,n,i=r.length-1;i>0;i--){var a=r[i];n=[];for(var s=t.length/a,l=0;lr.test(t))}function Gd(e,r){return Array.prototype.join.call(e,r)}function Pa(e){if(!Array.isArray(e))throw new TypeError("Array input expected");if(e.length===0)return e;var r=[],t=0;r[0]={value:e[0],identifier:0};for(var n=1;n1)return e.slice(1).reduce(function(t,n){return Cy(t,n,r,0)},e[0]);throw new Error("Wrong number of arguments in function concat")}function Dk(){for(var e=arguments.length,r=new Array(e),t=0;th.length),i=Math.max(...n),a=new Array(i).fill(null),s=0;sa[u]&&(a[u]=l[o])}for(var p=0;p1||e[i]>r[a])throw new Error("shape missmatch: missmatch is found in arg with shape (".concat(e,") not possible to broadcast dimension ").concat(n," with size ").concat(e[i]," to size ").concat(r[a]))}}function Qd(e,r){var t=or(e);if(zi(t,r))return e;bf(t,r);var n=Dk(t,r),i=n.length,a=[...Array(i-t.length).fill(1),...t],s=Nk(e);t.length!Ek(a)).every(a=>t[a]!==void 0);if(!n){var i=r.filter(a=>t[a]===void 0);throw new Error('Cannot create function "'.concat(e,'", ')+"some dependencies are missing: ".concat(i.map(a=>'"'.concat(a,'"')).join(", "),"."))}}function Ek(e){return e&&e[0]==="?"}function Xd(e){return e&&e[0]==="?"?e.slice(1):e}function gt(e,r){if(Fy(e)&&_y(e,r))return e[r];throw typeof e[r]=="function"&&Cc(e,r)?new Error('Cannot access method "'+r+'" as a property'):new Error('No access to property "'+r+'"')}function ca(e,r,t){if(Fy(e)&&_y(e,r))return e[r]=t,t;throw new Error('No access to property "'+r+'"')}function My(e,r){return r in e}function _y(e,r){return!e||typeof e!="object"?!1:$e(Ck,r)?!0:!(r in Object.prototype||r in Function.prototype)}function Ty(e,r){if(!Cc(e,r))throw new Error('No access to method "'+r+'"');return e[r]}function Cc(e,r){return e==null||typeof e[r]!="function"||$e(e,r)&&Object.getPrototypeOf&&r in Object.getPrototypeOf(e)?!1:$e(Mk,r)?!0:!(r in Object.prototype||r in Function.prototype)}function Fy(e){return typeof e=="object"&&e&&e.constructor===Object}var Ck={length:!0,name:!0},Mk={toString:!0,valueOf:!0,toLocaleString:!0};var rs=class{constructor(r){this.wrappedObject=r,this[Symbol.iterator]=this.entries}keys(){return Object.keys(this.wrappedObject).values()}get(r){return gt(this.wrappedObject,r)}set(r,t){return ca(this.wrappedObject,r,t),this}has(r){return My(this.wrappedObject,r)}entries(){return Oy(this.keys(),r=>[r,this.get(r)])}forEach(r){for(var t of this.keys())r(this.get(t),t,this)}delete(r){delete this.wrappedObject[r]}clear(){for(var r of this.keys())this.delete(r)}get size(){return Object.keys(this.wrappedObject).length}},eu=class{constructor(r,t,n){this.a=r,this.b=t,this.bKeys=n,this[Symbol.iterator]=this.entries}get(r){return this.bKeys.has(r)?this.b.get(r):this.a.get(r)}set(r,t){return this.bKeys.has(r)?this.b.set(r,t):this.a.set(r,t),this}has(r){return this.b.has(r)||this.a.has(r)}keys(){return new Set([...this.a.keys(),...this.b.keys()])[Symbol.iterator]()}entries(){return Oy(this.keys(),r=>[r,this.get(r)])}forEach(r){for(var t of this.keys())r(this.get(t),t,this)}delete(r){return this.bKeys.has(r)?this.b.delete(r):this.a.delete(r)}clear(){this.a.clear(),this.b.clear()}get size(){return[...this.keys()].length}};function Oy(e,r){return{next:()=>{var t=e.next();return t.done?t:{value:r(t.value),done:!1}}}}function go(){return new Map}function ka(e){if(!e)return go();if(Jd(e))return e;if(fa(e))return new rs(e);throw new Error("createMap can create maps from objects or Maps")}function By(e){if(e instanceof rs)return e.wrappedObject;var r={};for(var t of e.keys()){var n=e.get(t);ca(r,t,n)}return r}function Jd(e){return e?e instanceof Map||e instanceof rs||typeof e.set=="function"&&typeof e.get=="function"&&typeof e.keys=="function"&&typeof e.has=="function":!1}var Iy=function(){return Iy=ev.default.create,ev.default},_k=["?BigNumber","?Complex","?DenseMatrix","?Fraction"],Py=T("typed",_k,function(r){var{BigNumber:t,Complex:n,DenseMatrix:i,Fraction:a}=r,s=Iy();return s.clear(),s.addTypes([{name:"number",test:ar},{name:"Complex",test:Gt},{name:"BigNumber",test:je},{name:"Fraction",test:Jn},{name:"Unit",test:qt},{name:"identifier",test:l=>yt&&/^(?:[A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u0870-\\u0887\\u0889-\\u088E\\u08A0-\\u08C9\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C5D\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D04-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u1711\\u171F-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4C\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7CA\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7D9\\uA7F2-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]|\\uD800[\\uDC00-\\uDC0B\\uDC0D-\\uDC26\\uDC28-\\uDC3A\\uDC3C\\uDC3D\\uDC3F-\\uDC4D\\uDC50-\\uDC5D\\uDC80-\\uDCFA\\uDE80-\\uDE9C\\uDEA0-\\uDED0\\uDF00-\\uDF1F\\uDF2D-\\uDF40\\uDF42-\\uDF49\\uDF50-\\uDF75\\uDF80-\\uDF9D\\uDFA0-\\uDFC3\\uDFC8-\\uDFCF]|\\uD801[\\uDC00-\\uDC9D\\uDCB0-\\uDCD3\\uDCD8-\\uDCFB\\uDD00-\\uDD27\\uDD30-\\uDD63\\uDD70-\\uDD7A\\uDD7C-\\uDD8A\\uDD8C-\\uDD92\\uDD94\\uDD95\\uDD97-\\uDDA1\\uDDA3-\\uDDB1\\uDDB3-\\uDDB9\\uDDBB\\uDDBC\\uDE00-\\uDF36\\uDF40-\\uDF55\\uDF60-\\uDF67\\uDF80-\\uDF85\\uDF87-\\uDFB0\\uDFB2-\\uDFBA]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC60-\\uDC76\\uDC80-\\uDC9E\\uDCE0-\\uDCF2\\uDCF4\\uDCF5\\uDD00-\\uDD15\\uDD20-\\uDD39\\uDD80-\\uDDB7\\uDDBE\\uDDBF\\uDE00\\uDE10-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE35\\uDE60-\\uDE7C\\uDE80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE4\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2\\uDD00-\\uDD23\\uDE80-\\uDEA9\\uDEB0\\uDEB1\\uDF00-\\uDF1C\\uDF27\\uDF30-\\uDF45\\uDF70-\\uDF81\\uDFB0-\\uDFC4\\uDFE0-\\uDFF6]|\\uD804[\\uDC03-\\uDC37\\uDC71\\uDC72\\uDC75\\uDC83-\\uDCAF\\uDCD0-\\uDCE8\\uDD03-\\uDD26\\uDD44\\uDD47\\uDD50-\\uDD72\\uDD76\\uDD83-\\uDDB2\\uDDC1-\\uDDC4\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDE3F\\uDE40\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEDE\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF50\\uDF5D-\\uDF61]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC5F-\\uDC61\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDEB8\\uDF00-\\uDF1A\\uDF40-\\uDF46]|\\uD806[\\uDC00-\\uDC2B\\uDCA0-\\uDCDF\\uDCFF-\\uDD06\\uDD09\\uDD0C-\\uDD13\\uDD15\\uDD16\\uDD18-\\uDD2F\\uDD3F\\uDD41\\uDDA0-\\uDDA7\\uDDAA-\\uDDD0\\uDDE1\\uDDE3\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE89\\uDE9D\\uDEB0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46\\uDD60-\\uDD65\\uDD67\\uDD68\\uDD6A-\\uDD89\\uDD98\\uDEE0-\\uDEF2\\uDF02\\uDF04-\\uDF10\\uDF12-\\uDF33\\uDFB0]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC80-\\uDD43]|\\uD80B[\\uDF90-\\uDFF0]|[\\uD80C\\uD81C-\\uD820\\uD822\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883\\uD885-\\uD887][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2F\\uDC41-\\uDC46]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE70-\\uDEBE\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE7F\\uDF00-\\uDF4A\\uDF50\\uDF93-\\uDF9F\\uDFE0\\uDFE1\\uDFE3]|\\uD821[\\uDC00-\\uDFF7]|\\uD823[\\uDC00-\\uDCD5\\uDD00-\\uDD08]|\\uD82B[\\uDFF0-\\uDFF3\\uDFF5-\\uDFFB\\uDFFD\\uDFFE]|\\uD82C[\\uDC00-\\uDD22\\uDD32\\uDD50-\\uDD52\\uDD55\\uDD64-\\uDD67\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB]|\\uD837[\\uDF00-\\uDF1E\\uDF25-\\uDF2A]|\\uD838[\\uDC30-\\uDC6D\\uDD00-\\uDD2C\\uDD37-\\uDD3D\\uDD4E\\uDE90-\\uDEAD\\uDEC0-\\uDEEB]|\\uD839[\\uDCD0-\\uDCEB\\uDFE0-\\uDFE6\\uDFE8-\\uDFEB\\uDFED\\uDFEE\\uDFF0-\\uDFFE]|\\uD83A[\\uDC00-\\uDCC4\\uDD00-\\uDD43\\uDD4B]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDEDF\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF39\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A\\uDF50-\\uDFFF]|\\uD888[\\uDC00-\\uDFAF])(?:[0-9A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u0870-\\u0887\\u0889-\\u088E\\u08A0-\\u08C9\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C5D\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D04-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u1711\\u171F-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4C\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7CA\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7D9\\uA7F2-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]|\\uD800[\\uDC00-\\uDC0B\\uDC0D-\\uDC26\\uDC28-\\uDC3A\\uDC3C\\uDC3D\\uDC3F-\\uDC4D\\uDC50-\\uDC5D\\uDC80-\\uDCFA\\uDE80-\\uDE9C\\uDEA0-\\uDED0\\uDF00-\\uDF1F\\uDF2D-\\uDF40\\uDF42-\\uDF49\\uDF50-\\uDF75\\uDF80-\\uDF9D\\uDFA0-\\uDFC3\\uDFC8-\\uDFCF]|\\uD801[\\uDC00-\\uDC9D\\uDCB0-\\uDCD3\\uDCD8-\\uDCFB\\uDD00-\\uDD27\\uDD30-\\uDD63\\uDD70-\\uDD7A\\uDD7C-\\uDD8A\\uDD8C-\\uDD92\\uDD94\\uDD95\\uDD97-\\uDDA1\\uDDA3-\\uDDB1\\uDDB3-\\uDDB9\\uDDBB\\uDDBC\\uDE00-\\uDF36\\uDF40-\\uDF55\\uDF60-\\uDF67\\uDF80-\\uDF85\\uDF87-\\uDFB0\\uDFB2-\\uDFBA]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC60-\\uDC76\\uDC80-\\uDC9E\\uDCE0-\\uDCF2\\uDCF4\\uDCF5\\uDD00-\\uDD15\\uDD20-\\uDD39\\uDD80-\\uDDB7\\uDDBE\\uDDBF\\uDE00\\uDE10-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE35\\uDE60-\\uDE7C\\uDE80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE4\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2\\uDD00-\\uDD23\\uDE80-\\uDEA9\\uDEB0\\uDEB1\\uDF00-\\uDF1C\\uDF27\\uDF30-\\uDF45\\uDF70-\\uDF81\\uDFB0-\\uDFC4\\uDFE0-\\uDFF6]|\\uD804[\\uDC03-\\uDC37\\uDC71\\uDC72\\uDC75\\uDC83-\\uDCAF\\uDCD0-\\uDCE8\\uDD03-\\uDD26\\uDD44\\uDD47\\uDD50-\\uDD72\\uDD76\\uDD83-\\uDDB2\\uDDC1-\\uDDC4\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDE3F\\uDE40\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEDE\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF50\\uDF5D-\\uDF61]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC5F-\\uDC61\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDEB8\\uDF00-\\uDF1A\\uDF40-\\uDF46]|\\uD806[\\uDC00-\\uDC2B\\uDCA0-\\uDCDF\\uDCFF-\\uDD06\\uDD09\\uDD0C-\\uDD13\\uDD15\\uDD16\\uDD18-\\uDD2F\\uDD3F\\uDD41\\uDDA0-\\uDDA7\\uDDAA-\\uDDD0\\uDDE1\\uDDE3\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE89\\uDE9D\\uDEB0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46\\uDD60-\\uDD65\\uDD67\\uDD68\\uDD6A-\\uDD89\\uDD98\\uDEE0-\\uDEF2\\uDF02\\uDF04-\\uDF10\\uDF12-\\uDF33\\uDFB0]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC80-\\uDD43]|\\uD80B[\\uDF90-\\uDFF0]|[\\uD80C\\uD81C-\\uD820\\uD822\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883\\uD885-\\uD887][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2F\\uDC41-\\uDC46]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE70-\\uDEBE\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE7F\\uDF00-\\uDF4A\\uDF50\\uDF93-\\uDF9F\\uDFE0\\uDFE1\\uDFE3]|\\uD821[\\uDC00-\\uDFF7]|\\uD823[\\uDC00-\\uDCD5\\uDD00-\\uDD08]|\\uD82B[\\uDFF0-\\uDFF3\\uDFF5-\\uDFFB\\uDFFD\\uDFFE]|\\uD82C[\\uDC00-\\uDD22\\uDD32\\uDD50-\\uDD52\\uDD55\\uDD64-\\uDD67\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB]|\\uD837[\\uDF00-\\uDF1E\\uDF25-\\uDF2A]|\\uD838[\\uDC30-\\uDC6D\\uDD00-\\uDD2C\\uDD37-\\uDD3D\\uDD4E\\uDE90-\\uDEAD\\uDEC0-\\uDEEB]|\\uD839[\\uDCD0-\\uDCEB\\uDFE0-\\uDFE6\\uDFE8-\\uDFEB\\uDFED\\uDFEE\\uDFF0-\\uDFFE]|\\uD83A[\\uDC00-\\uDCC4\\uDD00-\\uDD43\\uDD4B]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDEDF\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF39\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A\\uDF50-\\uDFFF]|\\uD888[\\uDC00-\\uDFAF])*$/.test(l)},{name:"string",test:yt},{name:"Chain",test:Gs},{name:"Array",test:Ar},{name:"Matrix",test:Ge},{name:"DenseMatrix",test:Ia},{name:"SparseMatrix",test:Kn},{name:"Range",test:mo},{name:"Index",test:ua},{name:"boolean",test:oc},{name:"ResultSet",test:sc},{name:"Help",test:Hs},{name:"function",test:uc},{name:"Date",test:fc},{name:"RegExp",test:lc},{name:"null",test:cc},{name:"undefined",test:pc},{name:"AccessorNode",test:Sn},{name:"ArrayNode",test:$t},{name:"AssignmentNode",test:mc},{name:"BlockNode",test:hc},{name:"ConditionalNode",test:dc},{name:"ConstantNode",test:yr},{name:"FunctionNode",test:fn},{name:"FunctionAssignmentNode",test:mi},{name:"IndexNode",test:kn},{name:"Node",test:Sr},{name:"ObjectNode",test:la},{name:"OperatorNode",test:ut},{name:"ParenthesisNode",test:Zt},{name:"RangeNode",test:vc},{name:"RelationalNode",test:gc},{name:"SymbolNode",test:rt},{name:"Map",test:Jd},{name:"Object",test:fa}]),s.addConversions([{from:"number",to:"BigNumber",convert:function(f){if(t||Kd(f),cy(f)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+f+"). Use function bignumber(x) to convert to BigNumber.");return new t(f)}},{from:"number",to:"Complex",convert:function(f){return n||Mc(f),new n(f,0)}},{from:"BigNumber",to:"Complex",convert:function(f){return n||Mc(f),new n(f.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(f){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(f){return n||Mc(f),new n(f.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(f){a||jd(f);var o=new a(f);if(o.valueOf()!==f)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+f+"). Use function fraction(x) to convert to Fraction.");return o}},{from:"string",to:"number",convert:function(f){var o=Number(f);if(isNaN(o))throw new Error('Cannot convert "'+f+'" to a number');return o}},{from:"string",to:"BigNumber",convert:function(f){t||Kd(f);try{return new t(f)}catch{throw new Error('Cannot convert "'+f+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(f){a||jd(f);try{return new a(f)}catch{throw new Error('Cannot convert "'+f+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(f){n||Mc(f);try{return new n(f)}catch{throw new Error('Cannot convert "'+f+'" to Complex')}}},{from:"boolean",to:"number",convert:function(f){return+f}},{from:"boolean",to:"BigNumber",convert:function(f){return t||Kd(f),new t(+f)}},{from:"boolean",to:"Fraction",convert:function(f){return a||jd(f),new a(+f)}},{from:"boolean",to:"string",convert:function(f){return String(f)}},{from:"Array",to:"Matrix",convert:function(f){return i||Tk(),new i(f)}},{from:"Matrix",to:"Array",convert:function(f){return f.valueOf()}}]),s.onMismatch=(l,f,o)=>{var u=s.createError(l,f,o);if(["wrongType","mismatch"].includes(u.data.category)&&f.length===1&&bt(f[0])&&o.some(h=>!h.params.includes(","))){var p=new TypeError("Function '".concat(l,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(l,")'."));throw p.data=u.data,p}throw u},s.onMismatch=(l,f,o)=>{var u=s.createError(l,f,o);if(["wrongType","mismatch"].includes(u.data.category)&&f.length===1&&bt(f[0])&&o.some(h=>!h.params.includes(","))){var p=new TypeError("Function '".concat(l,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(l,")'."));throw p.data=u.data,p}throw u},s});function Kd(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function Mc(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function Tk(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function jd(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}var Fk="ResultSet",Ok=[],ky=T(Fk,Ok,()=>{function e(r){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");this.entries=r||[]}return e.prototype.type="ResultSet",e.prototype.isResultSet=!0,e.prototype.valueOf=function(){return this.entries},e.prototype.toString=function(){return"["+this.entries.join(", ")+"]"},e.prototype.toJSON=function(){return{mathjs:"ResultSet",entries:this.entries}},e.fromJSON=function(r){return new e(r.entries)},e},{isClass:!0});var ru=9e15,wo=1e9,rv="0123456789abcdef",Tc="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Fc="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",tv={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-ru,maxE:ru,crypto:!1},Uy,Ra,Er=!0,Bc="[DecimalError] ",bo=Bc+"Invalid argument: ",zy=Bc+"Precision limit exceeded",Wy=Bc+"crypto unavailable",Vy="[object Decimal]",mn=Math.floor,Jt=Math.pow,Bk=/^0b([01]+(\\.[01]*)?|\\.[01]+)(p[+-]?\\d+)?$/i,Ik=/^0x([0-9a-f]+(\\.[0-9a-f]*)?|\\.[0-9a-f]+)(p[+-]?\\d+)?$/i,Pk=/^0o([0-7]+(\\.[0-7]*)?|\\.[0-7]+)(p[+-]?\\d+)?$/i,Yy=/^(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i,Hi=1e7,br=7,kk=9007199254740991,Rk=Tc.length-1,nv=Fc.length-1,Ue={toStringTag:Vy};Ue.absoluteValue=Ue.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),dr(e)};Ue.ceil=function(){return dr(new this.constructor(this),this.e+1,2)};Ue.clampedTo=Ue.clamp=function(e,r){var t,n=this,i=n.constructor;if(e=new i(e),r=new i(r),!e.s||!r.s)return new i(NaN);if(e.gt(r))throw Error(bo+r);return t=n.cmp(e),t<0?e:n.cmp(r)>0?r:new i(n)};Ue.comparedTo=Ue.cmp=function(e){var r,t,n,i,a=this,s=a.d,l=(e=new a.constructor(e)).d,f=a.s,o=e.s;if(!s||!l)return!f||!o?NaN:f!==o?f:s===l?0:!s^f<0?1:-1;if(!s[0]||!l[0])return s[0]?f:l[0]?-o:0;if(f!==o)return f;if(a.e!==e.e)return a.e>e.e^f<0?1:-1;for(n=s.length,i=l.length,r=0,t=nl[r]^f<0?1:-1;return n===i?0:n>i^f<0?1:-1};Ue.cosine=Ue.cos=function(){var e,r,t=this,n=t.constructor;return t.d?t.d[0]?(e=n.precision,r=n.rounding,n.precision=e+Math.max(t.e,t.sd())+br,n.rounding=1,t=Lk(n,Qy(n,t)),n.precision=e,n.rounding=r,dr(Ra==2||Ra==3?t.neg():t,e,r,!0)):new n(1):new n(NaN)};Ue.cubeRoot=Ue.cbrt=function(){var e,r,t,n,i,a,s,l,f,o,u=this,p=u.constructor;if(!u.isFinite()||u.isZero())return new p(u);for(Er=!1,a=u.s*Jt(u.s*u,1/3),!a||Math.abs(a)==1/0?(t=ln(u.d),e=u.e,(a=(e-t.length+1)%3)&&(t+=a==1||a==-2?"0":"00"),a=Jt(t,1/3),e=mn((e+1)/3)-(e%3==(e<0?-1:2)),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new p(t),n.s=u.s):n=new p(a.toString()),s=(e=p.precision)+3;;)if(l=n,f=l.times(l).times(l),o=f.plus(u),n=xt(o.plus(u).times(l),o.plus(f),s+2,1),ln(l.d).slice(0,s)===(t=ln(n.d)).slice(0,s))if(t=t.slice(s-3,s+1),t=="9999"||!i&&t=="4999"){if(!i&&(dr(l,e+1,0),l.times(l).times(l).eq(u))){n=l;break}s+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(dr(n,e+1,1),r=!n.times(n).times(n).eq(u));break}return Er=!0,dr(n,e,p.rounding,r)};Ue.decimalPlaces=Ue.dp=function(){var e,r=this.d,t=NaN;if(r){if(e=r.length-1,t=(e-mn(this.e/br))*br,e=r[e],e)for(;e%10==0;e/=10)t--;t<0&&(t=0)}return t};Ue.dividedBy=Ue.div=function(e){return xt(this,new this.constructor(e))};Ue.dividedToIntegerBy=Ue.divToInt=function(e){var r=this,t=r.constructor;return dr(xt(r,new t(e),0,1,1),t.precision,t.rounding)};Ue.equals=Ue.eq=function(e){return this.cmp(e)===0};Ue.floor=function(){return dr(new this.constructor(this),this.e+1,3)};Ue.greaterThan=Ue.gt=function(e){return this.cmp(e)>0};Ue.greaterThanOrEqualTo=Ue.gte=function(e){var r=this.cmp(e);return r==1||r===0};Ue.hyperbolicCosine=Ue.cosh=function(){var e,r,t,n,i,a=this,s=a.constructor,l=new s(1);if(!a.isFinite())return new s(a.s?1/0:NaN);if(a.isZero())return l;t=s.precision,n=s.rounding,s.precision=t+Math.max(a.e,a.sd())+4,s.rounding=1,i=a.d.length,i<32?(e=Math.ceil(i/3),r=(1/Pc(4,e)).toString()):(e=16,r="2.3283064365386962890625e-10"),a=tu(s,1,a.times(r),new s(1),!0);for(var f,o=e,u=new s(8);o--;)f=a.times(a),a=l.minus(f.times(u.minus(f.times(u))));return dr(a,s.precision=t,s.rounding=n,!0)};Ue.hyperbolicSine=Ue.sinh=function(){var e,r,t,n,i=this,a=i.constructor;if(!i.isFinite()||i.isZero())return new a(i);if(r=a.precision,t=a.rounding,a.precision=r+Math.max(i.e,i.sd())+4,a.rounding=1,n=i.d.length,n<3)i=tu(a,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Pc(5,e)),i=tu(a,2,i,i,!0);for(var s,l=new a(5),f=new a(16),o=new a(20);e--;)s=i.times(i),i=i.times(l.plus(s.times(f.times(s).plus(o))))}return a.precision=r,a.rounding=t,dr(i,r,t,!0)};Ue.hyperbolicTangent=Ue.tanh=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+7,n.rounding=1,xt(t.sinh(),t.cosh(),n.precision=e,n.rounding=r)):new n(t.s)};Ue.inverseCosine=Ue.acos=function(){var e,r=this,t=r.constructor,n=r.abs().cmp(1),i=t.precision,a=t.rounding;return n!==-1?n===0?r.isNeg()?Yi(t,i,a):new t(0):new t(NaN):r.isZero()?Yi(t,i+4,a).times(.5):(t.precision=i+6,t.rounding=1,r=r.asin(),e=Yi(t,i+4,a).times(.5),t.precision=i,t.rounding=a,e.minus(r))};Ue.inverseHyperbolicCosine=Ue.acosh=function(){var e,r,t=this,n=t.constructor;return t.lte(1)?new n(t.eq(1)?0:NaN):t.isFinite()?(e=n.precision,r=n.rounding,n.precision=e+Math.max(Math.abs(t.e),t.sd())+4,n.rounding=1,Er=!1,t=t.times(t).minus(1).sqrt().plus(t),Er=!0,n.precision=e,n.rounding=r,t.ln()):new n(t)};Ue.inverseHyperbolicSine=Ue.asinh=function(){var e,r,t=this,n=t.constructor;return!t.isFinite()||t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+2*Math.max(Math.abs(t.e),t.sd())+6,n.rounding=1,Er=!1,t=t.times(t).plus(1).sqrt().plus(t),Er=!0,n.precision=e,n.rounding=r,t.ln())};Ue.inverseHyperbolicTangent=Ue.atanh=function(){var e,r,t,n,i=this,a=i.constructor;return i.isFinite()?i.e>=0?new a(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=a.precision,r=a.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?dr(new a(i),e,r,!0):(a.precision=t=n-i.e,i=xt(i.plus(1),new a(1).minus(i),t+e,1),a.precision=e+4,a.rounding=1,i=i.ln(),a.precision=e,a.rounding=r,i.times(.5))):new a(NaN)};Ue.inverseSine=Ue.asin=function(){var e,r,t,n,i=this,a=i.constructor;return i.isZero()?new a(i):(r=i.abs().cmp(1),t=a.precision,n=a.rounding,r!==-1?r===0?(e=Yi(a,t+4,n).times(.5),e.s=i.s,e):new a(NaN):(a.precision=t+6,a.rounding=1,i=i.div(new a(1).minus(i.times(i)).sqrt().plus(1)).atan(),a.precision=t,a.rounding=n,i.times(2)))};Ue.inverseTangent=Ue.atan=function(){var e,r,t,n,i,a,s,l,f,o=this,u=o.constructor,p=u.precision,h=u.rounding;if(o.isFinite()){if(o.isZero())return new u(o);if(o.abs().eq(1)&&p+4<=nv)return s=Yi(u,p+4,h).times(.25),s.s=o.s,s}else{if(!o.s)return new u(NaN);if(p+4<=nv)return s=Yi(u,p+4,h).times(.5),s.s=o.s,s}for(u.precision=l=p+10,u.rounding=1,t=Math.min(28,l/br+2|0),e=t;e;--e)o=o.div(o.times(o).plus(1).sqrt().plus(1));for(Er=!1,r=Math.ceil(l/br),n=1,f=o.times(o),s=new u(o),i=o;e!==-1;)if(i=i.times(f),a=s.minus(i.div(n+=2)),i=i.times(f),s=a.plus(i.div(n+=2)),s.d[r]!==void 0)for(e=r;s.d[e]===a.d[e]&&e--;);return t&&(s=s.times(2<this.d.length-2};Ue.isNaN=function(){return!this.s};Ue.isNegative=Ue.isNeg=function(){return this.s<0};Ue.isPositive=Ue.isPos=function(){return this.s>0};Ue.isZero=function(){return!!this.d&&this.d[0]===0};Ue.lessThan=Ue.lt=function(e){return this.cmp(e)<0};Ue.lessThanOrEqualTo=Ue.lte=function(e){return this.cmp(e)<1};Ue.logarithm=Ue.log=function(e){var r,t,n,i,a,s,l,f,o=this,u=o.constructor,p=u.precision,h=u.rounding,d=5;if(e==null)e=new u(10),r=!0;else{if(e=new u(e),t=e.d,e.s<0||!t||!t[0]||e.eq(1))return new u(NaN);r=e.eq(10)}if(t=o.d,o.s<0||!t||!t[0]||o.eq(1))return new u(t&&!t[0]?-1/0:o.s!=1?NaN:t?0:1/0);if(r)if(t.length>1)a=!0;else{for(i=t[0];i%10===0;)i/=10;a=i!==1}if(Er=!1,l=p+d,s=yo(o,l),n=r?Oc(u,l+10):yo(e,l),f=xt(s,n,l,1),wf(f.d,i=p,h))do if(l+=10,s=yo(o,l),n=r?Oc(u,l+10):yo(e,l),f=xt(s,n,l,1),!a){+ln(f.d).slice(i+1,i+15)+1==1e14&&(f=dr(f,p+1,0));break}while(wf(f.d,i+=10,h));return Er=!0,dr(f,p,h)};Ue.minus=Ue.sub=function(e){var r,t,n,i,a,s,l,f,o,u,p,h,d=this,x=d.constructor;if(e=new x(e),!d.d||!e.d)return!d.s||!e.s?e=new x(NaN):d.d?e.s=-e.s:e=new x(e.d||d.s!==e.s?d:NaN),e;if(d.s!=e.s)return e.s=-e.s,d.plus(e);if(o=d.d,h=e.d,l=x.precision,f=x.rounding,!o[0]||!h[0]){if(h[0])e.s=-e.s;else if(o[0])e=new x(d);else return new x(f===3?-0:0);return Er?dr(e,l,f):e}if(t=mn(e.e/br),u=mn(d.e/br),o=o.slice(),a=u-t,a){for(p=a<0,p?(r=o,a=-a,s=h.length):(r=h,t=u,s=o.length),n=Math.max(Math.ceil(l/br),s)+2,a>n&&(a=n,r.length=1),r.reverse(),n=a;n--;)r.push(0);r.reverse()}else{for(n=o.length,s=h.length,p=n0;--n)o[s++]=0;for(n=h.length;n>a;){if(o[--n]s?a+1:s+1,i>s&&(i=s,t.length=1),t.reverse();i--;)t.push(0);t.reverse()}for(s=o.length,i=u.length,s-i<0&&(i=s,t=u,u=o,o=t),r=0;i;)r=(o[--i]=o[i]+u[i]+r)/Hi|0,o[i]%=Hi;for(r&&(o.unshift(r),++n),s=o.length;o[--s]==0;)o.pop();return e.d=o,e.e=Ic(o,n),Er?dr(e,l,f):e};Ue.precision=Ue.sd=function(e){var r,t=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(bo+e);return t.d?(r=Hy(t.d),e&&t.e+1>r&&(r=t.e+1)):r=NaN,r};Ue.round=function(){var e=this,r=e.constructor;return dr(new r(e),e.e+1,r.rounding)};Ue.sine=Ue.sin=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+Math.max(t.e,t.sd())+br,n.rounding=1,t=Uk(n,Qy(n,t)),n.precision=e,n.rounding=r,dr(Ra>2?t.neg():t,e,r,!0)):new n(NaN)};Ue.squareRoot=Ue.sqrt=function(){var e,r,t,n,i,a,s=this,l=s.d,f=s.e,o=s.s,u=s.constructor;if(o!==1||!l||!l[0])return new u(!o||o<0&&(!l||l[0])?NaN:l?s:1/0);for(Er=!1,o=Math.sqrt(+s),o==0||o==1/0?(r=ln(l),(r.length+f)%2==0&&(r+="0"),o=Math.sqrt(r),f=mn((f+1)/2)-(f<0||f%2),o==1/0?r="5e"+f:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+f),n=new u(r)):n=new u(o.toString()),t=(f=u.precision)+3;;)if(a=n,n=a.plus(xt(s,a,t+2,1)).times(.5),ln(a.d).slice(0,t)===(r=ln(n.d)).slice(0,t))if(r=r.slice(t-3,t+1),r=="9999"||!i&&r=="4999"){if(!i&&(dr(a,f+1,0),a.times(a).eq(s))){n=a;break}t+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(dr(n,f+1,1),e=!n.times(n).eq(s));break}return Er=!0,dr(n,f,u.rounding,e)};Ue.tangent=Ue.tan=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+10,n.rounding=1,t=t.sin(),t.s=1,t=xt(t,new n(1).minus(t.times(t)).sqrt(),e+10,0),n.precision=e,n.rounding=r,dr(Ra==2||Ra==4?t.neg():t,e,r,!0)):new n(NaN)};Ue.times=Ue.mul=function(e){var r,t,n,i,a,s,l,f,o,u=this,p=u.constructor,h=u.d,d=(e=new p(e)).d;if(e.s*=u.s,!h||!h[0]||!d||!d[0])return new p(!e.s||h&&!h[0]&&!d||d&&!d[0]&&!h?NaN:!h||!d?e.s/0:e.s*0);for(t=mn(u.e/br)+mn(e.e/br),f=h.length,o=d.length,f=0;){for(r=0,i=f+n;i>n;)l=a[i]+d[n]*h[i-n-1]+r,a[i--]=l%Hi|0,r=l/Hi|0;a[i]=(a[i]+r)%Hi|0}for(;!a[--s];)a.pop();return r?++t:a.shift(),e.d=a,e.e=Ic(a,t),Er?dr(e,p.precision,p.rounding):e};Ue.toBinary=function(e,r){return ov(this,2,e,r)};Ue.toDecimalPlaces=Ue.toDP=function(e,r){var t=this,n=t.constructor;return t=new n(t),e===void 0?t:(Ln(e,0,wo),r===void 0?r=n.rounding:Ln(r,0,8),dr(t,e+t.e+1,r))};Ue.toExponential=function(e,r){var t,n=this,i=n.constructor;return e===void 0?t=pa(n,!0):(Ln(e,0,wo),r===void 0?r=i.rounding:Ln(r,0,8),n=dr(new i(n),e+1,r),t=pa(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+t:t};Ue.toFixed=function(e,r){var t,n,i=this,a=i.constructor;return e===void 0?t=pa(i):(Ln(e,0,wo),r===void 0?r=a.rounding:Ln(r,0,8),n=dr(new a(i),e+i.e+1,r),t=pa(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+t:t};Ue.toFraction=function(e){var r,t,n,i,a,s,l,f,o,u,p,h,d=this,x=d.d,v=d.constructor;if(!x)return new v(d);if(o=t=new v(1),n=f=new v(0),r=new v(n),a=r.e=Hy(x)-d.e-1,s=a%br,r.d[0]=Jt(10,s<0?br+s:s),e==null)e=a>0?r:o;else{if(l=new v(e),!l.isInt()||l.lt(o))throw Error(bo+l);e=l.gt(r)?a>0?r:o:l}for(Er=!1,l=new v(ln(x)),u=v.precision,v.precision=a=x.length*br*2;p=xt(l,r,0,1,1),i=t.plus(p.times(n)),i.cmp(e)!=1;)t=n,n=i,i=o,o=f.plus(p.times(i)),f=i,i=r,r=l.minus(p.times(i)),l=i;return i=xt(e.minus(t),n,0,1,1),f=f.plus(i.times(o)),t=t.plus(i.times(n)),f.s=o.s=d.s,h=xt(o,n,a,1).minus(d).abs().cmp(xt(f,t,a,1).minus(d).abs())<1?[o,n]:[f,t],v.precision=u,Er=!0,h};Ue.toHexadecimal=Ue.toHex=function(e,r){return ov(this,16,e,r)};Ue.toNearest=function(e,r){var t=this,n=t.constructor;if(t=new n(t),e==null){if(!t.d)return t;e=new n(1),r=n.rounding}else{if(e=new n(e),r===void 0?r=n.rounding:Ln(r,0,8),!t.d)return e.s?t:e;if(!e.d)return e.s&&(e.s=t.s),e}return e.d[0]?(Er=!1,t=xt(t,e,0,r,1).times(e),Er=!0,dr(t)):(e.s=t.s,t=e),t};Ue.toNumber=function(){return+this};Ue.toOctal=function(e,r){return ov(this,8,e,r)};Ue.toPower=Ue.pow=function(e){var r,t,n,i,a,s,l=this,f=l.constructor,o=+(e=new f(e));if(!l.d||!e.d||!l.d[0]||!e.d[0])return new f(Jt(+l,o));if(l=new f(l),l.eq(1))return l;if(n=f.precision,a=f.rounding,e.eq(1))return dr(l,n,a);if(r=mn(e.e/br),r>=e.d.length-1&&(t=o<0?-o:o)<=kk)return i=Gy(f,l,t,n),e.s<0?new f(1).div(i):dr(i,n,a);if(s=l.s,s<0){if(rf.maxE+1||r0?s/0:0):(Er=!1,f.rounding=l.s=1,t=Math.min(12,(r+"").length),i=iv(e.times(yo(l,n+t)),n),i.d&&(i=dr(i,n+5,1),wf(i.d,n,a)&&(r=n+10,i=dr(iv(e.times(yo(l,r+t)),r),r+5,1),+ln(i.d).slice(n+1,n+15)+1==1e14&&(i=dr(i,n+1,0)))),i.s=s,Er=!0,f.rounding=a,dr(i,n,a))};Ue.toPrecision=function(e,r){var t,n=this,i=n.constructor;return e===void 0?t=pa(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(Ln(e,1,wo),r===void 0?r=i.rounding:Ln(r,0,8),n=dr(new i(n),e,r),t=pa(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+t:t};Ue.toSignificantDigits=Ue.toSD=function(e,r){var t=this,n=t.constructor;return e===void 0?(e=n.precision,r=n.rounding):(Ln(e,1,wo),r===void 0?r=n.rounding:Ln(r,0,8)),dr(new n(t),e,r)};Ue.toString=function(){var e=this,r=e.constructor,t=pa(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()&&!e.isZero()?"-"+t:t};Ue.truncated=Ue.trunc=function(){return dr(new this.constructor(this),this.e+1,1)};Ue.valueOf=Ue.toJSON=function(){var e=this,r=e.constructor,t=pa(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()?"-"+t:t};function ln(e){var r,t,n,i=e.length-1,a="",s=e[0];if(i>0){for(a+=s,r=1;rt)throw Error(bo+e)}function wf(e,r,t,n){var i,a,s,l;for(a=e[0];a>=10;a/=10)--r;return--r<0?(r+=br,i=0):(i=Math.ceil((r+1)/br),r%=br),a=Jt(10,br-r),l=e[i]%a|0,n==null?r<3?(r==0?l=l/100|0:r==1&&(l=l/10|0),s=t<4&&l==99999||t>3&&l==49999||l==5e4||l==0):s=(t<4&&l+1==a||t>3&&l+1==a/2)&&(e[i+1]/a/100|0)==Jt(10,r-2)-1||(l==a/2||l==0)&&(e[i+1]/a/100|0)==0:r<4?(r==0?l=l/1e3|0:r==1?l=l/100|0:r==2&&(l=l/10|0),s=(n||t<4)&&l==9999||!n&&t>3&&l==4999):s=((n||t<4)&&l+1==a||!n&&t>3&&l+1==a/2)&&(e[i+1]/a/1e3|0)==Jt(10,r-3)-1,s}function _c(e,r,t){for(var n,i=[0],a,s=0,l=e.length;st-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/t|0,i[n]%=t)}return i.reverse()}function Lk(e,r){var t,n,i;if(r.isZero())return r;n=r.d.length,n<32?(t=Math.ceil(n/3),i=(1/Pc(4,t)).toString()):(t=16,i="2.3283064365386962890625e-10"),e.precision+=t,r=tu(e,1,r.times(i),new e(1));for(var a=t;a--;){var s=r.times(r);r=s.times(s).minus(s).times(8).plus(1)}return e.precision-=t,r}var xt=function(){function e(n,i,a){var s,l=0,f=n.length;for(n=n.slice();f--;)s=n[f]*i+l,n[f]=s%a|0,l=s/a|0;return l&&n.unshift(l),n}function r(n,i,a,s){var l,f;if(a!=s)f=a>s?1:-1;else for(l=f=0;li[l]?1:-1;break}return f}function t(n,i,a,s){for(var l=0;a--;)n[a]-=l,l=n[a]1;)n.shift()}return function(n,i,a,s,l,f){var o,u,p,h,d,x,v,y,w,C,b,A,E,S,O,F,M,_,k,L,Y=n.constructor,$=n.s==i.s?1:-1,V=n.d,q=i.d;if(!V||!V[0]||!q||!q[0])return new Y(!n.s||!i.s||(V?q&&V[0]==q[0]:!q)?NaN:V&&V[0]==0||!q?$*0:$/0);for(f?(d=1,u=n.e-i.e):(f=Hi,d=br,u=mn(n.e/d)-mn(i.e/d)),k=q.length,M=V.length,w=new Y($),C=w.d=[],p=0;q[p]==(V[p]||0);p++);if(q[p]>(V[p]||0)&&u--,a==null?(S=a=Y.precision,s=Y.rounding):l?S=a+(n.e-i.e)+1:S=a,S<0)C.push(1),x=!0;else{if(S=S/d+2|0,p=0,k==1){for(h=0,q=q[0],S++;(p1&&(q=e(q,h,f),V=e(V,h,f),k=q.length,M=V.length),F=k,b=V.slice(0,k),A=b.length;A=f/2&&++_;do h=0,o=r(q,b,k,A),o<0?(E=b[0],k!=A&&(E=E*f+(b[1]||0)),h=E/_|0,h>1?(h>=f&&(h=f-1),v=e(q,h,f),y=v.length,A=b.length,o=r(v,b,y,A),o==1&&(h--,t(v,k=10;h/=10)p++;w.e=p+u*d-1,dr(w,l?a+w.e+1:a,s,x)}return w}}();function dr(e,r,t,n){var i,a,s,l,f,o,u,p,h,d=e.constructor;e:if(r!=null){if(p=e.d,!p)return e;for(i=1,l=p[0];l>=10;l/=10)i++;if(a=r-i,a<0)a+=br,s=r,u=p[h=0],f=u/Jt(10,i-s-1)%10|0;else if(h=Math.ceil((a+1)/br),l=p.length,h>=l)if(n){for(;l++<=h;)p.push(0);u=f=0,i=1,a%=br,s=a-br+1}else break e;else{for(u=l=p[h],i=1;l>=10;l/=10)i++;a%=br,s=a-br+i,f=s<0?0:u/Jt(10,i-s-1)%10|0}if(n=n||r<0||p[h+1]!==void 0||(s<0?u:u%Jt(10,i-s-1)),o=t<4?(f||n)&&(t==0||t==(e.s<0?3:2)):f>5||f==5&&(t==4||n||t==6&&(a>0?s>0?u/Jt(10,i-s):0:p[h-1])%10&1||t==(e.s<0?8:7)),r<1||!p[0])return p.length=0,o?(r-=e.e+1,p[0]=Jt(10,(br-r%br)%br),e.e=-r||0):p[0]=e.e=0,e;if(a==0?(p.length=h,l=1,h--):(p.length=h+1,l=Jt(10,br-a),p[h]=s>0?(u/Jt(10,i-s)%Jt(10,s)|0)*l:0),o)for(;;)if(h==0){for(a=1,s=p[0];s>=10;s/=10)a++;for(s=p[0]+=l,l=1;s>=10;s/=10)l++;a!=l&&(e.e++,p[0]==Hi&&(p[0]=1));break}else{if(p[h]+=l,p[h]!=Hi)break;p[h--]=0,l=1}for(a=p.length;p[--a]===0;)p.pop()}return Er&&(e.e>d.maxE?(e.d=null,e.e=NaN):e.e0?a=a.charAt(0)+"."+a.slice(1)+xo(n):s>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(e.e<0?"e":"e+")+e.e):i<0?(a="0."+xo(-i-1)+a,t&&(n=t-s)>0&&(a+=xo(n))):i>=s?(a+=xo(i+1-s),t&&(n=t-i-1)>0&&(a=a+"."+xo(n))):((n=i+1)0&&(i+1===s&&(a+="."),a+=xo(n))),a}function Ic(e,r){var t=e[0];for(r*=br;t>=10;t/=10)r++;return r}function Oc(e,r,t){if(r>Rk)throw Er=!0,t&&(e.precision=t),Error(zy);return dr(new e(Tc),r,1,!0)}function Yi(e,r,t){if(r>nv)throw Error(zy);return dr(new e(Fc),r,t,!0)}function Hy(e){var r=e.length-1,t=r*br+1;if(r=e[r],r){for(;r%10==0;r/=10)t--;for(r=e[0];r>=10;r/=10)t++}return t}function xo(e){for(var r="";e--;)r+="0";return r}function Gy(e,r,t,n){var i,a=new e(1),s=Math.ceil(n/br+4);for(Er=!1;;){if(t%2&&(a=a.times(r),Ly(a.d,s)&&(i=!0)),t=mn(t/2),t===0){t=a.d.length-1,i&&a.d[t]===0&&++a.d[t];break}r=r.times(r),Ly(r.d,s)}return Er=!0,a}function Ry(e){return e.d[e.d.length-1]&1}function $y(e,r,t){for(var n,i=new e(r[0]),a=0;++a17)return new h(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:0/0);for(r==null?(Er=!1,f=x):f=r,l=new h(.03125);e.e>-2;)e=e.times(l),p+=5;for(n=Math.log(Jt(2,p))/Math.LN10*2+5|0,f+=n,t=a=s=new h(1),h.precision=f;;){if(a=dr(a.times(e),f,1),t=t.times(++u),l=s.plus(xt(a,t,f,1)),ln(l.d).slice(0,f)===ln(s.d).slice(0,f)){for(i=p;i--;)s=dr(s.times(s),f,1);if(r==null)if(o<3&&wf(s.d,f-n,d,o))h.precision=f+=10,t=a=l=new h(1),u=0,o++;else return dr(s,h.precision=x,d,Er=!0);else return h.precision=x,s}s=l}}function yo(e,r){var t,n,i,a,s,l,f,o,u,p,h,d=1,x=10,v=e,y=v.d,w=v.constructor,C=w.rounding,b=w.precision;if(v.s<0||!y||!y[0]||!v.e&&y[0]==1&&y.length==1)return new w(y&&!y[0]?-1/0:v.s!=1?NaN:y?0:v);if(r==null?(Er=!1,u=b):u=r,w.precision=u+=x,t=ln(y),n=t.charAt(0),Math.abs(a=v.e)<15e14){for(;n<7&&n!=1||n==1&&t.charAt(1)>3;)v=v.times(e),t=ln(v.d),n=t.charAt(0),d++;a=v.e,n>1?(v=new w("0."+t),a++):v=new w(n+"."+t.slice(1))}else return o=Oc(w,u+2,b).times(a+""),v=yo(new w(n+"."+t.slice(1)),u-x).plus(o),w.precision=b,r==null?dr(v,b,C,Er=!0):v;for(p=v,f=s=v=xt(v.minus(1),v.plus(1),u,1),h=dr(v.times(v),u,1),i=3;;){if(s=dr(s.times(h),u,1),o=f.plus(xt(s,new w(i),u,1)),ln(o.d).slice(0,u)===ln(f.d).slice(0,u))if(f=f.times(2),a!==0&&(f=f.plus(Oc(w,u+2,b).times(a+""))),f=xt(f,new w(d),u,1),r==null)if(wf(f.d,u-x,C,l))w.precision=u+=x,o=s=v=xt(p.minus(1),p.plus(1),u,1),h=dr(v.times(v),u,1),i=l=1;else return dr(f,w.precision=b,C,Er=!0);else return w.precision=b,f;f=o,i+=2}}function Zy(e){return String(e.s*e.s/0)}function av(e,r){var t,n,i;for((t=r.indexOf("."))>-1&&(r=r.replace(".","")),(n=r.search(/e/i))>0?(t<0&&(t=n),t+=+r.slice(n+1),r=r.substring(0,n)):t<0&&(t=r.length),n=0;r.charCodeAt(n)===48;n++);for(i=r.length;r.charCodeAt(i-1)===48;--i);if(r=r.slice(n,i),r){if(i-=n,e.e=t=t-n-1,e.d=[],n=(t+1)%br,t<0&&(n+=br),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(r=r.replace(/(\\d)_(?=\\d)/g,"$1"),Yy.test(r))return av(e,r)}else if(r==="Infinity"||r==="NaN")return+r||(e.s=NaN),e.e=NaN,e.d=null,e;if(Ik.test(r))t=16,r=r.toLowerCase();else if(Bk.test(r))t=2;else if(Pk.test(r))t=8;else throw Error(bo+r);for(a=r.search(/p/i),a>0?(f=+r.slice(a+1),r=r.substring(2,a)):r=r.slice(2),a=r.indexOf("."),s=a>=0,n=e.constructor,s&&(r=r.replace(".",""),l=r.length,a=l-a,i=Gy(n,new n(t),a,a*2)),o=_c(r,t,Hi),u=o.length-1,a=u;o[a]===0;--a)o.pop();return a<0?new n(e.s*0):(e.e=Ic(o,u),e.d=o,Er=!1,s&&(e=xt(e,i,l*4)),f&&(e=e.times(Math.abs(f)<54?Jt(2,f):Df.pow(2,f))),Er=!0,e)}function Uk(e,r){var t,n=r.d.length;if(n<3)return r.isZero()?r:tu(e,2,r,r);t=1.4*Math.sqrt(n),t=t>16?16:t|0,r=r.times(1/Pc(5,t)),r=tu(e,2,r,r);for(var i,a=new e(5),s=new e(16),l=new e(20);t--;)i=r.times(r),r=r.times(a.plus(i.times(s.times(i).minus(l))));return r}function tu(e,r,t,n,i){var a,s,l,f,o=1,u=e.precision,p=Math.ceil(u/br);for(Er=!1,f=t.times(t),l=new e(n);;){if(s=xt(l.times(f),new e(r++*r++),u,1),l=i?n.plus(s):n.minus(s),n=xt(s.times(f),new e(r++*r++),u,1),s=l.plus(n),s.d[p]!==void 0){for(a=p;s.d[a]===l.d[a]&&a--;);if(a==-1)break}a=l,l=n,n=s,s=a,o++}return Er=!0,s.d.length=p+1,s}function Pc(e,r){for(var t=e;--r;)t*=e;return t}function Qy(e,r){var t,n=r.s<0,i=Yi(e,e.precision,1),a=i.times(.5);if(r=r.abs(),r.lte(a))return Ra=n?4:1,r;if(t=r.divToInt(i),t.isZero())Ra=n?3:2;else{if(r=r.minus(t.times(i)),r.lte(a))return Ra=Ry(t)?n?2:3:n?4:1,r;Ra=Ry(t)?n?1:4:n?3:2}return r.minus(i).abs()}function ov(e,r,t,n){var i,a,s,l,f,o,u,p,h,d=e.constructor,x=t!==void 0;if(x?(Ln(t,1,wo),n===void 0?n=d.rounding:Ln(n,0,8)):(t=d.precision,n=d.rounding),!e.isFinite())u=Zy(e);else{for(u=pa(e),s=u.indexOf("."),x?(i=2,r==16?t=t*4-3:r==8&&(t=t*3-2)):i=r,s>=0&&(u=u.replace(".",""),h=new d(1),h.e=u.length-s,h.d=_c(pa(h),10,i),h.e=h.d.length),p=_c(u,10,i),a=f=p.length;p[--f]==0;)p.pop();if(!p[0])u=x?"0p+0":"0";else{if(s<0?a--:(e=new d(e),e.d=p,e.e=a,e=xt(e,h,t,n,0,i),p=e.d,a=e.e,o=Uy),s=p[t],l=i/2,o=o||p[t+1]!==void 0,o=n<4?(s!==void 0||o)&&(n===0||n===(e.s<0?3:2)):s>l||s===l&&(n===4||o||n===6&&p[t-1]&1||n===(e.s<0?8:7)),p.length=t,o)for(;++p[--t]>i-1;)p[t]=0,t||(++a,p.unshift(1));for(f=p.length;!p[f-1];--f);for(s=0,u="";s1)if(r==16||r==8){for(s=r==16?4:3,--f;f%s;f++)u+="0";for(p=_c(u,i,r),f=p.length;!p[f-1];--f);for(s=1,u="1.";sf)for(a-=f;a--;)u+="0";else ar)return e.length=r,!0}function zk(e){return new this(e).abs()}function Wk(e){return new this(e).acos()}function Vk(e){return new this(e).acosh()}function Yk(e,r){return new this(e).plus(r)}function Hk(e){return new this(e).asin()}function Gk(e){return new this(e).asinh()}function $k(e){return new this(e).atan()}function Zk(e){return new this(e).atanh()}function Qk(e,r){e=new this(e),r=new this(r);var t,n=this.precision,i=this.rounding,a=n+4;return!e.s||!r.s?t=new this(NaN):!e.d&&!r.d?(t=Yi(this,a,1).times(r.s>0?.25:.75),t.s=e.s):!r.d||e.isZero()?(t=r.s<0?Yi(this,n,i):new this(0),t.s=e.s):!e.d||r.isZero()?(t=Yi(this,a,1).times(.5),t.s=e.s):r.s<0?(this.precision=a,this.rounding=1,t=this.atan(xt(e,r,a,1)),r=Yi(this,a,1),this.precision=n,this.rounding=i,t=e.s<0?t.minus(r):t.plus(r)):t=this.atan(xt(e,r,a,1)),t}function Xk(e){return new this(e).cbrt()}function Jk(e){return dr(e=new this(e),e.e+1,2)}function Kk(e,r,t){return new this(e).clamp(r,t)}function jk(e){if(!e||typeof e!="object")throw Error(Bc+"Object expected");var r,t,n,i=e.defaults===!0,a=["precision",1,wo,"rounding",0,8,"toExpNeg",-ru,0,"toExpPos",0,ru,"maxE",0,ru,"minE",-ru,0,"modulo",0,9];for(r=0;r=a[r+1]&&n<=a[r+2])this[t]=n;else throw Error(bo+t+": "+n);if(t="crypto",i&&(this[t]=tv[t]),(n=e[t])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(Wy);else this[t]=!1;else throw Error(bo+t+": "+n);return this}function eR(e){return new this(e).cos()}function rR(e){return new this(e).cosh()}function Xy(e){var r,t,n;function i(a){var s,l,f,o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,qy(a)){o.s=a.s,Er?!a.d||a.e>i.maxE?(o.e=NaN,o.d=null):a.e=10;l/=10)s++;Er?s>i.maxE?(o.e=NaN,o.d=null):s=429e7?r[a]=crypto.getRandomValues(new Uint32Array(1))[0]:l[a++]=i%1e7;else if(crypto.randomBytes){for(r=crypto.randomBytes(n*=4);a=214e7?crypto.randomBytes(4).copy(r,a):(l.push(i%1e7),a+=4);a=n/4}else throw Error(Wy);else for(;a=10;i/=10)n++;n{var{on:r,config:t}=e,n=ts.clone({precision:t.precision,modulo:ts.EUCLID});return n.prototype=Object.create(n.prototype),n.prototype.type="BigNumber",n.prototype.isBigNumber=!0,n.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},n.fromJSON=function(i){return new n(i.value)},r&&r("config",function(i,a){i.precision!==a.precision&&n.config({precision:i.precision})}),n},{isClass:!0});var tn=Xn(jy(),1);var MR="Complex",_R=[],e1=T(MR,_R,()=>(Object.defineProperty(tn.default,"name",{value:"Complex"}),tn.default.prototype.constructor=tn.default,tn.default.prototype.type="Complex",tn.default.prototype.isComplex=!0,tn.default.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},tn.default.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},tn.default.prototype.format=function(e){var r="",t=this.im,n=this.re,i=Wi(this.re,e),a=Wi(this.im,e),s=ar(e)?e:e?e.precision:null;if(s!==null){var l=Math.pow(10,-s);Math.abs(n/t)r.re?1:e.rer.im?1:e.im(Object.defineProperty(ma.default,"name",{value:"Fraction"}),ma.default.prototype.constructor=ma.default,ma.default.prototype.type="Fraction",ma.default.prototype.isFraction=!0,ma.default.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},ma.default.fromJSON=function(e){return new ma.default(e)},ma.default),{isClass:!0});var OR="Range",BR=[],i1=T(OR,BR,()=>{function e(r,t,n){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");var i=r!=null,a=t!=null,s=n!=null;if(i){if(je(r))r=r.toNumber();else if(typeof r!="number")throw new TypeError("Parameter start must be a number")}if(a){if(je(t))t=t.toNumber();else if(typeof t!="number")throw new TypeError("Parameter end must be a number")}if(s){if(je(n))n=n.toNumber();else if(typeof n!="number")throw new TypeError("Parameter step must be a number")}this.start=i?parseFloat(r):0,this.end=a?parseFloat(t):0,this.step=s?parseFloat(n):1}return e.prototype.type="Range",e.prototype.isRange=!0,e.parse=function(r){if(typeof r!="string")return null;var t=r.split(":"),n=t.map(function(a){return parseFloat(a)}),i=n.some(function(a){return isNaN(a)});if(i)return null;switch(n.length){case 2:return new e(n[0],n[1]);case 3:return new e(n[0],n[2],n[1]);default:return null}},e.prototype.clone=function(){return new e(this.start,this.end,this.step)},e.prototype.size=function(){var r=0,t=this.start,n=this.step,i=this.end,a=i-t;return hi(n)===hi(a)?r=Math.ceil(a/n):a===0&&(r=0),isNaN(r)&&(r=0),[r]},e.prototype.min=function(){var r=this.size()[0];if(r>0)return this.step>0?this.start:this.start+(r-1)*this.step},e.prototype.max=function(){var r=this.size()[0];if(r>0)return this.step>0?this.start+(r-1)*this.step:this.start},e.prototype.forEach=function(r){var t=this.start,n=this.step,i=this.end,a=0;if(n>0)for(;ti;)r(t,[a],this),t+=n,a++},e.prototype.map=function(r){var t=[];return this.forEach(function(n,i,a){t[i[0]]=r(n,i,a)}),t},e.prototype.toArray=function(){var r=[];return this.forEach(function(t,n){r[n[0]]=t}),r},e.prototype.valueOf=function(){return this.toArray()},e.prototype.format=function(r){var t=Wi(this.start,r);return this.step!==1&&(t+=":"+Wi(this.step,r)),t+=":"+Wi(this.end,r),t},e.prototype.toString=function(){return this.format()},e.prototype.toJSON=function(){return{mathjs:"Range",start:this.start,end:this.end,step:this.step}},e.fromJSON=function(r){return new e(r.start,r.end,r.step)},e},{isClass:!0});var IR="Matrix",PR=[],a1=T(IR,PR,()=>{function e(){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator")}return e.prototype.type="Matrix",e.prototype.isMatrix=!0,e.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},e.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},e.prototype.create=function(r,t){throw new Error("Cannot invoke create on a Matrix interface")},e.prototype.subset=function(r,t,n){throw new Error("Cannot invoke subset on a Matrix interface")},e.prototype.get=function(r){throw new Error("Cannot invoke get on a Matrix interface")},e.prototype.set=function(r,t,n){throw new Error("Cannot invoke set on a Matrix interface")},e.prototype.resize=function(r,t){throw new Error("Cannot invoke resize on a Matrix interface")},e.prototype.reshape=function(r,t){throw new Error("Cannot invoke reshape on a Matrix interface")},e.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},e.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},e.prototype.map=function(r,t){throw new Error("Cannot invoke map on a Matrix interface")},e.prototype.forEach=function(r){throw new Error("Cannot invoke forEach on a Matrix interface")},e.prototype[Symbol.iterator]=function(){throw new Error("Cannot iterate a Matrix interface")},e.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},e.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},e.prototype.format=function(r){throw new Error("Cannot invoke format on a Matrix interface")},e.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},e},{isClass:!0});function o1(e){var r=0,t=1,n=Object.create(null),i=Object.create(null),a=0,s=function(f){var o=i[f];if(!!o&&(delete n[o],delete i[f],--r,t===o)){if(!r){a=0,t=1;return}for(;!Object.prototype.hasOwnProperty.call(n,++t););}};return e=Math.abs(e),{hit:function(f){var o=i[f],u=++a;if(n[u]=f,i[f]=u,!o)return++r,r<=e?void 0:(f=n[t],s(f),f);if(delete n[o],t===o)for(;!Object.prototype.hasOwnProperty.call(n,++t););},delete:s,clear:function(){r=a=0,t=1,n=Object.create(null),i=Object.create(null)}}}function ns(e){var{hasher:r,limit:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t=t??Number.POSITIVE_INFINITY,r=r??JSON.stringify,function n(){typeof n.cache!="object"&&(n.cache={values:new Map,lru:o1(t||Number.POSITIVE_INFINITY)});for(var i=[],a=0;a{var{Matrix:r}=e;function t(u,p){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(p&&!yt(p))throw new Error("Invalid datatype: "+p);if(Ge(u))u.type==="DenseMatrix"?(this._data=tr(u._data),this._size=tr(u._size),this._datatype=p||u._datatype):(this._data=u.toArray(),this._size=u.size(),this._datatype=p||u._datatype);else if(u&&Ar(u.data)&&Ar(u.size))this._data=u.data,this._size=u.size,Hd(this._data,this._size),this._datatype=p||u.datatype;else if(Ar(u))this._data=o(u),this._size=or(this._data),Hd(this._data,this._size),this._datatype=p;else{if(u)throw new TypeError("Unsupported type of data ("+_r(u)+")");this._data=[],this._size=[0],this._datatype=p}}t.prototype=new r,t.prototype.createDenseMatrix=function(u,p){return new t(u,p)},Object.defineProperty(t,"name",{value:"DenseMatrix"}),t.prototype.constructor=t,t.prototype.type="DenseMatrix",t.prototype.isDenseMatrix=!0,t.prototype.getDataType=function(){return vo(this._data,_r)},t.prototype.storage=function(){return"dense"},t.prototype.datatype=function(){return this._datatype},t.prototype.create=function(u,p){return new t(u,p)},t.prototype.subset=function(u,p,h){switch(arguments.length){case 1:return n(this,u);case 2:case 3:return a(this,u,p,h);default:throw new SyntaxError("Wrong number of arguments")}},t.prototype.get=function(u){if(!Ar(u))throw new TypeError("Array expected");if(u.length!==this._size.length)throw new pr(u.length,this._size.length);for(var p=0;p");var b=p.max().map(function(S){return S+1});f(u,b,d);var A=x.length,E=0;s(u._data,p,h,A,E)}return u}function s(u,p,h,d,x){var v=x===d-1,y=p.dimension(x);v?y.forEach(function(w,C){Xr(w),u[w]=h[C[0]]}):y.forEach(function(w,C){Xr(w),s(u[w],p,h[C[0]],d,x+1)})}t.prototype.resize=function(u,p,h){if(!bt(u))throw new TypeError("Array or Matrix expected");var d=u.valueOf().map(v=>Array.isArray(v)&&v.length===1?v[0]:v),x=h?this.clone():this;return l(x,d,p)};function l(u,p,h){if(p.length===0){for(var d=u._data;Ar(d);)d=d[0];return d}return u._size=p.slice(0),u._data=Vi(u._data,u._size,h),u}t.prototype.reshape=function(u,p){var h=p?this.clone():this;h._data=xf(h._data,u);var d=h._size.reduce((x,v)=>x*v);return h._size=yf(u,d),h};function f(u,p,h){for(var d=u._size.slice(0),x=!1;d.lengthd[v]&&(d[v]=p[v],x=!0);x&&l(u,d,h)}t.prototype.clone=function(){var u=new t({data:tr(this._data),size:tr(this._size),datatype:this._datatype});return u},t.prototype.size=function(){return this._size.slice(0)},t.prototype.map=function(u){var p=this,h=kc(u),d=function y(w,C){return Ar(w)?w.map(function(b,A){return y(b,C.concat(A))}):h===1?u(w):h===2?u(w,C):u(w,C,p)},x=d(this._data,[]),v=this._datatype!==void 0?vo(x,_r):void 0;return new t(x,v)},t.prototype.forEach=function(u){var p=this,h=function d(x,v){Ar(x)?x.forEach(function(y,w){d(y,v.concat(w))}):u(x,v,p)};h(this._data,[])},t.prototype[Symbol.iterator]=function*(){var u=function*p(h,d){if(Ar(h))for(var x=0;x[b[w]]);p.push(new t(C,u._datatype))},v=0;v0?u:0,h=u<0?-u:0,d=this._size[0],x=this._size[1],v=Math.min(d-h,x-p),y=[],w=0;w0?h:0,v=h<0?-h:0,y=u[0],w=u[1],C=Math.min(y-v,w-x),b;if(Ar(p)){if(p.length!==C)throw new Error("Invalid value array length");b=function(F){return p[F]}}else if(Ge(p)){var A=p.size();if(A.length!==1||A[0]!==C)throw new Error("Invalid matrix length");b=function(F){return p.get([F])}}else b=function(){return p};d||(d=je(b(0))?b(0).mul(0):0);var E=[];if(u.length>0){E=Vi(E,u,d);for(var S=0;S{var{typed:r}=e;return r(u1,{any:tr})});function Rc(e){var r=e.length,t=e[0].length,n,i,a=[];for(i=0;i=n.length)throw new Xt(r,n.length);return Ge(e)?e.create(Lc(e.valueOf(),r,t)):Lc(e,r,t)}function Lc(e,r,t){var n,i,a,s;if(r<=0)if(Array.isArray(e[0])){for(s=Rc(e),i=[],n=0;n{var{typed:r}=e;return r(l1,{number:He,BigNumber:function(n){return n.isInt()},Fraction:function(n){return n.d===1&&isFinite(n.n)},"Array | Matrix":r.referToSelf(t=>n=>Je(n,t))})});var qn="number",La="number, number";function lv(e){return Math.abs(e)}lv.signature=qn;function cv(e,r){return e+r}cv.signature=La;function pv(e,r){return e-r}pv.signature=La;function mv(e,r){return e*r}mv.signature=La;function UR(e,r){return e/r}UR.signature=La;function hv(e){return-e}hv.signature=qn;function dv(e){return e}dv.signature=qn;function nu(e){return uy(e)}nu.signature=qn;function vv(e){return e*e*e}vv.signature=qn;function gv(e){return Math.exp(e)}gv.signature=qn;function xv(e){return fy(e)}xv.signature=qn;function zR(e,r){if(!He(e)||!He(r))throw new Error("Parameters in function gcd must be integer numbers");for(var t;r!==0;)t=e%r,e=r,r=t;return e<0?-e:e}zR.signature=La;function yv(e,r){if(!He(e)||!He(r))throw new Error("Parameters in function lcm must be integer numbers");if(e===0||r===0)return 0;for(var t,n=e*r;r!==0;)t=r,r=e%t,e=t;return Math.abs(n/e)}yv.signature=La;function p1(e,r){return r?Math.log(e)/Math.log(r):Math.log(e)}function bv(e){return sy(e)}bv.signature=qn;function wv(e){return oy(e)}wv.signature=qn;function WR(e){return bc(e)}WR.signature=qn;function VR(e,r){return r===0?e:e-r*Math.floor(e/r)}VR.signature=La;function Dv(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,t=r<0;if(t&&(r=-r),r===0)throw new Error("Root must be non-zero");if(e<0&&Math.abs(r)%2!==1)throw new Error("Root must be odd when a is negative.");if(e===0)return t?1/0:0;if(!isFinite(e))return t?0:e;var n=Math.pow(Math.abs(e),1/r);return n=e<0?-n:n,t?1/n:n}function qc(e){return hi(e)}qc.signature=qn;function YR(e){return Math.sqrt(e)}YR.signature=qn;function Sv(e){return e*e}Sv.signature=qn;function Nv(e,r){var t,n,i,a=0,s=1,l=1,f=0;if(!He(e)||!He(r))throw new Error("Parameters in function xgcd must be integer numbers");for(;r;)n=Math.floor(e/r),i=e-n*r,t=a,a=s-n*a,s=t,t=l,l=f-n*l,f=t,e=r,r=i;var o;return e<0?o=[-e,-s,-f]:o=[e,e?s:0,f],o}Nv.signature=La;function Av(e,r){return e*e<1&&r===1/0||e*e>1&&r===-1/0?0:Math.pow(e,r)}Av.signature=La;function iu(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!He(r)||r<0||r>15)throw new Error("Number of decimals in function round must be an integer from 0 to 15 inclusive");return parseFloat(Wd(e,r))}function HR(e){return Math.abs(e)}HR.signature=qn;var GR="number",au="number, number";function Ev(e,r){if(!He(e)||!He(r))throw new Error("Integers expected in function bitAnd");return e&r}Ev.signature=au;function Cv(e){if(!He(e))throw new Error("Integer expected in function bitNot");return~e}Cv.signature=GR;function Mv(e,r){if(!He(e)||!He(r))throw new Error("Integers expected in function bitOr");return e|r}Mv.signature=au;function _v(e,r){if(!He(e)||!He(r))throw new Error("Integers expected in function bitXor");return e^r}_v.signature=au;function Tv(e,r){if(!He(e)||!He(r))throw new Error("Integers expected in function leftShift");return e<>r}Fv.signature=au;function Ov(e,r){if(!He(e)||!He(r))throw new Error("Integers expected in function rightLogShift");return e>>>r}Ov.signature=au;function jn(e,r){if(r>1;return jn(e,t)*jn(t+1,r)}function Bv(e,r){if(!He(e)||e<0)throw new TypeError("Positive integer value expected in function combinations");if(!He(r)||r<0)throw new TypeError("Positive integer value expected in function combinations");if(r>e)throw new TypeError("k must be less than or equal to n");for(var t=e-r,n=1,i=r171?1/0:jn(1,e-1);if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*Sf(1-e));if(e>=171.35)return 1/0;if(e>85){var t=e*e,n=t*e,i=n*e,a=i*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*t)-139/(51840*n)-571/(2488320*i)+163879/(209018880*a)+5246819/(75246796800*a*e))}--e,r=is[0];for(var s=1;s=1;n--)t+=g1[n]/(e+n);return Uv+(e+.5)*Math.log(r)-r+Math.log(t)}Nf.signature="number";var Dt="number",XR="number, number";function JR(e){return Math.acos(e)}JR.signature=Dt;function zv(e){return py(e)}zv.signature=Dt;function Wv(e){return Math.atan(1/e)}Wv.signature=Dt;function Vv(e){return isFinite(e)?(Math.log((e+1)/e)+Math.log(e/(e-1)))/2:0}Vv.signature=Dt;function Yv(e){return Math.asin(1/e)}Yv.signature=Dt;function Hv(e){var r=1/e;return Math.log(r+Math.sqrt(r*r+1))}Hv.signature=Dt;function Gv(e){return Math.acos(1/e)}Gv.signature=Dt;function $v(e){var r=1/e,t=Math.sqrt(r*r-1);return Math.log(t+r)}$v.signature=Dt;function KR(e){return Math.asin(e)}KR.signature=Dt;function Zv(e){return my(e)}Zv.signature=Dt;function jR(e){return Math.atan(e)}jR.signature=Dt;function e9(e,r){return Math.atan2(e,r)}e9.signature=XR;function Qv(e){return hy(e)}Qv.signature=Dt;function r9(e){return Math.cos(e)}r9.signature=Dt;function t9(e){return Dc(e)}t9.signature=Dt;function Xv(e){return 1/Math.tan(e)}Xv.signature=Dt;function Jv(e){var r=Math.exp(2*e);return(r+1)/(r-1)}Jv.signature=Dt;function Kv(e){return 1/Math.sin(e)}Kv.signature=Dt;function jv(e){return e===0?Number.POSITIVE_INFINITY:Math.abs(2/(Math.exp(e)-Math.exp(-e)))*hi(e)}jv.signature=Dt;function eg(e){return 1/Math.cos(e)}eg.signature=Dt;function rg(e){return 2/(Math.exp(e)+Math.exp(-e))}rg.signature=Dt;function n9(e){return Math.sin(e)}n9.signature=Dt;function tg(e){return dy(e)}tg.signature=Dt;function i9(e){return Math.tan(e)}i9.signature=Dt;function a9(e){return Sc(e)}a9.signature=Dt;var Af="number";function o9(e){return He(e)}o9.signature=Af;function ng(e){return e<0}ng.signature=Af;function ig(e){return e>0}ig.signature=Af;function ag(e){return e===0}ag.signature=Af;function og(e){return Number.isNaN(e)}og.signature=Af;var x1="isNegative",s9=["typed"],y1=T(x1,s9,e=>{var{typed:r}=e;return r(x1,{number:ng,BigNumber:function(n){return n.isNeg()&&!n.isZero()&&!n.isNaN()},Fraction:function(n){return n.s<0},Unit:r.referToSelf(t=>n=>r.find(t,n.valueType())(n.value)),"Array | Matrix":r.referToSelf(t=>n=>Je(n,t))})});var b1="isNumeric",u9=["typed"],w1=T(b1,u9,e=>{var{typed:r}=e;return r(b1,{"number | BigNumber | Fraction | boolean":()=>!0,"Complex | Unit | string | null | undefined | Node":()=>!1,"Array | Matrix":r.referToSelf(t=>n=>Je(n,t))})});var D1="hasNumericValue",f9=["typed","isNumeric"],S1=T(D1,f9,e=>{var{typed:r,isNumeric:t}=e;return r(D1,{boolean:()=>!0,string:function(i){return i.trim().length>0&&!isNaN(Number(i))},any:function(i){return t(i)}})});var N1="isPositive",l9=["typed"],A1=T(N1,l9,e=>{var{typed:r}=e;return r(N1,{number:ig,BigNumber:function(n){return!n.isNeg()&&!n.isZero()&&!n.isNaN()},Fraction:function(n){return n.s>0&&n.n>0},Unit:r.referToSelf(t=>n=>r.find(t,n.valueType())(n.value)),"Array | Matrix":r.referToSelf(t=>n=>Je(n,t))})});var E1="isZero",c9=["typed"],C1=T(E1,c9,e=>{var{typed:r}=e;return r(E1,{number:ag,BigNumber:function(n){return n.isZero()},Complex:function(n){return n.re===0&&n.im===0},Fraction:function(n){return n.d===1&&n.n===0},Unit:r.referToSelf(t=>n=>r.find(t,n.valueType())(n.value)),"Array | Matrix":r.referToSelf(t=>n=>Je(n,t))})});var M1="isNaN",p9=["typed"],_1=T(M1,p9,e=>{var{typed:r}=e;return r(M1,{number:og,BigNumber:function(n){return n.isNaN()},Fraction:function(n){return!1},Complex:function(n){return n.isNaN()},Unit:function(n){return Number.isNaN(n.value)},"Array | Matrix":function(n){return Je(n,Number.isNaN)}})});var T1="typeOf",m9=["typed"],F1=T(T1,m9,e=>{var{typed:r}=e;return r(T1,{any:_r})});function Ut(e,r,t){if(t==null)return e.eq(r);if(e.eq(r))return!0;if(e.isNaN()||r.isNaN())return!1;if(e.isFinite()&&r.isFinite()){var n=e.minus(r).abs();if(n.isZero())return!0;var i=e.constructor.max(e.abs(),r.abs());return n.lte(i.times(t))}return!1}function O1(e,r,t){return wt(e.re,r.re,t)&&wt(e.im,r.im,t)}var vi=T("compareUnits",["typed"],e=>{var{typed:r}=e;return{"Unit, Unit":r.referToSelf(t=>(n,i)=>{if(!n.equalBase(i))throw new Error("Cannot compare units with different base");return r.find(t,[n.valueType(),i.valueType()])(n.value,i.value)})}});var Uc="equalScalar",h9=["typed","config"],B1=T(Uc,h9,e=>{var{typed:r,config:t}=e,n=vi({typed:r});return r(Uc,{"boolean, boolean":function(a,s){return a===s},"number, number":function(a,s){return wt(a,s,t.epsilon)},"BigNumber, BigNumber":function(a,s){return a.eq(s)||Ut(a,s,t.epsilon)},"Fraction, Fraction":function(a,s){return a.equals(s)},"Complex, Complex":function(a,s){return O1(a,s,t.epsilon)}},n)}),NX=T(Uc,["typed","config"],e=>{var{typed:r,config:t}=e;return r(Uc,{"number, number":function(i,a){return wt(i,a,t.epsilon)}})});var d9="SparseMatrix",v9=["typed","equalScalar","Matrix"],I1=T(d9,v9,e=>{var{typed:r,equalScalar:t,Matrix:n}=e;function i(v,y){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if(y&&!yt(y))throw new Error("Invalid datatype: "+y);if(Ge(v))a(this,v,y);else if(v&&Ar(v.index)&&Ar(v.ptr)&&Ar(v.size))this._values=v.values,this._index=v.index,this._ptr=v.ptr,this._size=v.size,this._datatype=y||v.datatype;else if(Ar(v))s(this,v,y);else{if(v)throw new TypeError("Unsupported type of data ("+_r(v)+")");this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=y}}function a(v,y,w){y.type==="SparseMatrix"?(v._values=y._values?tr(y._values):void 0,v._index=tr(y._index),v._ptr=tr(y._ptr),v._size=tr(y._size),v._datatype=w||y._datatype):s(v,y.valueOf(),w||y._datatype)}function s(v,y,w){v._values=[],v._index=[],v._ptr=[],v._datatype=w;var C=y.length,b=0,A=t,E=0;if(yt(w)&&(A=r.find(t,[w,w])||t,E=r.convert(0,w)),C>0){var S=0;do{v._ptr.push(v._index.length);for(var O=0;O");if(b.length===1){var F=y.dimension(0);F.forEach(function(k,L){Xr(k),v.set([k,0],w[L[0]],C)})}else{var M=y.dimension(0),_=y.dimension(1);M.forEach(function(k,L){Xr(k),_.forEach(function(Y,$){Xr(Y),v.set([k,Y],w[L[0]][$[0]],C)})})}}return v}i.prototype.get=function(v){if(!Ar(v))throw new TypeError("Array expected");if(v.length!==this._size.length)throw new pr(v.length,this._size.length);if(!this._values)throw new Error("Cannot invoke get on a Pattern only matrix");var y=v[0],w=v[1];Xr(y,this._size[0]),Xr(w,this._size[1]);var C=o(y,this._ptr[w],this._ptr[w+1],this._index);return CA-1||b>E-1)&&(h(this,Math.max(C+1,A),Math.max(b+1,E),w),A=this._size[0],E=this._size[1]),Xr(C,A),Xr(b,E);var F=o(C,this._ptr[b],this._ptr[b+1],this._index);return FArray.isArray(A)&&A.length===1?A[0]:A);if(C.length!==2)throw new Error("Only two dimensions matrix are supported");C.forEach(function(A){if(!ar(A)||!He(A)||A<0)throw new TypeError("Invalid size, must contain positive integers (size: "+lr(C)+")")});var b=w?this.clone():this;return h(b,C[0],C[1],y)};function h(v,y,w,C){var b=C||0,A=t,E=0;yt(v._datatype)&&(A=r.find(t,[v._datatype,v._datatype])||t,E=r.convert(0,v._datatype),b=r.convert(b,v._datatype));var S=!A(b,E),O=v._size[0],F=v._size[1],M,_,k;if(w>F){for(_=F;_O){if(S){var L=0;for(_=0;_y-1&&(v._values.splice(k,1),v._index.splice(k,1),$++)}v._ptr[_]=v._values.length}return v._size[0]=y,v._size[1]=w,v}i.prototype.reshape=function(v,y){if(!Ar(v))throw new TypeError("Array expected");if(v.length!==2)throw new Error("Sparse matrices can only be reshaped in two dimensions");v.forEach(function(U){if(!ar(U)||!He(U)||U<=-2||U===0)throw new TypeError("Invalid size, must contain positive integers or -1 (size: "+lr(v)+")")});var w=this._size[0]*this._size[1];v=yf(v,w);var C=v[0]*v[1];if(w!==C)throw new Error("Reshaping sparse matrix will result in the wrong number of elements");var b=y?this.clone():this;if(this._size[0]===v[0]&&this._size[1]===v[1])return b;for(var A=[],E=0;E=y&&q<=w&&k(v._values[V],q-y,L-C)}else{for(var R={},j=Y;j<$;j++){var U=v._index[j];R[U]=v._values[j]}for(var oe=y;oe<=w;oe++){var me=oe in R?R[oe]:0;k(me,oe-y,L-C)}}}return F.push(S.length),new i({values:S,index:O,ptr:F,size:[w-y+1,b-C+1]})}i.prototype.forEach=function(v,y){if(!this._values)throw new Error("Cannot invoke forEach on a Pattern only matrix");for(var w=this,C=this._size[0],b=this._size[1],A=0;A "+(this._values?lr(this._values[O],v):"X")}return b},i.prototype.toString=function(){return lr(this.toArray())},i.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},i.prototype.diagonal=function(v){if(v){if(je(v)&&(v=v.toNumber()),!ar(v)||!He(v))throw new TypeError("The parameter k must be an integer number")}else v=0;var y=v>0?v:0,w=v<0?-v:0,C=this._size[0],b=this._size[1],A=Math.min(C-w,b-y),E=[],S=[],O=[];O[0]=0;for(var F=y;F0?w:0,O=w<0?-w:0,F=v[0],M=v[1],_=Math.min(F-O,M-S),k;if(Ar(y)){if(y.length!==_)throw new Error("Invalid value array length");k=function(oe){return y[oe]}}else if(Ge(y)){var L=y.size();if(L.length!==1||L[0]!==_)throw new Error("Invalid matrix length");k=function(oe){return y.get([oe])}}else k=function(){return y};for(var Y=[],$=[],V=[],q=0;q=0&&R<_){var j=k(R);A(j,E)||($.push(R+O),Y.push(j))}}return V.push(Y.length),new i({values:Y,index:$,ptr:V,size:[F,M]})},i.prototype.swapRows=function(v,y){if(!ar(v)||!He(v)||!ar(y)||!He(y))throw new Error("Row index must be positive integers");if(this._size.length!==2)throw new Error("Only two dimensional matrix is supported");return Xr(v,this._size[0]),Xr(y,this._size[0]),i._swapRows(v,y,this._size[1],this._values,this._index,this._ptr),this},i._forEachRow=function(v,y,w,C,b){for(var A=C[v],E=C[v+1],S=A;S=O||b[M]!==y)){var k=C?C[F]:void 0;b.splice(M,0,y),C&&C.splice(M,0,k),b.splice(M<=F?F+1:F,1),C&&C.splice(M<=F?F+1:F,1);continue}if(M=O||b[F]!==v)){var L=C?C[M]:void 0;b.splice(F,0,v),C&&C.splice(F,0,L),b.splice(F<=M?M+1:M,1),C&&C.splice(F<=M?M+1:M,1)}}},i},{isClass:!0});var v9="number",g9=["typed"];function x9(e){var r=e.match(/(0[box])([0-9a-fA-F]*)\\.([0-9a-fA-F]*)/);if(r){var t={"0b":2,"0o":8,"0x":16}[r[1]],n=r[2],i=r[3];return{input:e,radix:t,integerPart:n,fractionalPart:i}}else return null}function y9(e){for(var r=parseInt(e.integerPart,e.radix),t=0,n=0;n{var{typed:r}=e,t=r("number",{"":function(){return 0},number:function(i){return i},string:function(i){if(i==="NaN")return NaN;var a=x9(i);if(a)return y9(a);var s=0,l=i.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);l&&(s=Number(l[2]),i=l[1]);var f=Number(i);if(isNaN(f))throw new SyntaxError('String "'+i+'" is not a valid number');if(l){if(f>2**s-1)throw new SyntaxError('String "'.concat(i,'" is out of range'));f>=2**(s-1)&&(f=f-2**s)}return f},BigNumber:function(i){return i.toNumber()},Fraction:function(i){return i.valueOf()},Unit:r.referToSelf(n=>i=>{var a=i.clone();return a.value=n(i.value),a}),null:function(i){return 0},"Unit, string | Unit":function(i,a){return i.toNumber(a)},"Array | Matrix":r.referToSelf(n=>i=>Je(i,n))});return t.fromJSON=function(n){return parseFloat(n.value)},t});var P1="string",b9=["typed"],k1=T(P1,b9,e=>{var{typed:r}=e;return r(P1,{"":function(){return""},number:Wi,null:function(n){return"null"},boolean:function(n){return n+""},string:function(n){return n},"Array | Matrix":r.referToSelf(t=>n=>Je(n,t)),any:function(n){return String(n)}})});var R1="boolean",w9=["typed"],L1=T(R1,w9,e=>{var{typed:r}=e;return r(R1,{"":function(){return!1},boolean:function(n){return n},number:function(n){return!!n},null:function(n){return!1},BigNumber:function(n){return!n.isZero()},string:function(n){var i=n.toLowerCase();if(i==="true")return!0;if(i==="false")return!1;var a=Number(n);if(n!==""&&!isNaN(a))return!!a;throw new Error('Cannot convert "'+n+'" to a boolean')},"Array | Matrix":r.referToSelf(t=>n=>Je(n,t))})});var D9="bignumber",S9=["typed","BigNumber"],q1=T(D9,S9,e=>{var{typed:r,BigNumber:t}=e;return r("bignumber",{"":function(){return new t(0)},number:function(i){return new t(i+"")},string:function(i){var a=i.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);if(a){var s=a[2],l=t(a[1]),f=new t(2).pow(Number(s));if(l.gt(f.sub(1)))throw new SyntaxError('String "'.concat(i,'" is out of range'));var o=new t(2).pow(Number(s)-1);return l.gte(o)?l.sub(f):l}return new t(i)},BigNumber:function(i){return i},Unit:r.referToSelf(n=>i=>{var a=i.clone();return a.value=n(i.value),a}),Fraction:function(i){return new t(i.n).div(i.d).times(i.s)},null:function(i){return new t(0)},"Array | Matrix":r.referToSelf(n=>i=>Je(i,n))})});var N9="complex",A9=["typed","Complex"],U1=T(N9,A9,e=>{var{typed:r,Complex:t}=e;return r("complex",{"":function(){return t.ZERO},number:function(i){return new t(i,0)},"number, number":function(i,a){return new t(i,a)},"BigNumber, BigNumber":function(i,a){return new t(i.toNumber(),a.toNumber())},Fraction:function(i){return new t(i.valueOf(),0)},Complex:function(i){return i.clone()},string:function(i){return t(i)},null:function(i){return t(0)},Object:function(i){if("re"in i&&"im"in i)return new t(i.re,i.im);if("r"in i&&"phi"in i||"abs"in i&&"arg"in i)return new t(i);throw new Error("Expected object with properties (re and im) or (r and phi) or (abs and arg)")},"Array | Matrix":r.referToSelf(n=>i=>Je(i,n))})});var E9="fraction",C9=["typed","Fraction"],z1=T(E9,C9,e=>{var{typed:r,Fraction:t}=e;return r("fraction",{number:function(i){if(!isFinite(i)||isNaN(i))throw new Error(i+" cannot be represented as a fraction");return new t(i)},string:function(i){return new t(i)},"number, number":function(i,a){return new t(i,a)},null:function(i){return new t(0)},BigNumber:function(i){return new t(i.toString())},Fraction:function(i){return i},Unit:r.referToSelf(n=>i=>{var a=i.clone();return a.value=n(i.value),a}),Object:function(i){return new t(i)},"Array | Matrix":r.referToSelf(n=>i=>Je(i,n))})});var W1="matrix",M9=["typed","Matrix","DenseMatrix","SparseMatrix"],V1=T(W1,M9,e=>{var{typed:r,Matrix:t,DenseMatrix:n,SparseMatrix:i}=e;return r(W1,{"":function(){return a([])},string:function(l){return a([],l)},"string, string":function(l,f){return a([],l,f)},Array:function(l){return a(l)},Matrix:function(l){return a(l,l.storage())},"Array | Matrix, string":a,"Array | Matrix, string, string":a});function a(s,l,f){if(l==="dense"||l==="default"||l===void 0)return new n(s,f);if(l==="sparse")return new i(s,f);throw new TypeError("Unknown matrix type "+JSON.stringify(l)+".")}});var Y1="matrixFromFunction",_9=["typed","matrix","isZero"],H1=T(Y1,_9,e=>{var{typed:r,matrix:t,isZero:n}=e;return r(Y1,{"Array | Matrix, function, string, string":function(s,l,f,o){return i(s,l,f,o)},"Array | Matrix, function, string":function(s,l,f){return i(s,l,f)},"Matrix, function":function(s,l){return i(s,l,"dense")},"Array, function":function(s,l){return i(s,l,"dense").toArray()},"Array | Matrix, string, function":function(s,l,f){return i(s,f,l)},"Array | Matrix, string, string, function":function(s,l,f,o){return i(s,o,l,f)}});function i(a,s,l,f){var o;return f!==void 0?o=t(l,f):o=t(l),o.resize(a),o.forEach(function(u,p){var h=s(p);n(h)||o.set(p,h)}),o}});var G1="matrixFromRows",T9=["typed","matrix","flatten","size"],$1=T(G1,T9,e=>{var{typed:r,matrix:t,flatten:n,size:i}=e;return r(G1,{"...Array":function(f){return a(f)},"...Matrix":function(f){return t(a(f.map(o=>o.toArray())))}});function a(l){if(l.length===0)throw new TypeError("At least one row is needed to construct a matrix.");var f=s(l[0]),o=[];for(var u of l){var p=s(u);if(p!==f)throw new TypeError("The vectors had different length: "+(f|0)+" \\u2260 "+(p|0));o.push(n(u))}return o}function s(l){var f=i(l);if(f.length===1)return f[0];if(f.length===2){if(f[0]===1)return f[1];if(f[1]===1)return f[0];throw new TypeError("At least one of the arguments is not a vector.")}else throw new TypeError("Only one- or two-dimensional vectors are supported.")}});var Z1="matrixFromColumns",F9=["typed","matrix","flatten","size"],Q1=T(Z1,F9,e=>{var{typed:r,matrix:t,flatten:n,size:i}=e;return r(Z1,{"...Array":function(f){return a(f)},"...Matrix":function(f){return t(a(f.map(o=>o.toArray())))}});function a(l){if(l.length===0)throw new TypeError("At least one column is needed to construct a matrix.");for(var f=s(l[0]),o=[],u=0;u{var{typed:r}=e;return r(X1,{"Unit, Array":function(n,i){return n.splitUnit(i)}})});var K1="unaryMinus",B9=["typed"],j1=T(K1,B9,e=>{var{typed:r}=e;return r(K1,{number:mv,"Complex | BigNumber | Fraction":t=>t.neg(),Unit:r.referToSelf(t=>n=>{var i=n.clone();return i.value=r.find(t,i.valueType())(n.value),i}),"Array | Matrix":r.referToSelf(t=>n=>Je(n,t,!0))})});var eb="unaryPlus",I9=["typed","config","BigNumber"],rb=T(eb,I9,e=>{var{typed:r,config:t,BigNumber:n}=e;return r(eb,{number:hv,Complex:function(a){return a},BigNumber:function(a){return a},Fraction:function(a){return a},Unit:function(a){return a.clone()},"Array | Matrix":r.referToSelf(i=>a=>Je(a,i,!0)),"boolean | string":function(a){return t.number==="BigNumber"?new n(+a):+a}})});var tb="abs",P9=["typed"],nb=T(tb,P9,e=>{var{typed:r}=e;return r(tb,{number:fv,"Complex | BigNumber | Fraction | Unit":t=>t.abs(),"Array | Matrix":r.referToSelf(t=>n=>Je(n,t,!0))})});var ib="apply",k9=["typed","isInteger"],ou=T(ib,k9,e=>{var{typed:r,isInteger:t}=e;return r(ib,{"Array | Matrix, number | BigNumber, function":function(i,a,s){if(!t(a))throw new TypeError("Integer number expected for dimension");var l=Array.isArray(i)?or(i):i.size();if(a<0||a>=l.length)throw new Xt(a,l.length);return Ge(i)?i.create(qc(i.valueOf(),a,s)):qc(i,a,s)}})});function qc(e,r,t){var n,i,a;if(r<=0)if(Array.isArray(e[0])){for(a=R9(e),i=[],n=0;n{var{typed:r}=e;return r(ab,{"number, number":lv,"Complex, Complex":function(n,i){return n.add(i)},"BigNumber, BigNumber":function(n,i){return n.plus(i)},"Fraction, Fraction":function(n,i){return n.add(i)},"Unit, Unit":r.referToSelf(t=>(n,i)=>{if(n.value===null||n.value===void 0)throw new Error("Parameter x contains a unit with undefined value");if(i.value===null||i.value===void 0)throw new Error("Parameter y contains a unit with undefined value");if(!n.equalBase(i))throw new Error("Units do not match");var a=n.clone();return a.value=r.find(t,[a.valueType(),i.valueType()])(a.value,i.value),a.fixPrefix=!1,a})})});var sb="subtractScalar",q9=["typed"],ub=T(sb,q9,e=>{var{typed:r}=e;return r(sb,{"number, number":cv,"Complex, Complex":function(n,i){return n.sub(i)},"BigNumber, BigNumber":function(n,i){return n.minus(i)},"Fraction, Fraction":function(n,i){return n.sub(i)},"Unit, Unit":r.referToSelf(t=>(n,i)=>{if(n.value===null||n.value===void 0)throw new Error("Parameter x contains a unit with undefined value");if(i.value===null||i.value===void 0)throw new Error("Parameter y contains a unit with undefined value");if(!n.equalBase(i))throw new Error("Units do not match");var a=n.clone();return a.value=r.find(t,[a.valueType(),i.valueType()])(a.value,i.value),a.fixPrefix=!1,a})})});var fb="cbrt",U9=["config","typed","isNegative","unaryMinus","matrix","Complex","BigNumber","Fraction"],lb=T(fb,U9,e=>{var{config:r,typed:t,isNegative:n,unaryMinus:i,matrix:a,Complex:s,BigNumber:l,Fraction:f}=e;return t(fb,{number:nu,Complex:o,"Complex, boolean":o,BigNumber:function(h){return h.cbrt()},Unit:u});function o(p,h){var d=p.arg()/3,x=p.abs(),v=new s(nu(x),0).mul(new s(0,d).exp());if(h){var y=[v,new s(nu(x),0).mul(new s(0,d+Math.PI*2/3).exp()),new s(nu(x),0).mul(new s(0,d-Math.PI*2/3).exp())];return r.matrix==="Array"?y:a(y)}else return v}function u(p){if(p.value&&Gt(p.value)){var h=p.clone();return h.value=1,h=h.pow(1/3),h.value=o(p.value),h}else{var d=n(p.value);d&&(p.value=i(p.value));var x;je(p.value)?x=new l(1).div(3):Xn(p.value)?x=new f(1,3):x=1/3;var v=p.pow(x);return d&&(v.value=i(v.value)),v}}});var z9="matAlgo11xS0s",W9=["typed","equalScalar"],Jr=T(z9,W9,e=>{var{typed:r,equalScalar:t}=e;return function(i,a,s,l){var f=i._values,o=i._index,u=i._ptr,p=i._size,h=i._datatype;if(!f)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var d=p[0],x=p[1],v,y=t,w=0,C=s;typeof h=="string"&&(v=h,y=r.find(t,[v,v]),w=r.convert(0,v),a=r.convert(a,v),C=r.find(s,[v,v]));for(var b=[],A=[],E=[],S=0;S{var{typed:r,DenseMatrix:t}=e;return function(i,a,s,l){var f=i._values,o=i._index,u=i._ptr,p=i._size,h=i._datatype;if(!f)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var d=p[0],x=p[1],v,y=s;typeof h=="string"&&(v=h,a=r.convert(a,v),y=r.find(s,[v,v]));for(var w=[],C=[],b=[],A=0;A{var{typed:r}=e;return function(i,a,s,l){var f=i._data,o=i._size,u=i._datatype,p,h=s;typeof u=="string"&&(p=u,a=r.convert(a,p),h=r.find(s,[p,p]));var d=o.length>0?t(h,0,o,o[0],f,a,l):[];return i.createDenseMatrix({data:d,size:tr(o),datatype:p})};function t(n,i,a,s,l,f,o){var u=[];if(i===a.length-1)for(var p=0;p{var{typed:r,config:t,round:n}=e;return r(og,{number:function(a){return wt(a,n(a),t.epsilon)?n(a):Math.ceil(a)},"number, number":function(a,s){if(wt(a,n(a,s),t.epsilon))return n(a,s);var[l,f]="".concat(a,"e").split("e"),o=Math.ceil(Number("".concat(l,"e").concat(Number(f)+s)));return[l,f]="".concat(o,"e").split("e"),Number("".concat(l,"e").concat(Number(f)-s))}})}),cb=T(og,$9,e=>{var{typed:r,config:t,round:n,matrix:i,equalScalar:a,zeros:s,DenseMatrix:l}=e,f=Jr({typed:r,equalScalar:a}),o=Lr({typed:r,DenseMatrix:l}),u=Bt({typed:r}),p=Z9({typed:r,config:t,round:n});return r("ceil",{number:p.signatures.number,"number,number":p.signatures["number,number"],Complex:function(d){return d.ceil()},"Complex, number":function(d,x){return d.ceil(x)},"Complex, BigNumber":function(d,x){return d.ceil(x.toNumber())},BigNumber:function(d){return Ut(d,n(d),t.epsilon)?n(d):d.ceil()},"BigNumber, BigNumber":function(d,x){return Ut(d,n(d,x),t.epsilon)?n(d,x):d.toDecimalPlaces(x.toNumber(),ts.ROUND_CEIL)},Fraction:function(d){return d.ceil()},"Fraction, number":function(d,x){return d.ceil(x)},"Fraction, BigNumber":function(d,x){return d.ceil(x.toNumber())},"Array | Matrix":r.referToSelf(h=>d=>Je(d,h,!0)),"Array, number | BigNumber":r.referToSelf(h=>(d,x)=>Je(d,v=>h(v,x),!0)),"SparseMatrix, number | BigNumber":r.referToSelf(h=>(d,x)=>f(d,x,h,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(h=>(d,x)=>u(d,x,h,!1)),"number | Complex | Fraction | BigNumber, Array":r.referToSelf(h=>(d,x)=>u(i(x),d,h,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":r.referToSelf(h=>(d,x)=>a(d,0)?s(x.size(),x.storage()):x.storage()==="dense"?u(x,d,h,!0):o(x,d,h,!0))})});var pb="cube",Q9=["typed"],mb=T(pb,Q9,e=>{var{typed:r}=e;return r(pb,{number:dv,Complex:function(n){return n.mul(n).mul(n)},BigNumber:function(n){return n.times(n).times(n)},Fraction:function(n){return n.pow(3)},Unit:function(n){return n.pow(3)}})});var hb="exp",X9=["typed"],db=T(hb,X9,e=>{var{typed:r}=e;return r(hb,{number:vv,Complex:function(n){return n.exp()},BigNumber:function(n){return n.exp()}})});var vb="expm1",J9=["typed","Complex"],gb=T(vb,J9,e=>{var{typed:r,Complex:t}=e;return r(vb,{number:gv,Complex:function(i){var a=Math.exp(i.re);return new t(a*Math.cos(i.im)-1,a*Math.sin(i.im))},BigNumber:function(i){return i.exp().minus(1)}})});var sg="fix",K9=["typed","Complex","matrix","ceil","floor","equalScalar","zeros","DenseMatrix"],j9=T(sg,["typed","ceil","floor"],e=>{var{typed:r,ceil:t,floor:n}=e;return r(sg,{number:function(a){return a>0?n(a):t(a)},"number, number":function(a,s){return a>0?n(a,s):t(a,s)}})}),xb=T(sg,K9,e=>{var{typed:r,Complex:t,matrix:n,ceil:i,floor:a,equalScalar:s,zeros:l,DenseMatrix:f}=e,o=Lr({typed:r,DenseMatrix:f}),u=Bt({typed:r}),p=j9({typed:r,ceil:i,floor:a});return r("fix",{number:p.signatures.number,"number, number | BigNumber":p.signatures["number,number"],Complex:function(d){return new t(d.re>0?Math.floor(d.re):Math.ceil(d.re),d.im>0?Math.floor(d.im):Math.ceil(d.im))},"Complex, number":function(d,x){return new t(d.re>0?a(d.re,x):i(d.re,x),d.im>0?a(d.im,x):i(d.im,x))},"Complex, BigNumber":function(d,x){var v=x.toNumber();return new t(d.re>0?a(d.re,v):i(d.re,v),d.im>0?a(d.im,v):i(d.im,v))},BigNumber:function(d){return d.isNegative()?i(d):a(d)},"BigNumber, number | BigNumber":function(d,x){return d.isNegative()?i(d,x):a(d,x)},Fraction:function(d){return d.s<0?d.ceil():d.floor()},"Fraction, number | BigNumber":function(d,x){return d.s<0?i(d,x):a(d,x)},"Array | Matrix":r.referToSelf(h=>d=>Je(d,h,!0)),"Array | Matrix, number | BigNumber":r.referToSelf(h=>(d,x)=>Je(d,v=>h(v,x),!0)),"number | Complex | Fraction | BigNumber, Array":r.referToSelf(h=>(d,x)=>u(n(x),d,h,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":r.referToSelf(h=>(d,x)=>s(d,0)?l(x.size(),x.storage()):x.storage()==="dense"?u(x,d,h,!0):o(x,d,h,!0))})});var ug="floor",e7=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix"],r7=T(ug,["typed","config","round"],e=>{var{typed:r,config:t,round:n}=e;return r(ug,{number:function(a){return wt(a,n(a),t.epsilon)?n(a):Math.floor(a)},"number, number":function(a,s){if(wt(a,n(a,s),t.epsilon))return n(a,s);var[l,f]="".concat(a,"e").split("e"),o=Math.floor(Number("".concat(l,"e").concat(Number(f)+s)));return[l,f]="".concat(o,"e").split("e"),Number("".concat(l,"e").concat(Number(f)-s))}})}),Uc=T(ug,e7,e=>{var{typed:r,config:t,round:n,matrix:i,equalScalar:a,zeros:s,DenseMatrix:l}=e,f=Jr({typed:r,equalScalar:a}),o=Lr({typed:r,DenseMatrix:l}),u=Bt({typed:r}),p=r7({typed:r,config:t,round:n});return r("floor",{number:p.signatures.number,"number,number":p.signatures["number,number"],Complex:function(d){return d.floor()},"Complex, number":function(d,x){return d.floor(x)},"Complex, BigNumber":function(d,x){return d.floor(x.toNumber())},BigNumber:function(d){return Ut(d,n(d),t.epsilon)?n(d):d.floor()},"BigNumber, BigNumber":function(d,x){return Ut(d,n(d,x),t.epsilon)?n(d,x):d.toDecimalPlaces(x.toNumber(),ts.ROUND_FLOOR)},Fraction:function(d){return d.floor()},"Fraction, number":function(d,x){return d.floor(x)},"Fraction, BigNumber":function(d,x){return d.floor(x.toNumber())},"Array | Matrix":r.referToSelf(h=>d=>Je(d,h,!0)),"Array, number | BigNumber":r.referToSelf(h=>(d,x)=>Je(d,v=>h(v,x),!0)),"SparseMatrix, number | BigNumber":r.referToSelf(h=>(d,x)=>f(d,x,h,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(h=>(d,x)=>u(d,x,h,!1)),"number | Complex | Fraction | BigNumber, Array":r.referToSelf(h=>(d,x)=>u(i(x),d,h,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":r.referToSelf(h=>(d,x)=>a(d,0)?s(x.size(),x.storage()):x.storage()==="dense"?u(x,d,h,!0):o(x,d,h,!0))})});var t7="matAlgo02xDS0",n7=["typed","equalScalar"],It=T(t7,n7,e=>{var{typed:r,equalScalar:t}=e;return function(i,a,s,l){var f=i._data,o=i._size,u=i._datatype||i.getDataType(),p=a._values,h=a._index,d=a._ptr,x=a._size,v=a._datatype||a._data===void 0?a._datatype:a.getDataType();if(o.length!==x.length)throw new pr(o.length,x.length);if(o[0]!==x[0]||o[1]!==x[1])throw new RangeError("Dimension mismatch. Matrix A ("+o+") must match Matrix B ("+x+")");if(!p)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var y=o[0],w=o[1],C,b=t,A=0,E=s;typeof u=="string"&&u===v&&u!=="mixed"&&(C=u,b=r.find(t,[C,C]),A=r.convert(0,C),E=r.find(s,[C,C]));for(var S=[],O=[],F=[],M=0;M{var{typed:r}=e;return function(n,i,a,s){var l=n._data,f=n._size,o=n._datatype||n.getDataType(),u=i._values,p=i._index,h=i._ptr,d=i._size,x=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(f.length!==d.length)throw new pr(f.length,d.length);if(f[0]!==d[0]||f[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+f+") must match Matrix B ("+d+")");if(!u)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var v=f[0],y=f[1],w,C=0,b=a;typeof o=="string"&&o===x&&o!=="mixed"&&(w=o,C=r.convert(0,w),b=r.find(a,[w,w]));for(var A=[],E=0;E{var{typed:r,equalScalar:t}=e;return function(i,a,s){var l=i._values,f=i._index,o=i._ptr,u=i._size,p=i._datatype||i._data===void 0?i._datatype:i.getDataType(),h=a._values,d=a._index,x=a._ptr,v=a._size,y=a._datatype||a._data===void 0?a._datatype:a.getDataType();if(u.length!==v.length)throw new pr(u.length,v.length);if(u[0]!==v[0]||u[1]!==v[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+v+")");var w=u[0],C=u[1],b,A=t,E=0,S=s;typeof p=="string"&&p===y&&p!=="mixed"&&(b=p,A=r.find(t,[b,b]),E=r.convert(0,b),S=r.find(s,[b,b]));var O=l&&h?[]:void 0,F=[],M=[],_=O?[]:void 0,k=O?[]:void 0,L=[],Y=[],$,V,q,R;for(V=0;V{var{typed:r}=e;return function(i,a,s){var l=i._data,f=i._size,o=i._datatype,u=a._data,p=a._size,h=a._datatype,d=[];if(f.length!==p.length)throw new pr(f.length,p.length);for(var x=0;x0?t(y,0,d,d[0],l,u):[];return i.createDenseMatrix({data:w,size:d,datatype:v})};function t(n,i,a,s,l,f){var o=[];if(i===a.length-1)for(var u=0;u{var{concat:r}=e;return function(i,a){var s=Math.max(i._size.length,a._size.length);if(i._size.length===a._size.length&&i._size.every((x,v)=>x===a._size[v]))return[i,a];for(var l=t(i._size,s,0),f=t(a._size,s,0),o=[],u=0;u{var{typed:r,matrix:t,concat:n}=e,i=yb({typed:r}),a=Bt({typed:r}),s=bb({concat:n});return function(f){var o=f.elop,u=f.SD||f.DS,p;o?(p={"DenseMatrix, DenseMatrix":(v,y)=>i(...s(v,y),o),"Array, Array":(v,y)=>i(...s(t(v),t(y)),o).valueOf(),"Array, DenseMatrix":(v,y)=>i(...s(t(v),y),o),"DenseMatrix, Array":(v,y)=>i(...s(v,t(y)),o)},f.SS&&(p["SparseMatrix, SparseMatrix"]=(v,y)=>f.SS(...s(v,y),o,!1)),f.DS&&(p["DenseMatrix, SparseMatrix"]=(v,y)=>f.DS(...s(v,y),o,!1),p["Array, SparseMatrix"]=(v,y)=>f.DS(...s(t(v),y),o,!1)),u&&(p["SparseMatrix, DenseMatrix"]=(v,y)=>u(...s(y,v),o,!0),p["SparseMatrix, Array"]=(v,y)=>u(...s(t(y),v),o,!0))):(p={"DenseMatrix, DenseMatrix":r.referToSelf(v=>(y,w)=>i(...s(y,w),v)),"Array, Array":r.referToSelf(v=>(y,w)=>i(...s(t(y),t(w)),v).valueOf()),"Array, DenseMatrix":r.referToSelf(v=>(y,w)=>i(...s(t(y),w),v)),"DenseMatrix, Array":r.referToSelf(v=>(y,w)=>i(...s(y,t(w)),v))},f.SS&&(p["SparseMatrix, SparseMatrix"]=r.referToSelf(v=>(y,w)=>f.SS(...s(y,w),v,!1))),f.DS&&(p["DenseMatrix, SparseMatrix"]=r.referToSelf(v=>(y,w)=>f.DS(...s(y,w),v,!1)),p["Array, SparseMatrix"]=r.referToSelf(v=>(y,w)=>f.DS(...s(t(y),w),v,!1))),u&&(p["SparseMatrix, DenseMatrix"]=r.referToSelf(v=>(y,w)=>u(...s(w,y),v,!0)),p["SparseMatrix, Array"]=r.referToSelf(v=>(y,w)=>u(...s(t(w),y),v,!0))));var h=f.scalar||"any",d=f.Ds||f.Ss;d&&(o?(p["DenseMatrix,"+h]=(v,y)=>a(v,y,o,!1),p[h+", DenseMatrix"]=(v,y)=>a(y,v,o,!0),p["Array,"+h]=(v,y)=>a(t(v),y,o,!1).valueOf(),p[h+", Array"]=(v,y)=>a(t(y),v,o,!0).valueOf()):(p["DenseMatrix,"+h]=r.referToSelf(v=>(y,w)=>a(y,w,v,!1)),p[h+", DenseMatrix"]=r.referToSelf(v=>(y,w)=>a(w,y,v,!0)),p["Array,"+h]=r.referToSelf(v=>(y,w)=>a(t(y),w,v,!1).valueOf()),p[h+", Array"]=r.referToSelf(v=>(y,w)=>a(t(w),y,v,!0).valueOf())));var x=f.sS!==void 0?f.sS:f.Ss;return o?(f.Ss&&(p["SparseMatrix,"+h]=(v,y)=>f.Ss(v,y,o,!1)),x&&(p[h+", SparseMatrix"]=(v,y)=>x(y,v,o,!0))):(f.Ss&&(p["SparseMatrix,"+h]=r.referToSelf(v=>(y,w)=>f.Ss(y,w,v,!1))),x&&(p[h+", SparseMatrix"]=r.referToSelf(v=>(y,w)=>x(w,y,v,!0)))),o&&o.signatures&&vc(p,o.signatures),p}});var wb="mod",h7=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix","concat"],zc=T(wb,h7,e=>{var{typed:r,config:t,round:n,matrix:i,equalScalar:a,zeros:s,DenseMatrix:l,concat:f}=e,o=Uc({typed:r,config:t,round:n,matrix:i,equalScalar:a,zeros:s,DenseMatrix:l}),u=It({typed:r,equalScalar:a}),p=ft({typed:r}),h=So({typed:r,equalScalar:a}),d=Jr({typed:r,equalScalar:a}),x=Lr({typed:r,DenseMatrix:l}),v=vr({typed:r,matrix:i,concat:f});return r(wb,{"number, number":y,"BigNumber, BigNumber":function(C,b){return b.isZero()?C:C.sub(b.mul(o(C.div(b))))},"Fraction, Fraction":function(C,b){return b.equals(0)?C:C.sub(b.mul(o(C.div(b))))}},v({SS:h,DS:p,SD:u,Ss:d,sS:x}));function y(w,C){return C===0?w:w-C*o(w/C)}});var d7="matAlgo01xDSid",v7=["typed"],dn=T(d7,v7,e=>{var{typed:r}=e;return function(n,i,a,s){var l=n._data,f=n._size,o=n._datatype||n.getDataType(),u=i._values,p=i._index,h=i._ptr,d=i._size,x=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(f.length!==d.length)throw new pr(f.length,d.length);if(f[0]!==d[0]||f[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+f+") must match Matrix B ("+d+")");if(!u)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var v=f[0],y=f[1],w=typeof o=="string"&&o!=="mixed"&&o===x?o:void 0,C=w?r.find(a,[w,w]):a,b,A,E=[];for(b=0;b{var{typed:r,equalScalar:t}=e;return function(i,a,s){var l=i._values,f=i._index,o=i._ptr,u=i._size,p=i._datatype||i._data===void 0?i._datatype:i.getDataType(),h=a._values,d=a._index,x=a._ptr,v=a._size,y=a._datatype||a._data===void 0?a._datatype:a.getDataType();if(u.length!==v.length)throw new pr(u.length,v.length);if(u[0]!==v[0]||u[1]!==v[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+v+")");var w=u[0],C=u[1],b,A=t,E=0,S=s;typeof p=="string"&&p===y&&p!=="mixed"&&(b=p,A=r.find(t,[b,b]),E=r.convert(0,b),S=r.find(s,[b,b]));var O=l&&h?[]:void 0,F=[],M=[],_=l&&h?[]:void 0,k=l&&h?[]:void 0,L=[],Y=[],$,V,q,R,j;for(V=0;V{var{typed:r,DenseMatrix:t}=e;return function(i,a,s,l){var f=i._values,o=i._index,u=i._ptr,p=i._size,h=i._datatype;if(!f)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var d=p[0],x=p[1],v,y=s;typeof h=="string"&&(v=h,a=r.convert(a,v),y=r.find(s,[v,v]));for(var w=[],C=[],b=[],A=0;AArray.isArray(r))}var Nb=T(Db,w7,e=>{var{typed:r,matrix:t,config:n,round:i,equalScalar:a,zeros:s,BigNumber:l,DenseMatrix:f,concat:o}=e,u=zc({typed:r,config:n,round:i,matrix:t,equalScalar:a,zeros:s,DenseMatrix:f,concat:o}),p=dn({typed:r}),h=su({typed:r,equalScalar:a}),d=Un({typed:r,DenseMatrix:f}),x=vr({typed:r,matrix:t,concat:o});return r(Db,{"number, number":v,"BigNumber, BigNumber":y,"Fraction, Fraction":(w,C)=>w.gcd(C)},x({SS:h,DS:p,Ss:d}),{[D7]:r.referToSelf(w=>(C,b,A)=>{for(var E=w(C,b),S=0;SC=>{if(C.length===1&&Array.isArray(C[0])&&Sb(C[0]))return w(...C[0]);if(Sb(C))return w(...C);throw new jn("gcd() supports only 1d matrices!")}),Matrix:r.referToSelf(w=>C=>w(C.toArray()))});function v(w,C){if(!He(w)||!He(C))throw new Error("Parameters in function gcd must be integer numbers");for(var b;C!==0;)b=u(w,C),w=C,C=b;return w<0?-w:w}function y(w,C){if(!w.isInt()||!C.isInt())throw new Error("Parameters in function gcd must be integer numbers");for(var b=new l(0);!C.isZero();){var A=u(w,C);w=C,C=A}return w.lt(b)?w.neg():w}});var S7="matAlgo06xS0S0",N7=["typed","equalScalar"],No=T(S7,N7,e=>{var{typed:r,equalScalar:t}=e;return function(i,a,s){var l=i._values,f=i._size,o=i._datatype||i._data===void 0?i._datatype:i.getDataType(),u=a._values,p=a._size,h=a._datatype||a._data===void 0?a._datatype:a.getDataType();if(f.length!==p.length)throw new pr(f.length,p.length);if(f[0]!==p[0]||f[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+f+") must match Matrix B ("+p+")");var d=f[0],x=f[1],v,y=t,w=0,C=s;typeof o=="string"&&o===h&&o!=="mixed"&&(v=o,y=r.find(t,[v,v]),w=r.convert(0,v),C=r.find(s,[v,v]));for(var b=l&&u?[]:void 0,A=[],E=[],S=b?[]:void 0,O=[],F=[],M=0;M{var{typed:r,matrix:t,equalScalar:n,concat:i}=e,a=It({typed:r,equalScalar:n}),s=No({typed:r,equalScalar:n}),l=Jr({typed:r,equalScalar:n}),f=vr({typed:r,matrix:t,concat:i}),o="number | BigNumber | Fraction | Matrix | Array",u={};return u["".concat(o,", ").concat(o,", ...").concat(o)]=r.referToSelf(h=>(d,x,v)=>{for(var y=h(d,x),w=0;wh.lcm(d)},f({SS:s,DS:a,Ss:l}),u);function p(h,d){if(!h.isInt()||!d.isInt())throw new Error("Parameters in function lcm must be integer numbers");if(h.isZero())return h;if(d.isZero())return d;for(var x=h.times(d);!d.isZero();){var v=d;d=h.mod(v),h=v}return x.div(h).abs()}});var Cb="log10",E7=["typed","config","Complex"],Mb=T(Cb,E7,e=>{var{typed:r,config:t,Complex:n}=e;return r(Cb,{number:function(a){return a>=0||t.predictable?yv(a):new n(a,0).log().div(Math.LN10)},Complex:function(a){return new n(a).log().div(Math.LN10)},BigNumber:function(a){return!a.isNegative()||t.predictable?a.log():new n(a.toNumber(),0).log().div(Math.LN10)},"Array | Matrix":r.referToSelf(i=>a=>Je(a,i))})});var _b="log2",C7=["typed","config","Complex"],Tb=T(_b,C7,e=>{var{typed:r,config:t,Complex:n}=e;return r(_b,{number:function(s){return s>=0||t.predictable?bv(s):i(new n(s,0))},Complex:i,BigNumber:function(s){return!s.isNegative()||t.predictable?s.log(2):i(new n(s.toNumber(),0))},"Array | Matrix":r.referToSelf(a=>s=>Je(s,a))});function i(a){var s=Math.sqrt(a.re*a.re+a.im*a.im);return new n(Math.log2?Math.log2(s):Math.log(s)/Math.LN2,Math.atan2(a.im,a.re)/Math.LN2)}});var M7="multiplyScalar",_7=["typed"],Fb=T(M7,_7,e=>{var{typed:r}=e;return r("multiplyScalar",{"number, number":pv,"Complex, Complex":function(n,i){return n.mul(i)},"BigNumber, BigNumber":function(n,i){return n.times(i)},"Fraction, Fraction":function(n,i){return n.mul(i)},"number | Fraction | BigNumber | Complex, Unit":(t,n)=>n.multiply(t),"Unit, number | Fraction | BigNumber | Complex | Unit":(t,n)=>t.multiply(n)})});var Ob="multiply",T7=["typed","matrix","addScalar","multiplyScalar","equalScalar","dot"],Bb=T(Ob,T7,e=>{var{typed:r,matrix:t,addScalar:n,multiplyScalar:i,equalScalar:a,dot:s}=e,l=Jr({typed:r,equalScalar:a}),f=Bt({typed:r});function o(E,S){switch(E.length){case 1:switch(S.length){case 1:if(E[0]!==S[0])throw new RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(E[0]!==S[0])throw new RangeError("Dimension mismatch in multiplication. Vector length ("+E[0]+") must match Matrix rows ("+S[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+S.length+" dimensions)")}break;case 2:switch(S.length){case 1:if(E[1]!==S[0])throw new RangeError("Dimension mismatch in multiplication. Matrix columns ("+E[1]+") must match Vector length ("+S[0]+")");break;case 2:if(E[1]!==S[0])throw new RangeError("Dimension mismatch in multiplication. Matrix A columns ("+E[1]+") must match Matrix B rows ("+S[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+S.length+" dimensions)")}break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+E.length+" dimensions)")}}function u(E,S,O){if(O===0)throw new Error("Cannot multiply two empty vectors");return s(E,S)}function p(E,S){if(S.storage()!=="dense")throw new Error("Support for SparseMatrix not implemented");return h(E,S)}function h(E,S){var O=E._data,F=E._size,M=E._datatype||E.getDataType(),_=S._data,k=S._size,L=S._datatype||S.getDataType(),Y=F[0],$=k[1],V,q=n,R=i;M&&L&&M===L&&typeof M=="string"&&M!=="mixed"&&(V=M,q=r.find(n,[V,V]),R=r.find(i,[V,V]));for(var j=[],U=0;U<$;U++){for(var oe=R(O[0],_[0][U]),me=1;mege)for(var xe=0,be=0;be(S,O)=>{o(or(S),or(O));var F=E(t(S),t(O));return Ge(F)?F.valueOf():F}),"Matrix, Matrix":function(S,O){var F=S.size(),M=O.size();return o(F,M),F.length===1?M.length===1?u(S,O,F[0]):p(S,O):M.length===1?d(S,O):x(S,O)},"Matrix, Array":r.referTo("Matrix,Matrix",E=>(S,O)=>E(S,t(O))),"Array, Matrix":r.referToSelf(E=>(S,O)=>E(t(S,O.storage()),O)),"SparseMatrix, any":function(S,O){return l(S,O,i,!1)},"DenseMatrix, any":function(S,O){return f(S,O,i,!1)},"any, SparseMatrix":function(S,O){return l(O,S,i,!0)},"any, DenseMatrix":function(S,O){return f(O,S,i,!0)},"Array, any":function(S,O){return f(t(S),O,i,!1).valueOf()},"any, Array":function(S,O){return f(t(O),S,i,!0).valueOf()},"any, any":i,"any, any, ...any":r.referToSelf(E=>(S,O,F)=>{for(var M=E(S,O),_=0;_{var{typed:r,matrix:t,equalScalar:n,BigNumber:i,concat:a}=e,s=dn({typed:r}),l=It({typed:r,equalScalar:n}),f=No({typed:r,equalScalar:n}),o=Jr({typed:r,equalScalar:n}),u=vr({typed:r,matrix:t,concat:a});function p(){throw new Error("Complex number not supported in function nthRoot. Use nthRoots instead.")}return r(Ib,{number:wv,"number, number":wv,BigNumber:d=>h(d,new i(2)),"BigNumber, BigNumber":h,Complex:p,"Complex, number":p,Array:r.referTo("DenseMatrix,number",d=>x=>d(t(x),2).valueOf()),DenseMatrix:r.referTo("DenseMatrix,number",d=>x=>d(x,2)),SparseMatrix:r.referTo("SparseMatrix,number",d=>x=>d(x,2)),"SparseMatrix, SparseMatrix":r.referToSelf(d=>(x,v)=>{if(v.density()===1)return f(x,v,d);throw new Error("Root must be non-zero")}),"DenseMatrix, SparseMatrix":r.referToSelf(d=>(x,v)=>{if(v.density()===1)return s(x,v,d,!1);throw new Error("Root must be non-zero")}),"Array, SparseMatrix":r.referTo("DenseMatrix,SparseMatrix",d=>(x,v)=>d(t(x),v)),"number | BigNumber, SparseMatrix":r.referToSelf(d=>(x,v)=>{if(v.density()===1)return o(v,x,d,!0);throw new Error("Root must be non-zero")})},u({scalar:"number | BigNumber",SD:l,Ss:o,sS:!1}));function h(d,x){var v=i.precision,y=i.clone({precision:v+2}),w=new i(0),C=new y(1),b=x.isNegative();if(b&&(x=x.neg()),x.isZero())throw new Error("Root must be non-zero");if(d.isNegative()&&!x.abs().mod(2).equals(1))throw new Error("Root must be odd when a is negative.");if(d.isZero())return b?new y(1/0):0;if(!d.isFinite())return b?w:d;var A=d.abs().pow(C.div(x));return A=d.isNeg()?A.neg():A,new i((b?C.div(A):A).toPrecision(v))}});var kb="sign",O7=["typed","BigNumber","Fraction","complex"],Rb=T(kb,O7,e=>{var{typed:r,BigNumber:t,complex:n,Fraction:i}=e;return r(kb,{number:Rc,Complex:function(s){return s.im===0?n(Rc(s.re)):s.sign()},BigNumber:function(s){return new t(s.cmp(0))},Fraction:function(s){return new i(s.s,1)},"Array | Matrix":r.referToSelf(a=>s=>Je(s,a,!0)),Unit:r.referToSelf(a=>s=>{if(!s._isDerived()&&s.units[0].unit.offset!==0)throw new TypeError("sign is ambiguous for units with offset");return r.find(a,s.valueType())(s.value)})})});var B7="sqrt",I7=["config","typed","Complex"],Lb=T(B7,I7,e=>{var{config:r,typed:t,Complex:n}=e;return t("sqrt",{number:i,Complex:function(s){return s.sqrt()},BigNumber:function(s){return!s.isNegative()||r.predictable?s.sqrt():i(s.toNumber())},Unit:function(s){return s.pow(.5)}});function i(a){return isNaN(a)?NaN:a>=0||r.predictable?Math.sqrt(a):new n(a,0).sqrt()}});var qb="square",P7=["typed"],Ub=T(qb,P7,e=>{var{typed:r}=e;return r(qb,{number:Dv,Complex:function(n){return n.mul(n)},BigNumber:function(n){return n.times(n)},Fraction:function(n){return n.mul(n)},Unit:function(n){return n.pow(2)}})});var zb="subtract",k7=["typed","matrix","equalScalar","subtractScalar","unaryMinus","DenseMatrix","concat"],Wb=T(zb,k7,e=>{var{typed:r,matrix:t,equalScalar:n,subtractScalar:i,unaryMinus:a,DenseMatrix:s,concat:l}=e,f=dn({typed:r}),o=ft({typed:r}),u=So({typed:r,equalScalar:n}),p=Un({typed:r,DenseMatrix:s}),h=Lr({typed:r,DenseMatrix:s}),d=vr({typed:r,matrix:t,concat:l});return r(zb,{"any, any":i},d({elop:i,SS:u,DS:f,SD:o,Ss:h,sS:p}))});var Vb="xgcd",R7=["typed","config","matrix","BigNumber"],Yb=T(Vb,R7,e=>{var{typed:r,config:t,matrix:n,BigNumber:i}=e;return r(Vb,{"number, number":function(l,f){var o=Sv(l,f);return t.matrix==="Array"?o:n(o)},"BigNumber, BigNumber":a});function a(s,l){var f,o,u,p=new i(0),h=new i(1),d=p,x=h,v=h,y=p;if(!s.isInt()||!l.isInt())throw new Error("Parameters in function xgcd must be integer numbers");for(;!l.isZero();)o=s.div(l).floor(),u=s.mod(l),f=d,d=x.minus(o.times(d)),x=f,f=v,v=y.minus(o.times(v)),y=f,s=l,l=u;var w;return s.lt(p)?w=[s.neg(),x.neg(),y.neg()]:w=[s,s.isZero()?0:x,y],t.matrix==="Array"?w:n(w)}});var Hb="invmod",L7=["typed","config","BigNumber","xgcd","equal","smaller","mod","add","isInteger"],Gb=T(Hb,L7,e=>{var{typed:r,config:t,BigNumber:n,xgcd:i,equal:a,smaller:s,mod:l,add:f,isInteger:o}=e;return r(Hb,{"number, number":u,"BigNumber, BigNumber":u});function u(p,h){if(!o(p)||!o(h))throw new Error("Parameters in function invmod must be integer numbers");if(p=l(p,h),a(h,0))throw new Error("Divisor must be non zero");var d=i(p,h);d=d.valueOf();var[x,v]=d;return a(x,n(1))?(v=l(v,h),s(v,n(0))&&(v=f(v,h)),v):NaN}});var q7="matAlgo09xS0Sf",U7=["typed","equalScalar"],Wc=T(q7,U7,e=>{var{typed:r,equalScalar:t}=e;return function(i,a,s){var l=i._values,f=i._index,o=i._ptr,u=i._size,p=i._datatype||i._data===void 0?i._datatype:i.getDataType(),h=a._values,d=a._index,x=a._ptr,v=a._size,y=a._datatype||a._data===void 0?a._datatype:a.getDataType();if(u.length!==v.length)throw new pr(u.length,v.length);if(u[0]!==v[0]||u[1]!==v[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+v+")");var w=u[0],C=u[1],b,A=t,E=0,S=s;typeof p=="string"&&p===y&&p!=="mixed"&&(b=p,A=r.find(t,[b,b]),E=r.convert(0,b),S=r.find(s,[b,b]));var O=l&&h?[]:void 0,F=[],M=[],_=O?[]:void 0,k=[],L,Y,$,V,q;for(Y=0;Y{var{typed:r,matrix:t,equalScalar:n,multiplyScalar:i,concat:a}=e,s=It({typed:r,equalScalar:n}),l=Wc({typed:r,equalScalar:n}),f=Jr({typed:r,equalScalar:n}),o=vr({typed:r,matrix:t,concat:a});return r($b,o({elop:i,SS:l,DS:s,Ss:f}))});function Qb(e,r){if(e.isFinite()&&!e.isInteger()||r.isFinite()&&!r.isInteger())throw new Error("Integers expected in function bitAnd");var t=e.constructor;if(e.isNaN()||r.isNaN())return new t(NaN);if(e.isZero()||r.eq(-1)||e.eq(r))return e;if(r.isZero()||e.eq(-1))return r;if(!e.isFinite()||!r.isFinite()){if(!e.isFinite()&&!r.isFinite())return e.isNegative()===r.isNegative()?e:new t(0);if(!e.isFinite())return r.isNegative()?e:e.isNegative()?new t(0):r;if(!r.isFinite())return e.isNegative()?r:r.isNegative()?new t(0):e}return lg(e,r,function(n,i){return n&i})}function uu(e){if(e.isFinite()&&!e.isInteger())throw new Error("Integer expected in function bitNot");var r=e.constructor,t=r.precision;r.config({precision:1e9});var n=e.plus(new r(1));return n.s=-n.s||null,r.config({precision:t}),n}function Xb(e,r){if(e.isFinite()&&!e.isInteger()||r.isFinite()&&!r.isInteger())throw new Error("Integers expected in function bitOr");var t=e.constructor;if(e.isNaN()||r.isNaN())return new t(NaN);var n=new t(-1);return e.isZero()||r.eq(n)||e.eq(r)?r:r.isZero()||e.eq(n)?e:!e.isFinite()||!r.isFinite()?!e.isFinite()&&!e.isNegative()&&r.isNegative()||e.isNegative()&&!r.isNegative()&&!r.isFinite()?n:e.isNegative()&&r.isNegative()?e.isFinite()?e:r:e.isFinite()?r:e:lg(e,r,function(i,a){return i|a})}function lg(e,r,t){var n=e.constructor,i,a,s=+(e.s<0),l=+(r.s<0);if(s){i=Vc(uu(e));for(var f=0;f0;)t(u[--d],p[--x])===v&&(y=y.plus(w)),w=w.times(C);for(;x>0;)t(h,p[--x])===v&&(y=y.plus(w)),w=w.times(C);return n.config({precision:b}),v===0&&(y.s=-y.s),y}function Vc(e){for(var r=e.d,t=r[0]+"",n=1;n0)if(++l>o)for(l-=o;l--;)f+="0";else l1&&((u[d+1]===null||u[d+1]===void 0)&&(u[d+1]=0),u[d+1]+=u[d]>>1,u[d]&=1)}return u.reverse()}function Jb(e,r){if(e.isFinite()&&!e.isInteger()||r.isFinite()&&!r.isInteger())throw new Error("Integers expected in function bitXor");var t=e.constructor;if(e.isNaN()||r.isNaN())return new t(NaN);if(e.isZero())return r;if(r.isZero())return e;if(e.eq(r))return new t(0);var n=new t(-1);return e.eq(n)?uu(r):r.eq(n)?uu(e):!e.isFinite()||!r.isFinite()?!e.isFinite()&&!r.isFinite()?n:new t(e.isNegative()===r.isNegative()?1/0:-1/0):lg(e,r,function(i,a){return i^a})}function Kb(e,r){if(e.isFinite()&&!e.isInteger()||r.isFinite()&&!r.isInteger())throw new Error("Integers expected in function leftShift");var t=e.constructor;return e.isNaN()||r.isNaN()||r.isNegative()&&!r.isZero()?new t(NaN):e.isZero()||r.isZero()?e:!e.isFinite()&&!r.isFinite()?new t(NaN):r.lt(55)?e.times(Math.pow(2,r.toNumber())+""):e.times(new t(2).pow(r))}function jb(e,r){if(e.isFinite()&&!e.isInteger()||r.isFinite()&&!r.isInteger())throw new Error("Integers expected in function rightArithShift");var t=e.constructor;return e.isNaN()||r.isNaN()||r.isNegative()&&!r.isZero()?new t(NaN):e.isZero()||r.isZero()?e:r.isFinite()?r.lt(55)?e.div(Math.pow(2,r.toNumber())+"").floor():e.div(new t(2).pow(r)).floor():e.isNegative()?new t(-1):e.isFinite()?new t(0):new t(NaN)}var ew="bitAnd",W7=["typed","matrix","equalScalar","concat"],Yc=T(ew,W7,e=>{var{typed:r,matrix:t,equalScalar:n,concat:i}=e,a=It({typed:r,equalScalar:n}),s=No({typed:r,equalScalar:n}),l=Jr({typed:r,equalScalar:n}),f=vr({typed:r,matrix:t,concat:i});return r(ew,{"number, number":Av,"BigNumber, BigNumber":Qb},f({SS:s,DS:a,Ss:l}))});var rw="bitNot",V7=["typed"],tw=T(rw,V7,e=>{var{typed:r}=e;return r(rw,{number:Ev,BigNumber:uu,"Array | Matrix":r.referToSelf(t=>n=>Je(n,t))})});var nw="bitOr",Y7=["typed","matrix","equalScalar","DenseMatrix","concat"],Hc=T(nw,Y7,e=>{var{typed:r,matrix:t,equalScalar:n,DenseMatrix:i,concat:a}=e,s=dn({typed:r}),l=su({typed:r,equalScalar:n}),f=Un({typed:r,DenseMatrix:i}),o=vr({typed:r,matrix:t,concat:a});return r(nw,{"number, number":Cv,"BigNumber, BigNumber":Xb},o({SS:l,DS:s,Ss:f}))});var H7="matAlgo07xSSf",G7=["typed","DenseMatrix"],Vt=T(H7,G7,e=>{var{typed:r,DenseMatrix:t}=e;return function(a,s,l){var f=a._size,o=a._datatype||a._data===void 0?a._datatype:a.getDataType(),u=s._size,p=s._datatype||s._data===void 0?s._datatype:s.getDataType();if(f.length!==u.length)throw new pr(f.length,u.length);if(f[0]!==u[0]||f[1]!==u[1])throw new RangeError("Dimension mismatch. Matrix A ("+f+") must match Matrix B ("+u+")");var h=f[0],d=f[1],x,v=0,y=l;typeof o=="string"&&o===p&&o!=="mixed"&&(x=o,v=r.convert(0,x),y=r.find(l,[x,x]));var w,C,b=[];for(w=0;w{var{typed:r,matrix:t,DenseMatrix:n,concat:i}=e,a=ft({typed:r}),s=Vt({typed:r,DenseMatrix:n}),l=Lr({typed:r,DenseMatrix:n}),f=vr({typed:r,matrix:t,concat:i});return r(iw,{"number, number":Mv,"BigNumber, BigNumber":Jb},f({SS:s,DS:a,Ss:l}))});var ow="arg",Z7=["typed"],sw=T(ow,Z7,e=>{var{typed:r}=e;return r(ow,{number:function(n){return Math.atan2(0,n)},BigNumber:function(n){return n.constructor.atan2(0,n)},Complex:function(n){return n.arg()},"Array | Matrix":r.referToSelf(t=>n=>Je(n,t))})});var uw="conj",Q7=["typed"],fw=T(uw,Q7,e=>{var{typed:r}=e;return r(uw,{"number | BigNumber | Fraction":t=>t,Complex:t=>t.conjugate(),"Array | Matrix":r.referToSelf(t=>n=>Je(n,t))})});var lw="im",X7=["typed"],cw=T(lw,X7,e=>{var{typed:r}=e;return r(lw,{number:()=>0,"BigNumber | Fraction":t=>t.mul(0),Complex:t=>t.im,"Array | Matrix":r.referToSelf(t=>n=>Je(n,t))})});var pw="re",J7=["typed"],mw=T(pw,J7,e=>{var{typed:r}=e;return r(pw,{"number | BigNumber | Fraction":t=>t,Complex:t=>t.re,"Array | Matrix":r.referToSelf(t=>n=>Je(n,t))})});var hw="not",K7=["typed"],dw=T(hw,K7,e=>{var{typed:r}=e;return r(hw,{"null | undefined":()=>!0,number:Iv,Complex:function(n){return n.re===0&&n.im===0},BigNumber:function(n){return n.isZero()||n.isNaN()},Unit:r.referToSelf(t=>n=>r.find(t,n.valueType())(n.value)),"Array | Matrix":r.referToSelf(t=>n=>Je(n,t))})});var vw="or",j7=["typed","matrix","equalScalar","DenseMatrix","concat"],Gc=T(vw,j7,e=>{var{typed:r,matrix:t,equalScalar:n,DenseMatrix:i,concat:a}=e,s=ft({typed:r}),l=So({typed:r,equalScalar:n}),f=Lr({typed:r,DenseMatrix:i}),o=vr({typed:r,matrix:t,concat:a});return r(vw,{"number, number":Pv,"Complex, Complex":function(p,h){return p.re!==0||p.im!==0||h.re!==0||h.im!==0},"BigNumber, BigNumber":function(p,h){return!p.isZero()&&!p.isNaN()||!h.isZero()&&!h.isNaN()},"Unit, Unit":r.referToSelf(u=>(p,h)=>u(p.value||0,h.value||0))},o({SS:l,DS:s,Ss:f}))});var gw="xor",eL=["typed","matrix","DenseMatrix","concat"],xw=T(gw,eL,e=>{var{typed:r,matrix:t,DenseMatrix:n,concat:i}=e,a=ft({typed:r}),s=Vt({typed:r,DenseMatrix:n}),l=Lr({typed:r,DenseMatrix:n}),f=vr({typed:r,matrix:t,concat:i});return r(gw,{"number, number":kv,"Complex, Complex":function(u,p){return(u.re!==0||u.im!==0)!=(p.re!==0||p.im!==0)},"BigNumber, BigNumber":function(u,p){return(!u.isZero()&&!u.isNaN())!=(!p.isZero()&&!p.isNaN())},"Unit, Unit":r.referToSelf(o=>(u,p)=>o(u.value||0,p.value||0))},f({SS:s,DS:a,Ss:l}))});var yw="concat",rL=["typed","matrix","isInteger"],$c=T(yw,rL,e=>{var{typed:r,matrix:t,isInteger:n}=e;return r(yw,{"...Array | Matrix | number | BigNumber":function(a){var s,l=a.length,f=-1,o,u=!1,p=[];for(s=0;s0&&f>o)throw new Xt(f,o+1)}else{var d=tr(h).valueOf(),x=or(d);if(p[s]=d,o=f,f=x.length-1,s>0&&f!==o)throw new pr(o+1,f+1)}}if(p.length===0)throw new SyntaxError("At least one matrix expected");for(var v=p.shift();p.length;)v=$d(v,p.shift(),f);return u?t(v):v},"...string":function(a){return a.join("")}})});var bw="column",tL=["typed","Index","matrix","range"],Zc=T(bw,tL,e=>{var{typed:r,Index:t,matrix:n,range:i}=e;return r(bw,{"Matrix, number":a,"Array, number":function(l,f){return a(n(tr(l)),f).valueOf()}});function a(s,l){if(s.size().length!==2)throw new Error("Only two dimensional matrix is supported");Xr(l,s.size()[1]);var f=i(0,s.size()[0]),o=new t(f,l),u=s.subset(o);return Ge(u)?u:n([[u]])}});var ww="count",nL=["typed","size","prod"],Dw=T(ww,nL,e=>{var{typed:r,size:t,prod:n}=e;return r(ww,{string:function(a){return a.length},"Matrix | Array":function(a){return n(t(a))}})});var Sw="cross",iL=["typed","matrix","subtract","multiply"],Nw=T(Sw,iL,e=>{var{typed:r,matrix:t,subtract:n,multiply:i}=e;return r(Sw,{"Matrix, Matrix":function(l,f){return t(a(l.toArray(),f.toArray()))},"Matrix, Array":function(l,f){return t(a(l.toArray(),f))},"Array, Matrix":function(l,f){return t(a(l,f.toArray()))},"Array, Array":a});function a(s,l){var f=Math.max(or(s).length,or(l).length);s=Js(s),l=Js(l);var o=or(s),u=or(l);if(o.length!==1||u.length!==1||o[0]!==3||u[0]!==3)throw new RangeError("Vectors with length 3 expected (Size A = ["+o.join(", ")+"], B = ["+u.join(", ")+"])");var p=[n(i(s[1],l[2]),i(s[2],l[1])),n(i(s[2],l[0]),i(s[0],l[2])),n(i(s[0],l[1]),i(s[1],l[0]))];return f>1?[p]:p}});var Aw="diag",aL=["typed","matrix","DenseMatrix","SparseMatrix"],Ew=T(Aw,aL,e=>{var{typed:r,matrix:t,DenseMatrix:n,SparseMatrix:i}=e;return r(Aw,{Array:function(o){return a(o,0,or(o),null)},"Array, number":function(o,u){return a(o,u,or(o),null)},"Array, BigNumber":function(o,u){return a(o,u.toNumber(),or(o),null)},"Array, string":function(o,u){return a(o,0,or(o),u)},"Array, number, string":function(o,u,p){return a(o,u,or(o),p)},"Array, BigNumber, string":function(o,u,p){return a(o,u.toNumber(),or(o),p)},Matrix:function(o){return a(o,0,o.size(),o.storage())},"Matrix, number":function(o,u){return a(o,u,o.size(),o.storage())},"Matrix, BigNumber":function(o,u){return a(o,u.toNumber(),o.size(),o.storage())},"Matrix, string":function(o,u){return a(o,0,o.size(),u)},"Matrix, number, string":function(o,u,p){return a(o,u,o.size(),p)},"Matrix, BigNumber, string":function(o,u,p){return a(o,u.toNumber(),o.size(),p)}});function a(f,o,u,p){if(!He(o))throw new TypeError("Second parameter in function diag must be an integer");var h=o>0?o:0,d=o<0?-o:0;switch(u.length){case 1:return s(f,o,p,u[0],d,h);case 2:return l(f,o,p,u,d,h)}throw new RangeError("Matrix for function diag must be 2 dimensional")}function s(f,o,u,p,h,d){var x=[p+h,p+d];if(u&&u!=="sparse"&&u!=="dense")throw new TypeError("Unknown matrix type ".concat(u,'"'));var v=u==="sparse"?i.diagonal(x,f,o):n.diagonal(x,f,o);return u!==null?v:v.valueOf()}function l(f,o,u,p,h,d){if(Ge(f)){var x=f.diagonal(o);return u!==null?u!==x.storage()?t(x,u):x:x.valueOf()}for(var v=Math.min(p[0]-h,p[1]-d),y=[],w=0;w=2&&v.push("index: ".concat(_r(t))),d.length>=3&&v.push("array: ".concat(_r(n))),new TypeError("Function ".concat(i," cannot apply callback arguments ")+"".concat(e.name,"(").concat(v.join(", "),") at index ").concat(JSON.stringify(t)))}else throw new TypeError("Function ".concat(i," cannot apply callback arguments ")+"to function ".concat(e.name,": ").concat(y.message))}}}var oL="filter",sL=["typed"],Mw=T(oL,sL,e=>{var{typed:r}=e;return r("filter",{"Array, function":Cw,"Matrix, function":function(n,i){return n.create(Cw(n.toArray(),i))},"Array, RegExp":Ks,"Matrix, RegExp":function(n,i){return n.create(Ks(n.toArray(),i))}})});function Cw(e,r){return Nc(e,function(t,n,i){return gi(r,t,[n],i,"filter")})}var _w="flatten",uL=["typed","matrix"],Tw=T(_w,uL,e=>{var{typed:r,matrix:t}=e;return r(_w,{Array:function(i){return gr(i)},Matrix:function(i){var a=gr(i.toArray());return t(a)}})});var Fw="forEach",fL=["typed"],Ow=T(Fw,fL,e=>{var{typed:r}=e;return r(Fw,{"Array, function":lL,"Matrix, function":function(n,i){n.forEach(i)}})});function lL(e,r){var t=function n(i,a){if(Array.isArray(i))ho(i,function(s,l){n(s,a.concat(l))});else return gi(r,i,a,e,"forEach")};t(e,[])}var Bw="getMatrixDataType",cL=["typed"],Iw=T(Bw,cL,e=>{var{typed:r}=e;return r(Bw,{Array:function(n){return vo(n,_r)},Matrix:function(n){return n.getDataType()}})});var Pw="identity",pL=["typed","config","matrix","BigNumber","DenseMatrix","SparseMatrix"],kw=T(Pw,pL,e=>{var{typed:r,config:t,matrix:n,BigNumber:i,DenseMatrix:a,SparseMatrix:s}=e;return r(Pw,{"":function(){return t.matrix==="Matrix"?n([]):[]},string:function(u){return n(u)},"number | BigNumber":function(u){return f(u,u,t.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, string":function(u,p){return f(u,u,p)},"number | BigNumber, number | BigNumber":function(u,p){return f(u,p,t.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, number | BigNumber, string":function(u,p,h){return f(u,p,h)},Array:function(u){return l(u)},"Array, string":function(u,p){return l(u,p)},Matrix:function(u){return l(u.valueOf(),u.storage())},"Matrix, string":function(u,p){return l(u.valueOf(),p)}});function l(o,u){switch(o.length){case 0:return u?n(u):[];case 1:return f(o[0],o[0],u);case 2:return f(o[0],o[1],u);default:throw new Error("Vector containing two values expected")}}function f(o,u,p){var h=je(o)||je(u)?i:null;if(je(o)&&(o=o.toNumber()),je(u)&&(u=u.toNumber()),!He(o)||o<1)throw new Error("Parameters in function identity must be positive integers");if(!He(u)||u<1)throw new Error("Parameters in function identity must be positive integers");var d=h?new i(1):1,x=h?new h(0):0,v=[o,u];if(p){if(p==="sparse")return s.diagonal(v,d,0,x);if(p==="dense")return a.diagonal(v,d,0,x);throw new TypeError('Unknown matrix type "'.concat(p,'"'))}for(var y=Vi([],v,x),w=o{var{typed:r,matrix:t,multiplyScalar:n}=e;return r(Rw,{"Matrix, Matrix":function(s,l){return t(i(s.toArray(),l.toArray()))},"Matrix, Array":function(s,l){return t(i(s.toArray(),l))},"Array, Matrix":function(s,l){return t(i(s,l.toArray()))},"Array, Array":i});function i(a,s){if(or(a).length===1&&(a=[a]),or(s).length===1&&(s=[s]),or(a).length>2||or(s).length>2)throw new RangeError("Vectors with dimensions greater then 2 are not supported expected (Size x = "+JSON.stringify(a.length)+", y = "+JSON.stringify(s.length)+")");var l=[],f=[];return a.map(function(o){return s.map(function(u){return f=[],l.push(f),o.map(function(p){return u.map(function(h){return f.push(n(p,h))})})})})&&l}});var qw="map",hL=["typed"],Uw=T(qw,hL,e=>{var{typed:r}=e;return r(qw,{"Array, function":dL,"Matrix, function":function(n,i){return n.map(i)}})});function dL(e,r){var t=function n(i,a){return Array.isArray(i)?i.map(function(s,l){return n(s,a.concat(l))}):gi(r,i,a,e,"map")};return t(e,[])}var zw="diff",vL=["typed","matrix","subtract","number"],Qc=T(zw,vL,e=>{var{typed:r,matrix:t,subtract:n,number:i}=e;return r(zw,{"Array | Matrix":function(u){return Ge(u)?t(s(u.toArray())):s(u)},"Array | Matrix, number":function(u,p){if(!He(p))throw new RangeError("Dimension must be a whole number");return Ge(u)?t(a(u.toArray(),p)):a(u,p)},"Array, BigNumber":r.referTo("Array,number",o=>(u,p)=>o(u,i(p))),"Matrix, BigNumber":r.referTo("Matrix,number",o=>(u,p)=>o(u,i(p)))});function a(o,u){if(Ge(o)&&(o=o.toArray()),!Array.isArray(o))throw RangeError("Array/Matrix does not have that many dimensions");if(u>0){var p=[];return o.forEach(h=>{p.push(a(h,u-1))}),p}else{if(u===0)return s(o);throw RangeError("Cannot have negative dimension")}}function s(o){for(var u=[],p=o.length,h=1;h{var{typed:r,config:t,matrix:n,BigNumber:i}=e;return r("ones",{"":function(){return t.matrix==="Array"?a([]):a([],"default")},"...number | BigNumber | string":function(o){var u=o[o.length-1];if(typeof u=="string"){var p=o.pop();return a(o,p)}else return t.matrix==="Array"?a(o):a(o,"default")},Array:a,Matrix:function(o){var u=o.storage();return a(o.valueOf(),u)},"Array | Matrix, string":function(o,u){return a(o.valueOf(),u)}});function a(f,o){var u=s(f),p=u?new i(1):1;if(l(f),o){var h=n(o);return f.length>0?h.resize(f,p):h}else{var d=[];return f.length>0?Vi(d,f,p):d}}function s(f){var o=!1;return f.forEach(function(u,p,h){je(u)&&(o=!0,h[p]=u.toNumber())}),o}function l(f){f.forEach(function(o){if(typeof o!="number"||!He(o)||o<0)throw new Error("Parameters in function ones must be positive integers")})}});function fu(){throw new Error('No "bignumber" implementation available')}function Xc(){throw new Error('No "fraction" implementation available')}function Jc(){throw new Error('No "matrix" implementation available')}var Vw="range",yL=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq","add","isPositive"],Kc=T(Vw,yL,e=>{var{typed:r,config:t,matrix:n,bignumber:i,smaller:a,smallerEq:s,larger:l,largerEq:f,add:o,isPositive:u}=e;return r(Vw,{string:h,"string, boolean":h,"number, number":function(y,w){return p(d(y,w,1,!1))},"number, number, number":function(y,w,C){return p(d(y,w,C,!1))},"number, number, boolean":function(y,w,C){return p(d(y,w,1,C))},"number, number, number, boolean":function(y,w,C,b){return p(d(y,w,C,b))},"BigNumber, BigNumber":function(y,w){var C=y.constructor;return p(d(y,w,new C(1),!1))},"BigNumber, BigNumber, BigNumber":function(y,w,C){return p(d(y,w,C,!1))},"BigNumber, BigNumber, boolean":function(y,w,C){var b=y.constructor;return p(d(y,w,new b(1),C))},"BigNumber, BigNumber, BigNumber, boolean":function(y,w,C,b){return p(d(y,w,C,b))},"Unit, Unit, Unit":function(y,w,C){return p(d(y,w,C,!1))},"Unit, Unit, Unit, boolean":function(y,w,C,b){return p(d(y,w,C,b))}});function p(v){return t.matrix==="Matrix"?n?n(v):Jc():v}function h(v,y){var w=x(v);if(!w)throw new SyntaxError('String "'+v+'" is no valid range');return t.number==="BigNumber"?(i===void 0&&fu(),p(d(i(w.start),i(w.end),i(w.step)),y)):p(d(w.start,w.end,w.step,y))}function d(v,y,w,C){for(var b=[],A=u(w)?C?s:a:C?f:l,E=v;A(E,y);)b.push(E),E=o(E,w);return b}function x(v){var y=v.split(":"),w=y.map(function(b){return Number(b)}),C=w.some(function(b){return isNaN(b)});if(C)return null;switch(w.length){case 2:return{start:w[0],end:w[1],step:1};case 3:return{start:w[0],end:w[2],step:w[1]};default:return null}}});var Yw="reshape",bL=["typed","isInteger","matrix"],Hw=T(Yw,bL,e=>{var{typed:r,isInteger:t}=e;return r(Yw,{"Matrix, Array":function(i,a){return i.reshape(a,!0)},"Array, Array":function(i,a){return a.forEach(function(s){if(!t(s))throw new TypeError("Invalid size for dimension: "+s)}),gf(i,a)}})});var wL="resize",DL=["config","matrix"],Gw=T(wL,DL,e=>{var{config:r,matrix:t}=e;return function(a,s,l){if(arguments.length!==2&&arguments.length!==3)throw new jn("resize",arguments.length,2,3);if(Ge(s)&&(s=s.valueOf()),je(s[0])&&(s=s.map(function(u){return je(u)?u.toNumber():u})),Ge(a))return a.resize(s,l,!0);if(typeof a=="string")return n(a,s,l);var f=Array.isArray(a)?!1:r.matrix!=="Array";if(s.length===0){for(;Array.isArray(a);)a=a[0];return tr(a)}else{Array.isArray(a)||(a=[a]),a=tr(a);var o=Vi(a,s,l);return f?t(o):o}};function n(i,a,s){if(s!==void 0){if(typeof s!="string"||s.length!==1)throw new TypeError("Single character expected as defaultValue")}else s=" ";if(a.length!==1)throw new pr(a.length,1);var l=a[0];if(typeof l!="number"||!He(l))throw new TypeError("Invalid size, must contain positive integers (size: "+lr(a)+")");if(i.length>l)return i.substring(0,l);if(i.length{var{typed:r,multiply:t,rotationMatrix:n}=e;return r($w,{"Array , number | BigNumber | Complex | Unit":function(s,l){i(s,2);var f=t(n(l),s);return f.toArray()},"Matrix , number | BigNumber | Complex | Unit":function(s,l){return i(s,2),t(n(l),s)},"Array, number | BigNumber | Complex | Unit, Array | Matrix":function(s,l,f){i(s,3);var o=t(n(l,f),s);return o},"Matrix, number | BigNumber | Complex | Unit, Array | Matrix":function(s,l,f){return i(s,3),t(n(l,f),s)}});function i(a,s){var l=Array.isArray(a)?or(a):a.size();if(l.length>2)throw new RangeError("Vector must be of dimensions 1x".concat(s));if(l.length===2&&l[1]!==1)throw new RangeError("Vector must be of dimensions 1x".concat(s));if(l[0]!==s)throw new RangeError("Vector must be of dimensions 1x".concat(s))}});var Qw="rotationMatrix",NL=["typed","config","multiplyScalar","addScalar","unaryMinus","norm","matrix","BigNumber","DenseMatrix","SparseMatrix","cos","sin"],Xw=T(Qw,NL,e=>{var{typed:r,config:t,multiplyScalar:n,addScalar:i,unaryMinus:a,norm:s,BigNumber:l,matrix:f,DenseMatrix:o,SparseMatrix:u,cos:p,sin:h}=e;return r(Qw,{"":function(){return t.matrix==="Matrix"?f([]):[]},string:function(b){return f(b)},"number | BigNumber | Complex | Unit":function(b){return d(b,t.matrix==="Matrix"?"dense":void 0)},"number | BigNumber | Complex | Unit, string":function(b,A){return d(b,A)},"number | BigNumber | Complex | Unit, Array":function(b,A){var E=f(A);return x(E),w(b,E,void 0)},"number | BigNumber | Complex | Unit, Matrix":function(b,A){x(A);var E=A.storage()||(t.matrix==="Matrix"?"dense":void 0);return w(b,A,E)},"number | BigNumber | Complex | Unit, Array, string":function(b,A,E){var S=f(A);return x(S),w(b,S,E)},"number | BigNumber | Complex | Unit, Matrix, string":function(b,A,E){return x(A),w(b,A,E)}});function d(C,b){var A=je(C),E=A?new l(-1):-1,S=p(C),O=h(C),F=[[S,n(E,O)],[O,S]];return y(F,b)}function x(C){var b=C.size();if(b.length<1||b[0]!==3)throw new RangeError("Vector must be of dimensions 1x3")}function v(C){return C.reduce((b,A)=>n(b,A))}function y(C,b){if(b){if(b==="sparse")return new u(C);if(b==="dense")return new o(C);throw new TypeError('Unknown matrix type "'.concat(b,'"'))}return C}function w(C,b,A){var E=s(b);if(E===0)throw new RangeError("Rotation around zero vector");var S=je(C)?l:null,O=S?new S(1):1,F=S?new S(-1):-1,M=S?new S(b.get([0])/E):b.get([0])/E,_=S?new S(b.get([1])/E):b.get([1])/E,k=S?new S(b.get([2])/E):b.get([2])/E,L=p(C),Y=i(O,a(L)),$=h(C),V=i(L,v([M,M,Y])),q=i(v([M,_,Y]),v([F,k,$])),R=i(v([M,k,Y]),v([_,$])),j=i(v([M,_,Y]),v([k,$])),U=i(L,v([_,_,Y])),oe=i(v([_,k,Y]),v([F,M,$])),me=i(v([M,k,Y]),v([F,_,$])),ie=i(v([_,k,Y]),v([M,$])),H=i(L,v([k,k,Y])),ce=[[V,q,R],[j,U,oe],[me,ie,H]];return y(ce,A)}});var Jw="row",AL=["typed","Index","matrix","range"],jc=T(Jw,AL,e=>{var{typed:r,Index:t,matrix:n,range:i}=e;return r(Jw,{"Matrix, number":a,"Array, number":function(l,f){return a(n(tr(l)),f).valueOf()}});function a(s,l){if(s.size().length!==2)throw new Error("Only two dimensional matrix is supported");Xr(l,s.size()[0]);var f=i(0,s.size()[1]),o=new t(l,f),u=s.subset(o);return Ge(u)?u:n([[u]])}});var Kw="size",EL=["typed","config","?matrix"],jw=T(Kw,EL,e=>{var{typed:r,config:t,matrix:n}=e;return r(Kw,{Matrix:function(a){return a.create(a.size())},Array:or,string:function(a){return t.matrix==="Array"?[a.length]:n([a.length])},"number | Complex | BigNumber | Unit | boolean | null":function(a){return t.matrix==="Array"?[]:n?n([]):Jc()}})});var eD="squeeze",CL=["typed","matrix"],rD=T(eD,CL,e=>{var{typed:r,matrix:t}=e;return r(eD,{Array:function(i){return Js(tr(i))},Matrix:function(i){var a=Js(i.toArray());return Array.isArray(a)?t(a):a},any:function(i){return tr(i)}})});var tD="subset",ML=["typed","matrix","zeros","add"],ep=T(tD,ML,e=>{var{typed:r,matrix:t,zeros:n,add:i}=e;return r(tD,{"Matrix, Index":function(l,f){return jo(f)?t():(vf(l,f),l.subset(f))},"Array, Index":r.referTo("Matrix, Index",function(s){return function(l,f){var o=s(t(l),f);return f.isScalar()?o:o.valueOf()}}),"Object, Index":TL,"string, Index":_L,"Matrix, Index, any, any":function(l,f,o,u){return jo(f)?l:(vf(l,f),l.clone().subset(f,a(o,f),u))},"Array, Index, any, any":r.referTo("Matrix, Index, any, any",function(s){return function(l,f,o,u){var p=s(t(l),f,o,u);return p.isMatrix?p.valueOf():p}}),"Array, Index, any":r.referTo("Matrix, Index, any, any",function(s){return function(l,f,o){return s(t(l),f,o,void 0).valueOf()}}),"Matrix, Index, any":r.referTo("Matrix, Index, any, any",function(s){return function(l,f,o){return s(l,f,o,void 0)}}),"string, Index, string":nD,"string, Index, string, string":nD,"Object, Index, any":FL});function a(s,l){if(typeof s=="string")throw new Error("can't boradcast a string");if(l._isScalar)return s;var f=l.size();if(f.every(o=>o>0))try{return i(s,n(f))}catch{return s}else return s}});function _L(e,r){if(!ua(r))throw new TypeError("Index expected");if(jo(r))return"";if(vf(Array.from(e),r),r.size().length!==1)throw new pr(r.size().length,1);var t=e.length;Xr(r.min()[0],t),Xr(r.max()[0],t);var n=r.dimension(0),i="";return n.forEach(function(a){i+=e.charAt(a)}),i}function nD(e,r,t,n){if(!r||r.isIndex!==!0)throw new TypeError("Index expected");if(jo(r))return e;if(vf(Array.from(e),r),r.size().length!==1)throw new pr(r.size().length,1);if(n!==void 0){if(typeof n!="string"||n.length!==1)throw new TypeError("Single character expected as defaultValue")}else n=" ";var i=r.dimension(0),a=i.size()[0];if(a!==t.length)throw new pr(i.size()[0],t.length);var s=e.length;Xr(r.min()[0]),Xr(r.max()[0]);for(var l=[],f=0;fs)for(var o=s-1,u=l.length;o{var{typed:r,matrix:t}=e;return r(iD,{Array:s=>n(t(s)).valueOf(),Matrix:n,any:tr});function n(s){var l=s.size(),f;switch(l.length){case 1:f=s.clone();break;case 2:{var o=l[0],u=l[1];if(u===0)throw new RangeError("Cannot transpose a 2D matrix with no columns (size: "+lr(l)+")");switch(s.storage()){case"dense":f=i(s,o,u);break;case"sparse":f=a(s,o,u);break}}break;default:throw new RangeError("Matrix must be a vector or two dimensional (size: "+lr(l)+")")}return f}function i(s,l,f){for(var o=s._data,u=[],p,h=0;h{var{typed:r,transpose:t,conj:n}=e;return r(oD,{any:function(a){return n(t(a))}})});var uD="zeros",IL=["typed","config","matrix","BigNumber"],fD=T(uD,IL,e=>{var{typed:r,config:t,matrix:n,BigNumber:i}=e;return r(uD,{"":function(){return t.matrix==="Array"?a([]):a([],"default")},"...number | BigNumber | string":function(o){var u=o[o.length-1];if(typeof u=="string"){var p=o.pop();return a(o,p)}else return t.matrix==="Array"?a(o):a(o,"default")},Array:a,Matrix:function(o){var u=o.storage();return a(o.valueOf(),u)},"Array | Matrix, string":function(o,u){return a(o.valueOf(),u)}});function a(f,o){var u=s(f),p=u?new i(0):0;if(l(f),o){var h=n(o);return f.length>0?h.resize(f,p):h}else{var d=[];return f.length>0?Vi(d,f,p):d}}function s(f){var o=!1;return f.forEach(function(u,p,h){je(u)&&(o=!0,h[p]=u.toNumber())}),o}function l(f){f.forEach(function(o){if(typeof o!="number"||!He(o)||o<0)throw new Error("Parameters in function zeros must be positive integers")})}});var lD="fft",PL=["typed","matrix","addScalar","multiplyScalar","divideScalar","exp","tau","i","dotDivide","conj","pow","ceil","log2"],cD=T(lD,PL,e=>{var{typed:r,matrix:t,addScalar:n,multiplyScalar:i,divideScalar:a,exp:s,tau:l,i:f,dotDivide:o,conj:u,pow:p,ceil:h,log2:d}=e;return r(lD,{Array:x,Matrix:function(b){return b.create(x(b.toArray()))}});function x(C){var b=or(C);return b.length===1?w(C,b[0]):v(C.map(A=>x(A,b.slice(1))),0)}function v(C,b){var A=or(C);if(b!==0)return new Array(A[0]).fill(0).map((S,O)=>v(C[O],b-1));if(A.length===1)return w(C);function E(S){var O=or(S);return new Array(O[1]).fill(0).map((F,M)=>new Array(O[0]).fill(0).map((_,k)=>S[k][M]))}return E(v(E(C),1))}function y(C){for(var b=C.length,A=s(a(i(-1,i(f,l)),b)),E=[],S=1-b;Si(C[R],E[b-1+R])),...new Array(O-b).fill(0)],M=[...new Array(b+b-1).fill(0).map((q,R)=>a(1,E[R])),...new Array(O-(b+b-1)).fill(0)],_=w(F),k=w(M),L=new Array(O).fill(0).map((q,R)=>i(_[R],k[R])),Y=o(u(x(u(L))),O),$=[],V=b-1;VM%2===0),b/2),...w(C.filter((F,M)=>M%2===1),b/2)],E=0;E{var{typed:r,fft:t,dotDivide:n,conj:i}=e;return r(pD,{"Array | Matrix":function(s){var l=Ge(s)?s.size():or(s);return n(i(t(i(s))),l.reduce((f,o)=>f*o,1))}})});function hD(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function RL(e){for(var r=1;r{var{typed:r,add:t,subtract:n,multiply:i,divide:a,max:s,map:l,abs:f,isPositive:o,isNegative:u,larger:p,smaller:h,matrix:d,bignumber:x,unaryMinus:v}=e;function y(F){return function(M,_,k,L){var Y=!(_.length===2&&(_.every(S)||_.every(qt)));if(Y)throw new Error('"tspan" must be an Array of two numeric values or two units [tStart, tEnd]');var $=_[0],V=_[1],q=p(V,$),R=L.firstStep;if(R!==void 0&&!o(R))throw new Error('"firstStep" must be positive');var j=L.maxStep;if(j!==void 0&&!o(j))throw new Error('"maxStep" must be positive');var U=L.minStep;if(U&&u(U))throw new Error('"minStep" must be positive or zero');var oe=[$,V,R,U,j].filter(Le=>Le!==void 0);if(!(oe.every(S)||oe.every(qt)))throw new Error('Inconsistent type of "t" dependant variables');for(var me=1,ie=L.tol?L.tol:1e-4,H=L.minDelta?L.minDelta:.2,ce=L.maxDelta?L.maxDelta:5,Me=L.maxIter?L.maxIter:1e4,pe=[$,V,...k,j,U].some(je),[ge,Se,xe,be]=pe?[x(F.a),x(F.c),x(F.b),x(F.bp)]:[F.a,F.c,F.b,F.bp],De=R?q?R:v(R):a(n(V,$),me),Ae=[$],ze=[k],Ze=n(xe,be),K=0,te=0,ye=A(q),ee=E(q);ye(Ae[K],V);){var ne=[];De=ee(Ae[K],V,De),ne.push(M(Ae[K],ze[K]));for(var ue=1;ueqt(Le)?Le.value:Le)));Ee1/4&&(Ae.push(t(Ae[K],De)),ze.push(t(ze[K],i(De,xe,ne))),K++);var Ce=.84*(ie/Ee)**(1/5);if(h(Ce,H)?Ce=H:p(Ce,ce)&&(Ce=ce),Ce=pe?x(Ce):Ce,De=i(De,Ce),j&&p(f(De),j)?De=q?j:v(j):U&&h(f(De),U)&&(De=q?U:v(U)),te++,te>Me)throw new Error("Maximum number of iterations reached, try changing options")}return{t:Ae,y:ze}}}function w(F,M,_,k){var L=[[],[.5],[0,.75],[.2222222222222222,.3333333333333333,.4444444444444444]],Y=[null,1/2,3/4,1],$=[2/9,1/3,4/9,0],V=[7/24,1/4,1/3,1/8],q={a:L,c:Y,b:$,bp:V};return y(q)(F,M,_,k)}function C(F,M,_,k){var L=[[],[.2],[.075,.225],[.9777777777777777,-3.7333333333333334,3.5555555555555554],[2.9525986892242035,-11.595793324188385,9.822892851699436,-.2908093278463649],[2.8462752525252526,-10.757575757575758,8.906422717743473,.2784090909090909,-.2735313036020583],[.09114583333333333,0,.44923629829290207,.6510416666666666,-.322376179245283,.13095238095238096]],Y=[null,1/5,3/10,4/5,8/9,1,1],$=[35/384,0,500/1113,125/192,-2187/6784,11/84,0],V=[5179/57600,0,7571/16695,393/640,-92097/339200,187/2100,1/40],q={a:L,c:Y,b:$,bp:V};return y(q)(F,M,_,k)}function b(F,M,_,k){var L=k.method?k.method:"RK45",Y={RK23:w,RK45:C};if(L.toUpperCase()in Y){var $=RL({},k);return delete $.method,Y[L.toUpperCase()](F,M,_,$)}else{var V=Object.keys(Y).map(R=>'"'.concat(R,'"')),q="".concat(V.slice(0,-1).join(", ")," and ").concat(V.slice(-1));throw new Error('Unavailable method "'.concat(L,'". Available methods are ').concat(q))}}function A(F){return F?h:p}function E(F){var M=F?p:h;return function(_,k,L){var Y=t(_,L);return M(Y,k)?n(k,_):L}}function S(F){return je(F)||ar(F)}function O(F,M,_,k){var L=b(F,M.toArray(),_.toArray(),k);return{t:d(L.t),y:d(L.y)}}return r("solveODE",{"function, Array, Array, Object":b,"function, Matrix, Matrix, Object":O,"function, Array, Array":(F,M,_)=>b(F,M,_,{}),"function, Matrix, Matrix":(F,M,_)=>O(F,M,_,{}),"function, Array, number | BigNumber | Unit":(F,M,_)=>{var k=b(F,M,[_],{});return{t:k.t,y:k.y.map(L=>L[0])}},"function, Matrix, number | BigNumber | Unit":(F,M,_)=>{var k=b(F,M.toArray(),[_],{});return{t:d(k.t),y:d(k.y.map(L=>L[0]))}},"function, Array, number | BigNumber | Unit, Object":(F,M,_,k)=>{var L=b(F,M,[_],k);return{t:L.t,y:L.y.map(Y=>Y[0])}},"function, Matrix, number | BigNumber | Unit, Object":(F,M,_,k)=>{var L=b(F,M.toArray(),[_],k);return{t:d(L.t),y:d(L.y.map(Y=>Y[0]))}}})});var UL="erf",zL=["typed"],vD=T(UL,zL,e=>{var{typed:r}=e;return r("name",{number:function(s){var l=Math.abs(s);return l>=YL?hi(s):l<=WL?hi(s)*t(l):l<=4?hi(s)*(1-n(l)):hi(s)*(1-i(l))},"Array | Matrix":r.referToSelf(a=>s=>Je(s,a))});function t(a){var s=a*a,l=qa[0][4]*s,f=s,o;for(o=0;o<3;o+=1)l=(l+qa[0][o])*s,f=(f+lu[0][o])*s;return a*(l+qa[0][3])/(f+lu[0][3])}function n(a){var s=qa[1][8]*a,l=a,f;for(f=0;f<7;f+=1)s=(s+qa[1][f])*a,l=(l+lu[1][f])*a;var o=(s+qa[1][7])/(l+lu[1][7]),u=parseInt(a*16)/16,p=(a-u)*(a+u);return Math.exp(-u*u)*Math.exp(-p)*o}function i(a){var s=1/(a*a),l=qa[2][5]*s,f=s,o;for(o=0;o<4;o+=1)l=(l+qa[2][o])*s,f=(f+lu[2][o])*s;var u=s*(l+qa[2][4])/(f+lu[2][4]);u=(VL-u)/a,s=parseInt(a*16)/16;var p=(a-s)*(a+s);return Math.exp(-s*s)*Math.exp(-p)*u}}),WL=.46875,VL=.5641895835477563,qa=[[3.1611237438705655,113.86415415105016,377.485237685302,3209.3775891384694,.18577770618460315],[.5641884969886701,8.883149794388377,66.11919063714163,298.6351381974001,881.952221241769,1712.0476126340707,2051.0783778260716,1230.3393547979972,21531153547440383e-24],[.30532663496123236,.36034489994980445,.12578172611122926,.016083785148742275,.0006587491615298378,.016315387137302097]],lu=[[23.601290952344122,244.02463793444417,1282.6165260773723,2844.236833439171],[15.744926110709835,117.6939508913125,537.1811018620099,1621.3895745666903,3290.7992357334597,4362.619090143247,3439.3676741437216,1230.3393548037495],[2.568520192289822,1.8729528499234604,.5279051029514285,.06051834131244132,.0023352049762686918]],YL=Math.pow(2,53);var gD="zeta",HL=["typed","config","multiply","pow","divide","factorial","equal","smallerEq","isNegative","gamma","sin","subtract","add","?Complex","?BigNumber","pi"],xD=T(gD,HL,e=>{var{typed:r,config:t,multiply:n,pow:i,divide:a,factorial:s,equal:l,smallerEq:f,isNegative:o,gamma:u,sin:p,subtract:h,add:d,Complex:x,BigNumber:v,pi:y}=e;return r(gD,{number:S=>w(S,O=>O,()=>20),BigNumber:S=>w(S,O=>new v(O),()=>Math.abs(Math.log10(t.epsilon))),Complex:C});function w(S,O,F){return l(S,0)?O(-.5):l(S,1)?O(NaN):isFinite(S)?b(S,O,F,M=>M):o(S)?O(NaN):O(1)}function C(S){return S.re===0&&S.im===0?new x(-.5):S.re===1?new x(NaN,NaN):S.re===1/0&&S.im===0?new x(1):S.im===1/0||S.re===-1/0?new x(NaN,NaN):b(S,O=>O,O=>Math.round(1.3*15+.9*Math.abs(O.im)),O=>O.re)}function b(S,O,F,M){var _=F(S);if(M(S)>-(_-1)/2)return E(S,O(_),O);var k=n(i(2,S),i(O(y),h(S,1)));return k=n(k,p(n(a(O(y),2),S))),k=n(k,u(h(1,S))),n(k,b(h(1,S),O,F,M))}function A(S,O){for(var F=S,M=S;f(M,O);M=d(M,1)){var _=a(n(s(d(O,h(M,1))),i(4,M)),n(s(h(O,M)),s(n(2,M))));F=d(F,_)}return n(O,F)}function E(S,O,F){for(var M=a(1,n(A(F(0),O),h(1,i(2,h(1,S))))),_=F(0),k=F(1);f(k,O);k=d(k,1))_=d(_,a(n((-1)**(k-1),A(k,O)),i(k,S)));return n(M,_)}});var yD="mode",GL=["typed","isNaN","isNumeric"],bD=T(yD,GL,e=>{var{typed:r,isNaN:t,isNumeric:n}=e;return r(yD,{"Array | Matrix":i,"...":function(s){return i(s)}});function i(a){a=gr(a.valueOf());var s=a.length;if(s===0)throw new Error("Cannot calculate mode of an empty array");for(var l={},f=[],o=0,u=0;uo&&(o=l[p],f=[p])}return f}});function St(e,r,t){var n;return String(e).indexOf("Unexpected type")!==-1?(n=arguments.length>2?" (type: "+_r(t)+", value: "+JSON.stringify(t)+")":" (type: "+e.data.actual+")",new TypeError("Cannot calculate "+r+", unexpected type of argument"+n)):String(e).indexOf("complex numbers")!==-1?(n=arguments.length>2?" (type: "+_r(t)+", value: "+JSON.stringify(t)+")":"",new TypeError("Cannot calculate "+r+", no ordering relation is defined for complex numbers"+n)):e}var wD="prod",$L=["typed","config","multiplyScalar","numeric"],DD=T(wD,$L,e=>{var{typed:r,config:t,multiplyScalar:n,numeric:i}=e;return r(wD,{"Array | Matrix":a,"Array | Matrix, number | BigNumber":function(l,f){throw new Error("prod(A, dim) is not yet supported")},"...":function(l){return a(l)}});function a(s){var l;if(hn(s,function(f){try{l=l===void 0?f:n(l,f)}catch(o){throw St(o,"prod",f)}}),typeof l=="string"&&(l=i(l,t.number)),l===void 0)throw new Error("Cannot calculate prod of an empty array");return l}});var SD="format",ZL=["typed"],ND=T(SD,ZL,e=>{var{typed:r}=e;return r(SD,{any:lr,"any, Object | function | number | BigNumber":lr})});var AD="bin",QL=["typed","format"],ED=T(AD,QL,e=>{var{typed:r,format:t}=e;return r(AD,{"number | BigNumber":function(i){return t(i,{notation:"bin"})},"number | BigNumber, number | BigNumber":function(i,a){return t(i,{notation:"bin",wordSize:a})}})});var CD="oct",XL=["typed","format"],MD=T(CD,XL,e=>{var{typed:r,format:t}=e;return r(CD,{"number | BigNumber":function(i){return t(i,{notation:"oct"})},"number | BigNumber, number | BigNumber":function(i,a){return t(i,{notation:"oct",wordSize:a})}})});var _D="hex",JL=["typed","format"],TD=T(_D,JL,e=>{var{typed:r,format:t}=e;return r(_D,{"number | BigNumber":function(i){return t(i,{notation:"hex"})},"number | BigNumber, number | BigNumber":function(i,a){return t(i,{notation:"hex",wordSize:a})}})});var rp=/\\$([\\w.]+)/g;var FD="print",KL=["typed"],tp=T(FD,KL,e=>{var{typed:r}=e;return r(FD,{"string, Object | Array":OD,"string, Object | Array, number | Object":OD})});function OD(e,r,t){return e.replace(rp,function(n,i){var a=i.split("."),s=r[a.shift()];for(s!==void 0&&s.isMatrix&&(s=s.toArray());a.length&&s!==void 0;){var l=a.shift();s=l?s[l]:s+"."}return s!==void 0?yt(s)?s:lr(s,t):n})}var BD="to",jL=["typed","matrix","concat"],ID=T(BD,jL,e=>{var{typed:r,matrix:t,concat:n}=e,i=vr({typed:r,matrix:t,concat:n});return r(BD,{"Unit, Unit | string":(a,s)=>a.to(s)},i({Ds:!0}))});var PD="isPrime",eq=["typed"],kD=T(PD,eq,e=>{var{typed:r}=e;return r(PD,{number:function(n){if(n*0!==0)return!1;if(n<=3)return n>1;if(n%2===0||n%3===0)return!1;for(var i=5;i*i<=n;i+=6)if(n%i===0||n%(i+2)===0)return!1;return!0},BigNumber:function(n){if(n.toNumber()*0!==0)return!1;if(n.lte(3))return n.gt(1);if(n.mod(2).eq(0)||n.mod(3).eq(0))return!1;if(n.lt(Math.pow(2,32))){for(var i=n.toNumber(),a=5;a*a<=i;a+=6)if(i%a===0||i%(a+2)===0)return!1;return!0}function s(C,b,A){for(var E=1;!b.eq(0);)b.mod(2).eq(0)?(b=b.div(2),C=C.mul(C).mod(A)):(b=b.sub(1),E=C.mul(E).mod(A));return E}var l=n.constructor.clone({precision:n.toFixed(0).length*2});n=new l(n);for(var f=0,o=n.sub(1);o.mod(2).eq(0);)o=o.div(2),f+=1;var u=null;if(n.lt("3317044064679887385961981"))u=[2,3,5,7,11,13,17,19,23,29,31,37,41].filter(C=>Cn=>Je(n,t))})});var rq="numeric",tq=["number","?bignumber","?fraction"],RD=T(rq,tq,e=>{var{number:r,bignumber:t,fraction:n}=e,i={string:!0,number:!0,BigNumber:!0,Fraction:!0},a={number:s=>r(s),BigNumber:t?s=>t(s):fu,Fraction:n?s=>n(s):Xc};return function(l){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"number",o=arguments.length>2?arguments[2]:void 0;if(o!==void 0)throw new SyntaxError("numeric() takes one or two arguments");var u=_r(l);if(!(u in i))throw new TypeError("Cannot convert "+l+' of type "'+u+'"; valid input types are '+Object.keys(i).join(", "));if(!(f in a))throw new TypeError("Cannot convert "+l+' to type "'+f+'"; valid output types are '+Object.keys(a).join(", "));return f===u?l:a[f](l)}});var LD="divideScalar",nq=["typed","numeric"],qD=T(LD,nq,e=>{var{typed:r,numeric:t}=e;return r(LD,{"number, number":function(i,a){return i/a},"Complex, Complex":function(i,a){return i.div(a)},"BigNumber, BigNumber":function(i,a){return i.div(a)},"Fraction, Fraction":function(i,a){return i.div(a)},"Unit, number | Complex | Fraction | BigNumber | Unit":(n,i)=>n.divide(i),"number | Fraction | Complex | BigNumber, Unit":(n,i)=>i.divideInto(n)})});var UD="pow",iq=["typed","config","identity","multiply","matrix","inv","fraction","number","Complex"],zD=T(UD,iq,e=>{var{typed:r,config:t,identity:n,multiply:i,matrix:a,inv:s,number:l,fraction:f,Complex:o}=e;return r(UD,{"number, number":u,"Complex, Complex":function(x,v){return x.pow(v)},"BigNumber, BigNumber":function(x,v){return v.isInteger()||x>=0||t.predictable?x.pow(v):new o(x.toNumber(),0).pow(v.toNumber(),0)},"Fraction, Fraction":function(x,v){var y=x.pow(v);if(y!=null)return y;if(t.predictable)throw new Error("Result of pow is non-rational and cannot be expressed as a fraction");return u(x.valueOf(),v.valueOf())},"Array, number":p,"Array, BigNumber":function(x,v){return p(x,v.toNumber())},"Matrix, number":h,"Matrix, BigNumber":function(x,v){return h(x,v.toNumber())},"Unit, number | BigNumber":function(x,v){return x.pow(v)}});function u(d,x){if(t.predictable&&!He(x)&&d<0)try{var v=f(x),y=l(v);if((x===y||Math.abs((x-y)/x)<1e-14)&&v.d%2===1)return(v.n%2===0?1:-1)*Math.pow(-d,x)}catch{}return t.predictable&&(d<-1&&x===1/0||d>-1&&d<0&&x===-1/0)?NaN:He(x)||d>=0||t.predictable?Nv(d,x):d*d<1&&x===1/0||d*d>1&&x===-1/0?0:new o(d,0).pow(x,0)}function p(d,x){if(!He(x))throw new TypeError("For A^b, b must be an integer (value is "+x+")");var v=or(d);if(v.length!==2)throw new Error("For A^b, A must be 2 dimensional (A has "+v.length+" dimensions)");if(v[0]!==v[1])throw new Error("For A^b, A must be square (size is "+v[0]+"x"+v[1]+")");if(x<0)try{return p(s(d),-x)}catch(C){throw C.message==="Cannot calculate inverse, determinant is zero"?new TypeError("For A^b, when A is not invertible, b must be a positive integer (value is "+x+")"):C}for(var y=n(v[0]).valueOf(),w=d;x>=1;)(x&1)===1&&(y=i(w,y)),x>>=1,w=i(w,w);return y}function h(d,x){return a(p(d.valueOf(),x))}});var cu="Number of decimals in function round must be an integer",WD="round",aq=["typed","config","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],VD=T(WD,aq,e=>{var{typed:r,config:t,matrix:n,equalScalar:i,zeros:a,BigNumber:s,DenseMatrix:l}=e,f=Jr({typed:r,equalScalar:i}),o=Lr({typed:r,DenseMatrix:l}),u=Bt({typed:r});function p(h){return Math.abs(Xs(h).exponent)}return r(WD,{number:function(d){var x=iu(d,p(t.epsilon)),v=wt(d,x,t.epsilon)?x:d;return iu(v)},"number, number":function(d,x){var v=p(t.epsilon);if(x>=v)return iu(d,x);var y=iu(d,v),w=wt(d,y,t.epsilon)?y:d;return iu(w,x)},"number, BigNumber":function(d,x){if(!x.isInteger())throw new TypeError(cu);return new s(d).toDecimalPlaces(x.toNumber())},Complex:function(d){return d.round()},"Complex, number":function(d,x){if(x%1)throw new TypeError(cu);return d.round(x)},"Complex, BigNumber":function(d,x){if(!x.isInteger())throw new TypeError(cu);var v=x.toNumber();return d.round(v)},BigNumber:function(d){var x=new s(d).toDecimalPlaces(p(t.epsilon)),v=Ut(d,x,t.epsilon)?x:d;return v.toDecimalPlaces(0)},"BigNumber, BigNumber":function(d,x){if(!x.isInteger())throw new TypeError(cu);var v=p(t.epsilon);if(x>=v)return d.toDecimalPlaces(x.toNumber());var y=d.toDecimalPlaces(v),w=Ut(d,y,t.epsilon)?y:d;return w.toDecimalPlaces(x.toNumber())},Fraction:function(d){return d.round()},"Fraction, number":function(d,x){if(x%1)throw new TypeError(cu);return d.round(x)},"Fraction, BigNumber":function(d,x){if(!x.isInteger())throw new TypeError(cu);return d.round(x.toNumber())},"Unit, number, Unit":r.referToSelf(h=>function(d,x,v){var y=d.toNumeric(v);return v.multiply(h(y,x))}),"Unit, BigNumber, Unit":r.referToSelf(h=>(d,x,v)=>h(d,x.toNumber(),v)),"Unit, Unit":r.referToSelf(h=>(d,x)=>h(d,0,x)),"Array | Matrix, number, Unit":r.referToSelf(h=>(d,x,v)=>Je(d,y=>h(y,x,v),!0)),"Array | Matrix, BigNumber, Unit":r.referToSelf(h=>(d,x,v)=>h(d,x.toNumber(),v)),"Array | Matrix, Unit":r.referToSelf(h=>(d,x)=>h(d,0,x)),"Array | Matrix":r.referToSelf(h=>d=>Je(d,h,!0)),"SparseMatrix, number | BigNumber":r.referToSelf(h=>(d,x)=>f(d,x,h,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(h=>(d,x)=>u(d,x,h,!1)),"Array, number | BigNumber":r.referToSelf(h=>(d,x)=>u(n(d),x,h,!1).valueOf()),"number | Complex | BigNumber | Fraction, SparseMatrix":r.referToSelf(h=>(d,x)=>i(d,0)?a(x.size(),x.storage()):o(x,d,h,!0)),"number | Complex | BigNumber | Fraction, DenseMatrix":r.referToSelf(h=>(d,x)=>i(d,0)?a(x.size(),x.storage()):u(x,d,h,!0)),"number | Complex | BigNumber | Fraction, Array":r.referToSelf(h=>(d,x)=>u(n(x),d,h,!0).valueOf())})});var YD="log",oq=["config","typed","divideScalar","Complex"],HD=T(YD,oq,e=>{var{typed:r,config:t,divideScalar:n,Complex:i}=e;return r(YD,{number:function(s){return s>=0||t.predictable?c1(s):new i(s,0).log()},Complex:function(s){return s.log()},BigNumber:function(s){return!s.isNegative()||t.predictable?s.ln():new i(s.toNumber(),0).log()},"any, any":r.referToSelf(a=>(s,l)=>n(a(s),a(l)))})});var GD="log1p",sq=["typed","config","divideScalar","log","Complex"],$D=T(GD,sq,e=>{var{typed:r,config:t,divideScalar:n,log:i,Complex:a}=e;return r(GD,{number:function(f){return f>=-1||t.predictable?xc(f):s(new a(f,0))},Complex:s,BigNumber:function(f){var o=f.plus(1);return!o.isNegative()||t.predictable?o.ln():s(new a(f.toNumber(),0))},"Array | Matrix":r.referToSelf(l=>f=>Je(f,l)),"any, any":r.referToSelf(l=>(f,o)=>n(l(f),i(o)))});function s(l){var f=l.re+1;return new a(Math.log(Math.sqrt(f*f+l.im*l.im)),Math.atan2(l.im,f))}});var ZD="nthRoots",uq=["config","typed","divideScalar","Complex"],QD=T(ZD,uq,e=>{var{typed:r,config:t,divideScalar:n,Complex:i}=e,a=[function(f){return new i(f,0)},function(f){return new i(0,f)},function(f){return new i(-f,0)},function(f){return new i(0,-f)}];function s(l,f){if(f<0)throw new Error("Root must be greater than zero");if(f===0)throw new Error("Root must be non-zero");if(f%1!==0)throw new Error("Root must be an integer");if(l===0||l.abs()===0)return[new i(0,0)];var o=typeof l=="number",u;(o||l.re===0||l.im===0)&&(o?u=2*+(l<0):l.im===0?u=2*+(l.re<0):u=2*+(l.im<0)+1);for(var p=l.arg(),h=l.abs(),d=[],x=Math.pow(h,1/f),v=0;v{var{typed:r,equalScalar:t,matrix:n,pow:i,DenseMatrix:a,concat:s}=e,l=ft({typed:r}),f=Vt({typed:r,DenseMatrix:a}),o=Jr({typed:r,equalScalar:t}),u=Lr({typed:r,DenseMatrix:a}),p=vr({typed:r,matrix:n,concat:s}),h={};for(var d in i.signatures)Object.prototype.hasOwnProperty.call(i.signatures,d)&&!d.includes("Matrix")&&!d.includes("Array")&&(h[d]=i.signatures[d]);var x=r(h);return r(XD,p({elop:x,SS:f,DS:l,Ss:o,sS:u}))});var KD="dotDivide",lq=["typed","matrix","equalScalar","divideScalar","DenseMatrix","concat"],jD=T(KD,lq,e=>{var{typed:r,matrix:t,equalScalar:n,divideScalar:i,DenseMatrix:a,concat:s}=e,l=It({typed:r,equalScalar:n}),f=ft({typed:r}),o=Vt({typed:r,DenseMatrix:a}),u=Jr({typed:r,equalScalar:n}),p=Lr({typed:r,DenseMatrix:a}),h=vr({typed:r,matrix:t,concat:s});return r(KD,h({elop:i,SS:o,DS:f,SD:l,Ss:u,sS:p}))});function ha(e){var{DenseMatrix:r}=e;return function(n,i,a){var s=n.size();if(s.length!==2)throw new RangeError("Matrix must be two dimensional (size: "+lr(s)+")");var l=s[0],f=s[1];if(l!==f)throw new RangeError("Matrix must be square (size: "+lr(s)+")");var o=[];if(Ge(i)){var u=i.size(),p=i._data;if(u.length===1){if(u[0]!==l)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var h=0;h{var{typed:r,matrix:t,divideScalar:n,multiplyScalar:i,subtractScalar:a,equalScalar:s,DenseMatrix:l}=e,f=ha({DenseMatrix:l});return r(eS,{"SparseMatrix, Array | Matrix":function(h,d){return u(h,d)},"DenseMatrix, Array | Matrix":function(h,d){return o(h,d)},"Array, Array | Matrix":function(h,d){var x=t(h),v=o(x,d);return v.valueOf()}});function o(p,h){h=f(p,h,!0);for(var d=h._data,x=p._size[0],v=p._size[1],y=[],w=p._data,C=0;CA&&(O.push(y[k]),F.push(L))}if(s(S,0))throw new Error("Linear system cannot be solved since matrix is singular");for(var Y=n(E,S),$=0,V=F.length;${var{typed:r,matrix:t,divideScalar:n,multiplyScalar:i,subtractScalar:a,equalScalar:s,DenseMatrix:l}=e,f=ha({DenseMatrix:l});return r(tS,{"SparseMatrix, Array | Matrix":function(h,d){return u(h,d)},"DenseMatrix, Array | Matrix":function(h,d){return o(h,d)},"Array, Array | Matrix":function(h,d){var x=t(h),v=o(x,d);return v.valueOf()}});function o(p,h){h=f(p,h,!0);for(var d=h._data,x=p._size[0],v=p._size[1],y=[],w=p._data,C=v-1;C>=0;C--){var b=d[C][0]||0,A=void 0;if(s(b,0))A=0;else{var E=w[C][C];if(s(E,0))throw new Error("Linear system cannot be solved since matrix is singular");A=n(b,E);for(var S=C-1;S>=0;S--)d[S]=[a(d[S][0]||0,i(A,w[S][C]))]}y[C]=[A]}return new l({data:y,size:[x,1]})}function u(p,h){h=f(p,h,!0);for(var d=h._data,x=p._size[0],v=p._size[1],y=p._values,w=p._index,C=p._ptr,b=[],A=v-1;A>=0;A--){var E=d[A][0]||0;if(s(E,0))b[A]=[0];else{for(var S=0,O=[],F=[],M=C[A],_=C[A+1],k=_-1;k>=M;k--){var L=w[k];L===A?S=y[k]:L{var{typed:r,matrix:t,divideScalar:n,multiplyScalar:i,subtractScalar:a,equalScalar:s,DenseMatrix:l}=e,f=ha({DenseMatrix:l});return r(iS,{"SparseMatrix, Array | Matrix":function(h,d){return u(h,d)},"DenseMatrix, Array | Matrix":function(h,d){return o(h,d)},"Array, Array | Matrix":function(h,d){var x=t(h),v=o(x,d);return v.map(y=>y.valueOf())}});function o(p,h){for(var d=[f(p,h,!0)._data.map(F=>F[0])],x=p._data,v=p._size[0],y=p._size[1],w=0;wnew l({data:F.map(M=>[M]),size:[v,1]}))}function u(p,h){for(var d=[f(p,h,!0)._data.map(me=>me[0])],x=p._size[0],v=p._size[1],y=p._values,w=p._index,C=p._ptr,b=0;bb&&(O.push(y[L]),F.push(Y))}if(s(k,0))if(s(S[b],0)){if(E===0){var R=[...S];R[b]=1;for(var j=0,U=F.length;jnew l({data:me.map(ie=>[ie]),size:[x,1]}))}});var oS="usolveAll",hq=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],sS=T(oS,hq,e=>{var{typed:r,matrix:t,divideScalar:n,multiplyScalar:i,subtractScalar:a,equalScalar:s,DenseMatrix:l}=e,f=ha({DenseMatrix:l});return r(oS,{"SparseMatrix, Array | Matrix":function(h,d){return u(h,d)},"DenseMatrix, Array | Matrix":function(h,d){return o(h,d)},"Array, Array | Matrix":function(h,d){var x=t(h),v=o(x,d);return v.map(y=>y.valueOf())}});function o(p,h){for(var d=[f(p,h,!0)._data.map(F=>F[0])],x=p._data,v=p._size[0],y=p._size[1],w=y-1;w>=0;w--)for(var C=d.length,b=0;b=0;O--)S[O]=a(S[O],x[O][w]);d.push(S)}}else{if(b===0)return[];d.splice(b,1),b-=1,C-=1}else{A[w]=n(A[w],x[w][w]);for(var E=w-1;E>=0;E--)A[E]=a(A[E],i(A[w],x[E][w]))}}return d.map(F=>new l({data:F.map(M=>[M]),size:[v,1]}))}function u(p,h){for(var d=[f(p,h,!0)._data.map(me=>me[0])],x=p._size[0],v=p._size[1],y=p._values,w=p._index,C=p._ptr,b=v-1;b>=0;b--)for(var A=d.length,E=0;E=M;L--){var Y=w[L];Y===b?k=y[L]:Ynew l({data:me.map(ie=>[ie]),size:[x,1]}))}});var dq="matAlgo08xS0Sid",vq=["typed","equalScalar"],pu=T(dq,vq,e=>{var{typed:r,equalScalar:t}=e;return function(i,a,s){var l=i._values,f=i._index,o=i._ptr,u=i._size,p=i._datatype||i._data===void 0?i._datatype:i.getDataType(),h=a._values,d=a._index,x=a._ptr,v=a._size,y=a._datatype||a._data===void 0?a._datatype:a.getDataType();if(u.length!==v.length)throw new pr(u.length,v.length);if(u[0]!==v[0]||u[1]!==v[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+v+")");if(!l||!h)throw new Error("Cannot perform operation on Pattern Sparse Matrices");var w=u[0],C=u[1],b,A=t,E=0,S=s;typeof p=="string"&&p===y&&p!=="mixed"&&(b=p,A=r.find(t,[b,b]),E=r.convert(0,b),S=r.find(s,[b,b]));for(var O=[],F=[],M=[],_=[],k=[],L,Y,$,V,q=0;q{var{typed:r,matrix:t}=e;return{"Array, number":r.referTo("DenseMatrix, number",n=>(i,a)=>n(t(i),a).valueOf()),"Array, BigNumber":r.referTo("DenseMatrix, BigNumber",n=>(i,a)=>n(t(i),a).valueOf()),"number, Array":r.referTo("number, DenseMatrix",n=>(i,a)=>n(i,t(a)).valueOf()),"BigNumber, Array":r.referTo("BigNumber, DenseMatrix",n=>(i,a)=>n(i,t(a)).valueOf())}});var uS="leftShift",gq=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],fS=T(uS,gq,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:i,DenseMatrix:a,concat:s}=e,l=dn({typed:r}),f=It({typed:r,equalScalar:n}),o=pu({typed:r,equalScalar:n}),u=Un({typed:r,DenseMatrix:a}),p=Jr({typed:r,equalScalar:n}),h=Bt({typed:r}),d=vr({typed:r,matrix:t,concat:s}),x=mu({typed:r,matrix:t});return r(uS,{"number, number":_v,"BigNumber, BigNumber":Kb,"SparseMatrix, number | BigNumber":r.referToSelf(v=>(y,w)=>n(w,0)?y.clone():p(y,w,v,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(v=>(y,w)=>n(w,0)?y.clone():h(y,w,v,!1)),"number | BigNumber, SparseMatrix":r.referToSelf(v=>(y,w)=>n(y,0)?i(w.size(),w.storage()):u(w,y,v,!0)),"number | BigNumber, DenseMatrix":r.referToSelf(v=>(y,w)=>n(y,0)?i(w.size(),w.storage()):h(w,y,v,!0))},x,d({SS:o,DS:l,SD:f}))});var lS="rightArithShift",xq=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],cS=T(lS,xq,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:i,DenseMatrix:a,concat:s}=e,l=dn({typed:r}),f=It({typed:r,equalScalar:n}),o=pu({typed:r,equalScalar:n}),u=Un({typed:r,DenseMatrix:a}),p=Jr({typed:r,equalScalar:n}),h=Bt({typed:r}),d=vr({typed:r,matrix:t,concat:s}),x=mu({typed:r,matrix:t});return r(lS,{"number, number":Tv,"BigNumber, BigNumber":jb,"SparseMatrix, number | BigNumber":r.referToSelf(v=>(y,w)=>n(w,0)?y.clone():p(y,w,v,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(v=>(y,w)=>n(w,0)?y.clone():h(y,w,v,!1)),"number | BigNumber, SparseMatrix":r.referToSelf(v=>(y,w)=>n(y,0)?i(w.size(),w.storage()):u(w,y,v,!0)),"number | BigNumber, DenseMatrix":r.referToSelf(v=>(y,w)=>n(y,0)?i(w.size(),w.storage()):h(w,y,v,!0))},x,d({SS:o,DS:l,SD:f}))});var pS="rightLogShift",yq=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],mS=T(pS,yq,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:i,DenseMatrix:a,concat:s}=e,l=dn({typed:r}),f=It({typed:r,equalScalar:n}),o=pu({typed:r,equalScalar:n}),u=Un({typed:r,DenseMatrix:a}),p=Jr({typed:r,equalScalar:n}),h=Bt({typed:r}),d=vr({typed:r,matrix:t,concat:s}),x=mu({typed:r,matrix:t});return r(pS,{"number, number":Fv,"SparseMatrix, number | BigNumber":r.referToSelf(v=>(y,w)=>n(w,0)?y.clone():p(y,w,v,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(v=>(y,w)=>n(w,0)?y.clone():h(y,w,v,!1)),"number | BigNumber, SparseMatrix":r.referToSelf(v=>(y,w)=>n(y,0)?i(w.size(),w.storage()):u(w,y,v,!0)),"number | BigNumber, DenseMatrix":r.referToSelf(v=>(y,w)=>n(y,0)?i(w.size(),w.storage()):h(w,y,v,!0))},x,d({SS:o,DS:l,SD:f}))});var hS="and",bq=["typed","matrix","equalScalar","zeros","not","concat"],np=T(hS,bq,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:i,not:a,concat:s}=e,l=It({typed:r,equalScalar:n}),f=No({typed:r,equalScalar:n}),o=Jr({typed:r,equalScalar:n}),u=Bt({typed:r}),p=vr({typed:r,matrix:t,concat:s});return r(hS,{"number, number":Rv,"Complex, Complex":function(d,x){return(d.re!==0||d.im!==0)&&(x.re!==0||x.im!==0)},"BigNumber, BigNumber":function(d,x){return!d.isZero()&&!x.isZero()&&!d.isNaN()&&!x.isNaN()},"Unit, Unit":r.referToSelf(h=>(d,x)=>h(d.value||0,x.value||0)),"SparseMatrix, any":r.referToSelf(h=>(d,x)=>a(x)?i(d.size(),d.storage()):o(d,x,h,!1)),"DenseMatrix, any":r.referToSelf(h=>(d,x)=>a(x)?i(d.size(),d.storage()):u(d,x,h,!1)),"any, SparseMatrix":r.referToSelf(h=>(d,x)=>a(d)?i(d.size(),d.storage()):o(x,d,h,!0)),"any, DenseMatrix":r.referToSelf(h=>(d,x)=>a(d)?i(d.size(),d.storage()):u(x,d,h,!0)),"Array, any":r.referToSelf(h=>(d,x)=>h(t(d),x).valueOf()),"any, Array":r.referToSelf(h=>(d,x)=>h(d,t(x)).valueOf())},p({SS:f,DS:l}))});var ip="compare",wq=["typed","config","matrix","equalScalar","BigNumber","Fraction","DenseMatrix","concat"],dS=T(ip,wq,e=>{var{typed:r,config:t,equalScalar:n,matrix:i,BigNumber:a,Fraction:s,DenseMatrix:l,concat:f}=e,o=ft({typed:r}),u=So({typed:r,equalScalar:n}),p=Lr({typed:r,DenseMatrix:l}),h=vr({typed:r,matrix:i,concat:f}),d=vi({typed:r});return r(ip,Dq({typed:r,config:t}),{"boolean, boolean":function(v,y){return v===y?0:v>y?1:-1},"BigNumber, BigNumber":function(v,y){return Ut(v,y,t.epsilon)?new a(0):new a(v.cmp(y))},"Fraction, Fraction":function(v,y){return new s(v.compare(y))},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},d,h({SS:u,DS:o,Ss:p}))}),Dq=T(ip,["typed","config"],e=>{var{typed:r,config:t}=e;return r(ip,{"number, number":function(i,a){return wt(i,a,t.epsilon)?0:i>a?1:-1}})});var as=ci(gS(),1);var xS="compareNatural",Sq=["typed","compare"],yS=T(xS,Sq,e=>{var{typed:r,compare:t}=e,n=t.signatures["boolean,boolean"];return r(xS,{"any, any":i});function i(f,o){var u=_r(f),p=_r(o),h;if((u==="number"||u==="BigNumber"||u==="Fraction")&&(p==="number"||p==="BigNumber"||p==="Fraction"))return h=t(f,o),h.toString()!=="0"?h>0?1:-1:(0,as.default)(u,p);var d=["Array","DenseMatrix","SparseMatrix"];if(d.includes(u)||d.includes(p))return h=a(i,f,o),h!==0?h:(0,as.default)(u,p);if(u!==p)return(0,as.default)(u,p);if(u==="Complex")return Nq(f,o);if(u==="Unit")return f.equalBase(o)?i(f.value,o.value):s(i,f.formatUnits(),o.formatUnits());if(u==="boolean")return n(f,o);if(u==="string")return(0,as.default)(f,o);if(u==="Object")return l(i,f,o);if(u==="null"||u==="undefined")return 0;throw new TypeError('Unsupported type of value "'+u+'"')}function a(f,o,u){return Jn(o)&&Jn(u)?s(f,o.toJSON().values,u.toJSON().values):Jn(o)?a(f,o.toArray(),u):Jn(u)?a(f,o,u.toArray()):Ia(o)?a(f,o.toJSON().data,u):Ia(u)?a(f,o,u.toJSON().data):Array.isArray(o)?Array.isArray(u)?s(f,o,u):a(f,o,[u]):a(f,[o],u)}function s(f,o,u){for(var p=0,h=Math.min(o.length,u.length);pu.length?1:o.lengthr.re?1:e.rer.im?1:e.im{var{typed:r,matrix:t,concat:n}=e,i=vr({typed:r,matrix:t,concat:n});return r(bS,Dc,i({elop:Dc,Ds:!0}))});var ap="equal",Eq=["typed","matrix","equalScalar","DenseMatrix","concat"],DS=T(ap,Eq,e=>{var{typed:r,matrix:t,equalScalar:n,DenseMatrix:i,concat:a}=e,s=ft({typed:r}),l=Vt({typed:r,DenseMatrix:i}),f=Lr({typed:r,DenseMatrix:i}),o=vr({typed:r,matrix:t,concat:a});return r(ap,Cq({typed:r,equalScalar:n}),o({elop:n,SS:l,DS:s,Ss:f}))}),Cq=T(ap,["typed","equalScalar"],e=>{var{typed:r,equalScalar:t}=e;return r(ap,{"any, any":function(i,a){return i===null?a===null:a===null?i===null:i===void 0?a===void 0:a===void 0?i===void 0:t(i,a)}})});var SS="equalText",Mq=["typed","compareText","isZero"],NS=T(SS,Mq,e=>{var{typed:r,compareText:t,isZero:n}=e;return r(SS,{"any, any":function(a,s){return n(t(a,s))}})});var op="smaller",_q=["typed","config","matrix","DenseMatrix","concat"],AS=T(op,_q,e=>{var{typed:r,config:t,matrix:n,DenseMatrix:i,concat:a}=e,s=ft({typed:r}),l=Vt({typed:r,DenseMatrix:i}),f=Lr({typed:r,DenseMatrix:i}),o=vr({typed:r,matrix:n,concat:a}),u=vi({typed:r});return r(op,Tq({typed:r,config:t}),{"boolean, boolean":(p,h)=>pp.compare(h)===-1,"Complex, Complex":function(h,d){throw new TypeError("No ordering relation is defined for complex numbers")}},u,o({SS:l,DS:s,Ss:f}))}),Tq=T(op,["typed","config"],e=>{var{typed:r,config:t}=e;return r(op,{"number, number":function(i,a){return i{var{typed:r,config:t,matrix:n,DenseMatrix:i,concat:a}=e,s=ft({typed:r}),l=Vt({typed:r,DenseMatrix:i}),f=Lr({typed:r,DenseMatrix:i}),o=vr({typed:r,matrix:n,concat:a}),u=vi({typed:r});return r(sp,Oq({typed:r,config:t}),{"boolean, boolean":(p,h)=>p<=h,"BigNumber, BigNumber":function(h,d){return h.lte(d)||Ut(h,d,t.epsilon)},"Fraction, Fraction":(p,h)=>p.compare(h)!==1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},u,o({SS:l,DS:s,Ss:f}))}),Oq=T(sp,["typed","config"],e=>{var{typed:r,config:t}=e;return r(sp,{"number, number":function(i,a){return i<=a||wt(i,a,t.epsilon)}})});var up="larger",Bq=["typed","config","matrix","DenseMatrix","concat"],CS=T(up,Bq,e=>{var{typed:r,config:t,matrix:n,DenseMatrix:i,concat:a}=e,s=ft({typed:r}),l=Vt({typed:r,DenseMatrix:i}),f=Lr({typed:r,DenseMatrix:i}),o=vr({typed:r,matrix:n,concat:a}),u=vi({typed:r});return r(up,Iq({typed:r,config:t}),{"boolean, boolean":(p,h)=>p>h,"BigNumber, BigNumber":function(h,d){return h.gt(d)&&!Ut(h,d,t.epsilon)},"Fraction, Fraction":(p,h)=>p.compare(h)===1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},u,o({SS:l,DS:s,Ss:f}))}),Iq=T(up,["typed","config"],e=>{var{typed:r,config:t}=e;return r(up,{"number, number":function(i,a){return i>a&&!wt(i,a,t.epsilon)}})});var fp="largerEq",Pq=["typed","config","matrix","DenseMatrix","concat"],MS=T(fp,Pq,e=>{var{typed:r,config:t,matrix:n,DenseMatrix:i,concat:a}=e,s=ft({typed:r}),l=Vt({typed:r,DenseMatrix:i}),f=Lr({typed:r,DenseMatrix:i}),o=vr({typed:r,matrix:n,concat:a}),u=vi({typed:r});return r(fp,kq({typed:r,config:t}),{"boolean, boolean":(p,h)=>p>=h,"BigNumber, BigNumber":function(h,d){return h.gte(d)||Ut(h,d,t.epsilon)},"Fraction, Fraction":(p,h)=>p.compare(h)!==-1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},u,o({SS:l,DS:s,Ss:f}))}),kq=T(fp,["typed","config"],e=>{var{typed:r,config:t}=e;return r(fp,{"number, number":function(i,a){return i>=a||wt(i,a,t.epsilon)}})});var _S="deepEqual",Rq=["typed","equal"],TS=T(_S,Rq,e=>{var{typed:r,equal:t}=e;return r(_S,{"any, any":function(a,s){return n(a.valueOf(),s.valueOf())}});function n(i,a){if(Array.isArray(i))if(Array.isArray(a)){var s=i.length;if(s!==a.length)return!1;for(var l=0;l{var{typed:r,config:t,equalScalar:n,matrix:i,DenseMatrix:a,concat:s}=e,l=ft({typed:r}),f=Vt({typed:r,DenseMatrix:a}),o=Lr({typed:r,DenseMatrix:a}),u=vr({typed:r,matrix:i,concat:s});return r(lp,qq({typed:r,equalScalar:n}),u({elop:p,SS:f,DS:l,Ss:o}));function p(h,d){return!n(h,d)}}),qq=T(lp,["typed","equalScalar"],e=>{var{typed:r,equalScalar:t}=e;return r(lp,{"any, any":function(i,a){return i===null?a!==null:a===null?i!==null:i===void 0?a!==void 0:a===void 0?i!==void 0:!t(i,a)}})});var OS="partitionSelect",Uq=["typed","isNumeric","isNaN","compare"],BS=T(OS,Uq,e=>{var{typed:r,isNumeric:t,isNaN:n,compare:i}=e,a=i,s=(o,u)=>-i(o,u);return r(OS,{"Array | Matrix, number":function(u,p){return l(u,p,a)},"Array | Matrix, number, string":function(u,p,h){if(h==="asc")return l(u,p,a);if(h==="desc")return l(u,p,s);throw new Error('Compare string must be "asc" or "desc"')},"Array | Matrix, number, function":l});function l(o,u,p){if(!He(u)||u<0)throw new Error("k must be a non-negative integer");if(Ge(o)){var h=o.size();if(h.length>1)throw new Error("Only one dimensional matrices supported");return f(o.valueOf(),u,p)}if(Array.isArray(o))return f(o,u,p)}function f(o,u,p){if(u>=o.length)throw new Error("k out of bounds");for(var h=0;h=0){var C=o[y];o[y]=o[v],o[v]=C,--y}else++v;p(o[v],w)>0&&--v,u<=v?x=v:d=v+1}return o[u]}});var IS="sort",zq=["typed","matrix","compare","compareNatural"],PS=T(IS,zq,e=>{var{typed:r,matrix:t,compare:n,compareNatural:i}=e,a=n,s=(u,p)=>-n(u,p);return r(IS,{Array:function(p){return f(p),p.sort(a)},Matrix:function(p){return o(p),t(p.toArray().sort(a),p.storage())},"Array, function":function(p,h){return f(p),p.sort(h)},"Matrix, function":function(p,h){return o(p),t(p.toArray().sort(h),p.storage())},"Array, string":function(p,h){return f(p),p.sort(l(h))},"Matrix, string":function(p,h){return o(p),t(p.toArray().sort(l(h)),p.storage())}});function l(u){if(u==="asc")return a;if(u==="desc")return s;if(u==="natural")return i;throw new Error('String "asc", "desc", or "natural" expected')}function f(u){if(or(u).length!==1)throw new Error("One dimensional array expected")}function o(u){if(u.size().length!==1)throw new Error("One dimensional matrix expected")}});var kS="max",Wq=["typed","config","numeric","larger"],cp=T(kS,Wq,e=>{var{typed:r,config:t,numeric:n,larger:i}=e;return r(kS,{"Array | Matrix":s,"Array | Matrix, number | BigNumber":function(f,o){return Do(f,o.valueOf(),a)},"...":function(f){if(di(f))throw new TypeError("Scalar values expected in function max");return s(f)}});function a(l,f){try{return i(l,f)?l:f}catch(o){throw St(o,"max",f)}}function s(l){var f;if(hn(l,function(o){try{isNaN(o)&&typeof o=="number"?f=NaN:(f===void 0||i(o,f))&&(f=o)}catch(u){throw St(u,"max",o)}}),f===void 0)throw new Error("Cannot calculate max of an empty array");return typeof f=="string"&&(f=n(f,t.number)),f}});var RS="min",Vq=["typed","config","numeric","smaller"],pp=T(RS,Vq,e=>{var{typed:r,config:t,numeric:n,smaller:i}=e;return r(RS,{"Array | Matrix":s,"Array | Matrix, number | BigNumber":function(f,o){return Do(f,o.valueOf(),a)},"...":function(f){if(di(f))throw new TypeError("Scalar values expected in function min");return s(f)}});function a(l,f){try{return i(l,f)?l:f}catch(o){throw St(o,"min",f)}}function s(l){var f;if(hn(l,function(o){try{isNaN(o)&&typeof o=="number"?f=NaN:(f===void 0||i(o,f))&&(f=o)}catch(u){throw St(u,"min",o)}}),f===void 0)throw new Error("Cannot calculate min of an empty array");return typeof f=="string"&&(f=n(f,t.number)),f}});var Yq="ImmutableDenseMatrix",Hq=["smaller","DenseMatrix"],LS=T(Yq,Hq,e=>{var{smaller:r,DenseMatrix:t}=e;function n(i,a){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(a&&!yt(a))throw new Error("Invalid datatype: "+a);if(Ge(i)||Ar(i)){var s=new t(i,a);this._data=s._data,this._size=s._size,this._datatype=s._datatype,this._min=null,this._max=null}else if(i&&Ar(i.data)&&Ar(i.size))this._data=i.data,this._size=i.size,this._datatype=i.datatype,this._min=typeof i.min<"u"?i.min:null,this._max=typeof i.max<"u"?i.max:null;else{if(i)throw new TypeError("Unsupported type of data ("+_r(i)+")");this._data=[],this._size=[0],this._datatype=a,this._min=null,this._max=null}}return n.prototype=new t,n.prototype.type="ImmutableDenseMatrix",n.prototype.isImmutableDenseMatrix=!0,n.prototype.subset=function(i){switch(arguments.length){case 1:{var a=t.prototype.subset.call(this,i);return Ge(a)?new n({data:a._data,size:a._size,datatype:a._datatype}):a}case 2:case 3:throw new Error("Cannot invoke set subset on an Immutable Matrix instance");default:throw new SyntaxError("Wrong number of arguments")}},n.prototype.set=function(){throw new Error("Cannot invoke set on an Immutable Matrix instance")},n.prototype.resize=function(){throw new Error("Cannot invoke resize on an Immutable Matrix instance")},n.prototype.reshape=function(){throw new Error("Cannot invoke reshape on an Immutable Matrix instance")},n.prototype.clone=function(){return new n({data:tr(this._data),size:tr(this._size),datatype:this._datatype})},n.prototype.toJSON=function(){return{mathjs:"ImmutableDenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},n.fromJSON=function(i){return new n(i)},n.prototype.swapRows=function(){throw new Error("Cannot invoke swapRows on an Immutable Matrix instance")},n.prototype.min=function(){if(this._min===null){var i=null;this.forEach(function(a){(i===null||r(a,i))&&(i=a)}),this._min=i!==null?i:void 0}return this._min},n.prototype.max=function(){if(this._max===null){var i=null;this.forEach(function(a){(i===null||r(i,a))&&(i=a)}),this._max=i!==null?i:void 0}return this._max},n},{isClass:!0});var Gq="Index",$q=["ImmutableDenseMatrix","getMatrixDataType"],US=T(Gq,$q,e=>{var{ImmutableDenseMatrix:r,getMatrixDataType:t}=e;function n(a){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");this._dimensions=[],this._sourceSize=[],this._isScalar=!0;for(var s=0,l=arguments.length;s{t&&r.push(n)}),r}var Zq="FibonacciHeap",Qq=["smaller","larger"],zS=T(Zq,Qq,e=>{var{smaller:r,larger:t}=e,n=1/Math.log((1+Math.sqrt(5))/2);function i(){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");this._minimum=null,this._size=0}i.prototype.type="FibonacciHeap",i.prototype.isFibonacciHeap=!0,i.prototype.insert=function(u,p){var h={key:u,value:p,degree:0};if(this._minimum){var d=this._minimum;h.left=d,h.right=d.right,d.right=h,h.right.left=h,r(u,d.key)&&(this._minimum=h)}else h.left=h,h.right=h,this._minimum=h;return this._size++,h},i.prototype.size=function(){return this._size},i.prototype.clear=function(){this._minimum=null,this._size=0},i.prototype.isEmpty=function(){return this._size===0},i.prototype.extractMinimum=function(){var u=this._minimum;if(u===null)return u;for(var p=this._minimum,h=u.degree,d=u.child;h>0;){var x=d.right;d.left.right=d.right,d.right.left=d.left,d.left=p,d.right=p.right,p.right=d,d.right.left=d,d.parent=null,d=x,h--}return u.left.right=u.right,u.right.left=u.left,u===u.right?p=null:(p=u.right,p=o(p,this._size)),this._size--,this._minimum=p,u},i.prototype.remove=function(u){this._minimum=a(this._minimum,u,-1),this.extractMinimum()};function a(u,p,h){p.key=h;var d=p.parent;return d&&r(p.key,d.key)&&(s(u,p,d),l(u,d)),r(p.key,u.key)&&(u=p),u}function s(u,p,h){p.left.right=p.right,p.right.left=p.left,h.degree--,h.child===p&&(h.child=p.right),h.degree===0&&(h.child=null),p.left=u,p.right=u.right,u.right=p,p.right.left=p,p.parent=null,p.mark=!1}function l(u,p){var h=p.parent;!h||(p.mark?(s(u,p,h),l(h)):p.mark=!0)}var f=function(p,h){p.left.right=p.right,p.right.left=p.left,p.parent=h,h.child?(p.left=h.child,p.right=h.child.right,h.child.right=p,p.right.left=p):(h.child=p,p.right=p,p.left=p),h.degree++,p.mark=!1};function o(u,p){var h=Math.floor(Math.log(p)*n)+1,d=new Array(h),x=0,v=u;if(v)for(x++,v=v.right;v!==u;)x++,v=v.right;for(var y;x>0;){for(var w=v.degree,C=v.right;y=d[w],!!y;){if(t(v.key,y.key)){var b=y;y=v,v=b}f(y,v),d[w]=null,w++}d[w]=v,v=C,x--}u=null;for(var A=0;A{var{addScalar:r,equalScalar:t,FibonacciHeap:n}=e;function i(){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");this._values=[],this._heap=new n}return i.prototype.type="Spa",i.prototype.isSpa=!0,i.prototype.set=function(a,s){if(this._values[a])this._values[a].value=s;else{var l=this._heap.insert(a,s);this._values[a]=l}},i.prototype.get=function(a){var s=this._values[a];return s?s.value:0},i.prototype.accumulate=function(a,s){var l=this._values[a];l?l.value=r(l.value,s):(l=this._heap.insert(a,s),this._values[a]=l)},i.prototype.forEach=function(a,s,l){var f=this._heap,o=this._values,u=[],p=f.extractMinimum();for(p&&u.push(p);p&&p.key<=s;)p.key>=a&&(t(p.value,0)||l(p.key,p.value,this)),p=f.extractMinimum(),p&&u.push(p);for(var h=0;h{var{on:r,config:t,addScalar:n,subtractScalar:i,multiplyScalar:a,divideScalar:s,pow:l,abs:f,fix:o,round:u,equal:p,isNumeric:h,format:d,number:x,Complex:v,BigNumber:y,Fraction:w}=e,C=x;function b(K,te){if(!(this instanceof b))throw new Error("Constructor must be called with the new operator");if(!(K==null||h(K)||Gt(K)))throw new TypeError("First parameter in Unit constructor must be number, BigNumber, Fraction, Complex, or undefined");if(this.fixPrefix=!1,this.skipAutomaticSimplification=!0,te===void 0)this.units=[],this.dimensions=j.map(ee=>0);else if(typeof te=="string"){var ye=b.parse(te);this.units=ye.units,this.dimensions=ye.dimensions}else if(qt(te)&&te.value===null)this.fixPrefix=te.fixPrefix,this.skipAutomaticSimplification=te.skipAutomaticSimplification,this.dimensions=te.dimensions.slice(0),this.units=te.units.map(ee=>Mt({},ee));else throw new TypeError("Second parameter in Unit constructor must be a string or valueless Unit");this.value=this._normalize(K)}Object.defineProperty(b,"name",{value:"Unit"}),b.prototype.constructor=b,b.prototype.type="Unit",b.prototype.isUnit=!0;var A,E,S;function O(){for(;S===" "||S===" ";)_()}function F(K){return K>="0"&&K<="9"||K==="."}function M(K){return K>="0"&&K<="9"}function _(){E++,S=A.charAt(E)}function k(K){E=K,S=A.charAt(E)}function L(){var K="",te=E;if(S==="+"?_():S==="-"&&(K+=S,_()),!F(S))return k(te),null;if(S==="."){if(K+=S,_(),!M(S))return k(te),null}else{for(;M(S);)K+=S,_();S==="."&&(K+=S,_())}for(;M(S);)K+=S,_();if(S==="E"||S==="e"){var ye="",ee=E;if(ye+=S,_(),(S==="+"||S==="-")&&(ye+=S,_()),!M(S))return k(ee),K;for(K=K+ye;M(S);)K+=S,_()}return K}function Y(){for(var K="";M(S)||b.isValidAlpha(S);)K+=S,_();var te=K.charAt(0);return b.isValidAlpha(te)?K:null}function $(K){return S===K?(_(),K):null}b.parse=function(K,te){if(te=te||{},A=K,E=-1,S="",typeof A!="string")throw new TypeError("Invalid argument in Unit.parse, string expected");var ye=new b;ye.units=[];var ee=1,ne=!1;_(),O();var ue=L(),Ee=null;if(ue){if(t.number==="BigNumber")Ee=new y(ue);else if(t.number==="Fraction")try{Ee=new w(ue)}catch{Ee=parseFloat(ue)}else Ee=parseFloat(ue);O(),$("*")?(ee=1,ne=!0):$("/")&&(ee=-1,ne=!0)}for(var Ce=[],Le=1;;){for(O();S==="(";)Ce.push(ee),Le*=ee,ee=1,_(),O();var Ie=void 0;if(S){var sr=S;if(Ie=Y(),Ie===null)throw new SyntaxError('Unexpected "'+sr+'" in "'+A+'" at index '+E.toString())}else break;var ir=V(Ie);if(ir===null)throw new SyntaxError('Unit "'+Ie+'" not found.');var Xe=ee*Le;if(O(),$("^")){O();var Or=L();if(Or===null)throw new SyntaxError('In "'+K+'", "^" must be followed by a floating-point number');Xe*=Or}ye.units.push({unit:ir.unit,prefix:ir.prefix,power:Xe});for(var re=0;re1||Math.abs(this.units[0].power-1)>1e-15},b.prototype._normalize=function(K){if(K==null||this.units.length===0)return K;for(var te=K,ye=b._getNumberConverter(_r(K)),ee=0;ee{if($e(H,K)){var te=H[K],ye=te.prefixes[""];return{unit:te,prefix:ye}}for(var ee in H)if($e(H,ee)&&by(K,ee)){var ne=H[ee],ue=K.length-ee.length,Ee=K.substring(0,ue),Ce=$e(ne.prefixes,Ee)?ne.prefixes[Ee]:void 0;if(Ce!==void 0)return{unit:ne,prefix:Ce}}return null},{hasher:K=>K[0],limit:100});b.isValuelessUnit=function(K){return V(K)!==null},b.prototype.hasBase=function(K){if(typeof K=="string"&&(K=U[K]),!K)return!1;for(var te=0;te1e-12)return!1;return!0},b.prototype.equalBase=function(K){for(var te=0;te1e-12)return!1;return!0},b.prototype.equals=function(K){return this.equalBase(K)&&p(this.value,K.value)},b.prototype.multiply=function(K){for(var te=this.clone(),ye=qt(K)?K:new b(K),ee=0;ee1e-12&&($e(ge,Ce)?te.push({unit:ge[Ce].unit,prefix:ge[Ce].prefix,power:K.dimensions[Ee]||0}):ue=!0)}te.length1e-12)if($e(pe.si,ee))te.push({unit:pe.si[ee].unit,prefix:pe.si[ee].prefix,power:K.dimensions[ye]||0});else throw new Error("Cannot express custom unit "+ee+" in SI units")}return K.units=te,K.fixPrefix=!0,K.skipAutomaticSimplification=!0,this.value!==null?(K.value=null,this.to(K)):K},b.prototype.formatUnits=function(){for(var K="",te="",ye=0,ee=0,ne=0;ne0?(ye++,K+=" "+this.units[ne].prefix.name+this.units[ne].unit.name,Math.abs(this.units[ne].power-1)>1e-15&&(K+="^"+this.units[ne].power)):this.units[ne].power<0&&ee++;if(ee>0)for(var ue=0;ue0?(te+=" "+this.units[ue].prefix.name+this.units[ue].unit.name,Math.abs(this.units[ue].power+1)>1e-15&&(te+="^"+-this.units[ue].power)):(te+=" "+this.units[ue].prefix.name+this.units[ue].unit.name,te+="^"+this.units[ue].power));K=K.substr(1),te=te.substr(1),ye>1&&ee>0&&(K="("+K+")"),ee>1&&ye>0&&(te="("+te+")");var Ee=K;return ye>0&&ee>0&&(Ee+=" / "),Ee+=te,Ee},b.prototype.format=function(K){var te=this.skipAutomaticSimplification||this.value===null?this.clone():this.simplify(),ye=!1;typeof te.value<"u"&&te.value!==null&&Gt(te.value)&&(ye=Math.abs(te.value.re)<1e-14);for(var ee in te.units)$e(te.units,ee)&&te.units[ee].unit&&(te.units[ee].unit.name==="VA"&&ye?te.units[ee].unit=H.VAR:te.units[ee].unit.name==="VAR"&&!ye&&(te.units[ee].unit=H.VA));te.units.length===1&&!te.fixPrefix&&Math.abs(te.units[0].power-Math.round(te.units[0].power))<1e-14&&(te.units[0].prefix=te._bestPrefix());var ne=te._denormalize(te.value),ue=te.value!==null?d(ne,K||{}):"",Ee=te.formatUnits();return te.value&&Gt(te.value)&&(ue="("+ue+")"),Ee.length>0&&ue.length>0&&(ue+=" "),ue+=Ee,ue},b.prototype._bestPrefix=function(){if(this.units.length!==1)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");if(Math.abs(this.units[0].power-Math.round(this.units[0].power))>=1e-14)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");var K=this.value!==null?f(this.value):0,te=f(this.units[0].unit.value),ye=this.units[0].prefix;if(K===0)return ye;var ee=this.units[0].power,ne=Math.log(K/Math.pow(ye.value*te,ee))/Math.LN10-1.2;if(ne>-2.200001&&ne<1.800001)return ye;ne=Math.abs(ne);var ue=this.units[0].unit.prefixes;for(var Ee in ue)if($e(ue,Ee)){var Ce=ue[Ee];if(Ce.scientific){var Le=Math.abs(Math.log(K/Math.pow(Ce.value*te,ee))/Math.LN10-1.2);(Le0)},H={meter:{name:"meter",base:U.LENGTH,prefixes:R.LONG,value:1,offset:0},inch:{name:"inch",base:U.LENGTH,prefixes:R.NONE,value:.0254,offset:0},foot:{name:"foot",base:U.LENGTH,prefixes:R.NONE,value:.3048,offset:0},yard:{name:"yard",base:U.LENGTH,prefixes:R.NONE,value:.9144,offset:0},mile:{name:"mile",base:U.LENGTH,prefixes:R.NONE,value:1609.344,offset:0},link:{name:"link",base:U.LENGTH,prefixes:R.NONE,value:.201168,offset:0},rod:{name:"rod",base:U.LENGTH,prefixes:R.NONE,value:5.0292,offset:0},chain:{name:"chain",base:U.LENGTH,prefixes:R.NONE,value:20.1168,offset:0},angstrom:{name:"angstrom",base:U.LENGTH,prefixes:R.NONE,value:1e-10,offset:0},m:{name:"m",base:U.LENGTH,prefixes:R.SHORT,value:1,offset:0},in:{name:"in",base:U.LENGTH,prefixes:R.NONE,value:.0254,offset:0},ft:{name:"ft",base:U.LENGTH,prefixes:R.NONE,value:.3048,offset:0},yd:{name:"yd",base:U.LENGTH,prefixes:R.NONE,value:.9144,offset:0},mi:{name:"mi",base:U.LENGTH,prefixes:R.NONE,value:1609.344,offset:0},li:{name:"li",base:U.LENGTH,prefixes:R.NONE,value:.201168,offset:0},rd:{name:"rd",base:U.LENGTH,prefixes:R.NONE,value:5.02921,offset:0},ch:{name:"ch",base:U.LENGTH,prefixes:R.NONE,value:20.1168,offset:0},mil:{name:"mil",base:U.LENGTH,prefixes:R.NONE,value:254e-7,offset:0},m2:{name:"m2",base:U.SURFACE,prefixes:R.SQUARED,value:1,offset:0},sqin:{name:"sqin",base:U.SURFACE,prefixes:R.NONE,value:64516e-8,offset:0},sqft:{name:"sqft",base:U.SURFACE,prefixes:R.NONE,value:.09290304,offset:0},sqyd:{name:"sqyd",base:U.SURFACE,prefixes:R.NONE,value:.83612736,offset:0},sqmi:{name:"sqmi",base:U.SURFACE,prefixes:R.NONE,value:2589988110336e-6,offset:0},sqrd:{name:"sqrd",base:U.SURFACE,prefixes:R.NONE,value:25.29295,offset:0},sqch:{name:"sqch",base:U.SURFACE,prefixes:R.NONE,value:404.6873,offset:0},sqmil:{name:"sqmil",base:U.SURFACE,prefixes:R.NONE,value:64516e-14,offset:0},acre:{name:"acre",base:U.SURFACE,prefixes:R.NONE,value:4046.86,offset:0},hectare:{name:"hectare",base:U.SURFACE,prefixes:R.NONE,value:1e4,offset:0},m3:{name:"m3",base:U.VOLUME,prefixes:R.CUBIC,value:1,offset:0},L:{name:"L",base:U.VOLUME,prefixes:R.SHORT,value:.001,offset:0},l:{name:"l",base:U.VOLUME,prefixes:R.SHORT,value:.001,offset:0},litre:{name:"litre",base:U.VOLUME,prefixes:R.LONG,value:.001,offset:0},cuin:{name:"cuin",base:U.VOLUME,prefixes:R.NONE,value:16387064e-12,offset:0},cuft:{name:"cuft",base:U.VOLUME,prefixes:R.NONE,value:.028316846592,offset:0},cuyd:{name:"cuyd",base:U.VOLUME,prefixes:R.NONE,value:.764554857984,offset:0},teaspoon:{name:"teaspoon",base:U.VOLUME,prefixes:R.NONE,value:5e-6,offset:0},tablespoon:{name:"tablespoon",base:U.VOLUME,prefixes:R.NONE,value:15e-6,offset:0},drop:{name:"drop",base:U.VOLUME,prefixes:R.NONE,value:5e-8,offset:0},gtt:{name:"gtt",base:U.VOLUME,prefixes:R.NONE,value:5e-8,offset:0},minim:{name:"minim",base:U.VOLUME,prefixes:R.NONE,value:6161152e-14,offset:0},fluiddram:{name:"fluiddram",base:U.VOLUME,prefixes:R.NONE,value:36966911e-13,offset:0},fluidounce:{name:"fluidounce",base:U.VOLUME,prefixes:R.NONE,value:2957353e-11,offset:0},gill:{name:"gill",base:U.VOLUME,prefixes:R.NONE,value:.0001182941,offset:0},cc:{name:"cc",base:U.VOLUME,prefixes:R.NONE,value:1e-6,offset:0},cup:{name:"cup",base:U.VOLUME,prefixes:R.NONE,value:.0002365882,offset:0},pint:{name:"pint",base:U.VOLUME,prefixes:R.NONE,value:.0004731765,offset:0},quart:{name:"quart",base:U.VOLUME,prefixes:R.NONE,value:.0009463529,offset:0},gallon:{name:"gallon",base:U.VOLUME,prefixes:R.NONE,value:.003785412,offset:0},beerbarrel:{name:"beerbarrel",base:U.VOLUME,prefixes:R.NONE,value:.1173478,offset:0},oilbarrel:{name:"oilbarrel",base:U.VOLUME,prefixes:R.NONE,value:.1589873,offset:0},hogshead:{name:"hogshead",base:U.VOLUME,prefixes:R.NONE,value:.238481,offset:0},fldr:{name:"fldr",base:U.VOLUME,prefixes:R.NONE,value:36966911e-13,offset:0},floz:{name:"floz",base:U.VOLUME,prefixes:R.NONE,value:2957353e-11,offset:0},gi:{name:"gi",base:U.VOLUME,prefixes:R.NONE,value:.0001182941,offset:0},cp:{name:"cp",base:U.VOLUME,prefixes:R.NONE,value:.0002365882,offset:0},pt:{name:"pt",base:U.VOLUME,prefixes:R.NONE,value:.0004731765,offset:0},qt:{name:"qt",base:U.VOLUME,prefixes:R.NONE,value:.0009463529,offset:0},gal:{name:"gal",base:U.VOLUME,prefixes:R.NONE,value:.003785412,offset:0},bbl:{name:"bbl",base:U.VOLUME,prefixes:R.NONE,value:.1173478,offset:0},obl:{name:"obl",base:U.VOLUME,prefixes:R.NONE,value:.1589873,offset:0},g:{name:"g",base:U.MASS,prefixes:R.SHORT,value:.001,offset:0},gram:{name:"gram",base:U.MASS,prefixes:R.LONG,value:.001,offset:0},ton:{name:"ton",base:U.MASS,prefixes:R.SHORT,value:907.18474,offset:0},t:{name:"t",base:U.MASS,prefixes:R.SHORT,value:1e3,offset:0},tonne:{name:"tonne",base:U.MASS,prefixes:R.LONG,value:1e3,offset:0},grain:{name:"grain",base:U.MASS,prefixes:R.NONE,value:6479891e-11,offset:0},dram:{name:"dram",base:U.MASS,prefixes:R.NONE,value:.0017718451953125,offset:0},ounce:{name:"ounce",base:U.MASS,prefixes:R.NONE,value:.028349523125,offset:0},poundmass:{name:"poundmass",base:U.MASS,prefixes:R.NONE,value:.45359237,offset:0},hundredweight:{name:"hundredweight",base:U.MASS,prefixes:R.NONE,value:45.359237,offset:0},stick:{name:"stick",base:U.MASS,prefixes:R.NONE,value:.115,offset:0},stone:{name:"stone",base:U.MASS,prefixes:R.NONE,value:6.35029318,offset:0},gr:{name:"gr",base:U.MASS,prefixes:R.NONE,value:6479891e-11,offset:0},dr:{name:"dr",base:U.MASS,prefixes:R.NONE,value:.0017718451953125,offset:0},oz:{name:"oz",base:U.MASS,prefixes:R.NONE,value:.028349523125,offset:0},lbm:{name:"lbm",base:U.MASS,prefixes:R.NONE,value:.45359237,offset:0},cwt:{name:"cwt",base:U.MASS,prefixes:R.NONE,value:45.359237,offset:0},s:{name:"s",base:U.TIME,prefixes:R.SHORT,value:1,offset:0},min:{name:"min",base:U.TIME,prefixes:R.NONE,value:60,offset:0},h:{name:"h",base:U.TIME,prefixes:R.NONE,value:3600,offset:0},second:{name:"second",base:U.TIME,prefixes:R.LONG,value:1,offset:0},sec:{name:"sec",base:U.TIME,prefixes:R.LONG,value:1,offset:0},minute:{name:"minute",base:U.TIME,prefixes:R.NONE,value:60,offset:0},hour:{name:"hour",base:U.TIME,prefixes:R.NONE,value:3600,offset:0},day:{name:"day",base:U.TIME,prefixes:R.NONE,value:86400,offset:0},week:{name:"week",base:U.TIME,prefixes:R.NONE,value:7*86400,offset:0},month:{name:"month",base:U.TIME,prefixes:R.NONE,value:2629800,offset:0},year:{name:"year",base:U.TIME,prefixes:R.NONE,value:31557600,offset:0},decade:{name:"decade",base:U.TIME,prefixes:R.NONE,value:315576e3,offset:0},century:{name:"century",base:U.TIME,prefixes:R.NONE,value:315576e4,offset:0},millennium:{name:"millennium",base:U.TIME,prefixes:R.NONE,value:315576e5,offset:0},hertz:{name:"Hertz",base:U.FREQUENCY,prefixes:R.LONG,value:1,offset:0,reciprocal:!0},Hz:{name:"Hz",base:U.FREQUENCY,prefixes:R.SHORT,value:1,offset:0,reciprocal:!0},rad:{name:"rad",base:U.ANGLE,prefixes:R.SHORT,value:1,offset:0},radian:{name:"radian",base:U.ANGLE,prefixes:R.LONG,value:1,offset:0},deg:{name:"deg",base:U.ANGLE,prefixes:R.SHORT,value:null,offset:0},degree:{name:"degree",base:U.ANGLE,prefixes:R.LONG,value:null,offset:0},grad:{name:"grad",base:U.ANGLE,prefixes:R.SHORT,value:null,offset:0},gradian:{name:"gradian",base:U.ANGLE,prefixes:R.LONG,value:null,offset:0},cycle:{name:"cycle",base:U.ANGLE,prefixes:R.NONE,value:null,offset:0},arcsec:{name:"arcsec",base:U.ANGLE,prefixes:R.NONE,value:null,offset:0},arcmin:{name:"arcmin",base:U.ANGLE,prefixes:R.NONE,value:null,offset:0},A:{name:"A",base:U.CURRENT,prefixes:R.SHORT,value:1,offset:0},ampere:{name:"ampere",base:U.CURRENT,prefixes:R.LONG,value:1,offset:0},K:{name:"K",base:U.TEMPERATURE,prefixes:R.SHORT,value:1,offset:0},degC:{name:"degC",base:U.TEMPERATURE,prefixes:R.SHORT,value:1,offset:273.15},degF:{name:"degF",base:U.TEMPERATURE,prefixes:R.SHORT,value:new w(5,9),offset:459.67},degR:{name:"degR",base:U.TEMPERATURE,prefixes:R.SHORT,value:new w(5,9),offset:0},kelvin:{name:"kelvin",base:U.TEMPERATURE,prefixes:R.LONG,value:1,offset:0},celsius:{name:"celsius",base:U.TEMPERATURE,prefixes:R.LONG,value:1,offset:273.15},fahrenheit:{name:"fahrenheit",base:U.TEMPERATURE,prefixes:R.LONG,value:new w(5,9),offset:459.67},rankine:{name:"rankine",base:U.TEMPERATURE,prefixes:R.LONG,value:new w(5,9),offset:0},mol:{name:"mol",base:U.AMOUNT_OF_SUBSTANCE,prefixes:R.SHORT,value:1,offset:0},mole:{name:"mole",base:U.AMOUNT_OF_SUBSTANCE,prefixes:R.LONG,value:1,offset:0},cd:{name:"cd",base:U.LUMINOUS_INTENSITY,prefixes:R.SHORT,value:1,offset:0},candela:{name:"candela",base:U.LUMINOUS_INTENSITY,prefixes:R.LONG,value:1,offset:0},N:{name:"N",base:U.FORCE,prefixes:R.SHORT,value:1,offset:0},newton:{name:"newton",base:U.FORCE,prefixes:R.LONG,value:1,offset:0},dyn:{name:"dyn",base:U.FORCE,prefixes:R.SHORT,value:1e-5,offset:0},dyne:{name:"dyne",base:U.FORCE,prefixes:R.LONG,value:1e-5,offset:0},lbf:{name:"lbf",base:U.FORCE,prefixes:R.NONE,value:4.4482216152605,offset:0},poundforce:{name:"poundforce",base:U.FORCE,prefixes:R.NONE,value:4.4482216152605,offset:0},kip:{name:"kip",base:U.FORCE,prefixes:R.LONG,value:4448.2216,offset:0},kilogramforce:{name:"kilogramforce",base:U.FORCE,prefixes:R.NONE,value:9.80665,offset:0},J:{name:"J",base:U.ENERGY,prefixes:R.SHORT,value:1,offset:0},joule:{name:"joule",base:U.ENERGY,prefixes:R.LONG,value:1,offset:0},erg:{name:"erg",base:U.ENERGY,prefixes:R.SHORTLONG,value:1e-7,offset:0},Wh:{name:"Wh",base:U.ENERGY,prefixes:R.SHORT,value:3600,offset:0},BTU:{name:"BTU",base:U.ENERGY,prefixes:R.BTU,value:1055.05585262,offset:0},eV:{name:"eV",base:U.ENERGY,prefixes:R.SHORT,value:1602176565e-28,offset:0},electronvolt:{name:"electronvolt",base:U.ENERGY,prefixes:R.LONG,value:1602176565e-28,offset:0},W:{name:"W",base:U.POWER,prefixes:R.SHORT,value:1,offset:0},watt:{name:"watt",base:U.POWER,prefixes:R.LONG,value:1,offset:0},hp:{name:"hp",base:U.POWER,prefixes:R.NONE,value:745.6998715386,offset:0},VAR:{name:"VAR",base:U.POWER,prefixes:R.SHORT,value:v.I,offset:0},VA:{name:"VA",base:U.POWER,prefixes:R.SHORT,value:1,offset:0},Pa:{name:"Pa",base:U.PRESSURE,prefixes:R.SHORT,value:1,offset:0},psi:{name:"psi",base:U.PRESSURE,prefixes:R.NONE,value:6894.75729276459,offset:0},atm:{name:"atm",base:U.PRESSURE,prefixes:R.NONE,value:101325,offset:0},bar:{name:"bar",base:U.PRESSURE,prefixes:R.SHORTLONG,value:1e5,offset:0},torr:{name:"torr",base:U.PRESSURE,prefixes:R.NONE,value:133.322,offset:0},mmHg:{name:"mmHg",base:U.PRESSURE,prefixes:R.NONE,value:133.322,offset:0},mmH2O:{name:"mmH2O",base:U.PRESSURE,prefixes:R.NONE,value:9.80665,offset:0},cmH2O:{name:"cmH2O",base:U.PRESSURE,prefixes:R.NONE,value:98.0665,offset:0},coulomb:{name:"coulomb",base:U.ELECTRIC_CHARGE,prefixes:R.LONG,value:1,offset:0},C:{name:"C",base:U.ELECTRIC_CHARGE,prefixes:R.SHORT,value:1,offset:0},farad:{name:"farad",base:U.ELECTRIC_CAPACITANCE,prefixes:R.LONG,value:1,offset:0},F:{name:"F",base:U.ELECTRIC_CAPACITANCE,prefixes:R.SHORT,value:1,offset:0},volt:{name:"volt",base:U.ELECTRIC_POTENTIAL,prefixes:R.LONG,value:1,offset:0},V:{name:"V",base:U.ELECTRIC_POTENTIAL,prefixes:R.SHORT,value:1,offset:0},ohm:{name:"ohm",base:U.ELECTRIC_RESISTANCE,prefixes:R.SHORTLONG,value:1,offset:0},henry:{name:"henry",base:U.ELECTRIC_INDUCTANCE,prefixes:R.LONG,value:1,offset:0},H:{name:"H",base:U.ELECTRIC_INDUCTANCE,prefixes:R.SHORT,value:1,offset:0},siemens:{name:"siemens",base:U.ELECTRIC_CONDUCTANCE,prefixes:R.LONG,value:1,offset:0},S:{name:"S",base:U.ELECTRIC_CONDUCTANCE,prefixes:R.SHORT,value:1,offset:0},weber:{name:"weber",base:U.MAGNETIC_FLUX,prefixes:R.LONG,value:1,offset:0},Wb:{name:"Wb",base:U.MAGNETIC_FLUX,prefixes:R.SHORT,value:1,offset:0},tesla:{name:"tesla",base:U.MAGNETIC_FLUX_DENSITY,prefixes:R.LONG,value:1,offset:0},T:{name:"T",base:U.MAGNETIC_FLUX_DENSITY,prefixes:R.SHORT,value:1,offset:0},b:{name:"b",base:U.BIT,prefixes:R.BINARY_SHORT,value:1,offset:0},bits:{name:"bits",base:U.BIT,prefixes:R.BINARY_LONG,value:1,offset:0},B:{name:"B",base:U.BIT,prefixes:R.BINARY_SHORT,value:8,offset:0},bytes:{name:"bytes",base:U.BIT,prefixes:R.BINARY_LONG,value:8,offset:0}},ce={meters:"meter",inches:"inch",feet:"foot",yards:"yard",miles:"mile",links:"link",rods:"rod",chains:"chain",angstroms:"angstrom",lt:"l",litres:"litre",liter:"litre",liters:"litre",teaspoons:"teaspoon",tablespoons:"tablespoon",minims:"minim",fluiddrams:"fluiddram",fluidounces:"fluidounce",gills:"gill",cups:"cup",pints:"pint",quarts:"quart",gallons:"gallon",beerbarrels:"beerbarrel",oilbarrels:"oilbarrel",hogsheads:"hogshead",gtts:"gtt",grams:"gram",tons:"ton",tonnes:"tonne",grains:"grain",drams:"dram",ounces:"ounce",poundmasses:"poundmass",hundredweights:"hundredweight",sticks:"stick",lb:"lbm",lbs:"lbm",kips:"kip",kgf:"kilogramforce",acres:"acre",hectares:"hectare",sqfeet:"sqft",sqyard:"sqyd",sqmile:"sqmi",sqmiles:"sqmi",mmhg:"mmHg",mmh2o:"mmH2O",cmh2o:"cmH2O",seconds:"second",secs:"second",minutes:"minute",mins:"minute",hours:"hour",hr:"hour",hrs:"hour",days:"day",weeks:"week",months:"month",years:"year",decades:"decade",centuries:"century",millennia:"millennium",hertz:"hertz",radians:"radian",degrees:"degree",gradians:"gradian",cycles:"cycle",arcsecond:"arcsec",arcseconds:"arcsec",arcminute:"arcmin",arcminutes:"arcmin",BTUs:"BTU",watts:"watt",joules:"joule",amperes:"ampere",amps:"ampere",amp:"ampere",coulombs:"coulomb",volts:"volt",ohms:"ohm",farads:"farad",webers:"weber",teslas:"tesla",electronvolts:"electronvolt",moles:"mole",bit:"bits",byte:"bytes"};function Me(K){if(K.number==="BigNumber"){var te=Ef(y);H.rad.value=new y(1),H.deg.value=te.div(180),H.grad.value=te.div(200),H.cycle.value=te.times(2),H.arcsec.value=te.div(648e3),H.arcmin.value=te.div(10800)}else H.rad.value=1,H.deg.value=Math.PI/180,H.grad.value=Math.PI/200,H.cycle.value=Math.PI*2,H.arcsec.value=Math.PI/648e3,H.arcmin.value=Math.PI/10800;H.radian.value=H.rad.value,H.degree.value=H.deg.value,H.gradian.value=H.grad.value}Me(t),r&&r("config",function(K,te){K.number!==te.number&&Me(K)});var pe={si:{NONE:{unit:ie,prefix:R.NONE[""]},LENGTH:{unit:H.m,prefix:R.SHORT[""]},MASS:{unit:H.g,prefix:R.SHORT.k},TIME:{unit:H.s,prefix:R.SHORT[""]},CURRENT:{unit:H.A,prefix:R.SHORT[""]},TEMPERATURE:{unit:H.K,prefix:R.SHORT[""]},LUMINOUS_INTENSITY:{unit:H.cd,prefix:R.SHORT[""]},AMOUNT_OF_SUBSTANCE:{unit:H.mol,prefix:R.SHORT[""]},ANGLE:{unit:H.rad,prefix:R.SHORT[""]},BIT:{unit:H.bits,prefix:R.SHORT[""]},FORCE:{unit:H.N,prefix:R.SHORT[""]},ENERGY:{unit:H.J,prefix:R.SHORT[""]},POWER:{unit:H.W,prefix:R.SHORT[""]},PRESSURE:{unit:H.Pa,prefix:R.SHORT[""]},ELECTRIC_CHARGE:{unit:H.C,prefix:R.SHORT[""]},ELECTRIC_CAPACITANCE:{unit:H.F,prefix:R.SHORT[""]},ELECTRIC_POTENTIAL:{unit:H.V,prefix:R.SHORT[""]},ELECTRIC_RESISTANCE:{unit:H.ohm,prefix:R.SHORT[""]},ELECTRIC_INDUCTANCE:{unit:H.H,prefix:R.SHORT[""]},ELECTRIC_CONDUCTANCE:{unit:H.S,prefix:R.SHORT[""]},MAGNETIC_FLUX:{unit:H.Wb,prefix:R.SHORT[""]},MAGNETIC_FLUX_DENSITY:{unit:H.T,prefix:R.SHORT[""]},FREQUENCY:{unit:H.Hz,prefix:R.SHORT[""]}}};pe.cgs=JSON.parse(JSON.stringify(pe.si)),pe.cgs.LENGTH={unit:H.m,prefix:R.SHORT.c},pe.cgs.MASS={unit:H.g,prefix:R.SHORT[""]},pe.cgs.FORCE={unit:H.dyn,prefix:R.SHORT[""]},pe.cgs.ENERGY={unit:H.erg,prefix:R.NONE[""]},pe.us=JSON.parse(JSON.stringify(pe.si)),pe.us.LENGTH={unit:H.ft,prefix:R.NONE[""]},pe.us.MASS={unit:H.lbm,prefix:R.NONE[""]},pe.us.TEMPERATURE={unit:H.degF,prefix:R.NONE[""]},pe.us.FORCE={unit:H.lbf,prefix:R.NONE[""]},pe.us.ENERGY={unit:H.BTU,prefix:R.BTU[""]},pe.us.POWER={unit:H.hp,prefix:R.NONE[""]},pe.us.PRESSURE={unit:H.psi,prefix:R.NONE[""]},pe.auto=JSON.parse(JSON.stringify(pe.si));var ge=pe.auto;b.setUnitSystem=function(K){if($e(pe,K))ge=pe[K];else throw new Error("Unit system "+K+" does not exist. Choices are: "+Object.keys(pe).join(", "))},b.getUnitSystem=function(){for(var K in pe)if($e(pe,K)&&pe[K]===ge)return K},b.typeConverters={BigNumber:function(te){return te!=null&&te.isFraction?new y(te.n).div(te.d).times(te.s):new y(te+"")},Fraction:function(te){return new w(te)},Complex:function(te){return te},number:function(te){return te!=null&&te.isFraction?x(te):te}},b.prototype._numberConverter=function(){var K=b.typeConverters[this.valueType()];if(K)return K;throw new TypeError('Unsupported Unit value type "'+this.valueType()+'"')},b._getNumberConverter=function(K){if(!b.typeConverters[K])throw new TypeError('Unsupported type "'+K+'"');return b.typeConverters[K]};for(var Se in H)if($e(H,Se)){var xe=H[Se];xe.dimensions=xe.base.dimensions}for(var be in ce)if($e(ce,be)){var De=H[ce[be]],Ae={};for(var ze in De)$e(De,ze)&&(Ae[ze]=De[ze]);Ae.name=be,H[be]=Ae}b.isValidAlpha=function(te){return/^[a-zA-Z]$/.test(te)};function Ze(K){for(var te=0;te0&&!(b.isValidAlpha(S)||M(S)))throw new Error('Invalid unit name (only alphanumeric characters are allowed): "'+K+'"')}}return b.createUnit=function(K,te){if(typeof K!="object")throw new TypeError("createUnit expects first parameter to be of type 'Object'");if(te&&te.override){for(var ye in K)if($e(K,ye)&&b.deleteUnit(ye),K[ye].aliases)for(var ee=0;ee"u"||te===null)&&(te={}),typeof K!="string")throw new TypeError("createUnitSingle expects first parameter to be of type 'string'");if($e(H,K))throw new Error('Cannot create unit "'+K+'": a unit with that name already exists');Ze(K);var ye=null,ee=[],ne=0,ue,Ee,Ce;if(te&&te.type==="Unit")ye=te.clone();else if(typeof te=="string")te!==""&&(ue=te);else if(typeof te=="object")ue=te.definition,Ee=te.prefixes,ne=te.offset,Ce=te.baseName,te.aliases&&(ee=te.aliases.valueOf());else throw new TypeError('Cannot create unit "'+K+'" from "'+te.toString()+'": expecting "string" or "Unit" or "Object"');if(ee){for(var Le=0;Le1e-12){le=!1;break}if(le){Or=!0,Ie.base=U[re];break}}if(!Or){Ce=Ce||K+"_STUFF";var Oe={dimensions:ye.dimensions.slice(0)};Oe.key=Ce,U[Ce]=Oe,ge[Ce]={unit:Ie,prefix:R.NONE[""]},Ie.base=U[Ce]}}else{if(Ce=Ce||K+"_STUFF",j.indexOf(Ce)>=0)throw new Error('Cannot create new base unit "'+K+'": a base unit with that name already exists (and cannot be overridden)');j.push(Ce);for(var sr in U)$e(U,sr)&&(U[sr].dimensions[j.length-1]=0);for(var ir={dimensions:[]},Xe=0;Xe{var{typed:r,Unit:t}=e;return r(ZS,{Unit:function(i){return i.clone()},string:function(i){return t.isValuelessUnit(i)?new t(null,i):t.parse(i,{allowNoUnits:!0})},"number | BigNumber | Fraction | Complex, string | Unit":function(i,a){return new t(i,a)},"number | BigNumber | Fraction":function(i){return new t(i)},"Array | Matrix":r.referToSelf(n=>i=>Je(i,n))})});var XS="sparse",rU=["typed","SparseMatrix"],JS=T(XS,rU,e=>{var{typed:r,SparseMatrix:t}=e;return r(XS,{"":function(){return new t([])},string:function(i){return new t([],i)},"Array | Matrix":function(i){return new t(i)},"Array | Matrix, string":function(i,a){return new t(i,a)}})});var KS="createUnit",tU=["typed","Unit"],jS=T(KS,tU,e=>{var{typed:r,Unit:t}=e;return r(KS,{"Object, Object":function(i,a){return t.createUnit(i,a)},Object:function(i){return t.createUnit(i,{})},"string, Unit | string | Object, Object":function(i,a,s){var l={};return l[i]=a,t.createUnit(l,s)},"string, Unit | string | Object":function(i,a){var s={};return s[i]=a,t.createUnit(s,{})},string:function(i){var a={};return a[i]={},t.createUnit(a,{})}})});var eN="acos",nU=["typed","config","Complex"],rN=T(eN,nU,e=>{var{typed:r,config:t,Complex:n}=e;return r(eN,{number:function(a){return a>=-1&&a<=1||t.predictable?Math.acos(a):new n(a,0).acos()},Complex:function(a){return a.acos()},BigNumber:function(a){return a.acos()}})});var tN="acosh",iU=["typed","config","Complex"],nN=T(tN,iU,e=>{var{typed:r,config:t,Complex:n}=e;return r(tN,{number:function(a){return a>=1||t.predictable?Uv(a):a<=-1?new n(Math.log(Math.sqrt(a*a-1)-a),Math.PI):new n(a,0).acosh()},Complex:function(a){return a.acosh()},BigNumber:function(a){return a.acosh()}})});var iN="acot",aU=["typed","BigNumber"],aN=T(iN,aU,e=>{var{typed:r,BigNumber:t}=e;return r(iN,{number:zv,Complex:function(i){return i.acot()},BigNumber:function(i){return new t(1).div(i).atan()}})});var oN="acoth",oU=["typed","config","Complex","BigNumber"],sN=T(oN,oU,e=>{var{typed:r,config:t,Complex:n,BigNumber:i}=e;return r(oN,{number:function(s){return s>=1||s<=-1||t.predictable?Wv(s):new n(s,0).acoth()},Complex:function(s){return s.acoth()},BigNumber:function(s){return new i(1).div(s).atanh()}})});var uN="acsc",sU=["typed","config","Complex","BigNumber"],fN=T(uN,sU,e=>{var{typed:r,config:t,Complex:n,BigNumber:i}=e;return r(uN,{number:function(s){return s<=-1||s>=1||t.predictable?Vv(s):new n(s,0).acsc()},Complex:function(s){return s.acsc()},BigNumber:function(s){return new i(1).div(s).asin()}})});var lN="acsch",uU=["typed","BigNumber"],cN=T(lN,uU,e=>{var{typed:r,BigNumber:t}=e;return r(lN,{number:Yv,Complex:function(i){return i.acsch()},BigNumber:function(i){return new t(1).div(i).asinh()}})});var pN="asec",fU=["typed","config","Complex","BigNumber"],mN=T(pN,fU,e=>{var{typed:r,config:t,Complex:n,BigNumber:i}=e;return r(pN,{number:function(s){return s<=-1||s>=1||t.predictable?Hv(s):new n(s,0).asec()},Complex:function(s){return s.asec()},BigNumber:function(s){return new i(1).div(s).acos()}})});var hN="asech",lU=["typed","config","Complex","BigNumber"],dN=T(hN,lU,e=>{var{typed:r,config:t,Complex:n,BigNumber:i}=e;return r(hN,{number:function(s){if(s<=1&&s>=-1||t.predictable){var l=1/s;if(l>0||t.predictable)return Gv(s);var f=Math.sqrt(l*l-1);return new n(Math.log(f-l),Math.PI)}return new n(s,0).asech()},Complex:function(s){return s.asech()},BigNumber:function(s){return new i(1).div(s).acosh()}})});var vN="asin",cU=["typed","config","Complex"],gN=T(vN,cU,e=>{var{typed:r,config:t,Complex:n}=e;return r(vN,{number:function(a){return a>=-1&&a<=1||t.predictable?Math.asin(a):new n(a,0).asin()},Complex:function(a){return a.asin()},BigNumber:function(a){return a.asin()}})});var pU="asinh",mU=["typed"],xN=T(pU,mU,e=>{var{typed:r}=e;return r("asinh",{number:$v,Complex:function(n){return n.asinh()},BigNumber:function(n){return n.asinh()}})});var hU="atan",dU=["typed"],yN=T(hU,dU,e=>{var{typed:r}=e;return r("atan",{number:function(n){return Math.atan(n)},Complex:function(n){return n.atan()},BigNumber:function(n){return n.atan()}})});var bN="atan2",vU=["typed","matrix","equalScalar","BigNumber","DenseMatrix","concat"],wN=T(bN,vU,e=>{var{typed:r,matrix:t,equalScalar:n,BigNumber:i,DenseMatrix:a,concat:s}=e,l=It({typed:r,equalScalar:n}),f=ft({typed:r}),o=Wc({typed:r,equalScalar:n}),u=Jr({typed:r,equalScalar:n}),p=Lr({typed:r,DenseMatrix:a}),h=vr({typed:r,matrix:t,concat:s});return r(bN,{"number, number":Math.atan2,"BigNumber, BigNumber":(d,x)=>i.atan2(d,x)},h({scalar:"number | BigNumber",SS:o,DS:f,SD:l,Ss:u,sS:p}))});var DN="atanh",gU=["typed","config","Complex"],SN=T(DN,gU,e=>{var{typed:r,config:t,Complex:n}=e;return r(DN,{number:function(a){return a<=1&&a>=-1||t.predictable?Zv(a):new n(a,0).atanh()},Complex:function(a){return a.atanh()},BigNumber:function(a){return a.atanh()}})});var xi=T("trigUnit",["typed"],e=>{var{typed:r}=e;return{Unit:r.referToSelf(t=>n=>{if(!n.hasBase(n.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cot is no angle");return r.find(t,n.valueType())(n.value)})}});var NN="cos",xU=["typed"],AN=T(NN,xU,e=>{var{typed:r}=e,t=xi({typed:r});return r(NN,{number:Math.cos,"Complex | BigNumber":n=>n.cos()},t)});var EN="cosh",yU=["typed"],CN=T(EN,yU,e=>{var{typed:r}=e;return r(EN,{number:bc,"Complex | BigNumber":t=>t.cosh()})});var MN="cot",bU=["typed","BigNumber"],_N=T(MN,bU,e=>{var{typed:r,BigNumber:t}=e,n=xi({typed:r});return r(MN,{number:Qv,Complex:i=>i.cot(),BigNumber:i=>new t(1).div(i.tan())},n)});var TN="coth",wU=["typed","BigNumber"],FN=T(TN,wU,e=>{var{typed:r,BigNumber:t}=e;return r(TN,{number:Xv,Complex:n=>n.coth(),BigNumber:n=>new t(1).div(n.tanh())})});var ON="csc",DU=["typed","BigNumber"],BN=T(ON,DU,e=>{var{typed:r,BigNumber:t}=e,n=xi({typed:r});return r(ON,{number:Jv,Complex:i=>i.csc(),BigNumber:i=>new t(1).div(i.sin())},n)});var IN="csch",SU=["typed","BigNumber"],PN=T(IN,SU,e=>{var{typed:r,BigNumber:t}=e;return r(IN,{number:Kv,Complex:n=>n.csch(),BigNumber:n=>new t(1).div(n.sinh())})});var kN="sec",NU=["typed","BigNumber"],RN=T(kN,NU,e=>{var{typed:r,BigNumber:t}=e,n=xi({typed:r});return r(kN,{number:jv,Complex:i=>i.sec(),BigNumber:i=>new t(1).div(i.cos())},n)});var LN="sech",AU=["typed","BigNumber"],qN=T(LN,AU,e=>{var{typed:r,BigNumber:t}=e;return r(LN,{number:eg,Complex:n=>n.sech(),BigNumber:n=>new t(1).div(n.cosh())})});var UN="sin",EU=["typed"],zN=T(UN,EU,e=>{var{typed:r}=e,t=xi({typed:r});return r(UN,{number:Math.sin,"Complex | BigNumber":n=>n.sin()},t)});var WN="sinh",CU=["typed"],VN=T(WN,CU,e=>{var{typed:r}=e;return r(WN,{number:rg,"Complex | BigNumber":t=>t.sinh()})});var YN="tan",MU=["typed"],HN=T(YN,MU,e=>{var{typed:r}=e,t=xi({typed:r});return r(YN,{number:Math.tan,"Complex | BigNumber":n=>n.tan()},t)});var _U="tanh",TU=["typed"],GN=T(_U,TU,e=>{var{typed:r}=e;return r("tanh",{number:wc,"Complex | BigNumber":t=>t.tanh()})});var $N="setCartesian",FU=["typed","size","subset","compareNatural","Index","DenseMatrix"],ZN=T($N,FU,e=>{var{typed:r,size:t,subset:n,compareNatural:i,Index:a,DenseMatrix:s}=e;return r($N,{"Array | Matrix, Array | Matrix":function(f,o){var u=[];if(n(t(f),new a(0))!==0&&n(t(o),new a(0))!==0){var p=gr(Array.isArray(f)?f:f.toArray()).sort(i),h=gr(Array.isArray(o)?o:o.toArray()).sort(i);u=[];for(var d=0;d{var{typed:r,size:t,subset:n,compareNatural:i,Index:a,DenseMatrix:s}=e;return r(QN,{"Array | Matrix, Array | Matrix":function(f,o){var u;if(n(t(f),new a(0))===0)u=[];else{if(n(t(o),new a(0))===0)return gr(f.toArray());var p=Pa(gr(Array.isArray(f)?f:f.toArray()).sort(i)),h=Pa(gr(Array.isArray(o)?o:o.toArray()).sort(i));u=[];for(var d,x=0;x{var{typed:r,size:t,subset:n,compareNatural:i,Index:a,DenseMatrix:s}=e;return r(JN,{"Array | Matrix":function(f){var o;if(n(t(f),new a(0))===0)o=[];else{var u=gr(Array.isArray(f)?f:f.toArray()).sort(i);o=[],o.push(u[0]);for(var p=1;p{var{typed:r,size:t,subset:n,compareNatural:i,Index:a,DenseMatrix:s}=e;return r(jN,{"Array | Matrix, Array | Matrix":function(f,o){var u;if(n(t(f),new a(0))===0||n(t(o),new a(0))===0)u=[];else{var p=Pa(gr(Array.isArray(f)?f:f.toArray()).sort(i)),h=Pa(gr(Array.isArray(o)?o:o.toArray()).sort(i));u=[];for(var d=0;d{var{typed:r,size:t,subset:n,compareNatural:i,Index:a}=e;return r(r2,{"Array | Matrix, Array | Matrix":function(l,f){if(n(t(l),new a(0))===0)return!0;if(n(t(f),new a(0))===0)return!1;for(var o=Pa(gr(Array.isArray(l)?l:l.toArray()).sort(i)),u=Pa(gr(Array.isArray(f)?f:f.toArray()).sort(i)),p,h=0;h{var{typed:r,size:t,subset:n,compareNatural:i,Index:a}=e;return r(n2,{"number | BigNumber | Fraction | Complex, Array | Matrix":function(l,f){if(n(t(f),new a(0))===0)return 0;for(var o=gr(Array.isArray(f)?f:f.toArray()),u=0,p=0;p{var{typed:r,size:t,subset:n,compareNatural:i,Index:a}=e;return r(a2,{"Array | Matrix":function(o){if(n(t(o),new a(0))===0)return[];for(var u=gr(Array.isArray(o)?o:o.toArray()).sort(i),p=[],h=0;h.toString(2).length<=u.length;)p.push(s(u,h.toString(2).split("").reverse())),h++;return l(p)}});function s(f,o){for(var u=[],p=0;p0;u--)for(var p=0;pf[p+1].length&&(o=f[p],f[p]=f[p+1],f[p+1]=o);return f}});var s2="setSize",LU=["typed","compareNatural"],u2=T(s2,LU,e=>{var{typed:r,compareNatural:t}=e;return r(s2,{"Array | Matrix":function(i){return Array.isArray(i)?gr(i).length:gr(i.toArray()).length},"Array | Matrix, boolean":function(i,a){if(a===!1||i.length===0)return Array.isArray(i)?gr(i).length:gr(i.toArray()).length;for(var s=gr(Array.isArray(i)?i:i.toArray()).sort(t),l=1,f=1;f{var{typed:r,size:t,concat:n,subset:i,setDifference:a,Index:s}=e;return r(f2,{"Array | Matrix, Array | Matrix":function(f,o){if(i(t(f),new s(0))===0)return gr(o);if(i(t(o),new s(0))===0)return gr(f);var u=gr(f),p=gr(o);return n(a(u,p),a(p,u))}})});var c2="setUnion",UU=["typed","size","concat","subset","setIntersect","setSymDifference","Index"],p2=T(c2,UU,e=>{var{typed:r,size:t,concat:n,subset:i,setIntersect:a,setSymDifference:s,Index:l}=e;return r(c2,{"Array | Matrix, Array | Matrix":function(o,u){if(i(t(o),new l(0))===0)return gr(u);if(i(t(u),new l(0))===0)return gr(o);var p=gr(o),h=gr(u);return n(s(p,h),a(p,h))}})});var m2="add",zU=["typed","matrix","addScalar","equalScalar","DenseMatrix","SparseMatrix","concat"],h2=T(m2,zU,e=>{var{typed:r,matrix:t,addScalar:n,equalScalar:i,DenseMatrix:a,SparseMatrix:s,concat:l}=e,f=dn({typed:r}),o=su({typed:r,equalScalar:i}),u=Un({typed:r,DenseMatrix:a}),p=vr({typed:r,matrix:t,concat:l});return r(m2,{"any, any":n,"any, any, ...any":r.referToSelf(h=>(d,x,v)=>{for(var y=h(d,x),w=0;w{var{typed:r,abs:t,addScalar:n,divideScalar:i,multiplyScalar:a,sqrt:s,smaller:l,isPositive:f}=e;return r(d2,{"... number | BigNumber":o,Array:o,Matrix:u=>o(gr(u.toArray()))});function o(u){for(var p=0,h=0,d=0;d{var{typed:r,abs:t,add:n,pow:i,conj:a,sqrt:s,multiply:l,equalScalar:f,larger:o,smaller:u,matrix:p,ctranspose:h,eigs:d}=e;return r(g2,{number:Math.abs,Complex:function(F){return F.abs()},BigNumber:function(F){return F.abs()},boolean:function(F){return Math.abs(F)},Array:function(F){return S(p(F),2)},Matrix:function(F){return S(F,2)},"Array, number | BigNumber | string":function(F,M){return S(p(F),M)},"Matrix, number | BigNumber | string":function(F,M){return S(F,M)}});function x(O){var F=0;return O.forEach(function(M){var _=t(M);o(_,F)&&(F=_)},!0),F}function v(O){var F;return O.forEach(function(M){var _=t(M);(!F||u(_,F))&&(F=_)},!0),F||0}function y(O,F){if(F===Number.POSITIVE_INFINITY||F==="inf")return x(O);if(F===Number.NEGATIVE_INFINITY||F==="-inf")return v(O);if(F==="fro")return S(O,2);if(typeof F=="number"&&!isNaN(F)){if(!f(F,0)){var M=0;return O.forEach(function(_){M=n(i(t(_),F),M)},!0),i(M,1/F)}return Number.POSITIVE_INFINITY}throw new Error("Unsupported parameter value")}function w(O){var F=0;return O.forEach(function(M,_){F=n(F,l(M,a(M)))}),t(s(F))}function C(O){var F=[],M=0;return O.forEach(function(_,k){var L=k[1],Y=n(F[L]||0,t(_));o(Y,M)&&(M=Y),F[L]=Y},!0),M}function b(O){var F=O.size();if(F[0]!==F[1])throw new RangeError("Invalid matrix dimensions");var M=h(O),_=l(M,O),k=d(_).values.toArray(),L=k[k.length-1];return t(s(L))}function A(O){var F=[],M=0;return O.forEach(function(_,k){var L=k[0],Y=n(F[L]||0,t(_));o(Y,M)&&(M=Y),F[L]=Y},!0),M}function E(O,F){if(F===1)return C(O);if(F===Number.POSITIVE_INFINITY||F==="inf")return A(O);if(F==="fro")return w(O);if(F===2)return b(O);throw new Error("Unsupported parameter value "+F)}function S(O,F){var M=O.size();if(M.length===1)return y(O,F);if(M.length===2){if(M[0]&&M[1])return E(O,F);throw new RangeError("Invalid matrix dimensions")}}});var y2="dot",YU=["typed","addScalar","multiplyScalar","conj","size"],b2=T(y2,YU,e=>{var{typed:r,addScalar:t,multiplyScalar:n,conj:i,size:a}=e;return r(y2,{"Array | DenseMatrix, Array | DenseMatrix":l,"SparseMatrix, SparseMatrix":f});function s(u,p){var h=o(u),d=o(p),x,v;if(h.length===1)x=h[0];else if(h.length===2&&h[1]===1)x=h[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+h.join(", ")+")");if(d.length===1)v=d[0];else if(d.length===2&&d[1]===1)v=d[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+d.join(", ")+")");if(x!==v)throw new RangeError("Vectors must have equal length ("+x+" != "+v+")");if(x===0)throw new RangeError("Cannot calculate the dot product of empty vectors");return x}function l(u,p){var h=s(u,p),d=Ge(u)?u._data:u,x=Ge(u)?u._datatype||u.getDataType():void 0,v=Ge(p)?p._data:p,y=Ge(p)?p._datatype||p.getDataType():void 0,w=o(u).length===2,C=o(p).length===2,b=t,A=n;if(x&&y&&x===y&&typeof x=="string"&&x!=="mixed"){var E=x;b=r.find(t,[E,E]),A=r.find(n,[E,E])}if(!w&&!C){for(var S=A(i(d[0]),v[0]),O=1;OS){A++;continue}E===S&&(y=w(y,C(d[b],v[A])),b++,A++)}return y}function o(u){return Ge(u)?u.size():a(u)}});var HU="trace",GU=["typed","matrix","add"],w2=T(HU,GU,e=>{var{typed:r,matrix:t,add:n}=e;return r("trace",{Array:function(l){return i(t(l))},SparseMatrix:a,DenseMatrix:i,any:tr});function i(s){var l=s._size,f=s._data;switch(l.length){case 1:if(l[0]===1)return tr(f[0]);throw new RangeError("Matrix must be square (size: "+lr(l)+")");case 2:{var o=l[0],u=l[1];if(o===u){for(var p=0,h=0;h0)for(var x=0;xx)break}return d}throw new RangeError("Matrix must be square (size: "+lr(u)+")")}});var D2="index",$U=["typed","Index"],S2=T(D2,$U,e=>{var{typed:r,Index:t}=e;return r(D2,{"...number | string | BigNumber | Range | Array | Matrix":function(i){var a=i.map(function(l){return je(l)?l.toNumber():Ar(l)||Ge(l)?l.map(function(f){return je(f)?f.toNumber():f}):l}),s=new t;return t.apply(s,a),s}})});var hp=new Set(["end"]);var ZU="Node",QU=["mathWithTransform"],N2=T(ZU,QU,e=>{var{mathWithTransform:r}=e;function t(i){for(var a of[...hp])if(i.has(a))throw new Error('Scope contains an illegal symbol, "'+a+'" is a reserved keyword')}class n{get type(){return"Node"}get isNode(){return!0}evaluate(a){return this.compile().evaluate(a)}compile(){var a=this._compile(r,{}),s={},l=null;function f(o){var u=ka(o);return t(u),a(u,s,l)}return{evaluate:f}}_compile(a,s){throw new Error("Method _compile must be implemented by type "+this.type)}forEach(a){throw new Error("Cannot run forEach on a Node interface")}map(a){throw new Error("Cannot run map on a Node interface")}_ifNode(a){if(!Sr(a))throw new TypeError("Callback function must return a Node");return a}traverse(a){a(this,null,null);function s(l,f){l.forEach(function(o,u,p){f(o,u,p),s(o,f)})}s(this,a)}transform(a){function s(l,f,o){var u=a(l,f,o);return u!==l?u:l.map(s)}return s(this,null,null)}filter(a){var s=[];return this.traverse(function(l,f,o){a(l,f,o)&&s.push(l)}),s}clone(){throw new Error("Cannot clone a Node interface")}cloneDeep(){return this.map(function(a){return a.cloneDeep()})}equals(a){return a?this.type===a.type&&zi(this,a):!1}toString(a){var s=this._getCustomString(a);return typeof s<"u"?s:this._toString(a)}_toString(){throw new Error("_toString not implemented for "+this.type)}toJSON(){throw new Error("Cannot serialize object: toJSON not implemented by "+this.type)}toHTML(a){var s=this._getCustomString(a);return typeof s<"u"?s:this._toHTML(a)}_toHTML(){throw new Error("_toHTML not implemented for "+this.type)}toTex(a){var s=this._getCustomString(a);return typeof s<"u"?s:this._toTex(a)}_toTex(a){throw new Error("_toTex not implemented for "+this.type)}_getCustomString(a){if(a&&typeof a=="object")switch(typeof a.handler){case"object":case"undefined":return;case"function":return a.handler(this,a);default:throw new TypeError("Object or function expected as callback")}}getIdentifier(){return this.type}getContent(){return this}}return n},{isClass:!0,isNode:!0});function lt(e){return e&&e.isIndexError?new Xt(e.index+1,e.min+1,e.max!==void 0?e.max+1:void 0):e}function dp(e){var{subset:r}=e;return function(n,i){try{if(Array.isArray(n))return r(n,i);if(n&&typeof n.subset=="function")return n.subset(i);if(typeof n=="string")return r(n,i);if(typeof n=="object"){if(!i.isObjectProperty())throw new TypeError("Cannot apply a numeric index as object property");return gt(n,i.getObjectProperty())}else throw new TypeError("Cannot apply index: unsupported type of object")}catch(a){throw lt(a)}}}var vp="AccessorNode",XU=["subset","Node"],A2=T(vp,XU,e=>{var{subset:r,Node:t}=e,n=dp({subset:r});function i(s){return!(Sn(s)||$t(s)||yr(s)||fn(s)||la(s)||Zt(s)||rt(s))}class a extends t{constructor(l,f){if(super(),!Sr(l))throw new TypeError('Node expected for parameter "object"');if(!kn(f))throw new TypeError('IndexNode expected for parameter "index"');this.object=l,this.index=f}get name(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}get type(){return vp}get isAccessorNode(){return!0}_compile(l,f){var o=this.object._compile(l,f),u=this.index._compile(l,f);if(this.index.isObjectProperty()){var p=this.index.getObjectProperty();return function(d,x,v){return gt(o(d,x,v),p)}}else return function(d,x,v){var y=o(d,x,v),w=u(d,x,y);return n(y,w)}}forEach(l){l(this.object,"object",this),l(this.index,"index",this)}map(l){return new a(this._ifNode(l(this.object,"object",this)),this._ifNode(l(this.index,"index",this)))}clone(){return new a(this.object,this.index)}_toString(l){var f=this.object.toString(l);return i(this.object)&&(f="("+f+")"),f+this.index.toString(l)}_toHTML(l){var f=this.object.toHTML(l);return i(this.object)&&(f='('+f+')'),f+this.index.toHTML(l)}_toTex(l){var f=this.object.toTex(l);return i(this.object)&&(f="\\\\left(' + object + '\\\\right)"),f+this.index.toTex(l)}toJSON(){return{mathjs:vp,object:this.object,index:this.index}}static fromJSON(l){return new a(l.object,l.index)}}return Ur(a,"name",vp),a},{isClass:!0,isNode:!0});var gp="ArrayNode",JU=["Node"],E2=T(gp,JU,e=>{var{Node:r}=e;class t extends r{constructor(i){if(super(),this.items=i||[],!Array.isArray(this.items)||!this.items.every(Sr))throw new TypeError("Array containing Nodes expected")}get type(){return gp}get isArrayNode(){return!0}_compile(i,a){var s=Rn(this.items,function(o){return o._compile(i,a)}),l=i.config.matrix!=="Array";if(l){var f=i.matrix;return function(u,p,h){return f(Rn(s,function(d){return d(u,p,h)}))}}else return function(u,p,h){return Rn(s,function(d){return d(u,p,h)})}}forEach(i){for(var a=0;a['+a.join(',')+']'}_toTex(i){function a(s,l){var f=s.some($t)&&!s.every($t),o=l||f,u=o?"&":"\\\\\\\\",p=s.map(function(h){return h.items?a(h.items,!l):h.toTex(i)}).join(u);return f||!o||o&&!l?"\\\\begin{bmatrix}"+p+"\\\\end{bmatrix}":p}return a(this.items,!1)}}return Ur(t,"name",gp),t},{isClass:!0,isNode:!0});function C2(e){var{subset:r,matrix:t}=e;return function(i,a,s){try{if(Array.isArray(i)){var l=t(i).subset(a,s).valueOf();return l.forEach((f,o)=>{i[o]=f}),i}else{if(i&&typeof i.subset=="function")return i.subset(a,s);if(typeof i=="string")return r(i,a,s);if(typeof i=="object"){if(!a.isObjectProperty())throw TypeError("Cannot apply a numeric index as object property");return ca(i,a.getObjectProperty(),s),i}else throw new TypeError("Cannot apply index: unsupported type of object")}}catch(f){throw lt(f)}}}var yi=[{AssignmentNode:{},FunctionAssignmentNode:{}},{ConditionalNode:{latexLeftParens:!1,latexRightParens:!1,latexParens:!1}},{"OperatorNode:or":{op:"or",associativity:"left",associativeWith:[]}},{"OperatorNode:xor":{op:"xor",associativity:"left",associativeWith:[]}},{"OperatorNode:and":{op:"and",associativity:"left",associativeWith:[]}},{"OperatorNode:bitOr":{op:"|",associativity:"left",associativeWith:[]}},{"OperatorNode:bitXor":{op:"^|",associativity:"left",associativeWith:[]}},{"OperatorNode:bitAnd":{op:"&",associativity:"left",associativeWith:[]}},{"OperatorNode:equal":{op:"==",associativity:"left",associativeWith:[]},"OperatorNode:unequal":{op:"!=",associativity:"left",associativeWith:[]},"OperatorNode:smaller":{op:"<",associativity:"left",associativeWith:[]},"OperatorNode:larger":{op:">",associativity:"left",associativeWith:[]},"OperatorNode:smallerEq":{op:"<=",associativity:"left",associativeWith:[]},"OperatorNode:largerEq":{op:">=",associativity:"left",associativeWith:[]},RelationalNode:{associativity:"left",associativeWith:[]}},{"OperatorNode:leftShift":{op:"<<",associativity:"left",associativeWith:[]},"OperatorNode:rightArithShift":{op:">>",associativity:"left",associativeWith:[]},"OperatorNode:rightLogShift":{op:">>>",associativity:"left",associativeWith:[]}},{"OperatorNode:to":{op:"to",associativity:"left",associativeWith:[]}},{RangeNode:{}},{"OperatorNode:add":{op:"+",associativity:"left",associativeWith:["OperatorNode:add","OperatorNode:subtract"]},"OperatorNode:subtract":{op:"-",associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{op:"*",associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]},"OperatorNode:divide":{op:"/",associativity:"left",associativeWith:[],latexLeftParens:!1,latexRightParens:!1,latexParens:!1},"OperatorNode:dotMultiply":{op:".*",associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","OperatorNode:dotMultiply","OperatorNode:doDivide"]},"OperatorNode:dotDivide":{op:"./",associativity:"left",associativeWith:[]},"OperatorNode:mod":{op:"mod",associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]}},{"OperatorNode:unaryPlus":{op:"+",associativity:"right"},"OperatorNode:unaryMinus":{op:"-",associativity:"right"},"OperatorNode:bitNot":{op:"~",associativity:"right"},"OperatorNode:not":{op:"not",associativity:"right"}},{"OperatorNode:pow":{op:"^",associativity:"right",associativeWith:[],latexRightParens:!1},"OperatorNode:dotPow":{op:".^",associativity:"right",associativeWith:[]}},{"OperatorNode:factorial":{op:"!",associativity:"left"}},{"OperatorNode:ctranspose":{op:"'",associativity:"left"}}];function xp(e,r){if(!r||r!=="auto")return e;for(var t=e;Zt(t);)t=t.content;return t}function Gr(e,r,t,n){var i=e;r!=="keep"&&(i=e.getContent());for(var a=i.getIdentifier(),s=null,l=0;l{var{subset:r,matrix:t,Node:n}=e,i=dp({subset:r}),a=C2({subset:r,matrix:t});function s(f,o,u){o||(o="keep");var p=Gr(f,o,u),h=Gr(f.value,o,u);return o==="all"||h!==null&&h<=p}class l extends n{constructor(o,u,p){if(super(),this.object=o,this.index=p?u:null,this.value=p||u,!rt(o)&&!Sn(o))throw new TypeError('SymbolNode or AccessorNode expected as "object"');if(rt(o)&&o.name==="end")throw new Error('Cannot assign to symbol "end"');if(this.index&&!kn(this.index))throw new TypeError('IndexNode expected as "index"');if(!Sr(this.value))throw new TypeError('Node expected as "value"')}get name(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}get type(){return bp}get isAssignmentNode(){return!0}_compile(o,u){var p=this.object._compile(o,u),h=this.index?this.index._compile(o,u):null,d=this.value._compile(o,u),x=this.object.name;if(this.index)if(this.index.isObjectProperty()){var v=this.index.getObjectProperty();return function(A,E,S){var O=p(A,E,S),F=d(A,E,S);return ca(O,v,F),F}}else{if(rt(this.object))return function(A,E,S){var O=p(A,E,S),F=d(A,E,S),M=h(A,E,O);return A.set(x,a(O,M,F)),F};var y=this.object.object._compile(o,u);if(this.object.index.isObjectProperty()){var w=this.object.index.getObjectProperty();return function(A,E,S){var O=y(A,E,S),F=gt(O,w),M=h(A,E,F),_=d(A,E,S);return ca(O,w,a(F,M,_)),_}}else{var C=this.object.index._compile(o,u);return function(A,E,S){var O=y(A,E,S),F=C(A,E,O),M=i(O,F),_=h(A,E,M),k=d(A,E,S);return a(O,F,a(M,_,k)),k}}}else{if(!rt(this.object))throw new TypeError("SymbolNode expected as object");return function(A,E,S){var O=d(A,E,S);return A.set(x,O),O}}}forEach(o){o(this.object,"object",this),this.index&&o(this.index,"index",this),o(this.value,"value",this)}map(o){var u=this._ifNode(o(this.object,"object",this)),p=this.index?this._ifNode(o(this.index,"index",this)):null,h=this._ifNode(o(this.value,"value",this));return new l(u,p,h)}clone(){return new l(this.object,this.index,this.value)}_toString(o){var u=this.object.toString(o),p=this.index?this.index.toString(o):"",h=this.value.toString(o);return s(this,o&&o.parenthesis,o&&o.implicit)&&(h="("+h+")"),u+p+" = "+h}toJSON(){return{mathjs:bp,object:this.object,index:this.index,value:this.value}}static fromJSON(o){return new l(o.object,o.index,o.value)}_toHTML(o){var u=this.object.toHTML(o),p=this.index?this.index.toHTML(o):"",h=this.value.toHTML(o);return s(this,o&&o.parenthesis,o&&o.implicit)&&(h='('+h+')'),u+p+'='+h}_toTex(o){var u=this.object.toTex(o),p=this.index?this.index.toTex(o):"",h=this.value.toTex(o);return s(this,o&&o.parenthesis,o&&o.implicit)&&(h="\\\\left(".concat(h,"\\\\right)")),u+p+"="+h}}return Ur(l,"name",bp),l},{isClass:!0,isNode:!0});var wp="BlockNode",jU=["ResultSet","Node"],T2=T(wp,jU,e=>{var{ResultSet:r,Node:t}=e;class n extends t{constructor(a){if(super(),!Array.isArray(a))throw new Error("Array expected");this.blocks=a.map(function(s){var l=s&&s.node,f=s&&s.visible!==void 0?s.visible:!0;if(!Sr(l))throw new TypeError('Property "node" must be a Node');if(typeof f!="boolean")throw new TypeError('Property "visible" must be a boolean');return{node:l,visible:f}})}get type(){return wp}get isBlockNode(){return!0}_compile(a,s){var l=Rn(this.blocks,function(f){return{evaluate:f.node._compile(a,s),visible:f.visible}});return function(o,u,p){var h=[];return ho(l,function(x){var v=x.evaluate(o,u,p);x.visible&&h.push(v)}),new r(h)}}forEach(a){for(var s=0;s;')}).join('
')}_toTex(a){return this.blocks.map(function(s){return s.node.toTex(a)+(s.visible?"":";")}).join(\`\\\\;\\\\; -\`)}}return Ur(n,"name",wp),n},{isClass:!0,isNode:!0});var Dp="ConditionalNode",ez=["Node"],F2=T(Dp,ez,e=>{var{Node:r}=e;function t(i){if(typeof i=="number"||typeof i=="boolean"||typeof i=="string")return!!i;if(i){if(je(i))return!i.isZero();if(Gt(i))return!!(i.re||i.im);if(qt(i))return!!i.value}if(i==null)return!1;throw new TypeError('Unsupported type of condition "'+_r(i)+'"')}class n extends r{constructor(a,s,l){if(super(),!Sr(a))throw new TypeError("Parameter condition must be a Node");if(!Sr(s))throw new TypeError("Parameter trueExpr must be a Node");if(!Sr(l))throw new TypeError("Parameter falseExpr must be a Node");this.condition=a,this.trueExpr=s,this.falseExpr=l}get type(){return Dp}get isConditionalNode(){return!0}_compile(a,s){var l=this.condition._compile(a,s),f=this.trueExpr._compile(a,s),o=this.falseExpr._compile(a,s);return function(p,h,d){return t(l(p,h,d))?f(p,h,d):o(p,h,d)}}forEach(a){a(this.condition,"condition",this),a(this.trueExpr,"trueExpr",this),a(this.falseExpr,"falseExpr",this)}map(a){return new n(this._ifNode(a(this.condition,"condition",this)),this._ifNode(a(this.trueExpr,"trueExpr",this)),this._ifNode(a(this.falseExpr,"falseExpr",this)))}clone(){return new n(this.condition,this.trueExpr,this.falseExpr)}_toString(a){var s=a&&a.parenthesis?a.parenthesis:"keep",l=Gr(this,s,a&&a.implicit),f=this.condition.toString(a),o=Gr(this.condition,s,a&&a.implicit);(s==="all"||this.condition.type==="OperatorNode"||o!==null&&o<=l)&&(f="("+f+")");var u=this.trueExpr.toString(a),p=Gr(this.trueExpr,s,a&&a.implicit);(s==="all"||this.trueExpr.type==="OperatorNode"||p!==null&&p<=l)&&(u="("+u+")");var h=this.falseExpr.toString(a),d=Gr(this.falseExpr,s,a&&a.implicit);return(s==="all"||this.falseExpr.type==="OperatorNode"||d!==null&&d<=l)&&(h="("+h+")"),f+" ? "+u+" : "+h}toJSON(){return{mathjs:Dp,condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}}static fromJSON(a){return new n(a.condition,a.trueExpr,a.falseExpr)}_toHTML(a){var s=a&&a.parenthesis?a.parenthesis:"keep",l=Gr(this,s,a&&a.implicit),f=this.condition.toHTML(a),o=Gr(this.condition,s,a&&a.implicit);(s==="all"||this.condition.type==="OperatorNode"||o!==null&&o<=l)&&(f='('+f+')');var u=this.trueExpr.toHTML(a),p=Gr(this.trueExpr,s,a&&a.implicit);(s==="all"||this.trueExpr.type==="OperatorNode"||p!==null&&p<=l)&&(u='('+u+')');var h=this.falseExpr.toHTML(a),d=Gr(this.falseExpr,s,a&&a.implicit);return(s==="all"||this.falseExpr.type==="OperatorNode"||d!==null&&d<=l)&&(h='('+h+')'),f+'?'+u+':'+h}_toTex(a){return"\\\\begin{cases} {"+this.trueExpr.toTex(a)+"}, &\\\\quad{\\\\text{if }\\\\;"+this.condition.toTex(a)+"}\\\\\\\\{"+this.falseExpr.toTex(a)+"}, &\\\\quad{\\\\text{otherwise}}\\\\end{cases}"}}return Ur(n,"name",Dp),n},{isClass:!0,isNode:!0});var P2=ci(B2(),1);var mg={Alpha:"A",alpha:"\\\\alpha",Beta:"B",beta:"\\\\beta",Gamma:"\\\\Gamma",gamma:"\\\\gamma",Delta:"\\\\Delta",delta:"\\\\delta",Epsilon:"E",epsilon:"\\\\epsilon",varepsilon:"\\\\varepsilon",Zeta:"Z",zeta:"\\\\zeta",Eta:"H",eta:"\\\\eta",Theta:"\\\\Theta",theta:"\\\\theta",vartheta:"\\\\vartheta",Iota:"I",iota:"\\\\iota",Kappa:"K",kappa:"\\\\kappa",varkappa:"\\\\varkappa",Lambda:"\\\\Lambda",lambda:"\\\\lambda",Mu:"M",mu:"\\\\mu",Nu:"N",nu:"\\\\nu",Xi:"\\\\Xi",xi:"\\\\xi",Omicron:"O",omicron:"o",Pi:"\\\\Pi",pi:"\\\\pi",varpi:"\\\\varpi",Rho:"P",rho:"\\\\rho",varrho:"\\\\varrho",Sigma:"\\\\Sigma",sigma:"\\\\sigma",varsigma:"\\\\varsigma",Tau:"T",tau:"\\\\tau",Upsilon:"\\\\Upsilon",upsilon:"\\\\upsilon",Phi:"\\\\Phi",phi:"\\\\phi",varphi:"\\\\varphi",Chi:"X",chi:"\\\\chi",Psi:"\\\\Psi",psi:"\\\\psi",Omega:"\\\\Omega",omega:"\\\\omega",true:"\\\\mathrm{True}",false:"\\\\mathrm{False}",i:"i",inf:"\\\\infty",Inf:"\\\\infty",infinity:"\\\\infty",Infinity:"\\\\infty",oo:"\\\\infty",lim:"\\\\lim",undefined:"\\\\mathbf{?}"},zr={transpose:"^\\\\top",ctranspose:"^H",factorial:"!",pow:"^",dotPow:".^\\\\wedge",unaryPlus:"+",unaryMinus:"-",bitNot:"\\\\~",not:"\\\\neg",multiply:"\\\\cdot",divide:"\\\\frac",dotMultiply:".\\\\cdot",dotDivide:".:",mod:"\\\\mod",add:"+",subtract:"-",to:"\\\\rightarrow",leftShift:"<<",rightArithShift:">>",rightLogShift:">>>",equal:"=",unequal:"\\\\neq",smaller:"<",larger:">",smallerEq:"\\\\leq",largerEq:"\\\\geq",bitAnd:"\\\\&",bitXor:"\\\\underline{|}",bitOr:"|",and:"\\\\wedge",xor:"\\\\veebar",or:"\\\\vee"},hg={abs:{1:"\\\\left|\${args[0]}\\\\right|"},add:{2:"\\\\left(\${args[0]}".concat(zr.add,"\${args[1]}\\\\right)")},cbrt:{1:"\\\\sqrt[3]{\${args[0]}}"},ceil:{1:"\\\\left\\\\lceil\${args[0]}\\\\right\\\\rceil"},cube:{1:"\\\\left(\${args[0]}\\\\right)^3"},divide:{2:"\\\\frac{\${args[0]}}{\${args[1]}}"},dotDivide:{2:"\\\\left(\${args[0]}".concat(zr.dotDivide,"\${args[1]}\\\\right)")},dotMultiply:{2:"\\\\left(\${args[0]}".concat(zr.dotMultiply,"\${args[1]}\\\\right)")},dotPow:{2:"\\\\left(\${args[0]}".concat(zr.dotPow,"\${args[1]}\\\\right)")},exp:{1:"\\\\exp\\\\left(\${args[0]}\\\\right)"},expm1:"\\\\left(e".concat(zr.pow,"{\${args[0]}}-1\\\\right)"),fix:{1:"\\\\mathrm{\${name}}\\\\left(\${args[0]}\\\\right)"},floor:{1:"\\\\left\\\\lfloor\${args[0]}\\\\right\\\\rfloor"},gcd:"\\\\gcd\\\\left(\${args}\\\\right)",hypot:"\\\\hypot\\\\left(\${args}\\\\right)",log:{1:"\\\\ln\\\\left(\${args[0]}\\\\right)",2:"\\\\log_{\${args[1]}}\\\\left(\${args[0]}\\\\right)"},log10:{1:"\\\\log_{10}\\\\left(\${args[0]}\\\\right)"},log1p:{1:"\\\\ln\\\\left(\${args[0]}+1\\\\right)",2:"\\\\log_{\${args[1]}}\\\\left(\${args[0]}+1\\\\right)"},log2:"\\\\log_{2}\\\\left(\${args[0]}\\\\right)",mod:{2:"\\\\left(\${args[0]}".concat(zr.mod,"\${args[1]}\\\\right)")},multiply:{2:"\\\\left(\${args[0]}".concat(zr.multiply,"\${args[1]}\\\\right)")},norm:{1:"\\\\left\\\\|\${args[0]}\\\\right\\\\|",2:void 0},nthRoot:{2:"\\\\sqrt[\${args[1]}]{\${args[0]}}"},nthRoots:{2:"\\\\{y : $y^{args[1]} = {\${args[0]}}\\\\}"},pow:{2:"\\\\left(\${args[0]}\\\\right)".concat(zr.pow,"{\${args[1]}}")},round:{1:"\\\\left\\\\lfloor\${args[0]}\\\\right\\\\rceil",2:void 0},sign:{1:"\\\\mathrm{\${name}}\\\\left(\${args[0]}\\\\right)"},sqrt:{1:"\\\\sqrt{\${args[0]}}"},square:{1:"\\\\left(\${args[0]}\\\\right)^2"},subtract:{2:"\\\\left(\${args[0]}".concat(zr.subtract,"\${args[1]}\\\\right)")},unaryMinus:{1:"".concat(zr.unaryMinus,"\\\\left(\${args[0]}\\\\right)")},unaryPlus:{1:"".concat(zr.unaryPlus,"\\\\left(\${args[0]}\\\\right)")},bitAnd:{2:"\\\\left(\${args[0]}".concat(zr.bitAnd,"\${args[1]}\\\\right)")},bitNot:{1:zr.bitNot+"\\\\left(\${args[0]}\\\\right)"},bitOr:{2:"\\\\left(\${args[0]}".concat(zr.bitOr,"\${args[1]}\\\\right)")},bitXor:{2:"\\\\left(\${args[0]}".concat(zr.bitXor,"\${args[1]}\\\\right)")},leftShift:{2:"\\\\left(\${args[0]}".concat(zr.leftShift,"\${args[1]}\\\\right)")},rightArithShift:{2:"\\\\left(\${args[0]}".concat(zr.rightArithShift,"\${args[1]}\\\\right)")},rightLogShift:{2:"\\\\left(\${args[0]}".concat(zr.rightLogShift,"\${args[1]}\\\\right)")},bellNumbers:{1:"\\\\mathrm{B}_{\${args[0]}}"},catalan:{1:"\\\\mathrm{C}_{\${args[0]}}"},stirlingS2:{2:"\\\\mathrm{S}\\\\left(\${args}\\\\right)"},arg:{1:"\\\\arg\\\\left(\${args[0]}\\\\right)"},conj:{1:"\\\\left(\${args[0]}\\\\right)^*"},im:{1:"\\\\Im\\\\left\\\\lbrace\${args[0]}\\\\right\\\\rbrace"},re:{1:"\\\\Re\\\\left\\\\lbrace\${args[0]}\\\\right\\\\rbrace"},and:{2:"\\\\left(\${args[0]}".concat(zr.and,"\${args[1]}\\\\right)")},not:{1:zr.not+"\\\\left(\${args[0]}\\\\right)"},or:{2:"\\\\left(\${args[0]}".concat(zr.or,"\${args[1]}\\\\right)")},xor:{2:"\\\\left(\${args[0]}".concat(zr.xor,"\${args[1]}\\\\right)")},cross:{2:"\\\\left(\${args[0]}\\\\right)\\\\times\\\\left(\${args[1]}\\\\right)"},ctranspose:{1:"\\\\left(\${args[0]}\\\\right)".concat(zr.ctranspose)},det:{1:"\\\\det\\\\left(\${args[0]}\\\\right)"},dot:{2:"\\\\left(\${args[0]}\\\\cdot\${args[1]}\\\\right)"},expm:{1:"\\\\exp\\\\left(\${args[0]}\\\\right)"},inv:{1:"\\\\left(\${args[0]}\\\\right)^{-1}"},pinv:{1:"\\\\left(\${args[0]}\\\\right)^{+}"},sqrtm:{1:"{\${args[0]}}".concat(zr.pow,"{\\\\frac{1}{2}}")},trace:{1:"\\\\mathrm{tr}\\\\left(\${args[0]}\\\\right)"},transpose:{1:"\\\\left(\${args[0]}\\\\right)".concat(zr.transpose)},combinations:{2:"\\\\binom{\${args[0]}}{\${args[1]}}"},combinationsWithRep:{2:"\\\\left(\\\\!\\\\!{\\\\binom{\${args[0]}}{\${args[1]}}}\\\\!\\\\!\\\\right)"},factorial:{1:"\\\\left(\${args[0]}\\\\right)".concat(zr.factorial)},gamma:{1:"\\\\Gamma\\\\left(\${args[0]}\\\\right)"},lgamma:{1:"\\\\ln\\\\Gamma\\\\left(\${args[0]}\\\\right)"},equal:{2:"\\\\left(\${args[0]}".concat(zr.equal,"\${args[1]}\\\\right)")},larger:{2:"\\\\left(\${args[0]}".concat(zr.larger,"\${args[1]}\\\\right)")},largerEq:{2:"\\\\left(\${args[0]}".concat(zr.largerEq,"\${args[1]}\\\\right)")},smaller:{2:"\\\\left(\${args[0]}".concat(zr.smaller,"\${args[1]}\\\\right)")},smallerEq:{2:"\\\\left(\${args[0]}".concat(zr.smallerEq,"\${args[1]}\\\\right)")},unequal:{2:"\\\\left(\${args[0]}".concat(zr.unequal,"\${args[1]}\\\\right)")},erf:{1:"erf\\\\left(\${args[0]}\\\\right)"},max:"\\\\max\\\\left(\${args}\\\\right)",min:"\\\\min\\\\left(\${args}\\\\right)",variance:"\\\\mathrm{Var}\\\\left(\${args}\\\\right)",acos:{1:"\\\\cos^{-1}\\\\left(\${args[0]}\\\\right)"},acosh:{1:"\\\\cosh^{-1}\\\\left(\${args[0]}\\\\right)"},acot:{1:"\\\\cot^{-1}\\\\left(\${args[0]}\\\\right)"},acoth:{1:"\\\\coth^{-1}\\\\left(\${args[0]}\\\\right)"},acsc:{1:"\\\\csc^{-1}\\\\left(\${args[0]}\\\\right)"},acsch:{1:"\\\\mathrm{csch}^{-1}\\\\left(\${args[0]}\\\\right)"},asec:{1:"\\\\sec^{-1}\\\\left(\${args[0]}\\\\right)"},asech:{1:"\\\\mathrm{sech}^{-1}\\\\left(\${args[0]}\\\\right)"},asin:{1:"\\\\sin^{-1}\\\\left(\${args[0]}\\\\right)"},asinh:{1:"\\\\sinh^{-1}\\\\left(\${args[0]}\\\\right)"},atan:{1:"\\\\tan^{-1}\\\\left(\${args[0]}\\\\right)"},atan2:{2:"\\\\mathrm{atan2}\\\\left(\${args}\\\\right)"},atanh:{1:"\\\\tanh^{-1}\\\\left(\${args[0]}\\\\right)"},cos:{1:"\\\\cos\\\\left(\${args[0]}\\\\right)"},cosh:{1:"\\\\cosh\\\\left(\${args[0]}\\\\right)"},cot:{1:"\\\\cot\\\\left(\${args[0]}\\\\right)"},coth:{1:"\\\\coth\\\\left(\${args[0]}\\\\right)"},csc:{1:"\\\\csc\\\\left(\${args[0]}\\\\right)"},csch:{1:"\\\\mathrm{csch}\\\\left(\${args[0]}\\\\right)"},sec:{1:"\\\\sec\\\\left(\${args[0]}\\\\right)"},sech:{1:"\\\\mathrm{sech}\\\\left(\${args[0]}\\\\right)"},sin:{1:"\\\\sin\\\\left(\${args[0]}\\\\right)"},sinh:{1:"\\\\sinh\\\\left(\${args[0]}\\\\right)"},tan:{1:"\\\\tan\\\\left(\${args[0]}\\\\right)"},tanh:{1:"\\\\tanh\\\\left(\${args[0]}\\\\right)"},to:{2:"\\\\left(\${args[0]}".concat(zr.to,"\${args[1]}\\\\right)")},numeric:function(r,t){return r.args[0].toTex()},number:{0:"0",1:"\\\\left(\${args[0]}\\\\right)",2:"\\\\left(\\\\left(\${args[0]}\\\\right)\${args[1]}\\\\right)"},string:{0:'\\\\mathtt{""}',1:"\\\\mathrm{string}\\\\left(\${args[0]}\\\\right)"},bignumber:{0:"0",1:"\\\\left(\${args[0]}\\\\right)"},complex:{0:"0",1:"\\\\left(\${args[0]}\\\\right)",2:"\\\\left(\\\\left(\${args[0]}\\\\right)+".concat(mg.i,"\\\\cdot\\\\left(\${args[1]}\\\\right)\\\\right)")},matrix:{0:"\\\\begin{bmatrix}\\\\end{bmatrix}",1:"\\\\left(\${args[0]}\\\\right)",2:"\\\\left(\${args[0]}\\\\right)"},sparse:{0:"\\\\begin{bsparse}\\\\end{bsparse}",1:"\\\\left(\${args[0]}\\\\right)"},unit:{1:"\\\\left(\${args[0]}\\\\right)",2:"\\\\left(\\\\left(\${args[0]}\\\\right)\${args[1]}\\\\right)"}},k2="\\\\mathrm{\${name}}\\\\left(\${args}\\\\right)",I2={deg:"^\\\\circ"};function Sp(e){return(0,P2.default)(e,{preserveFormatting:!0})}function Np(e,r){return r=typeof r>"u"?!1:r,r?$e(I2,e)?I2[e]:"\\\\mathrm{"+Sp(e)+"}":$e(mg,e)?mg[e]:Sp(e)}var Ap="ConstantNode",iz=["Node"],R2=T(Ap,iz,e=>{var{Node:r}=e;class t extends r{constructor(i){super(),this.value=i}get type(){return Ap}get isConstantNode(){return!0}_compile(i,a){var s=this.value;return function(){return s}}forEach(i){}map(i){return this.clone()}clone(){return new t(this.value)}_toString(i){return lr(this.value,i)}_toHTML(i){var a=this._toString(i);switch(_r(this.value)){case"number":case"BigNumber":case"Fraction":return''+a+"";case"string":return''+a+"";case"boolean":return''+a+"";case"null":return''+a+"";case"undefined":return''+a+"";default:return''+a+""}}toJSON(){return{mathjs:Ap,value:this.value}}static fromJSON(i){return new t(i.value)}_toTex(i){var a=this._toString(i),s=_r(this.value);switch(s){case"string":return"\\\\mathtt{"+Sp(a)+"}";case"number":case"BigNumber":{var l=s==="BigNumber"?this.value.isFinite():isFinite(this.value);if(!l)return this.value.valueOf()<0?"-\\\\infty":"\\\\infty";var f=a.toLowerCase().indexOf("e");return f!==-1?a.substring(0,f)+"\\\\cdot10^{"+a.substring(f+1)+"}":a}case"Fraction":return this.value.toLatex();default:return a}}}return Ur(t,"name",Ap),t},{isClass:!0,isNode:!0});var Ep="FunctionAssignmentNode",az=["typed","Node"],L2=T(Ep,az,e=>{var{typed:r,Node:t}=e;function n(a,s,l){var f=Gr(a,s,l),o=Gr(a.expr,s,l);return s==="all"||o!==null&&o<=f}class i extends t{constructor(s,l,f){if(super(),typeof s!="string")throw new TypeError('String expected for parameter "name"');if(!Array.isArray(l))throw new TypeError('Array containing strings or objects expected for parameter "params"');if(!Sr(f))throw new TypeError('Node expected for parameter "expr"');if(hp.has(s))throw new Error('Illegal function name, "'+s+'" is a reserved keyword');var o=new Set;for(var u of l){var p=typeof u=="string"?u:u.name;if(o.has(p))throw new Error('Duplicate parameter name "'.concat(p,'"'));o.add(p)}this.name=s,this.params=l.map(function(h){return h&&h.name||h}),this.types=l.map(function(h){return h&&h.type||"any"}),this.expr=f}get type(){return Ep}get isFunctionAssignmentNode(){return!0}_compile(s,l){var f=Object.create(l);ho(this.params,function(x){f[x]=!0});var o=this.expr._compile(s,f),u=this.name,p=this.params,h=Hd(this.types,","),d=u+"("+Hd(this.params,", ")+")";return function(v,y,w){var C={};C[h]=function(){for(var A=Object.create(y),E=0;E'+Qt(this.params[o])+"");var u=this.expr.toHTML(s);return n(this,l,s&&s.implicit)&&(u='('+u+')'),''+Qt(this.name)+'('+f.join(',')+')='+u}_toTex(s){var l=s&&s.parenthesis?s.parenthesis:"keep",f=this.expr.toTex(s);return n(this,l,s&&s.implicit)&&(f="\\\\left(".concat(f,"\\\\right)")),"\\\\mathrm{"+this.name+"}\\\\left("+this.params.map(Np).join(",")+"\\\\right)="+f}}return Ur(i,"name",Ep),i},{isClass:!0,isNode:!0});var Cp="IndexNode",oz=["Node","size"],q2=T(Cp,oz,e=>{var{Node:r,size:t}=e;class n extends r{constructor(a,s){if(super(),this.dimensions=a,this.dotNotation=s||!1,!Array.isArray(a)||!a.every(Sr))throw new TypeError('Array containing Nodes expected for parameter "dimensions"');if(this.dotNotation&&!this.isObjectProperty())throw new Error("dotNotation only applicable for object properties")}get type(){return Cp}get isIndexNode(){return!0}_compile(a,s){var l=Rn(this.dimensions,function(o,u){var p=o.filter(x=>x.isSymbolNode&&x.name==="end").length>0;if(p){var h=Object.create(s);h.end=!0;var d=o._compile(a,h);return function(v,y,w){if(!Ge(w)&&!Ar(w)&&!yt(w))throw new TypeError('Cannot resolve "end": context must be a Matrix, Array, or string but is '+_r(w));var C=t(w).valueOf(),b=Object.create(y);return b.end=C[u],d(v,b,w)}}else return o._compile(a,s)}),f=gt(a,"index");return function(u,p,h){var d=Rn(l,function(x){return x(u,p,h)});return f(...d)}}forEach(a){for(var s=0;s.'+Qt(this.getObjectProperty())+"":'['+s.join(',')+']'}_toTex(a){var s=this.dimensions.map(function(l){return l.toTex(a)});return this.dotNotation?"."+this.getObjectProperty():"_{"+s.join(",")+"}"}}return Ur(n,"name",Cp),n},{isClass:!0,isNode:!0});var Mp="ObjectNode",sz=["Node"],U2=T(Mp,sz,e=>{var{Node:r}=e;class t extends r{constructor(i){if(super(),this.properties=i||{},i&&(typeof i!="object"||!Object.keys(i).every(function(a){return Sr(i[a])})))throw new TypeError("Object containing Nodes expected")}get type(){return Mp}get isObjectNode(){return!0}_compile(i,a){var s={};for(var l in this.properties)if($e(this.properties,l)){var f=Ko(l),o=JSON.parse(f),u=gt(this.properties,l);s[o]=u._compile(i,a)}return function(h,d,x){var v={};for(var y in s)$e(s,y)&&(v[y]=s[y](h,d,x));return v}}forEach(i){for(var a in this.properties)$e(this.properties,a)&&i(this.properties[a],"properties["+Ko(a)+"]",this)}map(i){var a={};for(var s in this.properties)$e(this.properties,s)&&(a[s]=this._ifNode(i(this.properties[s],"properties["+Ko(s)+"]",this)));return new t(a)}clone(){var i={};for(var a in this.properties)$e(this.properties,a)&&(i[a]=this.properties[a]);return new t(i)}_toString(i){var a=[];for(var s in this.properties)$e(this.properties,s)&&a.push(Ko(s)+": "+this.properties[s].toString(i));return"{"+a.join(", ")+"}"}toJSON(){return{mathjs:Mp,properties:this.properties}}static fromJSON(i){return new t(i.properties)}_toHTML(i){var a=[];for(var s in this.properties)$e(this.properties,s)&&a.push(''+Qt(s)+':'+this.properties[s].toHTML(i));return'{'+a.join(',')+'}'}_toTex(i){var a=[];for(var s in this.properties)$e(this.properties,s)&&a.push("\\\\mathbf{"+s+":} & "+this.properties[s].toTex(i)+"\\\\\\\\");var l="\\\\left\\\\{\\\\begin{array}{ll}"+a.join(\` -\`)+"\\\\end{array}\\\\right\\\\}";return l}}return Ur(t,"name",Mp),t},{isClass:!0,isNode:!0});function os(e,r){return new eu(e,new rs(r),new Set(Object.keys(r)))}var _p="OperatorNode",uz=["Node"],z2=T(_p,uz,e=>{var{Node:r}=e;function t(a,s){var l=a;if(s==="auto")for(;Zt(l);)l=l.content;return yr(l)?!0:ut(l)?t(l.args[0],s):!1}function n(a,s,l,f,o){var u=Gr(a,s,l),p=hu(a,s);if(s==="all"||f.length>2&&a.getIdentifier()!=="OperatorNode:add"&&a.getIdentifier()!=="OperatorNode:multiply")return f.map(function(_){switch(_.getContent().type){case"ArrayNode":case"ConstantNode":case"SymbolNode":case"ParenthesisNode":return!1;default:return!0}});var h;switch(f.length){case 0:h=[];break;case 1:{var d=Gr(f[0],s,l,a);if(o&&d!==null){var x,v;if(s==="keep"?(x=f[0].getIdentifier(),v=a.getIdentifier()):(x=f[0].getContent().getIdentifier(),v=a.getContent().getIdentifier()),yi[u][v].latexLeftParens===!1){h=[!1];break}if(yi[d][x].latexParens===!1){h=[!1];break}}if(d===null){h=[!1];break}if(d<=u){h=[!0];break}h=[!1]}break;case 2:{var y,w=Gr(f[0],s,l,a),C=yp(a,f[0],s);w===null?y=!1:w===u&&p==="right"&&!C||w=2&&a.getIdentifier()==="OperatorNode:multiply"&&a.implicit&&s!=="all"&&l==="hide")for(var M=1;M2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var y=o.map(function(w,C){return w=w.toString(s),u[C]&&(w="("+w+")"),w});return this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&f==="hide"?y.join(" "):y.join(" "+this.op+" ")}else return this.fn+"("+this.args.join(", ")+")"}toJSON(){return{mathjs:_p,op:this.op,fn:this.fn,args:this.args,implicit:this.implicit,isPercentage:this.isPercentage}}static fromJSON(s){return new i(s.op,s.fn,s.args,s.implicit,s.isPercentage)}_toHTML(s){var l=s&&s.parenthesis?s.parenthesis:"keep",f=s&&s.implicit?s.implicit:"hide",o=this.args,u=n(this,l,f,o,!1);if(o.length===1){var p=hu(this,l),h=o[0].toHTML(s);return u[0]&&(h='('+h+')'),p==="right"?''+Qt(this.op)+""+h:h+''+Qt(this.op)+""}else if(o.length===2){var d=o[0].toHTML(s),x=o[1].toHTML(s);return u[0]&&(d='('+d+')'),u[1]&&(x='('+x+')'),this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&f==="hide"?d+''+x:d+''+Qt(this.op)+""+x}else{var v=o.map(function(y,w){return y=y.toHTML(s),u[w]&&(y='('+y+')'),y});return o.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")?this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&f==="hide"?v.join(''):v.join(''+Qt(this.op)+""):''+Qt(this.fn)+'('+v.join(',')+')'}}_toTex(s){var l=s&&s.parenthesis?s.parenthesis:"keep",f=s&&s.implicit?s.implicit:"hide",o=this.args,u=n(this,l,f,o,!0),p=zr[this.fn];if(p=typeof p>"u"?this.op:p,o.length===1){var h=hu(this,l),d=o[0].toTex(s);return u[0]&&(d="\\\\left(".concat(d,"\\\\right)")),h==="right"?p+d:d+p}else if(o.length===2){var x=o[0],v=x.toTex(s);u[0]&&(v="\\\\left(".concat(v,"\\\\right)"));var y=o[1],w=y.toTex(s);u[1]&&(w="\\\\left(".concat(w,"\\\\right)"));var C;switch(l==="keep"?C=x.getIdentifier():C=x.getContent().getIdentifier(),this.getIdentifier()){case"OperatorNode:divide":return p+"{"+v+"}{"+w+"}";case"OperatorNode:pow":switch(v="{"+v+"}",w="{"+w+"}",C){case"ConditionalNode":case"OperatorNode:divide":v="\\\\left(".concat(v,"\\\\right)")}break;case"OperatorNode:multiply":if(this.implicit&&f==="hide")return v+"~"+w}return v+p+w}else if(o.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var b=o.map(function(A,E){return A=A.toTex(s),u[E]&&(A="\\\\left(".concat(A,"\\\\right)")),A});return this.getIdentifier()==="OperatorNode:multiply"&&this.implicit&&f==="hide"?b.join("~"):b.join(p)}else return"\\\\mathrm{"+this.fn+"}\\\\left("+o.map(function(A){return A.toTex(s)}).join(",")+"\\\\right)"}getIdentifier(){return this.type+":"+this.fn}}return Ur(i,"name",_p),i},{isClass:!0,isNode:!0});var Tp="ParenthesisNode",fz=["Node"],W2=T(Tp,fz,e=>{var{Node:r}=e;class t extends r{constructor(i){if(super(),!Sr(i))throw new TypeError('Node expected for parameter "content"');this.content=i}get type(){return Tp}get isParenthesisNode(){return!0}_compile(i,a){return this.content._compile(i,a)}getContent(){return this.content.getContent()}forEach(i){i(this.content,"content",this)}map(i){var a=i(this.content,"content",this);return new t(a)}clone(){return new t(this.content)}_toString(i){return!i||i&&!i.parenthesis||i&&i.parenthesis==="keep"?"("+this.content.toString(i)+")":this.content.toString(i)}toJSON(){return{mathjs:Tp,content:this.content}}static fromJSON(i){return new t(i.content)}_toHTML(i){return!i||i&&!i.parenthesis||i&&i.parenthesis==="keep"?'('+this.content.toHTML(i)+')':this.content.toHTML(i)}_toTex(i){return!i||i&&!i.parenthesis||i&&i.parenthesis==="keep"?"\\\\left(".concat(this.content.toTex(i),"\\\\right)"):this.content.toTex(i)}}return Ur(t,"name",Tp),t},{isClass:!0,isNode:!0});var Fp="RangeNode",lz=["Node"],V2=T(Fp,lz,e=>{var{Node:r}=e;function t(i,a,s){var l=Gr(i,a,s),f={},o=Gr(i.start,a,s);if(f.start=o!==null&&o<=l||a==="all",i.step){var u=Gr(i.step,a,s);f.step=u!==null&&u<=l||a==="all"}var p=Gr(i.end,a,s);return f.end=p!==null&&p<=l||a==="all",f}class n extends r{constructor(a,s,l){if(super(),!Sr(a))throw new TypeError("Node expected");if(!Sr(s))throw new TypeError("Node expected");if(l&&!Sr(l))throw new TypeError("Node expected");if(arguments.length>3)throw new Error("Too many arguments");this.start=a,this.end=s,this.step=l||null}get type(){return Fp}get isRangeNode(){return!0}needsEnd(){var a=this.filter(function(s){return rt(s)&&s.name==="end"});return a.length>0}_compile(a,s){var l=a.range,f=this.start._compile(a,s),o=this.end._compile(a,s);if(this.step){var u=this.step._compile(a,s);return function(h,d,x){return l(f(h,d,x),o(h,d,x),u(h,d,x))}}else return function(h,d,x){return l(f(h,d,x),o(h,d,x))}}forEach(a){a(this.start,"start",this),a(this.end,"end",this),this.step&&a(this.step,"step",this)}map(a){return new n(this._ifNode(a(this.start,"start",this)),this._ifNode(a(this.end,"end",this)),this.step&&this._ifNode(a(this.step,"step",this)))}clone(){return new n(this.start,this.end,this.step&&this.step)}_toString(a){var s=a&&a.parenthesis?a.parenthesis:"keep",l=t(this,s,a&&a.implicit),f,o=this.start.toString(a);if(l.start&&(o="("+o+")"),f=o,this.step){var u=this.step.toString(a);l.step&&(u="("+u+")"),f+=":"+u}var p=this.end.toString(a);return l.end&&(p="("+p+")"),f+=":"+p,f}toJSON(){return{mathjs:Fp,start:this.start,end:this.end,step:this.step}}static fromJSON(a){return new n(a.start,a.end,a.step)}_toHTML(a){var s=a&&a.parenthesis?a.parenthesis:"keep",l=t(this,s,a&&a.implicit),f,o=this.start.toHTML(a);if(l.start&&(o='('+o+')'),f=o,this.step){var u=this.step.toHTML(a);l.step&&(u='('+u+')'),f+=':'+u}var p=this.end.toHTML(a);return l.end&&(p='('+p+')'),f+=':'+p,f}_toTex(a){var s=a&&a.parenthesis?a.parenthesis:"keep",l=t(this,s,a&&a.implicit),f=this.start.toTex(a);if(l.start&&(f="\\\\left(".concat(f,"\\\\right)")),this.step){var o=this.step.toTex(a);l.step&&(o="\\\\left(".concat(o,"\\\\right)")),f+=":"+o}var u=this.end.toTex(a);return l.end&&(u="\\\\left(".concat(u,"\\\\right)")),f+=":"+u,f}}return Ur(n,"name",Fp),n},{isClass:!0,isNode:!0});var Op="RelationalNode",cz=["Node"],Y2=T(Op,cz,e=>{var{Node:r}=e,t={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="};class n extends r{constructor(a,s){if(super(),!Array.isArray(a))throw new TypeError("Parameter conditionals must be an array");if(!Array.isArray(s))throw new TypeError("Parameter params must be an array");if(a.length!==s.length-1)throw new TypeError("Parameter params must contain exactly one more element than parameter conditionals");this.conditionals=a,this.params=s}get type(){return Op}get isRelationalNode(){return!0}_compile(a,s){var l=this,f=this.params.map(o=>o._compile(a,s));return function(u,p,h){for(var d,x=f[0](u,p,h),v=0;va(s,"params["+l+"]",this),this)}map(a){return new n(this.conditionals.slice(),this.params.map((s,l)=>this._ifNode(a(s,"params["+l+"]",this)),this))}clone(){return new n(this.conditionals,this.params)}_toString(a){for(var s=a&&a.parenthesis?a.parenthesis:"keep",l=Gr(this,s,a&&a.implicit),f=this.params.map(function(p,h){var d=Gr(p,s,a&&a.implicit);return s==="all"||d!==null&&d<=l?"("+p.toString(a)+")":p.toString(a)}),o=f[0],u=0;u('+p.toHTML(a)+')':p.toHTML(a)}),o=f[0],u=0;u'+Qt(t[this.conditionals[u]])+""+f[u+1];return o}_toTex(a){for(var s=a&&a.parenthesis?a.parenthesis:"keep",l=Gr(this,s,a&&a.implicit),f=this.params.map(function(p,h){var d=Gr(p,s,a&&a.implicit);return s==="all"||d!==null&&d<=l?"\\\\left("+p.toTex(a)+"\\right)":p.toTex(a)}),o=f[0],u=0;u{var{math:r,Unit:t,Node:n}=e;function i(s){return t?t.isValuelessUnit(s):!1}class a extends n{constructor(l){if(super(),typeof l!="string")throw new TypeError('String expected for parameter "name"');this.name=l}get type(){return"SymbolNode"}get isSymbolNode(){return!0}_compile(l,f){var o=this.name;if(f[o]===!0)return function(p,h,d){return gt(h,o)};if(o in l)return function(p,h,d){return p.has(o)?p.get(o):gt(l,o)};var u=i(o);return function(p,h,d){return p.has(o)?p.get(o):u?new t(null,o):a.onUndefinedSymbol(o)}}forEach(l){}map(l){return this.clone()}static onUndefinedSymbol(l){throw new Error("Undefined symbol "+l)}clone(){return new a(this.name)}_toString(l){return this.name}_toHTML(l){var f=Qt(this.name);return f==="true"||f==="false"?''+f+"":f==="i"?''+f+"":f==="Infinity"?''+f+"":f==="NaN"?''+f+"":f==="null"?''+f+"":f==="undefined"?''+f+"":''+f+""}toJSON(){return{mathjs:"SymbolNode",name:this.name}}static fromJSON(l){return new a(l.name)}_toTex(l){var f=!1;typeof r[this.name]>"u"&&i(this.name)&&(f=!0);var o=Np(this.name,f);return o[0]==="\\\\"?o:" "+o}}return a},{isClass:!0,isNode:!0});var Bp="FunctionNode",hz=["math","Node","SymbolNode"],G2=T(Bp,hz,e=>{var r,{math:t,Node:n,SymbolNode:i}=e,a=f=>lr(f,{truncate:78});function s(f,o,u){for(var p="",h=/\\$(?:\\{([a-z_][a-z_0-9]*)(?:\\[([0-9]+)\\])?\\}|\\$)/gi,d=0,x;(x=h.exec(f))!==null;)if(p+=f.substring(d,x.index),d=x.index,x[0]==="$$")p+="$",d++;else{d+=x[0].length;var v=o[x[1]];if(!v)throw new ReferenceError("Template: Property "+x[1]+" does not exist.");if(x[2]===void 0)switch(typeof v){case"string":p+=v;break;case"object":if(Sr(v))p+=v.toTex(u);else if(Array.isArray(v))p+=v.map(function(y,w){if(Sr(y))return y.toTex(u);throw new TypeError("Template: "+x[1]+"["+w+"] is not a Node.")}).join(",");else throw new TypeError("Template: "+x[1]+" has to be a Node, String or array of Nodes");break;default:throw new TypeError("Template: "+x[1]+" has to be a Node, String or array of Nodes")}else if(Sr(v[x[2]]&&v[x[2]]))p+=v[x[2]].toTex(u);else throw new TypeError("Template: "+x[1]+"["+x[2]+"] is not a Node.")}return p+=f.slice(d),p}class l extends n{constructor(o,u){if(super(),typeof o=="string"&&(o=new i(o)),!Sr(o))throw new TypeError('Node expected as parameter "fn"');if(!Array.isArray(u)||!u.every(Sr))throw new TypeError('Array containing Nodes expected for parameter "args"');this.fn=o,this.args=u||[]}get name(){return this.fn.name||""}get type(){return Bp}get isFunctionNode(){return!0}_compile(o,u){var p=this.args.map(F=>F._compile(o,u));if(rt(this.fn)){var h=this.fn.name;if(u[h]){var w=this.args;return function(M,_,k){var L=gt(_,h);if(typeof L!="function")throw new TypeError("Argument '".concat(h,"' was not a function; received: ").concat(a(L)));if(L.rawArgs)return L(w,o,os(M,_));var Y=p.map($=>$(M,_,k));return L.apply(L,Y)}}else{var d=h in o?gt(o,h):void 0,x=typeof d=="function"&&d.rawArgs===!0,v=F=>{var M;if(F.has(h))M=F.get(h);else if(h in o)M=gt(o,h);else return l.onUndefinedFunction(h);if(typeof M=="function")return M;throw new TypeError("'".concat(h,\`' is not a function; its value is: - \`).concat(a(M)))};if(x){var y=this.args;return function(M,_,k){var L=v(M);return L(y,o,os(M,_))}}else switch(p.length){case 0:return function(M,_,k){var L=v(M);return L()};case 1:return function(M,_,k){var L=v(M),Y=p[0];return L(Y(M,_,k))};case 2:return function(M,_,k){var L=v(M),Y=p[0],$=p[1];return L(Y(M,_,k),$(M,_,k))};default:return function(M,_,k){var L=v(M),Y=p.map($=>$(M,_,k));return L(...Y)}}}}else if(Sn(this.fn)&&kn(this.fn.index)&&this.fn.index.isObjectProperty()){var C=this.fn.object._compile(o,u),b=this.fn.index.getObjectProperty(),A=this.args;return function(M,_,k){var L=C(M,_,k),Y=_y(L,b);if(Y!=null&&Y.rawArgs)return Y(A,o,os(M,_));var $=p.map(V=>V(M,_,k));return Y.apply(L,$)}}else{var E=this.fn.toString(),S=this.fn._compile(o,u),O=this.args;return function(M,_,k){var L=S(M,_,k);if(typeof L!="function")throw new TypeError("Expression '".concat(E,"' did not evaluate to a function; value is:")+\` - \`.concat(a(L)));if(L.rawArgs)return L(O,o,os(M,_));var Y=p.map($=>$(M,_,k));return L.apply(L,Y)}}}forEach(o){o(this.fn,"fn",this);for(var u=0;u'+Qt(this.fn)+'('+u.join(',')+')'}toTex(o){var u;return o&&typeof o.handler=="object"&&$e(o.handler,this.name)&&(u=o.handler[this.name](this,o)),typeof u<"u"?u:super.toTex(o)}_toTex(o){var u=this.args.map(function(d){return d.toTex(o)}),p;hg[this.name]&&(p=hg[this.name]),t[this.name]&&(typeof t[this.name].toTex=="function"||typeof t[this.name].toTex=="object"||typeof t[this.name].toTex=="string")&&(p=t[this.name].toTex);var h;switch(typeof p){case"function":h=p(this,o);break;case"string":h=s(p,this,o);break;case"object":switch(typeof p[u.length]){case"function":h=p[u.length](this,o);break;case"string":h=s(p[u.length],this,o);break}}return typeof h<"u"?h:s(k2,this,o)}getIdentifier(){return this.type+":"+this.name}}return r=l,Ur(l,"name",Bp),Ur(l,"onUndefinedFunction",function(f){throw new Error("Undefined function "+f)}),Ur(l,"fromJSON",function(f){return new r(f.fn,f.args)}),l},{isClass:!0,isNode:!0});var $2="parse",dz=["typed","numeric","config","AccessorNode","ArrayNode","AssignmentNode","BlockNode","ConditionalNode","ConstantNode","FunctionAssignmentNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","RangeNode","RelationalNode","SymbolNode"],Z2=T($2,dz,e=>{var{typed:r,numeric:t,config:n,AccessorNode:i,ArrayNode:a,AssignmentNode:s,BlockNode:l,ConditionalNode:f,ConstantNode:o,FunctionAssignmentNode:u,FunctionNode:p,IndexNode:h,ObjectNode:d,OperatorNode:x,ParenthesisNode:v,RangeNode:y,RelationalNode:w,SymbolNode:C}=e,b=r($2,{string:function(Q){return me(Q,{})},"Array | Matrix":function(Q){return A(Q,{})},"string, Object":function(Q,ve){var Be=ve.nodes!==void 0?ve.nodes:{};return me(Q,Be)},"Array | Matrix, Object":A});function A(B){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ve=Q.nodes!==void 0?Q.nodes:{};return Je(B,function(Be){if(typeof Be!="string")throw new TypeError("String expected");return me(Be,ve)})}var E={NULL:0,DELIMITER:1,NUMBER:2,SYMBOL:3,UNKNOWN:4},S={",":!0,"(":!0,")":!0,"[":!0,"]":!0,"{":!0,"}":!0,'"':!0,"'":!0,";":!0,"+":!0,"-":!0,"*":!0,".*":!0,"/":!0,"./":!0,"%":!0,"^":!0,".^":!0,"~":!0,"!":!0,"&":!0,"|":!0,"^|":!0,"=":!0,":":!0,"?":!0,"==":!0,"!=":!0,"<":!0,">":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},O={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},F={true:!0,false:!1,null:null,undefined:void 0},M=["NaN","Infinity"],_={'"':'"',"'":"'","\\\\":"\\\\","/":"/",b:"\\b",f:"\\f",n:\` + (\`+lr(F,v)+", "+lr(A,v)+") ==> "+(this._values?lr(this._values[O],v):"X")}return b},i.prototype.toString=function(){return lr(this.toArray())},i.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},i.prototype.diagonal=function(v){if(v){if(je(v)&&(v=v.toNumber()),!ar(v)||!He(v))throw new TypeError("The parameter k must be an integer number")}else v=0;var y=v>0?v:0,w=v<0?-v:0,C=this._size[0],b=this._size[1],A=Math.min(C-w,b-y),E=[],S=[],O=[];O[0]=0;for(var F=y;F0?w:0,O=w<0?-w:0,F=v[0],M=v[1],_=Math.min(F-O,M-S),k;if(Ar(y)){if(y.length!==_)throw new Error("Invalid value array length");k=function(oe){return y[oe]}}else if(Ge(y)){var L=y.size();if(L.length!==1||L[0]!==_)throw new Error("Invalid matrix length");k=function(oe){return y.get([oe])}}else k=function(){return y};for(var Y=[],$=[],V=[],q=0;q=0&&R<_){var j=k(R);A(j,E)||($.push(R+O),Y.push(j))}}return V.push(Y.length),new i({values:Y,index:$,ptr:V,size:[F,M]})},i.prototype.swapRows=function(v,y){if(!ar(v)||!He(v)||!ar(y)||!He(y))throw new Error("Row index must be positive integers");if(this._size.length!==2)throw new Error("Only two dimensional matrix is supported");return Xr(v,this._size[0]),Xr(y,this._size[0]),i._swapRows(v,y,this._size[1],this._values,this._index,this._ptr),this},i._forEachRow=function(v,y,w,C,b){for(var A=C[v],E=C[v+1],S=A;S=O||b[M]!==y)){var k=C?C[F]:void 0;b.splice(M,0,y),C&&C.splice(M,0,k),b.splice(M<=F?F+1:F,1),C&&C.splice(M<=F?F+1:F,1);continue}if(M=O||b[F]!==v)){var L=C?C[M]:void 0;b.splice(F,0,v),C&&C.splice(F,0,L),b.splice(F<=M?M+1:M,1),C&&C.splice(F<=M?M+1:M,1)}}},i},{isClass:!0});var g9="number",x9=["typed"];function y9(e){var r=e.match(/(0[box])([0-9a-fA-F]*)\\.([0-9a-fA-F]*)/);if(r){var t={"0b":2,"0o":8,"0x":16}[r[1]],n=r[2],i=r[3];return{input:e,radix:t,integerPart:n,fractionalPart:i}}else return null}function b9(e){for(var r=parseInt(e.integerPart,e.radix),t=0,n=0;n{var{typed:r}=e,t=r("number",{"":function(){return 0},number:function(i){return i},string:function(i){if(i==="NaN")return NaN;var a=y9(i);if(a)return b9(a);var s=0,l=i.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);l&&(s=Number(l[2]),i=l[1]);var f=Number(i);if(isNaN(f))throw new SyntaxError('String "'+i+'" is not a valid number');if(l){if(f>2**s-1)throw new SyntaxError('String "'.concat(i,'" is out of range'));f>=2**(s-1)&&(f=f-2**s)}return f},BigNumber:function(i){return i.toNumber()},Fraction:function(i){return i.valueOf()},Unit:r.referToSelf(n=>i=>{var a=i.clone();return a.value=n(i.value),a}),null:function(i){return 0},"Unit, string | Unit":function(i,a){return i.toNumber(a)},"Array | Matrix":r.referToSelf(n=>i=>Je(i,n))});return t.fromJSON=function(n){return parseFloat(n.value)},t});var k1="string",w9=["typed"],R1=T(k1,w9,e=>{var{typed:r}=e;return r(k1,{"":function(){return""},number:Wi,null:function(n){return"null"},boolean:function(n){return n+""},string:function(n){return n},"Array | Matrix":r.referToSelf(t=>n=>Je(n,t)),any:function(n){return String(n)}})});var L1="boolean",D9=["typed"],q1=T(L1,D9,e=>{var{typed:r}=e;return r(L1,{"":function(){return!1},boolean:function(n){return n},number:function(n){return!!n},null:function(n){return!1},BigNumber:function(n){return!n.isZero()},string:function(n){var i=n.toLowerCase();if(i==="true")return!0;if(i==="false")return!1;var a=Number(n);if(n!==""&&!isNaN(a))return!!a;throw new Error('Cannot convert "'+n+'" to a boolean')},"Array | Matrix":r.referToSelf(t=>n=>Je(n,t))})});var S9="bignumber",N9=["typed","BigNumber"],U1=T(S9,N9,e=>{var{typed:r,BigNumber:t}=e;return r("bignumber",{"":function(){return new t(0)},number:function(i){return new t(i+"")},string:function(i){var a=i.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);if(a){var s=a[2],l=t(a[1]),f=new t(2).pow(Number(s));if(l.gt(f.sub(1)))throw new SyntaxError('String "'.concat(i,'" is out of range'));var o=new t(2).pow(Number(s)-1);return l.gte(o)?l.sub(f):l}return new t(i)},BigNumber:function(i){return i},Unit:r.referToSelf(n=>i=>{var a=i.clone();return a.value=n(i.value),a}),Fraction:function(i){return new t(i.n).div(i.d).times(i.s)},null:function(i){return new t(0)},"Array | Matrix":r.referToSelf(n=>i=>Je(i,n))})});var A9="complex",E9=["typed","Complex"],z1=T(A9,E9,e=>{var{typed:r,Complex:t}=e;return r("complex",{"":function(){return t.ZERO},number:function(i){return new t(i,0)},"number, number":function(i,a){return new t(i,a)},"BigNumber, BigNumber":function(i,a){return new t(i.toNumber(),a.toNumber())},Fraction:function(i){return new t(i.valueOf(),0)},Complex:function(i){return i.clone()},string:function(i){return t(i)},null:function(i){return t(0)},Object:function(i){if("re"in i&&"im"in i)return new t(i.re,i.im);if("r"in i&&"phi"in i||"abs"in i&&"arg"in i)return new t(i);throw new Error("Expected object with properties (re and im) or (r and phi) or (abs and arg)")},"Array | Matrix":r.referToSelf(n=>i=>Je(i,n))})});var C9="fraction",M9=["typed","Fraction"],W1=T(C9,M9,e=>{var{typed:r,Fraction:t}=e;return r("fraction",{number:function(i){if(!isFinite(i)||isNaN(i))throw new Error(i+" cannot be represented as a fraction");return new t(i)},string:function(i){return new t(i)},"number, number":function(i,a){return new t(i,a)},null:function(i){return new t(0)},BigNumber:function(i){return new t(i.toString())},Fraction:function(i){return i},Unit:r.referToSelf(n=>i=>{var a=i.clone();return a.value=n(i.value),a}),Object:function(i){return new t(i)},"Array | Matrix":r.referToSelf(n=>i=>Je(i,n))})});var V1="matrix",_9=["typed","Matrix","DenseMatrix","SparseMatrix"],Y1=T(V1,_9,e=>{var{typed:r,Matrix:t,DenseMatrix:n,SparseMatrix:i}=e;return r(V1,{"":function(){return a([])},string:function(l){return a([],l)},"string, string":function(l,f){return a([],l,f)},Array:function(l){return a(l)},Matrix:function(l){return a(l,l.storage())},"Array | Matrix, string":a,"Array | Matrix, string, string":a});function a(s,l,f){if(l==="dense"||l==="default"||l===void 0)return new n(s,f);if(l==="sparse")return new i(s,f);throw new TypeError("Unknown matrix type "+JSON.stringify(l)+".")}});var H1="matrixFromFunction",T9=["typed","matrix","isZero"],G1=T(H1,T9,e=>{var{typed:r,matrix:t,isZero:n}=e;return r(H1,{"Array | Matrix, function, string, string":function(s,l,f,o){return i(s,l,f,o)},"Array | Matrix, function, string":function(s,l,f){return i(s,l,f)},"Matrix, function":function(s,l){return i(s,l,"dense")},"Array, function":function(s,l){return i(s,l,"dense").toArray()},"Array | Matrix, string, function":function(s,l,f){return i(s,f,l)},"Array | Matrix, string, string, function":function(s,l,f,o){return i(s,o,l,f)}});function i(a,s,l,f){var o;return f!==void 0?o=t(l,f):o=t(l),o.resize(a),o.forEach(function(u,p){var h=s(p);n(h)||o.set(p,h)}),o}});var $1="matrixFromRows",F9=["typed","matrix","flatten","size"],Z1=T($1,F9,e=>{var{typed:r,matrix:t,flatten:n,size:i}=e;return r($1,{"...Array":function(f){return a(f)},"...Matrix":function(f){return t(a(f.map(o=>o.toArray())))}});function a(l){if(l.length===0)throw new TypeError("At least one row is needed to construct a matrix.");var f=s(l[0]),o=[];for(var u of l){var p=s(u);if(p!==f)throw new TypeError("The vectors had different length: "+(f|0)+" \\u2260 "+(p|0));o.push(n(u))}return o}function s(l){var f=i(l);if(f.length===1)return f[0];if(f.length===2){if(f[0]===1)return f[1];if(f[1]===1)return f[0];throw new TypeError("At least one of the arguments is not a vector.")}else throw new TypeError("Only one- or two-dimensional vectors are supported.")}});var Q1="matrixFromColumns",O9=["typed","matrix","flatten","size"],X1=T(Q1,O9,e=>{var{typed:r,matrix:t,flatten:n,size:i}=e;return r(Q1,{"...Array":function(f){return a(f)},"...Matrix":function(f){return t(a(f.map(o=>o.toArray())))}});function a(l){if(l.length===0)throw new TypeError("At least one column is needed to construct a matrix.");for(var f=s(l[0]),o=[],u=0;u{var{typed:r}=e;return r(J1,{"Unit, Array":function(n,i){return n.splitUnit(i)}})});var j1="unaryMinus",I9=["typed"],eb=T(j1,I9,e=>{var{typed:r}=e;return r(j1,{number:hv,"Complex | BigNumber | Fraction":t=>t.neg(),Unit:r.referToSelf(t=>n=>{var i=n.clone();return i.value=r.find(t,i.valueType())(n.value),i}),"Array | Matrix":r.referToSelf(t=>n=>Je(n,t,!0))})});var rb="unaryPlus",P9=["typed","config","BigNumber"],tb=T(rb,P9,e=>{var{typed:r,config:t,BigNumber:n}=e;return r(rb,{number:dv,Complex:function(a){return a},BigNumber:function(a){return a},Fraction:function(a){return a},Unit:function(a){return a.clone()},"Array | Matrix":r.referToSelf(i=>a=>Je(a,i,!0)),"boolean | string":function(a){return t.number==="BigNumber"?new n(+a):+a}})});var nb="abs",k9=["typed"],ib=T(nb,k9,e=>{var{typed:r}=e;return r(nb,{number:lv,"Complex | BigNumber | Fraction | Unit":t=>t.abs(),"Array | Matrix":r.referToSelf(t=>n=>Je(n,t,!0))})});var ab="apply",R9=["typed","isInteger"],ou=T(ab,R9,e=>{var{typed:r,isInteger:t}=e;return r(ab,{"Array | Matrix, number | BigNumber, function":function(i,a,s){if(!t(a))throw new TypeError("Integer number expected for dimension");var l=Array.isArray(i)?or(i):i.size();if(a<0||a>=l.length)throw new Xt(a,l.length);return Ge(i)?i.create(zc(i.valueOf(),a,s)):zc(i,a,s)}})});function zc(e,r,t){var n,i,a;if(r<=0)if(Array.isArray(e[0])){for(a=L9(e),i=[],n=0;n{var{typed:r}=e;return r(ob,{"number, number":cv,"Complex, Complex":function(n,i){return n.add(i)},"BigNumber, BigNumber":function(n,i){return n.plus(i)},"Fraction, Fraction":function(n,i){return n.add(i)},"Unit, Unit":r.referToSelf(t=>(n,i)=>{if(n.value===null||n.value===void 0)throw new Error("Parameter x contains a unit with undefined value");if(i.value===null||i.value===void 0)throw new Error("Parameter y contains a unit with undefined value");if(!n.equalBase(i))throw new Error("Units do not match");var a=n.clone();return a.value=r.find(t,[a.valueType(),i.valueType()])(a.value,i.value),a.fixPrefix=!1,a})})});var ub="subtractScalar",U9=["typed"],fb=T(ub,U9,e=>{var{typed:r}=e;return r(ub,{"number, number":pv,"Complex, Complex":function(n,i){return n.sub(i)},"BigNumber, BigNumber":function(n,i){return n.minus(i)},"Fraction, Fraction":function(n,i){return n.sub(i)},"Unit, Unit":r.referToSelf(t=>(n,i)=>{if(n.value===null||n.value===void 0)throw new Error("Parameter x contains a unit with undefined value");if(i.value===null||i.value===void 0)throw new Error("Parameter y contains a unit with undefined value");if(!n.equalBase(i))throw new Error("Units do not match");var a=n.clone();return a.value=r.find(t,[a.valueType(),i.valueType()])(a.value,i.value),a.fixPrefix=!1,a})})});var lb="cbrt",z9=["config","typed","isNegative","unaryMinus","matrix","Complex","BigNumber","Fraction"],cb=T(lb,z9,e=>{var{config:r,typed:t,isNegative:n,unaryMinus:i,matrix:a,Complex:s,BigNumber:l,Fraction:f}=e;return t(lb,{number:nu,Complex:o,"Complex, boolean":o,BigNumber:function(h){return h.cbrt()},Unit:u});function o(p,h){var d=p.arg()/3,x=p.abs(),v=new s(nu(x),0).mul(new s(0,d).exp());if(h){var y=[v,new s(nu(x),0).mul(new s(0,d+Math.PI*2/3).exp()),new s(nu(x),0).mul(new s(0,d-Math.PI*2/3).exp())];return r.matrix==="Array"?y:a(y)}else return v}function u(p){if(p.value&&Gt(p.value)){var h=p.clone();return h.value=1,h=h.pow(1/3),h.value=o(p.value),h}else{var d=n(p.value);d&&(p.value=i(p.value));var x;je(p.value)?x=new l(1).div(3):Jn(p.value)?x=new f(1,3):x=1/3;var v=p.pow(x);return d&&(v.value=i(v.value)),v}}});var W9="matAlgo11xS0s",V9=["typed","equalScalar"],Jr=T(W9,V9,e=>{var{typed:r,equalScalar:t}=e;return function(i,a,s,l){var f=i._values,o=i._index,u=i._ptr,p=i._size,h=i._datatype;if(!f)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var d=p[0],x=p[1],v,y=t,w=0,C=s;typeof h=="string"&&(v=h,y=r.find(t,[v,v]),w=r.convert(0,v),a=r.convert(a,v),C=r.find(s,[v,v]));for(var b=[],A=[],E=[],S=0;S{var{typed:r,DenseMatrix:t}=e;return function(i,a,s,l){var f=i._values,o=i._index,u=i._ptr,p=i._size,h=i._datatype;if(!f)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var d=p[0],x=p[1],v,y=s;typeof h=="string"&&(v=h,a=r.convert(a,v),y=r.find(s,[v,v]));for(var w=[],C=[],b=[],A=0;A{var{typed:r}=e;return function(i,a,s,l){var f=i._data,o=i._size,u=i._datatype,p,h=s;typeof u=="string"&&(p=u,a=r.convert(a,p),h=r.find(s,[p,p]));var d=o.length>0?t(h,0,o,o[0],f,a,l):[];return i.createDenseMatrix({data:d,size:tr(o),datatype:p})};function t(n,i,a,s,l,f,o){var u=[];if(i===a.length-1)for(var p=0;p{var{typed:r,config:t,round:n}=e;return r(sg,{number:function(a){return wt(a,n(a),t.epsilon)?n(a):Math.ceil(a)},"number, number":function(a,s){if(wt(a,n(a,s),t.epsilon))return n(a,s);var[l,f]="".concat(a,"e").split("e"),o=Math.ceil(Number("".concat(l,"e").concat(Number(f)+s)));return[l,f]="".concat(o,"e").split("e"),Number("".concat(l,"e").concat(Number(f)-s))}})}),pb=T(sg,Z9,e=>{var{typed:r,config:t,round:n,matrix:i,equalScalar:a,zeros:s,DenseMatrix:l}=e,f=Jr({typed:r,equalScalar:a}),o=Lr({typed:r,DenseMatrix:l}),u=Bt({typed:r}),p=Q9({typed:r,config:t,round:n});return r("ceil",{number:p.signatures.number,"number,number":p.signatures["number,number"],Complex:function(d){return d.ceil()},"Complex, number":function(d,x){return d.ceil(x)},"Complex, BigNumber":function(d,x){return d.ceil(x.toNumber())},BigNumber:function(d){return Ut(d,n(d),t.epsilon)?n(d):d.ceil()},"BigNumber, BigNumber":function(d,x){return Ut(d,n(d,x),t.epsilon)?n(d,x):d.toDecimalPlaces(x.toNumber(),ts.ROUND_CEIL)},Fraction:function(d){return d.ceil()},"Fraction, number":function(d,x){return d.ceil(x)},"Fraction, BigNumber":function(d,x){return d.ceil(x.toNumber())},"Array | Matrix":r.referToSelf(h=>d=>Je(d,h,!0)),"Array, number | BigNumber":r.referToSelf(h=>(d,x)=>Je(d,v=>h(v,x),!0)),"SparseMatrix, number | BigNumber":r.referToSelf(h=>(d,x)=>f(d,x,h,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(h=>(d,x)=>u(d,x,h,!1)),"number | Complex | Fraction | BigNumber, Array":r.referToSelf(h=>(d,x)=>u(i(x),d,h,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":r.referToSelf(h=>(d,x)=>a(d,0)?s(x.size(),x.storage()):x.storage()==="dense"?u(x,d,h,!0):o(x,d,h,!0))})});var mb="cube",X9=["typed"],hb=T(mb,X9,e=>{var{typed:r}=e;return r(mb,{number:vv,Complex:function(n){return n.mul(n).mul(n)},BigNumber:function(n){return n.times(n).times(n)},Fraction:function(n){return n.pow(3)},Unit:function(n){return n.pow(3)}})});var db="exp",J9=["typed"],vb=T(db,J9,e=>{var{typed:r}=e;return r(db,{number:gv,Complex:function(n){return n.exp()},BigNumber:function(n){return n.exp()}})});var gb="expm1",K9=["typed","Complex"],xb=T(gb,K9,e=>{var{typed:r,Complex:t}=e;return r(gb,{number:xv,Complex:function(i){var a=Math.exp(i.re);return new t(a*Math.cos(i.im)-1,a*Math.sin(i.im))},BigNumber:function(i){return i.exp().minus(1)}})});var ug="fix",j9=["typed","Complex","matrix","ceil","floor","equalScalar","zeros","DenseMatrix"],e7=T(ug,["typed","ceil","floor"],e=>{var{typed:r,ceil:t,floor:n}=e;return r(ug,{number:function(a){return a>0?n(a):t(a)},"number, number":function(a,s){return a>0?n(a,s):t(a,s)}})}),yb=T(ug,j9,e=>{var{typed:r,Complex:t,matrix:n,ceil:i,floor:a,equalScalar:s,zeros:l,DenseMatrix:f}=e,o=Lr({typed:r,DenseMatrix:f}),u=Bt({typed:r}),p=e7({typed:r,ceil:i,floor:a});return r("fix",{number:p.signatures.number,"number, number | BigNumber":p.signatures["number,number"],Complex:function(d){return new t(d.re>0?Math.floor(d.re):Math.ceil(d.re),d.im>0?Math.floor(d.im):Math.ceil(d.im))},"Complex, number":function(d,x){return new t(d.re>0?a(d.re,x):i(d.re,x),d.im>0?a(d.im,x):i(d.im,x))},"Complex, BigNumber":function(d,x){var v=x.toNumber();return new t(d.re>0?a(d.re,v):i(d.re,v),d.im>0?a(d.im,v):i(d.im,v))},BigNumber:function(d){return d.isNegative()?i(d):a(d)},"BigNumber, number | BigNumber":function(d,x){return d.isNegative()?i(d,x):a(d,x)},Fraction:function(d){return d.s<0?d.ceil():d.floor()},"Fraction, number | BigNumber":function(d,x){return d.s<0?i(d,x):a(d,x)},"Array | Matrix":r.referToSelf(h=>d=>Je(d,h,!0)),"Array | Matrix, number | BigNumber":r.referToSelf(h=>(d,x)=>Je(d,v=>h(v,x),!0)),"number | Complex | Fraction | BigNumber, Array":r.referToSelf(h=>(d,x)=>u(n(x),d,h,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":r.referToSelf(h=>(d,x)=>s(d,0)?l(x.size(),x.storage()):x.storage()==="dense"?u(x,d,h,!0):o(x,d,h,!0))})});var fg="floor",r7=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix"],t7=T(fg,["typed","config","round"],e=>{var{typed:r,config:t,round:n}=e;return r(fg,{number:function(a){return wt(a,n(a),t.epsilon)?n(a):Math.floor(a)},"number, number":function(a,s){if(wt(a,n(a,s),t.epsilon))return n(a,s);var[l,f]="".concat(a,"e").split("e"),o=Math.floor(Number("".concat(l,"e").concat(Number(f)+s)));return[l,f]="".concat(o,"e").split("e"),Number("".concat(l,"e").concat(Number(f)-s))}})}),Wc=T(fg,r7,e=>{var{typed:r,config:t,round:n,matrix:i,equalScalar:a,zeros:s,DenseMatrix:l}=e,f=Jr({typed:r,equalScalar:a}),o=Lr({typed:r,DenseMatrix:l}),u=Bt({typed:r}),p=t7({typed:r,config:t,round:n});return r("floor",{number:p.signatures.number,"number,number":p.signatures["number,number"],Complex:function(d){return d.floor()},"Complex, number":function(d,x){return d.floor(x)},"Complex, BigNumber":function(d,x){return d.floor(x.toNumber())},BigNumber:function(d){return Ut(d,n(d),t.epsilon)?n(d):d.floor()},"BigNumber, BigNumber":function(d,x){return Ut(d,n(d,x),t.epsilon)?n(d,x):d.toDecimalPlaces(x.toNumber(),ts.ROUND_FLOOR)},Fraction:function(d){return d.floor()},"Fraction, number":function(d,x){return d.floor(x)},"Fraction, BigNumber":function(d,x){return d.floor(x.toNumber())},"Array | Matrix":r.referToSelf(h=>d=>Je(d,h,!0)),"Array, number | BigNumber":r.referToSelf(h=>(d,x)=>Je(d,v=>h(v,x),!0)),"SparseMatrix, number | BigNumber":r.referToSelf(h=>(d,x)=>f(d,x,h,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(h=>(d,x)=>u(d,x,h,!1)),"number | Complex | Fraction | BigNumber, Array":r.referToSelf(h=>(d,x)=>u(i(x),d,h,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":r.referToSelf(h=>(d,x)=>a(d,0)?s(x.size(),x.storage()):x.storage()==="dense"?u(x,d,h,!0):o(x,d,h,!0))})});var n7="matAlgo02xDS0",i7=["typed","equalScalar"],It=T(n7,i7,e=>{var{typed:r,equalScalar:t}=e;return function(i,a,s,l){var f=i._data,o=i._size,u=i._datatype||i.getDataType(),p=a._values,h=a._index,d=a._ptr,x=a._size,v=a._datatype||a._data===void 0?a._datatype:a.getDataType();if(o.length!==x.length)throw new pr(o.length,x.length);if(o[0]!==x[0]||o[1]!==x[1])throw new RangeError("Dimension mismatch. Matrix A ("+o+") must match Matrix B ("+x+")");if(!p)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var y=o[0],w=o[1],C,b=t,A=0,E=s;typeof u=="string"&&u===v&&u!=="mixed"&&(C=u,b=r.find(t,[C,C]),A=r.convert(0,C),E=r.find(s,[C,C]));for(var S=[],O=[],F=[],M=0;M{var{typed:r}=e;return function(n,i,a,s){var l=n._data,f=n._size,o=n._datatype||n.getDataType(),u=i._values,p=i._index,h=i._ptr,d=i._size,x=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(f.length!==d.length)throw new pr(f.length,d.length);if(f[0]!==d[0]||f[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+f+") must match Matrix B ("+d+")");if(!u)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var v=f[0],y=f[1],w,C=0,b=a;typeof o=="string"&&o===x&&o!=="mixed"&&(w=o,C=r.convert(0,w),b=r.find(a,[w,w]));for(var A=[],E=0;E{var{typed:r,equalScalar:t}=e;return function(i,a,s){var l=i._values,f=i._index,o=i._ptr,u=i._size,p=i._datatype||i._data===void 0?i._datatype:i.getDataType(),h=a._values,d=a._index,x=a._ptr,v=a._size,y=a._datatype||a._data===void 0?a._datatype:a.getDataType();if(u.length!==v.length)throw new pr(u.length,v.length);if(u[0]!==v[0]||u[1]!==v[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+v+")");var w=u[0],C=u[1],b,A=t,E=0,S=s;typeof p=="string"&&p===y&&p!=="mixed"&&(b=p,A=r.find(t,[b,b]),E=r.convert(0,b),S=r.find(s,[b,b]));var O=l&&h?[]:void 0,F=[],M=[],_=O?[]:void 0,k=O?[]:void 0,L=[],Y=[],$,V,q,R;for(V=0;V{var{typed:r}=e;return function(i,a,s){var l=i._data,f=i._size,o=i._datatype,u=a._data,p=a._size,h=a._datatype,d=[];if(f.length!==p.length)throw new pr(f.length,p.length);for(var x=0;x0?t(y,0,d,d[0],l,u):[];return i.createDenseMatrix({data:w,size:d,datatype:v})};function t(n,i,a,s,l,f){var o=[];if(i===a.length-1)for(var u=0;u{var{concat:r}=e;return function(i,a){var s=Math.max(i._size.length,a._size.length);if(i._size.length===a._size.length&&i._size.every((x,v)=>x===a._size[v]))return[i,a];for(var l=t(i._size,s,0),f=t(a._size,s,0),o=[],u=0;u{var{typed:r,matrix:t,concat:n}=e,i=bb({typed:r}),a=Bt({typed:r}),s=wb({concat:n});return function(f){var o=f.elop,u=f.SD||f.DS,p;o?(p={"DenseMatrix, DenseMatrix":(v,y)=>i(...s(v,y),o),"Array, Array":(v,y)=>i(...s(t(v),t(y)),o).valueOf(),"Array, DenseMatrix":(v,y)=>i(...s(t(v),y),o),"DenseMatrix, Array":(v,y)=>i(...s(v,t(y)),o)},f.SS&&(p["SparseMatrix, SparseMatrix"]=(v,y)=>f.SS(...s(v,y),o,!1)),f.DS&&(p["DenseMatrix, SparseMatrix"]=(v,y)=>f.DS(...s(v,y),o,!1),p["Array, SparseMatrix"]=(v,y)=>f.DS(...s(t(v),y),o,!1)),u&&(p["SparseMatrix, DenseMatrix"]=(v,y)=>u(...s(y,v),o,!0),p["SparseMatrix, Array"]=(v,y)=>u(...s(t(y),v),o,!0))):(p={"DenseMatrix, DenseMatrix":r.referToSelf(v=>(y,w)=>i(...s(y,w),v)),"Array, Array":r.referToSelf(v=>(y,w)=>i(...s(t(y),t(w)),v).valueOf()),"Array, DenseMatrix":r.referToSelf(v=>(y,w)=>i(...s(t(y),w),v)),"DenseMatrix, Array":r.referToSelf(v=>(y,w)=>i(...s(y,t(w)),v))},f.SS&&(p["SparseMatrix, SparseMatrix"]=r.referToSelf(v=>(y,w)=>f.SS(...s(y,w),v,!1))),f.DS&&(p["DenseMatrix, SparseMatrix"]=r.referToSelf(v=>(y,w)=>f.DS(...s(y,w),v,!1)),p["Array, SparseMatrix"]=r.referToSelf(v=>(y,w)=>f.DS(...s(t(y),w),v,!1))),u&&(p["SparseMatrix, DenseMatrix"]=r.referToSelf(v=>(y,w)=>u(...s(w,y),v,!0)),p["SparseMatrix, Array"]=r.referToSelf(v=>(y,w)=>u(...s(t(w),y),v,!0))));var h=f.scalar||"any",d=f.Ds||f.Ss;d&&(o?(p["DenseMatrix,"+h]=(v,y)=>a(v,y,o,!1),p[h+", DenseMatrix"]=(v,y)=>a(y,v,o,!0),p["Array,"+h]=(v,y)=>a(t(v),y,o,!1).valueOf(),p[h+", Array"]=(v,y)=>a(t(y),v,o,!0).valueOf()):(p["DenseMatrix,"+h]=r.referToSelf(v=>(y,w)=>a(y,w,v,!1)),p[h+", DenseMatrix"]=r.referToSelf(v=>(y,w)=>a(w,y,v,!0)),p["Array,"+h]=r.referToSelf(v=>(y,w)=>a(t(y),w,v,!1).valueOf()),p[h+", Array"]=r.referToSelf(v=>(y,w)=>a(t(w),y,v,!0).valueOf())));var x=f.sS!==void 0?f.sS:f.Ss;return o?(f.Ss&&(p["SparseMatrix,"+h]=(v,y)=>f.Ss(v,y,o,!1)),x&&(p[h+", SparseMatrix"]=(v,y)=>x(y,v,o,!0))):(f.Ss&&(p["SparseMatrix,"+h]=r.referToSelf(v=>(y,w)=>f.Ss(y,w,v,!1))),x&&(p[h+", SparseMatrix"]=r.referToSelf(v=>(y,w)=>x(w,y,v,!0)))),o&&o.signatures&&xc(p,o.signatures),p}});var Db="mod",d7=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix","concat"],Vc=T(Db,d7,e=>{var{typed:r,config:t,round:n,matrix:i,equalScalar:a,zeros:s,DenseMatrix:l,concat:f}=e,o=Wc({typed:r,config:t,round:n,matrix:i,equalScalar:a,zeros:s,DenseMatrix:l}),u=It({typed:r,equalScalar:a}),p=ft({typed:r}),h=So({typed:r,equalScalar:a}),d=Jr({typed:r,equalScalar:a}),x=Lr({typed:r,DenseMatrix:l}),v=vr({typed:r,matrix:i,concat:f});return r(Db,{"number, number":y,"BigNumber, BigNumber":function(C,b){return b.isZero()?C:C.sub(b.mul(o(C.div(b))))},"Fraction, Fraction":function(C,b){return b.equals(0)?C:C.sub(b.mul(o(C.div(b))))}},v({SS:h,DS:p,SD:u,Ss:d,sS:x}));function y(w,C){return C===0?w:w-C*o(w/C)}});var v7="matAlgo01xDSid",g7=["typed"],dn=T(v7,g7,e=>{var{typed:r}=e;return function(n,i,a,s){var l=n._data,f=n._size,o=n._datatype||n.getDataType(),u=i._values,p=i._index,h=i._ptr,d=i._size,x=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(f.length!==d.length)throw new pr(f.length,d.length);if(f[0]!==d[0]||f[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+f+") must match Matrix B ("+d+")");if(!u)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var v=f[0],y=f[1],w=typeof o=="string"&&o!=="mixed"&&o===x?o:void 0,C=w?r.find(a,[w,w]):a,b,A,E=[];for(b=0;b{var{typed:r,equalScalar:t}=e;return function(i,a,s){var l=i._values,f=i._index,o=i._ptr,u=i._size,p=i._datatype||i._data===void 0?i._datatype:i.getDataType(),h=a._values,d=a._index,x=a._ptr,v=a._size,y=a._datatype||a._data===void 0?a._datatype:a.getDataType();if(u.length!==v.length)throw new pr(u.length,v.length);if(u[0]!==v[0]||u[1]!==v[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+v+")");var w=u[0],C=u[1],b,A=t,E=0,S=s;typeof p=="string"&&p===y&&p!=="mixed"&&(b=p,A=r.find(t,[b,b]),E=r.convert(0,b),S=r.find(s,[b,b]));var O=l&&h?[]:void 0,F=[],M=[],_=l&&h?[]:void 0,k=l&&h?[]:void 0,L=[],Y=[],$,V,q,R,j;for(V=0;V{var{typed:r,DenseMatrix:t}=e;return function(i,a,s,l){var f=i._values,o=i._index,u=i._ptr,p=i._size,h=i._datatype;if(!f)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var d=p[0],x=p[1],v,y=s;typeof h=="string"&&(v=h,a=r.convert(a,v),y=r.find(s,[v,v]));for(var w=[],C=[],b=[],A=0;AArray.isArray(r))}var Ab=T(Sb,D7,e=>{var{typed:r,matrix:t,config:n,round:i,equalScalar:a,zeros:s,BigNumber:l,DenseMatrix:f,concat:o}=e,u=Vc({typed:r,config:n,round:i,matrix:t,equalScalar:a,zeros:s,DenseMatrix:f,concat:o}),p=dn({typed:r}),h=su({typed:r,equalScalar:a}),d=Un({typed:r,DenseMatrix:f}),x=vr({typed:r,matrix:t,concat:o});return r(Sb,{"number, number":v,"BigNumber, BigNumber":y,"Fraction, Fraction":(w,C)=>w.gcd(C)},x({SS:h,DS:p,Ss:d}),{[S7]:r.referToSelf(w=>(C,b,A)=>{for(var E=w(C,b),S=0;SC=>{if(C.length===1&&Array.isArray(C[0])&&Nb(C[0]))return w(...C[0]);if(Nb(C))return w(...C);throw new ei("gcd() supports only 1d matrices!")}),Matrix:r.referToSelf(w=>C=>w(C.toArray()))});function v(w,C){if(!He(w)||!He(C))throw new Error("Parameters in function gcd must be integer numbers");for(var b;C!==0;)b=u(w,C),w=C,C=b;return w<0?-w:w}function y(w,C){if(!w.isInt()||!C.isInt())throw new Error("Parameters in function gcd must be integer numbers");for(var b=new l(0);!C.isZero();){var A=u(w,C);w=C,C=A}return w.lt(b)?w.neg():w}});var N7="matAlgo06xS0S0",A7=["typed","equalScalar"],No=T(N7,A7,e=>{var{typed:r,equalScalar:t}=e;return function(i,a,s){var l=i._values,f=i._size,o=i._datatype||i._data===void 0?i._datatype:i.getDataType(),u=a._values,p=a._size,h=a._datatype||a._data===void 0?a._datatype:a.getDataType();if(f.length!==p.length)throw new pr(f.length,p.length);if(f[0]!==p[0]||f[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+f+") must match Matrix B ("+p+")");var d=f[0],x=f[1],v,y=t,w=0,C=s;typeof o=="string"&&o===h&&o!=="mixed"&&(v=o,y=r.find(t,[v,v]),w=r.convert(0,v),C=r.find(s,[v,v]));for(var b=l&&u?[]:void 0,A=[],E=[],S=b?[]:void 0,O=[],F=[],M=0;M{var{typed:r,matrix:t,equalScalar:n,concat:i}=e,a=It({typed:r,equalScalar:n}),s=No({typed:r,equalScalar:n}),l=Jr({typed:r,equalScalar:n}),f=vr({typed:r,matrix:t,concat:i}),o="number | BigNumber | Fraction | Matrix | Array",u={};return u["".concat(o,", ").concat(o,", ...").concat(o)]=r.referToSelf(h=>(d,x,v)=>{for(var y=h(d,x),w=0;wh.lcm(d)},f({SS:s,DS:a,Ss:l}),u);function p(h,d){if(!h.isInt()||!d.isInt())throw new Error("Parameters in function lcm must be integer numbers");if(h.isZero())return h;if(d.isZero())return d;for(var x=h.times(d);!d.isZero();){var v=d;d=h.mod(v),h=v}return x.div(h).abs()}});var Mb="log10",C7=["typed","config","Complex"],_b=T(Mb,C7,e=>{var{typed:r,config:t,Complex:n}=e;return r(Mb,{number:function(a){return a>=0||t.predictable?bv(a):new n(a,0).log().div(Math.LN10)},Complex:function(a){return new n(a).log().div(Math.LN10)},BigNumber:function(a){return!a.isNegative()||t.predictable?a.log():new n(a.toNumber(),0).log().div(Math.LN10)},"Array | Matrix":r.referToSelf(i=>a=>Je(a,i))})});var Tb="log2",M7=["typed","config","Complex"],Fb=T(Tb,M7,e=>{var{typed:r,config:t,Complex:n}=e;return r(Tb,{number:function(s){return s>=0||t.predictable?wv(s):i(new n(s,0))},Complex:i,BigNumber:function(s){return!s.isNegative()||t.predictable?s.log(2):i(new n(s.toNumber(),0))},"Array | Matrix":r.referToSelf(a=>s=>Je(s,a))});function i(a){var s=Math.sqrt(a.re*a.re+a.im*a.im);return new n(Math.log2?Math.log2(s):Math.log(s)/Math.LN2,Math.atan2(a.im,a.re)/Math.LN2)}});var _7="multiplyScalar",T7=["typed"],Ob=T(_7,T7,e=>{var{typed:r}=e;return r("multiplyScalar",{"number, number":mv,"Complex, Complex":function(n,i){return n.mul(i)},"BigNumber, BigNumber":function(n,i){return n.times(i)},"Fraction, Fraction":function(n,i){return n.mul(i)},"number | Fraction | BigNumber | Complex, Unit":(t,n)=>n.multiply(t),"Unit, number | Fraction | BigNumber | Complex | Unit":(t,n)=>t.multiply(n)})});var Bb="multiply",F7=["typed","matrix","addScalar","multiplyScalar","equalScalar","dot"],Ib=T(Bb,F7,e=>{var{typed:r,matrix:t,addScalar:n,multiplyScalar:i,equalScalar:a,dot:s}=e,l=Jr({typed:r,equalScalar:a}),f=Bt({typed:r});function o(E,S){switch(E.length){case 1:switch(S.length){case 1:if(E[0]!==S[0])throw new RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(E[0]!==S[0])throw new RangeError("Dimension mismatch in multiplication. Vector length ("+E[0]+") must match Matrix rows ("+S[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+S.length+" dimensions)")}break;case 2:switch(S.length){case 1:if(E[1]!==S[0])throw new RangeError("Dimension mismatch in multiplication. Matrix columns ("+E[1]+") must match Vector length ("+S[0]+")");break;case 2:if(E[1]!==S[0])throw new RangeError("Dimension mismatch in multiplication. Matrix A columns ("+E[1]+") must match Matrix B rows ("+S[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+S.length+" dimensions)")}break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+E.length+" dimensions)")}}function u(E,S,O){if(O===0)throw new Error("Cannot multiply two empty vectors");return s(E,S)}function p(E,S){if(S.storage()!=="dense")throw new Error("Support for SparseMatrix not implemented");return h(E,S)}function h(E,S){var O=E._data,F=E._size,M=E._datatype||E.getDataType(),_=S._data,k=S._size,L=S._datatype||S.getDataType(),Y=F[0],$=k[1],V,q=n,R=i;M&&L&&M===L&&typeof M=="string"&&M!=="mixed"&&(V=M,q=r.find(n,[V,V]),R=r.find(i,[V,V]));for(var j=[],U=0;U<$;U++){for(var oe=R(O[0],_[0][U]),me=1;mege)for(var xe=0,be=0;be(S,O)=>{o(or(S),or(O));var F=E(t(S),t(O));return Ge(F)?F.valueOf():F}),"Matrix, Matrix":function(S,O){var F=S.size(),M=O.size();return o(F,M),F.length===1?M.length===1?u(S,O,F[0]):p(S,O):M.length===1?d(S,O):x(S,O)},"Matrix, Array":r.referTo("Matrix,Matrix",E=>(S,O)=>E(S,t(O))),"Array, Matrix":r.referToSelf(E=>(S,O)=>E(t(S,O.storage()),O)),"SparseMatrix, any":function(S,O){return l(S,O,i,!1)},"DenseMatrix, any":function(S,O){return f(S,O,i,!1)},"any, SparseMatrix":function(S,O){return l(O,S,i,!0)},"any, DenseMatrix":function(S,O){return f(O,S,i,!0)},"Array, any":function(S,O){return f(t(S),O,i,!1).valueOf()},"any, Array":function(S,O){return f(t(O),S,i,!0).valueOf()},"any, any":i,"any, any, ...any":r.referToSelf(E=>(S,O,F)=>{for(var M=E(S,O),_=0;_{var{typed:r,matrix:t,equalScalar:n,BigNumber:i,concat:a}=e,s=dn({typed:r}),l=It({typed:r,equalScalar:n}),f=No({typed:r,equalScalar:n}),o=Jr({typed:r,equalScalar:n}),u=vr({typed:r,matrix:t,concat:a});function p(){throw new Error("Complex number not supported in function nthRoot. Use nthRoots instead.")}return r(Pb,{number:Dv,"number, number":Dv,BigNumber:d=>h(d,new i(2)),"BigNumber, BigNumber":h,Complex:p,"Complex, number":p,Array:r.referTo("DenseMatrix,number",d=>x=>d(t(x),2).valueOf()),DenseMatrix:r.referTo("DenseMatrix,number",d=>x=>d(x,2)),SparseMatrix:r.referTo("SparseMatrix,number",d=>x=>d(x,2)),"SparseMatrix, SparseMatrix":r.referToSelf(d=>(x,v)=>{if(v.density()===1)return f(x,v,d);throw new Error("Root must be non-zero")}),"DenseMatrix, SparseMatrix":r.referToSelf(d=>(x,v)=>{if(v.density()===1)return s(x,v,d,!1);throw new Error("Root must be non-zero")}),"Array, SparseMatrix":r.referTo("DenseMatrix,SparseMatrix",d=>(x,v)=>d(t(x),v)),"number | BigNumber, SparseMatrix":r.referToSelf(d=>(x,v)=>{if(v.density()===1)return o(v,x,d,!0);throw new Error("Root must be non-zero")})},u({scalar:"number | BigNumber",SD:l,Ss:o,sS:!1}));function h(d,x){var v=i.precision,y=i.clone({precision:v+2}),w=new i(0),C=new y(1),b=x.isNegative();if(b&&(x=x.neg()),x.isZero())throw new Error("Root must be non-zero");if(d.isNegative()&&!x.abs().mod(2).equals(1))throw new Error("Root must be odd when a is negative.");if(d.isZero())return b?new y(1/0):0;if(!d.isFinite())return b?w:d;var A=d.abs().pow(C.div(x));return A=d.isNeg()?A.neg():A,new i((b?C.div(A):A).toPrecision(v))}});var Rb="sign",B7=["typed","BigNumber","Fraction","complex"],Lb=T(Rb,B7,e=>{var{typed:r,BigNumber:t,complex:n,Fraction:i}=e;return r(Rb,{number:qc,Complex:function(s){return s.im===0?n(qc(s.re)):s.sign()},BigNumber:function(s){return new t(s.cmp(0))},Fraction:function(s){return new i(s.s,1)},"Array | Matrix":r.referToSelf(a=>s=>Je(s,a,!0)),Unit:r.referToSelf(a=>s=>{if(!s._isDerived()&&s.units[0].unit.offset!==0)throw new TypeError("sign is ambiguous for units with offset");return r.find(a,s.valueType())(s.value)})})});var I7="sqrt",P7=["config","typed","Complex"],qb=T(I7,P7,e=>{var{config:r,typed:t,Complex:n}=e;return t("sqrt",{number:i,Complex:function(s){return s.sqrt()},BigNumber:function(s){return!s.isNegative()||r.predictable?s.sqrt():i(s.toNumber())},Unit:function(s){return s.pow(.5)}});function i(a){return isNaN(a)?NaN:a>=0||r.predictable?Math.sqrt(a):new n(a,0).sqrt()}});var Ub="square",k7=["typed"],zb=T(Ub,k7,e=>{var{typed:r}=e;return r(Ub,{number:Sv,Complex:function(n){return n.mul(n)},BigNumber:function(n){return n.times(n)},Fraction:function(n){return n.mul(n)},Unit:function(n){return n.pow(2)}})});var Wb="subtract",R7=["typed","matrix","equalScalar","subtractScalar","unaryMinus","DenseMatrix","concat"],Vb=T(Wb,R7,e=>{var{typed:r,matrix:t,equalScalar:n,subtractScalar:i,unaryMinus:a,DenseMatrix:s,concat:l}=e,f=dn({typed:r}),o=ft({typed:r}),u=So({typed:r,equalScalar:n}),p=Un({typed:r,DenseMatrix:s}),h=Lr({typed:r,DenseMatrix:s}),d=vr({typed:r,matrix:t,concat:l});return r(Wb,{"any, any":i},d({elop:i,SS:u,DS:f,SD:o,Ss:h,sS:p}))});var Yb="xgcd",L7=["typed","config","matrix","BigNumber"],Hb=T(Yb,L7,e=>{var{typed:r,config:t,matrix:n,BigNumber:i}=e;return r(Yb,{"number, number":function(l,f){var o=Nv(l,f);return t.matrix==="Array"?o:n(o)},"BigNumber, BigNumber":a});function a(s,l){var f,o,u,p=new i(0),h=new i(1),d=p,x=h,v=h,y=p;if(!s.isInt()||!l.isInt())throw new Error("Parameters in function xgcd must be integer numbers");for(;!l.isZero();)o=s.div(l).floor(),u=s.mod(l),f=d,d=x.minus(o.times(d)),x=f,f=v,v=y.minus(o.times(v)),y=f,s=l,l=u;var w;return s.lt(p)?w=[s.neg(),x.neg(),y.neg()]:w=[s,s.isZero()?0:x,y],t.matrix==="Array"?w:n(w)}});var Gb="invmod",q7=["typed","config","BigNumber","xgcd","equal","smaller","mod","add","isInteger"],$b=T(Gb,q7,e=>{var{typed:r,config:t,BigNumber:n,xgcd:i,equal:a,smaller:s,mod:l,add:f,isInteger:o}=e;return r(Gb,{"number, number":u,"BigNumber, BigNumber":u});function u(p,h){if(!o(p)||!o(h))throw new Error("Parameters in function invmod must be integer numbers");if(p=l(p,h),a(h,0))throw new Error("Divisor must be non zero");var d=i(p,h);d=d.valueOf();var[x,v]=d;return a(x,n(1))?(v=l(v,h),s(v,n(0))&&(v=f(v,h)),v):NaN}});var U7="matAlgo09xS0Sf",z7=["typed","equalScalar"],Yc=T(U7,z7,e=>{var{typed:r,equalScalar:t}=e;return function(i,a,s){var l=i._values,f=i._index,o=i._ptr,u=i._size,p=i._datatype||i._data===void 0?i._datatype:i.getDataType(),h=a._values,d=a._index,x=a._ptr,v=a._size,y=a._datatype||a._data===void 0?a._datatype:a.getDataType();if(u.length!==v.length)throw new pr(u.length,v.length);if(u[0]!==v[0]||u[1]!==v[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+v+")");var w=u[0],C=u[1],b,A=t,E=0,S=s;typeof p=="string"&&p===y&&p!=="mixed"&&(b=p,A=r.find(t,[b,b]),E=r.convert(0,b),S=r.find(s,[b,b]));var O=l&&h?[]:void 0,F=[],M=[],_=O?[]:void 0,k=[],L,Y,$,V,q;for(Y=0;Y{var{typed:r,matrix:t,equalScalar:n,multiplyScalar:i,concat:a}=e,s=It({typed:r,equalScalar:n}),l=Yc({typed:r,equalScalar:n}),f=Jr({typed:r,equalScalar:n}),o=vr({typed:r,matrix:t,concat:a});return r(Zb,o({elop:i,SS:l,DS:s,Ss:f}))});function Xb(e,r){if(e.isFinite()&&!e.isInteger()||r.isFinite()&&!r.isInteger())throw new Error("Integers expected in function bitAnd");var t=e.constructor;if(e.isNaN()||r.isNaN())return new t(NaN);if(e.isZero()||r.eq(-1)||e.eq(r))return e;if(r.isZero()||e.eq(-1))return r;if(!e.isFinite()||!r.isFinite()){if(!e.isFinite()&&!r.isFinite())return e.isNegative()===r.isNegative()?e:new t(0);if(!e.isFinite())return r.isNegative()?e:e.isNegative()?new t(0):r;if(!r.isFinite())return e.isNegative()?r:r.isNegative()?new t(0):e}return cg(e,r,function(n,i){return n&i})}function uu(e){if(e.isFinite()&&!e.isInteger())throw new Error("Integer expected in function bitNot");var r=e.constructor,t=r.precision;r.config({precision:1e9});var n=e.plus(new r(1));return n.s=-n.s||null,r.config({precision:t}),n}function Jb(e,r){if(e.isFinite()&&!e.isInteger()||r.isFinite()&&!r.isInteger())throw new Error("Integers expected in function bitOr");var t=e.constructor;if(e.isNaN()||r.isNaN())return new t(NaN);var n=new t(-1);return e.isZero()||r.eq(n)||e.eq(r)?r:r.isZero()||e.eq(n)?e:!e.isFinite()||!r.isFinite()?!e.isFinite()&&!e.isNegative()&&r.isNegative()||e.isNegative()&&!r.isNegative()&&!r.isFinite()?n:e.isNegative()&&r.isNegative()?e.isFinite()?e:r:e.isFinite()?r:e:cg(e,r,function(i,a){return i|a})}function cg(e,r,t){var n=e.constructor,i,a,s=+(e.s<0),l=+(r.s<0);if(s){i=Hc(uu(e));for(var f=0;f0;)t(u[--d],p[--x])===v&&(y=y.plus(w)),w=w.times(C);for(;x>0;)t(h,p[--x])===v&&(y=y.plus(w)),w=w.times(C);return n.config({precision:b}),v===0&&(y.s=-y.s),y}function Hc(e){for(var r=e.d,t=r[0]+"",n=1;n0)if(++l>o)for(l-=o;l--;)f+="0";else l1&&((u[d+1]===null||u[d+1]===void 0)&&(u[d+1]=0),u[d+1]+=u[d]>>1,u[d]&=1)}return u.reverse()}function Kb(e,r){if(e.isFinite()&&!e.isInteger()||r.isFinite()&&!r.isInteger())throw new Error("Integers expected in function bitXor");var t=e.constructor;if(e.isNaN()||r.isNaN())return new t(NaN);if(e.isZero())return r;if(r.isZero())return e;if(e.eq(r))return new t(0);var n=new t(-1);return e.eq(n)?uu(r):r.eq(n)?uu(e):!e.isFinite()||!r.isFinite()?!e.isFinite()&&!r.isFinite()?n:new t(e.isNegative()===r.isNegative()?1/0:-1/0):cg(e,r,function(i,a){return i^a})}function jb(e,r){if(e.isFinite()&&!e.isInteger()||r.isFinite()&&!r.isInteger())throw new Error("Integers expected in function leftShift");var t=e.constructor;return e.isNaN()||r.isNaN()||r.isNegative()&&!r.isZero()?new t(NaN):e.isZero()||r.isZero()?e:!e.isFinite()&&!r.isFinite()?new t(NaN):r.lt(55)?e.times(Math.pow(2,r.toNumber())+""):e.times(new t(2).pow(r))}function ew(e,r){if(e.isFinite()&&!e.isInteger()||r.isFinite()&&!r.isInteger())throw new Error("Integers expected in function rightArithShift");var t=e.constructor;return e.isNaN()||r.isNaN()||r.isNegative()&&!r.isZero()?new t(NaN):e.isZero()||r.isZero()?e:r.isFinite()?r.lt(55)?e.div(Math.pow(2,r.toNumber())+"").floor():e.div(new t(2).pow(r)).floor():e.isNegative()?new t(-1):e.isFinite()?new t(0):new t(NaN)}var rw="bitAnd",V7=["typed","matrix","equalScalar","concat"],Gc=T(rw,V7,e=>{var{typed:r,matrix:t,equalScalar:n,concat:i}=e,a=It({typed:r,equalScalar:n}),s=No({typed:r,equalScalar:n}),l=Jr({typed:r,equalScalar:n}),f=vr({typed:r,matrix:t,concat:i});return r(rw,{"number, number":Ev,"BigNumber, BigNumber":Xb},f({SS:s,DS:a,Ss:l}))});var tw="bitNot",Y7=["typed"],nw=T(tw,Y7,e=>{var{typed:r}=e;return r(tw,{number:Cv,BigNumber:uu,"Array | Matrix":r.referToSelf(t=>n=>Je(n,t))})});var iw="bitOr",H7=["typed","matrix","equalScalar","DenseMatrix","concat"],$c=T(iw,H7,e=>{var{typed:r,matrix:t,equalScalar:n,DenseMatrix:i,concat:a}=e,s=dn({typed:r}),l=su({typed:r,equalScalar:n}),f=Un({typed:r,DenseMatrix:i}),o=vr({typed:r,matrix:t,concat:a});return r(iw,{"number, number":Mv,"BigNumber, BigNumber":Jb},o({SS:l,DS:s,Ss:f}))});var G7="matAlgo07xSSf",$7=["typed","DenseMatrix"],Vt=T(G7,$7,e=>{var{typed:r,DenseMatrix:t}=e;return function(a,s,l){var f=a._size,o=a._datatype||a._data===void 0?a._datatype:a.getDataType(),u=s._size,p=s._datatype||s._data===void 0?s._datatype:s.getDataType();if(f.length!==u.length)throw new pr(f.length,u.length);if(f[0]!==u[0]||f[1]!==u[1])throw new RangeError("Dimension mismatch. Matrix A ("+f+") must match Matrix B ("+u+")");var h=f[0],d=f[1],x,v=0,y=l;typeof o=="string"&&o===p&&o!=="mixed"&&(x=o,v=r.convert(0,x),y=r.find(l,[x,x]));var w,C,b=[];for(w=0;w{var{typed:r,matrix:t,DenseMatrix:n,concat:i}=e,a=ft({typed:r}),s=Vt({typed:r,DenseMatrix:n}),l=Lr({typed:r,DenseMatrix:n}),f=vr({typed:r,matrix:t,concat:i});return r(aw,{"number, number":_v,"BigNumber, BigNumber":Kb},f({SS:s,DS:a,Ss:l}))});var sw="arg",Q7=["typed"],uw=T(sw,Q7,e=>{var{typed:r}=e;return r(sw,{number:function(n){return Math.atan2(0,n)},BigNumber:function(n){return n.constructor.atan2(0,n)},Complex:function(n){return n.arg()},"Array | Matrix":r.referToSelf(t=>n=>Je(n,t))})});var fw="conj",X7=["typed"],lw=T(fw,X7,e=>{var{typed:r}=e;return r(fw,{"number | BigNumber | Fraction":t=>t,Complex:t=>t.conjugate(),"Array | Matrix":r.referToSelf(t=>n=>Je(n,t))})});var cw="im",J7=["typed"],pw=T(cw,J7,e=>{var{typed:r}=e;return r(cw,{number:()=>0,"BigNumber | Fraction":t=>t.mul(0),Complex:t=>t.im,"Array | Matrix":r.referToSelf(t=>n=>Je(n,t))})});var mw="re",K7=["typed"],hw=T(mw,K7,e=>{var{typed:r}=e;return r(mw,{"number | BigNumber | Fraction":t=>t,Complex:t=>t.re,"Array | Matrix":r.referToSelf(t=>n=>Je(n,t))})});var dw="not",j7=["typed"],vw=T(dw,j7,e=>{var{typed:r}=e;return r(dw,{"null | undefined":()=>!0,number:Pv,Complex:function(n){return n.re===0&&n.im===0},BigNumber:function(n){return n.isZero()||n.isNaN()},Unit:r.referToSelf(t=>n=>r.find(t,n.valueType())(n.value)),"Array | Matrix":r.referToSelf(t=>n=>Je(n,t))})});var gw="or",eL=["typed","matrix","equalScalar","DenseMatrix","concat"],Zc=T(gw,eL,e=>{var{typed:r,matrix:t,equalScalar:n,DenseMatrix:i,concat:a}=e,s=ft({typed:r}),l=So({typed:r,equalScalar:n}),f=Lr({typed:r,DenseMatrix:i}),o=vr({typed:r,matrix:t,concat:a});return r(gw,{"number, number":kv,"Complex, Complex":function(p,h){return p.re!==0||p.im!==0||h.re!==0||h.im!==0},"BigNumber, BigNumber":function(p,h){return!p.isZero()&&!p.isNaN()||!h.isZero()&&!h.isNaN()},"Unit, Unit":r.referToSelf(u=>(p,h)=>u(p.value||0,h.value||0))},o({SS:l,DS:s,Ss:f}))});var xw="xor",rL=["typed","matrix","DenseMatrix","concat"],yw=T(xw,rL,e=>{var{typed:r,matrix:t,DenseMatrix:n,concat:i}=e,a=ft({typed:r}),s=Vt({typed:r,DenseMatrix:n}),l=Lr({typed:r,DenseMatrix:n}),f=vr({typed:r,matrix:t,concat:i});return r(xw,{"number, number":Rv,"Complex, Complex":function(u,p){return(u.re!==0||u.im!==0)!=(p.re!==0||p.im!==0)},"BigNumber, BigNumber":function(u,p){return(!u.isZero()&&!u.isNaN())!=(!p.isZero()&&!p.isNaN())},"Unit, Unit":r.referToSelf(o=>(u,p)=>o(u.value||0,p.value||0))},f({SS:s,DS:a,Ss:l}))});var bw="concat",tL=["typed","matrix","isInteger"],Qc=T(bw,tL,e=>{var{typed:r,matrix:t,isInteger:n}=e;return r(bw,{"...Array | Matrix | number | BigNumber":function(a){var s,l=a.length,f=-1,o,u=!1,p=[];for(s=0;s0&&f>o)throw new Xt(f,o+1)}else{var d=tr(h).valueOf(),x=or(d);if(p[s]=d,o=f,f=x.length-1,s>0&&f!==o)throw new pr(o+1,f+1)}}if(p.length===0)throw new SyntaxError("At least one matrix expected");for(var v=p.shift();p.length;)v=Zd(v,p.shift(),f);return u?t(v):v},"...string":function(a){return a.join("")}})});var ww="column",nL=["typed","Index","matrix","range"],Xc=T(ww,nL,e=>{var{typed:r,Index:t,matrix:n,range:i}=e;return r(ww,{"Matrix, number":a,"Array, number":function(l,f){return a(n(tr(l)),f).valueOf()}});function a(s,l){if(s.size().length!==2)throw new Error("Only two dimensional matrix is supported");Xr(l,s.size()[1]);var f=i(0,s.size()[0]),o=new t(f,l),u=s.subset(o);return Ge(u)?u:n([[u]])}});var Dw="count",iL=["typed","size","prod"],Sw=T(Dw,iL,e=>{var{typed:r,size:t,prod:n}=e;return r(Dw,{string:function(a){return a.length},"Matrix | Array":function(a){return n(t(a))}})});var Nw="cross",aL=["typed","matrix","subtract","multiply"],Aw=T(Nw,aL,e=>{var{typed:r,matrix:t,subtract:n,multiply:i}=e;return r(Nw,{"Matrix, Matrix":function(l,f){return t(a(l.toArray(),f.toArray()))},"Matrix, Array":function(l,f){return t(a(l.toArray(),f))},"Array, Matrix":function(l,f){return t(a(l,f.toArray()))},"Array, Array":a});function a(s,l){var f=Math.max(or(s).length,or(l).length);s=Js(s),l=Js(l);var o=or(s),u=or(l);if(o.length!==1||u.length!==1||o[0]!==3||u[0]!==3)throw new RangeError("Vectors with length 3 expected (Size A = ["+o.join(", ")+"], B = ["+u.join(", ")+"])");var p=[n(i(s[1],l[2]),i(s[2],l[1])),n(i(s[2],l[0]),i(s[0],l[2])),n(i(s[0],l[1]),i(s[1],l[0]))];return f>1?[p]:p}});var Ew="diag",oL=["typed","matrix","DenseMatrix","SparseMatrix"],Cw=T(Ew,oL,e=>{var{typed:r,matrix:t,DenseMatrix:n,SparseMatrix:i}=e;return r(Ew,{Array:function(o){return a(o,0,or(o),null)},"Array, number":function(o,u){return a(o,u,or(o),null)},"Array, BigNumber":function(o,u){return a(o,u.toNumber(),or(o),null)},"Array, string":function(o,u){return a(o,0,or(o),u)},"Array, number, string":function(o,u,p){return a(o,u,or(o),p)},"Array, BigNumber, string":function(o,u,p){return a(o,u.toNumber(),or(o),p)},Matrix:function(o){return a(o,0,o.size(),o.storage())},"Matrix, number":function(o,u){return a(o,u,o.size(),o.storage())},"Matrix, BigNumber":function(o,u){return a(o,u.toNumber(),o.size(),o.storage())},"Matrix, string":function(o,u){return a(o,0,o.size(),u)},"Matrix, number, string":function(o,u,p){return a(o,u,o.size(),p)},"Matrix, BigNumber, string":function(o,u,p){return a(o,u.toNumber(),o.size(),p)}});function a(f,o,u,p){if(!He(o))throw new TypeError("Second parameter in function diag must be an integer");var h=o>0?o:0,d=o<0?-o:0;switch(u.length){case 1:return s(f,o,p,u[0],d,h);case 2:return l(f,o,p,u,d,h)}throw new RangeError("Matrix for function diag must be 2 dimensional")}function s(f,o,u,p,h,d){var x=[p+h,p+d];if(u&&u!=="sparse"&&u!=="dense")throw new TypeError("Unknown matrix type ".concat(u,'"'));var v=u==="sparse"?i.diagonal(x,f,o):n.diagonal(x,f,o);return u!==null?v:v.valueOf()}function l(f,o,u,p,h,d){if(Ge(f)){var x=f.diagonal(o);return u!==null?u!==x.storage()?t(x,u):x:x.valueOf()}for(var v=Math.min(p[0]-h,p[1]-d),y=[],w=0;w=2&&v.push("index: ".concat(_r(t))),d.length>=3&&v.push("array: ".concat(_r(n))),new TypeError("Function ".concat(i," cannot apply callback arguments ")+"".concat(e.name,"(").concat(v.join(", "),") at index ").concat(JSON.stringify(t)))}else throw new TypeError("Function ".concat(i," cannot apply callback arguments ")+"to function ".concat(e.name,": ").concat(y.message))}}}var sL="filter",uL=["typed"],_w=T(sL,uL,e=>{var{typed:r}=e;return r("filter",{"Array, function":Mw,"Matrix, function":function(n,i){return n.create(Mw(n.toArray(),i))},"Array, RegExp":Ks,"Matrix, RegExp":function(n,i){return n.create(Ks(n.toArray(),i))}})});function Mw(e,r){return Ec(e,function(t,n,i){return gi(r,t,[n],i,"filter")})}var Tw="flatten",fL=["typed","matrix"],Fw=T(Tw,fL,e=>{var{typed:r,matrix:t}=e;return r(Tw,{Array:function(i){return gr(i)},Matrix:function(i){var a=gr(i.toArray());return t(a)}})});var Ow="forEach",lL=["typed"],Bw=T(Ow,lL,e=>{var{typed:r}=e;return r(Ow,{"Array, function":cL,"Matrix, function":function(n,i){n.forEach(i)}})});function cL(e,r){var t=function n(i,a){if(Array.isArray(i))ho(i,function(s,l){n(s,a.concat(l))});else return gi(r,i,a,e,"forEach")};t(e,[])}var Iw="getMatrixDataType",pL=["typed"],Pw=T(Iw,pL,e=>{var{typed:r}=e;return r(Iw,{Array:function(n){return vo(n,_r)},Matrix:function(n){return n.getDataType()}})});var kw="identity",mL=["typed","config","matrix","BigNumber","DenseMatrix","SparseMatrix"],Rw=T(kw,mL,e=>{var{typed:r,config:t,matrix:n,BigNumber:i,DenseMatrix:a,SparseMatrix:s}=e;return r(kw,{"":function(){return t.matrix==="Matrix"?n([]):[]},string:function(u){return n(u)},"number | BigNumber":function(u){return f(u,u,t.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, string":function(u,p){return f(u,u,p)},"number | BigNumber, number | BigNumber":function(u,p){return f(u,p,t.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, number | BigNumber, string":function(u,p,h){return f(u,p,h)},Array:function(u){return l(u)},"Array, string":function(u,p){return l(u,p)},Matrix:function(u){return l(u.valueOf(),u.storage())},"Matrix, string":function(u,p){return l(u.valueOf(),p)}});function l(o,u){switch(o.length){case 0:return u?n(u):[];case 1:return f(o[0],o[0],u);case 2:return f(o[0],o[1],u);default:throw new Error("Vector containing two values expected")}}function f(o,u,p){var h=je(o)||je(u)?i:null;if(je(o)&&(o=o.toNumber()),je(u)&&(u=u.toNumber()),!He(o)||o<1)throw new Error("Parameters in function identity must be positive integers");if(!He(u)||u<1)throw new Error("Parameters in function identity must be positive integers");var d=h?new i(1):1,x=h?new h(0):0,v=[o,u];if(p){if(p==="sparse")return s.diagonal(v,d,0,x);if(p==="dense")return a.diagonal(v,d,0,x);throw new TypeError('Unknown matrix type "'.concat(p,'"'))}for(var y=Vi([],v,x),w=o{var{typed:r,matrix:t,multiplyScalar:n}=e;return r(Lw,{"Matrix, Matrix":function(s,l){return t(i(s.toArray(),l.toArray()))},"Matrix, Array":function(s,l){return t(i(s.toArray(),l))},"Array, Matrix":function(s,l){return t(i(s,l.toArray()))},"Array, Array":i});function i(a,s){if(or(a).length===1&&(a=[a]),or(s).length===1&&(s=[s]),or(a).length>2||or(s).length>2)throw new RangeError("Vectors with dimensions greater then 2 are not supported expected (Size x = "+JSON.stringify(a.length)+", y = "+JSON.stringify(s.length)+")");var l=[],f=[];return a.map(function(o){return s.map(function(u){return f=[],l.push(f),o.map(function(p){return u.map(function(h){return f.push(n(p,h))})})})})&&l}});var Uw="map",dL=["typed"],zw=T(Uw,dL,e=>{var{typed:r}=e;return r(Uw,{"Array, function":vL,"Matrix, function":function(n,i){return n.map(i)}})});function vL(e,r){var t=function n(i,a){return Array.isArray(i)?i.map(function(s,l){return n(s,a.concat(l))}):gi(r,i,a,e,"map")};return t(e,[])}var Ww="diff",gL=["typed","matrix","subtract","number"],Jc=T(Ww,gL,e=>{var{typed:r,matrix:t,subtract:n,number:i}=e;return r(Ww,{"Array | Matrix":function(u){return Ge(u)?t(s(u.toArray())):s(u)},"Array | Matrix, number":function(u,p){if(!He(p))throw new RangeError("Dimension must be a whole number");return Ge(u)?t(a(u.toArray(),p)):a(u,p)},"Array, BigNumber":r.referTo("Array,number",o=>(u,p)=>o(u,i(p))),"Matrix, BigNumber":r.referTo("Matrix,number",o=>(u,p)=>o(u,i(p)))});function a(o,u){if(Ge(o)&&(o=o.toArray()),!Array.isArray(o))throw RangeError("Array/Matrix does not have that many dimensions");if(u>0){var p=[];return o.forEach(h=>{p.push(a(h,u-1))}),p}else{if(u===0)return s(o);throw RangeError("Cannot have negative dimension")}}function s(o){for(var u=[],p=o.length,h=1;h{var{typed:r,config:t,matrix:n,BigNumber:i}=e;return r("ones",{"":function(){return t.matrix==="Array"?a([]):a([],"default")},"...number | BigNumber | string":function(o){var u=o[o.length-1];if(typeof u=="string"){var p=o.pop();return a(o,p)}else return t.matrix==="Array"?a(o):a(o,"default")},Array:a,Matrix:function(o){var u=o.storage();return a(o.valueOf(),u)},"Array | Matrix, string":function(o,u){return a(o.valueOf(),u)}});function a(f,o){var u=s(f),p=u?new i(1):1;if(l(f),o){var h=n(o);return f.length>0?h.resize(f,p):h}else{var d=[];return f.length>0?Vi(d,f,p):d}}function s(f){var o=!1;return f.forEach(function(u,p,h){je(u)&&(o=!0,h[p]=u.toNumber())}),o}function l(f){f.forEach(function(o){if(typeof o!="number"||!He(o)||o<0)throw new Error("Parameters in function ones must be positive integers")})}});function fu(){throw new Error('No "bignumber" implementation available')}function Kc(){throw new Error('No "fraction" implementation available')}function jc(){throw new Error('No "matrix" implementation available')}var Yw="range",bL=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq","add","isPositive"],ep=T(Yw,bL,e=>{var{typed:r,config:t,matrix:n,bignumber:i,smaller:a,smallerEq:s,larger:l,largerEq:f,add:o,isPositive:u}=e;return r(Yw,{string:h,"string, boolean":h,"number, number":function(y,w){return p(d(y,w,1,!1))},"number, number, number":function(y,w,C){return p(d(y,w,C,!1))},"number, number, boolean":function(y,w,C){return p(d(y,w,1,C))},"number, number, number, boolean":function(y,w,C,b){return p(d(y,w,C,b))},"BigNumber, BigNumber":function(y,w){var C=y.constructor;return p(d(y,w,new C(1),!1))},"BigNumber, BigNumber, BigNumber":function(y,w,C){return p(d(y,w,C,!1))},"BigNumber, BigNumber, boolean":function(y,w,C){var b=y.constructor;return p(d(y,w,new b(1),C))},"BigNumber, BigNumber, BigNumber, boolean":function(y,w,C,b){return p(d(y,w,C,b))},"Unit, Unit, Unit":function(y,w,C){return p(d(y,w,C,!1))},"Unit, Unit, Unit, boolean":function(y,w,C,b){return p(d(y,w,C,b))}});function p(v){return t.matrix==="Matrix"?n?n(v):jc():v}function h(v,y){var w=x(v);if(!w)throw new SyntaxError('String "'+v+'" is no valid range');return t.number==="BigNumber"?(i===void 0&&fu(),p(d(i(w.start),i(w.end),i(w.step)),y)):p(d(w.start,w.end,w.step,y))}function d(v,y,w,C){for(var b=[],A=u(w)?C?s:a:C?f:l,E=v;A(E,y);)b.push(E),E=o(E,w);return b}function x(v){var y=v.split(":"),w=y.map(function(b){return Number(b)}),C=w.some(function(b){return isNaN(b)});if(C)return null;switch(w.length){case 2:return{start:w[0],end:w[1],step:1};case 3:return{start:w[0],end:w[2],step:w[1]};default:return null}}});var Hw="reshape",wL=["typed","isInteger","matrix"],Gw=T(Hw,wL,e=>{var{typed:r,isInteger:t}=e;return r(Hw,{"Matrix, Array":function(i,a){return i.reshape(a,!0)},"Array, Array":function(i,a){return a.forEach(function(s){if(!t(s))throw new TypeError("Invalid size for dimension: "+s)}),xf(i,a)}})});var DL="resize",SL=["config","matrix"],$w=T(DL,SL,e=>{var{config:r,matrix:t}=e;return function(a,s,l){if(arguments.length!==2&&arguments.length!==3)throw new ei("resize",arguments.length,2,3);if(Ge(s)&&(s=s.valueOf()),je(s[0])&&(s=s.map(function(u){return je(u)?u.toNumber():u})),Ge(a))return a.resize(s,l,!0);if(typeof a=="string")return n(a,s,l);var f=Array.isArray(a)?!1:r.matrix!=="Array";if(s.length===0){for(;Array.isArray(a);)a=a[0];return tr(a)}else{Array.isArray(a)||(a=[a]),a=tr(a);var o=Vi(a,s,l);return f?t(o):o}};function n(i,a,s){if(s!==void 0){if(typeof s!="string"||s.length!==1)throw new TypeError("Single character expected as defaultValue")}else s=" ";if(a.length!==1)throw new pr(a.length,1);var l=a[0];if(typeof l!="number"||!He(l))throw new TypeError("Invalid size, must contain positive integers (size: "+lr(a)+")");if(i.length>l)return i.substring(0,l);if(i.length{var{typed:r,multiply:t,rotationMatrix:n}=e;return r(Zw,{"Array , number | BigNumber | Complex | Unit":function(s,l){i(s,2);var f=t(n(l),s);return f.toArray()},"Matrix , number | BigNumber | Complex | Unit":function(s,l){return i(s,2),t(n(l),s)},"Array, number | BigNumber | Complex | Unit, Array | Matrix":function(s,l,f){i(s,3);var o=t(n(l,f),s);return o},"Matrix, number | BigNumber | Complex | Unit, Array | Matrix":function(s,l,f){return i(s,3),t(n(l,f),s)}});function i(a,s){var l=Array.isArray(a)?or(a):a.size();if(l.length>2)throw new RangeError("Vector must be of dimensions 1x".concat(s));if(l.length===2&&l[1]!==1)throw new RangeError("Vector must be of dimensions 1x".concat(s));if(l[0]!==s)throw new RangeError("Vector must be of dimensions 1x".concat(s))}});var Xw="rotationMatrix",AL=["typed","config","multiplyScalar","addScalar","unaryMinus","norm","matrix","BigNumber","DenseMatrix","SparseMatrix","cos","sin"],Jw=T(Xw,AL,e=>{var{typed:r,config:t,multiplyScalar:n,addScalar:i,unaryMinus:a,norm:s,BigNumber:l,matrix:f,DenseMatrix:o,SparseMatrix:u,cos:p,sin:h}=e;return r(Xw,{"":function(){return t.matrix==="Matrix"?f([]):[]},string:function(b){return f(b)},"number | BigNumber | Complex | Unit":function(b){return d(b,t.matrix==="Matrix"?"dense":void 0)},"number | BigNumber | Complex | Unit, string":function(b,A){return d(b,A)},"number | BigNumber | Complex | Unit, Array":function(b,A){var E=f(A);return x(E),w(b,E,void 0)},"number | BigNumber | Complex | Unit, Matrix":function(b,A){x(A);var E=A.storage()||(t.matrix==="Matrix"?"dense":void 0);return w(b,A,E)},"number | BigNumber | Complex | Unit, Array, string":function(b,A,E){var S=f(A);return x(S),w(b,S,E)},"number | BigNumber | Complex | Unit, Matrix, string":function(b,A,E){return x(A),w(b,A,E)}});function d(C,b){var A=je(C),E=A?new l(-1):-1,S=p(C),O=h(C),F=[[S,n(E,O)],[O,S]];return y(F,b)}function x(C){var b=C.size();if(b.length<1||b[0]!==3)throw new RangeError("Vector must be of dimensions 1x3")}function v(C){return C.reduce((b,A)=>n(b,A))}function y(C,b){if(b){if(b==="sparse")return new u(C);if(b==="dense")return new o(C);throw new TypeError('Unknown matrix type "'.concat(b,'"'))}return C}function w(C,b,A){var E=s(b);if(E===0)throw new RangeError("Rotation around zero vector");var S=je(C)?l:null,O=S?new S(1):1,F=S?new S(-1):-1,M=S?new S(b.get([0])/E):b.get([0])/E,_=S?new S(b.get([1])/E):b.get([1])/E,k=S?new S(b.get([2])/E):b.get([2])/E,L=p(C),Y=i(O,a(L)),$=h(C),V=i(L,v([M,M,Y])),q=i(v([M,_,Y]),v([F,k,$])),R=i(v([M,k,Y]),v([_,$])),j=i(v([M,_,Y]),v([k,$])),U=i(L,v([_,_,Y])),oe=i(v([_,k,Y]),v([F,M,$])),me=i(v([M,k,Y]),v([F,_,$])),ie=i(v([_,k,Y]),v([M,$])),H=i(L,v([k,k,Y])),ce=[[V,q,R],[j,U,oe],[me,ie,H]];return y(ce,A)}});var Kw="row",EL=["typed","Index","matrix","range"],rp=T(Kw,EL,e=>{var{typed:r,Index:t,matrix:n,range:i}=e;return r(Kw,{"Matrix, number":a,"Array, number":function(l,f){return a(n(tr(l)),f).valueOf()}});function a(s,l){if(s.size().length!==2)throw new Error("Only two dimensional matrix is supported");Xr(l,s.size()[0]);var f=i(0,s.size()[1]),o=new t(l,f),u=s.subset(o);return Ge(u)?u:n([[u]])}});var jw="size",CL=["typed","config","?matrix"],eD=T(jw,CL,e=>{var{typed:r,config:t,matrix:n}=e;return r(jw,{Matrix:function(a){return a.create(a.size())},Array:or,string:function(a){return t.matrix==="Array"?[a.length]:n([a.length])},"number | Complex | BigNumber | Unit | boolean | null":function(a){return t.matrix==="Array"?[]:n?n([]):jc()}})});var rD="squeeze",ML=["typed","matrix"],tD=T(rD,ML,e=>{var{typed:r,matrix:t}=e;return r(rD,{Array:function(i){return Js(tr(i))},Matrix:function(i){var a=Js(i.toArray());return Array.isArray(a)?t(a):a},any:function(i){return tr(i)}})});var nD="subset",_L=["typed","matrix","zeros","add"],tp=T(nD,_L,e=>{var{typed:r,matrix:t,zeros:n,add:i}=e;return r(nD,{"Matrix, Index":function(l,f){return jo(f)?t():(gf(l,f),l.subset(f))},"Array, Index":r.referTo("Matrix, Index",function(s){return function(l,f){var o=s(t(l),f);return f.isScalar()?o:o.valueOf()}}),"Object, Index":FL,"string, Index":TL,"Matrix, Index, any, any":function(l,f,o,u){return jo(f)?l:(gf(l,f),l.clone().subset(f,a(o,f),u))},"Array, Index, any, any":r.referTo("Matrix, Index, any, any",function(s){return function(l,f,o,u){var p=s(t(l),f,o,u);return p.isMatrix?p.valueOf():p}}),"Array, Index, any":r.referTo("Matrix, Index, any, any",function(s){return function(l,f,o){return s(t(l),f,o,void 0).valueOf()}}),"Matrix, Index, any":r.referTo("Matrix, Index, any, any",function(s){return function(l,f,o){return s(l,f,o,void 0)}}),"string, Index, string":iD,"string, Index, string, string":iD,"Object, Index, any":OL});function a(s,l){if(typeof s=="string")throw new Error("can't boradcast a string");if(l._isScalar)return s;var f=l.size();if(f.every(o=>o>0))try{return i(s,n(f))}catch{return s}else return s}});function TL(e,r){if(!ua(r))throw new TypeError("Index expected");if(jo(r))return"";if(gf(Array.from(e),r),r.size().length!==1)throw new pr(r.size().length,1);var t=e.length;Xr(r.min()[0],t),Xr(r.max()[0],t);var n=r.dimension(0),i="";return n.forEach(function(a){i+=e.charAt(a)}),i}function iD(e,r,t,n){if(!r||r.isIndex!==!0)throw new TypeError("Index expected");if(jo(r))return e;if(gf(Array.from(e),r),r.size().length!==1)throw new pr(r.size().length,1);if(n!==void 0){if(typeof n!="string"||n.length!==1)throw new TypeError("Single character expected as defaultValue")}else n=" ";var i=r.dimension(0),a=i.size()[0];if(a!==t.length)throw new pr(i.size()[0],t.length);var s=e.length;Xr(r.min()[0]),Xr(r.max()[0]);for(var l=[],f=0;fs)for(var o=s-1,u=l.length;o{var{typed:r,matrix:t}=e;return r(aD,{Array:s=>n(t(s)).valueOf(),Matrix:n,any:tr});function n(s){var l=s.size(),f;switch(l.length){case 1:f=s.clone();break;case 2:{var o=l[0],u=l[1];if(u===0)throw new RangeError("Cannot transpose a 2D matrix with no columns (size: "+lr(l)+")");switch(s.storage()){case"dense":f=i(s,o,u);break;case"sparse":f=a(s,o,u);break}}break;default:throw new RangeError("Matrix must be a vector or two dimensional (size: "+lr(l)+")")}return f}function i(s,l,f){for(var o=s._data,u=[],p,h=0;h{var{typed:r,transpose:t,conj:n}=e;return r(sD,{any:function(a){return n(t(a))}})});var fD="zeros",PL=["typed","config","matrix","BigNumber"],lD=T(fD,PL,e=>{var{typed:r,config:t,matrix:n,BigNumber:i}=e;return r(fD,{"":function(){return t.matrix==="Array"?a([]):a([],"default")},"...number | BigNumber | string":function(o){var u=o[o.length-1];if(typeof u=="string"){var p=o.pop();return a(o,p)}else return t.matrix==="Array"?a(o):a(o,"default")},Array:a,Matrix:function(o){var u=o.storage();return a(o.valueOf(),u)},"Array | Matrix, string":function(o,u){return a(o.valueOf(),u)}});function a(f,o){var u=s(f),p=u?new i(0):0;if(l(f),o){var h=n(o);return f.length>0?h.resize(f,p):h}else{var d=[];return f.length>0?Vi(d,f,p):d}}function s(f){var o=!1;return f.forEach(function(u,p,h){je(u)&&(o=!0,h[p]=u.toNumber())}),o}function l(f){f.forEach(function(o){if(typeof o!="number"||!He(o)||o<0)throw new Error("Parameters in function zeros must be positive integers")})}});var cD="fft",kL=["typed","matrix","addScalar","multiplyScalar","divideScalar","exp","tau","i","dotDivide","conj","pow","ceil","log2"],pD=T(cD,kL,e=>{var{typed:r,matrix:t,addScalar:n,multiplyScalar:i,divideScalar:a,exp:s,tau:l,i:f,dotDivide:o,conj:u,pow:p,ceil:h,log2:d}=e;return r(cD,{Array:x,Matrix:function(b){return b.create(x(b.toArray()))}});function x(C){var b=or(C);return b.length===1?w(C,b[0]):v(C.map(A=>x(A,b.slice(1))),0)}function v(C,b){var A=or(C);if(b!==0)return new Array(A[0]).fill(0).map((S,O)=>v(C[O],b-1));if(A.length===1)return w(C);function E(S){var O=or(S);return new Array(O[1]).fill(0).map((F,M)=>new Array(O[0]).fill(0).map((_,k)=>S[k][M]))}return E(v(E(C),1))}function y(C){for(var b=C.length,A=s(a(i(-1,i(f,l)),b)),E=[],S=1-b;Si(C[R],E[b-1+R])),...new Array(O-b).fill(0)],M=[...new Array(b+b-1).fill(0).map((q,R)=>a(1,E[R])),...new Array(O-(b+b-1)).fill(0)],_=w(F),k=w(M),L=new Array(O).fill(0).map((q,R)=>i(_[R],k[R])),Y=o(u(x(u(L))),O),$=[],V=b-1;VM%2===0),b/2),...w(C.filter((F,M)=>M%2===1),b/2)],E=0;E{var{typed:r,fft:t,dotDivide:n,conj:i}=e;return r(mD,{"Array | Matrix":function(s){var l=Ge(s)?s.size():or(s);return n(i(t(i(s))),l.reduce((f,o)=>f*o,1))}})});function dD(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function LL(e){for(var r=1;r{var{typed:r,add:t,subtract:n,multiply:i,divide:a,max:s,map:l,abs:f,isPositive:o,isNegative:u,larger:p,smaller:h,matrix:d,bignumber:x,unaryMinus:v}=e;function y(F){return function(M,_,k,L){var Y=!(_.length===2&&(_.every(S)||_.every(qt)));if(Y)throw new Error('"tspan" must be an Array of two numeric values or two units [tStart, tEnd]');var $=_[0],V=_[1],q=p(V,$),R=L.firstStep;if(R!==void 0&&!o(R))throw new Error('"firstStep" must be positive');var j=L.maxStep;if(j!==void 0&&!o(j))throw new Error('"maxStep" must be positive');var U=L.minStep;if(U&&u(U))throw new Error('"minStep" must be positive or zero');var oe=[$,V,R,U,j].filter(Le=>Le!==void 0);if(!(oe.every(S)||oe.every(qt)))throw new Error('Inconsistent type of "t" dependant variables');for(var me=1,ie=L.tol?L.tol:1e-4,H=L.minDelta?L.minDelta:.2,ce=L.maxDelta?L.maxDelta:5,Me=L.maxIter?L.maxIter:1e4,pe=[$,V,...k,j,U].some(je),[ge,Se,xe,be]=pe?[x(F.a),x(F.c),x(F.b),x(F.bp)]:[F.a,F.c,F.b,F.bp],De=R?q?R:v(R):a(n(V,$),me),Ae=[$],ze=[k],Ze=n(xe,be),K=0,te=0,ye=A(q),ee=E(q);ye(Ae[K],V);){var ne=[];De=ee(Ae[K],V,De),ne.push(M(Ae[K],ze[K]));for(var ue=1;ueqt(Le)?Le.value:Le)));Ee1/4&&(Ae.push(t(Ae[K],De)),ze.push(t(ze[K],i(De,xe,ne))),K++);var Ce=.84*(ie/Ee)**(1/5);if(h(Ce,H)?Ce=H:p(Ce,ce)&&(Ce=ce),Ce=pe?x(Ce):Ce,De=i(De,Ce),j&&p(f(De),j)?De=q?j:v(j):U&&h(f(De),U)&&(De=q?U:v(U)),te++,te>Me)throw new Error("Maximum number of iterations reached, try changing options")}return{t:Ae,y:ze}}}function w(F,M,_,k){var L=[[],[.5],[0,.75],[.2222222222222222,.3333333333333333,.4444444444444444]],Y=[null,1/2,3/4,1],$=[2/9,1/3,4/9,0],V=[7/24,1/4,1/3,1/8],q={a:L,c:Y,b:$,bp:V};return y(q)(F,M,_,k)}function C(F,M,_,k){var L=[[],[.2],[.075,.225],[.9777777777777777,-3.7333333333333334,3.5555555555555554],[2.9525986892242035,-11.595793324188385,9.822892851699436,-.2908093278463649],[2.8462752525252526,-10.757575757575758,8.906422717743473,.2784090909090909,-.2735313036020583],[.09114583333333333,0,.44923629829290207,.6510416666666666,-.322376179245283,.13095238095238096]],Y=[null,1/5,3/10,4/5,8/9,1,1],$=[35/384,0,500/1113,125/192,-2187/6784,11/84,0],V=[5179/57600,0,7571/16695,393/640,-92097/339200,187/2100,1/40],q={a:L,c:Y,b:$,bp:V};return y(q)(F,M,_,k)}function b(F,M,_,k){var L=k.method?k.method:"RK45",Y={RK23:w,RK45:C};if(L.toUpperCase()in Y){var $=LL({},k);return delete $.method,Y[L.toUpperCase()](F,M,_,$)}else{var V=Object.keys(Y).map(R=>'"'.concat(R,'"')),q="".concat(V.slice(0,-1).join(", ")," and ").concat(V.slice(-1));throw new Error('Unavailable method "'.concat(L,'". Available methods are ').concat(q))}}function A(F){return F?h:p}function E(F){var M=F?p:h;return function(_,k,L){var Y=t(_,L);return M(Y,k)?n(k,_):L}}function S(F){return je(F)||ar(F)}function O(F,M,_,k){var L=b(F,M.toArray(),_.toArray(),k);return{t:d(L.t),y:d(L.y)}}return r("solveODE",{"function, Array, Array, Object":b,"function, Matrix, Matrix, Object":O,"function, Array, Array":(F,M,_)=>b(F,M,_,{}),"function, Matrix, Matrix":(F,M,_)=>O(F,M,_,{}),"function, Array, number | BigNumber | Unit":(F,M,_)=>{var k=b(F,M,[_],{});return{t:k.t,y:k.y.map(L=>L[0])}},"function, Matrix, number | BigNumber | Unit":(F,M,_)=>{var k=b(F,M.toArray(),[_],{});return{t:d(k.t),y:d(k.y.map(L=>L[0]))}},"function, Array, number | BigNumber | Unit, Object":(F,M,_,k)=>{var L=b(F,M,[_],k);return{t:L.t,y:L.y.map(Y=>Y[0])}},"function, Matrix, number | BigNumber | Unit, Object":(F,M,_,k)=>{var L=b(F,M.toArray(),[_],k);return{t:d(L.t),y:d(L.y.map(Y=>Y[0]))}}})});var zL="erf",WL=["typed"],gD=T(zL,WL,e=>{var{typed:r}=e;return r("name",{number:function(s){var l=Math.abs(s);return l>=HL?hi(s):l<=VL?hi(s)*t(l):l<=4?hi(s)*(1-n(l)):hi(s)*(1-i(l))},"Array | Matrix":r.referToSelf(a=>s=>Je(s,a))});function t(a){var s=a*a,l=qa[0][4]*s,f=s,o;for(o=0;o<3;o+=1)l=(l+qa[0][o])*s,f=(f+lu[0][o])*s;return a*(l+qa[0][3])/(f+lu[0][3])}function n(a){var s=qa[1][8]*a,l=a,f;for(f=0;f<7;f+=1)s=(s+qa[1][f])*a,l=(l+lu[1][f])*a;var o=(s+qa[1][7])/(l+lu[1][7]),u=parseInt(a*16)/16,p=(a-u)*(a+u);return Math.exp(-u*u)*Math.exp(-p)*o}function i(a){var s=1/(a*a),l=qa[2][5]*s,f=s,o;for(o=0;o<4;o+=1)l=(l+qa[2][o])*s,f=(f+lu[2][o])*s;var u=s*(l+qa[2][4])/(f+lu[2][4]);u=(YL-u)/a,s=parseInt(a*16)/16;var p=(a-s)*(a+s);return Math.exp(-s*s)*Math.exp(-p)*u}}),VL=.46875,YL=.5641895835477563,qa=[[3.1611237438705655,113.86415415105016,377.485237685302,3209.3775891384694,.18577770618460315],[.5641884969886701,8.883149794388377,66.11919063714163,298.6351381974001,881.952221241769,1712.0476126340707,2051.0783778260716,1230.3393547979972,21531153547440383e-24],[.30532663496123236,.36034489994980445,.12578172611122926,.016083785148742275,.0006587491615298378,.016315387137302097]],lu=[[23.601290952344122,244.02463793444417,1282.6165260773723,2844.236833439171],[15.744926110709835,117.6939508913125,537.1811018620099,1621.3895745666903,3290.7992357334597,4362.619090143247,3439.3676741437216,1230.3393548037495],[2.568520192289822,1.8729528499234604,.5279051029514285,.06051834131244132,.0023352049762686918]],HL=Math.pow(2,53);var xD="zeta",GL=["typed","config","multiply","pow","divide","factorial","equal","smallerEq","isNegative","gamma","sin","subtract","add","?Complex","?BigNumber","pi"],yD=T(xD,GL,e=>{var{typed:r,config:t,multiply:n,pow:i,divide:a,factorial:s,equal:l,smallerEq:f,isNegative:o,gamma:u,sin:p,subtract:h,add:d,Complex:x,BigNumber:v,pi:y}=e;return r(xD,{number:S=>w(S,O=>O,()=>20),BigNumber:S=>w(S,O=>new v(O),()=>Math.abs(Math.log10(t.epsilon))),Complex:C});function w(S,O,F){return l(S,0)?O(-.5):l(S,1)?O(NaN):isFinite(S)?b(S,O,F,M=>M):o(S)?O(NaN):O(1)}function C(S){return S.re===0&&S.im===0?new x(-.5):S.re===1?new x(NaN,NaN):S.re===1/0&&S.im===0?new x(1):S.im===1/0||S.re===-1/0?new x(NaN,NaN):b(S,O=>O,O=>Math.round(1.3*15+.9*Math.abs(O.im)),O=>O.re)}function b(S,O,F,M){var _=F(S);if(M(S)>-(_-1)/2)return E(S,O(_),O);var k=n(i(2,S),i(O(y),h(S,1)));return k=n(k,p(n(a(O(y),2),S))),k=n(k,u(h(1,S))),n(k,b(h(1,S),O,F,M))}function A(S,O){for(var F=S,M=S;f(M,O);M=d(M,1)){var _=a(n(s(d(O,h(M,1))),i(4,M)),n(s(h(O,M)),s(n(2,M))));F=d(F,_)}return n(O,F)}function E(S,O,F){for(var M=a(1,n(A(F(0),O),h(1,i(2,h(1,S))))),_=F(0),k=F(1);f(k,O);k=d(k,1))_=d(_,a(n((-1)**(k-1),A(k,O)),i(k,S)));return n(M,_)}});var bD="mode",$L=["typed","isNaN","isNumeric"],wD=T(bD,$L,e=>{var{typed:r,isNaN:t,isNumeric:n}=e;return r(bD,{"Array | Matrix":i,"...":function(s){return i(s)}});function i(a){a=gr(a.valueOf());var s=a.length;if(s===0)throw new Error("Cannot calculate mode of an empty array");for(var l={},f=[],o=0,u=0;uo&&(o=l[p],f=[p])}return f}});function St(e,r,t){var n;return String(e).indexOf("Unexpected type")!==-1?(n=arguments.length>2?" (type: "+_r(t)+", value: "+JSON.stringify(t)+")":" (type: "+e.data.actual+")",new TypeError("Cannot calculate "+r+", unexpected type of argument"+n)):String(e).indexOf("complex numbers")!==-1?(n=arguments.length>2?" (type: "+_r(t)+", value: "+JSON.stringify(t)+")":"",new TypeError("Cannot calculate "+r+", no ordering relation is defined for complex numbers"+n)):e}var DD="prod",ZL=["typed","config","multiplyScalar","numeric"],SD=T(DD,ZL,e=>{var{typed:r,config:t,multiplyScalar:n,numeric:i}=e;return r(DD,{"Array | Matrix":a,"Array | Matrix, number | BigNumber":function(l,f){throw new Error("prod(A, dim) is not yet supported")},"...":function(l){return a(l)}});function a(s){var l;if(hn(s,function(f){try{l=l===void 0?f:n(l,f)}catch(o){throw St(o,"prod",f)}}),typeof l=="string"&&(l=i(l,t.number)),l===void 0)throw new Error("Cannot calculate prod of an empty array");return l}});var ND="format",QL=["typed"],AD=T(ND,QL,e=>{var{typed:r}=e;return r(ND,{any:lr,"any, Object | function | number | BigNumber":lr})});var ED="bin",XL=["typed","format"],CD=T(ED,XL,e=>{var{typed:r,format:t}=e;return r(ED,{"number | BigNumber":function(i){return t(i,{notation:"bin"})},"number | BigNumber, number | BigNumber":function(i,a){return t(i,{notation:"bin",wordSize:a})}})});var MD="oct",JL=["typed","format"],_D=T(MD,JL,e=>{var{typed:r,format:t}=e;return r(MD,{"number | BigNumber":function(i){return t(i,{notation:"oct"})},"number | BigNumber, number | BigNumber":function(i,a){return t(i,{notation:"oct",wordSize:a})}})});var TD="hex",KL=["typed","format"],FD=T(TD,KL,e=>{var{typed:r,format:t}=e;return r(TD,{"number | BigNumber":function(i){return t(i,{notation:"hex"})},"number | BigNumber, number | BigNumber":function(i,a){return t(i,{notation:"hex",wordSize:a})}})});var np=/\\$([\\w.]+)/g;var OD="print",jL=["typed"],ip=T(OD,jL,e=>{var{typed:r}=e;return r(OD,{"string, Object | Array":BD,"string, Object | Array, number | Object":BD})});function BD(e,r,t){return e.replace(np,function(n,i){var a=i.split("."),s=r[a.shift()];for(s!==void 0&&s.isMatrix&&(s=s.toArray());a.length&&s!==void 0;){var l=a.shift();s=l?s[l]:s+"."}return s!==void 0?yt(s)?s:lr(s,t):n})}var ID="to",eq=["typed","matrix","concat"],PD=T(ID,eq,e=>{var{typed:r,matrix:t,concat:n}=e,i=vr({typed:r,matrix:t,concat:n});return r(ID,{"Unit, Unit | string":(a,s)=>a.to(s)},i({Ds:!0}))});var kD="isPrime",rq=["typed"],RD=T(kD,rq,e=>{var{typed:r}=e;return r(kD,{number:function(n){if(n*0!==0)return!1;if(n<=3)return n>1;if(n%2===0||n%3===0)return!1;for(var i=5;i*i<=n;i+=6)if(n%i===0||n%(i+2)===0)return!1;return!0},BigNumber:function(n){if(n.toNumber()*0!==0)return!1;if(n.lte(3))return n.gt(1);if(n.mod(2).eq(0)||n.mod(3).eq(0))return!1;if(n.lt(Math.pow(2,32))){for(var i=n.toNumber(),a=5;a*a<=i;a+=6)if(i%a===0||i%(a+2)===0)return!1;return!0}function s(C,b,A){for(var E=1;!b.eq(0);)b.mod(2).eq(0)?(b=b.div(2),C=C.mul(C).mod(A)):(b=b.sub(1),E=C.mul(E).mod(A));return E}var l=n.constructor.clone({precision:n.toFixed(0).length*2});n=new l(n);for(var f=0,o=n.sub(1);o.mod(2).eq(0);)o=o.div(2),f+=1;var u=null;if(n.lt("3317044064679887385961981"))u=[2,3,5,7,11,13,17,19,23,29,31,37,41].filter(C=>Cn=>Je(n,t))})});var tq="numeric",nq=["number","?bignumber","?fraction"],LD=T(tq,nq,e=>{var{number:r,bignumber:t,fraction:n}=e,i={string:!0,number:!0,BigNumber:!0,Fraction:!0},a={number:s=>r(s),BigNumber:t?s=>t(s):fu,Fraction:n?s=>n(s):Kc};return function(l){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"number",o=arguments.length>2?arguments[2]:void 0;if(o!==void 0)throw new SyntaxError("numeric() takes one or two arguments");var u=_r(l);if(!(u in i))throw new TypeError("Cannot convert "+l+' of type "'+u+'"; valid input types are '+Object.keys(i).join(", "));if(!(f in a))throw new TypeError("Cannot convert "+l+' to type "'+f+'"; valid output types are '+Object.keys(a).join(", "));return f===u?l:a[f](l)}});var qD="divideScalar",iq=["typed","numeric"],UD=T(qD,iq,e=>{var{typed:r,numeric:t}=e;return r(qD,{"number, number":function(i,a){return i/a},"Complex, Complex":function(i,a){return i.div(a)},"BigNumber, BigNumber":function(i,a){return i.div(a)},"Fraction, Fraction":function(i,a){return i.div(a)},"Unit, number | Complex | Fraction | BigNumber | Unit":(n,i)=>n.divide(i),"number | Fraction | Complex | BigNumber, Unit":(n,i)=>i.divideInto(n)})});var zD="pow",aq=["typed","config","identity","multiply","matrix","inv","fraction","number","Complex"],WD=T(zD,aq,e=>{var{typed:r,config:t,identity:n,multiply:i,matrix:a,inv:s,number:l,fraction:f,Complex:o}=e;return r(zD,{"number, number":u,"Complex, Complex":function(x,v){return x.pow(v)},"BigNumber, BigNumber":function(x,v){return v.isInteger()||x>=0||t.predictable?x.pow(v):new o(x.toNumber(),0).pow(v.toNumber(),0)},"Fraction, Fraction":function(x,v){var y=x.pow(v);if(y!=null)return y;if(t.predictable)throw new Error("Result of pow is non-rational and cannot be expressed as a fraction");return u(x.valueOf(),v.valueOf())},"Array, number":p,"Array, BigNumber":function(x,v){return p(x,v.toNumber())},"Matrix, number":h,"Matrix, BigNumber":function(x,v){return h(x,v.toNumber())},"Unit, number | BigNumber":function(x,v){return x.pow(v)}});function u(d,x){if(t.predictable&&!He(x)&&d<0)try{var v=f(x),y=l(v);if((x===y||Math.abs((x-y)/x)<1e-14)&&v.d%2===1)return(v.n%2===0?1:-1)*Math.pow(-d,x)}catch{}return t.predictable&&(d<-1&&x===1/0||d>-1&&d<0&&x===-1/0)?NaN:He(x)||d>=0||t.predictable?Av(d,x):d*d<1&&x===1/0||d*d>1&&x===-1/0?0:new o(d,0).pow(x,0)}function p(d,x){if(!He(x))throw new TypeError("For A^b, b must be an integer (value is "+x+")");var v=or(d);if(v.length!==2)throw new Error("For A^b, A must be 2 dimensional (A has "+v.length+" dimensions)");if(v[0]!==v[1])throw new Error("For A^b, A must be square (size is "+v[0]+"x"+v[1]+")");if(x<0)try{return p(s(d),-x)}catch(C){throw C.message==="Cannot calculate inverse, determinant is zero"?new TypeError("For A^b, when A is not invertible, b must be a positive integer (value is "+x+")"):C}for(var y=n(v[0]).valueOf(),w=d;x>=1;)(x&1)===1&&(y=i(w,y)),x>>=1,w=i(w,w);return y}function h(d,x){return a(p(d.valueOf(),x))}});var cu="Number of decimals in function round must be an integer",VD="round",oq=["typed","config","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],YD=T(VD,oq,e=>{var{typed:r,config:t,matrix:n,equalScalar:i,zeros:a,BigNumber:s,DenseMatrix:l}=e,f=Jr({typed:r,equalScalar:i}),o=Lr({typed:r,DenseMatrix:l}),u=Bt({typed:r});function p(h){return Math.abs(Xs(h).exponent)}return r(VD,{number:function(d){var x=iu(d,p(t.epsilon)),v=wt(d,x,t.epsilon)?x:d;return iu(v)},"number, number":function(d,x){var v=p(t.epsilon);if(x>=v)return iu(d,x);var y=iu(d,v),w=wt(d,y,t.epsilon)?y:d;return iu(w,x)},"number, BigNumber":function(d,x){if(!x.isInteger())throw new TypeError(cu);return new s(d).toDecimalPlaces(x.toNumber())},Complex:function(d){return d.round()},"Complex, number":function(d,x){if(x%1)throw new TypeError(cu);return d.round(x)},"Complex, BigNumber":function(d,x){if(!x.isInteger())throw new TypeError(cu);var v=x.toNumber();return d.round(v)},BigNumber:function(d){var x=new s(d).toDecimalPlaces(p(t.epsilon)),v=Ut(d,x,t.epsilon)?x:d;return v.toDecimalPlaces(0)},"BigNumber, BigNumber":function(d,x){if(!x.isInteger())throw new TypeError(cu);var v=p(t.epsilon);if(x>=v)return d.toDecimalPlaces(x.toNumber());var y=d.toDecimalPlaces(v),w=Ut(d,y,t.epsilon)?y:d;return w.toDecimalPlaces(x.toNumber())},Fraction:function(d){return d.round()},"Fraction, number":function(d,x){if(x%1)throw new TypeError(cu);return d.round(x)},"Fraction, BigNumber":function(d,x){if(!x.isInteger())throw new TypeError(cu);return d.round(x.toNumber())},"Unit, number, Unit":r.referToSelf(h=>function(d,x,v){var y=d.toNumeric(v);return v.multiply(h(y,x))}),"Unit, BigNumber, Unit":r.referToSelf(h=>(d,x,v)=>h(d,x.toNumber(),v)),"Unit, Unit":r.referToSelf(h=>(d,x)=>h(d,0,x)),"Array | Matrix, number, Unit":r.referToSelf(h=>(d,x,v)=>Je(d,y=>h(y,x,v),!0)),"Array | Matrix, BigNumber, Unit":r.referToSelf(h=>(d,x,v)=>h(d,x.toNumber(),v)),"Array | Matrix, Unit":r.referToSelf(h=>(d,x)=>h(d,0,x)),"Array | Matrix":r.referToSelf(h=>d=>Je(d,h,!0)),"SparseMatrix, number | BigNumber":r.referToSelf(h=>(d,x)=>f(d,x,h,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(h=>(d,x)=>u(d,x,h,!1)),"Array, number | BigNumber":r.referToSelf(h=>(d,x)=>u(n(d),x,h,!1).valueOf()),"number | Complex | BigNumber | Fraction, SparseMatrix":r.referToSelf(h=>(d,x)=>i(d,0)?a(x.size(),x.storage()):o(x,d,h,!0)),"number | Complex | BigNumber | Fraction, DenseMatrix":r.referToSelf(h=>(d,x)=>i(d,0)?a(x.size(),x.storage()):u(x,d,h,!0)),"number | Complex | BigNumber | Fraction, Array":r.referToSelf(h=>(d,x)=>u(n(x),d,h,!0).valueOf())})});var HD="log",sq=["config","typed","divideScalar","Complex"],GD=T(HD,sq,e=>{var{typed:r,config:t,divideScalar:n,Complex:i}=e;return r(HD,{number:function(s){return s>=0||t.predictable?p1(s):new i(s,0).log()},Complex:function(s){return s.log()},BigNumber:function(s){return!s.isNegative()||t.predictable?s.ln():new i(s.toNumber(),0).log()},"any, any":r.referToSelf(a=>(s,l)=>n(a(s),a(l)))})});var $D="log1p",uq=["typed","config","divideScalar","log","Complex"],ZD=T($D,uq,e=>{var{typed:r,config:t,divideScalar:n,log:i,Complex:a}=e;return r($D,{number:function(f){return f>=-1||t.predictable?bc(f):s(new a(f,0))},Complex:s,BigNumber:function(f){var o=f.plus(1);return!o.isNegative()||t.predictable?o.ln():s(new a(f.toNumber(),0))},"Array | Matrix":r.referToSelf(l=>f=>Je(f,l)),"any, any":r.referToSelf(l=>(f,o)=>n(l(f),i(o)))});function s(l){var f=l.re+1;return new a(Math.log(Math.sqrt(f*f+l.im*l.im)),Math.atan2(l.im,f))}});var QD="nthRoots",fq=["config","typed","divideScalar","Complex"],XD=T(QD,fq,e=>{var{typed:r,config:t,divideScalar:n,Complex:i}=e,a=[function(f){return new i(f,0)},function(f){return new i(0,f)},function(f){return new i(-f,0)},function(f){return new i(0,-f)}];function s(l,f){if(f<0)throw new Error("Root must be greater than zero");if(f===0)throw new Error("Root must be non-zero");if(f%1!==0)throw new Error("Root must be an integer");if(l===0||l.abs()===0)return[new i(0,0)];var o=typeof l=="number",u;(o||l.re===0||l.im===0)&&(o?u=2*+(l<0):l.im===0?u=2*+(l.re<0):u=2*+(l.im<0)+1);for(var p=l.arg(),h=l.abs(),d=[],x=Math.pow(h,1/f),v=0;v{var{typed:r,equalScalar:t,matrix:n,pow:i,DenseMatrix:a,concat:s}=e,l=ft({typed:r}),f=Vt({typed:r,DenseMatrix:a}),o=Jr({typed:r,equalScalar:t}),u=Lr({typed:r,DenseMatrix:a}),p=vr({typed:r,matrix:n,concat:s}),h={};for(var d in i.signatures)Object.prototype.hasOwnProperty.call(i.signatures,d)&&!d.includes("Matrix")&&!d.includes("Array")&&(h[d]=i.signatures[d]);var x=r(h);return r(JD,p({elop:x,SS:f,DS:l,Ss:o,sS:u}))});var jD="dotDivide",cq=["typed","matrix","equalScalar","divideScalar","DenseMatrix","concat"],eS=T(jD,cq,e=>{var{typed:r,matrix:t,equalScalar:n,divideScalar:i,DenseMatrix:a,concat:s}=e,l=It({typed:r,equalScalar:n}),f=ft({typed:r}),o=Vt({typed:r,DenseMatrix:a}),u=Jr({typed:r,equalScalar:n}),p=Lr({typed:r,DenseMatrix:a}),h=vr({typed:r,matrix:t,concat:s});return r(jD,h({elop:i,SS:o,DS:f,SD:l,Ss:u,sS:p}))});function ha(e){var{DenseMatrix:r}=e;return function(n,i,a){var s=n.size();if(s.length!==2)throw new RangeError("Matrix must be two dimensional (size: "+lr(s)+")");var l=s[0],f=s[1];if(l!==f)throw new RangeError("Matrix must be square (size: "+lr(s)+")");var o=[];if(Ge(i)){var u=i.size(),p=i._data;if(u.length===1){if(u[0]!==l)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var h=0;h{var{typed:r,matrix:t,divideScalar:n,multiplyScalar:i,subtractScalar:a,equalScalar:s,DenseMatrix:l}=e,f=ha({DenseMatrix:l});return r(rS,{"SparseMatrix, Array | Matrix":function(h,d){return u(h,d)},"DenseMatrix, Array | Matrix":function(h,d){return o(h,d)},"Array, Array | Matrix":function(h,d){var x=t(h),v=o(x,d);return v.valueOf()}});function o(p,h){h=f(p,h,!0);for(var d=h._data,x=p._size[0],v=p._size[1],y=[],w=p._data,C=0;CA&&(O.push(y[k]),F.push(L))}if(s(S,0))throw new Error("Linear system cannot be solved since matrix is singular");for(var Y=n(E,S),$=0,V=F.length;${var{typed:r,matrix:t,divideScalar:n,multiplyScalar:i,subtractScalar:a,equalScalar:s,DenseMatrix:l}=e,f=ha({DenseMatrix:l});return r(nS,{"SparseMatrix, Array | Matrix":function(h,d){return u(h,d)},"DenseMatrix, Array | Matrix":function(h,d){return o(h,d)},"Array, Array | Matrix":function(h,d){var x=t(h),v=o(x,d);return v.valueOf()}});function o(p,h){h=f(p,h,!0);for(var d=h._data,x=p._size[0],v=p._size[1],y=[],w=p._data,C=v-1;C>=0;C--){var b=d[C][0]||0,A=void 0;if(s(b,0))A=0;else{var E=w[C][C];if(s(E,0))throw new Error("Linear system cannot be solved since matrix is singular");A=n(b,E);for(var S=C-1;S>=0;S--)d[S]=[a(d[S][0]||0,i(A,w[S][C]))]}y[C]=[A]}return new l({data:y,size:[x,1]})}function u(p,h){h=f(p,h,!0);for(var d=h._data,x=p._size[0],v=p._size[1],y=p._values,w=p._index,C=p._ptr,b=[],A=v-1;A>=0;A--){var E=d[A][0]||0;if(s(E,0))b[A]=[0];else{for(var S=0,O=[],F=[],M=C[A],_=C[A+1],k=_-1;k>=M;k--){var L=w[k];L===A?S=y[k]:L{var{typed:r,matrix:t,divideScalar:n,multiplyScalar:i,subtractScalar:a,equalScalar:s,DenseMatrix:l}=e,f=ha({DenseMatrix:l});return r(aS,{"SparseMatrix, Array | Matrix":function(h,d){return u(h,d)},"DenseMatrix, Array | Matrix":function(h,d){return o(h,d)},"Array, Array | Matrix":function(h,d){var x=t(h),v=o(x,d);return v.map(y=>y.valueOf())}});function o(p,h){for(var d=[f(p,h,!0)._data.map(F=>F[0])],x=p._data,v=p._size[0],y=p._size[1],w=0;wnew l({data:F.map(M=>[M]),size:[v,1]}))}function u(p,h){for(var d=[f(p,h,!0)._data.map(me=>me[0])],x=p._size[0],v=p._size[1],y=p._values,w=p._index,C=p._ptr,b=0;bb&&(O.push(y[L]),F.push(Y))}if(s(k,0))if(s(S[b],0)){if(E===0){var R=[...S];R[b]=1;for(var j=0,U=F.length;jnew l({data:me.map(ie=>[ie]),size:[x,1]}))}});var sS="usolveAll",dq=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],uS=T(sS,dq,e=>{var{typed:r,matrix:t,divideScalar:n,multiplyScalar:i,subtractScalar:a,equalScalar:s,DenseMatrix:l}=e,f=ha({DenseMatrix:l});return r(sS,{"SparseMatrix, Array | Matrix":function(h,d){return u(h,d)},"DenseMatrix, Array | Matrix":function(h,d){return o(h,d)},"Array, Array | Matrix":function(h,d){var x=t(h),v=o(x,d);return v.map(y=>y.valueOf())}});function o(p,h){for(var d=[f(p,h,!0)._data.map(F=>F[0])],x=p._data,v=p._size[0],y=p._size[1],w=y-1;w>=0;w--)for(var C=d.length,b=0;b=0;O--)S[O]=a(S[O],x[O][w]);d.push(S)}}else{if(b===0)return[];d.splice(b,1),b-=1,C-=1}else{A[w]=n(A[w],x[w][w]);for(var E=w-1;E>=0;E--)A[E]=a(A[E],i(A[w],x[E][w]))}}return d.map(F=>new l({data:F.map(M=>[M]),size:[v,1]}))}function u(p,h){for(var d=[f(p,h,!0)._data.map(me=>me[0])],x=p._size[0],v=p._size[1],y=p._values,w=p._index,C=p._ptr,b=v-1;b>=0;b--)for(var A=d.length,E=0;E=M;L--){var Y=w[L];Y===b?k=y[L]:Ynew l({data:me.map(ie=>[ie]),size:[x,1]}))}});var vq="matAlgo08xS0Sid",gq=["typed","equalScalar"],pu=T(vq,gq,e=>{var{typed:r,equalScalar:t}=e;return function(i,a,s){var l=i._values,f=i._index,o=i._ptr,u=i._size,p=i._datatype||i._data===void 0?i._datatype:i.getDataType(),h=a._values,d=a._index,x=a._ptr,v=a._size,y=a._datatype||a._data===void 0?a._datatype:a.getDataType();if(u.length!==v.length)throw new pr(u.length,v.length);if(u[0]!==v[0]||u[1]!==v[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+v+")");if(!l||!h)throw new Error("Cannot perform operation on Pattern Sparse Matrices");var w=u[0],C=u[1],b,A=t,E=0,S=s;typeof p=="string"&&p===y&&p!=="mixed"&&(b=p,A=r.find(t,[b,b]),E=r.convert(0,b),S=r.find(s,[b,b]));for(var O=[],F=[],M=[],_=[],k=[],L,Y,$,V,q=0;q{var{typed:r,matrix:t}=e;return{"Array, number":r.referTo("DenseMatrix, number",n=>(i,a)=>n(t(i),a).valueOf()),"Array, BigNumber":r.referTo("DenseMatrix, BigNumber",n=>(i,a)=>n(t(i),a).valueOf()),"number, Array":r.referTo("number, DenseMatrix",n=>(i,a)=>n(i,t(a)).valueOf()),"BigNumber, Array":r.referTo("BigNumber, DenseMatrix",n=>(i,a)=>n(i,t(a)).valueOf())}});var fS="leftShift",xq=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],lS=T(fS,xq,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:i,DenseMatrix:a,concat:s}=e,l=dn({typed:r}),f=It({typed:r,equalScalar:n}),o=pu({typed:r,equalScalar:n}),u=Un({typed:r,DenseMatrix:a}),p=Jr({typed:r,equalScalar:n}),h=Bt({typed:r}),d=vr({typed:r,matrix:t,concat:s}),x=mu({typed:r,matrix:t});return r(fS,{"number, number":Tv,"BigNumber, BigNumber":jb,"SparseMatrix, number | BigNumber":r.referToSelf(v=>(y,w)=>n(w,0)?y.clone():p(y,w,v,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(v=>(y,w)=>n(w,0)?y.clone():h(y,w,v,!1)),"number | BigNumber, SparseMatrix":r.referToSelf(v=>(y,w)=>n(y,0)?i(w.size(),w.storage()):u(w,y,v,!0)),"number | BigNumber, DenseMatrix":r.referToSelf(v=>(y,w)=>n(y,0)?i(w.size(),w.storage()):h(w,y,v,!0))},x,d({SS:o,DS:l,SD:f}))});var cS="rightArithShift",yq=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],pS=T(cS,yq,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:i,DenseMatrix:a,concat:s}=e,l=dn({typed:r}),f=It({typed:r,equalScalar:n}),o=pu({typed:r,equalScalar:n}),u=Un({typed:r,DenseMatrix:a}),p=Jr({typed:r,equalScalar:n}),h=Bt({typed:r}),d=vr({typed:r,matrix:t,concat:s}),x=mu({typed:r,matrix:t});return r(cS,{"number, number":Fv,"BigNumber, BigNumber":ew,"SparseMatrix, number | BigNumber":r.referToSelf(v=>(y,w)=>n(w,0)?y.clone():p(y,w,v,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(v=>(y,w)=>n(w,0)?y.clone():h(y,w,v,!1)),"number | BigNumber, SparseMatrix":r.referToSelf(v=>(y,w)=>n(y,0)?i(w.size(),w.storage()):u(w,y,v,!0)),"number | BigNumber, DenseMatrix":r.referToSelf(v=>(y,w)=>n(y,0)?i(w.size(),w.storage()):h(w,y,v,!0))},x,d({SS:o,DS:l,SD:f}))});var mS="rightLogShift",bq=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],hS=T(mS,bq,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:i,DenseMatrix:a,concat:s}=e,l=dn({typed:r}),f=It({typed:r,equalScalar:n}),o=pu({typed:r,equalScalar:n}),u=Un({typed:r,DenseMatrix:a}),p=Jr({typed:r,equalScalar:n}),h=Bt({typed:r}),d=vr({typed:r,matrix:t,concat:s}),x=mu({typed:r,matrix:t});return r(mS,{"number, number":Ov,"SparseMatrix, number | BigNumber":r.referToSelf(v=>(y,w)=>n(w,0)?y.clone():p(y,w,v,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(v=>(y,w)=>n(w,0)?y.clone():h(y,w,v,!1)),"number | BigNumber, SparseMatrix":r.referToSelf(v=>(y,w)=>n(y,0)?i(w.size(),w.storage()):u(w,y,v,!0)),"number | BigNumber, DenseMatrix":r.referToSelf(v=>(y,w)=>n(y,0)?i(w.size(),w.storage()):h(w,y,v,!0))},x,d({SS:o,DS:l,SD:f}))});var dS="and",wq=["typed","matrix","equalScalar","zeros","not","concat"],ap=T(dS,wq,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:i,not:a,concat:s}=e,l=It({typed:r,equalScalar:n}),f=No({typed:r,equalScalar:n}),o=Jr({typed:r,equalScalar:n}),u=Bt({typed:r}),p=vr({typed:r,matrix:t,concat:s});return r(dS,{"number, number":Lv,"Complex, Complex":function(d,x){return(d.re!==0||d.im!==0)&&(x.re!==0||x.im!==0)},"BigNumber, BigNumber":function(d,x){return!d.isZero()&&!x.isZero()&&!d.isNaN()&&!x.isNaN()},"Unit, Unit":r.referToSelf(h=>(d,x)=>h(d.value||0,x.value||0)),"SparseMatrix, any":r.referToSelf(h=>(d,x)=>a(x)?i(d.size(),d.storage()):o(d,x,h,!1)),"DenseMatrix, any":r.referToSelf(h=>(d,x)=>a(x)?i(d.size(),d.storage()):u(d,x,h,!1)),"any, SparseMatrix":r.referToSelf(h=>(d,x)=>a(d)?i(d.size(),d.storage()):o(x,d,h,!0)),"any, DenseMatrix":r.referToSelf(h=>(d,x)=>a(d)?i(d.size(),d.storage()):u(x,d,h,!0)),"Array, any":r.referToSelf(h=>(d,x)=>h(t(d),x).valueOf()),"any, Array":r.referToSelf(h=>(d,x)=>h(d,t(x)).valueOf())},p({SS:f,DS:l}))});var op="compare",Dq=["typed","config","matrix","equalScalar","BigNumber","Fraction","DenseMatrix","concat"],vS=T(op,Dq,e=>{var{typed:r,config:t,equalScalar:n,matrix:i,BigNumber:a,Fraction:s,DenseMatrix:l,concat:f}=e,o=ft({typed:r}),u=So({typed:r,equalScalar:n}),p=Lr({typed:r,DenseMatrix:l}),h=vr({typed:r,matrix:i,concat:f}),d=vi({typed:r});return r(op,Sq({typed:r,config:t}),{"boolean, boolean":function(v,y){return v===y?0:v>y?1:-1},"BigNumber, BigNumber":function(v,y){return Ut(v,y,t.epsilon)?new a(0):new a(v.cmp(y))},"Fraction, Fraction":function(v,y){return new s(v.compare(y))},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},d,h({SS:u,DS:o,Ss:p}))}),Sq=T(op,["typed","config"],e=>{var{typed:r,config:t}=e;return r(op,{"number, number":function(i,a){return wt(i,a,t.epsilon)?0:i>a?1:-1}})});var as=Xn(xS(),1);var yS="compareNatural",Nq=["typed","compare"],bS=T(yS,Nq,e=>{var{typed:r,compare:t}=e,n=t.signatures["boolean,boolean"];return r(yS,{"any, any":i});function i(f,o){var u=_r(f),p=_r(o),h;if((u==="number"||u==="BigNumber"||u==="Fraction")&&(p==="number"||p==="BigNumber"||p==="Fraction"))return h=t(f,o),h.toString()!=="0"?h>0?1:-1:(0,as.default)(u,p);var d=["Array","DenseMatrix","SparseMatrix"];if(d.includes(u)||d.includes(p))return h=a(i,f,o),h!==0?h:(0,as.default)(u,p);if(u!==p)return(0,as.default)(u,p);if(u==="Complex")return Aq(f,o);if(u==="Unit")return f.equalBase(o)?i(f.value,o.value):s(i,f.formatUnits(),o.formatUnits());if(u==="boolean")return n(f,o);if(u==="string")return(0,as.default)(f,o);if(u==="Object")return l(i,f,o);if(u==="null"||u==="undefined")return 0;throw new TypeError('Unsupported type of value "'+u+'"')}function a(f,o,u){return Kn(o)&&Kn(u)?s(f,o.toJSON().values,u.toJSON().values):Kn(o)?a(f,o.toArray(),u):Kn(u)?a(f,o,u.toArray()):Ia(o)?a(f,o.toJSON().data,u):Ia(u)?a(f,o,u.toJSON().data):Array.isArray(o)?Array.isArray(u)?s(f,o,u):a(f,o,[u]):a(f,[o],u)}function s(f,o,u){for(var p=0,h=Math.min(o.length,u.length);pu.length?1:o.lengthr.re?1:e.rer.im?1:e.im{var{typed:r,matrix:t,concat:n}=e,i=vr({typed:r,matrix:t,concat:n});return r(wS,Nc,i({elop:Nc,Ds:!0}))});var sp="equal",Cq=["typed","matrix","equalScalar","DenseMatrix","concat"],SS=T(sp,Cq,e=>{var{typed:r,matrix:t,equalScalar:n,DenseMatrix:i,concat:a}=e,s=ft({typed:r}),l=Vt({typed:r,DenseMatrix:i}),f=Lr({typed:r,DenseMatrix:i}),o=vr({typed:r,matrix:t,concat:a});return r(sp,Mq({typed:r,equalScalar:n}),o({elop:n,SS:l,DS:s,Ss:f}))}),Mq=T(sp,["typed","equalScalar"],e=>{var{typed:r,equalScalar:t}=e;return r(sp,{"any, any":function(i,a){return i===null?a===null:a===null?i===null:i===void 0?a===void 0:a===void 0?i===void 0:t(i,a)}})});var NS="equalText",_q=["typed","compareText","isZero"],AS=T(NS,_q,e=>{var{typed:r,compareText:t,isZero:n}=e;return r(NS,{"any, any":function(a,s){return n(t(a,s))}})});var up="smaller",Tq=["typed","config","matrix","DenseMatrix","concat"],ES=T(up,Tq,e=>{var{typed:r,config:t,matrix:n,DenseMatrix:i,concat:a}=e,s=ft({typed:r}),l=Vt({typed:r,DenseMatrix:i}),f=Lr({typed:r,DenseMatrix:i}),o=vr({typed:r,matrix:n,concat:a}),u=vi({typed:r});return r(up,Fq({typed:r,config:t}),{"boolean, boolean":(p,h)=>pp.compare(h)===-1,"Complex, Complex":function(h,d){throw new TypeError("No ordering relation is defined for complex numbers")}},u,o({SS:l,DS:s,Ss:f}))}),Fq=T(up,["typed","config"],e=>{var{typed:r,config:t}=e;return r(up,{"number, number":function(i,a){return i{var{typed:r,config:t,matrix:n,DenseMatrix:i,concat:a}=e,s=ft({typed:r}),l=Vt({typed:r,DenseMatrix:i}),f=Lr({typed:r,DenseMatrix:i}),o=vr({typed:r,matrix:n,concat:a}),u=vi({typed:r});return r(fp,Bq({typed:r,config:t}),{"boolean, boolean":(p,h)=>p<=h,"BigNumber, BigNumber":function(h,d){return h.lte(d)||Ut(h,d,t.epsilon)},"Fraction, Fraction":(p,h)=>p.compare(h)!==1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},u,o({SS:l,DS:s,Ss:f}))}),Bq=T(fp,["typed","config"],e=>{var{typed:r,config:t}=e;return r(fp,{"number, number":function(i,a){return i<=a||wt(i,a,t.epsilon)}})});var lp="larger",Iq=["typed","config","matrix","DenseMatrix","concat"],MS=T(lp,Iq,e=>{var{typed:r,config:t,matrix:n,DenseMatrix:i,concat:a}=e,s=ft({typed:r}),l=Vt({typed:r,DenseMatrix:i}),f=Lr({typed:r,DenseMatrix:i}),o=vr({typed:r,matrix:n,concat:a}),u=vi({typed:r});return r(lp,Pq({typed:r,config:t}),{"boolean, boolean":(p,h)=>p>h,"BigNumber, BigNumber":function(h,d){return h.gt(d)&&!Ut(h,d,t.epsilon)},"Fraction, Fraction":(p,h)=>p.compare(h)===1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},u,o({SS:l,DS:s,Ss:f}))}),Pq=T(lp,["typed","config"],e=>{var{typed:r,config:t}=e;return r(lp,{"number, number":function(i,a){return i>a&&!wt(i,a,t.epsilon)}})});var cp="largerEq",kq=["typed","config","matrix","DenseMatrix","concat"],_S=T(cp,kq,e=>{var{typed:r,config:t,matrix:n,DenseMatrix:i,concat:a}=e,s=ft({typed:r}),l=Vt({typed:r,DenseMatrix:i}),f=Lr({typed:r,DenseMatrix:i}),o=vr({typed:r,matrix:n,concat:a}),u=vi({typed:r});return r(cp,Rq({typed:r,config:t}),{"boolean, boolean":(p,h)=>p>=h,"BigNumber, BigNumber":function(h,d){return h.gte(d)||Ut(h,d,t.epsilon)},"Fraction, Fraction":(p,h)=>p.compare(h)!==-1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},u,o({SS:l,DS:s,Ss:f}))}),Rq=T(cp,["typed","config"],e=>{var{typed:r,config:t}=e;return r(cp,{"number, number":function(i,a){return i>=a||wt(i,a,t.epsilon)}})});var TS="deepEqual",Lq=["typed","equal"],FS=T(TS,Lq,e=>{var{typed:r,equal:t}=e;return r(TS,{"any, any":function(a,s){return n(a.valueOf(),s.valueOf())}});function n(i,a){if(Array.isArray(i))if(Array.isArray(a)){var s=i.length;if(s!==a.length)return!1;for(var l=0;l{var{typed:r,config:t,equalScalar:n,matrix:i,DenseMatrix:a,concat:s}=e,l=ft({typed:r}),f=Vt({typed:r,DenseMatrix:a}),o=Lr({typed:r,DenseMatrix:a}),u=vr({typed:r,matrix:i,concat:s});return r(pp,Uq({typed:r,equalScalar:n}),u({elop:p,SS:f,DS:l,Ss:o}));function p(h,d){return!n(h,d)}}),Uq=T(pp,["typed","equalScalar"],e=>{var{typed:r,equalScalar:t}=e;return r(pp,{"any, any":function(i,a){return i===null?a!==null:a===null?i!==null:i===void 0?a!==void 0:a===void 0?i!==void 0:!t(i,a)}})});var BS="partitionSelect",zq=["typed","isNumeric","isNaN","compare"],IS=T(BS,zq,e=>{var{typed:r,isNumeric:t,isNaN:n,compare:i}=e,a=i,s=(o,u)=>-i(o,u);return r(BS,{"Array | Matrix, number":function(u,p){return l(u,p,a)},"Array | Matrix, number, string":function(u,p,h){if(h==="asc")return l(u,p,a);if(h==="desc")return l(u,p,s);throw new Error('Compare string must be "asc" or "desc"')},"Array | Matrix, number, function":l});function l(o,u,p){if(!He(u)||u<0)throw new Error("k must be a non-negative integer");if(Ge(o)){var h=o.size();if(h.length>1)throw new Error("Only one dimensional matrices supported");return f(o.valueOf(),u,p)}if(Array.isArray(o))return f(o,u,p)}function f(o,u,p){if(u>=o.length)throw new Error("k out of bounds");for(var h=0;h=0){var C=o[y];o[y]=o[v],o[v]=C,--y}else++v;p(o[v],w)>0&&--v,u<=v?x=v:d=v+1}return o[u]}});var PS="sort",Wq=["typed","matrix","compare","compareNatural"],kS=T(PS,Wq,e=>{var{typed:r,matrix:t,compare:n,compareNatural:i}=e,a=n,s=(u,p)=>-n(u,p);return r(PS,{Array:function(p){return f(p),p.sort(a)},Matrix:function(p){return o(p),t(p.toArray().sort(a),p.storage())},"Array, function":function(p,h){return f(p),p.sort(h)},"Matrix, function":function(p,h){return o(p),t(p.toArray().sort(h),p.storage())},"Array, string":function(p,h){return f(p),p.sort(l(h))},"Matrix, string":function(p,h){return o(p),t(p.toArray().sort(l(h)),p.storage())}});function l(u){if(u==="asc")return a;if(u==="desc")return s;if(u==="natural")return i;throw new Error('String "asc", "desc", or "natural" expected')}function f(u){if(or(u).length!==1)throw new Error("One dimensional array expected")}function o(u){if(u.size().length!==1)throw new Error("One dimensional matrix expected")}});var RS="max",Vq=["typed","config","numeric","larger"],mp=T(RS,Vq,e=>{var{typed:r,config:t,numeric:n,larger:i}=e;return r(RS,{"Array | Matrix":s,"Array | Matrix, number | BigNumber":function(f,o){return Do(f,o.valueOf(),a)},"...":function(f){if(di(f))throw new TypeError("Scalar values expected in function max");return s(f)}});function a(l,f){try{return i(l,f)?l:f}catch(o){throw St(o,"max",f)}}function s(l){var f;if(hn(l,function(o){try{isNaN(o)&&typeof o=="number"?f=NaN:(f===void 0||i(o,f))&&(f=o)}catch(u){throw St(u,"max",o)}}),f===void 0)throw new Error("Cannot calculate max of an empty array");return typeof f=="string"&&(f=n(f,t.number)),f}});var LS="min",Yq=["typed","config","numeric","smaller"],hp=T(LS,Yq,e=>{var{typed:r,config:t,numeric:n,smaller:i}=e;return r(LS,{"Array | Matrix":s,"Array | Matrix, number | BigNumber":function(f,o){return Do(f,o.valueOf(),a)},"...":function(f){if(di(f))throw new TypeError("Scalar values expected in function min");return s(f)}});function a(l,f){try{return i(l,f)?l:f}catch(o){throw St(o,"min",f)}}function s(l){var f;if(hn(l,function(o){try{isNaN(o)&&typeof o=="number"?f=NaN:(f===void 0||i(o,f))&&(f=o)}catch(u){throw St(u,"min",o)}}),f===void 0)throw new Error("Cannot calculate min of an empty array");return typeof f=="string"&&(f=n(f,t.number)),f}});var Hq="ImmutableDenseMatrix",Gq=["smaller","DenseMatrix"],qS=T(Hq,Gq,e=>{var{smaller:r,DenseMatrix:t}=e;function n(i,a){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(a&&!yt(a))throw new Error("Invalid datatype: "+a);if(Ge(i)||Ar(i)){var s=new t(i,a);this._data=s._data,this._size=s._size,this._datatype=s._datatype,this._min=null,this._max=null}else if(i&&Ar(i.data)&&Ar(i.size))this._data=i.data,this._size=i.size,this._datatype=i.datatype,this._min=typeof i.min<"u"?i.min:null,this._max=typeof i.max<"u"?i.max:null;else{if(i)throw new TypeError("Unsupported type of data ("+_r(i)+")");this._data=[],this._size=[0],this._datatype=a,this._min=null,this._max=null}}return n.prototype=new t,n.prototype.type="ImmutableDenseMatrix",n.prototype.isImmutableDenseMatrix=!0,n.prototype.subset=function(i){switch(arguments.length){case 1:{var a=t.prototype.subset.call(this,i);return Ge(a)?new n({data:a._data,size:a._size,datatype:a._datatype}):a}case 2:case 3:throw new Error("Cannot invoke set subset on an Immutable Matrix instance");default:throw new SyntaxError("Wrong number of arguments")}},n.prototype.set=function(){throw new Error("Cannot invoke set on an Immutable Matrix instance")},n.prototype.resize=function(){throw new Error("Cannot invoke resize on an Immutable Matrix instance")},n.prototype.reshape=function(){throw new Error("Cannot invoke reshape on an Immutable Matrix instance")},n.prototype.clone=function(){return new n({data:tr(this._data),size:tr(this._size),datatype:this._datatype})},n.prototype.toJSON=function(){return{mathjs:"ImmutableDenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},n.fromJSON=function(i){return new n(i)},n.prototype.swapRows=function(){throw new Error("Cannot invoke swapRows on an Immutable Matrix instance")},n.prototype.min=function(){if(this._min===null){var i=null;this.forEach(function(a){(i===null||r(a,i))&&(i=a)}),this._min=i!==null?i:void 0}return this._min},n.prototype.max=function(){if(this._max===null){var i=null;this.forEach(function(a){(i===null||r(i,a))&&(i=a)}),this._max=i!==null?i:void 0}return this._max},n},{isClass:!0});var $q="Index",Zq=["ImmutableDenseMatrix","getMatrixDataType"],zS=T($q,Zq,e=>{var{ImmutableDenseMatrix:r,getMatrixDataType:t}=e;function n(a){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");this._dimensions=[],this._sourceSize=[],this._isScalar=!0;for(var s=0,l=arguments.length;s{t&&r.push(n)}),r}var Qq="FibonacciHeap",Xq=["smaller","larger"],WS=T(Qq,Xq,e=>{var{smaller:r,larger:t}=e,n=1/Math.log((1+Math.sqrt(5))/2);function i(){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");this._minimum=null,this._size=0}i.prototype.type="FibonacciHeap",i.prototype.isFibonacciHeap=!0,i.prototype.insert=function(u,p){var h={key:u,value:p,degree:0};if(this._minimum){var d=this._minimum;h.left=d,h.right=d.right,d.right=h,h.right.left=h,r(u,d.key)&&(this._minimum=h)}else h.left=h,h.right=h,this._minimum=h;return this._size++,h},i.prototype.size=function(){return this._size},i.prototype.clear=function(){this._minimum=null,this._size=0},i.prototype.isEmpty=function(){return this._size===0},i.prototype.extractMinimum=function(){var u=this._minimum;if(u===null)return u;for(var p=this._minimum,h=u.degree,d=u.child;h>0;){var x=d.right;d.left.right=d.right,d.right.left=d.left,d.left=p,d.right=p.right,p.right=d,d.right.left=d,d.parent=null,d=x,h--}return u.left.right=u.right,u.right.left=u.left,u===u.right?p=null:(p=u.right,p=o(p,this._size)),this._size--,this._minimum=p,u},i.prototype.remove=function(u){this._minimum=a(this._minimum,u,-1),this.extractMinimum()};function a(u,p,h){p.key=h;var d=p.parent;return d&&r(p.key,d.key)&&(s(u,p,d),l(u,d)),r(p.key,u.key)&&(u=p),u}function s(u,p,h){p.left.right=p.right,p.right.left=p.left,h.degree--,h.child===p&&(h.child=p.right),h.degree===0&&(h.child=null),p.left=u,p.right=u.right,u.right=p,p.right.left=p,p.parent=null,p.mark=!1}function l(u,p){var h=p.parent;!h||(p.mark?(s(u,p,h),l(h)):p.mark=!0)}var f=function(p,h){p.left.right=p.right,p.right.left=p.left,p.parent=h,h.child?(p.left=h.child,p.right=h.child.right,h.child.right=p,p.right.left=p):(h.child=p,p.right=p,p.left=p),h.degree++,p.mark=!1};function o(u,p){var h=Math.floor(Math.log(p)*n)+1,d=new Array(h),x=0,v=u;if(v)for(x++,v=v.right;v!==u;)x++,v=v.right;for(var y;x>0;){for(var w=v.degree,C=v.right;y=d[w],!!y;){if(t(v.key,y.key)){var b=y;y=v,v=b}f(y,v),d[w]=null,w++}d[w]=v,v=C,x--}u=null;for(var A=0;A{var{addScalar:r,equalScalar:t,FibonacciHeap:n}=e;function i(){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");this._values=[],this._heap=new n}return i.prototype.type="Spa",i.prototype.isSpa=!0,i.prototype.set=function(a,s){if(this._values[a])this._values[a].value=s;else{var l=this._heap.insert(a,s);this._values[a]=l}},i.prototype.get=function(a){var s=this._values[a];return s?s.value:0},i.prototype.accumulate=function(a,s){var l=this._values[a];l?l.value=r(l.value,s):(l=this._heap.insert(a,s),this._values[a]=l)},i.prototype.forEach=function(a,s,l){var f=this._heap,o=this._values,u=[],p=f.extractMinimum();for(p&&u.push(p);p&&p.key<=s;)p.key>=a&&(t(p.value,0)||l(p.key,p.value,this)),p=f.extractMinimum(),p&&u.push(p);for(var h=0;h{var{on:r,config:t,addScalar:n,subtractScalar:i,multiplyScalar:a,divideScalar:s,pow:l,abs:f,fix:o,round:u,equal:p,isNumeric:h,format:d,number:x,Complex:v,BigNumber:y,Fraction:w}=e,C=x;function b(K,te){if(!(this instanceof b))throw new Error("Constructor must be called with the new operator");if(!(K==null||h(K)||Gt(K)))throw new TypeError("First parameter in Unit constructor must be number, BigNumber, Fraction, Complex, or undefined");if(this.fixPrefix=!1,this.skipAutomaticSimplification=!0,te===void 0)this.units=[],this.dimensions=j.map(ee=>0);else if(typeof te=="string"){var ye=b.parse(te);this.units=ye.units,this.dimensions=ye.dimensions}else if(qt(te)&&te.value===null)this.fixPrefix=te.fixPrefix,this.skipAutomaticSimplification=te.skipAutomaticSimplification,this.dimensions=te.dimensions.slice(0),this.units=te.units.map(ee=>Mt({},ee));else throw new TypeError("Second parameter in Unit constructor must be a string or valueless Unit");this.value=this._normalize(K)}Object.defineProperty(b,"name",{value:"Unit"}),b.prototype.constructor=b,b.prototype.type="Unit",b.prototype.isUnit=!0;var A,E,S;function O(){for(;S===" "||S===" ";)_()}function F(K){return K>="0"&&K<="9"||K==="."}function M(K){return K>="0"&&K<="9"}function _(){E++,S=A.charAt(E)}function k(K){E=K,S=A.charAt(E)}function L(){var K="",te=E;if(S==="+"?_():S==="-"&&(K+=S,_()),!F(S))return k(te),null;if(S==="."){if(K+=S,_(),!M(S))return k(te),null}else{for(;M(S);)K+=S,_();S==="."&&(K+=S,_())}for(;M(S);)K+=S,_();if(S==="E"||S==="e"){var ye="",ee=E;if(ye+=S,_(),(S==="+"||S==="-")&&(ye+=S,_()),!M(S))return k(ee),K;for(K=K+ye;M(S);)K+=S,_()}return K}function Y(){for(var K="";M(S)||b.isValidAlpha(S);)K+=S,_();var te=K.charAt(0);return b.isValidAlpha(te)?K:null}function $(K){return S===K?(_(),K):null}b.parse=function(K,te){if(te=te||{},A=K,E=-1,S="",typeof A!="string")throw new TypeError("Invalid argument in Unit.parse, string expected");var ye=new b;ye.units=[];var ee=1,ne=!1;_(),O();var ue=L(),Ee=null;if(ue){if(t.number==="BigNumber")Ee=new y(ue);else if(t.number==="Fraction")try{Ee=new w(ue)}catch{Ee=parseFloat(ue)}else Ee=parseFloat(ue);O(),$("*")?(ee=1,ne=!0):$("/")&&(ee=-1,ne=!0)}for(var Ce=[],Le=1;;){for(O();S==="(";)Ce.push(ee),Le*=ee,ee=1,_(),O();var Ie=void 0;if(S){var sr=S;if(Ie=Y(),Ie===null)throw new SyntaxError('Unexpected "'+sr+'" in "'+A+'" at index '+E.toString())}else break;var ir=V(Ie);if(ir===null)throw new SyntaxError('Unit "'+Ie+'" not found.');var Xe=ee*Le;if(O(),$("^")){O();var Or=L();if(Or===null)throw new SyntaxError('In "'+K+'", "^" must be followed by a floating-point number');Xe*=Or}ye.units.push({unit:ir.unit,prefix:ir.prefix,power:Xe});for(var re=0;re1||Math.abs(this.units[0].power-1)>1e-15},b.prototype._normalize=function(K){if(K==null||this.units.length===0)return K;for(var te=K,ye=b._getNumberConverter(_r(K)),ee=0;ee{if($e(H,K)){var te=H[K],ye=te.prefixes[""];return{unit:te,prefix:ye}}for(var ee in H)if($e(H,ee)&&wy(K,ee)){var ne=H[ee],ue=K.length-ee.length,Ee=K.substring(0,ue),Ce=$e(ne.prefixes,Ee)?ne.prefixes[Ee]:void 0;if(Ce!==void 0)return{unit:ne,prefix:Ce}}return null},{hasher:K=>K[0],limit:100});b.isValuelessUnit=function(K){return V(K)!==null},b.prototype.hasBase=function(K){if(typeof K=="string"&&(K=U[K]),!K)return!1;for(var te=0;te1e-12)return!1;return!0},b.prototype.equalBase=function(K){for(var te=0;te1e-12)return!1;return!0},b.prototype.equals=function(K){return this.equalBase(K)&&p(this.value,K.value)},b.prototype.multiply=function(K){for(var te=this.clone(),ye=qt(K)?K:new b(K),ee=0;ee1e-12&&($e(ge,Ce)?te.push({unit:ge[Ce].unit,prefix:ge[Ce].prefix,power:K.dimensions[Ee]||0}):ue=!0)}te.length1e-12)if($e(pe.si,ee))te.push({unit:pe.si[ee].unit,prefix:pe.si[ee].prefix,power:K.dimensions[ye]||0});else throw new Error("Cannot express custom unit "+ee+" in SI units")}return K.units=te,K.fixPrefix=!0,K.skipAutomaticSimplification=!0,this.value!==null?(K.value=null,this.to(K)):K},b.prototype.formatUnits=function(){for(var K="",te="",ye=0,ee=0,ne=0;ne0?(ye++,K+=" "+this.units[ne].prefix.name+this.units[ne].unit.name,Math.abs(this.units[ne].power-1)>1e-15&&(K+="^"+this.units[ne].power)):this.units[ne].power<0&&ee++;if(ee>0)for(var ue=0;ue0?(te+=" "+this.units[ue].prefix.name+this.units[ue].unit.name,Math.abs(this.units[ue].power+1)>1e-15&&(te+="^"+-this.units[ue].power)):(te+=" "+this.units[ue].prefix.name+this.units[ue].unit.name,te+="^"+this.units[ue].power));K=K.substr(1),te=te.substr(1),ye>1&&ee>0&&(K="("+K+")"),ee>1&&ye>0&&(te="("+te+")");var Ee=K;return ye>0&&ee>0&&(Ee+=" / "),Ee+=te,Ee},b.prototype.format=function(K){var te=this.skipAutomaticSimplification||this.value===null?this.clone():this.simplify(),ye=!1;typeof te.value<"u"&&te.value!==null&&Gt(te.value)&&(ye=Math.abs(te.value.re)<1e-14);for(var ee in te.units)$e(te.units,ee)&&te.units[ee].unit&&(te.units[ee].unit.name==="VA"&&ye?te.units[ee].unit=H.VAR:te.units[ee].unit.name==="VAR"&&!ye&&(te.units[ee].unit=H.VA));te.units.length===1&&!te.fixPrefix&&Math.abs(te.units[0].power-Math.round(te.units[0].power))<1e-14&&(te.units[0].prefix=te._bestPrefix());var ne=te._denormalize(te.value),ue=te.value!==null?d(ne,K||{}):"",Ee=te.formatUnits();return te.value&&Gt(te.value)&&(ue="("+ue+")"),Ee.length>0&&ue.length>0&&(ue+=" "),ue+=Ee,ue},b.prototype._bestPrefix=function(){if(this.units.length!==1)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");if(Math.abs(this.units[0].power-Math.round(this.units[0].power))>=1e-14)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");var K=this.value!==null?f(this.value):0,te=f(this.units[0].unit.value),ye=this.units[0].prefix;if(K===0)return ye;var ee=this.units[0].power,ne=Math.log(K/Math.pow(ye.value*te,ee))/Math.LN10-1.2;if(ne>-2.200001&&ne<1.800001)return ye;ne=Math.abs(ne);var ue=this.units[0].unit.prefixes;for(var Ee in ue)if($e(ue,Ee)){var Ce=ue[Ee];if(Ce.scientific){var Le=Math.abs(Math.log(K/Math.pow(Ce.value*te,ee))/Math.LN10-1.2);(Le0)},H={meter:{name:"meter",base:U.LENGTH,prefixes:R.LONG,value:1,offset:0},inch:{name:"inch",base:U.LENGTH,prefixes:R.NONE,value:.0254,offset:0},foot:{name:"foot",base:U.LENGTH,prefixes:R.NONE,value:.3048,offset:0},yard:{name:"yard",base:U.LENGTH,prefixes:R.NONE,value:.9144,offset:0},mile:{name:"mile",base:U.LENGTH,prefixes:R.NONE,value:1609.344,offset:0},link:{name:"link",base:U.LENGTH,prefixes:R.NONE,value:.201168,offset:0},rod:{name:"rod",base:U.LENGTH,prefixes:R.NONE,value:5.0292,offset:0},chain:{name:"chain",base:U.LENGTH,prefixes:R.NONE,value:20.1168,offset:0},angstrom:{name:"angstrom",base:U.LENGTH,prefixes:R.NONE,value:1e-10,offset:0},m:{name:"m",base:U.LENGTH,prefixes:R.SHORT,value:1,offset:0},in:{name:"in",base:U.LENGTH,prefixes:R.NONE,value:.0254,offset:0},ft:{name:"ft",base:U.LENGTH,prefixes:R.NONE,value:.3048,offset:0},yd:{name:"yd",base:U.LENGTH,prefixes:R.NONE,value:.9144,offset:0},mi:{name:"mi",base:U.LENGTH,prefixes:R.NONE,value:1609.344,offset:0},li:{name:"li",base:U.LENGTH,prefixes:R.NONE,value:.201168,offset:0},rd:{name:"rd",base:U.LENGTH,prefixes:R.NONE,value:5.02921,offset:0},ch:{name:"ch",base:U.LENGTH,prefixes:R.NONE,value:20.1168,offset:0},mil:{name:"mil",base:U.LENGTH,prefixes:R.NONE,value:254e-7,offset:0},m2:{name:"m2",base:U.SURFACE,prefixes:R.SQUARED,value:1,offset:0},sqin:{name:"sqin",base:U.SURFACE,prefixes:R.NONE,value:64516e-8,offset:0},sqft:{name:"sqft",base:U.SURFACE,prefixes:R.NONE,value:.09290304,offset:0},sqyd:{name:"sqyd",base:U.SURFACE,prefixes:R.NONE,value:.83612736,offset:0},sqmi:{name:"sqmi",base:U.SURFACE,prefixes:R.NONE,value:2589988110336e-6,offset:0},sqrd:{name:"sqrd",base:U.SURFACE,prefixes:R.NONE,value:25.29295,offset:0},sqch:{name:"sqch",base:U.SURFACE,prefixes:R.NONE,value:404.6873,offset:0},sqmil:{name:"sqmil",base:U.SURFACE,prefixes:R.NONE,value:64516e-14,offset:0},acre:{name:"acre",base:U.SURFACE,prefixes:R.NONE,value:4046.86,offset:0},hectare:{name:"hectare",base:U.SURFACE,prefixes:R.NONE,value:1e4,offset:0},m3:{name:"m3",base:U.VOLUME,prefixes:R.CUBIC,value:1,offset:0},L:{name:"L",base:U.VOLUME,prefixes:R.SHORT,value:.001,offset:0},l:{name:"l",base:U.VOLUME,prefixes:R.SHORT,value:.001,offset:0},litre:{name:"litre",base:U.VOLUME,prefixes:R.LONG,value:.001,offset:0},cuin:{name:"cuin",base:U.VOLUME,prefixes:R.NONE,value:16387064e-12,offset:0},cuft:{name:"cuft",base:U.VOLUME,prefixes:R.NONE,value:.028316846592,offset:0},cuyd:{name:"cuyd",base:U.VOLUME,prefixes:R.NONE,value:.764554857984,offset:0},teaspoon:{name:"teaspoon",base:U.VOLUME,prefixes:R.NONE,value:5e-6,offset:0},tablespoon:{name:"tablespoon",base:U.VOLUME,prefixes:R.NONE,value:15e-6,offset:0},drop:{name:"drop",base:U.VOLUME,prefixes:R.NONE,value:5e-8,offset:0},gtt:{name:"gtt",base:U.VOLUME,prefixes:R.NONE,value:5e-8,offset:0},minim:{name:"minim",base:U.VOLUME,prefixes:R.NONE,value:6161152e-14,offset:0},fluiddram:{name:"fluiddram",base:U.VOLUME,prefixes:R.NONE,value:36966911e-13,offset:0},fluidounce:{name:"fluidounce",base:U.VOLUME,prefixes:R.NONE,value:2957353e-11,offset:0},gill:{name:"gill",base:U.VOLUME,prefixes:R.NONE,value:.0001182941,offset:0},cc:{name:"cc",base:U.VOLUME,prefixes:R.NONE,value:1e-6,offset:0},cup:{name:"cup",base:U.VOLUME,prefixes:R.NONE,value:.0002365882,offset:0},pint:{name:"pint",base:U.VOLUME,prefixes:R.NONE,value:.0004731765,offset:0},quart:{name:"quart",base:U.VOLUME,prefixes:R.NONE,value:.0009463529,offset:0},gallon:{name:"gallon",base:U.VOLUME,prefixes:R.NONE,value:.003785412,offset:0},beerbarrel:{name:"beerbarrel",base:U.VOLUME,prefixes:R.NONE,value:.1173478,offset:0},oilbarrel:{name:"oilbarrel",base:U.VOLUME,prefixes:R.NONE,value:.1589873,offset:0},hogshead:{name:"hogshead",base:U.VOLUME,prefixes:R.NONE,value:.238481,offset:0},fldr:{name:"fldr",base:U.VOLUME,prefixes:R.NONE,value:36966911e-13,offset:0},floz:{name:"floz",base:U.VOLUME,prefixes:R.NONE,value:2957353e-11,offset:0},gi:{name:"gi",base:U.VOLUME,prefixes:R.NONE,value:.0001182941,offset:0},cp:{name:"cp",base:U.VOLUME,prefixes:R.NONE,value:.0002365882,offset:0},pt:{name:"pt",base:U.VOLUME,prefixes:R.NONE,value:.0004731765,offset:0},qt:{name:"qt",base:U.VOLUME,prefixes:R.NONE,value:.0009463529,offset:0},gal:{name:"gal",base:U.VOLUME,prefixes:R.NONE,value:.003785412,offset:0},bbl:{name:"bbl",base:U.VOLUME,prefixes:R.NONE,value:.1173478,offset:0},obl:{name:"obl",base:U.VOLUME,prefixes:R.NONE,value:.1589873,offset:0},g:{name:"g",base:U.MASS,prefixes:R.SHORT,value:.001,offset:0},gram:{name:"gram",base:U.MASS,prefixes:R.LONG,value:.001,offset:0},ton:{name:"ton",base:U.MASS,prefixes:R.SHORT,value:907.18474,offset:0},t:{name:"t",base:U.MASS,prefixes:R.SHORT,value:1e3,offset:0},tonne:{name:"tonne",base:U.MASS,prefixes:R.LONG,value:1e3,offset:0},grain:{name:"grain",base:U.MASS,prefixes:R.NONE,value:6479891e-11,offset:0},dram:{name:"dram",base:U.MASS,prefixes:R.NONE,value:.0017718451953125,offset:0},ounce:{name:"ounce",base:U.MASS,prefixes:R.NONE,value:.028349523125,offset:0},poundmass:{name:"poundmass",base:U.MASS,prefixes:R.NONE,value:.45359237,offset:0},hundredweight:{name:"hundredweight",base:U.MASS,prefixes:R.NONE,value:45.359237,offset:0},stick:{name:"stick",base:U.MASS,prefixes:R.NONE,value:.115,offset:0},stone:{name:"stone",base:U.MASS,prefixes:R.NONE,value:6.35029318,offset:0},gr:{name:"gr",base:U.MASS,prefixes:R.NONE,value:6479891e-11,offset:0},dr:{name:"dr",base:U.MASS,prefixes:R.NONE,value:.0017718451953125,offset:0},oz:{name:"oz",base:U.MASS,prefixes:R.NONE,value:.028349523125,offset:0},lbm:{name:"lbm",base:U.MASS,prefixes:R.NONE,value:.45359237,offset:0},cwt:{name:"cwt",base:U.MASS,prefixes:R.NONE,value:45.359237,offset:0},s:{name:"s",base:U.TIME,prefixes:R.SHORT,value:1,offset:0},min:{name:"min",base:U.TIME,prefixes:R.NONE,value:60,offset:0},h:{name:"h",base:U.TIME,prefixes:R.NONE,value:3600,offset:0},second:{name:"second",base:U.TIME,prefixes:R.LONG,value:1,offset:0},sec:{name:"sec",base:U.TIME,prefixes:R.LONG,value:1,offset:0},minute:{name:"minute",base:U.TIME,prefixes:R.NONE,value:60,offset:0},hour:{name:"hour",base:U.TIME,prefixes:R.NONE,value:3600,offset:0},day:{name:"day",base:U.TIME,prefixes:R.NONE,value:86400,offset:0},week:{name:"week",base:U.TIME,prefixes:R.NONE,value:7*86400,offset:0},month:{name:"month",base:U.TIME,prefixes:R.NONE,value:2629800,offset:0},year:{name:"year",base:U.TIME,prefixes:R.NONE,value:31557600,offset:0},decade:{name:"decade",base:U.TIME,prefixes:R.NONE,value:315576e3,offset:0},century:{name:"century",base:U.TIME,prefixes:R.NONE,value:315576e4,offset:0},millennium:{name:"millennium",base:U.TIME,prefixes:R.NONE,value:315576e5,offset:0},hertz:{name:"Hertz",base:U.FREQUENCY,prefixes:R.LONG,value:1,offset:0,reciprocal:!0},Hz:{name:"Hz",base:U.FREQUENCY,prefixes:R.SHORT,value:1,offset:0,reciprocal:!0},rad:{name:"rad",base:U.ANGLE,prefixes:R.SHORT,value:1,offset:0},radian:{name:"radian",base:U.ANGLE,prefixes:R.LONG,value:1,offset:0},deg:{name:"deg",base:U.ANGLE,prefixes:R.SHORT,value:null,offset:0},degree:{name:"degree",base:U.ANGLE,prefixes:R.LONG,value:null,offset:0},grad:{name:"grad",base:U.ANGLE,prefixes:R.SHORT,value:null,offset:0},gradian:{name:"gradian",base:U.ANGLE,prefixes:R.LONG,value:null,offset:0},cycle:{name:"cycle",base:U.ANGLE,prefixes:R.NONE,value:null,offset:0},arcsec:{name:"arcsec",base:U.ANGLE,prefixes:R.NONE,value:null,offset:0},arcmin:{name:"arcmin",base:U.ANGLE,prefixes:R.NONE,value:null,offset:0},A:{name:"A",base:U.CURRENT,prefixes:R.SHORT,value:1,offset:0},ampere:{name:"ampere",base:U.CURRENT,prefixes:R.LONG,value:1,offset:0},K:{name:"K",base:U.TEMPERATURE,prefixes:R.SHORT,value:1,offset:0},degC:{name:"degC",base:U.TEMPERATURE,prefixes:R.SHORT,value:1,offset:273.15},degF:{name:"degF",base:U.TEMPERATURE,prefixes:R.SHORT,value:new w(5,9),offset:459.67},degR:{name:"degR",base:U.TEMPERATURE,prefixes:R.SHORT,value:new w(5,9),offset:0},kelvin:{name:"kelvin",base:U.TEMPERATURE,prefixes:R.LONG,value:1,offset:0},celsius:{name:"celsius",base:U.TEMPERATURE,prefixes:R.LONG,value:1,offset:273.15},fahrenheit:{name:"fahrenheit",base:U.TEMPERATURE,prefixes:R.LONG,value:new w(5,9),offset:459.67},rankine:{name:"rankine",base:U.TEMPERATURE,prefixes:R.LONG,value:new w(5,9),offset:0},mol:{name:"mol",base:U.AMOUNT_OF_SUBSTANCE,prefixes:R.SHORT,value:1,offset:0},mole:{name:"mole",base:U.AMOUNT_OF_SUBSTANCE,prefixes:R.LONG,value:1,offset:0},cd:{name:"cd",base:U.LUMINOUS_INTENSITY,prefixes:R.SHORT,value:1,offset:0},candela:{name:"candela",base:U.LUMINOUS_INTENSITY,prefixes:R.LONG,value:1,offset:0},N:{name:"N",base:U.FORCE,prefixes:R.SHORT,value:1,offset:0},newton:{name:"newton",base:U.FORCE,prefixes:R.LONG,value:1,offset:0},dyn:{name:"dyn",base:U.FORCE,prefixes:R.SHORT,value:1e-5,offset:0},dyne:{name:"dyne",base:U.FORCE,prefixes:R.LONG,value:1e-5,offset:0},lbf:{name:"lbf",base:U.FORCE,prefixes:R.NONE,value:4.4482216152605,offset:0},poundforce:{name:"poundforce",base:U.FORCE,prefixes:R.NONE,value:4.4482216152605,offset:0},kip:{name:"kip",base:U.FORCE,prefixes:R.LONG,value:4448.2216,offset:0},kilogramforce:{name:"kilogramforce",base:U.FORCE,prefixes:R.NONE,value:9.80665,offset:0},J:{name:"J",base:U.ENERGY,prefixes:R.SHORT,value:1,offset:0},joule:{name:"joule",base:U.ENERGY,prefixes:R.LONG,value:1,offset:0},erg:{name:"erg",base:U.ENERGY,prefixes:R.SHORTLONG,value:1e-7,offset:0},Wh:{name:"Wh",base:U.ENERGY,prefixes:R.SHORT,value:3600,offset:0},BTU:{name:"BTU",base:U.ENERGY,prefixes:R.BTU,value:1055.05585262,offset:0},eV:{name:"eV",base:U.ENERGY,prefixes:R.SHORT,value:1602176565e-28,offset:0},electronvolt:{name:"electronvolt",base:U.ENERGY,prefixes:R.LONG,value:1602176565e-28,offset:0},W:{name:"W",base:U.POWER,prefixes:R.SHORT,value:1,offset:0},watt:{name:"watt",base:U.POWER,prefixes:R.LONG,value:1,offset:0},hp:{name:"hp",base:U.POWER,prefixes:R.NONE,value:745.6998715386,offset:0},VAR:{name:"VAR",base:U.POWER,prefixes:R.SHORT,value:v.I,offset:0},VA:{name:"VA",base:U.POWER,prefixes:R.SHORT,value:1,offset:0},Pa:{name:"Pa",base:U.PRESSURE,prefixes:R.SHORT,value:1,offset:0},psi:{name:"psi",base:U.PRESSURE,prefixes:R.NONE,value:6894.75729276459,offset:0},atm:{name:"atm",base:U.PRESSURE,prefixes:R.NONE,value:101325,offset:0},bar:{name:"bar",base:U.PRESSURE,prefixes:R.SHORTLONG,value:1e5,offset:0},torr:{name:"torr",base:U.PRESSURE,prefixes:R.NONE,value:133.322,offset:0},mmHg:{name:"mmHg",base:U.PRESSURE,prefixes:R.NONE,value:133.322,offset:0},mmH2O:{name:"mmH2O",base:U.PRESSURE,prefixes:R.NONE,value:9.80665,offset:0},cmH2O:{name:"cmH2O",base:U.PRESSURE,prefixes:R.NONE,value:98.0665,offset:0},coulomb:{name:"coulomb",base:U.ELECTRIC_CHARGE,prefixes:R.LONG,value:1,offset:0},C:{name:"C",base:U.ELECTRIC_CHARGE,prefixes:R.SHORT,value:1,offset:0},farad:{name:"farad",base:U.ELECTRIC_CAPACITANCE,prefixes:R.LONG,value:1,offset:0},F:{name:"F",base:U.ELECTRIC_CAPACITANCE,prefixes:R.SHORT,value:1,offset:0},volt:{name:"volt",base:U.ELECTRIC_POTENTIAL,prefixes:R.LONG,value:1,offset:0},V:{name:"V",base:U.ELECTRIC_POTENTIAL,prefixes:R.SHORT,value:1,offset:0},ohm:{name:"ohm",base:U.ELECTRIC_RESISTANCE,prefixes:R.SHORTLONG,value:1,offset:0},henry:{name:"henry",base:U.ELECTRIC_INDUCTANCE,prefixes:R.LONG,value:1,offset:0},H:{name:"H",base:U.ELECTRIC_INDUCTANCE,prefixes:R.SHORT,value:1,offset:0},siemens:{name:"siemens",base:U.ELECTRIC_CONDUCTANCE,prefixes:R.LONG,value:1,offset:0},S:{name:"S",base:U.ELECTRIC_CONDUCTANCE,prefixes:R.SHORT,value:1,offset:0},weber:{name:"weber",base:U.MAGNETIC_FLUX,prefixes:R.LONG,value:1,offset:0},Wb:{name:"Wb",base:U.MAGNETIC_FLUX,prefixes:R.SHORT,value:1,offset:0},tesla:{name:"tesla",base:U.MAGNETIC_FLUX_DENSITY,prefixes:R.LONG,value:1,offset:0},T:{name:"T",base:U.MAGNETIC_FLUX_DENSITY,prefixes:R.SHORT,value:1,offset:0},b:{name:"b",base:U.BIT,prefixes:R.BINARY_SHORT,value:1,offset:0},bits:{name:"bits",base:U.BIT,prefixes:R.BINARY_LONG,value:1,offset:0},B:{name:"B",base:U.BIT,prefixes:R.BINARY_SHORT,value:8,offset:0},bytes:{name:"bytes",base:U.BIT,prefixes:R.BINARY_LONG,value:8,offset:0}},ce={meters:"meter",inches:"inch",feet:"foot",yards:"yard",miles:"mile",links:"link",rods:"rod",chains:"chain",angstroms:"angstrom",lt:"l",litres:"litre",liter:"litre",liters:"litre",teaspoons:"teaspoon",tablespoons:"tablespoon",minims:"minim",fluiddrams:"fluiddram",fluidounces:"fluidounce",gills:"gill",cups:"cup",pints:"pint",quarts:"quart",gallons:"gallon",beerbarrels:"beerbarrel",oilbarrels:"oilbarrel",hogsheads:"hogshead",gtts:"gtt",grams:"gram",tons:"ton",tonnes:"tonne",grains:"grain",drams:"dram",ounces:"ounce",poundmasses:"poundmass",hundredweights:"hundredweight",sticks:"stick",lb:"lbm",lbs:"lbm",kips:"kip",kgf:"kilogramforce",acres:"acre",hectares:"hectare",sqfeet:"sqft",sqyard:"sqyd",sqmile:"sqmi",sqmiles:"sqmi",mmhg:"mmHg",mmh2o:"mmH2O",cmh2o:"cmH2O",seconds:"second",secs:"second",minutes:"minute",mins:"minute",hours:"hour",hr:"hour",hrs:"hour",days:"day",weeks:"week",months:"month",years:"year",decades:"decade",centuries:"century",millennia:"millennium",hertz:"hertz",radians:"radian",degrees:"degree",gradians:"gradian",cycles:"cycle",arcsecond:"arcsec",arcseconds:"arcsec",arcminute:"arcmin",arcminutes:"arcmin",BTUs:"BTU",watts:"watt",joules:"joule",amperes:"ampere",amps:"ampere",amp:"ampere",coulombs:"coulomb",volts:"volt",ohms:"ohm",farads:"farad",webers:"weber",teslas:"tesla",electronvolts:"electronvolt",moles:"mole",bit:"bits",byte:"bytes"};function Me(K){if(K.number==="BigNumber"){var te=Cf(y);H.rad.value=new y(1),H.deg.value=te.div(180),H.grad.value=te.div(200),H.cycle.value=te.times(2),H.arcsec.value=te.div(648e3),H.arcmin.value=te.div(10800)}else H.rad.value=1,H.deg.value=Math.PI/180,H.grad.value=Math.PI/200,H.cycle.value=Math.PI*2,H.arcsec.value=Math.PI/648e3,H.arcmin.value=Math.PI/10800;H.radian.value=H.rad.value,H.degree.value=H.deg.value,H.gradian.value=H.grad.value}Me(t),r&&r("config",function(K,te){K.number!==te.number&&Me(K)});var pe={si:{NONE:{unit:ie,prefix:R.NONE[""]},LENGTH:{unit:H.m,prefix:R.SHORT[""]},MASS:{unit:H.g,prefix:R.SHORT.k},TIME:{unit:H.s,prefix:R.SHORT[""]},CURRENT:{unit:H.A,prefix:R.SHORT[""]},TEMPERATURE:{unit:H.K,prefix:R.SHORT[""]},LUMINOUS_INTENSITY:{unit:H.cd,prefix:R.SHORT[""]},AMOUNT_OF_SUBSTANCE:{unit:H.mol,prefix:R.SHORT[""]},ANGLE:{unit:H.rad,prefix:R.SHORT[""]},BIT:{unit:H.bits,prefix:R.SHORT[""]},FORCE:{unit:H.N,prefix:R.SHORT[""]},ENERGY:{unit:H.J,prefix:R.SHORT[""]},POWER:{unit:H.W,prefix:R.SHORT[""]},PRESSURE:{unit:H.Pa,prefix:R.SHORT[""]},ELECTRIC_CHARGE:{unit:H.C,prefix:R.SHORT[""]},ELECTRIC_CAPACITANCE:{unit:H.F,prefix:R.SHORT[""]},ELECTRIC_POTENTIAL:{unit:H.V,prefix:R.SHORT[""]},ELECTRIC_RESISTANCE:{unit:H.ohm,prefix:R.SHORT[""]},ELECTRIC_INDUCTANCE:{unit:H.H,prefix:R.SHORT[""]},ELECTRIC_CONDUCTANCE:{unit:H.S,prefix:R.SHORT[""]},MAGNETIC_FLUX:{unit:H.Wb,prefix:R.SHORT[""]},MAGNETIC_FLUX_DENSITY:{unit:H.T,prefix:R.SHORT[""]},FREQUENCY:{unit:H.Hz,prefix:R.SHORT[""]}}};pe.cgs=JSON.parse(JSON.stringify(pe.si)),pe.cgs.LENGTH={unit:H.m,prefix:R.SHORT.c},pe.cgs.MASS={unit:H.g,prefix:R.SHORT[""]},pe.cgs.FORCE={unit:H.dyn,prefix:R.SHORT[""]},pe.cgs.ENERGY={unit:H.erg,prefix:R.NONE[""]},pe.us=JSON.parse(JSON.stringify(pe.si)),pe.us.LENGTH={unit:H.ft,prefix:R.NONE[""]},pe.us.MASS={unit:H.lbm,prefix:R.NONE[""]},pe.us.TEMPERATURE={unit:H.degF,prefix:R.NONE[""]},pe.us.FORCE={unit:H.lbf,prefix:R.NONE[""]},pe.us.ENERGY={unit:H.BTU,prefix:R.BTU[""]},pe.us.POWER={unit:H.hp,prefix:R.NONE[""]},pe.us.PRESSURE={unit:H.psi,prefix:R.NONE[""]},pe.auto=JSON.parse(JSON.stringify(pe.si));var ge=pe.auto;b.setUnitSystem=function(K){if($e(pe,K))ge=pe[K];else throw new Error("Unit system "+K+" does not exist. Choices are: "+Object.keys(pe).join(", "))},b.getUnitSystem=function(){for(var K in pe)if($e(pe,K)&&pe[K]===ge)return K},b.typeConverters={BigNumber:function(te){return te!=null&&te.isFraction?new y(te.n).div(te.d).times(te.s):new y(te+"")},Fraction:function(te){return new w(te)},Complex:function(te){return te},number:function(te){return te!=null&&te.isFraction?x(te):te}},b.prototype._numberConverter=function(){var K=b.typeConverters[this.valueType()];if(K)return K;throw new TypeError('Unsupported Unit value type "'+this.valueType()+'"')},b._getNumberConverter=function(K){if(!b.typeConverters[K])throw new TypeError('Unsupported type "'+K+'"');return b.typeConverters[K]};for(var Se in H)if($e(H,Se)){var xe=H[Se];xe.dimensions=xe.base.dimensions}for(var be in ce)if($e(ce,be)){var De=H[ce[be]],Ae={};for(var ze in De)$e(De,ze)&&(Ae[ze]=De[ze]);Ae.name=be,H[be]=Ae}b.isValidAlpha=function(te){return/^[a-zA-Z]$/.test(te)};function Ze(K){for(var te=0;te0&&!(b.isValidAlpha(S)||M(S)))throw new Error('Invalid unit name (only alphanumeric characters are allowed): "'+K+'"')}}return b.createUnit=function(K,te){if(typeof K!="object")throw new TypeError("createUnit expects first parameter to be of type 'Object'");if(te&&te.override){for(var ye in K)if($e(K,ye)&&b.deleteUnit(ye),K[ye].aliases)for(var ee=0;ee"u"||te===null)&&(te={}),typeof K!="string")throw new TypeError("createUnitSingle expects first parameter to be of type 'string'");if($e(H,K))throw new Error('Cannot create unit "'+K+'": a unit with that name already exists');Ze(K);var ye=null,ee=[],ne=0,ue,Ee,Ce;if(te&&te.type==="Unit")ye=te.clone();else if(typeof te=="string")te!==""&&(ue=te);else if(typeof te=="object")ue=te.definition,Ee=te.prefixes,ne=te.offset,Ce=te.baseName,te.aliases&&(ee=te.aliases.valueOf());else throw new TypeError('Cannot create unit "'+K+'" from "'+te.toString()+'": expecting "string" or "Unit" or "Object"');if(ee){for(var Le=0;Le1e-12){le=!1;break}if(le){Or=!0,Ie.base=U[re];break}}if(!Or){Ce=Ce||K+"_STUFF";var Oe={dimensions:ye.dimensions.slice(0)};Oe.key=Ce,U[Ce]=Oe,ge[Ce]={unit:Ie,prefix:R.NONE[""]},Ie.base=U[Ce]}}else{if(Ce=Ce||K+"_STUFF",j.indexOf(Ce)>=0)throw new Error('Cannot create new base unit "'+K+'": a base unit with that name already exists (and cannot be overridden)');j.push(Ce);for(var sr in U)$e(U,sr)&&(U[sr].dimensions[j.length-1]=0);for(var ir={dimensions:[]},Xe=0;Xe{var{typed:r,Unit:t}=e;return r(QS,{Unit:function(i){return i.clone()},string:function(i){return t.isValuelessUnit(i)?new t(null,i):t.parse(i,{allowNoUnits:!0})},"number | BigNumber | Fraction | Complex, string | Unit":function(i,a){return new t(i,a)},"number | BigNumber | Fraction":function(i){return new t(i)},"Array | Matrix":r.referToSelf(n=>i=>Je(i,n))})});var JS="sparse",tU=["typed","SparseMatrix"],KS=T(JS,tU,e=>{var{typed:r,SparseMatrix:t}=e;return r(JS,{"":function(){return new t([])},string:function(i){return new t([],i)},"Array | Matrix":function(i){return new t(i)},"Array | Matrix, string":function(i,a){return new t(i,a)}})});var jS="createUnit",nU=["typed","Unit"],eN=T(jS,nU,e=>{var{typed:r,Unit:t}=e;return r(jS,{"Object, Object":function(i,a){return t.createUnit(i,a)},Object:function(i){return t.createUnit(i,{})},"string, Unit | string | Object, Object":function(i,a,s){var l={};return l[i]=a,t.createUnit(l,s)},"string, Unit | string | Object":function(i,a){var s={};return s[i]=a,t.createUnit(s,{})},string:function(i){var a={};return a[i]={},t.createUnit(a,{})}})});var rN="acos",iU=["typed","config","Complex"],tN=T(rN,iU,e=>{var{typed:r,config:t,Complex:n}=e;return r(rN,{number:function(a){return a>=-1&&a<=1||t.predictable?Math.acos(a):new n(a,0).acos()},Complex:function(a){return a.acos()},BigNumber:function(a){return a.acos()}})});var nN="acosh",aU=["typed","config","Complex"],iN=T(nN,aU,e=>{var{typed:r,config:t,Complex:n}=e;return r(nN,{number:function(a){return a>=1||t.predictable?zv(a):a<=-1?new n(Math.log(Math.sqrt(a*a-1)-a),Math.PI):new n(a,0).acosh()},Complex:function(a){return a.acosh()},BigNumber:function(a){return a.acosh()}})});var aN="acot",oU=["typed","BigNumber"],oN=T(aN,oU,e=>{var{typed:r,BigNumber:t}=e;return r(aN,{number:Wv,Complex:function(i){return i.acot()},BigNumber:function(i){return new t(1).div(i).atan()}})});var sN="acoth",sU=["typed","config","Complex","BigNumber"],uN=T(sN,sU,e=>{var{typed:r,config:t,Complex:n,BigNumber:i}=e;return r(sN,{number:function(s){return s>=1||s<=-1||t.predictable?Vv(s):new n(s,0).acoth()},Complex:function(s){return s.acoth()},BigNumber:function(s){return new i(1).div(s).atanh()}})});var fN="acsc",uU=["typed","config","Complex","BigNumber"],lN=T(fN,uU,e=>{var{typed:r,config:t,Complex:n,BigNumber:i}=e;return r(fN,{number:function(s){return s<=-1||s>=1||t.predictable?Yv(s):new n(s,0).acsc()},Complex:function(s){return s.acsc()},BigNumber:function(s){return new i(1).div(s).asin()}})});var cN="acsch",fU=["typed","BigNumber"],pN=T(cN,fU,e=>{var{typed:r,BigNumber:t}=e;return r(cN,{number:Hv,Complex:function(i){return i.acsch()},BigNumber:function(i){return new t(1).div(i).asinh()}})});var mN="asec",lU=["typed","config","Complex","BigNumber"],hN=T(mN,lU,e=>{var{typed:r,config:t,Complex:n,BigNumber:i}=e;return r(mN,{number:function(s){return s<=-1||s>=1||t.predictable?Gv(s):new n(s,0).asec()},Complex:function(s){return s.asec()},BigNumber:function(s){return new i(1).div(s).acos()}})});var dN="asech",cU=["typed","config","Complex","BigNumber"],vN=T(dN,cU,e=>{var{typed:r,config:t,Complex:n,BigNumber:i}=e;return r(dN,{number:function(s){if(s<=1&&s>=-1||t.predictable){var l=1/s;if(l>0||t.predictable)return $v(s);var f=Math.sqrt(l*l-1);return new n(Math.log(f-l),Math.PI)}return new n(s,0).asech()},Complex:function(s){return s.asech()},BigNumber:function(s){return new i(1).div(s).acosh()}})});var gN="asin",pU=["typed","config","Complex"],xN=T(gN,pU,e=>{var{typed:r,config:t,Complex:n}=e;return r(gN,{number:function(a){return a>=-1&&a<=1||t.predictable?Math.asin(a):new n(a,0).asin()},Complex:function(a){return a.asin()},BigNumber:function(a){return a.asin()}})});var mU="asinh",hU=["typed"],yN=T(mU,hU,e=>{var{typed:r}=e;return r("asinh",{number:Zv,Complex:function(n){return n.asinh()},BigNumber:function(n){return n.asinh()}})});var dU="atan",vU=["typed"],bN=T(dU,vU,e=>{var{typed:r}=e;return r("atan",{number:function(n){return Math.atan(n)},Complex:function(n){return n.atan()},BigNumber:function(n){return n.atan()}})});var wN="atan2",gU=["typed","matrix","equalScalar","BigNumber","DenseMatrix","concat"],DN=T(wN,gU,e=>{var{typed:r,matrix:t,equalScalar:n,BigNumber:i,DenseMatrix:a,concat:s}=e,l=It({typed:r,equalScalar:n}),f=ft({typed:r}),o=Yc({typed:r,equalScalar:n}),u=Jr({typed:r,equalScalar:n}),p=Lr({typed:r,DenseMatrix:a}),h=vr({typed:r,matrix:t,concat:s});return r(wN,{"number, number":Math.atan2,"BigNumber, BigNumber":(d,x)=>i.atan2(d,x)},h({scalar:"number | BigNumber",SS:o,DS:f,SD:l,Ss:u,sS:p}))});var SN="atanh",xU=["typed","config","Complex"],NN=T(SN,xU,e=>{var{typed:r,config:t,Complex:n}=e;return r(SN,{number:function(a){return a<=1&&a>=-1||t.predictable?Qv(a):new n(a,0).atanh()},Complex:function(a){return a.atanh()},BigNumber:function(a){return a.atanh()}})});var xi=T("trigUnit",["typed"],e=>{var{typed:r}=e;return{Unit:r.referToSelf(t=>n=>{if(!n.hasBase(n.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cot is no angle");return r.find(t,n.valueType())(n.value)})}});var AN="cos",yU=["typed"],EN=T(AN,yU,e=>{var{typed:r}=e,t=xi({typed:r});return r(AN,{number:Math.cos,"Complex | BigNumber":n=>n.cos()},t)});var CN="cosh",bU=["typed"],MN=T(CN,bU,e=>{var{typed:r}=e;return r(CN,{number:Dc,"Complex | BigNumber":t=>t.cosh()})});var _N="cot",wU=["typed","BigNumber"],TN=T(_N,wU,e=>{var{typed:r,BigNumber:t}=e,n=xi({typed:r});return r(_N,{number:Xv,Complex:i=>i.cot(),BigNumber:i=>new t(1).div(i.tan())},n)});var FN="coth",DU=["typed","BigNumber"],ON=T(FN,DU,e=>{var{typed:r,BigNumber:t}=e;return r(FN,{number:Jv,Complex:n=>n.coth(),BigNumber:n=>new t(1).div(n.tanh())})});var BN="csc",SU=["typed","BigNumber"],IN=T(BN,SU,e=>{var{typed:r,BigNumber:t}=e,n=xi({typed:r});return r(BN,{number:Kv,Complex:i=>i.csc(),BigNumber:i=>new t(1).div(i.sin())},n)});var PN="csch",NU=["typed","BigNumber"],kN=T(PN,NU,e=>{var{typed:r,BigNumber:t}=e;return r(PN,{number:jv,Complex:n=>n.csch(),BigNumber:n=>new t(1).div(n.sinh())})});var RN="sec",AU=["typed","BigNumber"],LN=T(RN,AU,e=>{var{typed:r,BigNumber:t}=e,n=xi({typed:r});return r(RN,{number:eg,Complex:i=>i.sec(),BigNumber:i=>new t(1).div(i.cos())},n)});var qN="sech",EU=["typed","BigNumber"],UN=T(qN,EU,e=>{var{typed:r,BigNumber:t}=e;return r(qN,{number:rg,Complex:n=>n.sech(),BigNumber:n=>new t(1).div(n.cosh())})});var zN="sin",CU=["typed"],WN=T(zN,CU,e=>{var{typed:r}=e,t=xi({typed:r});return r(zN,{number:Math.sin,"Complex | BigNumber":n=>n.sin()},t)});var VN="sinh",MU=["typed"],YN=T(VN,MU,e=>{var{typed:r}=e;return r(VN,{number:tg,"Complex | BigNumber":t=>t.sinh()})});var HN="tan",_U=["typed"],GN=T(HN,_U,e=>{var{typed:r}=e,t=xi({typed:r});return r(HN,{number:Math.tan,"Complex | BigNumber":n=>n.tan()},t)});var TU="tanh",FU=["typed"],$N=T(TU,FU,e=>{var{typed:r}=e;return r("tanh",{number:Sc,"Complex | BigNumber":t=>t.tanh()})});var ZN="setCartesian",OU=["typed","size","subset","compareNatural","Index","DenseMatrix"],QN=T(ZN,OU,e=>{var{typed:r,size:t,subset:n,compareNatural:i,Index:a,DenseMatrix:s}=e;return r(ZN,{"Array | Matrix, Array | Matrix":function(f,o){var u=[];if(n(t(f),new a(0))!==0&&n(t(o),new a(0))!==0){var p=gr(Array.isArray(f)?f:f.toArray()).sort(i),h=gr(Array.isArray(o)?o:o.toArray()).sort(i);u=[];for(var d=0;d{var{typed:r,size:t,subset:n,compareNatural:i,Index:a,DenseMatrix:s}=e;return r(XN,{"Array | Matrix, Array | Matrix":function(f,o){var u;if(n(t(f),new a(0))===0)u=[];else{if(n(t(o),new a(0))===0)return gr(f.toArray());var p=Pa(gr(Array.isArray(f)?f:f.toArray()).sort(i)),h=Pa(gr(Array.isArray(o)?o:o.toArray()).sort(i));u=[];for(var d,x=0;x{var{typed:r,size:t,subset:n,compareNatural:i,Index:a,DenseMatrix:s}=e;return r(KN,{"Array | Matrix":function(f){var o;if(n(t(f),new a(0))===0)o=[];else{var u=gr(Array.isArray(f)?f:f.toArray()).sort(i);o=[],o.push(u[0]);for(var p=1;p{var{typed:r,size:t,subset:n,compareNatural:i,Index:a,DenseMatrix:s}=e;return r(e2,{"Array | Matrix, Array | Matrix":function(f,o){var u;if(n(t(f),new a(0))===0||n(t(o),new a(0))===0)u=[];else{var p=Pa(gr(Array.isArray(f)?f:f.toArray()).sort(i)),h=Pa(gr(Array.isArray(o)?o:o.toArray()).sort(i));u=[];for(var d=0;d{var{typed:r,size:t,subset:n,compareNatural:i,Index:a}=e;return r(t2,{"Array | Matrix, Array | Matrix":function(l,f){if(n(t(l),new a(0))===0)return!0;if(n(t(f),new a(0))===0)return!1;for(var o=Pa(gr(Array.isArray(l)?l:l.toArray()).sort(i)),u=Pa(gr(Array.isArray(f)?f:f.toArray()).sort(i)),p,h=0;h{var{typed:r,size:t,subset:n,compareNatural:i,Index:a}=e;return r(i2,{"number | BigNumber | Fraction | Complex, Array | Matrix":function(l,f){if(n(t(f),new a(0))===0)return 0;for(var o=gr(Array.isArray(f)?f:f.toArray()),u=0,p=0;p{var{typed:r,size:t,subset:n,compareNatural:i,Index:a}=e;return r(o2,{"Array | Matrix":function(o){if(n(t(o),new a(0))===0)return[];for(var u=gr(Array.isArray(o)?o:o.toArray()).sort(i),p=[],h=0;h.toString(2).length<=u.length;)p.push(s(u,h.toString(2).split("").reverse())),h++;return l(p)}});function s(f,o){for(var u=[],p=0;p0;u--)for(var p=0;pf[p+1].length&&(o=f[p],f[p]=f[p+1],f[p+1]=o);return f}});var u2="setSize",qU=["typed","compareNatural"],f2=T(u2,qU,e=>{var{typed:r,compareNatural:t}=e;return r(u2,{"Array | Matrix":function(i){return Array.isArray(i)?gr(i).length:gr(i.toArray()).length},"Array | Matrix, boolean":function(i,a){if(a===!1||i.length===0)return Array.isArray(i)?gr(i).length:gr(i.toArray()).length;for(var s=gr(Array.isArray(i)?i:i.toArray()).sort(t),l=1,f=1;f{var{typed:r,size:t,concat:n,subset:i,setDifference:a,Index:s}=e;return r(l2,{"Array | Matrix, Array | Matrix":function(f,o){if(i(t(f),new s(0))===0)return gr(o);if(i(t(o),new s(0))===0)return gr(f);var u=gr(f),p=gr(o);return n(a(u,p),a(p,u))}})});var p2="setUnion",zU=["typed","size","concat","subset","setIntersect","setSymDifference","Index"],m2=T(p2,zU,e=>{var{typed:r,size:t,concat:n,subset:i,setIntersect:a,setSymDifference:s,Index:l}=e;return r(p2,{"Array | Matrix, Array | Matrix":function(o,u){if(i(t(o),new l(0))===0)return gr(u);if(i(t(u),new l(0))===0)return gr(o);var p=gr(o),h=gr(u);return n(s(p,h),a(p,h))}})});var h2="add",WU=["typed","matrix","addScalar","equalScalar","DenseMatrix","SparseMatrix","concat"],d2=T(h2,WU,e=>{var{typed:r,matrix:t,addScalar:n,equalScalar:i,DenseMatrix:a,SparseMatrix:s,concat:l}=e,f=dn({typed:r}),o=su({typed:r,equalScalar:i}),u=Un({typed:r,DenseMatrix:a}),p=vr({typed:r,matrix:t,concat:l});return r(h2,{"any, any":n,"any, any, ...any":r.referToSelf(h=>(d,x,v)=>{for(var y=h(d,x),w=0;w{var{typed:r,abs:t,addScalar:n,divideScalar:i,multiplyScalar:a,sqrt:s,smaller:l,isPositive:f}=e;return r(v2,{"... number | BigNumber":o,Array:o,Matrix:u=>o(gr(u.toArray()))});function o(u){for(var p=0,h=0,d=0;d{var{typed:r,abs:t,add:n,pow:i,conj:a,sqrt:s,multiply:l,equalScalar:f,larger:o,smaller:u,matrix:p,ctranspose:h,eigs:d}=e;return r(x2,{number:Math.abs,Complex:function(F){return F.abs()},BigNumber:function(F){return F.abs()},boolean:function(F){return Math.abs(F)},Array:function(F){return S(p(F),2)},Matrix:function(F){return S(F,2)},"Array, number | BigNumber | string":function(F,M){return S(p(F),M)},"Matrix, number | BigNumber | string":function(F,M){return S(F,M)}});function x(O){var F=0;return O.forEach(function(M){var _=t(M);o(_,F)&&(F=_)},!0),F}function v(O){var F;return O.forEach(function(M){var _=t(M);(!F||u(_,F))&&(F=_)},!0),F||0}function y(O,F){if(F===Number.POSITIVE_INFINITY||F==="inf")return x(O);if(F===Number.NEGATIVE_INFINITY||F==="-inf")return v(O);if(F==="fro")return S(O,2);if(typeof F=="number"&&!isNaN(F)){if(!f(F,0)){var M=0;return O.forEach(function(_){M=n(i(t(_),F),M)},!0),i(M,1/F)}return Number.POSITIVE_INFINITY}throw new Error("Unsupported parameter value")}function w(O){var F=0;return O.forEach(function(M,_){F=n(F,l(M,a(M)))}),t(s(F))}function C(O){var F=[],M=0;return O.forEach(function(_,k){var L=k[1],Y=n(F[L]||0,t(_));o(Y,M)&&(M=Y),F[L]=Y},!0),M}function b(O){var F=O.size();if(F[0]!==F[1])throw new RangeError("Invalid matrix dimensions");var M=h(O),_=l(M,O),k=d(_).values.toArray(),L=k[k.length-1];return t(s(L))}function A(O){var F=[],M=0;return O.forEach(function(_,k){var L=k[0],Y=n(F[L]||0,t(_));o(Y,M)&&(M=Y),F[L]=Y},!0),M}function E(O,F){if(F===1)return C(O);if(F===Number.POSITIVE_INFINITY||F==="inf")return A(O);if(F==="fro")return w(O);if(F===2)return b(O);throw new Error("Unsupported parameter value "+F)}function S(O,F){var M=O.size();if(M.length===1)return y(O,F);if(M.length===2){if(M[0]&&M[1])return E(O,F);throw new RangeError("Invalid matrix dimensions")}}});var b2="dot",HU=["typed","addScalar","multiplyScalar","conj","size"],w2=T(b2,HU,e=>{var{typed:r,addScalar:t,multiplyScalar:n,conj:i,size:a}=e;return r(b2,{"Array | DenseMatrix, Array | DenseMatrix":l,"SparseMatrix, SparseMatrix":f});function s(u,p){var h=o(u),d=o(p),x,v;if(h.length===1)x=h[0];else if(h.length===2&&h[1]===1)x=h[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+h.join(", ")+")");if(d.length===1)v=d[0];else if(d.length===2&&d[1]===1)v=d[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+d.join(", ")+")");if(x!==v)throw new RangeError("Vectors must have equal length ("+x+" != "+v+")");if(x===0)throw new RangeError("Cannot calculate the dot product of empty vectors");return x}function l(u,p){var h=s(u,p),d=Ge(u)?u._data:u,x=Ge(u)?u._datatype||u.getDataType():void 0,v=Ge(p)?p._data:p,y=Ge(p)?p._datatype||p.getDataType():void 0,w=o(u).length===2,C=o(p).length===2,b=t,A=n;if(x&&y&&x===y&&typeof x=="string"&&x!=="mixed"){var E=x;b=r.find(t,[E,E]),A=r.find(n,[E,E])}if(!w&&!C){for(var S=A(i(d[0]),v[0]),O=1;OS){A++;continue}E===S&&(y=w(y,C(d[b],v[A])),b++,A++)}return y}function o(u){return Ge(u)?u.size():a(u)}});var GU="trace",$U=["typed","matrix","add"],D2=T(GU,$U,e=>{var{typed:r,matrix:t,add:n}=e;return r("trace",{Array:function(l){return i(t(l))},SparseMatrix:a,DenseMatrix:i,any:tr});function i(s){var l=s._size,f=s._data;switch(l.length){case 1:if(l[0]===1)return tr(f[0]);throw new RangeError("Matrix must be square (size: "+lr(l)+")");case 2:{var o=l[0],u=l[1];if(o===u){for(var p=0,h=0;h0)for(var x=0;xx)break}return d}throw new RangeError("Matrix must be square (size: "+lr(u)+")")}});var S2="index",ZU=["typed","Index"],N2=T(S2,ZU,e=>{var{typed:r,Index:t}=e;return r(S2,{"...number | string | BigNumber | Range | Array | Matrix":function(i){var a=i.map(function(l){return je(l)?l.toNumber():Ar(l)||Ge(l)?l.map(function(f){return je(f)?f.toNumber():f}):l}),s=new t;return t.apply(s,a),s}})});var vp=new Set(["end"]);var QU="Node",XU=["mathWithTransform"],A2=T(QU,XU,e=>{var{mathWithTransform:r}=e;function t(i){for(var a of[...vp])if(i.has(a))throw new Error('Scope contains an illegal symbol, "'+a+'" is a reserved keyword')}class n{get type(){return"Node"}get isNode(){return!0}evaluate(a){return this.compile().evaluate(a)}compile(){var a=this._compile(r,{}),s={},l=null;function f(o){var u=ka(o);return t(u),a(u,s,l)}return{evaluate:f}}_compile(a,s){throw new Error("Method _compile must be implemented by type "+this.type)}forEach(a){throw new Error("Cannot run forEach on a Node interface")}map(a){throw new Error("Cannot run map on a Node interface")}_ifNode(a){if(!Sr(a))throw new TypeError("Callback function must return a Node");return a}traverse(a){a(this,null,null);function s(l,f){l.forEach(function(o,u,p){f(o,u,p),s(o,f)})}s(this,a)}transform(a){function s(l,f,o){var u=a(l,f,o);return u!==l?u:l.map(s)}return s(this,null,null)}filter(a){var s=[];return this.traverse(function(l,f,o){a(l,f,o)&&s.push(l)}),s}clone(){throw new Error("Cannot clone a Node interface")}cloneDeep(){return this.map(function(a){return a.cloneDeep()})}equals(a){return a?this.type===a.type&&zi(this,a):!1}toString(a){var s=this._getCustomString(a);return typeof s<"u"?s:this._toString(a)}_toString(){throw new Error("_toString not implemented for "+this.type)}toJSON(){throw new Error("Cannot serialize object: toJSON not implemented by "+this.type)}toHTML(a){var s=this._getCustomString(a);return typeof s<"u"?s:this._toHTML(a)}_toHTML(){throw new Error("_toHTML not implemented for "+this.type)}toTex(a){var s=this._getCustomString(a);return typeof s<"u"?s:this._toTex(a)}_toTex(a){throw new Error("_toTex not implemented for "+this.type)}_getCustomString(a){if(a&&typeof a=="object")switch(typeof a.handler){case"object":case"undefined":return;case"function":return a.handler(this,a);default:throw new TypeError("Object or function expected as callback")}}getIdentifier(){return this.type}getContent(){return this}}return n},{isClass:!0,isNode:!0});function lt(e){return e&&e.isIndexError?new Xt(e.index+1,e.min+1,e.max!==void 0?e.max+1:void 0):e}function gp(e){var{subset:r}=e;return function(n,i){try{if(Array.isArray(n))return r(n,i);if(n&&typeof n.subset=="function")return n.subset(i);if(typeof n=="string")return r(n,i);if(typeof n=="object"){if(!i.isObjectProperty())throw new TypeError("Cannot apply a numeric index as object property");return gt(n,i.getObjectProperty())}else throw new TypeError("Cannot apply index: unsupported type of object")}catch(a){throw lt(a)}}}var xp="AccessorNode",JU=["subset","Node"],E2=T(xp,JU,e=>{var{subset:r,Node:t}=e,n=gp({subset:r});function i(s){return!(Sn(s)||$t(s)||yr(s)||fn(s)||la(s)||Zt(s)||rt(s))}class a extends t{constructor(l,f){if(super(),!Sr(l))throw new TypeError('Node expected for parameter "object"');if(!kn(f))throw new TypeError('IndexNode expected for parameter "index"');this.object=l,this.index=f}get name(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}get type(){return xp}get isAccessorNode(){return!0}_compile(l,f){var o=this.object._compile(l,f),u=this.index._compile(l,f);if(this.index.isObjectProperty()){var p=this.index.getObjectProperty();return function(d,x,v){return gt(o(d,x,v),p)}}else return function(d,x,v){var y=o(d,x,v),w=u(d,x,y);return n(y,w)}}forEach(l){l(this.object,"object",this),l(this.index,"index",this)}map(l){return new a(this._ifNode(l(this.object,"object",this)),this._ifNode(l(this.index,"index",this)))}clone(){return new a(this.object,this.index)}_toString(l){var f=this.object.toString(l);return i(this.object)&&(f="("+f+")"),f+this.index.toString(l)}_toHTML(l){var f=this.object.toHTML(l);return i(this.object)&&(f='('+f+')'),f+this.index.toHTML(l)}_toTex(l){var f=this.object.toTex(l);return i(this.object)&&(f="\\\\left(' + object + '\\\\right)"),f+this.index.toTex(l)}toJSON(){return{mathjs:xp,object:this.object,index:this.index}}static fromJSON(l){return new a(l.object,l.index)}}return Ur(a,"name",xp),a},{isClass:!0,isNode:!0});var yp="ArrayNode",KU=["Node"],C2=T(yp,KU,e=>{var{Node:r}=e;class t extends r{constructor(i){if(super(),this.items=i||[],!Array.isArray(this.items)||!this.items.every(Sr))throw new TypeError("Array containing Nodes expected")}get type(){return yp}get isArrayNode(){return!0}_compile(i,a){var s=Rn(this.items,function(o){return o._compile(i,a)}),l=i.config.matrix!=="Array";if(l){var f=i.matrix;return function(u,p,h){return f(Rn(s,function(d){return d(u,p,h)}))}}else return function(u,p,h){return Rn(s,function(d){return d(u,p,h)})}}forEach(i){for(var a=0;a['+a.join(',')+']'}_toTex(i){function a(s,l){var f=s.some($t)&&!s.every($t),o=l||f,u=o?"&":"\\\\\\\\",p=s.map(function(h){return h.items?a(h.items,!l):h.toTex(i)}).join(u);return f||!o||o&&!l?"\\\\begin{bmatrix}"+p+"\\\\end{bmatrix}":p}return a(this.items,!1)}}return Ur(t,"name",yp),t},{isClass:!0,isNode:!0});function M2(e){var{subset:r,matrix:t}=e;return function(i,a,s){try{if(Array.isArray(i)){var l=t(i).subset(a,s).valueOf();return l.forEach((f,o)=>{i[o]=f}),i}else{if(i&&typeof i.subset=="function")return i.subset(a,s);if(typeof i=="string")return r(i,a,s);if(typeof i=="object"){if(!a.isObjectProperty())throw TypeError("Cannot apply a numeric index as object property");return ca(i,a.getObjectProperty(),s),i}else throw new TypeError("Cannot apply index: unsupported type of object")}}catch(f){throw lt(f)}}}var yi=[{AssignmentNode:{},FunctionAssignmentNode:{}},{ConditionalNode:{latexLeftParens:!1,latexRightParens:!1,latexParens:!1}},{"OperatorNode:or":{op:"or",associativity:"left",associativeWith:[]}},{"OperatorNode:xor":{op:"xor",associativity:"left",associativeWith:[]}},{"OperatorNode:and":{op:"and",associativity:"left",associativeWith:[]}},{"OperatorNode:bitOr":{op:"|",associativity:"left",associativeWith:[]}},{"OperatorNode:bitXor":{op:"^|",associativity:"left",associativeWith:[]}},{"OperatorNode:bitAnd":{op:"&",associativity:"left",associativeWith:[]}},{"OperatorNode:equal":{op:"==",associativity:"left",associativeWith:[]},"OperatorNode:unequal":{op:"!=",associativity:"left",associativeWith:[]},"OperatorNode:smaller":{op:"<",associativity:"left",associativeWith:[]},"OperatorNode:larger":{op:">",associativity:"left",associativeWith:[]},"OperatorNode:smallerEq":{op:"<=",associativity:"left",associativeWith:[]},"OperatorNode:largerEq":{op:">=",associativity:"left",associativeWith:[]},RelationalNode:{associativity:"left",associativeWith:[]}},{"OperatorNode:leftShift":{op:"<<",associativity:"left",associativeWith:[]},"OperatorNode:rightArithShift":{op:">>",associativity:"left",associativeWith:[]},"OperatorNode:rightLogShift":{op:">>>",associativity:"left",associativeWith:[]}},{"OperatorNode:to":{op:"to",associativity:"left",associativeWith:[]}},{RangeNode:{}},{"OperatorNode:add":{op:"+",associativity:"left",associativeWith:["OperatorNode:add","OperatorNode:subtract"]},"OperatorNode:subtract":{op:"-",associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{op:"*",associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]},"OperatorNode:divide":{op:"/",associativity:"left",associativeWith:[],latexLeftParens:!1,latexRightParens:!1,latexParens:!1},"OperatorNode:dotMultiply":{op:".*",associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","OperatorNode:dotMultiply","OperatorNode:doDivide"]},"OperatorNode:dotDivide":{op:"./",associativity:"left",associativeWith:[]},"OperatorNode:mod":{op:"mod",associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]}},{"OperatorNode:unaryPlus":{op:"+",associativity:"right"},"OperatorNode:unaryMinus":{op:"-",associativity:"right"},"OperatorNode:bitNot":{op:"~",associativity:"right"},"OperatorNode:not":{op:"not",associativity:"right"}},{"OperatorNode:pow":{op:"^",associativity:"right",associativeWith:[],latexRightParens:!1},"OperatorNode:dotPow":{op:".^",associativity:"right",associativeWith:[]}},{"OperatorNode:factorial":{op:"!",associativity:"left"}},{"OperatorNode:ctranspose":{op:"'",associativity:"left"}}];function bp(e,r){if(!r||r!=="auto")return e;for(var t=e;Zt(t);)t=t.content;return t}function Gr(e,r,t,n){var i=e;r!=="keep"&&(i=e.getContent());for(var a=i.getIdentifier(),s=null,l=0;l{var{subset:r,matrix:t,Node:n}=e,i=gp({subset:r}),a=M2({subset:r,matrix:t});function s(f,o,u){o||(o="keep");var p=Gr(f,o,u),h=Gr(f.value,o,u);return o==="all"||h!==null&&h<=p}class l extends n{constructor(o,u,p){if(super(),this.object=o,this.index=p?u:null,this.value=p||u,!rt(o)&&!Sn(o))throw new TypeError('SymbolNode or AccessorNode expected as "object"');if(rt(o)&&o.name==="end")throw new Error('Cannot assign to symbol "end"');if(this.index&&!kn(this.index))throw new TypeError('IndexNode expected as "index"');if(!Sr(this.value))throw new TypeError('Node expected as "value"')}get name(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}get type(){return Dp}get isAssignmentNode(){return!0}_compile(o,u){var p=this.object._compile(o,u),h=this.index?this.index._compile(o,u):null,d=this.value._compile(o,u),x=this.object.name;if(this.index)if(this.index.isObjectProperty()){var v=this.index.getObjectProperty();return function(A,E,S){var O=p(A,E,S),F=d(A,E,S);return ca(O,v,F),F}}else{if(rt(this.object))return function(A,E,S){var O=p(A,E,S),F=d(A,E,S),M=h(A,E,O);return A.set(x,a(O,M,F)),F};var y=this.object.object._compile(o,u);if(this.object.index.isObjectProperty()){var w=this.object.index.getObjectProperty();return function(A,E,S){var O=y(A,E,S),F=gt(O,w),M=h(A,E,F),_=d(A,E,S);return ca(O,w,a(F,M,_)),_}}else{var C=this.object.index._compile(o,u);return function(A,E,S){var O=y(A,E,S),F=C(A,E,O),M=i(O,F),_=h(A,E,M),k=d(A,E,S);return a(O,F,a(M,_,k)),k}}}else{if(!rt(this.object))throw new TypeError("SymbolNode expected as object");return function(A,E,S){var O=d(A,E,S);return A.set(x,O),O}}}forEach(o){o(this.object,"object",this),this.index&&o(this.index,"index",this),o(this.value,"value",this)}map(o){var u=this._ifNode(o(this.object,"object",this)),p=this.index?this._ifNode(o(this.index,"index",this)):null,h=this._ifNode(o(this.value,"value",this));return new l(u,p,h)}clone(){return new l(this.object,this.index,this.value)}_toString(o){var u=this.object.toString(o),p=this.index?this.index.toString(o):"",h=this.value.toString(o);return s(this,o&&o.parenthesis,o&&o.implicit)&&(h="("+h+")"),u+p+" = "+h}toJSON(){return{mathjs:Dp,object:this.object,index:this.index,value:this.value}}static fromJSON(o){return new l(o.object,o.index,o.value)}_toHTML(o){var u=this.object.toHTML(o),p=this.index?this.index.toHTML(o):"",h=this.value.toHTML(o);return s(this,o&&o.parenthesis,o&&o.implicit)&&(h='('+h+')'),u+p+'='+h}_toTex(o){var u=this.object.toTex(o),p=this.index?this.index.toTex(o):"",h=this.value.toTex(o);return s(this,o&&o.parenthesis,o&&o.implicit)&&(h="\\\\left(".concat(h,"\\\\right)")),u+p+"="+h}}return Ur(l,"name",Dp),l},{isClass:!0,isNode:!0});var Sp="BlockNode",ez=["ResultSet","Node"],F2=T(Sp,ez,e=>{var{ResultSet:r,Node:t}=e;class n extends t{constructor(a){if(super(),!Array.isArray(a))throw new Error("Array expected");this.blocks=a.map(function(s){var l=s&&s.node,f=s&&s.visible!==void 0?s.visible:!0;if(!Sr(l))throw new TypeError('Property "node" must be a Node');if(typeof f!="boolean")throw new TypeError('Property "visible" must be a boolean');return{node:l,visible:f}})}get type(){return Sp}get isBlockNode(){return!0}_compile(a,s){var l=Rn(this.blocks,function(f){return{evaluate:f.node._compile(a,s),visible:f.visible}});return function(o,u,p){var h=[];return ho(l,function(x){var v=x.evaluate(o,u,p);x.visible&&h.push(v)}),new r(h)}}forEach(a){for(var s=0;s;')}).join('
')}_toTex(a){return this.blocks.map(function(s){return s.node.toTex(a)+(s.visible?"":";")}).join(\`\\\\;\\\\; +\`)}}return Ur(n,"name",Sp),n},{isClass:!0,isNode:!0});var Np="ConditionalNode",rz=["Node"],O2=T(Np,rz,e=>{var{Node:r}=e;function t(i){if(typeof i=="number"||typeof i=="boolean"||typeof i=="string")return!!i;if(i){if(je(i))return!i.isZero();if(Gt(i))return!!(i.re||i.im);if(qt(i))return!!i.value}if(i==null)return!1;throw new TypeError('Unsupported type of condition "'+_r(i)+'"')}class n extends r{constructor(a,s,l){if(super(),!Sr(a))throw new TypeError("Parameter condition must be a Node");if(!Sr(s))throw new TypeError("Parameter trueExpr must be a Node");if(!Sr(l))throw new TypeError("Parameter falseExpr must be a Node");this.condition=a,this.trueExpr=s,this.falseExpr=l}get type(){return Np}get isConditionalNode(){return!0}_compile(a,s){var l=this.condition._compile(a,s),f=this.trueExpr._compile(a,s),o=this.falseExpr._compile(a,s);return function(p,h,d){return t(l(p,h,d))?f(p,h,d):o(p,h,d)}}forEach(a){a(this.condition,"condition",this),a(this.trueExpr,"trueExpr",this),a(this.falseExpr,"falseExpr",this)}map(a){return new n(this._ifNode(a(this.condition,"condition",this)),this._ifNode(a(this.trueExpr,"trueExpr",this)),this._ifNode(a(this.falseExpr,"falseExpr",this)))}clone(){return new n(this.condition,this.trueExpr,this.falseExpr)}_toString(a){var s=a&&a.parenthesis?a.parenthesis:"keep",l=Gr(this,s,a&&a.implicit),f=this.condition.toString(a),o=Gr(this.condition,s,a&&a.implicit);(s==="all"||this.condition.type==="OperatorNode"||o!==null&&o<=l)&&(f="("+f+")");var u=this.trueExpr.toString(a),p=Gr(this.trueExpr,s,a&&a.implicit);(s==="all"||this.trueExpr.type==="OperatorNode"||p!==null&&p<=l)&&(u="("+u+")");var h=this.falseExpr.toString(a),d=Gr(this.falseExpr,s,a&&a.implicit);return(s==="all"||this.falseExpr.type==="OperatorNode"||d!==null&&d<=l)&&(h="("+h+")"),f+" ? "+u+" : "+h}toJSON(){return{mathjs:Np,condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}}static fromJSON(a){return new n(a.condition,a.trueExpr,a.falseExpr)}_toHTML(a){var s=a&&a.parenthesis?a.parenthesis:"keep",l=Gr(this,s,a&&a.implicit),f=this.condition.toHTML(a),o=Gr(this.condition,s,a&&a.implicit);(s==="all"||this.condition.type==="OperatorNode"||o!==null&&o<=l)&&(f='('+f+')');var u=this.trueExpr.toHTML(a),p=Gr(this.trueExpr,s,a&&a.implicit);(s==="all"||this.trueExpr.type==="OperatorNode"||p!==null&&p<=l)&&(u='('+u+')');var h=this.falseExpr.toHTML(a),d=Gr(this.falseExpr,s,a&&a.implicit);return(s==="all"||this.falseExpr.type==="OperatorNode"||d!==null&&d<=l)&&(h='('+h+')'),f+'?'+u+':'+h}_toTex(a){return"\\\\begin{cases} {"+this.trueExpr.toTex(a)+"}, &\\\\quad{\\\\text{if }\\\\;"+this.condition.toTex(a)+"}\\\\\\\\{"+this.falseExpr.toTex(a)+"}, &\\\\quad{\\\\text{otherwise}}\\\\end{cases}"}}return Ur(n,"name",Np),n},{isClass:!0,isNode:!0});var k2=Xn(I2(),1);var hg={Alpha:"A",alpha:"\\\\alpha",Beta:"B",beta:"\\\\beta",Gamma:"\\\\Gamma",gamma:"\\\\gamma",Delta:"\\\\Delta",delta:"\\\\delta",Epsilon:"E",epsilon:"\\\\epsilon",varepsilon:"\\\\varepsilon",Zeta:"Z",zeta:"\\\\zeta",Eta:"H",eta:"\\\\eta",Theta:"\\\\Theta",theta:"\\\\theta",vartheta:"\\\\vartheta",Iota:"I",iota:"\\\\iota",Kappa:"K",kappa:"\\\\kappa",varkappa:"\\\\varkappa",Lambda:"\\\\Lambda",lambda:"\\\\lambda",Mu:"M",mu:"\\\\mu",Nu:"N",nu:"\\\\nu",Xi:"\\\\Xi",xi:"\\\\xi",Omicron:"O",omicron:"o",Pi:"\\\\Pi",pi:"\\\\pi",varpi:"\\\\varpi",Rho:"P",rho:"\\\\rho",varrho:"\\\\varrho",Sigma:"\\\\Sigma",sigma:"\\\\sigma",varsigma:"\\\\varsigma",Tau:"T",tau:"\\\\tau",Upsilon:"\\\\Upsilon",upsilon:"\\\\upsilon",Phi:"\\\\Phi",phi:"\\\\phi",varphi:"\\\\varphi",Chi:"X",chi:"\\\\chi",Psi:"\\\\Psi",psi:"\\\\psi",Omega:"\\\\Omega",omega:"\\\\omega",true:"\\\\mathrm{True}",false:"\\\\mathrm{False}",i:"i",inf:"\\\\infty",Inf:"\\\\infty",infinity:"\\\\infty",Infinity:"\\\\infty",oo:"\\\\infty",lim:"\\\\lim",undefined:"\\\\mathbf{?}"},zr={transpose:"^\\\\top",ctranspose:"^H",factorial:"!",pow:"^",dotPow:".^\\\\wedge",unaryPlus:"+",unaryMinus:"-",bitNot:"\\\\~",not:"\\\\neg",multiply:"\\\\cdot",divide:"\\\\frac",dotMultiply:".\\\\cdot",dotDivide:".:",mod:"\\\\mod",add:"+",subtract:"-",to:"\\\\rightarrow",leftShift:"<<",rightArithShift:">>",rightLogShift:">>>",equal:"=",unequal:"\\\\neq",smaller:"<",larger:">",smallerEq:"\\\\leq",largerEq:"\\\\geq",bitAnd:"\\\\&",bitXor:"\\\\underline{|}",bitOr:"|",and:"\\\\wedge",xor:"\\\\veebar",or:"\\\\vee"},dg={abs:{1:"\\\\left|\${args[0]}\\\\right|"},add:{2:"\\\\left(\${args[0]}".concat(zr.add,"\${args[1]}\\\\right)")},cbrt:{1:"\\\\sqrt[3]{\${args[0]}}"},ceil:{1:"\\\\left\\\\lceil\${args[0]}\\\\right\\\\rceil"},cube:{1:"\\\\left(\${args[0]}\\\\right)^3"},divide:{2:"\\\\frac{\${args[0]}}{\${args[1]}}"},dotDivide:{2:"\\\\left(\${args[0]}".concat(zr.dotDivide,"\${args[1]}\\\\right)")},dotMultiply:{2:"\\\\left(\${args[0]}".concat(zr.dotMultiply,"\${args[1]}\\\\right)")},dotPow:{2:"\\\\left(\${args[0]}".concat(zr.dotPow,"\${args[1]}\\\\right)")},exp:{1:"\\\\exp\\\\left(\${args[0]}\\\\right)"},expm1:"\\\\left(e".concat(zr.pow,"{\${args[0]}}-1\\\\right)"),fix:{1:"\\\\mathrm{\${name}}\\\\left(\${args[0]}\\\\right)"},floor:{1:"\\\\left\\\\lfloor\${args[0]}\\\\right\\\\rfloor"},gcd:"\\\\gcd\\\\left(\${args}\\\\right)",hypot:"\\\\hypot\\\\left(\${args}\\\\right)",log:{1:"\\\\ln\\\\left(\${args[0]}\\\\right)",2:"\\\\log_{\${args[1]}}\\\\left(\${args[0]}\\\\right)"},log10:{1:"\\\\log_{10}\\\\left(\${args[0]}\\\\right)"},log1p:{1:"\\\\ln\\\\left(\${args[0]}+1\\\\right)",2:"\\\\log_{\${args[1]}}\\\\left(\${args[0]}+1\\\\right)"},log2:"\\\\log_{2}\\\\left(\${args[0]}\\\\right)",mod:{2:"\\\\left(\${args[0]}".concat(zr.mod,"\${args[1]}\\\\right)")},multiply:{2:"\\\\left(\${args[0]}".concat(zr.multiply,"\${args[1]}\\\\right)")},norm:{1:"\\\\left\\\\|\${args[0]}\\\\right\\\\|",2:void 0},nthRoot:{2:"\\\\sqrt[\${args[1]}]{\${args[0]}}"},nthRoots:{2:"\\\\{y : $y^{args[1]} = {\${args[0]}}\\\\}"},pow:{2:"\\\\left(\${args[0]}\\\\right)".concat(zr.pow,"{\${args[1]}}")},round:{1:"\\\\left\\\\lfloor\${args[0]}\\\\right\\\\rceil",2:void 0},sign:{1:"\\\\mathrm{\${name}}\\\\left(\${args[0]}\\\\right)"},sqrt:{1:"\\\\sqrt{\${args[0]}}"},square:{1:"\\\\left(\${args[0]}\\\\right)^2"},subtract:{2:"\\\\left(\${args[0]}".concat(zr.subtract,"\${args[1]}\\\\right)")},unaryMinus:{1:"".concat(zr.unaryMinus,"\\\\left(\${args[0]}\\\\right)")},unaryPlus:{1:"".concat(zr.unaryPlus,"\\\\left(\${args[0]}\\\\right)")},bitAnd:{2:"\\\\left(\${args[0]}".concat(zr.bitAnd,"\${args[1]}\\\\right)")},bitNot:{1:zr.bitNot+"\\\\left(\${args[0]}\\\\right)"},bitOr:{2:"\\\\left(\${args[0]}".concat(zr.bitOr,"\${args[1]}\\\\right)")},bitXor:{2:"\\\\left(\${args[0]}".concat(zr.bitXor,"\${args[1]}\\\\right)")},leftShift:{2:"\\\\left(\${args[0]}".concat(zr.leftShift,"\${args[1]}\\\\right)")},rightArithShift:{2:"\\\\left(\${args[0]}".concat(zr.rightArithShift,"\${args[1]}\\\\right)")},rightLogShift:{2:"\\\\left(\${args[0]}".concat(zr.rightLogShift,"\${args[1]}\\\\right)")},bellNumbers:{1:"\\\\mathrm{B}_{\${args[0]}}"},catalan:{1:"\\\\mathrm{C}_{\${args[0]}}"},stirlingS2:{2:"\\\\mathrm{S}\\\\left(\${args}\\\\right)"},arg:{1:"\\\\arg\\\\left(\${args[0]}\\\\right)"},conj:{1:"\\\\left(\${args[0]}\\\\right)^*"},im:{1:"\\\\Im\\\\left\\\\lbrace\${args[0]}\\\\right\\\\rbrace"},re:{1:"\\\\Re\\\\left\\\\lbrace\${args[0]}\\\\right\\\\rbrace"},and:{2:"\\\\left(\${args[0]}".concat(zr.and,"\${args[1]}\\\\right)")},not:{1:zr.not+"\\\\left(\${args[0]}\\\\right)"},or:{2:"\\\\left(\${args[0]}".concat(zr.or,"\${args[1]}\\\\right)")},xor:{2:"\\\\left(\${args[0]}".concat(zr.xor,"\${args[1]}\\\\right)")},cross:{2:"\\\\left(\${args[0]}\\\\right)\\\\times\\\\left(\${args[1]}\\\\right)"},ctranspose:{1:"\\\\left(\${args[0]}\\\\right)".concat(zr.ctranspose)},det:{1:"\\\\det\\\\left(\${args[0]}\\\\right)"},dot:{2:"\\\\left(\${args[0]}\\\\cdot\${args[1]}\\\\right)"},expm:{1:"\\\\exp\\\\left(\${args[0]}\\\\right)"},inv:{1:"\\\\left(\${args[0]}\\\\right)^{-1}"},pinv:{1:"\\\\left(\${args[0]}\\\\right)^{+}"},sqrtm:{1:"{\${args[0]}}".concat(zr.pow,"{\\\\frac{1}{2}}")},trace:{1:"\\\\mathrm{tr}\\\\left(\${args[0]}\\\\right)"},transpose:{1:"\\\\left(\${args[0]}\\\\right)".concat(zr.transpose)},combinations:{2:"\\\\binom{\${args[0]}}{\${args[1]}}"},combinationsWithRep:{2:"\\\\left(\\\\!\\\\!{\\\\binom{\${args[0]}}{\${args[1]}}}\\\\!\\\\!\\\\right)"},factorial:{1:"\\\\left(\${args[0]}\\\\right)".concat(zr.factorial)},gamma:{1:"\\\\Gamma\\\\left(\${args[0]}\\\\right)"},lgamma:{1:"\\\\ln\\\\Gamma\\\\left(\${args[0]}\\\\right)"},equal:{2:"\\\\left(\${args[0]}".concat(zr.equal,"\${args[1]}\\\\right)")},larger:{2:"\\\\left(\${args[0]}".concat(zr.larger,"\${args[1]}\\\\right)")},largerEq:{2:"\\\\left(\${args[0]}".concat(zr.largerEq,"\${args[1]}\\\\right)")},smaller:{2:"\\\\left(\${args[0]}".concat(zr.smaller,"\${args[1]}\\\\right)")},smallerEq:{2:"\\\\left(\${args[0]}".concat(zr.smallerEq,"\${args[1]}\\\\right)")},unequal:{2:"\\\\left(\${args[0]}".concat(zr.unequal,"\${args[1]}\\\\right)")},erf:{1:"erf\\\\left(\${args[0]}\\\\right)"},max:"\\\\max\\\\left(\${args}\\\\right)",min:"\\\\min\\\\left(\${args}\\\\right)",variance:"\\\\mathrm{Var}\\\\left(\${args}\\\\right)",acos:{1:"\\\\cos^{-1}\\\\left(\${args[0]}\\\\right)"},acosh:{1:"\\\\cosh^{-1}\\\\left(\${args[0]}\\\\right)"},acot:{1:"\\\\cot^{-1}\\\\left(\${args[0]}\\\\right)"},acoth:{1:"\\\\coth^{-1}\\\\left(\${args[0]}\\\\right)"},acsc:{1:"\\\\csc^{-1}\\\\left(\${args[0]}\\\\right)"},acsch:{1:"\\\\mathrm{csch}^{-1}\\\\left(\${args[0]}\\\\right)"},asec:{1:"\\\\sec^{-1}\\\\left(\${args[0]}\\\\right)"},asech:{1:"\\\\mathrm{sech}^{-1}\\\\left(\${args[0]}\\\\right)"},asin:{1:"\\\\sin^{-1}\\\\left(\${args[0]}\\\\right)"},asinh:{1:"\\\\sinh^{-1}\\\\left(\${args[0]}\\\\right)"},atan:{1:"\\\\tan^{-1}\\\\left(\${args[0]}\\\\right)"},atan2:{2:"\\\\mathrm{atan2}\\\\left(\${args}\\\\right)"},atanh:{1:"\\\\tanh^{-1}\\\\left(\${args[0]}\\\\right)"},cos:{1:"\\\\cos\\\\left(\${args[0]}\\\\right)"},cosh:{1:"\\\\cosh\\\\left(\${args[0]}\\\\right)"},cot:{1:"\\\\cot\\\\left(\${args[0]}\\\\right)"},coth:{1:"\\\\coth\\\\left(\${args[0]}\\\\right)"},csc:{1:"\\\\csc\\\\left(\${args[0]}\\\\right)"},csch:{1:"\\\\mathrm{csch}\\\\left(\${args[0]}\\\\right)"},sec:{1:"\\\\sec\\\\left(\${args[0]}\\\\right)"},sech:{1:"\\\\mathrm{sech}\\\\left(\${args[0]}\\\\right)"},sin:{1:"\\\\sin\\\\left(\${args[0]}\\\\right)"},sinh:{1:"\\\\sinh\\\\left(\${args[0]}\\\\right)"},tan:{1:"\\\\tan\\\\left(\${args[0]}\\\\right)"},tanh:{1:"\\\\tanh\\\\left(\${args[0]}\\\\right)"},to:{2:"\\\\left(\${args[0]}".concat(zr.to,"\${args[1]}\\\\right)")},numeric:function(r,t){return r.args[0].toTex()},number:{0:"0",1:"\\\\left(\${args[0]}\\\\right)",2:"\\\\left(\\\\left(\${args[0]}\\\\right)\${args[1]}\\\\right)"},string:{0:'\\\\mathtt{""}',1:"\\\\mathrm{string}\\\\left(\${args[0]}\\\\right)"},bignumber:{0:"0",1:"\\\\left(\${args[0]}\\\\right)"},complex:{0:"0",1:"\\\\left(\${args[0]}\\\\right)",2:"\\\\left(\\\\left(\${args[0]}\\\\right)+".concat(hg.i,"\\\\cdot\\\\left(\${args[1]}\\\\right)\\\\right)")},matrix:{0:"\\\\begin{bmatrix}\\\\end{bmatrix}",1:"\\\\left(\${args[0]}\\\\right)",2:"\\\\left(\${args[0]}\\\\right)"},sparse:{0:"\\\\begin{bsparse}\\\\end{bsparse}",1:"\\\\left(\${args[0]}\\\\right)"},unit:{1:"\\\\left(\${args[0]}\\\\right)",2:"\\\\left(\\\\left(\${args[0]}\\\\right)\${args[1]}\\\\right)"}},R2="\\\\mathrm{\${name}}\\\\left(\${args}\\\\right)",P2={deg:"^\\\\circ"};function Ap(e){return(0,k2.default)(e,{preserveFormatting:!0})}function Ep(e,r){return r=typeof r>"u"?!1:r,r?$e(P2,e)?P2[e]:"\\\\mathrm{"+Ap(e)+"}":$e(hg,e)?hg[e]:Ap(e)}var Cp="ConstantNode",az=["Node"],L2=T(Cp,az,e=>{var{Node:r}=e;class t extends r{constructor(i){super(),this.value=i}get type(){return Cp}get isConstantNode(){return!0}_compile(i,a){var s=this.value;return function(){return s}}forEach(i){}map(i){return this.clone()}clone(){return new t(this.value)}_toString(i){return lr(this.value,i)}_toHTML(i){var a=this._toString(i);switch(_r(this.value)){case"number":case"BigNumber":case"Fraction":return''+a+"";case"string":return''+a+"";case"boolean":return''+a+"";case"null":return''+a+"";case"undefined":return''+a+"";default:return''+a+""}}toJSON(){return{mathjs:Cp,value:this.value}}static fromJSON(i){return new t(i.value)}_toTex(i){var a=this._toString(i),s=_r(this.value);switch(s){case"string":return"\\\\mathtt{"+Ap(a)+"}";case"number":case"BigNumber":{var l=s==="BigNumber"?this.value.isFinite():isFinite(this.value);if(!l)return this.value.valueOf()<0?"-\\\\infty":"\\\\infty";var f=a.toLowerCase().indexOf("e");return f!==-1?a.substring(0,f)+"\\\\cdot10^{"+a.substring(f+1)+"}":a}case"Fraction":return this.value.toLatex();default:return a}}}return Ur(t,"name",Cp),t},{isClass:!0,isNode:!0});var Mp="FunctionAssignmentNode",oz=["typed","Node"],q2=T(Mp,oz,e=>{var{typed:r,Node:t}=e;function n(a,s,l){var f=Gr(a,s,l),o=Gr(a.expr,s,l);return s==="all"||o!==null&&o<=f}class i extends t{constructor(s,l,f){if(super(),typeof s!="string")throw new TypeError('String expected for parameter "name"');if(!Array.isArray(l))throw new TypeError('Array containing strings or objects expected for parameter "params"');if(!Sr(f))throw new TypeError('Node expected for parameter "expr"');if(vp.has(s))throw new Error('Illegal function name, "'+s+'" is a reserved keyword');var o=new Set;for(var u of l){var p=typeof u=="string"?u:u.name;if(o.has(p))throw new Error('Duplicate parameter name "'.concat(p,'"'));o.add(p)}this.name=s,this.params=l.map(function(h){return h&&h.name||h}),this.types=l.map(function(h){return h&&h.type||"any"}),this.expr=f}get type(){return Mp}get isFunctionAssignmentNode(){return!0}_compile(s,l){var f=Object.create(l);ho(this.params,function(x){f[x]=!0});var o=this.expr._compile(s,f),u=this.name,p=this.params,h=Gd(this.types,","),d=u+"("+Gd(this.params,", ")+")";return function(v,y,w){var C={};C[h]=function(){for(var A=Object.create(y),E=0;E'+Qt(this.params[o])+"");var u=this.expr.toHTML(s);return n(this,l,s&&s.implicit)&&(u='('+u+')'),''+Qt(this.name)+'('+f.join(',')+')='+u}_toTex(s){var l=s&&s.parenthesis?s.parenthesis:"keep",f=this.expr.toTex(s);return n(this,l,s&&s.implicit)&&(f="\\\\left(".concat(f,"\\\\right)")),"\\\\mathrm{"+this.name+"}\\\\left("+this.params.map(Ep).join(",")+"\\\\right)="+f}}return Ur(i,"name",Mp),i},{isClass:!0,isNode:!0});var _p="IndexNode",sz=["Node","size"],U2=T(_p,sz,e=>{var{Node:r,size:t}=e;class n extends r{constructor(a,s){if(super(),this.dimensions=a,this.dotNotation=s||!1,!Array.isArray(a)||!a.every(Sr))throw new TypeError('Array containing Nodes expected for parameter "dimensions"');if(this.dotNotation&&!this.isObjectProperty())throw new Error("dotNotation only applicable for object properties")}get type(){return _p}get isIndexNode(){return!0}_compile(a,s){var l=Rn(this.dimensions,function(o,u){var p=o.filter(x=>x.isSymbolNode&&x.name==="end").length>0;if(p){var h=Object.create(s);h.end=!0;var d=o._compile(a,h);return function(v,y,w){if(!Ge(w)&&!Ar(w)&&!yt(w))throw new TypeError('Cannot resolve "end": context must be a Matrix, Array, or string but is '+_r(w));var C=t(w).valueOf(),b=Object.create(y);return b.end=C[u],d(v,b,w)}}else return o._compile(a,s)}),f=gt(a,"index");return function(u,p,h){var d=Rn(l,function(x){return x(u,p,h)});return f(...d)}}forEach(a){for(var s=0;s.'+Qt(this.getObjectProperty())+"":'['+s.join(',')+']'}_toTex(a){var s=this.dimensions.map(function(l){return l.toTex(a)});return this.dotNotation?"."+this.getObjectProperty():"_{"+s.join(",")+"}"}}return Ur(n,"name",_p),n},{isClass:!0,isNode:!0});var Tp="ObjectNode",uz=["Node"],z2=T(Tp,uz,e=>{var{Node:r}=e;class t extends r{constructor(i){if(super(),this.properties=i||{},i&&(typeof i!="object"||!Object.keys(i).every(function(a){return Sr(i[a])})))throw new TypeError("Object containing Nodes expected")}get type(){return Tp}get isObjectNode(){return!0}_compile(i,a){var s={};for(var l in this.properties)if($e(this.properties,l)){var f=Ko(l),o=JSON.parse(f),u=gt(this.properties,l);s[o]=u._compile(i,a)}return function(h,d,x){var v={};for(var y in s)$e(s,y)&&(v[y]=s[y](h,d,x));return v}}forEach(i){for(var a in this.properties)$e(this.properties,a)&&i(this.properties[a],"properties["+Ko(a)+"]",this)}map(i){var a={};for(var s in this.properties)$e(this.properties,s)&&(a[s]=this._ifNode(i(this.properties[s],"properties["+Ko(s)+"]",this)));return new t(a)}clone(){var i={};for(var a in this.properties)$e(this.properties,a)&&(i[a]=this.properties[a]);return new t(i)}_toString(i){var a=[];for(var s in this.properties)$e(this.properties,s)&&a.push(Ko(s)+": "+this.properties[s].toString(i));return"{"+a.join(", ")+"}"}toJSON(){return{mathjs:Tp,properties:this.properties}}static fromJSON(i){return new t(i.properties)}_toHTML(i){var a=[];for(var s in this.properties)$e(this.properties,s)&&a.push(''+Qt(s)+':'+this.properties[s].toHTML(i));return'{'+a.join(',')+'}'}_toTex(i){var a=[];for(var s in this.properties)$e(this.properties,s)&&a.push("\\\\mathbf{"+s+":} & "+this.properties[s].toTex(i)+"\\\\\\\\");var l="\\\\left\\\\{\\\\begin{array}{ll}"+a.join(\` +\`)+"\\\\end{array}\\\\right\\\\}";return l}}return Ur(t,"name",Tp),t},{isClass:!0,isNode:!0});function os(e,r){return new eu(e,new rs(r),new Set(Object.keys(r)))}var Fp="OperatorNode",fz=["Node"],W2=T(Fp,fz,e=>{var{Node:r}=e;function t(a,s){var l=a;if(s==="auto")for(;Zt(l);)l=l.content;return yr(l)?!0:ut(l)?t(l.args[0],s):!1}function n(a,s,l,f,o){var u=Gr(a,s,l),p=hu(a,s);if(s==="all"||f.length>2&&a.getIdentifier()!=="OperatorNode:add"&&a.getIdentifier()!=="OperatorNode:multiply")return f.map(function(_){switch(_.getContent().type){case"ArrayNode":case"ConstantNode":case"SymbolNode":case"ParenthesisNode":return!1;default:return!0}});var h;switch(f.length){case 0:h=[];break;case 1:{var d=Gr(f[0],s,l,a);if(o&&d!==null){var x,v;if(s==="keep"?(x=f[0].getIdentifier(),v=a.getIdentifier()):(x=f[0].getContent().getIdentifier(),v=a.getContent().getIdentifier()),yi[u][v].latexLeftParens===!1){h=[!1];break}if(yi[d][x].latexParens===!1){h=[!1];break}}if(d===null){h=[!1];break}if(d<=u){h=[!0];break}h=[!1]}break;case 2:{var y,w=Gr(f[0],s,l,a),C=wp(a,f[0],s);w===null?y=!1:w===u&&p==="right"&&!C||w=2&&a.getIdentifier()==="OperatorNode:multiply"&&a.implicit&&s!=="all"&&l==="hide")for(var M=1;M2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var y=o.map(function(w,C){return w=w.toString(s),u[C]&&(w="("+w+")"),w});return this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&f==="hide"?y.join(" "):y.join(" "+this.op+" ")}else return this.fn+"("+this.args.join(", ")+")"}toJSON(){return{mathjs:Fp,op:this.op,fn:this.fn,args:this.args,implicit:this.implicit,isPercentage:this.isPercentage}}static fromJSON(s){return new i(s.op,s.fn,s.args,s.implicit,s.isPercentage)}_toHTML(s){var l=s&&s.parenthesis?s.parenthesis:"keep",f=s&&s.implicit?s.implicit:"hide",o=this.args,u=n(this,l,f,o,!1);if(o.length===1){var p=hu(this,l),h=o[0].toHTML(s);return u[0]&&(h='('+h+')'),p==="right"?''+Qt(this.op)+""+h:h+''+Qt(this.op)+""}else if(o.length===2){var d=o[0].toHTML(s),x=o[1].toHTML(s);return u[0]&&(d='('+d+')'),u[1]&&(x='('+x+')'),this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&f==="hide"?d+''+x:d+''+Qt(this.op)+""+x}else{var v=o.map(function(y,w){return y=y.toHTML(s),u[w]&&(y='('+y+')'),y});return o.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")?this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&f==="hide"?v.join(''):v.join(''+Qt(this.op)+""):''+Qt(this.fn)+'('+v.join(',')+')'}}_toTex(s){var l=s&&s.parenthesis?s.parenthesis:"keep",f=s&&s.implicit?s.implicit:"hide",o=this.args,u=n(this,l,f,o,!0),p=zr[this.fn];if(p=typeof p>"u"?this.op:p,o.length===1){var h=hu(this,l),d=o[0].toTex(s);return u[0]&&(d="\\\\left(".concat(d,"\\\\right)")),h==="right"?p+d:d+p}else if(o.length===2){var x=o[0],v=x.toTex(s);u[0]&&(v="\\\\left(".concat(v,"\\\\right)"));var y=o[1],w=y.toTex(s);u[1]&&(w="\\\\left(".concat(w,"\\\\right)"));var C;switch(l==="keep"?C=x.getIdentifier():C=x.getContent().getIdentifier(),this.getIdentifier()){case"OperatorNode:divide":return p+"{"+v+"}{"+w+"}";case"OperatorNode:pow":switch(v="{"+v+"}",w="{"+w+"}",C){case"ConditionalNode":case"OperatorNode:divide":v="\\\\left(".concat(v,"\\\\right)")}break;case"OperatorNode:multiply":if(this.implicit&&f==="hide")return v+"~"+w}return v+p+w}else if(o.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var b=o.map(function(A,E){return A=A.toTex(s),u[E]&&(A="\\\\left(".concat(A,"\\\\right)")),A});return this.getIdentifier()==="OperatorNode:multiply"&&this.implicit&&f==="hide"?b.join("~"):b.join(p)}else return"\\\\mathrm{"+this.fn+"}\\\\left("+o.map(function(A){return A.toTex(s)}).join(",")+"\\\\right)"}getIdentifier(){return this.type+":"+this.fn}}return Ur(i,"name",Fp),i},{isClass:!0,isNode:!0});var Op="ParenthesisNode",lz=["Node"],V2=T(Op,lz,e=>{var{Node:r}=e;class t extends r{constructor(i){if(super(),!Sr(i))throw new TypeError('Node expected for parameter "content"');this.content=i}get type(){return Op}get isParenthesisNode(){return!0}_compile(i,a){return this.content._compile(i,a)}getContent(){return this.content.getContent()}forEach(i){i(this.content,"content",this)}map(i){var a=i(this.content,"content",this);return new t(a)}clone(){return new t(this.content)}_toString(i){return!i||i&&!i.parenthesis||i&&i.parenthesis==="keep"?"("+this.content.toString(i)+")":this.content.toString(i)}toJSON(){return{mathjs:Op,content:this.content}}static fromJSON(i){return new t(i.content)}_toHTML(i){return!i||i&&!i.parenthesis||i&&i.parenthesis==="keep"?'('+this.content.toHTML(i)+')':this.content.toHTML(i)}_toTex(i){return!i||i&&!i.parenthesis||i&&i.parenthesis==="keep"?"\\\\left(".concat(this.content.toTex(i),"\\\\right)"):this.content.toTex(i)}}return Ur(t,"name",Op),t},{isClass:!0,isNode:!0});var Bp="RangeNode",cz=["Node"],Y2=T(Bp,cz,e=>{var{Node:r}=e;function t(i,a,s){var l=Gr(i,a,s),f={},o=Gr(i.start,a,s);if(f.start=o!==null&&o<=l||a==="all",i.step){var u=Gr(i.step,a,s);f.step=u!==null&&u<=l||a==="all"}var p=Gr(i.end,a,s);return f.end=p!==null&&p<=l||a==="all",f}class n extends r{constructor(a,s,l){if(super(),!Sr(a))throw new TypeError("Node expected");if(!Sr(s))throw new TypeError("Node expected");if(l&&!Sr(l))throw new TypeError("Node expected");if(arguments.length>3)throw new Error("Too many arguments");this.start=a,this.end=s,this.step=l||null}get type(){return Bp}get isRangeNode(){return!0}needsEnd(){var a=this.filter(function(s){return rt(s)&&s.name==="end"});return a.length>0}_compile(a,s){var l=a.range,f=this.start._compile(a,s),o=this.end._compile(a,s);if(this.step){var u=this.step._compile(a,s);return function(h,d,x){return l(f(h,d,x),o(h,d,x),u(h,d,x))}}else return function(h,d,x){return l(f(h,d,x),o(h,d,x))}}forEach(a){a(this.start,"start",this),a(this.end,"end",this),this.step&&a(this.step,"step",this)}map(a){return new n(this._ifNode(a(this.start,"start",this)),this._ifNode(a(this.end,"end",this)),this.step&&this._ifNode(a(this.step,"step",this)))}clone(){return new n(this.start,this.end,this.step&&this.step)}_toString(a){var s=a&&a.parenthesis?a.parenthesis:"keep",l=t(this,s,a&&a.implicit),f,o=this.start.toString(a);if(l.start&&(o="("+o+")"),f=o,this.step){var u=this.step.toString(a);l.step&&(u="("+u+")"),f+=":"+u}var p=this.end.toString(a);return l.end&&(p="("+p+")"),f+=":"+p,f}toJSON(){return{mathjs:Bp,start:this.start,end:this.end,step:this.step}}static fromJSON(a){return new n(a.start,a.end,a.step)}_toHTML(a){var s=a&&a.parenthesis?a.parenthesis:"keep",l=t(this,s,a&&a.implicit),f,o=this.start.toHTML(a);if(l.start&&(o='('+o+')'),f=o,this.step){var u=this.step.toHTML(a);l.step&&(u='('+u+')'),f+=':'+u}var p=this.end.toHTML(a);return l.end&&(p='('+p+')'),f+=':'+p,f}_toTex(a){var s=a&&a.parenthesis?a.parenthesis:"keep",l=t(this,s,a&&a.implicit),f=this.start.toTex(a);if(l.start&&(f="\\\\left(".concat(f,"\\\\right)")),this.step){var o=this.step.toTex(a);l.step&&(o="\\\\left(".concat(o,"\\\\right)")),f+=":"+o}var u=this.end.toTex(a);return l.end&&(u="\\\\left(".concat(u,"\\\\right)")),f+=":"+u,f}}return Ur(n,"name",Bp),n},{isClass:!0,isNode:!0});var Ip="RelationalNode",pz=["Node"],H2=T(Ip,pz,e=>{var{Node:r}=e,t={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="};class n extends r{constructor(a,s){if(super(),!Array.isArray(a))throw new TypeError("Parameter conditionals must be an array");if(!Array.isArray(s))throw new TypeError("Parameter params must be an array");if(a.length!==s.length-1)throw new TypeError("Parameter params must contain exactly one more element than parameter conditionals");this.conditionals=a,this.params=s}get type(){return Ip}get isRelationalNode(){return!0}_compile(a,s){var l=this,f=this.params.map(o=>o._compile(a,s));return function(u,p,h){for(var d,x=f[0](u,p,h),v=0;va(s,"params["+l+"]",this),this)}map(a){return new n(this.conditionals.slice(),this.params.map((s,l)=>this._ifNode(a(s,"params["+l+"]",this)),this))}clone(){return new n(this.conditionals,this.params)}_toString(a){for(var s=a&&a.parenthesis?a.parenthesis:"keep",l=Gr(this,s,a&&a.implicit),f=this.params.map(function(p,h){var d=Gr(p,s,a&&a.implicit);return s==="all"||d!==null&&d<=l?"("+p.toString(a)+")":p.toString(a)}),o=f[0],u=0;u('+p.toHTML(a)+')':p.toHTML(a)}),o=f[0],u=0;u'+Qt(t[this.conditionals[u]])+""+f[u+1];return o}_toTex(a){for(var s=a&&a.parenthesis?a.parenthesis:"keep",l=Gr(this,s,a&&a.implicit),f=this.params.map(function(p,h){var d=Gr(p,s,a&&a.implicit);return s==="all"||d!==null&&d<=l?"\\\\left("+p.toTex(a)+"\\right)":p.toTex(a)}),o=f[0],u=0;u{var{math:r,Unit:t,Node:n}=e;function i(s){return t?t.isValuelessUnit(s):!1}class a extends n{constructor(l){if(super(),typeof l!="string")throw new TypeError('String expected for parameter "name"');this.name=l}get type(){return"SymbolNode"}get isSymbolNode(){return!0}_compile(l,f){var o=this.name;if(f[o]===!0)return function(p,h,d){return gt(h,o)};if(o in l)return function(p,h,d){return p.has(o)?p.get(o):gt(l,o)};var u=i(o);return function(p,h,d){return p.has(o)?p.get(o):u?new t(null,o):a.onUndefinedSymbol(o)}}forEach(l){}map(l){return this.clone()}static onUndefinedSymbol(l){throw new Error("Undefined symbol "+l)}clone(){return new a(this.name)}_toString(l){return this.name}_toHTML(l){var f=Qt(this.name);return f==="true"||f==="false"?''+f+"":f==="i"?''+f+"":f==="Infinity"?''+f+"":f==="NaN"?''+f+"":f==="null"?''+f+"":f==="undefined"?''+f+"":''+f+""}toJSON(){return{mathjs:"SymbolNode",name:this.name}}static fromJSON(l){return new a(l.name)}_toTex(l){var f=!1;typeof r[this.name]>"u"&&i(this.name)&&(f=!0);var o=Ep(this.name,f);return o[0]==="\\\\"?o:" "+o}}return a},{isClass:!0,isNode:!0});var Pp="FunctionNode",dz=["math","Node","SymbolNode"],$2=T(Pp,dz,e=>{var r,{math:t,Node:n,SymbolNode:i}=e,a=f=>lr(f,{truncate:78});function s(f,o,u){for(var p="",h=/\\$(?:\\{([a-z_][a-z_0-9]*)(?:\\[([0-9]+)\\])?\\}|\\$)/gi,d=0,x;(x=h.exec(f))!==null;)if(p+=f.substring(d,x.index),d=x.index,x[0]==="$$")p+="$",d++;else{d+=x[0].length;var v=o[x[1]];if(!v)throw new ReferenceError("Template: Property "+x[1]+" does not exist.");if(x[2]===void 0)switch(typeof v){case"string":p+=v;break;case"object":if(Sr(v))p+=v.toTex(u);else if(Array.isArray(v))p+=v.map(function(y,w){if(Sr(y))return y.toTex(u);throw new TypeError("Template: "+x[1]+"["+w+"] is not a Node.")}).join(",");else throw new TypeError("Template: "+x[1]+" has to be a Node, String or array of Nodes");break;default:throw new TypeError("Template: "+x[1]+" has to be a Node, String or array of Nodes")}else if(Sr(v[x[2]]&&v[x[2]]))p+=v[x[2]].toTex(u);else throw new TypeError("Template: "+x[1]+"["+x[2]+"] is not a Node.")}return p+=f.slice(d),p}class l extends n{constructor(o,u){if(super(),typeof o=="string"&&(o=new i(o)),!Sr(o))throw new TypeError('Node expected as parameter "fn"');if(!Array.isArray(u)||!u.every(Sr))throw new TypeError('Array containing Nodes expected for parameter "args"');this.fn=o,this.args=u||[]}get name(){return this.fn.name||""}get type(){return Pp}get isFunctionNode(){return!0}_compile(o,u){var p=this.args.map(F=>F._compile(o,u));if(rt(this.fn)){var h=this.fn.name;if(u[h]){var w=this.args;return function(M,_,k){var L=gt(_,h);if(typeof L!="function")throw new TypeError("Argument '".concat(h,"' was not a function; received: ").concat(a(L)));if(L.rawArgs)return L(w,o,os(M,_));var Y=p.map($=>$(M,_,k));return L.apply(L,Y)}}else{var d=h in o?gt(o,h):void 0,x=typeof d=="function"&&d.rawArgs===!0,v=F=>{var M;if(F.has(h))M=F.get(h);else if(h in o)M=gt(o,h);else return l.onUndefinedFunction(h);if(typeof M=="function")return M;throw new TypeError("'".concat(h,\`' is not a function; its value is: + \`).concat(a(M)))};if(x){var y=this.args;return function(M,_,k){var L=v(M);return L(y,o,os(M,_))}}else switch(p.length){case 0:return function(M,_,k){var L=v(M);return L()};case 1:return function(M,_,k){var L=v(M),Y=p[0];return L(Y(M,_,k))};case 2:return function(M,_,k){var L=v(M),Y=p[0],$=p[1];return L(Y(M,_,k),$(M,_,k))};default:return function(M,_,k){var L=v(M),Y=p.map($=>$(M,_,k));return L(...Y)}}}}else if(Sn(this.fn)&&kn(this.fn.index)&&this.fn.index.isObjectProperty()){var C=this.fn.object._compile(o,u),b=this.fn.index.getObjectProperty(),A=this.args;return function(M,_,k){var L=C(M,_,k),Y=Ty(L,b);if(Y!=null&&Y.rawArgs)return Y(A,o,os(M,_));var $=p.map(V=>V(M,_,k));return Y.apply(L,$)}}else{var E=this.fn.toString(),S=this.fn._compile(o,u),O=this.args;return function(M,_,k){var L=S(M,_,k);if(typeof L!="function")throw new TypeError("Expression '".concat(E,"' did not evaluate to a function; value is:")+\` + \`.concat(a(L)));if(L.rawArgs)return L(O,o,os(M,_));var Y=p.map($=>$(M,_,k));return L.apply(L,Y)}}}forEach(o){o(this.fn,"fn",this);for(var u=0;u'+Qt(this.fn)+'('+u.join(',')+')'}toTex(o){var u;return o&&typeof o.handler=="object"&&$e(o.handler,this.name)&&(u=o.handler[this.name](this,o)),typeof u<"u"?u:super.toTex(o)}_toTex(o){var u=this.args.map(function(d){return d.toTex(o)}),p;dg[this.name]&&(p=dg[this.name]),t[this.name]&&(typeof t[this.name].toTex=="function"||typeof t[this.name].toTex=="object"||typeof t[this.name].toTex=="string")&&(p=t[this.name].toTex);var h;switch(typeof p){case"function":h=p(this,o);break;case"string":h=s(p,this,o);break;case"object":switch(typeof p[u.length]){case"function":h=p[u.length](this,o);break;case"string":h=s(p[u.length],this,o);break}}return typeof h<"u"?h:s(R2,this,o)}getIdentifier(){return this.type+":"+this.name}}return r=l,Ur(l,"name",Pp),Ur(l,"onUndefinedFunction",function(f){throw new Error("Undefined function "+f)}),Ur(l,"fromJSON",function(f){return new r(f.fn,f.args)}),l},{isClass:!0,isNode:!0});var Z2="parse",vz=["typed","numeric","config","AccessorNode","ArrayNode","AssignmentNode","BlockNode","ConditionalNode","ConstantNode","FunctionAssignmentNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","RangeNode","RelationalNode","SymbolNode"],Q2=T(Z2,vz,e=>{var{typed:r,numeric:t,config:n,AccessorNode:i,ArrayNode:a,AssignmentNode:s,BlockNode:l,ConditionalNode:f,ConstantNode:o,FunctionAssignmentNode:u,FunctionNode:p,IndexNode:h,ObjectNode:d,OperatorNode:x,ParenthesisNode:v,RangeNode:y,RelationalNode:w,SymbolNode:C}=e,b=r(Z2,{string:function(Q){return me(Q,{})},"Array | Matrix":function(Q){return A(Q,{})},"string, Object":function(Q,ve){var Be=ve.nodes!==void 0?ve.nodes:{};return me(Q,Be)},"Array | Matrix, Object":A});function A(B){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ve=Q.nodes!==void 0?Q.nodes:{};return Je(B,function(Be){if(typeof Be!="string")throw new TypeError("String expected");return me(Be,ve)})}var E={NULL:0,DELIMITER:1,NUMBER:2,SYMBOL:3,UNKNOWN:4},S={",":!0,"(":!0,")":!0,"[":!0,"]":!0,"{":!0,"}":!0,'"':!0,"'":!0,";":!0,"+":!0,"-":!0,"*":!0,".*":!0,"/":!0,"./":!0,"%":!0,"^":!0,".^":!0,"~":!0,"!":!0,"&":!0,"|":!0,"^|":!0,"=":!0,":":!0,"?":!0,"==":!0,"!=":!0,"<":!0,">":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},O={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},F={true:!0,false:!1,null:null,undefined:void 0},M=["NaN","Infinity"],_={'"':'"',"'":"'","\\\\":"\\\\","/":"/",b:"\\b",f:"\\f",n:\` \`,r:"\\r",t:" "};function k(){return{extraNodes:{},expression:"",comment:"",index:0,token:"",tokenType:E.NULL,nestingLevel:0,conditionalLevel:null}}function L(B,Q){return B.expression.substr(B.index,Q)}function Y(B){return L(B,1)}function $(B){B.index++}function V(B){return B.expression.charAt(B.index-1)}function q(B){return B.expression.charAt(B.index+1)}function R(B){for(B.tokenType=E.NULL,B.token="",B.comment="";;){if(Y(B)==="#")for(;Y(B)!==\` \`&&Y(B)!=="";)B.comment+=Y(B),$(B);if(b.isWhitespace(Y(B),B.nestingLevel))$(B);else break}if(Y(B)===""){B.tokenType=E.DELIMITER;return}if(Y(B)===\` \`&&!B.nestingLevel){B.tokenType=E.DELIMITER,B.token=Y(B),$(B);return}var Q=Y(B),ve=L(B,2),Be=L(B,3);if(Be.length===3&&S[Be]){B.tokenType=E.DELIMITER,B.token=Be,$(B),$(B),$(B);return}if(ve.length===2&&S[ve]){B.tokenType=E.DELIMITER,B.token=ve,$(B),$(B);return}if(S[Q]){B.tokenType=E.DELIMITER,B.token=Q,$(B);return}if(b.isDigitDot(Q)){B.tokenType=E.NUMBER;var er=L(B,2);if(er==="0b"||er==="0o"||er==="0x"){for(B.token+=Y(B),$(B),B.token+=Y(B),$(B);b.isHexDigit(Y(B));)B.token+=Y(B),$(B);if(Y(B)===".")for(B.token+=".",$(B);b.isHexDigit(Y(B));)B.token+=Y(B),$(B);else if(Y(B)==="i")for(B.token+="i",$(B);b.isDigit(Y(B));)B.token+=Y(B),$(B);return}if(Y(B)==="."){if(B.token+=Y(B),$(B),!b.isDigit(Y(B))){B.tokenType=E.DELIMITER;return}}else{for(;b.isDigit(Y(B));)B.token+=Y(B),$(B);b.isDecimalMark(Y(B),q(B))&&(B.token+=Y(B),$(B))}for(;b.isDigit(Y(B));)B.token+=Y(B),$(B);if(Y(B)==="E"||Y(B)==="e"){if(b.isDigit(q(B))||q(B)==="-"||q(B)==="+"){if(B.token+=Y(B),$(B),(Y(B)==="+"||Y(B)==="-")&&(B.token+=Y(B),$(B)),!b.isDigit(Y(B)))throw Pe(B,'Digit expected, got "'+Y(B)+'"');for(;b.isDigit(Y(B));)B.token+=Y(B),$(B);if(b.isDecimalMark(Y(B),q(B)))throw Pe(B,'Digit expected, got "'+Y(B)+'"')}else if(q(B)===".")throw $(B),Pe(B,'Digit expected, got "'+Y(B)+'"')}return}if(b.isAlpha(Y(B),V(B),q(B))){for(;b.isAlpha(Y(B),V(B),q(B))||b.isDigit(Y(B));)B.token+=Y(B),$(B);$e(O,B.token)?B.tokenType=E.DELIMITER:B.tokenType=E.SYMBOL;return}for(B.tokenType=E.UNKNOWN;Y(B)!=="";)B.token+=Y(B),$(B);throw Pe(B,'Syntax error in part "'+B.token+'"')}function j(B){do R(B);while(B.token===\` @@ -88484,16 +88493,16 @@ Arguments: \`+Array.prototype.slice.call(z).join("")+\` \`&&ve>0},b.isDecimalMark=function(Q,ve){return Q==="."&&ve!=="/"&&ve!=="*"&&ve!=="^"},b.isDigitDot=function(Q){return Q>="0"&&Q<="9"||Q==="."},b.isDigit=function(Q){return Q>="0"&&Q<="9"},b.isHexDigit=function(Q){return Q>="0"&&Q<="9"||Q>="a"&&Q<="f"||Q>="A"&&Q<="F"};function me(B,Q){var ve=k();Mt(ve,{expression:B,extraNodes:Q}),R(ve);var Be=ie(ve);if(ve.token!=="")throw ve.tokenType===E.DELIMITER?We(ve,"Unexpected operator "+ve.token):Pe(ve,'Unexpected part "'+ve.token+'"');return Be}function ie(B){var Q,ve=[],Be;for(B.token!==""&&B.token!==\` \`&&B.token!==";"&&(Q=H(B),B.comment&&(Q.comment=B.comment));B.token===\` \`||B.token===";";)ve.length===0&&Q&&(Be=B.token!==";",ve.push({node:Q,visible:Be})),R(B),B.token!==\` -\`&&B.token!==";"&&B.token!==""&&(Q=H(B),B.comment&&(Q.comment=B.comment),Be=B.token!==";",ve.push({node:Q,visible:Be}));return ve.length>0?new l(ve):(Q||(Q=new o(void 0),B.comment&&(Q.comment=B.comment)),Q)}function H(B){var Q,ve,Be,er,fr=ce(B);if(B.token==="="){if(rt(fr))return Q=fr.name,j(B),Be=H(B),new s(new C(Q),Be);if(Sn(fr))return j(B),Be=H(B),new s(fr.object,fr.index,Be);if(fn(fr)&&rt(fr.fn)&&(er=!0,ve=[],Q=fr.name,fr.args.forEach(function(Zr,_t){rt(Zr)?ve[_t]=Zr.name:er=!1}),er))return j(B),Be=H(B),new u(Q,ve,Be);throw Pe(B,"Invalid left hand side of assignment operator =")}return fr}function ce(B){for(var Q=Me(B);B.token==="?";){var ve=B.conditionalLevel;B.conditionalLevel=B.nestingLevel,j(B);var Be=Q,er=H(B);if(B.token!==":")throw Pe(B,"False part of conditional expression expected");B.conditionalLevel=null,j(B);var fr=H(B);Q=new f(Be,er,fr),B.conditionalLevel=ve}return Q}function Me(B){for(var Q=pe(B);B.token==="or";)j(B),Q=new x("or","or",[Q,pe(B)]);return Q}function pe(B){for(var Q=ge(B);B.token==="xor";)j(B),Q=new x("xor","xor",[Q,ge(B)]);return Q}function ge(B){for(var Q=Se(B);B.token==="and";)j(B),Q=new x("and","and",[Q,Se(B)]);return Q}function Se(B){for(var Q=xe(B);B.token==="|";)j(B),Q=new x("|","bitOr",[Q,xe(B)]);return Q}function xe(B){for(var Q=be(B);B.token==="^|";)j(B),Q=new x("^|","bitXor",[Q,be(B)]);return Q}function be(B){for(var Q=De(B);B.token==="&";)j(B),Q=new x("&","bitAnd",[Q,De(B)]);return Q}function De(B){for(var Q=[Ae(B)],ve=[],Be={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};$e(Be,B.token);){var er={name:B.token,fn:Be[B.token]};ve.push(er),j(B),Q.push(Ae(B))}return Q.length===1?Q[0]:Q.length===2?new x(ve[0].name,ve[0].fn,Q):new w(ve.map(fr=>fr.fn),Q)}function Ae(B){var Q,ve,Be,er;Q=ze(B);for(var fr={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};$e(fr,B.token);)ve=B.token,Be=fr[ve],j(B),er=[Q,ze(B)],Q=new x(ve,Be,er);return Q}function ze(B){var Q,ve,Be,er;Q=Ze(B);for(var fr={to:"to",in:"to"};$e(fr,B.token);)ve=B.token,Be=fr[ve],j(B),ve==="in"&&B.token===""?Q=new x("*","multiply",[Q,new C("in")],!0):(er=[Q,Ze(B)],Q=new x(ve,Be,er));return Q}function Ze(B){var Q,ve=[];if(B.token===":"?Q=new o(1):Q=K(B),B.token===":"&&B.conditionalLevel!==B.nestingLevel){for(ve.push(Q);B.token===":"&&ve.length<3;)j(B),B.token===")"||B.token==="]"||B.token===","||B.token===""?ve.push(new C("end")):ve.push(K(B));ve.length===3?Q=new y(ve[0],ve[2],ve[1]):Q=new y(ve[0],ve[1])}return Q}function K(B){var Q,ve,Be,er;Q=te(B);for(var fr={"+":"add","-":"subtract"};$e(fr,B.token);){ve=B.token,Be=fr[ve],j(B);var Zr=te(B);Zr.isPercentage?er=[Q,new x("*","multiply",[Q,Zr])]:er=[Q,Zr],Q=new x(ve,Be,er)}return Q}function te(B){var Q,ve,Be,er;Q=ye(B),ve=Q;for(var fr={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide"};$e(fr,B.token);)Be=B.token,er=fr[Be],j(B),ve=ye(B),Q=new x(Be,er,[Q,ve]);return Q}function ye(B){var Q,ve;for(Q=ee(B),ve=Q;B.tokenType===E.SYMBOL||B.token==="in"&&yr(Q)||B.tokenType===E.NUMBER&&!yr(ve)&&(!ut(ve)||ve.op==="!")||B.token==="(";)ve=ee(B),Q=new x("*","multiply",[Q,ve],!0);return Q}function ee(B){for(var Q=ne(B),ve=Q,Be=[];B.token==="/"&&df(ve);)if(Be.push(Mt({},B)),j(B),B.tokenType===E.NUMBER)if(Be.push(Mt({},B)),j(B),B.tokenType===E.SYMBOL||B.token==="(")Mt(B,Be.pop()),Be.pop(),ve=ne(B),Q=new x("/","divide",[Q,ve]);else{Be.pop(),Mt(B,Be.pop());break}else{Mt(B,Be.pop());break}return Q}function ne(B){var Q,ve,Be,er;Q=ue(B);for(var fr={"%":"mod",mod:"mod"};$e(fr,B.token);)ve=B.token,Be=fr[ve],j(B),ve==="%"&&B.tokenType===E.DELIMITER&&B.token!=="("?Q=new x("/","divide",[Q,new o(100)],!1,!0):(er=[Q,ue(B)],Q=new x(ve,Be,er));return Q}function ue(B){var Q,ve,Be,er={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return $e(er,B.token)?(Be=er[B.token],Q=B.token,j(B),ve=[ue(B)],new x(Q,Be,ve)):Ee(B)}function Ee(B){var Q,ve,Be,er;return Q=Ce(B),(B.token==="^"||B.token===".^")&&(ve=B.token,Be=ve==="^"?"pow":"dotPow",j(B),er=[Q,ue(B)],Q=new x(ve,Be,er)),Q}function Ce(B){var Q,ve,Be,er;Q=Le(B);for(var fr={"!":"factorial","'":"ctranspose"};$e(fr,B.token);)ve=B.token,Be=fr[ve],R(B),er=[Q],Q=new x(ve,Be,er),Q=sr(B,Q);return Q}function Le(B){var Q=[];if(B.tokenType===E.SYMBOL&&$e(B.extraNodes,B.token)){var ve=B.extraNodes[B.token];if(R(B),B.token==="("){if(Q=[],U(B),R(B),B.token!==")")for(Q.push(H(B));B.token===",";)R(B),Q.push(H(B));if(B.token!==")")throw Pe(B,"Parenthesis ) expected");oe(B),R(B)}return new ve(Q)}return Ie(B)}function Ie(B){var Q,ve;return B.tokenType===E.SYMBOL||B.tokenType===E.DELIMITER&&B.token in O?(ve=B.token,R(B),$e(F,ve)?Q=new o(F[ve]):M.indexOf(ve)!==-1?Q=new o(t(ve,"number")):Q=new C(ve),Q=sr(B,Q),Q):ir(B)}function sr(B,Q,ve){for(var Be;(B.token==="("||B.token==="["||B.token===".")&&(!ve||ve.indexOf(B.token)!==-1);)if(Be=[],B.token==="(")if(rt(Q)||Sn(Q)){if(U(B),R(B),B.token!==")")for(Be.push(H(B));B.token===",";)R(B),Be.push(H(B));if(B.token!==")")throw Pe(B,"Parenthesis ) expected");oe(B),R(B),Q=new p(Q,Be)}else return Q;else if(B.token==="["){if(U(B),R(B),B.token!=="]")for(Be.push(H(B));B.token===",";)R(B),Be.push(H(B));if(B.token!=="]")throw Pe(B,"Parenthesis ] expected");oe(B),R(B),Q=new i(Q,new h(Be))}else{R(B);var er=B.tokenType===E.SYMBOL||B.tokenType===E.DELIMITER&&B.token in O;if(!er)throw Pe(B,"Property name expected after dot");Be.push(new o(B.token)),R(B);var fr=!0;Q=new i(Q,new h(Be,fr))}return Q}function ir(B){var Q,ve;return B.token==='"'||B.token==="'"?(ve=Xe(B,B.token),Q=new o(ve),Q=sr(B,Q),Q):Or(B)}function Xe(B,Q){for(var ve="";Y(B)!==""&&Y(B)!==Q;)if(Y(B)==="\\\\"){$(B);var Be=Y(B),er=_[Be];if(er!==void 0)ve+=er,B.index+=1;else if(Be==="u"){var fr=B.expression.slice(B.index+1,B.index+5);if(/^[0-9A-Fa-f]{4}$/.test(fr))ve+=String.fromCharCode(parseInt(fr,16)),B.index+=5;else throw Pe(B,"Invalid unicode character \\\\u".concat(fr))}else throw Pe(B,"Bad escape character \\\\".concat(Be))}else ve+=Y(B),$(B);if(R(B),B.token!==Q)throw Pe(B,"End of string ".concat(Q," expected"));return R(B),ve}function Or(B){var Q,ve,Be,er;if(B.token==="["){if(U(B),R(B),B.token!=="]"){var fr=re(B);if(B.token===";"){for(Be=1,ve=[fr];B.token===";";)R(B),B.token!=="]"&&(ve[Be]=re(B),Be++);if(B.token!=="]")throw Pe(B,"End of matrix ] expected");oe(B),R(B),er=ve[0].items.length;for(var Zr=1;Zr{var{typed:r,parse:t}=e;return r(Q2,{string:function(i){return t(i).compile()},"Array | Matrix":function(i){return Je(i,function(a){return t(a).compile()})}})});var J2="evaluate",gz=["typed","parse"],K2=T(J2,gz,e=>{var{typed:r,parse:t}=e;return r(J2,{string:function(i){var a=go();return t(i).compile().evaluate(a)},"string, Map | Object":function(i,a){return t(i).compile().evaluate(a)},"Array | Matrix":function(i){var a=go();return Je(i,function(s){return t(s).compile().evaluate(a)})},"Array | Matrix, Map | Object":function(i,a){return Je(i,function(s){return t(s).compile().evaluate(a)})}})});var xz="Parser",yz=["evaluate"],j2=T(xz,yz,e=>{var{evaluate:r}=e;function t(){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");Object.defineProperty(this,"scope",{value:go(),writable:!1})}return t.prototype.type="Parser",t.prototype.isParser=!0,t.prototype.evaluate=function(n){return r(n,this.scope)},t.prototype.get=function(n){if(this.scope.has(n))return this.scope.get(n)},t.prototype.getAll=function(){return Oy(this.scope)},t.prototype.getAllAsMap=function(){return this.scope},t.prototype.set=function(n,i){return this.scope.set(n,i),i},t.prototype.remove=function(n){this.scope.delete(n)},t.prototype.clear=function(){this.scope.clear()},t},{isClass:!0});var eA="parser",bz=["typed","Parser"],rA=T(eA,bz,e=>{var{typed:r,Parser:t}=e;return r(eA,{"":function(){return new t}})});var tA="lup",wz=["typed","matrix","abs","addScalar","divideScalar","multiplyScalar","subtractScalar","larger","equalScalar","unaryMinus","DenseMatrix","SparseMatrix","Spa"],nA=T(tA,wz,e=>{var{typed:r,matrix:t,abs:n,addScalar:i,divideScalar:a,multiplyScalar:s,subtractScalar:l,larger:f,equalScalar:o,unaryMinus:u,DenseMatrix:p,SparseMatrix:h,Spa:d}=e;return r(tA,{DenseMatrix:function(w){return x(w)},SparseMatrix:function(w){return v(w)},Array:function(w){var C=t(w),b=x(C);return{L:b.L.valueOf(),U:b.U.valueOf(),p:b.p}}});function x(y){var w=y._size[0],C=y._size[1],b=Math.min(w,C),A=tr(y._data),E=[],S=[w,b],O=[],F=[b,C],M,_,k,L=[];for(M=0;M0)for(M=0;M0?new l(ve):(Q||(Q=new o(void 0),B.comment&&(Q.comment=B.comment)),Q)}function H(B){var Q,ve,Be,er,fr=ce(B);if(B.token==="="){if(rt(fr))return Q=fr.name,j(B),Be=H(B),new s(new C(Q),Be);if(Sn(fr))return j(B),Be=H(B),new s(fr.object,fr.index,Be);if(fn(fr)&&rt(fr.fn)&&(er=!0,ve=[],Q=fr.name,fr.args.forEach(function(Zr,_t){rt(Zr)?ve[_t]=Zr.name:er=!1}),er))return j(B),Be=H(B),new u(Q,ve,Be);throw Pe(B,"Invalid left hand side of assignment operator =")}return fr}function ce(B){for(var Q=Me(B);B.token==="?";){var ve=B.conditionalLevel;B.conditionalLevel=B.nestingLevel,j(B);var Be=Q,er=H(B);if(B.token!==":")throw Pe(B,"False part of conditional expression expected");B.conditionalLevel=null,j(B);var fr=H(B);Q=new f(Be,er,fr),B.conditionalLevel=ve}return Q}function Me(B){for(var Q=pe(B);B.token==="or";)j(B),Q=new x("or","or",[Q,pe(B)]);return Q}function pe(B){for(var Q=ge(B);B.token==="xor";)j(B),Q=new x("xor","xor",[Q,ge(B)]);return Q}function ge(B){for(var Q=Se(B);B.token==="and";)j(B),Q=new x("and","and",[Q,Se(B)]);return Q}function Se(B){for(var Q=xe(B);B.token==="|";)j(B),Q=new x("|","bitOr",[Q,xe(B)]);return Q}function xe(B){for(var Q=be(B);B.token==="^|";)j(B),Q=new x("^|","bitXor",[Q,be(B)]);return Q}function be(B){for(var Q=De(B);B.token==="&";)j(B),Q=new x("&","bitAnd",[Q,De(B)]);return Q}function De(B){for(var Q=[Ae(B)],ve=[],Be={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};$e(Be,B.token);){var er={name:B.token,fn:Be[B.token]};ve.push(er),j(B),Q.push(Ae(B))}return Q.length===1?Q[0]:Q.length===2?new x(ve[0].name,ve[0].fn,Q):new w(ve.map(fr=>fr.fn),Q)}function Ae(B){var Q,ve,Be,er;Q=ze(B);for(var fr={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};$e(fr,B.token);)ve=B.token,Be=fr[ve],j(B),er=[Q,ze(B)],Q=new x(ve,Be,er);return Q}function ze(B){var Q,ve,Be,er;Q=Ze(B);for(var fr={to:"to",in:"to"};$e(fr,B.token);)ve=B.token,Be=fr[ve],j(B),ve==="in"&&B.token===""?Q=new x("*","multiply",[Q,new C("in")],!0):(er=[Q,Ze(B)],Q=new x(ve,Be,er));return Q}function Ze(B){var Q,ve=[];if(B.token===":"?Q=new o(1):Q=K(B),B.token===":"&&B.conditionalLevel!==B.nestingLevel){for(ve.push(Q);B.token===":"&&ve.length<3;)j(B),B.token===")"||B.token==="]"||B.token===","||B.token===""?ve.push(new C("end")):ve.push(K(B));ve.length===3?Q=new y(ve[0],ve[2],ve[1]):Q=new y(ve[0],ve[1])}return Q}function K(B){var Q,ve,Be,er;Q=te(B);for(var fr={"+":"add","-":"subtract"};$e(fr,B.token);){ve=B.token,Be=fr[ve],j(B);var Zr=te(B);Zr.isPercentage?er=[Q,new x("*","multiply",[Q,Zr])]:er=[Q,Zr],Q=new x(ve,Be,er)}return Q}function te(B){var Q,ve,Be,er;Q=ye(B),ve=Q;for(var fr={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide"};$e(fr,B.token);)Be=B.token,er=fr[Be],j(B),ve=ye(B),Q=new x(Be,er,[Q,ve]);return Q}function ye(B){var Q,ve;for(Q=ee(B),ve=Q;B.tokenType===E.SYMBOL||B.token==="in"&&yr(Q)||B.tokenType===E.NUMBER&&!yr(ve)&&(!ut(ve)||ve.op==="!")||B.token==="(";)ve=ee(B),Q=new x("*","multiply",[Q,ve],!0);return Q}function ee(B){for(var Q=ne(B),ve=Q,Be=[];B.token==="/"&&vf(ve);)if(Be.push(Mt({},B)),j(B),B.tokenType===E.NUMBER)if(Be.push(Mt({},B)),j(B),B.tokenType===E.SYMBOL||B.token==="(")Mt(B,Be.pop()),Be.pop(),ve=ne(B),Q=new x("/","divide",[Q,ve]);else{Be.pop(),Mt(B,Be.pop());break}else{Mt(B,Be.pop());break}return Q}function ne(B){var Q,ve,Be,er;Q=ue(B);for(var fr={"%":"mod",mod:"mod"};$e(fr,B.token);)ve=B.token,Be=fr[ve],j(B),ve==="%"&&B.tokenType===E.DELIMITER&&B.token!=="("?Q=new x("/","divide",[Q,new o(100)],!1,!0):(er=[Q,ue(B)],Q=new x(ve,Be,er));return Q}function ue(B){var Q,ve,Be,er={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return $e(er,B.token)?(Be=er[B.token],Q=B.token,j(B),ve=[ue(B)],new x(Q,Be,ve)):Ee(B)}function Ee(B){var Q,ve,Be,er;return Q=Ce(B),(B.token==="^"||B.token===".^")&&(ve=B.token,Be=ve==="^"?"pow":"dotPow",j(B),er=[Q,ue(B)],Q=new x(ve,Be,er)),Q}function Ce(B){var Q,ve,Be,er;Q=Le(B);for(var fr={"!":"factorial","'":"ctranspose"};$e(fr,B.token);)ve=B.token,Be=fr[ve],R(B),er=[Q],Q=new x(ve,Be,er),Q=sr(B,Q);return Q}function Le(B){var Q=[];if(B.tokenType===E.SYMBOL&&$e(B.extraNodes,B.token)){var ve=B.extraNodes[B.token];if(R(B),B.token==="("){if(Q=[],U(B),R(B),B.token!==")")for(Q.push(H(B));B.token===",";)R(B),Q.push(H(B));if(B.token!==")")throw Pe(B,"Parenthesis ) expected");oe(B),R(B)}return new ve(Q)}return Ie(B)}function Ie(B){var Q,ve;return B.tokenType===E.SYMBOL||B.tokenType===E.DELIMITER&&B.token in O?(ve=B.token,R(B),$e(F,ve)?Q=new o(F[ve]):M.indexOf(ve)!==-1?Q=new o(t(ve,"number")):Q=new C(ve),Q=sr(B,Q),Q):ir(B)}function sr(B,Q,ve){for(var Be;(B.token==="("||B.token==="["||B.token===".")&&(!ve||ve.indexOf(B.token)!==-1);)if(Be=[],B.token==="(")if(rt(Q)||Sn(Q)){if(U(B),R(B),B.token!==")")for(Be.push(H(B));B.token===",";)R(B),Be.push(H(B));if(B.token!==")")throw Pe(B,"Parenthesis ) expected");oe(B),R(B),Q=new p(Q,Be)}else return Q;else if(B.token==="["){if(U(B),R(B),B.token!=="]")for(Be.push(H(B));B.token===",";)R(B),Be.push(H(B));if(B.token!=="]")throw Pe(B,"Parenthesis ] expected");oe(B),R(B),Q=new i(Q,new h(Be))}else{R(B);var er=B.tokenType===E.SYMBOL||B.tokenType===E.DELIMITER&&B.token in O;if(!er)throw Pe(B,"Property name expected after dot");Be.push(new o(B.token)),R(B);var fr=!0;Q=new i(Q,new h(Be,fr))}return Q}function ir(B){var Q,ve;return B.token==='"'||B.token==="'"?(ve=Xe(B,B.token),Q=new o(ve),Q=sr(B,Q),Q):Or(B)}function Xe(B,Q){for(var ve="";Y(B)!==""&&Y(B)!==Q;)if(Y(B)==="\\\\"){$(B);var Be=Y(B),er=_[Be];if(er!==void 0)ve+=er,B.index+=1;else if(Be==="u"){var fr=B.expression.slice(B.index+1,B.index+5);if(/^[0-9A-Fa-f]{4}$/.test(fr))ve+=String.fromCharCode(parseInt(fr,16)),B.index+=5;else throw Pe(B,"Invalid unicode character \\\\u".concat(fr))}else throw Pe(B,"Bad escape character \\\\".concat(Be))}else ve+=Y(B),$(B);if(R(B),B.token!==Q)throw Pe(B,"End of string ".concat(Q," expected"));return R(B),ve}function Or(B){var Q,ve,Be,er;if(B.token==="["){if(U(B),R(B),B.token!=="]"){var fr=re(B);if(B.token===";"){for(Be=1,ve=[fr];B.token===";";)R(B),B.token!=="]"&&(ve[Be]=re(B),Be++);if(B.token!=="]")throw Pe(B,"End of matrix ] expected");oe(B),R(B),er=ve[0].items.length;for(var Zr=1;Zr{var{typed:r,parse:t}=e;return r(X2,{string:function(i){return t(i).compile()},"Array | Matrix":function(i){return Je(i,function(a){return t(a).compile()})}})});var K2="evaluate",xz=["typed","parse"],j2=T(K2,xz,e=>{var{typed:r,parse:t}=e;return r(K2,{string:function(i){var a=go();return t(i).compile().evaluate(a)},"string, Map | Object":function(i,a){return t(i).compile().evaluate(a)},"Array | Matrix":function(i){var a=go();return Je(i,function(s){return t(s).compile().evaluate(a)})},"Array | Matrix, Map | Object":function(i,a){return Je(i,function(s){return t(s).compile().evaluate(a)})}})});var yz="Parser",bz=["evaluate"],eA=T(yz,bz,e=>{var{evaluate:r}=e;function t(){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");Object.defineProperty(this,"scope",{value:go(),writable:!1})}return t.prototype.type="Parser",t.prototype.isParser=!0,t.prototype.evaluate=function(n){return r(n,this.scope)},t.prototype.get=function(n){if(this.scope.has(n))return this.scope.get(n)},t.prototype.getAll=function(){return By(this.scope)},t.prototype.getAllAsMap=function(){return this.scope},t.prototype.set=function(n,i){return this.scope.set(n,i),i},t.prototype.remove=function(n){this.scope.delete(n)},t.prototype.clear=function(){this.scope.clear()},t},{isClass:!0});var rA="parser",wz=["typed","Parser"],tA=T(rA,wz,e=>{var{typed:r,Parser:t}=e;return r(rA,{"":function(){return new t}})});var nA="lup",Dz=["typed","matrix","abs","addScalar","divideScalar","multiplyScalar","subtractScalar","larger","equalScalar","unaryMinus","DenseMatrix","SparseMatrix","Spa"],iA=T(nA,Dz,e=>{var{typed:r,matrix:t,abs:n,addScalar:i,divideScalar:a,multiplyScalar:s,subtractScalar:l,larger:f,equalScalar:o,unaryMinus:u,DenseMatrix:p,SparseMatrix:h,Spa:d}=e;return r(nA,{DenseMatrix:function(w){return x(w)},SparseMatrix:function(w){return v(w)},Array:function(w){var C=t(w),b=x(C);return{L:b.L.valueOf(),U:b.U.valueOf(),p:b.p}}});function x(y){var w=y._size[0],C=y._size[1],b=Math.min(w,C),A=tr(y._data),E=[],S=[w,b],O=[],F=[b,C],M,_,k,L=[];for(M=0;M0)for(M=0;M0&&H.forEach(0,q-1,function(xe,be){h._forEachRow(xe,O,F,M,function(De,Ae){De>xe&&H.accumulate(De,u(s(Ae,be)))})});var pe=q,ge=H.get(q),Se=n(ge);H.forEach(q+1,w-1,function(xe,be){var De=n(be);f(De,Se)&&(pe=xe,Se=De,ge=be)}),q!==pe&&(h._swapRows(q,pe,_[1],O,F,M),h._swapRows(q,pe,$[1],k,L,Y),H.swap(q,pe),oe(q,pe)),H.forEach(0,w-1,function(xe,be){xe<=q?(k.push(be),L.push(xe)):(be=a(be,ge),o(be,0)||(O.push(be),F.push(xe)))})};for(q=0;q{var{typed:r,matrix:t,zeros:n,identity:i,isZero:a,equal:s,sign:l,sqrt:f,conj:o,unaryMinus:u,addScalar:p,divideScalar:h,multiplyScalar:d,subtractScalar:x,complex:v}=e;return Mt(r(iA,{DenseMatrix:function(A){return w(A)},SparseMatrix:function(A){return C(A)},Array:function(A){var E=t(A),S=w(E);return{Q:S.Q.valueOf(),R:S.R.valueOf()}}}),{_denseQRimpl:y});function y(b){var A=b._size[0],E=b._size[1],S=i([A],"dense"),O=S._data,F=b.clone(),M=F._data,_,k,L,Y=n([A],"");for(L=0;L0)for(var S=E[0][0].type==="Complex"?v(0):0,O=0;O=0;){var f=t[s+l],o=t[n+f];o===-1?(l--,a[r++]=f):(t[n+f]=t[i+o],++l,t[s+l]=o)}return r}function sA(e,r){if(!e)return null;var t=0,n,i=[],a=[],s=0,l=r,f=2*r;for(n=0;n=0;n--)e[n]!==-1&&(a[l+n]=a[s+e[n]],a[s+e[n]]=n);for(n=0;n{var{add:r,multiply:t,transpose:n}=e;return function(u,p){if(!p||u<=0||u>3)return null;var h=p._size,d=h[0],x=h[1],v=0,y=Math.max(16,10*Math.sqrt(x));y=Math.min(x-2,y);var w=i(u,p,d,x,y);fA(w,f,null);for(var C=w._index,b=w._ptr,A=b[x],E=[],S=[],O=0,F=x+1,M=2*(x+1),_=3*(x+1),k=4*(x+1),L=5*(x+1),Y=6*(x+1),$=7*(x+1),V=E,q=a(x,b,S,O,_,V,M,$,F,Y,k,L),R=s(x,b,S,L,k,Y,y,F,_,V,M),j=0,U,oe,me,ie,H,ce,Me,pe,ge,Se,xe,be,De,Ae,ze,Ze;RK?(ce=me,Me=ee,pe=S[O+me]-K):(ce=C[ee++],Me=b[ce],pe=S[O+ce]),H=1;H<=pe;H++)U=C[Me++],!((ge=S[F+U])<=0)&&(ye+=ge,S[F+U]=-ge,C[ue++]=U,S[M+U]!==-1&&(V[S[M+U]]=V[U]),V[U]!==-1?S[M+V[U]]=S[M+U]:S[_+S[L+U]]=S[M+U]);ce!==me&&(b[ce]=Gi(me),S[Y+ce]=0)}for(K!==0&&(A=ue),S[L+me]=ye,b[me]=ne,S[O+me]=ue-ne,S[k+me]=-2,q=l(q,v,S,Y,x),Se=ne;Se=q?S[Y+ce]-=ge:S[Y+ce]!==0&&(S[Y+ce]=S[L+ce]+Ee)}for(Se=ne;Se0?(Ze+=Ce,C[Ae++]=ce,ze+=ce):(b[ce]=Gi(me),S[Y+ce]=0)}S[k+U]=Ae-be+1;var Le=Ae,Ie=be+S[O+U];for(ee=De+1;ee=0))for(ze=V[U],U=S[$+ze],S[$+ze]=-1;U!==-1&&S[M+U]!==-1;U=S[M+U],q++){for(pe=S[O+U],xe=S[k+U],ee=b[U]+1;ee<=b[U]+pe-1;ee++)S[Y+C[ee]]=q;var ir=U;for(oe=S[M+U];oe!==-1;){var Xe=S[O+oe]===pe&&S[k+oe]===xe;for(ee=b[oe]+1;Xe&&ee<=b[oe]+pe-1;ee++)S[Y+C[ee]]!==q&&(Xe=0);Xe?(b[oe]=Gi(U),S[F+U]+=S[F+oe],S[F+oe]=0,S[k+oe]=-1,oe=S[M+oe],S[M+ir]=oe):(ir=oe,oe=S[M+oe])}}for(ee=ne,Se=ne;Se=0;oe--)S[F+oe]>0||(S[M+oe]=S[_+b[oe]],S[_+b[oe]]=oe);for(ce=x;ce>=0;ce--)S[F+ce]<=0||b[ce]!==-1&&(S[M+ce]=S[_+b[ce]],S[_+b[ce]]=ce);for(me=0,U=0;U<=x;U++)b[U]===-1&&(me=Ip(U,me,S,_,M,E,Y));return E.splice(E.length-1,1),E};function i(o,u,p,h,d){var x=n(u);if(o===1&&h===p)return r(u,x);if(o===2){for(var v=x._index,y=x._ptr,w=0,C=0;Cd))for(var A=y[C+1];bv)p[y+E]=0,p[d+E]=-1,A++,u[E]=Gi(o),p[y+o]++;else{var O=p[w+S];O!==-1&&(C[O]=E),p[b+E]=p[w+S],p[w+S]=E}}return A}function l(o,u,p,h,d){if(o<2||o+u<0){for(var x=0;x{var{transpose:r}=e;return function(t,n,i,a){if(!t||!n||!i)return null;var s=t._size,l=s[0],f=s[1],o,u,p,h,d,x,v,y=4*f+(a?f+l+1:0),w=[],C=0,b=f,A=2*f,E=3*f,S=4*f,O=5*f+1;for(p=0;p=1&&F[u]++,L.jleaf===2&&F[L.q]--}n[u]!==-1&&(w[C+u]=n[u])}for(u=0;u{var{add:r,multiply:t,transpose:n}=e,i=lA({add:r,multiply:t,transpose:n}),a=pA({transpose:n});return function(f,o,u){var p=o._ptr,h=o._size,d=h[1],x,v={};if(v.q=i(f,o),f&&!v.q)return null;if(u){var y=f?oA(o,null,v.q,0):o;v.parent=uA(y,1);var w=sA(v.parent,d);if(v.cp=a(y,v.parent,w,1),y&&v.parent&&v.cp&&s(y,v))for(v.unz=0,x=0;x=0;O--)for(M=o[O],_=o[O+1],F=M;F<_;F++)y[u[F]]=O;for(S=h-1;S>=0;S--)v[S]=-1,O=y[S],O!==-1&&(w[E+O]++===0&&(w[A+O]=S),w[C+S]=w[b+O],w[b+O]=S);for(f.lnz=0,f.m2=h,O=0;O=0;){e=n[h];var d=i?i[e]:e;Cf(s,e)||(Pp(s,e),n[f+h]=d<0?0:dg(s[d]));var x=1;for(u=n[f+h],p=d<0?0:dg(s[d+1]);u{var{divideScalar:r,multiply:t,subtract:n}=e;return function(a,s,l,f,o,u,p){var h=a._values,d=a._index,x=a._ptr,v=a._size,y=v[1],w=s._values,C=s._index,b=s._ptr,A,E,S,O,F=dA(a,s,l,f,u);for(A=F;A{var{abs:r,divideScalar:t,multiply:n,subtract:i,larger:a,largerEq:s,SparseMatrix:l}=e,f=vA({divideScalar:t,multiply:n,subtract:i});return function(u,p,h){if(!u)return null;var d=u._size,x=d[1],v,y=100,w=100;p&&(v=p.q,y=p.lnz||y,w=p.unz||w);var C=[],b=[],A=[],E=new l({values:C,index:b,ptr:A,size:[x,x]}),S=[],O=[],F=[],M=new l({values:S,index:O,ptr:F,size:[x,x]}),_=[],k,L,Y=[],$=[];for(k=0;k{var{typed:r,abs:t,add:n,multiply:i,transpose:a,divideScalar:s,subtract:l,larger:f,largerEq:o,SparseMatrix:u}=e,p=mA({add:n,multiply:i,transpose:a}),h=gA({abs:t,divideScalar:s,multiply:i,subtract:l,larger:f,largerEq:o,SparseMatrix:u});return r(xA,{"SparseMatrix, number, number":function(x,v,y){if(!He(v)||v<0||v>3)throw new Error("Symbolic Ordering and Analysis order must be an integer number in the interval [0, 3]");if(y<0||y>1)throw new Error("Partial pivoting threshold must be a number from 0 to 1");var w=p(v,x,!1),C=h(x,w,y);return{L:C.L,U:C.U,p:C.pinv,q:w.q,toString:function(){return"L: "+this.L.toString()+\` +P: \`+this.p}}}});var aA="qr",Sz=["typed","matrix","zeros","identity","isZero","equal","sign","sqrt","conj","unaryMinus","addScalar","divideScalar","multiplyScalar","subtractScalar","complex"],oA=T(aA,Sz,e=>{var{typed:r,matrix:t,zeros:n,identity:i,isZero:a,equal:s,sign:l,sqrt:f,conj:o,unaryMinus:u,addScalar:p,divideScalar:h,multiplyScalar:d,subtractScalar:x,complex:v}=e;return Mt(r(aA,{DenseMatrix:function(A){return w(A)},SparseMatrix:function(A){return C(A)},Array:function(A){var E=t(A),S=w(E);return{Q:S.Q.valueOf(),R:S.R.valueOf()}}}),{_denseQRimpl:y});function y(b){var A=b._size[0],E=b._size[1],S=i([A],"dense"),O=S._data,F=b.clone(),M=F._data,_,k,L,Y=n([A],"");for(L=0;L0)for(var S=E[0][0].type==="Complex"?v(0):0,O=0;O=0;){var f=t[s+l],o=t[n+f];o===-1?(l--,a[r++]=f):(t[n+f]=t[i+o],++l,t[s+l]=o)}return r}function uA(e,r){if(!e)return null;var t=0,n,i=[],a=[],s=0,l=r,f=2*r;for(n=0;n=0;n--)e[n]!==-1&&(a[l+n]=a[s+e[n]],a[s+e[n]]=n);for(n=0;n{var{add:r,multiply:t,transpose:n}=e;return function(u,p){if(!p||u<=0||u>3)return null;var h=p._size,d=h[0],x=h[1],v=0,y=Math.max(16,10*Math.sqrt(x));y=Math.min(x-2,y);var w=i(u,p,d,x,y);lA(w,f,null);for(var C=w._index,b=w._ptr,A=b[x],E=[],S=[],O=0,F=x+1,M=2*(x+1),_=3*(x+1),k=4*(x+1),L=5*(x+1),Y=6*(x+1),$=7*(x+1),V=E,q=a(x,b,S,O,_,V,M,$,F,Y,k,L),R=s(x,b,S,L,k,Y,y,F,_,V,M),j=0,U,oe,me,ie,H,ce,Me,pe,ge,Se,xe,be,De,Ae,ze,Ze;RK?(ce=me,Me=ee,pe=S[O+me]-K):(ce=C[ee++],Me=b[ce],pe=S[O+ce]),H=1;H<=pe;H++)U=C[Me++],!((ge=S[F+U])<=0)&&(ye+=ge,S[F+U]=-ge,C[ue++]=U,S[M+U]!==-1&&(V[S[M+U]]=V[U]),V[U]!==-1?S[M+V[U]]=S[M+U]:S[_+S[L+U]]=S[M+U]);ce!==me&&(b[ce]=Gi(me),S[Y+ce]=0)}for(K!==0&&(A=ue),S[L+me]=ye,b[me]=ne,S[O+me]=ue-ne,S[k+me]=-2,q=l(q,v,S,Y,x),Se=ne;Se=q?S[Y+ce]-=ge:S[Y+ce]!==0&&(S[Y+ce]=S[L+ce]+Ee)}for(Se=ne;Se0?(Ze+=Ce,C[Ae++]=ce,ze+=ce):(b[ce]=Gi(me),S[Y+ce]=0)}S[k+U]=Ae-be+1;var Le=Ae,Ie=be+S[O+U];for(ee=De+1;ee=0))for(ze=V[U],U=S[$+ze],S[$+ze]=-1;U!==-1&&S[M+U]!==-1;U=S[M+U],q++){for(pe=S[O+U],xe=S[k+U],ee=b[U]+1;ee<=b[U]+pe-1;ee++)S[Y+C[ee]]=q;var ir=U;for(oe=S[M+U];oe!==-1;){var Xe=S[O+oe]===pe&&S[k+oe]===xe;for(ee=b[oe]+1;Xe&&ee<=b[oe]+pe-1;ee++)S[Y+C[ee]]!==q&&(Xe=0);Xe?(b[oe]=Gi(U),S[F+U]+=S[F+oe],S[F+oe]=0,S[k+oe]=-1,oe=S[M+oe],S[M+ir]=oe):(ir=oe,oe=S[M+oe])}}for(ee=ne,Se=ne;Se=0;oe--)S[F+oe]>0||(S[M+oe]=S[_+b[oe]],S[_+b[oe]]=oe);for(ce=x;ce>=0;ce--)S[F+ce]<=0||b[ce]!==-1&&(S[M+ce]=S[_+b[ce]],S[_+b[ce]]=ce);for(me=0,U=0;U<=x;U++)b[U]===-1&&(me=kp(U,me,S,_,M,E,Y));return E.splice(E.length-1,1),E};function i(o,u,p,h,d){var x=n(u);if(o===1&&h===p)return r(u,x);if(o===2){for(var v=x._index,y=x._ptr,w=0,C=0;Cd))for(var A=y[C+1];bv)p[y+E]=0,p[d+E]=-1,A++,u[E]=Gi(o),p[y+o]++;else{var O=p[w+S];O!==-1&&(C[O]=E),p[b+E]=p[w+S],p[w+S]=E}}return A}function l(o,u,p,h,d){if(o<2||o+u<0){for(var x=0;x{var{transpose:r}=e;return function(t,n,i,a){if(!t||!n||!i)return null;var s=t._size,l=s[0],f=s[1],o,u,p,h,d,x,v,y=4*f+(a?f+l+1:0),w=[],C=0,b=f,A=2*f,E=3*f,S=4*f,O=5*f+1;for(p=0;p=1&&F[u]++,L.jleaf===2&&F[L.q]--}n[u]!==-1&&(w[C+u]=n[u])}for(u=0;u{var{add:r,multiply:t,transpose:n}=e,i=cA({add:r,multiply:t,transpose:n}),a=mA({transpose:n});return function(f,o,u){var p=o._ptr,h=o._size,d=h[1],x,v={};if(v.q=i(f,o),f&&!v.q)return null;if(u){var y=f?sA(o,null,v.q,0):o;v.parent=fA(y,1);var w=uA(v.parent,d);if(v.cp=a(y,v.parent,w,1),y&&v.parent&&v.cp&&s(y,v))for(v.unz=0,x=0;x=0;O--)for(M=o[O],_=o[O+1],F=M;F<_;F++)y[u[F]]=O;for(S=h-1;S>=0;S--)v[S]=-1,O=y[S],O!==-1&&(w[E+O]++===0&&(w[A+O]=S),w[C+S]=w[b+O],w[b+O]=S);for(f.lnz=0,f.m2=h,O=0;O=0;){e=n[h];var d=i?i[e]:e;Mf(s,e)||(Rp(s,e),n[f+h]=d<0?0:vg(s[d]));var x=1;for(u=n[f+h],p=d<0?0:vg(s[d+1]);u{var{divideScalar:r,multiply:t,subtract:n}=e;return function(a,s,l,f,o,u,p){var h=a._values,d=a._index,x=a._ptr,v=a._size,y=v[1],w=s._values,C=s._index,b=s._ptr,A,E,S,O,F=vA(a,s,l,f,u);for(A=F;A{var{abs:r,divideScalar:t,multiply:n,subtract:i,larger:a,largerEq:s,SparseMatrix:l}=e,f=gA({divideScalar:t,multiply:n,subtract:i});return function(u,p,h){if(!u)return null;var d=u._size,x=d[1],v,y=100,w=100;p&&(v=p.q,y=p.lnz||y,w=p.unz||w);var C=[],b=[],A=[],E=new l({values:C,index:b,ptr:A,size:[x,x]}),S=[],O=[],F=[],M=new l({values:S,index:O,ptr:F,size:[x,x]}),_=[],k,L,Y=[],$=[];for(k=0;k{var{typed:r,abs:t,add:n,multiply:i,transpose:a,divideScalar:s,subtract:l,larger:f,largerEq:o,SparseMatrix:u}=e,p=hA({add:n,multiply:i,transpose:a}),h=xA({abs:t,divideScalar:s,multiply:i,subtract:l,larger:f,largerEq:o,SparseMatrix:u});return r(yA,{"SparseMatrix, number, number":function(x,v,y){if(!He(v)||v<0||v>3)throw new Error("Symbolic Ordering and Analysis order must be an integer number in the interval [0, 3]");if(y<0||y>1)throw new Error("Partial pivoting threshold must be a number from 0 to 1");var w=p(v,x,!1),C=h(x,w,y);return{L:C.L,U:C.U,p:C.pinv,q:w.q,toString:function(){return"L: "+this.L.toString()+\` U: \`+this.U.toString()+\` p: \`+this.p.toString()+(this.q?\` q: \`+this.q.toString():"")+\` -\`}}}})});function vg(e,r){var t,n=r.length,i=[];if(e)for(t=0;t{var{typed:r,matrix:t,lup:n,slu:i,usolve:a,lsolve:s,DenseMatrix:l}=e,f=ha({DenseMatrix:l});return r(bA,{"Array, Array | Matrix":function(h,d){h=t(h);var x=n(h),v=u(x.L,x.U,x.p,null,d);return v.valueOf()},"DenseMatrix, Array | Matrix":function(h,d){var x=n(h);return u(x.L,x.U,x.p,null,d)},"SparseMatrix, Array | Matrix":function(h,d){var x=n(h);return u(x.L,x.U,x.p,null,d)},"SparseMatrix, Array | Matrix, number, number":function(h,d,x,v){var y=i(h,x,v);return u(y.L,y.U,y.p,y.q,d)},"Object, Array | Matrix":function(h,d){return u(h.L,h.U,h.p,h.q,d)}});function o(p){if(Ge(p))return p;if(Ar(p))return t(p);throw new TypeError("Invalid Matrix LU decomposition")}function u(p,h,d,x,v){p=o(p),h=o(h),d&&(v=f(p,v,!0),v._data=vg(d,v._data));var y=s(p,v),w=a(h,y);return x&&(w._data=vg(x,w._data)),w}});var DA="polynomialRoot",Pz=["typed","isZero","equalScalar","add","subtract","multiply","divide","sqrt","unaryMinus","cbrt","typeOf","im","re"],SA=T(DA,Pz,e=>{var{typed:r,isZero:t,equalScalar:n,add:i,subtract:a,multiply:s,divide:l,sqrt:f,unaryMinus:o,cbrt:u,typeOf:p,im:h,re:d}=e;return r(DA,{"number|Complex, ...number|Complex":(x,v)=>{for(var y=[x,...v];y.length>0&&t(y[y.length-1]);)y.pop();if(y.length<2)throw new RangeError("Polynomial [".concat(x,", ").concat(v,"] must have a non-zero non-constant coefficient"));switch(y.length){case 2:return[o(l(y[0],y[1]))];case 3:{var[w,C,b]=y,A=s(2,b),E=s(C,C),S=s(4,b,w);if(n(E,S))return[l(o(C),A)];var O=f(a(E,S));return[l(a(O,C),A),l(a(o(O),C),A)]}case 4:{var[F,M,_,k]=y,L=o(s(3,k)),Y=s(_,_),$=s(3,k,M),V=i(s(2,_,_,_),s(27,k,k,F)),q=s(9,k,_,M);if(n(Y,$)&&n(V,q))return[l(_,L)];var R=a(Y,$),j=a(V,q),U=i(s(18,k,_,M,F),s(_,_,M,M)),oe=i(s(4,_,_,_,F),s(4,k,M,M,M),s(27,k,k,F,F));if(n(U,oe))return[l(a(s(4,k,_,M),i(s(9,k,k,F),s(_,_,_))),s(k,R)),l(a(s(9,k,F),s(_,M)),s(2,R))];var me;n(Y,$)?me=j:me=l(i(j,f(a(s(j,j),s(4,R,R,R)))),2);var ie=!0,H=u(me,ie).toArray().map(ce=>l(i(_,ce,l(R,ce)),L));return H.map(ce=>p(ce)==="Complex"&&n(d(ce),d(ce)+h(ce))?d(ce):ce)}default:throw new RangeError("only implemented for cubic or lower-order polynomials, not ".concat(y))}}})});var kz="Help",Rz=["evaluate"],NA=T(kz,Rz,e=>{var{evaluate:r}=e;function t(n){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(!n)throw new Error('Argument "doc" missing');this.doc=n}return t.prototype.type="Help",t.prototype.isHelp=!0,t.prototype.toString=function(){var n=this.doc||{},i=\` +\`}}}})});function gg(e,r){var t,n=r.length,i=[];if(e)for(t=0;t{var{typed:r,matrix:t,lup:n,slu:i,usolve:a,lsolve:s,DenseMatrix:l}=e,f=ha({DenseMatrix:l});return r(wA,{"Array, Array | Matrix":function(h,d){h=t(h);var x=n(h),v=u(x.L,x.U,x.p,null,d);return v.valueOf()},"DenseMatrix, Array | Matrix":function(h,d){var x=n(h);return u(x.L,x.U,x.p,null,d)},"SparseMatrix, Array | Matrix":function(h,d){var x=n(h);return u(x.L,x.U,x.p,null,d)},"SparseMatrix, Array | Matrix, number, number":function(h,d,x,v){var y=i(h,x,v);return u(y.L,y.U,y.p,y.q,d)},"Object, Array | Matrix":function(h,d){return u(h.L,h.U,h.p,h.q,d)}});function o(p){if(Ge(p))return p;if(Ar(p))return t(p);throw new TypeError("Invalid Matrix LU decomposition")}function u(p,h,d,x,v){p=o(p),h=o(h),d&&(v=f(p,v,!0),v._data=gg(d,v._data));var y=s(p,v),w=a(h,y);return x&&(w._data=gg(x,w._data)),w}});var SA="polynomialRoot",kz=["typed","isZero","equalScalar","add","subtract","multiply","divide","sqrt","unaryMinus","cbrt","typeOf","im","re"],NA=T(SA,kz,e=>{var{typed:r,isZero:t,equalScalar:n,add:i,subtract:a,multiply:s,divide:l,sqrt:f,unaryMinus:o,cbrt:u,typeOf:p,im:h,re:d}=e;return r(SA,{"number|Complex, ...number|Complex":(x,v)=>{for(var y=[x,...v];y.length>0&&t(y[y.length-1]);)y.pop();if(y.length<2)throw new RangeError("Polynomial [".concat(x,", ").concat(v,"] must have a non-zero non-constant coefficient"));switch(y.length){case 2:return[o(l(y[0],y[1]))];case 3:{var[w,C,b]=y,A=s(2,b),E=s(C,C),S=s(4,b,w);if(n(E,S))return[l(o(C),A)];var O=f(a(E,S));return[l(a(O,C),A),l(a(o(O),C),A)]}case 4:{var[F,M,_,k]=y,L=o(s(3,k)),Y=s(_,_),$=s(3,k,M),V=i(s(2,_,_,_),s(27,k,k,F)),q=s(9,k,_,M);if(n(Y,$)&&n(V,q))return[l(_,L)];var R=a(Y,$),j=a(V,q),U=i(s(18,k,_,M,F),s(_,_,M,M)),oe=i(s(4,_,_,_,F),s(4,k,M,M,M),s(27,k,k,F,F));if(n(U,oe))return[l(a(s(4,k,_,M),i(s(9,k,k,F),s(_,_,_))),s(k,R)),l(a(s(9,k,F),s(_,M)),s(2,R))];var me;n(Y,$)?me=j:me=l(i(j,f(a(s(j,j),s(4,R,R,R)))),2);var ie=!0,H=u(me,ie).toArray().map(ce=>l(i(_,ce,l(R,ce)),L));return H.map(ce=>p(ce)==="Complex"&&n(d(ce),d(ce)+h(ce))?d(ce):ce)}default:throw new RangeError("only implemented for cubic or lower-order polynomials, not ".concat(y))}}})});var Rz="Help",Lz=["evaluate"],AA=T(Rz,Lz,e=>{var{evaluate:r}=e;function t(n){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(!n)throw new Error('Argument "doc" missing');this.doc=n}return t.prototype.type="Help",t.prototype.isHelp=!0,t.prototype.toString=function(){var n=this.doc||{},i=\` \`;if(n.name&&(i+="Name: "+n.name+\` \`),n.category&&(i+="Category: "+n.category+\` @@ -88512,25 +88521,25 @@ q: \`+this.q.toString():"")+\` \`,a&&r("config(originalConfig)",{originalConfig:s})}return n.mayThrow&&n.mayThrow.length&&(i+="Throws: "+n.mayThrow.join(", ")+\` \`),n.seealso&&n.seealso.length&&(i+="See also: "+n.seealso.join(", ")+\` -\`),i},t.prototype.toJSON=function(){var n=tr(this.doc);return n.mathjs="Help",n},t.fromJSON=function(n){var i={};return Object.keys(n).filter(a=>a!=="mathjs").forEach(a=>{i[a]=n[a]}),new t(i)},t.prototype.valueOf=t.prototype.toString,t},{isClass:!0});var Lz="Chain",qz=["?on","math","typed"],AA=T(Lz,qz,e=>{var{on:r,math:t,typed:n}=e;function i(o){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");Gs(o)?this.value=o.value:this.value=o}i.prototype.type="Chain",i.prototype.isChain=!0,i.prototype.done=function(){return this.value},i.prototype.valueOf=function(){return this.value},i.prototype.toString=function(){return lr(this.value)},i.prototype.toJSON=function(){return{mathjs:"Chain",value:this.value}},i.fromJSON=function(o){return new i(o.value)};function a(o,u){typeof u=="function"&&(i.prototype[o]=l(u))}function s(o,u){Zs(i.prototype,o,function(){var h=u();if(typeof h=="function")return l(h)})}function l(o){return function(){if(arguments.length===0)return new i(o(this.value));for(var u=[this.value],p=0;po[x])};for(var h in o)p(h)}};var f={expression:!0,docs:!0,type:!0,classes:!0,json:!0,error:!0,isChain:!0};return i.createProxy(t),r&&r("import",function(o,u,p){p||s(o,u)}),i},{isClass:!0});var gg={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 EA={name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]};var CA={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 MA={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 _A={name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]};var TA={name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]};var FA={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 OA={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 BA={name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]};var IA={name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]};var PA={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 xg={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 kA={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 RA={name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]};var LA={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 qA={name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]};var UA={name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]};var zA={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 WA={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 VA={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 YA={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 HA={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 GA={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 $A={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 ZA={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 QA={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 XA={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 JA={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 KA={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 jA={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 eE={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 rE={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 tE={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 nE={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 iE={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 aE={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 oE={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 sE={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 uE={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 fE={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 lE={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 cE={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 pE={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 mE={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 hE={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 dE={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 vE={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 gE={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 xE={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 yE={name:"abs",category:"Arithmetic",syntax:["abs(x)"],description:"Compute the absolute value.",examples:["abs(3.5)","abs(-4.2)"],seealso:["sign"]};var bE={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 wE={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 DE={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 SE={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 NE={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 AE={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 EE={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 CE={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 ME={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 _E={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 TE={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 FE={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 OE={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 BE={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 IE={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 PE={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 kE={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 RE={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 LE={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 qE={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 UE={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 zE={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 WE={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 VE={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 YE={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 HE={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 GE={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 $E={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 ZE={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 QE={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 XE={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 JE={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 KE={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 jE={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 eC={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 rC={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 tC={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 nC={name:"unaryPlus",category:"Operators",syntax:["+x","unaryPlus(x)"],description:"Converts booleans and strings to numbers.",examples:["+true",'+"2"'],seealso:["add","subtract","unaryMinus"]};var iC={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 aC={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 oC={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 sC={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 uC={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 fC={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 lC={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 cC={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 pC={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 mC={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 hC={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 dC={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 vC={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 gC={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 xC={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 yC={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 bC={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 wC={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 DC={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 SC={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 NC={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 AC={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 EC={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 CC={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 MC={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 _C={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 TC={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 FC={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 OC={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 BC={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 IC={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 PC={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 kC={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 RC={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 LC={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 qC={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 UC={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 zC={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 WC={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 VC={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 YC={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 HC={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 GC={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 $C={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 ZC={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 QC={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 XC={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 JC={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 KC={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 jC={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 eM={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 rM={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 tM={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 nM={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 iM={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 aM={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 oM={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 sM={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 uM={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 fM={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 lM={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 cM={name:"fft",category:"Matrix",syntax:["fft(x)"],description:"Calculate N-dimensional fourier transform",examples:["fft([[1, 0], [1, 0]])"],seealso:["ifft"]};var pM={name:"ifft",category:"Matrix",syntax:["ifft(x)"],description:"Calculate N-dimensional inverse fourier transform",examples:["ifft([[2, 2], [0, 0]])"],seealso:["fft"]};var mM={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 hM={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 dM={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 vM={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 gM={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 xM={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 yM={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 bM={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 wM={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 DM={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 SM={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 NM={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 AM={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 EM={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 CM={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 MM={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 _M={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 TM={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 FM={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 OM={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 BM={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 IM={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 PM={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 kM={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 RM={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 LM={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 qM={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 UM={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 zM={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 WM={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 VM={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 YM={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 HM={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 GM={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 $M={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 ZM={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 QM={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 XM={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 JM={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 KM={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 jM={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 e_={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 r_={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 t_={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. +\`),i},t.prototype.toJSON=function(){var n=tr(this.doc);return n.mathjs="Help",n},t.fromJSON=function(n){var i={};return Object.keys(n).filter(a=>a!=="mathjs").forEach(a=>{i[a]=n[a]}),new t(i)},t.prototype.valueOf=t.prototype.toString,t},{isClass:!0});var qz="Chain",Uz=["?on","math","typed"],EA=T(qz,Uz,e=>{var{on:r,math:t,typed:n}=e;function i(o){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");Gs(o)?this.value=o.value:this.value=o}i.prototype.type="Chain",i.prototype.isChain=!0,i.prototype.done=function(){return this.value},i.prototype.valueOf=function(){return this.value},i.prototype.toString=function(){return lr(this.value)},i.prototype.toJSON=function(){return{mathjs:"Chain",value:this.value}},i.fromJSON=function(o){return new i(o.value)};function a(o,u){typeof u=="function"&&(i.prototype[o]=l(u))}function s(o,u){Zs(i.prototype,o,function(){var h=u();if(typeof h=="function")return l(h)})}function l(o){return function(){if(arguments.length===0)return new i(o(this.value));for(var u=[this.value],p=0;po[x])};for(var h in o)p(h)}};var f={expression:!0,docs:!0,type:!0,classes:!0,json:!0,error:!0,isChain:!0};return i.createProxy(t),r&&r("import",function(o,u,p){p||s(o,u)}),i},{isClass:!0});var xg={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 CA={name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]};var MA={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 _A={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 TA={name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]};var FA={name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]};var OA={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 BA={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 IA={name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]};var PA={name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]};var kA={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 yg={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 RA={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 LA={name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]};var qA={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 UA={name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]};var zA={name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]};var WA={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 VA={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 YA={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 HA={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 GA={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 $A={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 ZA={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 QA={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 XA={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 JA={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 KA={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 jA={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 eE={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 rE={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 tE={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 nE={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 iE={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 aE={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 oE={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 sE={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 uE={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 fE={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 lE={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 cE={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 pE={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 mE={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 hE={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 dE={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 vE={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 gE={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 xE={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 yE={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 bE={name:"abs",category:"Arithmetic",syntax:["abs(x)"],description:"Compute the absolute value.",examples:["abs(3.5)","abs(-4.2)"],seealso:["sign"]};var wE={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 DE={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 SE={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 NE={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 AE={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 EE={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 CE={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 ME={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 _E={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 TE={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 FE={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 OE={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 BE={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 IE={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 PE={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 kE={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 RE={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 LE={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 qE={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 UE={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 zE={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 WE={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 VE={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 YE={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 HE={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 GE={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 $E={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 ZE={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 QE={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 XE={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 JE={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 KE={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 jE={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 eC={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 rC={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 tC={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 nC={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 iC={name:"unaryPlus",category:"Operators",syntax:["+x","unaryPlus(x)"],description:"Converts booleans and strings to numbers.",examples:["+true",'+"2"'],seealso:["add","subtract","unaryMinus"]};var aC={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 oC={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 sC={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 uC={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 fC={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 lC={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 cC={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 pC={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 mC={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 hC={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 dC={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 vC={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 gC={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 xC={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 yC={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 bC={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 wC={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 DC={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 SC={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 NC={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 AC={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 EC={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 CC={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 MC={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 _C={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 TC={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 FC={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 OC={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 BC={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 IC={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 PC={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 kC={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 RC={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 LC={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 qC={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 UC={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 zC={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 WC={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 VC={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 YC={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 HC={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 GC={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 $C={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 ZC={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 QC={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 XC={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 JC={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 KC={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 jC={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 eM={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 rM={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 tM={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 nM={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 iM={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 aM={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 oM={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 sM={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 uM={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 fM={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 lM={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 cM={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 pM={name:"fft",category:"Matrix",syntax:["fft(x)"],description:"Calculate N-dimensional fourier transform",examples:["fft([[1, 0], [1, 0]])"],seealso:["ifft"]};var mM={name:"ifft",category:"Matrix",syntax:["ifft(x)"],description:"Calculate N-dimensional inverse fourier transform",examples:["ifft([[2, 2], [0, 0]])"],seealso:["fft"]};var hM={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 dM={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 vM={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 gM={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 xM={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 yM={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 bM={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 wM={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 DM={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 SM={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 NM={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 AM={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 EM={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 CM={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 MM={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 _M={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 TM={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 FM={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 OM={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 BM={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 IM={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 PM={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 kM={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 RM={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 LM={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 qM={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 UM={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 zM={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 WM={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 VM={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 YM={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 HM={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 GM={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 $M={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 ZM={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 QM={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 XM={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 JM={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 KM={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 jM={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 e_={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 r_={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 t_={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 n_={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 n_={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 i_={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 a_={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 o_={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 s_={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 u_={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 f_={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 l_={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 c_={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 p_={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 m_={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 h_={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 d_={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]};var v_={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 g_={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 x_={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 y_={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 b_={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 w_={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 D_={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 S_={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 N_={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 A_={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 E_={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 C_={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 M_={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 __={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 T_={name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]};var F_={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 O_={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 B_={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 I_={name:"bin",category:"Utils",syntax:["bin(value)"],description:"Format a number as binary",examples:["bin(2)"],seealso:["oct","hex"]};var P_={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 k_={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 R_={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 L_={name:"hex",category:"Utils",syntax:["hex(value)"],description:"Format a number as hexadecimal",examples:["hex(240)"],seealso:["bin","oct"]};var q_={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 U_={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 z_={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 W_={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 V_={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 Y_={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 H_={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 G_={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 $_={name:"oct",category:"Utils",syntax:["oct(value)"],description:"Format a number as octal",examples:["oct(56)"],seealso:["bin","hex"]};var Z_={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 Q_={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 X_={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 J_={bignumber:zA,boolean:WA,complex:VA,createUnit:YA,fraction:HA,index:GA,matrix:$A,number:ZA,sparse:QA,splitUnit:XA,string:JA,unit:KA,e:gg,E:gg,false:EA,i:CA,Infinity:MA,LN2:TA,LN10:_A,LOG2E:OA,LOG10E:FA,NaN:BA,null:IA,pi:xg,PI:xg,phi:PA,SQRT1_2:kA,SQRT2:RA,tau:LA,true:qA,version:UA,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:tE,lsolve:iE,lsolveAll:aE,lup:oE,lusolve:sE,leafCount:nE,polynomialRoot:uE,resolve:cE,simplify:pE,simplifyConstant:mE,simplifyCore:hE,symbolicEqual:vE,rationalize:lE,slu:dE,usolve:gE,usolveAll:xE,qr:fE,abs:yE,add:bE,cbrt:wE,ceil:DE,cube:SE,divide:NE,dotDivide:AE,dotMultiply:EE,dotPow:CE,exp:ME,expm:_E,expm1:TE,fix:FE,floor:OE,gcd:BE,hypot:IE,lcm:kE,log:RE,log2:UE,log1p:qE,log10:LE,mod:zE,multiply:WE,norm:VE,nthRoot:YE,nthRoots:HE,pow:GE,round:$E,sign:ZE,sqrt:QE,sqrtm:XE,square:eC,subtract:rC,unaryMinus:tC,unaryPlus:nC,xgcd:iC,invmod:PE,bitAnd:aC,bitNot:oC,bitOr:sC,bitXor:uC,leftShift:fC,rightArithShift:lC,rightLogShift:cC,bellNumbers:pC,catalan:mC,composition:hC,stirlingS2:dC,config:jA,import:eE,typed:rE,arg:vC,conj:gC,re:yC,im:xC,evaluate:bC,help:wC,distance:DC,intersect:SC,and:NC,not:AC,or:EC,xor:CC,concat:_C,count:TC,cross:FC,column:MC,ctranspose:OC,det:BC,diag:IC,diff:PC,dot:kC,getMatrixDataType:zC,identity:WC,filter:LC,flatten:qC,forEach:UC,inv:VC,pinv:YC,eigs:RC,kron:HC,matrixFromFunction:ZC,matrixFromRows:QC,matrixFromColumns:$C,map:GC,ones:XC,partitionSelect:JC,range:KC,resize:eM,reshape:jC,rotate:rM,rotationMatrix:tM,row:nM,size:iM,sort:aM,squeeze:oM,subset:sM,trace:uM,transpose:fM,zeros:lM,fft:cM,ifft:pM,sylvester:JE,schur:KE,lyap:jE,solveODE:X_,combinations:mM,combinationsWithRep:hM,factorial:dM,gamma:vM,kldivergence:xM,lgamma:gM,multinomial:yM,permutations:bM,pickRandom:wM,random:DM,randomInt:SM,compare:NM,compareNatural:AM,compareText:EM,deepEqual:CM,equal:MM,equalText:_M,larger:TM,largerEq:FM,smaller:OM,smallerEq:BM,unequal:IM,setCartesian:PM,setDifference:kM,setDistinct:RM,setIntersect:LM,setIsSubset:qM,setMultiplicity:UM,setPowerset:zM,setSize:WM,setSymDifference:VM,setUnion:YM,zpk2tf:HM,freqz:GM,erf:$M,zeta:ZM,cumsum:i_,mad:QM,max:XM,mean:JM,median:KM,min:jM,mode:e_,prod:r_,quantileSeq:t_,std:n_,sum:a_,variance:o_,corr:s_,acos:u_,acosh:f_,acot:l_,acoth:c_,acsc:p_,acsch:m_,asec:h_,asech:d_,asin:v_,asinh:g_,atan:x_,atanh:b_,atan2:y_,cos:w_,cosh:D_,cot:S_,coth:N_,csc:A_,csch:E_,sec:C_,sech:M_,sin:__,sinh:T_,tan:F_,tanh:O_,to:B_,clone:P_,format:k_,bin:I_,oct:$_,hex:L_,isNaN:U_,isInteger:q_,isNegative:z_,isNumeric:W_,hasNumericValue:R_,isPositive:V_,isPrime:Y_,isZero:H_,print:Z_,typeOf:Q_,numeric:G_};var K_="help",Uz=["typed","mathWithTransform","Help"],j_=T(K_,Uz,e=>{var{typed:r,mathWithTransform:t,Help:n}=e;return r(K_,{any:function(a){var s,l=a;if(typeof a!="string"){for(s in t)if($e(t,s)&&a===t[s]){l=s;break}}var f=gt(J_,l);if(!f){var o=typeof l=="function"?l.name:l;throw new Error('No documentation found on "'+o+'"')}return new n(f)}})});var eT="chain",zz=["typed","Chain"],rT=T(eT,zz,e=>{var{typed:r,Chain:t}=e;return r(eT,{"":function(){return new t},any:function(i){return new t(i)}})});var tT="det",Wz=["typed","matrix","subtractScalar","multiply","divideScalar","isZero","unaryMinus"],nT=T(tT,Wz,e=>{var{typed:r,matrix:t,subtractScalar:n,multiply:i,divideScalar:a,isZero:s,unaryMinus:l}=e;return r(tT,{any:function(u){return tr(u)},"Array | Matrix":function(u){var p;switch(Ge(u)?p=u.size():Array.isArray(u)?(u=t(u),p=u.size()):p=[],p.length){case 0:return tr(u);case 1:if(p[0]===1)return tr(u.valueOf()[0]);if(p[0]===0)return 1;throw new RangeError("Matrix must be square (size: "+lr(p)+")");case 2:{var h=p[0],d=p[1];if(h===d)return f(u.clone().valueOf(),h,d);if(d===0)return 1;throw new RangeError("Matrix must be square (size: "+lr(p)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+lr(p)+")")}}});function f(o,u,p){if(u===1)return tr(o[0][0]);if(u===2)return n(i(o[0][0],o[1][1]),i(o[1][0],o[0][1]));for(var h=!1,d=new Array(u).fill(0).map((O,F)=>F),x=0;x{var{typed:r,matrix:t,divideScalar:n,addScalar:i,multiply:a,unaryMinus:s,det:l,identity:f,abs:o}=e;return r(iT,{"Array | Matrix":function(h){var d=Ge(h)?h.size():or(h);switch(d.length){case 1:if(d[0]===1)return Ge(h)?t([n(1,h.valueOf()[0])]):[n(1,h[0])];throw new RangeError("Matrix must be square (size: "+lr(d)+")");case 2:{var x=d[0],v=d[1];if(x===v)return Ge(h)?t(u(h.valueOf(),x,v),h.storage()):u(h,x,v);throw new RangeError("Matrix must be square (size: "+lr(d)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+lr(d)+")")}},any:function(h){return n(1,h)}});function u(p,h,d){var x,v,y,w,C;if(h===1){if(w=p[0][0],w===0)throw Error("Cannot calculate inverse, determinant is zero");return[[n(1,w)]]}else if(h===2){var b=l(p);if(b===0)throw Error("Cannot calculate inverse, determinant is zero");return[[n(p[1][1],b),n(s(p[0][1]),b)],[n(s(p[1][0]),b),n(p[0][0],b)]]}else{var A=p.concat();for(x=0;xO&&(O=o(A[x][S]),F=x),x++;if(O===0)throw Error("Cannot calculate inverse, determinant is zero");x=F,x!==S&&(C=A[S],A[S]=A[x],A[x]=C,C=E[S],E[S]=E[x],E[x]=C);var M=A[S],_=E[S];for(x=0;x{var{typed:r,matrix:t,inv:n,deepEqual:i,equal:a,dotDivide:s,dot:l,ctranspose:f,divideScalar:o,multiply:u,add:p,Complex:h}=e;return r(oT,{"Array | Matrix":function(b){var A=Ge(b)?b.size():or(b);switch(A.length){case 1:return w(b)?f(b):A[0]===1?n(b):s(f(b),l(b,b));case 2:{if(w(b))return f(b);var E=A[0],S=A[1];if(E===S)try{return n(b)}catch(O){if(!(O instanceof Error&&O.message.match(/Cannot calculate inverse, determinant is zero/)))throw O}return Ge(b)?t(d(b.valueOf(),E,S),b.storage()):d(b,E,S)}default:throw new RangeError("Matrix must be two dimensional (size: "+lr(A)+")")}},any:function(b){return a(b,0)?tr(b):o(1,b)}});function d(C,b,A){var{C:E,F:S}=v(C,b,A),O=u(n(u(f(E),E)),f(E)),F=u(f(S),n(u(S,f(S))));return u(F,O)}function x(C,b,A){for(var E=tr(C),S=0,O=0;OF.filter((_,k)=>k!y(l(E[M],E[M])));return{C:S,F:O}}function y(C){return a(p(C,h(1,1)),p(0,h(1,1)))}function w(C){return i(p(C,h(1,1)),p(u(C,0),h(1,1)))}});function uT(e){var{addScalar:r,subtract:t,flatten:n,multiply:i,multiplyScalar:a,divideScalar:s,sqrt:l,abs:f,bignumber:o,diag:u,size:p,reshape:h,inv:d,qr:x,usolve:v,usolveAll:y,equal:w,complex:C,larger:b,smaller:A,matrixFromColumns:E,dot:S}=e;function O(ie,H,ce,Me){var pe=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,ge=F(ie,H,ce,Me,pe);M(ie,H,ce,Me,pe,ge);var{values:Se,C:xe}=_(ie,H,ce,Me,pe);if(pe){var be=k(ie,H,xe,ge,Se,ce,Me);return{values:Se,eigenvectors:be}}return{values:Se}}function F(ie,H,ce,Me,pe){var ge=Me==="BigNumber",Se=Me==="Complex",xe=ge?o(0):0,be=ge?o(1):Se?C(1):1,De=ge?o(1):1,Ae=ge?o(10):2,ze=a(Ae,Ae),Ze;pe&&(Ze=Array(H).fill(be));for(var K=!1;!K;){K=!0;for(var te=0;te1&&(K=u(Array(Ae-1).fill(xe)))),Ae-=1,be.pop();for(var Ce=0;Ce2&&(K=u(Array(Ae-2).fill(xe)))),Ae-=2,be.pop(),be.pop();for(var Ie=0;Ie+t(f(Xe),f(Or))),te>100){var sr=Error("The eigenvalues failed to converge. Only found these eigenvalues: "+De.join(", "));throw sr.values=De,sr.vectors=[],sr}var ir=pe?i(Ze,V(ze,H)):void 0;return{values:De,C:ir}}function k(ie,H,ce,Me,pe,ge,Se){var xe=d(ce),be=i(xe,ie,ce),De=Se==="BigNumber",Ae=Se==="Complex",ze=De?o(0):Ae?C(0):0,Ze=De?o(1):Ae?C(1):1,K=[],te=[];for(var ye of pe){var ee=q(K,ye,w);ee===-1?(K.push(ye),te.push(1)):te[ee]+=1}for(var ne=[],ue=K.length,Ee=Array(H).fill(ze),Ce=u(Array(H).fill(Ze)),Le=function(){var ir=K[Ie],Xe=t(be,i(ir,Ce)),Or=y(Xe,Ee);for(Or.shift();Or.lengthi(le,we)),ne.push(...Or.map(we=>({value:ir,vector:n(we)})))},Ie=0;Ie=5)return null;for(xe=0;;){var be=v(ie,Se);if(A(oe(U(Se,[be])),Me))break;if(++xe>=10)return null;Se=me(be)}return Se}function j(ie,H,ce){var Me=ce==="BigNumber",pe=ce==="Complex",ge=Array(ie).fill(0).map(Se=>2*Math.random()-1);return Me&&(ge=ge.map(Se=>o(Se))),pe&&(ge=ge.map(Se=>C(Se))),ge=U(ge,H),me(ge,ce)}function U(ie,H){var ce=p(ie);for(var Me of H)Me=h(Me,ce),ie=t(ie,i(s(S(Me,ie),S(Me,Me)),Me));return ie}function oe(ie){return f(l(S(ie,ie)))}function me(ie,H){var ce=H==="BigNumber",Me=H==="Complex",pe=ce?o(1):Me?C(1):1;return i(s(pe,oe(ie)),ie)}return O}function fT(e){var{config:r,addScalar:t,subtract:n,abs:i,atan:a,cos:s,sin:l,multiplyScalar:f,inv:o,bignumber:u,multiply:p,add:h}=e;function d(M,_){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:r.epsilon,L=arguments.length>3?arguments[3]:void 0,Y=arguments.length>4?arguments[4]:void 0;if(L==="number")return x(M,k,Y);if(L==="BigNumber")return v(M,k,Y);throw TypeError("Unsupported data type: "+L)}function x(M,_,k){var L=M.length,Y=Math.abs(_/L),$,V;if(k){V=new Array(L);for(var q=0;q=Math.abs(Y);){var j=R[0][0],U=R[0][1];$=y(M[j][j],M[U][U],M[j][U]),M=E(M,$,j,U),k&&(V=C(V,$,j,U)),R=S(M)}for(var oe=Array(L).fill(0),me=0;me=i(Y);){var j=R[0][0],U=R[0][1];$=w(M[j][j],M[U][U],M[j][U]),M=A(M,$,j,U),k&&(V=b(V,$,j,U)),R=O(M)}for(var oe=Array(L).fill(0),me=0;me({value:Y[H],vector:ie}));return{values:Y,eigenvectors:me}}return d}var Hz="eigs",Gz=["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"],lT=T(Hz,Gz,e=>{var{config:r,typed:t,matrix:n,addScalar:i,subtract:a,equal:s,abs:l,atan:f,cos:o,sin:u,multiplyScalar:p,divideScalar:h,inv:d,bignumber:x,multiply:v,add:y,larger:w,column:C,flatten:b,number:A,complex:E,sqrt:S,diag:O,size:F,reshape:M,qr:_,usolve:k,usolveAll:L,im:Y,re:$,smaller:V,matrixFromColumns:q,dot:R}=e,j=fT({config:r,addScalar:i,subtract:a,column:C,flatten:b,equal:s,abs:l,atan:f,cos:o,sin:u,multiplyScalar:p,inv:d,bignumber:x,complex:E,multiply:v,add:y}),U=uT({config:r,addScalar:i,subtract:a,multiply:v,multiplyScalar:p,flatten:b,divideScalar:h,sqrt:S,abs:l,bignumber:x,diag:O,size:F,reshape:M,qr:_,inv:d,usolve:k,usolveAll:L,equal:s,complex:E,larger:w,smaller:V,matrixFromColumns:q,dot:R});return t("eigs",{Array:function(ge){return oe(n(ge))},"Array, number|BigNumber":function(ge,Se){return oe(n(ge),{precision:Se})},"Array, Object"(pe,ge){return oe(n(pe),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 Mt(xe,Se),oe(ge,xe)}});function oe(pe){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=me(pe,be,xe);return Se.matricize&&(De.values=n(De.values),xe&&(De.eigenvectors=De.eigenvectors.map(Ae=>{var{value:ze,vector:Ze}=Ae;return{value:ze,vector:n(Ze)}}))),xe&&Object.defineProperty(De,"vectors",{enumerable:!1,get:()=>{throw new Error("eigs(M).vectors replaced with eigs(M).eigenvectors")}}),De}function me(pe,ge,Se){var xe=pe.toArray(),be=pe.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(H(xe,De,ge)&&(ce(xe,De),ie(xe,De,ge))){var Ae=Me(pe,xe,De);return j(xe,De,ge,Ae,Se)}var ze=Me(pe,xe,De);return U(xe,De,ge,ze,Se)}function ie(pe,ge,Se){for(var xe=0;xe{var{typed:r,abs:t,add:n,identity:i,inv:a,multiply:s}=e;return r(cT,{Matrix:function(p){var h=p.size();if(h.length!==2||h[0]!==h[1])throw new RangeError("Matrix must be square (size: "+lr(h)+")");for(var d=h[0],x=1e-15,v=l(p),y=f(v,x),w=y.q,C=y.j,b=s(p,Math.pow(2,-C)),A=i(d),E=i(d),S=1,O=b,F=-1,M=1;M<=w;M++)M>1&&(O=s(O,b),F=-F),S=S*(w-M+1)/((2*w-M+1)*M),A=n(A,s(S,O)),E=n(E,s(S*F,O));for(var _=s(a(E),A),k=0;k{var{typed:r,abs:t,add:n,multiply:i,map:a,sqrt:s,subtract:l,inv:f,size:o,max:u,identity:p}=e,h=1e3,d=1e-6;function x(v){var y,w=0,C=v,b=p(o(v));do{var A=C;if(C=i(.5,n(A,f(b))),b=i(.5,n(b,f(A))),y=u(t(l(C,A))),y>d&&++w>h)throw new Error("computing square root of matrix: iterative method could not converge")}while(y>d);return C}return r(mT,{"Array | Matrix":function(y){var w=Ge(y)?y.size():or(y);switch(w.length){case 1:if(w[0]===1)return a(y,s);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 dT="sylvester",Qz=["typed","schur","matrixFromColumns","matrix","multiply","range","concat","transpose","index","subset","add","subtract","identity","lusolve","abs"],vT=T(dT,Qz,e=>{var{typed:r,schur:t,matrixFromColumns:n,matrix:i,multiply:a,range:s,concat:l,transpose:f,index:o,subset:u,add:p,subtract:h,identity:d,lusolve:x,abs:v}=e;return r(dT,{"Matrix, Matrix, Matrix":y,"Array, Matrix, Matrix":function(C,b,A){return y(i(C),b,A)},"Array, Array, Matrix":function(C,b,A){return y(i(C),i(b),A)},"Array, Matrix, Array":function(C,b,A){return y(i(C),b,i(A))},"Matrix, Array, Matrix":function(C,b,A){return y(C,i(b),A)},"Matrix, Array, Array":function(C,b,A){return y(C,i(b),i(A))},"Matrix, Matrix, Array":function(C,b,A){return y(C,b,i(A))},"Array, Array, Array":function(C,b,A){return y(i(C),i(b),i(A)).toArray()}});function y(w,C,b){for(var A=C.size()[0],E=w.size()[0],S=t(w),O=S.T,F=S.U,M=t(a(-1,C)),_=M.T,k=M.U,L=a(a(f(F),b),k),Y=s(0,E),$=[],V=(Ae,ze)=>l(Ae,ze,1),q=(Ae,ze)=>l(Ae,ze,0),R=0;R1e-5){for(var j=q(u(L,o(Y,R)),u(L,o(Y,R+1))),U=0;U{var{typed:r,matrix:t,identity:n,multiply:i,qr:a,norm:s,subtract:l}=e;return r(gT,{Array:function(u){var p=f(t(u));return{U:p.U.valueOf(),T:p.T.valueOf()}},Matrix:function(u){return f(u)}});function f(o){var u=o.size()[0],p=o,h=n(u),d=0,x;do{x=p;var v=a(p),y=v.Q,w=v.R;if(p=i(w,y),h=i(h,y),d++>100)break}while(s(l(p,x))>1e-4);return{U:h,T:p}}});var yT="lyap",Jz=["typed","matrix","sylvester","multiply","transpose"],bT=T(yT,Jz,e=>{var{typed:r,matrix:t,sylvester:n,multiply:i,transpose:a}=e;return r(yT,{"Matrix, Matrix":function(l,f){return n(l,a(l),i(-1,f))},"Array, Matrix":function(l,f){return n(t(l),a(t(l)),i(-1,f))},"Matrix, Array":function(l,f){return n(l,a(t(l)),t(i(-1,f)))},"Array, Array":function(l,f){return n(t(l),a(t(l)),t(i(-1,f))).toArray()}})});var Kz="divide",jz=["typed","matrix","multiply","equalScalar","divideScalar","inv"],wT=T(Kz,jz,e=>{var{typed:r,matrix:t,multiply:n,equalScalar:i,divideScalar:a,inv:s}=e,l=Jr({typed:r,equalScalar:i}),f=Bt({typed:r});return r("divide",vc({"Array | Matrix, Array | Matrix":function(u,p){return n(u,s(p))},"DenseMatrix, any":function(u,p){return f(u,p,a,!1)},"SparseMatrix, any":function(u,p){return l(u,p,a,!1)},"Array, any":function(u,p){return f(t(u),p,a,!1).valueOf()},"any, Array | Matrix":function(u,p){return n(u,s(p))}},a.signatures))});var DT="distance",eW=["typed","addScalar","subtractScalar","divideScalar","multiplyScalar","deepEqual","sqrt","abs"],ST=T(DT,eW,e=>{var{typed:r,addScalar:t,subtractScalar:n,multiplyScalar:i,divideScalar:a,deepEqual:s,sqrt:l,abs:f}=e;return r(DT,{"Array, Array, Array":function(E,S,O){if(E.length===2&&S.length===2&&O.length===2){if(!u(E))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!u(S))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!u(O))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(s(S,O))throw new TypeError("LinePoint1 should not be same with LinePoint2");var F=n(O[1],S[1]),M=n(S[0],O[0]),_=n(i(O[0],S[1]),i(S[0],O[1]));return y(E[0],E[1],F,M,_)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object, Object":function(E,S,O){if(Object.keys(E).length===2&&Object.keys(S).length===2&&Object.keys(O).length===2){if(!u(E))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!u(S))throw new TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!u(O))throw new TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");if(s(x(S),x(O)))throw new TypeError("LinePoint1 should not be same with LinePoint2");if("pointX"in E&&"pointY"in E&&"lineOnePtX"in S&&"lineOnePtY"in S&&"lineTwoPtX"in O&&"lineTwoPtY"in O){var F=n(O.lineTwoPtY,S.lineOnePtY),M=n(S.lineOnePtX,O.lineTwoPtX),_=n(i(O.lineTwoPtX,S.lineOnePtY),i(S.lineOnePtX,O.lineTwoPtY));return y(E.pointX,E.pointY,F,M,_)}else throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},"Array, Array":function(E,S){if(E.length===2&&S.length===3){if(!u(E))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!p(S))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return y(E[0],E[1],S[0],S[1],S[2])}else if(E.length===3&&S.length===6){if(!p(E))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!d(S))throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument");return w(E[0],E[1],E[2],S[0],S[1],S[2],S[3],S[4],S[5])}else if(E.length===S.length&&E.length>0){if(!h(E))throw new TypeError("All values of an array should be numbers or BigNumbers");if(!h(S))throw new TypeError("All values of an array should be numbers or BigNumbers");return C(E,S)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object":function(E,S){if(Object.keys(E).length===2&&Object.keys(S).length===3){if(!u(E))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!p(S))throw new TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if("pointX"in E&&"pointY"in E&&"xCoeffLine"in S&&"yCoeffLine"in S&&"constant"in S)return y(E.pointX,E.pointY,S.xCoeffLine,S.yCoeffLine,S.constant);throw new TypeError("Key names do not match")}else if(Object.keys(E).length===3&&Object.keys(S).length===6){if(!p(E))throw new TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!d(S))throw new TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if("pointX"in E&&"pointY"in E&&"x0"in S&&"y0"in S&&"z0"in S&&"a"in S&&"b"in S&&"c"in S)return w(E.pointX,E.pointY,E.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(E).length===2&&Object.keys(S).length===2){if(!u(E))throw new TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!u(S))throw new TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if("pointOneX"in E&&"pointOneY"in E&&"pointTwoX"in S&&"pointTwoY"in S)return C([E.pointOneX,E.pointOneY],[S.pointTwoX,S.pointTwoY]);throw new TypeError("Key names do not match")}else if(Object.keys(E).length===3&&Object.keys(S).length===3){if(!p(E))throw new TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!p(S))throw new TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if("pointOneX"in E&&"pointOneY"in E&&"pointOneZ"in E&&"pointTwoX"in S&&"pointTwoY"in S&&"pointTwoZ"in S)return C([E.pointOneX,E.pointOneY,E.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(E){if(!v(E))throw new TypeError("Incorrect array format entered for pairwise distance calculation");return b(E)}});function o(A){return typeof A=="number"||je(A)}function u(A){return A.constructor!==Array&&(A=x(A)),o(A[0])&&o(A[1])}function p(A){return A.constructor!==Array&&(A=x(A)),o(A[0])&&o(A[1])&&o(A[2])}function h(A){return Array.isArray(A)||(A=x(A)),A.every(o)}function d(A){return A.constructor!==Array&&(A=x(A)),o(A[0])&&o(A[1])&&o(A[2])&&o(A[3])&&o(A[4])&&o(A[5])}function x(A){for(var E=Object.keys(A),S=[],O=0;OE.length!==2||!o(E[0])||!o(E[1])))return!1}else if(A[0].length===3&&o(A[0][0])&&o(A[0][1])&&o(A[0][2])){if(A.some(E=>E.length!==3||!o(E[0])||!o(E[1])||!o(E[2])))return!1}else return!1;return!0}function y(A,E,S,O,F){var M=f(t(t(i(S,A),i(O,E)),F)),_=l(t(i(S,S),i(O,O)));return a(M,_)}function w(A,E,S,O,F,M,_,k,L){var Y=[n(i(n(F,E),L),i(n(M,S),k)),n(i(n(M,S),_),i(n(O,A),L)),n(i(n(O,A),k),i(n(F,E),_))];Y=l(t(t(i(Y[0],Y[0]),i(Y[1],Y[1])),i(Y[2],Y[2])));var $=l(t(t(i(_,_),i(k,k)),i(L,L)));return a(Y,$)}function C(A,E){for(var S=A.length,O=0,F=0,M=0;M{var{typed:r,config:t,abs:n,add:i,addScalar:a,matrix:s,multiply:l,multiplyScalar:f,divideScalar:o,subtract:u,smaller:p,equalScalar:h,flatten:d,isZero:x,isNumeric:v}=e;return r("intersect",{"Array, Array, Array":y,"Array, Array, Array, Array":w,"Matrix, Matrix, Matrix":function(k,L,Y){var $=y(k.valueOf(),L.valueOf(),Y.valueOf());return $===null?null:s($)},"Matrix, Matrix, Matrix, Matrix":function(k,L,Y,$){var V=w(k.valueOf(),L.valueOf(),Y.valueOf(),$.valueOf());return V===null?null:s(V)}});function y(_,k,L){if(_=C(_),k=C(k),L=C(L),!A(_))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!A(k))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!E(L))throw new TypeError("Array with 4 numbers expected as third argument");return M(_[0],_[1],_[2],k[0],k[1],k[2],L[0],L[1],L[2],L[3])}function w(_,k,L,Y){if(_=C(_),k=C(k),L=C(L),Y=C(Y),_.length===2){if(!b(_))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!b(k))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!b(L))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(!b(Y))throw new TypeError("Array with 2 numbers or BigNumbers expected for fourth argument");return S(_,k,L,Y)}else if(_.length===3){if(!A(_))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!A(k))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!A(L))throw new TypeError("Array with 3 numbers or BigNumbers expected for third argument");if(!A(Y))throw new TypeError("Array with 3 numbers or BigNumbers expected for fourth argument");return F(_[0],_[1],_[2],k[0],k[1],k[2],L[0],L[1],L[2],Y[0],Y[1],Y[2])}else throw new TypeError("Arrays with two or thee dimensional points expected")}function C(_){return _.length===1?_[0]:_.length>1&&Array.isArray(_[0])&&_.every(k=>Array.isArray(k)&&k.length===1)?d(_):_}function b(_){return _.length===2&&v(_[0])&&v(_[1])}function A(_){return _.length===3&&v(_[0])&&v(_[1])&&v(_[2])}function E(_){return _.length===4&&v(_[0])&&v(_[1])&&v(_[2])&&v(_[3])}function S(_,k,L,Y){var $=_,V=L,q=u($,k),R=u(V,Y),j=u(f(q[0],R[1]),f(R[0],q[1]));if(x(j)||p(n(j),t.epsilon))return null;var U=f(R[0],$[1]),oe=f(R[1],$[0]),me=f(R[0],V[1]),ie=f(R[1],V[0]),H=o(a(u(u(U,oe),me),ie),j);return i(l(q,H),$)}function O(_,k,L,Y,$,V,q,R,j,U,oe,me){var ie=f(u(_,k),u(L,Y)),H=f(u($,V),u(q,R)),ce=f(u(j,U),u(oe,me));return a(a(ie,H),ce)}function F(_,k,L,Y,$,V,q,R,j,U,oe,me){var ie=O(_,q,U,q,k,R,oe,R,L,j,me,j),H=O(U,q,Y,_,oe,R,$,k,me,j,V,L),ce=O(_,q,Y,_,k,R,$,k,L,j,V,L),Me=O(U,q,U,q,oe,R,oe,R,me,j,me,j),pe=O(Y,_,Y,_,$,k,$,k,V,L,V,L),ge=u(f(ie,H),f(ce,Me)),Se=u(f(pe,Me),f(H,H));if(x(Se))return null;var xe=o(ge,Se),be=o(a(ie,f(xe,H)),Me),De=a(_,f(xe,u(Y,_))),Ae=a(k,f(xe,u($,k))),ze=a(L,f(xe,u(V,L))),Ze=a(q,f(be,u(U,q))),K=a(R,f(be,u(oe,R))),te=a(j,f(be,u(me,j)));return h(De,Ze)&&h(Ae,K)&&h(ze,te)?[De,Ae,ze]:null}function M(_,k,L,Y,$,V,q,R,j,U){var oe=f(_,q),me=f(Y,q),ie=f(k,R),H=f($,R),ce=f(L,j),Me=f(V,j),pe=u(u(u(U,oe),ie),ce),ge=u(u(u(a(a(me,H),Me),oe),ie),ce),Se=o(pe,ge),xe=a(_,f(Se,u(Y,_))),be=a(k,f(Se,u($,k))),De=a(L,f(Se,u(V,L)));return[xe,be,De]}});var AT="sum",nW=["typed","config","add","numeric"],kp=T(AT,nW,e=>{var{typed:r,config:t,add:n,numeric:i}=e;return r(AT,{"Array | Matrix":a,"Array | Matrix, number | BigNumber":s,"...":function(f){if(di(f))throw new TypeError("Scalar values expected in function sum");return a(f)}});function a(l){var f;return hn(l,function(o){try{f=f===void 0?o:n(f,o)}catch(u){throw St(u,"sum",o)}}),f===void 0&&(f=i(0,t.number)),typeof f=="string"&&(f=i(f,t.number)),f}function s(l,f){try{var o=Do(l,f,n);return o}catch(u){throw St(u,"sum")}}});var Rp="cumsum",iW=["typed","add","unaryPlus"],Lp=T(Rp,iW,e=>{var{typed:r,add:t,unaryPlus:n}=e;return r(Rp,{Array:i,Matrix:function(o){return o.create(i(o.valueOf()))},"Array, number | BigNumber":s,"Matrix, number | BigNumber":function(o,u){return o.create(s(o.valueOf(),u))},"...":function(o){if(di(o))throw new TypeError("All values expected to be scalar in function cumsum");return i(o)}});function i(f){try{return a(f)}catch(o){throw St(o,Rp)}}function a(f){if(f.length===0)return[];for(var o=[n(f[0])],u=1;u=u.length)throw new Xt(o,u.length);try{return l(f,o)}catch(p){throw St(p,Rp)}}function l(f,o){var u,p,h;if(o<=0){var d=f[0][0];if(Array.isArray(d)){for(h=Pc(f),p=[],u=0;u{var{typed:r,add:t,divide:n}=e;return r(ET,{"Array | Matrix":a,"Array | Matrix, number | BigNumber":i,"...":function(l){if(di(l))throw new TypeError("Scalar values expected in function mean");return a(l)}});function i(s,l){try{var f=Do(s,l,t),o=Array.isArray(s)?or(s):s.size();return n(f,o[l])}catch(u){throw St(u,"mean")}}function a(s){var l,f=0;if(hn(s,function(o){try{l=l===void 0?o:t(l,o),f++}catch(u){throw St(u,"mean",o)}}),f===0)throw new Error("Cannot calculate the mean of an empty array");return n(l,f)}});var CT="median",oW=["typed","add","divide","compare","partitionSelect"],MT=T(CT,oW,e=>{var{typed:r,add:t,divide:n,compare:i,partitionSelect:a}=e;function s(o){try{o=gr(o.valueOf());var u=o.length;if(u===0)throw new Error("Cannot calculate median of an empty array");if(u%2===0){for(var p=u/2-1,h=a(o,p+1),d=o[p],x=0;x0&&(d=o[x]);return f(d,h)}else{var v=a(o,(u-1)/2);return l(v)}}catch(y){throw St(y,"median")}}var l=r({"number | BigNumber | Complex | Unit":function(u){return u}}),f=r({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(u,p){return n(t(u,p),2)}});return r(CT,{"Array | Matrix":s,"Array | Matrix, number | BigNumber":function(u,p){throw new Error("median(A, dim) is not yet supported")},"...":function(u){if(di(u))throw new TypeError("Scalar values expected in function median");return s(u)}})});var _T="mad",sW=["typed","abs","map","median","subtract"],TT=T(_T,sW,e=>{var{typed:r,abs:t,map:n,median:i,subtract:a}=e;return r(_T,{"Array | Matrix":s,"...":function(f){return s(f)}});function s(l){if(l=gr(l.valueOf()),l.length===0)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var f=i(l);return i(n(l,function(o){return t(a(o,f))}))}catch(o){throw o instanceof TypeError&&o.message.indexOf("median")!==-1?new TypeError(o.message.replace("median","mad")):St(o,"mad")}}});var yg="unbiased",FT="variance",uW=["typed","add","subtract","multiply","divide","apply","isNaN"],Up=T(FT,uW,e=>{var{typed:r,add:t,subtract:n,multiply:i,divide:a,apply:s,isNaN:l}=e;return r(FT,{"Array | Matrix":function(p){return f(p,yg)},"Array | Matrix, string":f,"Array | Matrix, number | BigNumber":function(p,h){return o(p,h,yg)},"Array | Matrix, number | BigNumber, string":o,"...":function(p){return f(p,yg)}});function f(u,p){var h,d=0;if(u.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");if(hn(u,function(y){try{h=h===void 0?y:t(h,y),d++}catch(w){throw St(w,"variance",y)}}),d===0)throw new Error("Cannot calculate variance of an empty array");var x=a(h,d);if(h=void 0,hn(u,function(y){var w=n(y,x);h=h===void 0?i(w,w):t(h,i(w,w))}),l(h))return h;switch(p){case"uncorrected":return a(h,d);case"biased":return a(h,d+1);case"unbiased":{var v=je(h)?h.mul(0):0;return d===1?v:a(h,d-1)}default:throw new Error('Unknown normalization "'+p+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function o(u,p,h){try{if(u.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");return s(u,p,d=>f(d,h))}catch(d){throw St(d,"variance")}}});var OT="quantileSeq",fW=["typed","?bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger"],zp=T(OT,fW,e=>{var{typed:r,bignumber:t,add:n,subtract:i,divide:a,multiply:s,partitionSelect:l,compare:f,isInteger:o,smaller:u,smallerEq:p,larger:h}=e,d=ou({typed:r,isInteger:o});return r(OT,{"Array | Matrix, number | BigNumber":(C,b)=>v(C,b,!1),"Array | Matrix, number | BigNumber, number":(C,b,A)=>x(C,b,!1,A,v),"Array | Matrix, number | BigNumber, boolean":v,"Array | Matrix, number | BigNumber, boolean, number":(C,b,A,E)=>x(C,b,A,E,v),"Array | Matrix, Array | Matrix":(C,b)=>y(C,b,!1),"Array | Matrix, Array | Matrix, number":(C,b,A)=>x(C,b,!1,A,y),"Array | Matrix, Array | Matrix, boolean":y,"Array | Matrix, Array | Matrix, boolean, number":(C,b,A,E)=>x(C,b,A,E,y)});function x(C,b,A,E,S){return d(C,E,O=>S(O,b,A))}function v(C,b,A){var E,S=C.valueOf();if(u(b,0))throw new Error("N/prob must be non-negative");if(p(b,1))return ar(b)?w(S,b,A):t(w(S,b,A));if(h(b,1)){if(!o(b))throw new Error("N must be a positive integer");if(h(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);E=[];for(var F=0;u(F,b);F++){var M=a(F+1,O);E.push(w(S,M,A))}return ar(b)?E:t(E)}}function y(C,b,A){for(var E=C.valueOf(),S=b.valueOf(),O=[],F=0;F0&&(_=E[L])}return n(s(_,i(1,M)),s(k,M))}});var BT="std",lW=["typed","map","sqrt","variance"],Wp=T(BT,lW,e=>{var{typed:r,map:t,sqrt:n,variance:i}=e;return r(BT,{"Array | Matrix":a,"Array | Matrix, string":a,"Array | Matrix, number | BigNumber":a,"Array | Matrix, number | BigNumber, string":a,"...":function(l){return a(l)}});function a(s,l){if(s.length===0)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{var f=i.apply(null,arguments);return bt(f)?t(f,n):n(f)}catch(o){throw o instanceof TypeError&&o.message.indexOf(" variance")!==-1?new TypeError(o.message.replace(" variance"," std")):o}}});var IT="corr",cW=["typed","matrix","mean","sqrt","sum","add","subtract","multiply","pow","divide"],PT=T(IT,cW,e=>{var{typed:r,matrix:t,sqrt:n,sum:i,add:a,subtract:s,multiply:l,pow:f,divide:o}=e;return r(IT,{"Array, Array":function(d,x){return u(d,x)},"Matrix, Matrix":function(d,x){var v=u(d.toArray(),x.toArray());return Array.isArray(v)?t(v):v}});function u(h,d){var x=[];if(Array.isArray(h[0])&&Array.isArray(d[0])){if(h.length!==d.length)throw new SyntaxError("Dimension mismatch. Array A and B must have the same length.");for(var v=0;va(S,l(O,d[F])),0),C=i(h.map(S=>f(S,2))),b=i(d.map(S=>f(S,2))),A=s(l(x,w),l(v,y)),E=n(l(s(l(x,C),f(v,2)),s(l(x,b),f(y,2))));return o(A,E)}});var kT="combinations",pW=["typed"],LT=T(kT,pW,e=>{var{typed:r}=e;return r(kT,{"number, number":Ov,"BigNumber, BigNumber":function(n,i){var a=n.constructor,s,l,f=n.minus(i),o=new a(1);if(!RT(n)||!RT(i))throw new TypeError("Positive integer value expected in function combinations");if(i.gt(n))throw new TypeError("k must be less than n in function combinations");if(s=o,i.lt(f))for(l=o;l.lte(f);l=l.plus(o))s=s.times(i.plus(l)).dividedBy(l);else for(l=o;l.lte(i);l=l.plus(o))s=s.times(f.plus(l)).dividedBy(l);return s}})});function RT(e){return e.isInteger()&&e.gte(0)}var qT="combinationsWithRep",mW=["typed"],zT=T(qT,mW,e=>{var{typed:r}=e;return r(qT,{"number, number":function(n,i){if(!He(n)||n<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(!He(i)||i<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(i{var{typed:r,config:t,multiplyScalar:n,pow:i,BigNumber:a,Complex:s}=e;function l(o){if(o.im===0)return Df(o.re);if(o.re<.5){var u=new s(1-o.re,-o.im),p=new s(Math.PI*o.re,Math.PI*o.im);return new s(Math.PI).div(p.sin()).div(l(u))}o=new s(o.re-1,o.im);for(var h=new s(is[0],0),d=1;d2;)h-=2,x+=h,d=d.times(x);return new a(d.toPrecision(a.precision))}});var YT="lgamma",dW=["Complex","typed"],HT=T(YT,dW,e=>{var{Complex:r,typed:t}=e,n=7,i=7,a=[-.029550653594771242,.00641025641025641,-.0019175269175269176,.0008417508417508417,-.0005952380952380953,.0007936507936507937,-.002777777777777778,.08333333333333333];return t(YT,{number:Sf,Complex:s,BigNumber:function(){throw new Error("mathjs doesn't yet provide an implementation of the algorithm lgamma for BigNumber")}});function s(o){var u=6.283185307179586,p=1.1447298858494002,h=.1;if(o.isNaN())return new r(NaN,NaN);if(o.im===0)return new r(Sf(o.re),0);if(o.re>=n||Math.abs(o.im)>=i)return l(o);if(o.re<=h){var d=dy(u,o.im)*Math.floor(.5*o.re+.25),x=o.mul(Math.PI).sin().log(),v=s(new r(1-o.re,-o.im));return new r(p,d).sub(x).sub(v)}else return o.im>=0?f(o):f(o.conjugate()).conjugate()}function l(o){for(var u=o.sub(.5).mul(o.log()).sub(o).add(qv),p=new r(1,0).div(o),h=p.div(o),d=a[0],x=a[1],v=2*h.re,y=h.re*h.re+h.im*h.im,w=2;w<8;w++){var C=x;x=-y*d+a[w],d=v*d+C}var b=p.mul(h.mul(d).add(x));return u.add(b)}function f(o){var u=0,p=0,h=o;for(o=o.add(1);o.re<=n;){h=h.mul(o);var d=h.im<0?1:0;d!==0&&p===0&&u++,p=d,o=o.add(1)}return l(o).sub(h.log()).sub(new r(0,u*2*Math.PI*1))}});var GT="factorial",vW=["typed","gamma"],$T=T(GT,vW,e=>{var{typed:r,gamma:t}=e;return r(GT,{number:function(i){if(i<0)throw new Error("Value must be non-negative");return t(i+1)},BigNumber:function(i){if(i.isNegative())throw new Error("Value must be non-negative");return t(i.plus(1))},"Array | Matrix":r.referToSelf(n=>i=>Je(i,n))})});var ZT="kldivergence",gW=["typed","matrix","divide","sum","multiply","map","dotDivide","log","isNumeric"],QT=T(ZT,gW,e=>{var{typed:r,matrix:t,divide:n,sum:i,multiply:a,map:s,dotDivide:l,log:f,isNumeric:o}=e;return r(ZT,{"Array, Array":function(h,d){return u(t(h),t(d))},"Matrix, Array":function(h,d){return u(h,t(d))},"Array, Matrix":function(h,d){return u(t(h),d)},"Matrix, Matrix":function(h,d){return u(h,d)}});function u(p,h){var d=h.size().length,x=p.size().length;if(d>1)throw new Error("first object must be one dimensional");if(x>1)throw new Error("second object must be one dimensional");if(d!==x)throw new Error("Length of two vectors must be equal");var v=i(p);if(v===0)throw new Error("Sum of elements in first object must be non zero");var y=i(h);if(y===0)throw new Error("Sum of elements in second object must be non zero");var w=n(p,i(p)),C=n(h,i(h)),b=i(a(w,s(l(w,C),A=>f(A))));return o(b)?b:Number.NaN}});var XT="multinomial",xW=["typed","add","divide","multiply","factorial","isInteger","isPositive"],JT=T(XT,xW,e=>{var{typed:r,add:t,divide:n,multiply:i,factorial:a,isInteger:s,isPositive:l}=e;return r(XT,{"Array | Matrix":function(o){var u=0,p=1;return hn(o,function(h){if(!s(h)||!l(h))throw new TypeError("Positive integer value expected in function multinomial");u=t(u,h),p=i(p,a(h))}),n(a(u),p)}})});var KT="permutations",yW=["typed","factorial"],eF=T(KT,yW,e=>{var{typed:r,factorial:t}=e;return r(KT,{"number | BigNumber":t,"number, number":function(i,a){if(!He(i)||i<0)throw new TypeError("Positive integer value expected in function permutations");if(!He(a)||a<0)throw new TypeError("Positive integer value expected in function permutations");if(a>i)throw new TypeError("second argument k must be less than or equal to first argument n");return Kn(i-a+1,i)},"BigNumber, BigNumber":function(i,a){var s,l;if(!jT(i)||!jT(a))throw new TypeError("Positive integer value expected in function permutations");if(a.gt(i))throw new TypeError("second argument k must be less than or equal to first argument n");var f=i.mul(0).add(1);for(s=f,l=i.minus(a).plus(1);l.lte(i);l=l.plus(1))s=s.times(l);return s}})});function jT(e){return e.isInteger()&&e.gte(0)}var Eg=ci(gF(),1),EW=(0,Eg.default)(Date.now());function Ua(e){var r;function t(i){r=i===null?EW:(0,Eg.default)(String(i))}t(e);function n(){return r()}return n}var xF="pickRandom",CW=["typed","config","?on"],yF=T(xF,CW,e=>{var{typed:r,config:t,on:n}=e,i=Ua(t.randomSeed);return n&&n("config",function(s,l){s.randomSeed!==l.randomSeed&&(i=Ua(s.randomSeed))}),r(xF,{"Array | Matrix":function(l){return a(l,{})},"Array | Matrix, Object":function(l,f){return a(l,f)},"Array | Matrix, number":function(l,f){return a(l,{number:f})},"Array | Matrix, Array | Matrix":function(l,f){return a(l,{weights:f})},"Array | Matrix, Array | Matrix, number":function(l,f,o){return a(l,{number:o,weights:f})},"Array | Matrix, number, Array | Matrix":function(l,f,o){return a(l,{number:f,weights:o})}});function a(s,l){var{number:f,weights:o,elementWise:u=!0}=l,p=typeof f>"u";p&&(f=1);var h=Ge(s)?s.create:Ge(o)?o.create:null;s=s.valueOf(),o&&(o=o.valueOf()),u===!0&&(s=gr(s),o=gr(o));var d=0;if(typeof o<"u"){if(o.length!==s.length)throw new Error("Weights must have the same length as possibles");for(var x=0,v=o.length;x"u")C=s[Math.floor(i()*y)];else for(var b=i()*d,A=0,E=s.length;A1)for(var n=0,i=e.shift();n{var{typed:r,config:t,on:n}=e,i=Ua(t.randomSeed);return n&&n("config",function(l,f){l.randomSeed!==f.randomSeed&&(i=Ua(l.randomSeed))}),r(bF,{"":()=>s(0,1),number:l=>s(0,l),"number, number":(l,f)=>s(l,f),"Array | Matrix":l=>a(l,0,1),"Array | Matrix, number":(l,f)=>a(l,0,f),"Array | Matrix, number, number":(l,f,o)=>a(l,f,o)});function a(l,f,o){var u=Mf(l.valueOf(),()=>s(f,o));return Ge(l)?l.create(u):u}function s(l,f){return l+i()*(f-l)}});var DF="randomInt",_W=["typed","config","?on"],SF=T(DF,_W,e=>{var{typed:r,config:t,on:n}=e,i=Ua(t.randomSeed);return n&&n("config",function(l,f){l.randomSeed!==f.randomSeed&&(i=Ua(l.randomSeed))}),r(DF,{"":()=>s(0,1),number:l=>s(0,l),"number, number":(l,f)=>s(l,f),"Array | Matrix":l=>a(l,0,1),"Array | Matrix, number":(l,f)=>a(l,0,f),"Array | Matrix, number, number":(l,f,o)=>a(l,f,o)});function a(l,f,o){var u=Mf(l.valueOf(),()=>s(f,o));return Ge(l)?l.create(u):u}function s(l,f){return Math.floor(l+i()*(f-l))}});var NF="stirlingS2",TW=["typed","addScalar","subtractScalar","multiplyScalar","divideScalar","pow","factorial","combinations","isNegative","isInteger","number","?bignumber","larger"],AF=T(NF,TW,e=>{var{typed:r,addScalar:t,subtractScalar:n,multiplyScalar:i,divideScalar:a,pow:s,factorial:l,combinations:f,isNegative:o,isInteger:u,number:p,bignumber:h,larger:d}=e,x=[],v=[];return r(NF,{"number | BigNumber, number | BigNumber":function(w,C){if(!u(w)||o(w)||!u(C)||o(C))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(d(C,w))throw new TypeError("k must be less than or equal to n in function stirlingS2");var b=!(ar(w)&&ar(C)),A=b?v:x,E=b?h:p,S=p(w),O=p(C);if(A[S]&&A[S].length>O)return A[S][O];for(var F=0;F<=S;++F)if(A[F]||(A[F]=[E(F===0?1:0)]),F!==0)for(var M=A[F],_=A[F-1],k=M.length;k<=F&&k<=O;++k)k===F?M[k]=1:M[k]=t(i(E(k),_[k]),_[k-1]);return A[S][O]}})});var EF="bellNumbers",FW=["typed","addScalar","isNegative","isInteger","stirlingS2"],CF=T(EF,FW,e=>{var{typed:r,addScalar:t,isNegative:n,isInteger:i,stirlingS2:a}=e;return r(EF,{"number | BigNumber":function(l){if(!i(l)||n(l))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var f=0,o=0;o<=l;o++)f=t(f,a(l,o));return f}})});var MF="catalan",OW=["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],_F=T(MF,OW,e=>{var{typed:r,addScalar:t,divideScalar:n,multiplyScalar:i,combinations:a,isNegative:s,isInteger:l}=e;return r(MF,{"number | BigNumber":function(o){if(!l(o)||s(o))throw new TypeError("Non-negative integer value expected in function catalan");return n(a(i(o,2),o),t(o,1))}})});var TF="composition",BW=["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],FF=T(TF,BW,e=>{var{typed:r,addScalar:t,combinations:n,isPositive:i,isNegative:a,isInteger:s,larger:l}=e;return r(TF,{"number | BigNumber, number | BigNumber":function(o,u){if(!s(o)||!i(o)||!s(u)||!i(u))throw new TypeError("Positive integer value expected in function composition");if(l(u,o))throw new TypeError("k must be less than or equal to n in function composition");return n(t(o,-1),t(u,-1))}})});var OF="leafCount",IW=["parse","typed"],BF=T(OF,IW,e=>{var{parse:r,typed:t}=e;function n(i){var a=0;return i.forEach(s=>{a+=n(s)}),a||1}return t(OF,{Node:function(a){return n(a)}})});function Cg(e){return yr(e)||ut(e)&&e.isUnary()&&yr(e.args[0])}function _f(e){return!!(yr(e)||(fn(e)||ut(e))&&e.args.every(_f)||Zt(e)&&_f(e.content))}function IF(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function Mg(e){for(var r=1;r{var{FunctionNode:r,OperatorNode:t,SymbolNode:n}=e,i=!0,a=!1,s="defaultF",l={add:{trivial:i,total:i,commutative:i,associative:i},unaryPlus:{trivial:i,total:i,commutative:i,associative:i},subtract:{trivial:a,total:i,commutative:a,associative:a},multiply:{trivial:i,total:i,commutative:i,associative:i},divide:{trivial:a,total:i,commutative:a,associative:a},paren:{trivial:i,total:i,commutative:i,associative:a},defaultF:{trivial:a,total:i,commutative:a,associative:a}},f={divide:{total:a},log:{total:a}},o={subtract:{total:a},abs:{trivial:i},log:{total:i}};function u(b,A){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:l,S=s;if(typeof b=="string"?S=b:ut(b)?S=b.fn.toString():fn(b)?S=b.name:Zt(b)&&(S="paren"),$e(E,S)){var O=E[S];if($e(O,A))return O[A];if($e(l,S))return l[S][A]}if($e(E,s)){var F=E[s];return $e(F,A)?F[A]:l[s][A]}if($e(l,S)){var M=l[S];if($e(M,A))return M[A]}return l[s][A]}function p(b){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;return u(b,"commutative",A)}function h(b){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;return u(b,"associative",A)}function d(b,A){var E=Mg({},b);for(var S in A)$e(b,S)?E[S]=Mg(Mg({},A[S]),b[S]):E[S]=A[S];return E}function x(b,A){if(!b.args||b.args.length===0)return b;b.args=v(b,A);for(var E=0;E2&&h(b,A)){for(var F=b.args.pop();b.args.length>0;)F=E([b.args.pop(),F]);b.args=F.args}}}function w(b,A){if(!(!b.args||b.args.length===0)){for(var E=C(b),S=b.args.length,O=0;O2&&h(b,A)){for(var F=b.args.shift();b.args.length>0;)F=E([F,b.args.shift()]);b.args=F.args}}}function C(b){return ut(b)?function(A){try{return new t(b.op,b.fn,A,b.implicit)}catch(E){return console.error(E),[]}}:function(A){return new r(new n(b.name),A)}}return{createMakeNodeFunction:C,hasProperty:u,isCommutative:p,isAssociative:h,mergeContext:d,flatten:x,allChildren:v,unflattenr:y,unflattenl:w,defaultContext:l,realContext:f,positiveContext:o}});var RW="simplify",LW=["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"],PF=T(RW,LW,e=>{var{config:r,typed:t,parse:n,add:i,subtract:a,multiply:s,divide:l,pow:f,isZero:o,equal:u,resolve:p,simplifyConstant:h,simplifyCore:d,fraction:x,bignumber:v,mathWithTransform:y,matrix:w,AccessorNode:C,ArrayNode:b,ConstantNode:A,FunctionNode:E,IndexNode:S,ObjectNode:O,OperatorNode:F,ParenthesisNode:M,SymbolNode:_}=e,{hasProperty:k,isCommutative:L,isAssociative:Y,mergeContext:$,flatten:V,unflattenr:q,unflattenl:R,createMakeNodeFunction:j,defaultContext:U,realContext:oe,positiveContext:me}=du({FunctionNode:E,OperatorNode:F,SymbolNode:_});t.addConversion({from:"Object",to:"Map",convert:ka});var ie=t("simplify",{Node:xe,"Node, Map":(ee,ne)=>xe(ee,!1,ne),"Node, Map, Object":(ee,ne,ue)=>xe(ee,!1,ne,ue),"Node, Array":xe,"Node, Array, Map":xe,"Node, Array, Map, Object":xe});t.removeConversion({from:"Object",to:"Map",convert:ka}),ie.defaultContext=U,ie.realContext=oe,ie.positiveContext=me;function H(ee){return ee.transform(function(ne,ue,Ee){return Zt(ne)?H(ne.content):ne})}var ce={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};ie.rules=[d,{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}}},h,{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}}},h,{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 Me(ee,ne){var ue={};if(ee.s){var Ee=ee.s.split("->");if(Ee.length===2)ue.l=Ee[0],ue.r=Ee[1];else throw SyntaxError("Could not parse rule: "+ee.s)}else ue.l=ee.l,ue.r=ee.r;ue.l=H(n(ue.l)),ue.r=H(n(ue.r));for(var Ce of["imposeContext","repeat","assuming"])Ce in ee&&(ue[Ce]=ee[Ce]);if(ee.evaluate&&(ue.evaluate=n(ee.evaluate)),Y(ue.l,ne)){var Le=!L(ue.l,ne),Ie;Le&&(Ie=Se());var sr=j(ue.l),ir=Se();ue.expanded={},ue.expanded.l=sr([ue.l,ir]),V(ue.expanded.l,ne),q(ue.expanded.l,ne),ue.expanded.r=sr([ue.r,ir]),Le&&(ue.expandedNC1={},ue.expandedNC1.l=sr([Ie,ue.l]),ue.expandedNC1.r=sr([Ie,ue.r]),ue.expandedNC2={},ue.expandedNC2.l=sr([Ie,ue.expanded.l]),ue.expandedNC2.r=sr([Ie,ue.expanded.r]))}return ue}function pe(ee,ne){for(var ue=[],Ee=0;Ee2&&arguments[2]!==void 0?arguments[2]:go(),Ee=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},Ce=Ee.consoleDebug;ne=pe(ne||ie.rules,Ee.context);var Le=p(ee,ue);Le=H(Le);for(var Ie={},sr=Le.toString({parenthesis:"all"});!Ie[sr];){Ie[sr]=!0,ge=0;var ir=sr;Ce&&console.log("Working on: ",sr);for(var Xe=0;Xe ").concat(ne[Xe].r.toString()))),Ce){var re=Le.toString({parenthesis:"all"});re!==ir&&(console.log("Applying",Or,"produced",re),ir=re)}R(Le,Ee.context)}sr=Le.toString({parenthesis:"all"})}return Le}function be(ee,ne,ue){var Ee=ee;if(ee)for(var Ce=0;Ce1&&(ir=Le(ee.args.slice(0,sr))),Ce=ee.args.slice(sr),Ee=Ce.length===1?Ce[0]:Le(Ce),ue.push(Le([ir,Ee]))}return ue}function ze(ee,ne){var ue={placeholders:{}};if(!ee.placeholders&&!ne.placeholders)return ue;if(ee.placeholders){if(!ne.placeholders)return ee}else return ne;for(var Ee in ee.placeholders)if($e(ee.placeholders,Ee)&&(ue.placeholders[Ee]=ee.placeholders[Ee],$e(ne.placeholders,Ee)&&!ye(ee.placeholders[Ee],ne.placeholders[Ee])))return null;for(var Ce in ne.placeholders)$e(ne.placeholders,Ce)&&(ue.placeholders[Ce]=ne.placeholders[Ce]);return ue}function Ze(ee,ne){var ue=[];if(ee.length===0||ne.length===0)return ue;for(var Ee,Ce=0;Ce2)throw new Error("permuting >2 commutative non-associative rule arguments not yet implemented");var ir=te(ee.args[0],ne.args[1],ue);if(ir.length===0)return[];var Xe=te(ee.args[1],ne.args[0],ue);if(Xe.length===0)return[];Le=[ir,Xe]}Ce=K(Le)}else if(ne.args.length>=2&&ee.args.length===2){for(var Or=Ae(ne,ue),re=[],le=0;le2)throw Error("Unexpected non-binary associative function: "+ee.toString());return[]}}else if(ee instanceof _){if(ee.name.length===0)throw new Error("Symbol in rule has 0 length...!?");if(ce[ee.name]){if(ee.name!==ne.name)return[]}else switch(ee.name[1]>="a"&&ee.name[1]<="z"?ee.name.substring(0,2):ee.name[0]){case"n":case"_p":Ce[0].placeholders[ee.name]=ne;break;case"c":case"cl":if(yr(ne))Ce[0].placeholders[ee.name]=ne;else return[];break;case"v":if(!yr(ne))Ce[0].placeholders[ee.name]=ne;else return[];break;case"vl":if(rt(ne))Ce[0].placeholders[ee.name]=ne;else return[];break;case"cd":if(Cg(ne))Ce[0].placeholders[ee.name]=ne;else return[];break;case"vd":if(!Cg(ne))Ce[0].placeholders[ee.name]=ne;else return[];break;case"ce":if(_f(ne))Ce[0].placeholders[ee.name]=ne;else return[];break;case"ve":if(!_f(ne))Ce[0].placeholders[ee.name]=ne;else return[];break;default:throw new Error("Invalid symbol in rule: "+ee.name)}}else if(ee instanceof A){if(!u(ee.value,ne.value))return[]}else return[];return Ce}function ye(ee,ne){if(ee instanceof A&&ne instanceof A){if(!u(ee.value,ne.value))return!1}else if(ee instanceof _&&ne instanceof _){if(ee.name!==ne.name)return!1}else if(ee instanceof F&&ne instanceof F||ee instanceof E&&ne instanceof E){if(ee instanceof F){if(ee.op!==ne.op||ee.fn!==ne.fn)return!1}else if(ee instanceof E&&ee.name!==ne.name)return!1;if(ee.args.length!==ne.args.length)return!1;for(var ue=0;ue{var{typed:r,config:t,mathWithTransform:n,matrix:i,fraction:a,bignumber:s,AccessorNode:l,ArrayNode:f,ConstantNode:o,FunctionNode:u,IndexNode:p,ObjectNode:h,OperatorNode:d,SymbolNode:x}=e,{isCommutative:v,isAssociative:y,allChildren:w,createMakeNodeFunction:C}=du({FunctionNode:u,OperatorNode:d,SymbolNode:x}),b=r("simplifyConstant",{Node:V=>O($(V,{})),"Node, Object":function(q,R){return O($(q,R))}});function A(V){return Xn(V)?V.valueOf():V instanceof Array?V.map(A):Ge(V)?i(A(V.valueOf())):V}function E(V,q,R){try{return n[V].apply(null,q)}catch{return q=q.map(A),M(n[V].apply(null,q),R)}}var S=r({Fraction:k,number:function(q){return q<0?_(new o(-q)):new o(q)},BigNumber:function(q){return q<0?_(new o(-q)):new o(q)},Complex:function(q){throw new Error("Cannot convert Complex number to Node")},string:function(q){return new o(q)},Matrix:function(q){return new f(q.valueOf().map(R=>S(R)))}});function O(V){return Sr(V)?V:S(V)}function F(V,q){var R=q&&q.exactFractions!==!1;if(R&&isFinite(V)&&a){var j=a(V),U=q&&typeof q.fractionsLimit=="number"?q.fractionsLimit:1/0;if(j.valueOf()===V&&j.n0;)if(yr(j[0])&&typeof j[0].value!="string"){var U=M(j.shift().value,R);$t(V)?V=V.items[U-1]:(V=V.valueOf()[U-1],V instanceof Array&&(V=i(V)))}else if(j.length>1&&yr(j[1])&&typeof j[1].value!="string"){var oe=M(j[1].value,R),me=[],ie=$t(V)?V.items:V.valueOf();for(var H of ie)if($t(H))me.push(H.items[oe-1]);else if(Ge(V))me.push(H[oe-1]);else break;if(me.length===ie.length)$t(V)?V=new f(me):V=i(me),j.splice(1,1);else break}else break;return j.length===q.dimensions.length?new l(O(V),q):j.length>0?(q=new p(j),new l(O(V),q)):V}if(la(V)&&q.dimensions.length===1&&yr(q.dimensions[0])){var ce=q.dimensions[0].value;return ce in V.properties?V.properties[ce]:new o}return new l(O(V),q)}function Y(V,q,R,j){var U=q.shift(),oe=q.reduce((me,ie)=>{if(!Sr(ie)){var H=me.pop();if(Sr(H))return[H,ie];try{return me.push(E(V,[H,ie],j)),me}catch{me.push(H)}}me.push(O(me.pop()));var ce=me.length===1?me[0]:R(me);return[R([ce,O(ie)])]},[U]);return oe.length===1?oe[0]:R([oe[0],S(oe[1])])}function $(V,q){switch(V.type){case"SymbolNode":return V;case"ConstantNode":switch(typeof V.value){case"number":return M(V.value,q);case"string":return V.value;default:if(!isNaN(V.value))return M(V.value,q)}return V;case"FunctionNode":if(n[V.name]&&n[V.name].rawArgs)return V;{var R=["add","multiply"];if(R.indexOf(V.name)===-1){var j=V.args.map(De=>$(De,q));if(!j.some(Sr))try{return E(V.name,j,q)}catch{}if(V.name==="size"&&j.length===1&&$t(j[0])){for(var U=[],oe=j[0];$t(oe);)U.push(oe.items.length),oe=oe.items[0];return i(U)}return new u(V.name,j.map(O))}}case"OperatorNode":{var me=V.fn.toString(),ie,H,ce=C(V);if(ut(V)&&V.isUnary())ie=[$(V.args[0],q)],Sr(ie[0])?H=ce(ie):H=E(me,ie,q);else if(y(V,q.context))if(ie=w(V,q.context),ie=ie.map(De=>$(De,q)),v(me,q.context)){for(var Me=[],pe=[],ge=0;ge1?(H=Y(me,Me,ce,q),pe.unshift(H),H=Y(me,pe,ce,q)):H=Y(me,ie,ce,q)}else H=Y(me,ie,ce,q);else ie=V.args.map(De=>$(De,q)),H=Y(me,ie,ce,q);return H}case"ParenthesisNode":return $(V.content,q);case"AccessorNode":return L($(V.object,q),$(V.index,q),q);case"ArrayNode":{var Se=V.items.map(De=>$(De,q));return Se.some(Sr)?new f(Se.map(O)):i(Se)}case"IndexNode":return new p(V.dimensions.map(De=>b(De,q)));case"ObjectNode":{var xe={};for(var be in V.properties)xe[be]=b(V.properties[be],q);return new h(xe)}case"AssignmentNode":case"BlockNode":case"FunctionAssignmentNode":case"RangeNode":case"ConditionalNode":default:throw new Error("Unimplemented node type in simplifyConstant: ".concat(V.type))}}return b});var RF="simplifyCore",zW=["typed","parse","equal","isZero","add","subtract","multiply","divide","pow","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],LF=T(RF,zW,e=>{var{typed:r,parse:t,equal:n,isZero:i,add:a,subtract:s,multiply:l,divide:f,pow:o,AccessorNode:u,ArrayNode:p,ConstantNode:h,FunctionNode:d,IndexNode:x,ObjectNode:v,OperatorNode:y,ParenthesisNode:w,SymbolNode:C}=e,b=new h(0),A=new h(1),E=new h(!0),S=new h(!1);function O(k){return ut(k)&&["and","not","or"].includes(k.op)}var{hasProperty:F,isCommutative:M}=du({FunctionNode:d,OperatorNode:y,SymbolNode:C});function _(k){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Y=L?L.context:void 0;if(F(k,"trivial",Y)){if(fn(k)&&k.args.length===1)return _(k.args[0],L);var $=!1,V=0;if(k.forEach(pe=>{++V,V===1&&($=_(pe,L))}),V===1)return $}var q=k;if(fn(q)){var R=M2(q.name);if(R){if(q.args.length>2&&F(q,"associative",Y))for(;q.args.length>2;){var j=q.args.pop(),U=q.args.pop();q.args.push(new y(R,q.name,[j,U]))}q=new y(R,q.name,q.args)}else return new d(_(q.fn),q.args.map(pe=>_(pe,L)))}if(ut(q)&&q.isUnary()){var oe=_(q.args[0],L);if(q.op==="~"&&ut(oe)&&oe.isUnary()&&oe.op==="~"||q.op==="not"&&ut(oe)&&oe.isUnary()&&oe.op==="not"&&O(oe.args[0]))return oe.args[0];var me=!0;if(q.op==="-"&&ut(oe)&&(oe.isBinary()&&oe.fn==="subtract"&&(q=new y("-","subtract",[oe.args[1],oe.args[0]]),me=!1),oe.isUnary()&&oe.op==="-"))return oe.args[0];if(me)return new y(q.op,q.fn,[oe])}if(ut(q)&&q.isBinary()){var ie=_(q.args[0],L),H=_(q.args[1],L);if(q.op==="+"){if(yr(ie)&&i(ie.value))return H;if(yr(H)&&i(H.value))return ie;ut(H)&&H.isUnary()&&H.op==="-"&&(H=H.args[0],q=new y("-","subtract",[ie,H]))}if(q.op==="-")return ut(H)&&H.isUnary()&&H.op==="-"?_(new y("+","add",[ie,H.args[0]]),L):yr(ie)&&i(ie.value)?_(new y("-","unaryMinus",[H])):yr(H)&&i(H.value)?ie:new y(q.op,q.fn,[ie,H]);if(q.op==="*"){if(yr(ie)){if(i(ie.value))return b;if(n(ie.value,1))return H}if(yr(H)){if(i(H.value))return b;if(n(H.value,1))return ie;if(M(q,Y))return new y(q.op,q.fn,[H,ie],q.implicit)}return new y(q.op,q.fn,[ie,H],q.implicit)}if(q.op==="/")return yr(ie)&&i(ie.value)?b:yr(H)&&n(H.value,1)?ie:new y(q.op,q.fn,[ie,H]);if(q.op==="^"&&yr(H)){if(i(H.value))return A;if(n(H.value,1))return ie}if(q.op==="and"){if(yr(ie))if(ie.value){if(O(H))return H;if(yr(H))return H.value?E:S}else return S;if(yr(H))if(H.value){if(O(ie))return ie}else return S}if(q.op==="or"){if(yr(ie)){if(ie.value)return E;if(O(H))return H}if(yr(H)){if(H.value)return E;if(O(ie))return ie}}return new y(q.op,q.fn,[ie,H])}if(ut(q))return new y(q.op,q.fn,q.args.map(pe=>_(pe,L)));if($t(q))return new p(q.items.map(pe=>_(pe,L)));if(Sn(q))return new u(_(q.object,L),_(q.index,L));if(kn(q))return new x(q.dimensions.map(pe=>_(pe,L)));if(la(q)){var ce={};for(var Me in q.properties)ce[Me]=_(q.properties[Me],L);return new v(ce)}return q}return r(RF,{Node:_,"Node,Object":_})});var WW="resolve",VW=["typed","parse","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode"],qF=T(WW,VW,e=>{var{typed:r,parse:t,ConstantNode:n,FunctionNode:i,OperatorNode:a,ParenthesisNode:s}=e;function l(f,o){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Set;if(!o)return f;if(rt(f)){if(u.has(f.name)){var p=Array.from(u).join(", ");throw new ReferenceError("recursive loop of variable definitions among {".concat(p,"}"))}var h=o.get(f.name);if(Sr(h)){var d=new Set(u);return d.add(f.name),l(h,o,d)}else return typeof h=="number"?t(String(h)):h!==void 0?new n(h):f}else if(ut(f)){var x=f.args.map(function(y){return l(y,o,u)});return new a(f.op,f.fn,x,f.implicit)}else{if(Zt(f))return new s(l(f.content,o,u));if(fn(f)){var v=f.args.map(function(y){return l(y,o,u)});return new i(f.name,v)}}return f.map(y=>l(y,o,u))}return r("resolve",{Node:l,"Node, Map | null | undefined":l,"Node, Object":(f,o)=>l(f,ka(o)),"Array | Matrix":r.referToSelf(f=>o=>o.map(u=>f(u))),"Array | Matrix, null | undefined":r.referToSelf(f=>o=>o.map(u=>f(u))),"Array, Object":r.referTo("Array,Map",f=>(o,u)=>f(o,ka(u))),"Matrix, Object":r.referTo("Matrix,Map",f=>(o,u)=>f(o,ka(u))),"Array | Matrix, Map":r.referToSelf(f=>(o,u)=>o.map(p=>f(p,u)))})});var UF="symbolicEqual",YW=["parse","simplify","typed","OperatorNode"],zF=T(UF,YW,e=>{var{parse:r,simplify:t,typed:n,OperatorNode:i}=e;function a(s,l){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=new i("-","subtract",[s,l]),u=t(o,{},f);return yr(u)&&!u.value}return n(UF,{"Node, Node":a,"Node, Node, Object":a})});var WF="derivative",HW=["typed","config","parse","simplify","equal","isZero","numeric","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],VF=T(WF,HW,e=>{var{typed:r,config:t,parse:n,simplify:i,equal:a,isZero:s,numeric:l,ConstantNode:f,FunctionNode:o,OperatorNode:u,ParenthesisNode:p,SymbolNode:h}=e;function d(b,A){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{simplify:!0},S={};y(S,b,A.name);var O=w(b,S);return E.simplify?i(O):O}r.addConversion({from:"identifier",to:"SymbolNode",convert:n});var x=r(WF,{"Node, SymbolNode":d,"Node, SymbolNode, Object":d});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(A,E){return yr(A)&&_r(A.value)==="string"?v(n(A.value).toString(),E.toString(),1):v(A.toTex(),E.toString(),1)},"Node, ConstantNode":function(A,E){if(_r(E.value)==="string")return v(A,n(E.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(A,E,S){return v(A.toString(),E.name,S.value)},"string, string, number":function(A,E,S){var O;return S===1?O="{d\\\\over d"+E+"}":O="{d^{"+S+"}\\\\over d"+E+"^{"+S+"}}",O+"\\\\left[".concat(A,"\\\\right]")}}),y=r("constTag",{"Object, ConstantNode, string":function(A,E){return A[E]=!0,!0},"Object, SymbolNode, string":function(A,E,S){return E.name!==S?(A[E]=!0,!0):!1},"Object, ParenthesisNode, string":function(A,E,S){return y(A,E.content,S)},"Object, FunctionAssignmentNode, string":function(A,E,S){return E.params.indexOf(S)===-1?(A[E]=!0,!0):y(A,E.expr,S)},"Object, FunctionNode | OperatorNode, string":function(A,E,S){if(E.args.length>0){for(var O=y(A,E.args[0],S),F=1;F0){var O=A.args.filter(function(V){return E[V]===void 0}),F=O.length===1?O[0]:new u("*","multiply",O),M=S.concat(w(F,E));return new u("*","multiply",M)}return new u("+","add",A.args.map(function(V){return new u("*","multiply",A.args.map(function(q){return q===V?w(q,E):q.clone()}))}))}if(A.op==="/"&&A.isBinary()){var _=A.args[0],k=A.args[1];return E[k]!==void 0?new u("/","divide",[w(_,E),k]):E[_]!==void 0?new u("*","multiply",[new u("-","unaryMinus",[_]),new u("/","divide",[w(k,E),new u("^","pow",[k.clone(),C(2)])])]):new u("/","divide",[new u("-","subtract",[new u("*","multiply",[w(_,E),k.clone()]),new u("*","multiply",[_.clone(),w(k,E)])]),new u("^","pow",[k.clone(),C(2)])])}if(A.op==="^"&&A.isBinary()){var L=A.args[0],Y=A.args[1];if(E[L]!==void 0)return yr(L)&&(s(L.value)||a(L.value,1))?C(0):new u("*","multiply",[A,new u("*","multiply",[new o("log",[L.clone()]),w(Y.clone(),E)])]);if(E[Y]!==void 0){if(yr(Y)){if(s(Y.value))return C(0);if(a(Y.value,1))return w(L,E)}var $=new u("^","pow",[L.clone(),new u("-","subtract",[Y,C(1)])]);return new u("*","multiply",[Y.clone(),new u("*","multiply",[w(L,E),$])])}return new u("*","multiply",[new u("^","pow",[L.clone(),Y.clone()]),new u("+","add",[new u("*","multiply",[w(L,E),new u("/","divide",[Y.clone(),L.clone()])]),new u("*","multiply",[w(Y,E),new o("log",[L.clone()])])])])}throw new Error('Cannot process operator "'+A.op+'" in derivative: the operator is not supported, undefined, or the number of arguments passed to it are not supported')}});function C(b,A){return new f(l(b,A||t.number))}return x});var YF="rationalize",GW=["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"],HF=T(YF,GW,e=>{var{config:r,typed:t,equal:n,isZero:i,add:a,subtract:s,multiply:l,divide:f,pow:o,parse:u,simplifyConstant:p,simplifyCore:h,simplify:d,fraction:x,bignumber:v,mathWithTransform:y,matrix:w,AccessorNode:C,ArrayNode:b,ConstantNode:A,FunctionNode:E,IndexNode:S,ObjectNode:O,OperatorNode:F,SymbolNode:M,ParenthesisNode:_}=e;function k(q){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,U=Y(),oe=L(q,R,!0,U.firstRules),me=oe.variables.length,ie={exactFractions:!1},H={exactFractions:!0};if(q=oe.expression,me>=1){q=$(q);var ce,Me,pe=!0,ge=!1;q=d(q,U.firstRules,{},ie);for(var Se;Me=pe?U.distrDivRules:U.sucDivRules,q=d(q,Me,{},H),pe=!pe,Se=q.toString(),Se!==ce;)ge=!0,ce=Se;ge&&(q=d(q,U.firstRulesAgain,{},ie)),q=d(q,U.finalRules,{},ie)}var xe=[],be={};return q.type==="OperatorNode"&&q.isBinary()&&q.op==="/"?(me===1&&(q.args[0]=V(q.args[0],xe),q.args[1]=V(q.args[1])),j&&(be.numerator=q.args[0],be.denominator=q.args[1])):(me===1&&(q=V(q,xe)),j&&(be.numerator=q,be.denominator=null)),j?(be.coefficients=xe,be.variables=oe.variables,be.expression=q,be):q}return t(YF,{Node:k,"Node, boolean":(q,R)=>k(q,{},R),"Node, Object":k,"Node, Object, boolean":k});function L(q,R,j,U){var oe=[],me=d(q,U,R,{exactFractions:!1});j=!!j;var ie="+-*"+(j?"/":"");ce(me);var H={};return H.expression=me,H.variables=oe,H;function ce(Me){var pe=Me.type;if(pe==="FunctionNode")throw new Error("There is an unsolved function call");if(pe==="OperatorNode")if(Me.op==="^"){if(Me.args[1].type!=="ConstantNode"||!He(parseFloat(Me.args[1].value)))throw new Error("There is a non-integer exponent");ce(Me.args[0])}else{if(ie.indexOf(Me.op)===-1)throw new Error("Operator "+Me.op+" invalid in polynomial expression");for(var ge=0;ge1;if(U==="OperatorNode"&&q.isBinary()){var me=!1,ie;if(q.op==="^"&&(q.args[0].type==="ParenthesisNode"||q.args[0].type==="OperatorNode")&&q.args[1].type==="ConstantNode"&&(ie=parseFloat(q.args[1].value),me=ie>=2&&He(ie)),me){if(ie>2){var H=q.args[0],ce=new F("^","pow",[q.args[0].cloneDeep(),new A(ie-1)]);q=new F("*","multiply",[H,ce])}else q=new F("*","multiply",[q.args[0],q.args[0].cloneDeep()]);oe&&(j==="content"?R.content=q:R.args[j]=q)}}if(U==="ParenthesisNode")$(q.content,q,"content");else if(U!=="ConstantNode"&&U!=="SymbolNode")for(var Me=0;Me=0;H--)if(R[H]!==0){var ce=new A(me?R[H]:Math.abs(R[H])),Me=R[H]<0?"-":"+";if(H>0){var pe=new M(oe);if(H>1){var ge=new A(H);pe=new F("^","pow",[pe,ge])}R[H]===-1&&me?ce=new F("-","unaryMinus",[pe]):Math.abs(R[H])===1?ce=pe:ce=new F("*","multiply",[ce,pe])}me?ie=ce:Me==="+"?ie=new F("+","add",[ie,ce]):ie=new F("-","subtract",[ie,ce]),me=!1}if(me)return new A(0);return ie;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 ze=0;zeU&&(R[Ze]=0),R[Ze]+=De.cte*(De.oper==="+"?1:-1),U=Math.max(Ze,U);return}De.cte=Ze,De.fire===""&&(R[0]+=De.cte*(De.oper==="+"?1:-1))}else throw new Error("Type "+Ae+" is not allowed")}}});var GF="zpk2tf",$W=["typed","add","multiply","Complex","number"],$F=T(GF,$W,e=>{var{typed:r,add:t,multiply:n,Complex:i,number:a}=e;return r(GF,{"Array,Array,number":function(o,u,p){return s(o,u,p)},"Array,Array":function(o,u){return s(o,u,1)},"Matrix,Matrix,number":function(o,u,p){return s(o.valueOf(),u.valueOf(),p)},"Matrix,Matrix":function(o,u){return s(o.valueOf(),u.valueOf(),1)}});function s(f,o,u){f.some(C=>C.type==="BigNumber")&&(f=f.map(C=>a(C))),o.some(C=>C.type==="BigNumber")&&(o=o.map(C=>a(C)));for(var p=[i(1,0)],h=[i(1,0)],d=0;d=0&&p-h{var{typed:r,add:t,multiply:n,Complex:i,divide:a,matrix:s}=e;return r(ZF,{"Array, Array":function(u,p){var h=f(512);return l(u,p,h)},"Array, Array, Array":function(u,p,h){return l(u,p,h)},"Array, Array, number":function(u,p,h){if(h<0)throw new Error("w must be a positive number");var d=f(h);return l(u,p,d)},"Matrix, Matrix":function(u,p){var h=f(512),{w:d,h:x}=l(u.valueOf(),p.valueOf(),h);return{w:s(d),h:s(x)}},"Matrix, Matrix, Matrix":function(u,p,h){var{h:d}=l(u.valueOf(),p.valueOf(),h.valueOf());return{h:s(d),w:s(h)}},"Matrix, Matrix, number":function(u,p,h){if(h<0)throw new Error("w must be a positive number");var d=f(h),{h:x}=l(u.valueOf(),p.valueOf(),d);return{h:s(x),w:s(d)}}});function l(o,u,p){for(var h=[],d=[],x=0;x{var{classes:r}=e;return function(n,i){var a=r[i&&i.mathjs];return a&&typeof a.fromJSON=="function"?a.fromJSON(i):i}});var JW="replacer",KW=[],JF=T(JW,KW,()=>function(r,t){return typeof t=="number"&&(!isFinite(t)||isNaN(t))?{mathjs:"number",value:String(t)}:t});var KF="12.4.1";var jF=T("true",[],()=>!0),e3=T("false",[],()=>!1),r3=T("null",[],()=>null),t3=ei("Infinity",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(1/0):1/0}),n3=ei("NaN",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(NaN):NaN}),i3=ei("pi",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?Ef(t):p1}),a3=ei("tau",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?HS(t):m1}),o3=ei("e",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?VS(t):h1}),s3=ei("phi",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?YS(t):d1}),u3=ei("LN2",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(2).ln():Math.LN2}),f3=ei("LN10",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(10).ln():Math.LN10}),l3=ei("LOG2E",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(1).div(new t(2).ln()):Math.LOG2E}),c3=ei("LOG10E",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(1).div(new t(10).ln()):Math.LOG10E}),p3=ei("SQRT1_2",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t("0.5").sqrt():Math.SQRT1_2}),m3=ei("SQRT2",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(2).sqrt():Math.SQRT2}),h3=ei("i",["Complex"],e=>{var{Complex:r}=e;return r.I}),d3=T("PI",["pi"],e=>{var{pi:r}=e;return r}),v3=T("E",["e"],e=>{var{e:r}=e;return r}),g3=T("version",[],()=>KF);function ei(e,r,t){return T(e,r,t,{recreateOnConfigChange:!0})}var x3=Cr("speedOfLight","299792458","m s^-1"),y3=Cr("gravitationConstant","6.67430e-11","m^3 kg^-1 s^-2"),b3=Cr("planckConstant","6.62607015e-34","J s"),w3=Cr("reducedPlanckConstant","1.0545718176461565e-34","J s"),D3=Cr("magneticConstant","1.25663706212e-6","N A^-2"),S3=Cr("electricConstant","8.8541878128e-12","F m^-1"),N3=Cr("vacuumImpedance","376.730313667","ohm"),A3=Cr("coulomb","8.987551792261171e9","N m^2 C^-2"),E3=Cr("elementaryCharge","1.602176634e-19","C"),C3=Cr("bohrMagneton","9.2740100783e-24","J T^-1"),M3=Cr("conductanceQuantum","7.748091729863649e-5","S"),_3=Cr("inverseConductanceQuantum","12906.403729652257","ohm"),T3=Cr("magneticFluxQuantum","2.0678338484619295e-15","Wb"),F3=Cr("nuclearMagneton","5.0507837461e-27","J T^-1"),O3=Cr("klitzing","25812.807459304513","ohm");var B3=Cr("bohrRadius","5.29177210903e-11","m"),I3=Cr("classicalElectronRadius","2.8179403262e-15","m"),P3=Cr("electronMass","9.1093837015e-31","kg"),k3=Cr("fermiCoupling","1.1663787e-5","GeV^-2"),R3=Yp("fineStructure",.0072973525693),L3=Cr("hartreeEnergy","4.3597447222071e-18","J"),q3=Cr("protonMass","1.67262192369e-27","kg"),U3=Cr("deuteronMass","3.3435830926e-27","kg"),z3=Cr("neutronMass","1.6749271613e-27","kg"),W3=Cr("quantumOfCirculation","3.6369475516e-4","m^2 s^-1"),V3=Cr("rydberg","10973731.568160","m^-1"),Y3=Cr("thomsonCrossSection","6.6524587321e-29","m^2"),H3=Yp("weakMixingAngle",.2229),G3=Yp("efimovFactor",22.7),$3=Cr("atomicMass","1.66053906660e-27","kg"),Z3=Cr("avogadro","6.02214076e23","mol^-1"),Q3=Cr("boltzmann","1.380649e-23","J K^-1"),X3=Cr("faraday","96485.33212331001","C mol^-1"),J3=Cr("firstRadiation","3.7417718521927573e-16","W m^2"),K3=Cr("loschmidt","2.686780111798444e25","m^-3"),j3=Cr("gasConstant","8.31446261815324","J K^-1 mol^-1"),eO=Cr("molarPlanckConstant","3.990312712893431e-10","J s mol^-1"),rO=Cr("molarVolume","0.022413969545014137","m^3 mol^-1"),tO=Yp("sackurTetrode",-1.16487052358),nO=Cr("secondRadiation","0.014387768775039337","m K"),iO=Cr("stefanBoltzmann","5.67037441918443e-8","W m^-2 K^-4"),aO=Cr("wienDisplacement","2.897771955e-3","m K"),oO=Cr("molarMass","0.99999999965e-3","kg mol^-1"),sO=Cr("molarMassC12","11.9999999958e-3","kg mol^-1"),uO=Cr("gravity","9.80665","m s^-2"),fO=Cr("planckLength","1.616255e-35","m"),lO=Cr("planckMass","2.176435e-8","kg"),cO=Cr("planckTime","5.391245e-44","s"),pO=Cr("planckCharge","1.87554603778e-18","C"),mO=Cr("planckTemperature","1.416785e+32","K");function Cr(e,r,t){var n=["config","Unit","BigNumber"];return T(e,n,i=>{var{config:a,Unit:s,BigNumber:l}=i,f=a.number==="BigNumber"?new l(r):parseFloat(r),o=new s(f,t);return o.fixPrefix=!0,o})}function Yp(e,r){var t=["config","BigNumber"];return T(e,t,n=>{var{config:i,BigNumber:a}=n;return i.number==="BigNumber"?new a(r):r})}var jW="apply",eV=["typed","isInteger"],hO=T(jW,eV,e=>{var{typed:r,isInteger:t}=e,n=ou({typed:r,isInteger:t});return r("apply",{"...any":function(a){var s=a[1];ar(s)?a[1]=s-1:je(s)&&(a[1]=s.minus(1));try{return n.apply(null,a)}catch(l){throw lt(l)}}})},{isTransformFunction:!0});var rV="column",tV=["typed","Index","matrix","range"],dO=T(rV,tV,e=>{var{typed:r,Index:t,matrix:n,range:i}=e,a=Zc({typed:r,Index:t,matrix:n,range:i});return r("column",{"...any":function(l){var f=l.length-1,o=l[f];ar(o)&&(l[f]=o-1);try{return a.apply(null,l)}catch(u){throw lt(u)}}})},{isTransformFunction:!0});function vu(e,r,t){var n=e.filter(function(f){return rt(f)&&!(f.name in r)&&!t.has(f.name)})[0];if(!n)throw new Error('No undefined variable found in inline expression "'+e+'"');var i=n.name,a=new Map,s=new eu(t,a,new Set([i])),l=e.compile();return function(o){return a.set(i,o),l.evaluate(s)}}var nV="filter",iV=["typed"],gO=T(nV,iV,e=>{var{typed:r}=e;function t(i,a,s){var l,f;return i[0]&&(l=i[0].compile().evaluate(s)),i[1]&&(rt(i[1])||mi(i[1])?f=i[1].compile().evaluate(s):f=vu(i[1],a,s)),n(l,f)}t.rawArgs=!0;var n=r("filter",{"Array, function":vO,"Matrix, function":function(a,s){return a.create(vO(a.toArray(),s))},"Array, RegExp":Ks,"Matrix, RegExp":function(a,s){return a.create(Ks(a.toArray(),s))}});return t},{isTransformFunction:!0});function vO(e,r){return Nc(e,function(t,n,i){return gi(r,t,[n+1],i,"filter")})}var aV="forEach",oV=["typed"],xO=T(aV,oV,e=>{var{typed:r}=e;function t(i,a,s){var l,f;return i[0]&&(l=i[0].compile().evaluate(s)),i[1]&&(rt(i[1])||mi(i[1])?f=i[1].compile().evaluate(s):f=vu(i[1],a,s)),n(l,f)}t.rawArgs=!0;var n=r("forEach",{"Array | Matrix, function":function(a,s){var l=function f(o,u){if(Array.isArray(o))ho(o,function(p,h){f(p,u.concat(h+1))});else return gi(s,o,u,a,"forEach")};l(a.valueOf(),[])}});return t},{isTransformFunction:!0});var sV="index",uV=["Index","getMatrixDataType"],yO=T(sV,uV,e=>{var{Index:r,getMatrixDataType:t}=e;return function(){for(var i=[],a=0,s=arguments.length;a0?0:2;else if(l&&l.isSet===!0)l=l.map(function(o){return o-1});else if(Ar(l)||Ge(l))t(l)!=="boolean"&&(l=l.map(function(o){return o-1}));else if(ar(l))l--;else if(je(l))l=l.toNumber()-1;else if(typeof l!="string")throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");i[a]=l}var f=new r;return r.apply(f,i),f}},{isTransformFunction:!0});var fV="map",lV=["typed"],wO=T(fV,lV,e=>{var{typed:r}=e;function t(i,a,s){var l,f;return i[0]&&(l=i[0].compile().evaluate(s)),i[1]&&(rt(i[1])||mi(i[1])?f=i[1].compile().evaluate(s):f=vu(i[1],a,s)),n(l,f)}t.rawArgs=!0;var n=r("map",{"Array, function":function(a,s){return bO(a,s,a)},"Matrix, function":function(a,s){return a.create(bO(a.valueOf(),s,a))}});return t},{isTransformFunction:!0});function bO(e,r,t){function n(i,a){return Array.isArray(i)?Rn(i,function(s,l){return n(s,a.concat(l+1))}):gi(r,i,a,t,"map")}return n(e,[])}function vn(e){if(e.length===2&&bt(e[0])){e=e.slice();var r=e[1];ar(r)?e[1]=r-1:je(r)&&(e[1]=r.minus(1))}return e}var cV="max",pV=["typed","config","numeric","larger"],DO=T(cV,pV,e=>{var{typed:r,config:t,numeric:n,larger:i}=e,a=cp({typed:r,config:t,numeric:n,larger:i});return r("max",{"...any":function(l){l=vn(l);try{return a.apply(null,l)}catch(f){throw lt(f)}}})},{isTransformFunction:!0});var mV="mean",hV=["typed","add","divide"],SO=T(mV,hV,e=>{var{typed:r,add:t,divide:n}=e,i=qp({typed:r,add:t,divide:n});return r("mean",{"...any":function(s){s=vn(s);try{return i.apply(null,s)}catch(l){throw lt(l)}}})},{isTransformFunction:!0});var dV="min",vV=["typed","config","numeric","smaller"],NO=T(dV,vV,e=>{var{typed:r,config:t,numeric:n,smaller:i}=e,a=pp({typed:r,config:t,numeric:n,smaller:i});return r("min",{"...any":function(l){l=vn(l);try{return a.apply(null,l)}catch(f){throw lt(f)}}})},{isTransformFunction:!0});var gV="range",xV=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq","add","isPositive"],AO=T(gV,xV,e=>{var{typed:r,config:t,matrix:n,bignumber:i,smaller:a,smallerEq:s,larger:l,largerEq:f,add:o,isPositive:u}=e,p=Kc({typed:r,config:t,matrix:n,bignumber:i,smaller:a,smallerEq:s,larger:l,largerEq:f,add:o,isPositive:u});return r("range",{"...any":function(d){var x=d.length-1,v=d[x];return typeof v!="boolean"&&d.push(!0),p.apply(null,d)}})},{isTransformFunction:!0});var yV="row",bV=["typed","Index","matrix","range"],EO=T(yV,bV,e=>{var{typed:r,Index:t,matrix:n,range:i}=e,a=jc({typed:r,Index:t,matrix:n,range:i});return r("row",{"...any":function(l){var f=l.length-1,o=l[f];ar(o)&&(l[f]=o-1);try{return a.apply(null,l)}catch(u){throw lt(u)}}})},{isTransformFunction:!0});var wV="subset",DV=["typed","matrix","zeros","add"],CO=T(wV,DV,e=>{var{typed:r,matrix:t,zeros:n,add:i}=e,a=ep({typed:r,matrix:t,zeros:n,add:i});return r("subset",{"...any":function(l){try{return a.apply(null,l)}catch(f){throw lt(f)}}})},{isTransformFunction:!0});var SV="concat",NV=["typed","matrix","isInteger"],MO=T(SV,NV,e=>{var{typed:r,matrix:t,isInteger:n}=e,i=$c({typed:r,matrix:t,isInteger:n});return r("concat",{"...any":function(s){var l=s.length-1,f=s[l];ar(f)?s[l]=f-1:je(f)&&(s[l]=f.minus(1));try{return i.apply(null,s)}catch(o){throw lt(o)}}})},{isTransformFunction:!0});var _O="diff",AV=["typed","matrix","subtract","number","bignumber"],TO=T(_O,AV,e=>{var{typed:r,matrix:t,subtract:n,number:i,bignumber:a}=e,s=Qc({typed:r,matrix:t,subtract:n,number:i,bignumber:a});return r(_O,{"...any":function(f){f=vn(f);try{return s.apply(null,f)}catch(o){throw lt(o)}}})},{isTransformFunction:!0});var EV="std",CV=["typed","map","sqrt","variance"],FO=T(EV,CV,e=>{var{typed:r,map:t,sqrt:n,variance:i}=e,a=Wp({typed:r,map:t,sqrt:n,variance:i});return r("std",{"...any":function(l){l=vn(l);try{return a.apply(null,l)}catch(f){throw lt(f)}}})},{isTransformFunction:!0});var OO="sum",MV=["typed","config","add","numeric"],BO=T(OO,MV,e=>{var{typed:r,config:t,add:n,numeric:i}=e,a=kp({typed:r,config:t,add:n,numeric:i});return r(OO,{"...any":function(l){l=vn(l);try{return a.apply(null,l)}catch(f){throw lt(f)}}})},{isTransformFunction:!0});var _V="quantileSeq",TV=["typed","bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger"],IO=T(_V,TV,e=>{var{typed:r,bignumber:t,add:n,subtract:i,divide:a,multiply:s,partitionSelect:l,compare:f,isInteger:o,smaller:u,smallerEq:p,larger:h}=e,d=zp({typed:r,bignumber:t,add:n,subtract:i,divide:a,multiply:s,partitionSelect:l,compare:f,isInteger:o,smaller:u,smallerEq:p,larger:h});return r("quantileSeq",{"Array | Matrix, number | BigNumber":d,"Array | Matrix, number | BigNumber, number":(v,y,w)=>d(v,y,x(w)),"Array | Matrix, number | BigNumber, boolean":d,"Array | Matrix, number | BigNumber, boolean, number":(v,y,w,C)=>d(v,y,w,x(C)),"Array | Matrix, Array | Matrix":d,"Array | Matrix, Array | Matrix, number":(v,y,w)=>d(v,y,x(w)),"Array | Matrix, Array | Matrix, boolean":d,"Array | Matrix, Array | Matrix, boolean, number":(v,y,w,C)=>d(v,y,w,x(C))});function x(v){return vn([[],v])[1]}},{isTransformFunction:!0});var PO="cumsum",FV=["typed","add","unaryPlus"],kO=T(PO,FV,e=>{var{typed:r,add:t,unaryPlus:n}=e,i=Lp({typed:r,add:t,unaryPlus:n});return r(PO,{"...any":function(s){if(s.length===2&&bt(s[0])){var l=s[1];ar(l)?s[1]=l-1:je(l)&&(s[1]=l.minus(1))}try{return i.apply(null,s)}catch(f){throw lt(f)}}})},{isTransformFunction:!0});var RO="variance",OV=["typed","add","subtract","multiply","divide","apply","isNaN"],LO=T(RO,OV,e=>{var{typed:r,add:t,subtract:n,multiply:i,divide:a,apply:s,isNaN:l}=e,f=Up({typed:r,add:t,subtract:n,multiply:i,divide:a,apply:s,isNaN:l});return r(RO,{"...any":function(u){u=vn(u);try{return f.apply(null,u)}catch(p){throw lt(p)}}})},{isTransformFunction:!0});var qO="print",BV=["typed","matrix","zeros","add"],UO=T(qO,BV,e=>{var{typed:r,matrix:t,zeros:n,add:i}=e,a=tp({typed:r,matrix:t,zeros:n,add:i});return r(qO,{"string, Object | Array":function(f,o){return a(s(f),o)},"string, Object | Array, number | Object":function(f,o,u){return a(s(f),o,u)}});function s(l){return l.replace(rp,f=>{var o=f.slice(1).split("."),u=o.map(function(p){return!isNaN(p)&&p.length>0?parseInt(p)-1:p});return"$"+u.join(".")})}},{isTransformFunction:!0});var IV="and",PV=["typed","matrix","zeros","add","equalScalar","not","concat"],zO=T(IV,PV,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:i,not:a,concat:s}=e,l=np({typed:r,matrix:t,equalScalar:n,zeros:i,not:a,concat:s});function f(o,u,p){var h=o[0].compile().evaluate(p);if(!bt(h)&&!l(h,!0))return!1;var d=o[1].compile().evaluate(p);return l(h,d)}return f.rawArgs=!0,f},{isTransformFunction:!0});var kV="or",RV=["typed","matrix","equalScalar","DenseMatrix","concat"],WO=T(kV,RV,e=>{var{typed:r,matrix:t,equalScalar:n,DenseMatrix:i,concat:a}=e,s=Gc({typed:r,matrix:t,equalScalar:n,DenseMatrix:i,concat:a});function l(f,o,u){var p=f[0].compile().evaluate(u);if(!bt(p)&&s(p,!1))return!0;var h=f[1].compile().evaluate(u);return s(p,h)}return l.rawArgs=!0,l},{isTransformFunction:!0});var LV="bitAnd",qV=["typed","matrix","zeros","add","equalScalar","not","concat"],VO=T(LV,qV,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:i,not:a,concat:s}=e,l=Yc({typed:r,matrix:t,equalScalar:n,zeros:i,not:a,concat:s});function f(o,u,p){var h=o[0].compile().evaluate(p);if(!bt(h)){if(isNaN(h))return NaN;if(h===0||h===!1)return 0}var d=o[1].compile().evaluate(p);return l(h,d)}return f.rawArgs=!0,f},{isTransformFunction:!0});var UV="bitOr",zV=["typed","matrix","equalScalar","DenseMatrix","concat"],YO=T(UV,zV,e=>{var{typed:r,matrix:t,equalScalar:n,DenseMatrix:i,concat:a}=e,s=Hc({typed:r,matrix:t,equalScalar:n,DenseMatrix:i,concat:a});function l(f,o,u){var p=f[0].compile().evaluate(u);if(!bt(p)){if(isNaN(p))return NaN;if(p===-1)return-1;if(p===!0)return 1}var h=f[1].compile().evaluate(u);return s(p,h)}return l.rawArgs=!0,l},{isTransformFunction:!0});var Tg=_g;var QO=ci(gc(),1);var GO=ci(HO(),1);function $O(e){var r=new GO.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 ZO(e,r,t,n){function i(y,w){var C=arguments.length;if(C!==1&&C!==2)throw new jn("import",C,1,2);w||(w={});function b(O,F,M){if(Array.isArray(F))F.forEach(L=>b(O,L));else if(typeof F=="object")for(var _ in F)$e(F,_)&&b(O,F[_],_);else if(es(F)||M!==void 0){var k=es(F)?x(F)?F.fn+".transform":F.fn:M;if($e(O,k)&&O[k]!==F&&!w.silent)throw new Error('Cannot import "'+k+'" twice');O[k]=F}else if(!w.silent)throw new TypeError("Factory, Object, or Array expected")}var A={};b(A,y);for(var E in A)if($e(A,E)){var S=A[E];if(es(S))o(S,w);else if(u(S))a(E,S,w);else if(!w.silent)throw new TypeError("Factory, Object, or Array expected")}}function a(y,w,C){if(C.wrap&&typeof w=="function"&&(w=f(w)),p(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],s(y,w),t.emit("import",y,function(){return w});return}if(t[y]===void 0||C.override){t[y]=w,delete n[y],s(y,w),t.emit("import",y,function(){return w});return}if(!C.silent)throw new Error('Cannot import "'+y+'": already exists')}function s(y,w){w&&typeof w.transform=="function"?(t.expression.transform[y]=w.transform,h(y)&&(t.expression.mathWithTransform[y]=w.transform)):(delete t.expression.transform[y],h(y)&&(t.expression.mathWithTransform[y]=w))}function l(y){delete t.expression.transform[y],h(y)?t.expression.mathWithTransform[y]=t[y]:delete t.expression.mathWithTransform[y]}function f(y){var w=function(){for(var b=[],A=0,E=arguments.length;A2&&arguments[2]!==void 0?arguments[2]:y.fn;if(Gd(C,"."))throw new Error("Factory name should not contain a nested path. Name: "+JSON.stringify(C));var b=x(y)?t.expression.transform:t,A=C in t.expression.transform,E=$e(b,C)?b[C]:void 0,S=function(){var F={};y.dependencies.map(Qd).forEach(_=>{if(Gd(_,"."))throw new Error("Factory dependency should not contain a nested path. Name: "+JSON.stringify(_));_==="math"?F.math=t:_==="mathWithTransform"?F.mathWithTransform=t.expression.mathWithTransform:_==="classes"?F.classes=t:F[_]=t[_]});var M=y(F);if(M&&typeof M.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(E===void 0||w.override)return M;if(e.isTypedFunction(E)&&e.isTypedFunction(M))return e(E,M);if(w.silent)return E;throw new Error('Cannot import "'+C+'": already exists')};!y.meta||y.meta.lazy!==!1?(Zs(b,C,S),E&&A?l(C):(x(y)||d(y))&&Zs(t.expression.mathWithTransform,C,()=>b[C])):(b[C]=S(),E&&A?l(C):(x(y)||d(y))&&Zs(t.expression.mathWithTransform,C,()=>b[C])),n[C]=y,t.emit("import",C,S)}function u(y){return typeof y=="function"||typeof y=="number"||typeof y=="string"||typeof y=="boolean"||y===null||qt(y)||Gt(y)||je(y)||Xn(y)||Ge(y)||Array.isArray(y)}function p(y){return typeof y=="function"&&typeof y.signature=="string"}function h(y){return!$e(v,y)}function d(y){return y.fn.indexOf(".")===-1&&!$e(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 i}function Hp(e,r){var t=Mt({},nc,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=$O({isNumber:ar,isComplex:Gt,isBigNumber:je,isFraction:Xn,isUnit:qt,isString:yt,isArray:Ar,isMatrix:Ge,isCollection:bt,isDenseMatrix:Ia,isSparseMatrix:Jn,isRange:mo,isIndex:ua,isBoolean:ic,isResultSet:ac,isHelp:Hs,isFunction:oc,isDate:sc,isRegExp:uc,isObject:fa,isNull:fc,isUndefined:lc,isAccessorNode:Sn,isArrayNode:$t,isAssignmentNode:cc,isBlockNode:pc,isConditionalNode:mc,isConstantNode:yr,isFunctionAssignmentNode:mi,isFunctionNode:fn,isIndexNode:kn,isNode:Sr,isObjectNode:la,isOperatorNode:ut,isParenthesisNode:Zt,isRangeNode:hc,isRelationalNode:dc,isSymbolNode:rt,isChain:Gs});n.config=ty(t,n.emit),n.expression={transform:{},mathWithTransform:{config:n.config}};var i=[],a=[];function s(u){if(es(u))return u(n);var p=u[Object.keys(u)[0]];if(es(p))return p(n);if(!Jx(u))throw console.warn("Factory object with properties \`type\`, \`name\`, and \`factory\` expected",u),new Error("Factory object with properties \`type\`, \`name\`, and \`factory\` expected");var h=i.indexOf(u),d;return h===-1?(u.math===!0?d=u.factory(n.type,t,s,n.typed,n):d=u.factory(n.type,t,s,n.typed),i.push(u),a.push(d)):d=a[h],d}var l={};function f(){for(var u=arguments.length,p=new Array(u),h=0;h{kd(l).forEach(u=>{u&&u.meta&&u.meta.recreateOnConfigChange&&o(u,{override:!0})})}),n.create=Hp.bind(null,e),n.factory=T,n.import(kd(Qx(e))),n.ArgumentsError=jn,n.DimensionError=pr,n.IndexError=Xt,n}var XO=(e,r,t)=>{if(e.length!==1)return"";let n=e.map(function(s){return s.compile().evaluate(t)}),i=t.get(n[0]),a=t.get("$properties")?.[n[0]]?.type;return(a=="file"||a=="link"||a=="context")&&(a.includes("multi")?i=Ui(i).map(s=>t.get("$paths").get(s)??s):i=t.get("$paths").get(i)??i),i??""};XO.rawArgs=!0;var JO=(e,r,t)=>{if((e.length-1)%2!==0)return"";for(let n=0;n{if(e.length<1||e.length>2)return"";let n=e[0].compile().evaluate(t);n instanceof Date||(n=new Date(n));let i=e[1]?.compile().evaluate(t);return i?.length>0?Ba(n,i):Ba(n,t.get("$settings")?.dateFormat??"yyyy-MM-dd")};KO.rawArgs=!0;var ri=e=>typeof e=="string"||e instanceof String?e:e instanceof Date?Ba(e,"yyyy-MM-dd"):typeof e=="number"?e.toFixed(2):e.path?e.path:"",jO={prop:XO,slice:(e,r,t)=>(e=ri(e),e.slice(r,t)),if:(e,r,t)=>e===!0?r:t,ifs:JO,empty:e=>e.length!==1?"":e[0]===""?"true":"false",length:e=>e.length,substring:(e,r,t)=>(e=ri(e),t?e.substring(r,t):e.substring(r)),contains:(e,r)=>(e=ri(e),r=ri(r),e.includes(r)),test:(e,r)=>(e=ri(e),new RegExp(r).test(e)),match:(e,r)=>(e=ri(e),e.match(new RegExp(r))),replace:(e,r,t)=>(e=ri(e),e.replace(new RegExp(r),t)),replaceAll:(e,r,t)=>(e=ri(e),r=ri(r),t=ri(t),e.replace(new RegExp(r,"g"),t)),lower:e=>(e=ri(e),e.toLowerCase()),upper:e=>(e=ri(e),e.toUpperCase()),repeat:(e,r)=>e.repeat(r),format:ri,toNumber:e=>e instanceof Date?e.getTime():typeof e=="string"?parseFloat(e):e,now:()=>new Date,minute:e=>e.getMinutes(),hour:e=>e.getHours(),day:e=>e.getDay(),date:e=>e.getDate(),week:e=>Ba(e,"w"),month:e=>e.getMonth()+1,year:e=>e.getFullYear(),dateAdd:(e,r,t)=>(t==="days"&&e.setDate(e.getDate()+r),t==="months"&&e.setMonth(e.getMonth()+r),t==="years"&&e.setFullYear(e.getFullYear()+r),t==="quarters"&&e.setMonth(e.getMonth()+r*3),t==="weeks"&&e.setDate(e.getDate()+r*7),t==="hours"&&e.setHours(e.getHours()+r),t==="minutes"&&e.setMinutes(e.getMinutes()+r),t==="seconds"&&e.setSeconds(e.getSeconds()+r),e),dateSubtract:(e,r,t)=>(t==="day"&&e.setDate(e.getDate()-r),t==="month"&&e.setMonth(e.getMonth()-r),t==="year"&&e.setFullYear(e.getFullYear()-r),t==="quarter"&&e.setMonth(e.getMonth()-r*3),t==="week"&&e.setDate(e.getDate()-r*7),t==="hour"&&e.setHours(e.getHours()-r),t==="minute"&&e.setMinutes(e.getMinutes()-r),t==="second"&&e.setSeconds(e.getSeconds()-r),e),dateBetween:(e,r,t)=>{let s=Math.abs(r.getTime()-e.getTime());switch(t){case"days":return Math.round(s/864e5);case"months":return Math.round(s/2592e6);case"years":return Math.round(s/31536e6);case"hours":return Math.round(s/(60*60*1e3));case"minutes":return Math.round(s/(60*1e3));case"seconds":return Math.round(s/1e3);case"weeks":return Math.round(s/(864e5*7));case"quarters":return Math.round(s/(2592e6*3));default:return Math.round(s/864e5)}},style:(e,r)=>e,timeStamp:e=>e.getTime(),formatDate:KO,parseDate:e=>{if(e?.length>0)return new Date(e)??""}};var eB=(e,r,t,n)=>{if(!r)return"";let i=new Map;Object.keys(n).forEach(f=>i.set(f,n[f])),i.set("$properties",t),i.set("$paths",e);let a={...Tg,createAdd:T("add",[],()=>function(o,u){return o+u})},s=Hp(a);s.import(jO,{override:!0});let l;try{l=s.evaluate(r,i),l=Kl("",l)}catch(f){console.log(r,f)}return l};var rB=(e,r,t)=>({...r,...t.filter(n=>n.type=="fileprop"||n.name=="tags").reduce((n,i)=>{let{value:a}=Id(i.value,i.type);return{...n,[i.name]:eB(e,a,t.reduce((s,l)=>({...s,[l.name]:l}),{}),r)}},{})});var VV=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239],sB=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],YV="\\u200C\\u200D\\xB7\\u0300-\\u036F\\u0387\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u0669\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u06F0-\\u06F9\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07C0-\\u07C9\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u0898-\\u089F\\u08CA-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096F\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09E6-\\u09EF\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A66-\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AE6-\\u0AEF\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B55-\\u0B57\\u0B62\\u0B63\\u0B66-\\u0B6F\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C04\\u0C3C\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0CE6-\\u0CEF\\u0CF3\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D66-\\u0D6F\\u0D81-\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0E50-\\u0E59\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECE\\u0ED0-\\u0ED9\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1040-\\u1049\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F-\\u109D\\u135D-\\u135F\\u1369-\\u1371\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u180F-\\u1819\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u194F\\u19D0-\\u19DA\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AB0-\\u1ABD\\u1ABF-\\u1ACE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BB0-\\u1BB9\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1C40-\\u1C49\\u1C50-\\u1C59\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DFF\\u200C\\u200D\\u203F\\u2040\\u2054\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\u30FB\\uA620-\\uA629\\uA66F\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA82C\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8D0-\\uA8D9\\uA8E0-\\uA8F1\\uA8FF-\\uA909\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9D0-\\uA9D9\\uA9E5\\uA9F0-\\uA9F9\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA50-\\uAA59\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF10-\\uFF19\\uFF3F\\uFF65",uB="\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u0870-\\u0887\\u0889-\\u088E\\u08A0-\\u08C9\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C5D\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D04-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u1711\\u171F-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4C\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309B-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7CA\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7D9\\uA7F2-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC",Bg={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Ig="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",HV={5:Ig,"5module":Ig+" export import",6:Ig+" const class extends export import super"},GV=/^in(stanceof)?$/,$V=new RegExp("["+uB+"]"),ZV=new RegExp("["+uB+YV+"]");function kg(e,r){for(var t=65536,n=0;ne)return!1;if(t+=r[n+1],t>=e)return!0}return!1}function za(e,r){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&$V.test(String.fromCharCode(e)):r===!1?!1:kg(e,sB)}function gu(e,r){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&ZV.test(String.fromCharCode(e)):r===!1?!1:kg(e,sB)||kg(e,VV)}var tt=function(r,t){t===void 0&&(t={}),this.label=r,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function bi(e,r){return new tt(e,{beforeExpr:!0,binop:r})}var wi={beforeExpr:!0},zn={startsExpr:!0},qg={};function $r(e,r){return r===void 0&&(r={}),r.keyword=e,qg[e]=new tt(e,r)}var X={num:new tt("num",zn),regexp:new tt("regexp",zn),string:new tt("string",zn),name:new tt("name",zn),privateId:new tt("privateId",zn),eof:new tt("eof"),bracketL:new tt("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new tt("]"),braceL:new tt("{",{beforeExpr:!0,startsExpr:!0}),braceR:new tt("}"),parenL:new tt("(",{beforeExpr:!0,startsExpr:!0}),parenR:new tt(")"),comma:new tt(",",wi),semi:new tt(";",wi),colon:new tt(":",wi),dot:new tt("."),question:new tt("?",wi),questionDot:new tt("?."),arrow:new tt("=>",wi),template:new tt("template"),invalidTemplate:new tt("invalidTemplate"),ellipsis:new tt("...",wi),backQuote:new tt("\`",zn),dollarBraceL:new tt("\${",{beforeExpr:!0,startsExpr:!0}),eq:new tt("=",{beforeExpr:!0,isAssign:!0}),assign:new tt("_=",{beforeExpr:!0,isAssign:!0}),incDec:new tt("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new tt("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:bi("||",1),logicalAND:bi("&&",2),bitwiseOR:bi("|",3),bitwiseXOR:bi("^",4),bitwiseAND:bi("&",5),equality:bi("==/!=/===/!==",6),relational:bi("/<=/>=",7),bitShift:bi("<>/>>>",8),plusMin:new tt("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:bi("%",10),star:bi("*",10),slash:bi("/",10),starstar:new tt("**",{beforeExpr:!0}),coalesce:bi("??",1),_break:$r("break"),_case:$r("case",wi),_catch:$r("catch"),_continue:$r("continue"),_debugger:$r("debugger"),_default:$r("default",wi),_do:$r("do",{isLoop:!0,beforeExpr:!0}),_else:$r("else",wi),_finally:$r("finally"),_for:$r("for",{isLoop:!0}),_function:$r("function",zn),_if:$r("if"),_return:$r("return",wi),_switch:$r("switch"),_throw:$r("throw",wi),_try:$r("try"),_var:$r("var"),_const:$r("const"),_while:$r("while",{isLoop:!0}),_with:$r("with"),_new:$r("new",{beforeExpr:!0,startsExpr:!0}),_this:$r("this",zn),_super:$r("super",zn),_class:$r("class",zn),_extends:$r("extends",wi),_export:$r("export"),_import:$r("import",zn),_null:$r("null",zn),_true:$r("true",zn),_false:$r("false",zn),_in:$r("in",{beforeExpr:!0,binop:7}),_instanceof:$r("instanceof",{beforeExpr:!0,binop:7}),_typeof:$r("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:$r("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:$r("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Ni=/\\r\\n?|\\n|\\u2028|\\u2029/,QV=new RegExp(Ni.source,"g");function xu(e){return e===10||e===13||e===8232||e===8233}function fB(e,r,t){t===void 0&&(t=e.length);for(var n=r;n>10)+55296,(e&1023)+56320))}var KV=/(?:[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])/,Ff=function(r,t){this.line=r,this.column=t};Ff.prototype.offset=function(r){return new Ff(this.line,this.column+r)};var Xp=function(r,t,n){this.start=t,this.end=n,r.sourceFile!==null&&(this.source=r.sourceFile)};function pB(e,r){for(var t=1,n=0;;){var i=fB(e,n,r);if(i<0)return new Ff(t,r-n);++t,n=i}}var Rg={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},iB=!1;function jV(e){var r={};for(var t in Rg)r[t]=e&&Bf(e,t)?e[t]:Rg[t];if(r.ecmaVersion==="latest"?r.ecmaVersion=1e8:r.ecmaVersion==null?(!iB&&typeof console=="object"&&console.warn&&(iB=!0,console.warn(\`Since Acorn 8.0.0, options.ecmaVersion is required. -Defaulting to 2020, but this will stop working in the future.\`)),r.ecmaVersion=11):r.ecmaVersion>=2015&&(r.ecmaVersion-=2009),r.allowReserved==null&&(r.allowReserved=r.ecmaVersion<5),(!e||e.allowHashBang==null)&&(r.allowHashBang=r.ecmaVersion>=14),tB(r.onToken)){var n=r.onToken;r.onToken=function(i){return n.push(i)}}return tB(r.onComment)&&(r.onComment=eY(r,r.onComment)),r}function eY(e,r){return function(t,n,i,a,s,l){var f={type:t?"Block":"Line",value:n,start:i,end:a};e.locations&&(f.loc=new Xp(this,s,l)),e.ranges&&(f.range=[i,a]),r.push(f)}}var Of=1,yu=2,Ug=4,mB=8,hB=16,dB=32,zg=64,vB=128,If=256,Wg=Of|yu|If;function Vg(e,r){return yu|(e?Ug:0)|(r?mB:0)}var $p=0,Yg=1,Va=2,gB=3,xB=4,yB=5,Kt=function(r,t,n){this.options=r=jV(r),this.sourceFile=r.sourceFile,this.keywords=Ao(HV[r.ecmaVersion>=6?6:r.sourceType==="module"?"5module":5]);var i="";r.allowReserved!==!0&&(i=Bg[r.ecmaVersion>=6?6:r.ecmaVersion===5?5:3],r.sourceType==="module"&&(i+=" await")),this.reservedWords=Ao(i);var a=(i?i+" ":"")+Bg.strict;this.reservedWordsStrict=Ao(a),this.reservedWordsStrictBind=Ao(a+" "+Bg.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf(\` -\`,n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(Ni).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=X.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=r.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&r.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Of),this.regexpState=null,this.privateNameStack=[]},da={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};Kt.prototype.parse=function(){var r=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(r)};da.inFunction.get=function(){return(this.currentVarScope().flags&yu)>0};da.inGenerator.get=function(){return(this.currentVarScope().flags&mB)>0&&!this.currentVarScope().inClassFieldInit};da.inAsync.get=function(){return(this.currentVarScope().flags&Ug)>0&&!this.currentVarScope().inClassFieldInit};da.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var r=this.scopeStack[e];if(r.inClassFieldInit||r.flags&If)return!1;if(r.flags&yu)return(r.flags&Ug)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};da.allowSuper.get=function(){var e=this.currentThisScope(),r=e.flags,t=e.inClassFieldInit;return(r&zg)>0||t||this.options.allowSuperOutsideMethod};da.allowDirectSuper.get=function(){return(this.currentThisScope().flags&vB)>0};da.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};da.allowNewDotTarget.get=function(){var e=this.currentThisScope(),r=e.flags,t=e.inClassFieldInit;return(r&(yu|If))>0||t};da.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&If)>0};Kt.extend=function(){for(var r=[],t=arguments.length;t--;)r[t]=arguments[t];for(var n=this,i=0;i=,?^&]/.test(i)||i==="!"&&this.input.charAt(n+1)==="=")}e+=r[0].length,Di.lastIndex=e,e+=Di.exec(this.input)[0].length,this.input[e]===";"&&e++}};Nn.eat=function(e){return this.type===e?(this.next(),!0):!1};Nn.isContextual=function(e){return this.type===X.name&&this.value===e&&!this.containsEsc};Nn.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};Nn.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};Nn.canInsertSemicolon=function(){return this.type===X.eof||this.type===X.braceR||Ni.test(this.input.slice(this.lastTokEnd,this.start))};Nn.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};Nn.semicolon=function(){!this.eat(X.semi)&&!this.insertSemicolon()&&this.unexpected()};Nn.afterTrailingComma=function(e,r){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),r||this.next(),!0};Nn.expect=function(e){this.eat(e)||this.unexpected()};Nn.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var Jp=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Nn.checkPatternErrors=function(e,r){if(!!e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var t=r?e.parenthesizedAssign:e.parenthesizedBind;t>-1&&this.raiseRecoverable(t,r?"Assigning to rvalue":"Parenthesized pattern")}};Nn.checkExpressionErrors=function(e,r){if(!e)return!1;var t=e.shorthandAssign,n=e.doubleProto;if(!r)return t>=0||n>=0;t>=0&&this.raise(t,"Shorthand property assignments are valid only in destructuring patterns"),n>=0&&this.raiseRecoverable(n,"Redefinition of __proto__ property")};Nn.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&n<56320)return!0;if(za(n,!0)){for(var i=t+1;gu(n=this.input.charCodeAt(i),!0);)++i;if(n===92||n>55295&&n<56320)return!0;var a=this.input.slice(t,i);if(!GV.test(a))return!0}return!1};hr.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;Di.lastIndex=this.pos;var e=Di.exec(this.input),r=this.pos+e[0].length,t;return!Ni.test(this.input.slice(this.pos,r))&&this.input.slice(r,r+8)==="function"&&(r+8===this.input.length||!(gu(t=this.input.charCodeAt(r+8))||t>55295&&t<56320))};hr.parseStatement=function(e,r,t){var n=this.type,i=this.startNode(),a;switch(this.isLet(e)&&(n=X._var,a="let"),n){case X._break:case X._continue:return this.parseBreakContinueStatement(i,n.keyword);case X._debugger:return this.parseDebuggerStatement(i);case X._do:return this.parseDoStatement(i);case X._for:return this.parseForStatement(i);case X._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case X._class:return e&&this.unexpected(),this.parseClass(i,!0);case X._if:return this.parseIfStatement(i);case X._return:return this.parseReturnStatement(i);case X._switch:return this.parseSwitchStatement(i);case X._throw:return this.parseThrowStatement(i);case X._try:return this.parseTryStatement(i);case X._const:case X._var:return a=a||this.value,e&&a!=="var"&&this.unexpected(),this.parseVarStatement(i,a);case X._while:return this.parseWhileStatement(i);case X._with:return this.parseWithStatement(i);case X.braceL:return this.parseBlock(!0,i);case X.semi:return this.parseEmptyStatement(i);case X._export:case X._import:if(this.options.ecmaVersion>10&&n===X._import){Di.lastIndex=this.pos;var s=Di.exec(this.input),l=this.pos+s[0].length,f=this.input.charCodeAt(l);if(f===40||f===46)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(r||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),n===X._import?this.parseImport(i):this.parseExport(i,t);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var o=this.value,u=this.parseExpression();return n===X.name&&u.type==="Identifier"&&this.eat(X.colon)?this.parseLabeledStatement(i,o,u,e):this.parseExpressionStatement(i,u)}};hr.parseBreakContinueStatement=function(e,r){var t=r==="break";this.next(),this.eat(X.semi)||this.insertSemicolon()?e.label=null:this.type!==X.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var n=0;n=6?this.eat(X.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};hr.parseForStatement=function(e){this.next();var r=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Hg),this.enterScope(0),this.expect(X.parenL),this.type===X.semi)return r>-1&&this.unexpected(r),this.parseFor(e,null);var t=this.isLet();if(this.type===X._var||this.type===X._const||t){var n=this.startNode(),i=t?"let":this.value;return this.next(),this.parseVar(n,!0,i),this.finishNode(n,"VariableDeclaration"),(this.type===X._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&n.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===X._in?r>-1&&this.unexpected(r):e.await=r>-1),this.parseForIn(e,n)):(r>-1&&this.unexpected(r),this.parseFor(e,n))}var a=this.isContextual("let"),s=!1,l=new Jp,f=this.parseExpression(r>-1?"await":!0,l);return this.type===X._in||(s=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===X._in?r>-1&&this.unexpected(r):e.await=r>-1),a&&s&&this.raise(f.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(f,!1,l),this.checkLValPattern(f),this.parseForIn(e,f)):(this.checkExpressionErrors(l,!0),r>-1&&this.unexpected(r),this.parseFor(e,f))};hr.parseFunctionStatement=function(e,r,t){return this.next(),this.parseFunction(e,Tf|(t?0:Lg),!1,r)};hr.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(X._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};hr.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(X.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};hr.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(X.braceL),this.labels.push(tY),this.enterScope(0);for(var r,t=!1;this.type!==X.braceR;)if(this.type===X._case||this.type===X._default){var n=this.type===X._case;r&&this.finishNode(r,"SwitchCase"),e.cases.push(r=this.startNode()),r.consequent=[],this.next(),n?r.test=this.parseExpression():(t&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),t=!0,r.test=null),this.expect(X.colon)}else r||this.unexpected(),r.consequent.push(this.parseStatement(null));return this.exitScope(),r&&this.finishNode(r,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};hr.parseThrowStatement=function(e){return this.next(),Ni.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var nY=[];hr.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),r=e.type==="Identifier";return this.enterScope(r?dB:0),this.checkLValPattern(e,r?xB:Va),this.expect(X.parenR),e};hr.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===X._catch){var r=this.startNode();this.next(),this.eat(X.parenL)?r.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),r.param=null,this.enterScope(0)),r.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(r,"CatchClause")}return e.finalizer=this.eat(X._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};hr.parseVarStatement=function(e,r,t){return this.next(),this.parseVar(e,!1,r,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")};hr.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Hg),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};hr.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};hr.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};hr.parseLabeledStatement=function(e,r,t,n){for(var i=0,a=this.labels;i=0;f--){var o=this.labels[f];if(o.statementStart===e.start)o.statementStart=this.start,o.kind=l;else break}return this.labels.push({name:r,kind:l,statementStart:this.start}),e.body=this.parseStatement(n?n.indexOf("label")===-1?n+"label":n:"label"),this.labels.pop(),e.label=t,this.finishNode(e,"LabeledStatement")};hr.parseExpressionStatement=function(e,r){return e.expression=r,this.semicolon(),this.finishNode(e,"ExpressionStatement")};hr.parseBlock=function(e,r,t){for(e===void 0&&(e=!0),r===void 0&&(r=this.startNode()),r.body=[],this.expect(X.braceL),e&&this.enterScope(0);this.type!==X.braceR;){var n=this.parseStatement(null);r.body.push(n)}return t&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(r,"BlockStatement")};hr.parseFor=function(e,r){return e.init=r,this.expect(X.semi),e.test=this.type===X.semi?null:this.parseExpression(),this.expect(X.semi),e.update=this.type===X.parenR?null:this.parseExpression(),this.expect(X.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};hr.parseForIn=function(e,r){var t=this.type===X._in;return this.next(),r.type==="VariableDeclaration"&&r.declarations[0].init!=null&&(!t||this.options.ecmaVersion<8||this.strict||r.kind!=="var"||r.declarations[0].id.type!=="Identifier")&&this.raise(r.start,(t?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=r,e.right=t?this.parseExpression():this.parseMaybeAssign(),this.expect(X.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,t?"ForInStatement":"ForOfStatement")};hr.parseVar=function(e,r,t,n){for(e.declarations=[],e.kind=t;;){var i=this.startNode();if(this.parseVarId(i,t),this.eat(X.eq)?i.init=this.parseMaybeAssign(r):!n&&t==="const"&&!(this.type===X._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!n&&i.id.type!=="Identifier"&&!(r&&(this.type===X._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):i.init=null,e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(X.comma))break}return e};hr.parseVarId=function(e,r){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,r==="var"?Yg:Va,!1)};var Tf=1,Lg=2,bB=4;hr.parseFunction=function(e,r,t,n,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!n)&&(this.type===X.star&&r&Lg&&this.unexpected(),e.generator=this.eat(X.star)),this.options.ecmaVersion>=8&&(e.async=!!n),r&Tf&&(e.id=r&bB&&this.type!==X.name?null:this.parseIdent(),e.id&&!(r&Lg)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Yg:Va:gB));var a=this.yieldPos,s=this.awaitPos,l=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Vg(e.async,e.generator)),r&Tf||(e.id=this.type===X.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,t,!1,i),this.yieldPos=a,this.awaitPos=s,this.awaitIdentPos=l,this.finishNode(e,r&Tf?"FunctionDeclaration":"FunctionExpression")};hr.parseFunctionParams=function(e){this.expect(X.parenL),e.params=this.parseBindingList(X.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};hr.parseClass=function(e,r){this.next();var t=this.strict;this.strict=!0,this.parseClassId(e,r),this.parseClassSuper(e);var n=this.enterClassBody(),i=this.startNode(),a=!1;for(i.body=[],this.expect(X.braceL);this.type!==X.braceR;){var s=this.parseClassElement(e.superClass!==null);s&&(i.body.push(s),s.type==="MethodDefinition"&&s.kind==="constructor"?(a&&this.raiseRecoverable(s.start,"Duplicate constructor in the same class"),a=!0):s.key&&s.key.type==="PrivateIdentifier"&&iY(n,s)&&this.raiseRecoverable(s.key.start,"Identifier '#"+s.key.name+"' has already been declared"))}return this.strict=t,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,r?"ClassDeclaration":"ClassExpression")};hr.parseClassElement=function(e){if(this.eat(X.semi))return null;var r=this.options.ecmaVersion,t=this.startNode(),n="",i=!1,a=!1,s="method",l=!1;if(this.eatContextual("static")){if(r>=13&&this.eat(X.braceL))return this.parseClassStaticBlock(t),t;this.isClassElementNameStart()||this.type===X.star?l=!0:n="static"}if(t.static=l,!n&&r>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===X.star)&&!this.canInsertSemicolon()?a=!0:n="async"),!n&&(r>=9||!a)&&this.eat(X.star)&&(i=!0),!n&&!a&&!i){var f=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?s=f:n=f)}if(n?(t.computed=!1,t.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),t.key.name=n,this.finishNode(t.key,"Identifier")):this.parseClassElementName(t),r<13||this.type===X.parenL||s!=="method"||i||a){var o=!t.static&&Zp(t,"constructor"),u=o&&e;o&&s!=="method"&&this.raise(t.key.start,"Constructor can't have get/set modifier"),t.kind=o?"constructor":s,this.parseClassMethod(t,i,a,u)}else this.parseClassField(t);return t};hr.isClassElementNameStart=function(){return this.type===X.name||this.type===X.privateId||this.type===X.num||this.type===X.string||this.type===X.bracketL||this.type.keyword};hr.parseClassElementName=function(e){this.type===X.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};hr.parseClassMethod=function(e,r,t,n){var i=e.key;e.kind==="constructor"?(r&&this.raise(i.start,"Constructor can't be a generator"),t&&this.raise(i.start,"Constructor can't be an async method")):e.static&&Zp(e,"prototype")&&this.raise(i.start,"Classes may not have a static property named prototype");var a=e.value=this.parseMethod(r,t,n);return e.kind==="get"&&a.params.length!==0&&this.raiseRecoverable(a.start,"getter should have no params"),e.kind==="set"&&a.params.length!==1&&this.raiseRecoverable(a.start,"setter should have exactly one param"),e.kind==="set"&&a.params[0].type==="RestElement"&&this.raiseRecoverable(a.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};hr.parseClassField=function(e){if(Zp(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&Zp(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(X.eq)){var r=this.currentThisScope(),t=r.inClassFieldInit;r.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),r.inClassFieldInit=t}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};hr.parseClassStaticBlock=function(e){e.body=[];var r=this.labels;for(this.labels=[],this.enterScope(If|zg);this.type!==X.braceR;){var t=this.parseStatement(null);e.body.push(t)}return this.next(),this.exitScope(),this.labels=r,this.finishNode(e,"StaticBlock")};hr.parseClassId=function(e,r){this.type===X.name?(e.id=this.parseIdent(),r&&this.checkLValSimple(e.id,Va,!1)):(r===!0&&this.unexpected(),e.id=null)};hr.parseClassSuper=function(e){e.superClass=this.eat(X._extends)?this.parseExprSubscripts(null,!1):null};hr.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};hr.exitClassBody=function(){var e=this.privateNameStack.pop(),r=e.declared,t=e.used;if(!!this.options.checkPrivateFields)for(var n=this.privateNameStack.length,i=n===0?null:this.privateNameStack[n-1],a=0;a=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(r,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==X.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};hr.parseExport=function(e,r){if(this.next(),this.eat(X.star))return this.parseExportAllDeclaration(e,r);if(this.eat(X._default))return this.checkExport(r,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(r,e.declaration.declarations):this.checkExport(r,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(r),this.eatContextual("from"))this.type!==X.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var t=0,n=e.specifiers;t=13&&this.type===X.string){var e=this.parseLiteral(this.value);return KV.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};hr.adaptDirectivePrologue=function(e){for(var r=0;r=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var Ai=Kt.prototype;Ai.toAssignable=function(e,r,t){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",t&&this.checkPatternErrors(t,!0);for(var n=0,i=e.properties;n=8&&!l&&f.name==="async"&&!this.canInsertSemicolon()&&this.eat(X._function))return this.overrideContext(Nt.f_expr),this.parseFunction(this.startNodeAt(a,s),0,!1,!0,r);if(i&&!this.canInsertSemicolon()){if(this.eat(X.arrow))return this.parseArrowExpression(this.startNodeAt(a,s),[f],!1,r);if(this.options.ecmaVersion>=8&&f.name==="async"&&this.type===X.name&&!l&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return f=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(X.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,s),[f],!0,r)}return f;case X.regexp:var o=this.value;return n=this.parseLiteral(o.value),n.regex={pattern:o.pattern,flags:o.flags},n;case X.num:case X.string:return this.parseLiteral(this.value);case X._null:case X._true:case X._false:return n=this.startNode(),n.value=this.type===X._null?null:this.type===X._true,n.raw=this.type.keyword,this.next(),this.finishNode(n,"Literal");case X.parenL:var u=this.start,p=this.parseParenAndDistinguishExpression(i,r);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(p)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),p;case X.bracketL:return n=this.startNode(),this.next(),n.elements=this.parseExprList(X.bracketR,!0,!0,e),this.finishNode(n,"ArrayExpression");case X.braceL:return this.overrideContext(Nt.b_expr),this.parseObj(!1,e);case X._function:return n=this.startNode(),this.next(),this.parseFunction(n,0);case X._class:return this.parseClass(this.startNode(),!1);case X._new:return this.parseNew();case X.backQuote:return this.parseTemplate();case X._import:return this.options.ecmaVersion>=11?this.parseExprImport(t):this.unexpected();default:return this.parseExprAtomDefault()}};Mr.parseExprAtomDefault=function(){this.unexpected()};Mr.parseExprImport=function(e){var r=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===X.parenL&&!e)return this.parseDynamicImport(r);if(this.type===X.dot){var t=this.startNodeAt(r.start,r.loc&&r.loc.start);return t.name="import",r.meta=this.finishNode(t,"Identifier"),this.parseImportMeta(r)}else this.unexpected()};Mr.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(X.parenR)){var r=this.start;this.eat(X.comma)&&this.eat(X.parenR)?this.raiseRecoverable(r,"Trailing comma is not allowed in import()"):this.unexpected(r)}return this.finishNode(e,"ImportExpression")};Mr.parseImportMeta=function(e){this.next();var r=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),r&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};Mr.parseLiteral=function(e){var r=this.startNode();return r.value=e,r.raw=this.input.slice(this.start,this.end),r.raw.charCodeAt(r.raw.length-1)===110&&(r.bigint=r.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(r,"Literal")};Mr.parseParenExpression=function(){this.expect(X.parenL);var e=this.parseExpression();return this.expect(X.parenR),e};Mr.shouldParseArrow=function(e){return!this.canInsertSemicolon()};Mr.parseParenAndDistinguishExpression=function(e,r){var t=this.start,n=this.startLoc,i,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var s=this.start,l=this.startLoc,f=[],o=!0,u=!1,p=new Jp,h=this.yieldPos,d=this.awaitPos,x;for(this.yieldPos=0,this.awaitPos=0;this.type!==X.parenR;)if(o?o=!1:this.expect(X.comma),a&&this.afterTrailingComma(X.parenR,!0)){u=!0;break}else if(this.type===X.ellipsis){x=this.start,f.push(this.parseParenItem(this.parseRestBinding())),this.type===X.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else f.push(this.parseMaybeAssign(!1,p,this.parseParenItem));var v=this.lastTokEnd,y=this.lastTokEndLoc;if(this.expect(X.parenR),e&&this.shouldParseArrow(f)&&this.eat(X.arrow))return this.checkPatternErrors(p,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=h,this.awaitPos=d,this.parseParenArrowList(t,n,f,r);(!f.length||u)&&this.unexpected(this.lastTokStart),x&&this.unexpected(x),this.checkExpressionErrors(p,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=d||this.awaitPos,f.length>1?(i=this.startNodeAt(s,l),i.expressions=f,this.finishNodeAt(i,"SequenceExpression",v,y)):i=f[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var w=this.startNodeAt(t,n);return w.expression=i,this.finishNode(w,"ParenthesizedExpression")}else return i};Mr.parseParenItem=function(e){return e};Mr.parseParenArrowList=function(e,r,t,n){return this.parseArrowExpression(this.startNodeAt(e,r),t,!1,n)};var aY=[];Mr.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===X.dot){var r=this.startNodeAt(e.start,e.loc&&e.loc.start);r.name="new",e.meta=this.finishNode(r,"Identifier"),this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),t&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var n=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),n,i,!0,!1),this.eat(X.parenL)?e.arguments=this.parseExprList(X.parenR,this.options.ecmaVersion>=8,!1):e.arguments=aY,this.finishNode(e,"NewExpression")};Mr.parseTemplateElement=function(e){var r=e.isTagged,t=this.startNode();return this.type===X.invalidTemplate?(r||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),t.value={raw:this.value,cooked:null}):t.value={raw:this.input.slice(this.start,this.end).replace(/\\r\\n?/g,\` -\`),cooked:this.value},this.next(),t.tail=this.type===X.backQuote,this.finishNode(t,"TemplateElement")};Mr.parseTemplate=function(e){e===void 0&&(e={});var r=e.isTagged;r===void 0&&(r=!1);var t=this.startNode();this.next(),t.expressions=[];var n=this.parseTemplateElement({isTagged:r});for(t.quasis=[n];!n.tail;)this.type===X.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(X.dollarBraceL),t.expressions.push(this.parseExpression()),this.expect(X.braceR),t.quasis.push(n=this.parseTemplateElement({isTagged:r}));return this.next(),this.finishNode(t,"TemplateLiteral")};Mr.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===X.name||this.type===X.num||this.type===X.string||this.type===X.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===X.star)&&!Ni.test(this.input.slice(this.lastTokEnd,this.start))};Mr.parseObj=function(e,r){var t=this.startNode(),n=!0,i={};for(t.properties=[],this.next();!this.eat(X.braceR);){if(n)n=!1;else if(this.expect(X.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(X.braceR))break;var a=this.parseProperty(e,r);e||this.checkPropClash(a,i,r),t.properties.push(a)}return this.finishNode(t,e?"ObjectPattern":"ObjectExpression")};Mr.parseProperty=function(e,r){var t=this.startNode(),n,i,a,s;if(this.options.ecmaVersion>=9&&this.eat(X.ellipsis))return e?(t.argument=this.parseIdent(!1),this.type===X.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(t,"RestElement")):(t.argument=this.parseMaybeAssign(!1,r),this.type===X.comma&&r&&r.trailingComma<0&&(r.trailingComma=this.start),this.finishNode(t,"SpreadElement"));this.options.ecmaVersion>=6&&(t.method=!1,t.shorthand=!1,(e||r)&&(a=this.start,s=this.startLoc),e||(n=this.eat(X.star)));var l=this.containsEsc;return this.parsePropertyName(t),!e&&!l&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(t)?(i=!0,n=this.options.ecmaVersion>=9&&this.eat(X.star),this.parsePropertyName(t)):i=!1,this.parsePropertyValue(t,e,n,i,a,s,r,l),this.finishNode(t,"Property")};Mr.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var r=e.kind==="get"?0:1;if(e.value.params.length!==r){var t=e.value.start;e.kind==="get"?this.raiseRecoverable(t,"getter should have no params"):this.raiseRecoverable(t,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};Mr.parsePropertyValue=function(e,r,t,n,i,a,s,l){(t||n)&&this.type===X.colon&&this.unexpected(),this.eat(X.colon)?(e.value=r?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,s),e.kind="init"):this.options.ecmaVersion>=6&&this.type===X.parenL?(r&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(t,n)):!r&&!l&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==X.comma&&this.type!==X.braceR&&this.type!==X.eq?((t||n)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((t||n)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=i),e.kind="init",r?e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key)):this.type===X.eq&&s?(s.shorthandAssign<0&&(s.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected()};Mr.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(X.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(X.bracketR),e.key;e.computed=!1}return e.key=this.type===X.num||this.type===X.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};Mr.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};Mr.parseMethod=function(e,r,t){var n=this.startNode(),i=this.yieldPos,a=this.awaitPos,s=this.awaitIdentPos;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!r),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Vg(r,n.generator)|zg|(t?vB:0)),this.expect(X.parenL),n.params=this.parseBindingList(X.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1,!0,!1),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=s,this.finishNode(n,"FunctionExpression")};Mr.parseArrowExpression=function(e,r,t,n){var i=this.yieldPos,a=this.awaitPos,s=this.awaitIdentPos;return this.enterScope(Vg(t,!1)|hB),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(r,!0),this.parseFunctionBody(e,!0,!1,n),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=s,this.finishNode(e,"ArrowFunctionExpression")};Mr.parseFunctionBody=function(e,r,t,n){var i=r&&this.type!==X.braceL,a=this.strict,s=!1;if(i)e.body=this.parseMaybeAssign(n),e.expression=!0,this.checkParams(e,!1);else{var l=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!a||l)&&(s=this.strictDirective(this.end),s&&l&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var f=this.labels;this.labels=[],s&&(this.strict=!0),this.checkParams(e,!a&&!s&&!r&&!t&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,yB),e.body=this.parseBlock(!1,void 0,s&&!a),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=f}this.exitScope()};Mr.isSimpleParamList=function(e){for(var r=0,t=e;r-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&Of&&delete this.undefinedExports[e]}else if(r===xB){var a=this.currentScope();a.lexical.push(e)}else if(r===gB){var s=this.currentScope();this.treatFunctionsAsVar?n=s.lexical.indexOf(e)>-1:n=s.lexical.indexOf(e)>-1||s.var.indexOf(e)>-1,s.functions.push(e)}else for(var l=this.scopeStack.length-1;l>=0;--l){var f=this.scopeStack[l];if(f.lexical.indexOf(e)>-1&&!(f.flags&dB&&f.lexical[0]===e)||!this.treatFunctionsAsVarInScope(f)&&f.functions.indexOf(e)>-1){n=!0;break}if(f.var.push(e),this.inModule&&f.flags&Of&&delete this.undefinedExports[e],f.flags&Wg)break}n&&this.raiseRecoverable(t,"Identifier '"+e+"' has already been declared")};Co.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};Co.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};Co.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var r=this.scopeStack[e];if(r.flags&Wg)return r}};Co.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var r=this.scopeStack[e];if(r.flags&Wg&&!(r.flags&hB))return r}};var Kp=function(r,t,n){this.type="",this.start=t,this.end=0,r.options.locations&&(this.loc=new Xp(r,n)),r.options.directSourceFile&&(this.sourceFile=r.options.directSourceFile),r.options.ranges&&(this.range=[t,0])},Pf=Kt.prototype;Pf.startNode=function(){return new Kp(this,this.start,this.startLoc)};Pf.startNodeAt=function(e,r){return new Kp(this,e,r)};function DB(e,r,t,n){return e.type=r,e.end=t,this.options.locations&&(e.loc.end=n),this.options.ranges&&(e.range[1]=t),e}Pf.finishNode=function(e,r){return DB.call(this,e,r,this.lastTokEnd,this.lastTokEndLoc)};Pf.finishNodeAt=function(e,r,t,n){return DB.call(this,e,r,t,n)};Pf.copyNode=function(e){var r=new Kp(this,e.start,this.startLoc);for(var t in e)r[t]=e[t];return r};var SB="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",NB=SB+" Extended_Pictographic",AB=NB,EB=AB+" EBase EComp EMod EPres ExtPict",CB=EB,sY=CB,uY={9:SB,10:NB,11:AB,12:EB,13:CB,14:sY},fY="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",lY={9:"",10:"",11:"",12:"",13:"",14:fY},aB="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",MB="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",_B=MB+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",TB=_B+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",FB=TB+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",OB=FB+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",cY=OB+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz",pY={9:MB,10:_B,11:TB,12:FB,13:OB,14:cY},BB={};function mY(e){var r=BB[e]={binary:Ao(uY[e]+" "+aB),binaryOfStrings:Ao(lY[e]),nonBinary:{General_Category:Ao(aB),Script:Ao(pY[e])}};r.nonBinary.Script_Extensions=r.nonBinary.Script,r.nonBinary.gc=r.nonBinary.General_Category,r.nonBinary.sc=r.nonBinary.Script,r.nonBinary.scx=r.nonBinary.Script_Extensions}for(Gp=0,Pg=[9,10,11,12,13,14];Gp=6?"uy":"")+(r.options.ecmaVersion>=9?"s":"")+(r.options.ecmaVersion>=13?"d":"")+(r.options.ecmaVersion>=15?"v":""),this.unicodeProperties=BB[r.options.ecmaVersion>=14?14:r.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};va.prototype.reset=function(r,t,n){var i=n.indexOf("v")!==-1,a=n.indexOf("u")!==-1;this.start=r|0,this.source=t+"",this.flags=n,i&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=a&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=a&&this.parser.options.ecmaVersion>=9)};va.prototype.raise=function(r){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+r)};va.prototype.at=function(r,t){t===void 0&&(t=!1);var n=this.source,i=n.length;if(r>=i)return-1;var a=n.charCodeAt(r);if(!(t||this.switchU)||a<=55295||a>=57344||r+1>=i)return a;var s=n.charCodeAt(r+1);return s>=56320&&s<=57343?(a<<10)+s-56613888:a};va.prototype.nextIndex=function(r,t){t===void 0&&(t=!1);var n=this.source,i=n.length;if(r>=i)return i;var a=n.charCodeAt(r),s;return!(t||this.switchU)||a<=55295||a>=57344||r+1>=i||(s=n.charCodeAt(r+1))<56320||s>57343?r+1:r+2};va.prototype.current=function(r){return r===void 0&&(r=!1),this.at(this.pos,r)};va.prototype.lookahead=function(r){return r===void 0&&(r=!1),this.at(this.nextIndex(this.pos,r),r)};va.prototype.advance=function(r){r===void 0&&(r=!1),this.pos=this.nextIndex(this.pos,r)};va.prototype.eat=function(r,t){return t===void 0&&(t=!1),this.current(t)===r?(this.advance(t),!0):!1};va.prototype.eatChars=function(r,t){t===void 0&&(t=!1);for(var n=this.pos,i=0,a=r;i-1&&this.raise(e.start,"Duplicate regular expression flag"),s==="u"&&(n=!0),s==="v"&&(i=!0)}this.options.ecmaVersion>=15&&n&&i&&this.raise(e.start,"Invalid regular expression flag")};ur.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))};ur.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var r=0,t=e.backReferenceNames;r=9&&(t=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!t,!0}return e.pos=r,!1};ur.regexp_eatQuantifier=function(e,r){return r===void 0&&(r=!1),this.regexp_eatQuantifierPrefix(e,r)?(e.eat(63),!0):!1};ur.regexp_eatQuantifierPrefix=function(e,r){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,r)};ur.regexp_eatBracedQuantifier=function(e,r){var t=e.pos;if(e.eat(123)){var n=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(n=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return i!==-1&&i=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};ur.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};ur.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};ur.regexp_eatSyntaxCharacter=function(e){var r=e.current();return IB(r)?(e.lastIntValue=r,e.advance(),!0):!1};function IB(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}ur.regexp_eatPatternCharacters=function(e){for(var r=e.pos,t=0;(t=e.current())!==-1&&!IB(t);)e.advance();return e.pos!==r};ur.regexp_eatExtendedPatternCharacter=function(e){var r=e.current();return r!==-1&&r!==36&&!(r>=40&&r<=43)&&r!==46&&r!==63&&r!==91&&r!==94&&r!==124?(e.advance(),!0):!1};ur.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e)){e.groupNames.indexOf(e.lastStringValue)!==-1&&e.raise("Duplicate capture group name"),e.groupNames.push(e.lastStringValue);return}e.raise("Invalid group")}};ur.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};ur.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=Eo(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=Eo(e.lastIntValue);return!0}return!1};ur.regexp_eatRegExpIdentifierStart=function(e){var r=e.pos,t=this.options.ecmaVersion>=11,n=e.current(t);return e.advance(t),n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,t)&&(n=e.lastIntValue),hY(n)?(e.lastIntValue=n,!0):(e.pos=r,!1)};function hY(e){return za(e,!0)||e===36||e===95}ur.regexp_eatRegExpIdentifierPart=function(e){var r=e.pos,t=this.options.ecmaVersion>=11,n=e.current(t);return e.advance(t),n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,t)&&(n=e.lastIntValue),dY(n)?(e.lastIntValue=n,!0):(e.pos=r,!1)};function dY(e){return gu(e,!0)||e===36||e===95||e===8204||e===8205}ur.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};ur.regexp_eatBackReference=function(e){var r=e.pos;if(this.regexp_eatDecimalEscape(e)){var t=e.lastIntValue;if(e.switchU)return t>e.maxBackReference&&(e.maxBackReference=t),!0;if(t<=e.numCapturingParens)return!0;e.pos=r}return!1};ur.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};ur.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};ur.regexp_eatCControlLetter=function(e){var r=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=r}return!1};ur.regexp_eatZero=function(e){return e.current()===48&&!jp(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};ur.regexp_eatControlEscape=function(e){var r=e.current();return r===116?(e.lastIntValue=9,e.advance(),!0):r===110?(e.lastIntValue=10,e.advance(),!0):r===118?(e.lastIntValue=11,e.advance(),!0):r===102?(e.lastIntValue=12,e.advance(),!0):r===114?(e.lastIntValue=13,e.advance(),!0):!1};ur.regexp_eatControlLetter=function(e){var r=e.current();return PB(r)?(e.lastIntValue=r%32,e.advance(),!0):!1};function PB(e){return e>=65&&e<=90||e>=97&&e<=122}ur.regexp_eatRegExpUnicodeEscapeSequence=function(e,r){r===void 0&&(r=!1);var t=e.pos,n=r||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(n&&i>=55296&&i<=56319){var a=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var s=e.lastIntValue;if(s>=56320&&s<=57343)return e.lastIntValue=(i-55296)*1024+(s-56320)+65536,!0}e.pos=a,e.lastIntValue=i}return!0}if(n&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&vY(e.lastIntValue))return!0;n&&e.raise("Invalid unicode escape"),e.pos=t}return!1};function vY(e){return e>=0&&e<=1114111}ur.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var r=e.current();return r!==99&&(!e.switchN||r!==107)?(e.lastIntValue=r,e.advance(),!0):!1};ur.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var r=e.current();if(r>=49&&r<=57){do e.lastIntValue=10*e.lastIntValue+(r-48),e.advance();while((r=e.current())>=48&&r<=57);return!0}return!1};var kB=0,Wa=1,Si=2;ur.regexp_eatCharacterClassEscape=function(e){var r=e.current();if(gY(r))return e.lastIntValue=-1,e.advance(),Wa;var t=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((t=r===80)||r===112)){e.lastIntValue=-1,e.advance();var n;if(e.eat(123)&&(n=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return t&&n===Si&&e.raise("Invalid property name"),n;e.raise("Invalid property name")}return kB};function gY(e){return e===100||e===68||e===115||e===83||e===119||e===87}ur.regexp_eatUnicodePropertyValueExpression=function(e){var r=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var t=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var n=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,t,n),Wa}}if(e.pos=r,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return kB};ur.regexp_validateUnicodePropertyNameAndValue=function(e,r,t){Bf(e.unicodeProperties.nonBinary,r)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[r].test(t)||e.raise("Invalid property value")};ur.regexp_validateUnicodePropertyNameOrValue=function(e,r){if(e.unicodeProperties.binary.test(r))return Wa;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(r))return Si;e.raise("Invalid property name")};ur.regexp_eatUnicodePropertyName=function(e){var r=0;for(e.lastStringValue="";RB(r=e.current());)e.lastStringValue+=Eo(r),e.advance();return e.lastStringValue!==""};function RB(e){return PB(e)||e===95}ur.regexp_eatUnicodePropertyValue=function(e){var r=0;for(e.lastStringValue="";xY(r=e.current());)e.lastStringValue+=Eo(r),e.advance();return e.lastStringValue!==""};function xY(e){return RB(e)||jp(e)}ur.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};ur.regexp_eatCharacterClass=function(e){if(e.eat(91)){var r=e.eat(94),t=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),r&&t===Si&&e.raise("Negated character class may contain strings"),!0}return!1};ur.regexp_classContents=function(e){return e.current()===93?Wa:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),Wa)};ur.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var r=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var t=e.lastIntValue;e.switchU&&(r===-1||t===-1)&&e.raise("Invalid character class"),r!==-1&&t!==-1&&r>t&&e.raise("Range out of order in character class")}}};ur.regexp_eatClassAtom=function(e){var r=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var t=e.current();(t===99||UB(t))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=r}var n=e.current();return n!==93?(e.lastIntValue=n,e.advance(),!0):!1};ur.regexp_eatClassEscape=function(e){var r=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=r}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};ur.regexp_classSetExpression=function(e){var r=Wa,t;if(!this.regexp_eatClassSetRange(e))if(t=this.regexp_eatClassSetOperand(e)){t===Si&&(r=Si);for(var n=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(t=this.regexp_eatClassSetOperand(e))){t!==Si&&(r=Wa);continue}e.raise("Invalid character in character class")}if(n!==e.pos)return r;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(n!==e.pos)return r}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(t=this.regexp_eatClassSetOperand(e),!t)return r;t===Si&&(r=Si)}};ur.regexp_eatClassSetRange=function(e){var r=e.pos;if(this.regexp_eatClassSetCharacter(e)){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;return t!==-1&&n!==-1&&t>n&&e.raise("Range out of order in character class"),!0}e.pos=r}return!1};ur.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?Wa:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};ur.regexp_eatNestedClass=function(e){var r=e.pos;if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);if(e.eat(93))return t&&n===Si&&e.raise("Negated character class may contain strings"),n;e.pos=r}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=r}return null};ur.regexp_eatClassStringDisjunction=function(e){var r=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var t=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return t}else e.raise("Invalid escape");e.pos=r}return null};ur.regexp_classStringDisjunctionContents=function(e){for(var r=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===Si&&(r=Si);return r};ur.regexp_classString=function(e){for(var r=0;this.regexp_eatClassSetCharacter(e);)r++;return r===1?Wa:Si};ur.regexp_eatClassSetCharacter=function(e){var r=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=r,!1);var t=e.current();return t<0||t===e.lookahead()&&yY(t)||bY(t)?!1:(e.advance(),e.lastIntValue=t,!0)};function yY(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function bY(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}ur.regexp_eatClassSetReservedPunctuator=function(e){var r=e.current();return wY(r)?(e.lastIntValue=r,e.advance(),!0):!1};function wY(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}ur.regexp_eatClassControlLetter=function(e){var r=e.current();return jp(r)||r===95?(e.lastIntValue=r%32,e.advance(),!0):!1};ur.regexp_eatHexEscapeSequence=function(e){var r=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=r}return!1};ur.regexp_eatDecimalDigits=function(e){var r=e.pos,t=0;for(e.lastIntValue=0;jp(t=e.current());)e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();return e.pos!==r};function jp(e){return e>=48&&e<=57}ur.regexp_eatHexDigits=function(e){var r=e.pos,t=0;for(e.lastIntValue=0;LB(t=e.current());)e.lastIntValue=16*e.lastIntValue+qB(t),e.advance();return e.pos!==r};function LB(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function qB(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}ur.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var r=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;r<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=r*64+t*8+e.lastIntValue:e.lastIntValue=r*8+t}else e.lastIntValue=r;return!0}return!1};ur.regexp_eatOctalDigit=function(e){var r=e.current();return UB(r)?(e.lastIntValue=r-48,e.advance(),!0):(e.lastIntValue=0,!1)};function UB(e){return e>=48&&e<=55}ur.regexp_eatFixedHexDigits=function(e,r){var t=e.pos;e.lastIntValue=0;for(var n=0;n=this.input.length)return this.finishToken(X.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};Yr.readToken=function(e){return za(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};Yr.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var r=this.input.charCodeAt(this.pos+1);return r<=56319||r>=57344?e:(e<<10)+r-56613888};Yr.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),r=this.pos,t=this.input.indexOf("*/",this.pos+=2);if(t===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=t+2,this.options.locations)for(var n=void 0,i=r;(n=fB(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=n;this.options.onComment&&this.options.onComment(!0,this.input.slice(r+2,t),r,this.pos,e,this.curPosition())};Yr.skipLineComment=function(e){for(var r=this.pos,t=this.options.onComment&&this.curPosition(),n=this.input.charCodeAt(this.pos+=e);this.pos8&&e<14||e>=5760&&lB.test(String.fromCharCode(e)))++this.pos;else break e}}};Yr.finishToken=function(e,r){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var t=this.type;this.type=e,this.value=r,this.updateContext(t)};Yr.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var r=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&r===46?(this.pos+=3,this.finishToken(X.ellipsis)):(++this.pos,this.finishToken(X.dot))};Yr.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(X.assign,2):this.finishOp(X.slash,1)};Yr.readToken_mult_modulo_exp=function(e){var r=this.input.charCodeAt(this.pos+1),t=1,n=e===42?X.star:X.modulo;return this.options.ecmaVersion>=7&&e===42&&r===42&&(++t,n=X.starstar,r=this.input.charCodeAt(this.pos+2)),r===61?this.finishOp(X.assign,t+1):this.finishOp(n,t)};Yr.readToken_pipe_amp=function(e){var r=this.input.charCodeAt(this.pos+1);if(r===e){if(this.options.ecmaVersion>=12){var t=this.input.charCodeAt(this.pos+2);if(t===61)return this.finishOp(X.assign,3)}return this.finishOp(e===124?X.logicalOR:X.logicalAND,2)}return r===61?this.finishOp(X.assign,2):this.finishOp(e===124?X.bitwiseOR:X.bitwiseAND,1)};Yr.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(X.assign,2):this.finishOp(X.bitwiseXOR,1)};Yr.readToken_plus_min=function(e){var r=this.input.charCodeAt(this.pos+1);return r===e?r===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||Ni.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(X.incDec,2):r===61?this.finishOp(X.assign,2):this.finishOp(X.plusMin,1)};Yr.readToken_lt_gt=function(e){var r=this.input.charCodeAt(this.pos+1),t=1;return r===e?(t=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+t)===61?this.finishOp(X.assign,t+1):this.finishOp(X.bitShift,t)):r===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(r===61&&(t=2),this.finishOp(X.relational,t))};Yr.readToken_eq_excl=function(e){var r=this.input.charCodeAt(this.pos+1);return r===61?this.finishOp(X.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&r===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(X.arrow)):this.finishOp(e===61?X.eq:X.prefix,1)};Yr.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var r=this.input.charCodeAt(this.pos+1);if(r===46){var t=this.input.charCodeAt(this.pos+2);if(t<48||t>57)return this.finishOp(X.questionDot,2)}if(r===63){if(e>=12){var n=this.input.charCodeAt(this.pos+2);if(n===61)return this.finishOp(X.assign,3)}return this.finishOp(X.coalesce,2)}}return this.finishOp(X.question,1)};Yr.readToken_numberSign=function(){var e=this.options.ecmaVersion,r=35;if(e>=13&&(++this.pos,r=this.fullCharCodeAtPos(),za(r,!0)||r===92))return this.finishToken(X.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+Eo(r)+"'")};Yr.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(X.parenL);case 41:return++this.pos,this.finishToken(X.parenR);case 59:return++this.pos,this.finishToken(X.semi);case 44:return++this.pos,this.finishToken(X.comma);case 91:return++this.pos,this.finishToken(X.bracketL);case 93:return++this.pos,this.finishToken(X.bracketR);case 123:return++this.pos,this.finishToken(X.braceL);case 125:return++this.pos,this.finishToken(X.braceR);case 58:return++this.pos,this.finishToken(X.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(X.backQuote);case 48:var r=this.input.charCodeAt(this.pos+1);if(r===120||r===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(r===111||r===79)return this.readRadixNumber(8);if(r===98||r===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(X.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Eo(e)+"'")};Yr.finishOp=function(e,r){var t=this.input.slice(this.pos,this.pos+r);return this.pos+=r,this.finishToken(e,t)};Yr.readRegexp=function(){for(var e,r,t=this.pos;;){this.pos>=this.input.length&&this.raise(t,"Unterminated regular expression");var n=this.input.charAt(this.pos);if(Ni.test(n)&&this.raise(t,"Unterminated regular expression"),e)e=!1;else{if(n==="[")r=!0;else if(n==="]"&&r)r=!1;else if(n==="/"&&!r)break;e=n==="\\\\"}++this.pos}var i=this.input.slice(t,this.pos);++this.pos;var a=this.pos,s=this.readWord1();this.containsEsc&&this.unexpected(a);var l=this.regexpState||(this.regexpState=new va(this));l.reset(t,i,s),this.validateRegExpFlags(l),this.validateRegExpPattern(l);var f=null;try{f=new RegExp(i,s)}catch{}return this.finishToken(X.regexp,{pattern:i,flags:s,value:f})};Yr.readInt=function(e,r,t){for(var n=this.options.ecmaVersion>=12&&r===void 0,i=t&&this.input.charCodeAt(this.pos)===48,a=this.pos,s=0,l=0,f=0,o=r??1/0;f=97?p=u-97+10:u>=65?p=u-65+10:u>=48&&u<=57?p=u-48:p=1/0,p>=e)break;l=u,s=s*e+p}return n&&l===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===a||r!=null&&this.pos-a!==r?null:s};function DY(e,r){return r?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function zB(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}Yr.readRadixNumber=function(e){var r=this.pos;this.pos+=2;var t=this.readInt(e);return t==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(t=zB(this.input.slice(r,this.pos)),++this.pos):za(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(X.num,t)};Yr.readNumber=function(e){var r=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(r,"Invalid number");var t=this.pos-r>=2&&this.input.charCodeAt(r)===48;t&&this.strict&&this.raise(r,"Invalid number");var n=this.input.charCodeAt(this.pos);if(!t&&!e&&this.options.ecmaVersion>=11&&n===110){var i=zB(this.input.slice(r,this.pos));return++this.pos,za(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(X.num,i)}t&&/[89]/.test(this.input.slice(r,this.pos))&&(t=!1),n===46&&!t&&(++this.pos,this.readInt(10),n=this.input.charCodeAt(this.pos)),(n===69||n===101)&&!t&&(n=this.input.charCodeAt(++this.pos),(n===43||n===45)&&++this.pos,this.readInt(10)===null&&this.raise(r,"Invalid number")),za(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var a=DY(this.input.slice(r,this.pos),t);return this.finishToken(X.num,a)};Yr.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),r;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;r=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,r>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else r=this.readHexChar(4);return r};Yr.readString=function(e){for(var r="",t=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var n=this.input.charCodeAt(this.pos);if(n===e)break;n===92?(r+=this.input.slice(t,this.pos),r+=this.readEscapedChar(!1),t=this.pos):n===8232||n===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(xu(n)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return r+=this.input.slice(t,this.pos++),this.finishToken(X.string,r)};var WB={};Yr.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===WB)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};Yr.invalidStringToken=function(e,r){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw WB;this.raise(e,r)};Yr.readTmplToken=function(){for(var e="",r=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var t=this.input.charCodeAt(this.pos);if(t===96||t===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===X.template||this.type===X.invalidTemplate)?t===36?(this.pos+=2,this.finishToken(X.dollarBraceL)):(++this.pos,this.finishToken(X.backQuote)):(e+=this.input.slice(r,this.pos),this.finishToken(X.template,e));if(t===92)e+=this.input.slice(r,this.pos),e+=this.readEscapedChar(!0),r=this.pos;else if(xu(t)){switch(e+=this.input.slice(r,this.pos),++this.pos,t){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=\` +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 i_={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 a_={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 o_={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 s_={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 u_={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 f_={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 l_={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 c_={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 p_={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 m_={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 h_={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 d_={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 v_={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]};var g_={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 x_={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 y_={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 b_={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 w_={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 D_={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 S_={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 N_={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 A_={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 E_={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 C_={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 M_={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 __={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 T_={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 F_={name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]};var O_={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 B_={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 I_={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 P_={name:"bin",category:"Utils",syntax:["bin(value)"],description:"Format a number as binary",examples:["bin(2)"],seealso:["oct","hex"]};var k_={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 R_={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 L_={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 q_={name:"hex",category:"Utils",syntax:["hex(value)"],description:"Format a number as hexadecimal",examples:["hex(240)"],seealso:["bin","oct"]};var U_={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 z_={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 W_={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 V_={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 Y_={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 H_={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 G_={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 $_={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 Z_={name:"oct",category:"Utils",syntax:["oct(value)"],description:"Format a number as octal",examples:["oct(56)"],seealso:["bin","hex"]};var Q_={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 X_={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 J_={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 K_={bignumber:WA,boolean:VA,complex:YA,createUnit:HA,fraction:GA,index:$A,matrix:ZA,number:QA,sparse:XA,splitUnit:JA,string:KA,unit:jA,e:xg,E:xg,false:CA,i:MA,Infinity:_A,LN2:FA,LN10:TA,LOG2E:BA,LOG10E:OA,NaN:IA,null:PA,pi:yg,PI:yg,phi:kA,SQRT1_2:RA,SQRT2:LA,tau:qA,true:UA,version:zA,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:nE,lsolve:aE,lsolveAll:oE,lup:sE,lusolve:uE,leafCount:iE,polynomialRoot:fE,resolve:pE,simplify:mE,simplifyConstant:hE,simplifyCore:dE,symbolicEqual:gE,rationalize:cE,slu:vE,usolve:xE,usolveAll:yE,qr:lE,abs:bE,add:wE,cbrt:DE,ceil:SE,cube:NE,divide:AE,dotDivide:EE,dotMultiply:CE,dotPow:ME,exp:_E,expm:TE,expm1:FE,fix:OE,floor:BE,gcd:IE,hypot:PE,lcm:RE,log:LE,log2:zE,log1p:UE,log10:qE,mod:WE,multiply:VE,norm:YE,nthRoot:HE,nthRoots:GE,pow:$E,round:ZE,sign:QE,sqrt:XE,sqrtm:JE,square:rC,subtract:tC,unaryMinus:nC,unaryPlus:iC,xgcd:aC,invmod:kE,bitAnd:oC,bitNot:sC,bitOr:uC,bitXor:fC,leftShift:lC,rightArithShift:cC,rightLogShift:pC,bellNumbers:mC,catalan:hC,composition:dC,stirlingS2:vC,config:eE,import:rE,typed:tE,arg:gC,conj:xC,re:bC,im:yC,evaluate:wC,help:DC,distance:SC,intersect:NC,and:AC,not:EC,or:CC,xor:MC,concat:TC,count:FC,cross:OC,column:_C,ctranspose:BC,det:IC,diag:PC,diff:kC,dot:RC,getMatrixDataType:WC,identity:VC,filter:qC,flatten:UC,forEach:zC,inv:YC,pinv:HC,eigs:LC,kron:GC,matrixFromFunction:QC,matrixFromRows:XC,matrixFromColumns:ZC,map:$C,ones:JC,partitionSelect:KC,range:jC,resize:rM,reshape:eM,rotate:tM,rotationMatrix:nM,row:iM,size:aM,sort:oM,squeeze:sM,subset:uM,trace:fM,transpose:lM,zeros:cM,fft:pM,ifft:mM,sylvester:KE,schur:jE,lyap:eC,solveODE:J_,combinations:hM,combinationsWithRep:dM,factorial:vM,gamma:gM,kldivergence:yM,lgamma:xM,multinomial:bM,permutations:wM,pickRandom:DM,random:SM,randomInt:NM,compare:AM,compareNatural:EM,compareText:CM,deepEqual:MM,equal:_M,equalText:TM,larger:FM,largerEq:OM,smaller:BM,smallerEq:IM,unequal:PM,setCartesian:kM,setDifference:RM,setDistinct:LM,setIntersect:qM,setIsSubset:UM,setMultiplicity:zM,setPowerset:WM,setSize:VM,setSymDifference:YM,setUnion:HM,zpk2tf:GM,freqz:$M,erf:ZM,zeta:QM,cumsum:a_,mad:XM,max:JM,mean:KM,median:jM,min:e_,mode:r_,prod:t_,quantileSeq:n_,std:i_,sum:o_,variance:s_,corr:u_,acos:f_,acosh:l_,acot:c_,acoth:p_,acsc:m_,acsch:h_,asec:d_,asech:v_,asin:g_,asinh:x_,atan:y_,atanh:w_,atan2:b_,cos:D_,cosh:S_,cot:N_,coth:A_,csc:E_,csch:C_,sec:M_,sech:__,sin:T_,sinh:F_,tan:O_,tanh:B_,to:I_,clone:k_,format:R_,bin:P_,oct:Z_,hex:q_,isNaN:z_,isInteger:U_,isNegative:W_,isNumeric:V_,hasNumericValue:L_,isPositive:Y_,isPrime:H_,isZero:G_,print:Q_,typeOf:X_,numeric:$_};var j_="help",zz=["typed","mathWithTransform","Help"],eT=T(j_,zz,e=>{var{typed:r,mathWithTransform:t,Help:n}=e;return r(j_,{any:function(a){var s,l=a;if(typeof a!="string"){for(s in t)if($e(t,s)&&a===t[s]){l=s;break}}var f=gt(K_,l);if(!f){var o=typeof l=="function"?l.name:l;throw new Error('No documentation found on "'+o+'"')}return new n(f)}})});var rT="chain",Wz=["typed","Chain"],tT=T(rT,Wz,e=>{var{typed:r,Chain:t}=e;return r(rT,{"":function(){return new t},any:function(i){return new t(i)}})});var nT="det",Vz=["typed","matrix","subtractScalar","multiply","divideScalar","isZero","unaryMinus"],iT=T(nT,Vz,e=>{var{typed:r,matrix:t,subtractScalar:n,multiply:i,divideScalar:a,isZero:s,unaryMinus:l}=e;return r(nT,{any:function(u){return tr(u)},"Array | Matrix":function(u){var p;switch(Ge(u)?p=u.size():Array.isArray(u)?(u=t(u),p=u.size()):p=[],p.length){case 0:return tr(u);case 1:if(p[0]===1)return tr(u.valueOf()[0]);if(p[0]===0)return 1;throw new RangeError("Matrix must be square (size: "+lr(p)+")");case 2:{var h=p[0],d=p[1];if(h===d)return f(u.clone().valueOf(),h,d);if(d===0)return 1;throw new RangeError("Matrix must be square (size: "+lr(p)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+lr(p)+")")}}});function f(o,u,p){if(u===1)return tr(o[0][0]);if(u===2)return n(i(o[0][0],o[1][1]),i(o[1][0],o[0][1]));for(var h=!1,d=new Array(u).fill(0).map((O,F)=>F),x=0;x{var{typed:r,matrix:t,divideScalar:n,addScalar:i,multiply:a,unaryMinus:s,det:l,identity:f,abs:o}=e;return r(aT,{"Array | Matrix":function(h){var d=Ge(h)?h.size():or(h);switch(d.length){case 1:if(d[0]===1)return Ge(h)?t([n(1,h.valueOf()[0])]):[n(1,h[0])];throw new RangeError("Matrix must be square (size: "+lr(d)+")");case 2:{var x=d[0],v=d[1];if(x===v)return Ge(h)?t(u(h.valueOf(),x,v),h.storage()):u(h,x,v);throw new RangeError("Matrix must be square (size: "+lr(d)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+lr(d)+")")}},any:function(h){return n(1,h)}});function u(p,h,d){var x,v,y,w,C;if(h===1){if(w=p[0][0],w===0)throw Error("Cannot calculate inverse, determinant is zero");return[[n(1,w)]]}else if(h===2){var b=l(p);if(b===0)throw Error("Cannot calculate inverse, determinant is zero");return[[n(p[1][1],b),n(s(p[0][1]),b)],[n(s(p[1][0]),b),n(p[0][0],b)]]}else{var A=p.concat();for(x=0;xO&&(O=o(A[x][S]),F=x),x++;if(O===0)throw Error("Cannot calculate inverse, determinant is zero");x=F,x!==S&&(C=A[S],A[S]=A[x],A[x]=C,C=E[S],E[S]=E[x],E[x]=C);var M=A[S],_=E[S];for(x=0;x{var{typed:r,matrix:t,inv:n,deepEqual:i,equal:a,dotDivide:s,dot:l,ctranspose:f,divideScalar:o,multiply:u,add:p,Complex:h}=e;return r(sT,{"Array | Matrix":function(b){var A=Ge(b)?b.size():or(b);switch(A.length){case 1:return w(b)?f(b):A[0]===1?n(b):s(f(b),l(b,b));case 2:{if(w(b))return f(b);var E=A[0],S=A[1];if(E===S)try{return n(b)}catch(O){if(!(O instanceof Error&&O.message.match(/Cannot calculate inverse, determinant is zero/)))throw O}return Ge(b)?t(d(b.valueOf(),E,S),b.storage()):d(b,E,S)}default:throw new RangeError("Matrix must be two dimensional (size: "+lr(A)+")")}},any:function(b){return a(b,0)?tr(b):o(1,b)}});function d(C,b,A){var{C:E,F:S}=v(C,b,A),O=u(n(u(f(E),E)),f(E)),F=u(f(S),n(u(S,f(S))));return u(F,O)}function x(C,b,A){for(var E=tr(C),S=0,O=0;OF.filter((_,k)=>k!y(l(E[M],E[M])));return{C:S,F:O}}function y(C){return a(p(C,h(1,1)),p(0,h(1,1)))}function w(C){return i(p(C,h(1,1)),p(u(C,0),h(1,1)))}});function fT(e){var{addScalar:r,subtract:t,flatten:n,multiply:i,multiplyScalar:a,divideScalar:s,sqrt:l,abs:f,bignumber:o,diag:u,size:p,reshape:h,inv:d,qr:x,usolve:v,usolveAll:y,equal:w,complex:C,larger:b,smaller:A,matrixFromColumns:E,dot:S}=e;function O(ie,H,ce,Me){var pe=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,ge=F(ie,H,ce,Me,pe);M(ie,H,ce,Me,pe,ge);var{values:Se,C:xe}=_(ie,H,ce,Me,pe);if(pe){var be=k(ie,H,xe,ge,Se,ce,Me);return{values:Se,eigenvectors:be}}return{values:Se}}function F(ie,H,ce,Me,pe){var ge=Me==="BigNumber",Se=Me==="Complex",xe=ge?o(0):0,be=ge?o(1):Se?C(1):1,De=ge?o(1):1,Ae=ge?o(10):2,ze=a(Ae,Ae),Ze;pe&&(Ze=Array(H).fill(be));for(var K=!1;!K;){K=!0;for(var te=0;te1&&(K=u(Array(Ae-1).fill(xe)))),Ae-=1,be.pop();for(var Ce=0;Ce2&&(K=u(Array(Ae-2).fill(xe)))),Ae-=2,be.pop(),be.pop();for(var Ie=0;Ie+t(f(Xe),f(Or))),te>100){var sr=Error("The eigenvalues failed to converge. Only found these eigenvalues: "+De.join(", "));throw sr.values=De,sr.vectors=[],sr}var ir=pe?i(Ze,V(ze,H)):void 0;return{values:De,C:ir}}function k(ie,H,ce,Me,pe,ge,Se){var xe=d(ce),be=i(xe,ie,ce),De=Se==="BigNumber",Ae=Se==="Complex",ze=De?o(0):Ae?C(0):0,Ze=De?o(1):Ae?C(1):1,K=[],te=[];for(var ye of pe){var ee=q(K,ye,w);ee===-1?(K.push(ye),te.push(1)):te[ee]+=1}for(var ne=[],ue=K.length,Ee=Array(H).fill(ze),Ce=u(Array(H).fill(Ze)),Le=function(){var ir=K[Ie],Xe=t(be,i(ir,Ce)),Or=y(Xe,Ee);for(Or.shift();Or.lengthi(le,we)),ne.push(...Or.map(we=>({value:ir,vector:n(we)})))},Ie=0;Ie=5)return null;for(xe=0;;){var be=v(ie,Se);if(A(oe(U(Se,[be])),Me))break;if(++xe>=10)return null;Se=me(be)}return Se}function j(ie,H,ce){var Me=ce==="BigNumber",pe=ce==="Complex",ge=Array(ie).fill(0).map(Se=>2*Math.random()-1);return Me&&(ge=ge.map(Se=>o(Se))),pe&&(ge=ge.map(Se=>C(Se))),ge=U(ge,H),me(ge,ce)}function U(ie,H){var ce=p(ie);for(var Me of H)Me=h(Me,ce),ie=t(ie,i(s(S(Me,ie),S(Me,Me)),Me));return ie}function oe(ie){return f(l(S(ie,ie)))}function me(ie,H){var ce=H==="BigNumber",Me=H==="Complex",pe=ce?o(1):Me?C(1):1;return i(s(pe,oe(ie)),ie)}return O}function lT(e){var{config:r,addScalar:t,subtract:n,abs:i,atan:a,cos:s,sin:l,multiplyScalar:f,inv:o,bignumber:u,multiply:p,add:h}=e;function d(M,_){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:r.epsilon,L=arguments.length>3?arguments[3]:void 0,Y=arguments.length>4?arguments[4]:void 0;if(L==="number")return x(M,k,Y);if(L==="BigNumber")return v(M,k,Y);throw TypeError("Unsupported data type: "+L)}function x(M,_,k){var L=M.length,Y=Math.abs(_/L),$,V;if(k){V=new Array(L);for(var q=0;q=Math.abs(Y);){var j=R[0][0],U=R[0][1];$=y(M[j][j],M[U][U],M[j][U]),M=E(M,$,j,U),k&&(V=C(V,$,j,U)),R=S(M)}for(var oe=Array(L).fill(0),me=0;me=i(Y);){var j=R[0][0],U=R[0][1];$=w(M[j][j],M[U][U],M[j][U]),M=A(M,$,j,U),k&&(V=b(V,$,j,U)),R=O(M)}for(var oe=Array(L).fill(0),me=0;me({value:Y[H],vector:ie}));return{values:Y,eigenvectors:me}}return d}var Gz="eigs",$z=["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"],cT=T(Gz,$z,e=>{var{config:r,typed:t,matrix:n,addScalar:i,subtract:a,equal:s,abs:l,atan:f,cos:o,sin:u,multiplyScalar:p,divideScalar:h,inv:d,bignumber:x,multiply:v,add:y,larger:w,column:C,flatten:b,number:A,complex:E,sqrt:S,diag:O,size:F,reshape:M,qr:_,usolve:k,usolveAll:L,im:Y,re:$,smaller:V,matrixFromColumns:q,dot:R}=e,j=lT({config:r,addScalar:i,subtract:a,column:C,flatten:b,equal:s,abs:l,atan:f,cos:o,sin:u,multiplyScalar:p,inv:d,bignumber:x,complex:E,multiply:v,add:y}),U=fT({config:r,addScalar:i,subtract:a,multiply:v,multiplyScalar:p,flatten:b,divideScalar:h,sqrt:S,abs:l,bignumber:x,diag:O,size:F,reshape:M,qr:_,inv:d,usolve:k,usolveAll:L,equal:s,complex:E,larger:w,smaller:V,matrixFromColumns:q,dot:R});return t("eigs",{Array:function(ge){return oe(n(ge))},"Array, number|BigNumber":function(ge,Se){return oe(n(ge),{precision:Se})},"Array, Object"(pe,ge){return oe(n(pe),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 Mt(xe,Se),oe(ge,xe)}});function oe(pe){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=me(pe,be,xe);return Se.matricize&&(De.values=n(De.values),xe&&(De.eigenvectors=De.eigenvectors.map(Ae=>{var{value:ze,vector:Ze}=Ae;return{value:ze,vector:n(Ze)}}))),xe&&Object.defineProperty(De,"vectors",{enumerable:!1,get:()=>{throw new Error("eigs(M).vectors replaced with eigs(M).eigenvectors")}}),De}function me(pe,ge,Se){var xe=pe.toArray(),be=pe.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(H(xe,De,ge)&&(ce(xe,De),ie(xe,De,ge))){var Ae=Me(pe,xe,De);return j(xe,De,ge,Ae,Se)}var ze=Me(pe,xe,De);return U(xe,De,ge,ze,Se)}function ie(pe,ge,Se){for(var xe=0;xe{var{typed:r,abs:t,add:n,identity:i,inv:a,multiply:s}=e;return r(pT,{Matrix:function(p){var h=p.size();if(h.length!==2||h[0]!==h[1])throw new RangeError("Matrix must be square (size: "+lr(h)+")");for(var d=h[0],x=1e-15,v=l(p),y=f(v,x),w=y.q,C=y.j,b=s(p,Math.pow(2,-C)),A=i(d),E=i(d),S=1,O=b,F=-1,M=1;M<=w;M++)M>1&&(O=s(O,b),F=-F),S=S*(w-M+1)/((2*w-M+1)*M),A=n(A,s(S,O)),E=n(E,s(S*F,O));for(var _=s(a(E),A),k=0;k{var{typed:r,abs:t,add:n,multiply:i,map:a,sqrt:s,subtract:l,inv:f,size:o,max:u,identity:p}=e,h=1e3,d=1e-6;function x(v){var y,w=0,C=v,b=p(o(v));do{var A=C;if(C=i(.5,n(A,f(b))),b=i(.5,n(b,f(A))),y=u(t(l(C,A))),y>d&&++w>h)throw new Error("computing square root of matrix: iterative method could not converge")}while(y>d);return C}return r(hT,{"Array | Matrix":function(y){var w=Ge(y)?y.size():or(y);switch(w.length){case 1:if(w[0]===1)return a(y,s);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 vT="sylvester",Xz=["typed","schur","matrixFromColumns","matrix","multiply","range","concat","transpose","index","subset","add","subtract","identity","lusolve","abs"],gT=T(vT,Xz,e=>{var{typed:r,schur:t,matrixFromColumns:n,matrix:i,multiply:a,range:s,concat:l,transpose:f,index:o,subset:u,add:p,subtract:h,identity:d,lusolve:x,abs:v}=e;return r(vT,{"Matrix, Matrix, Matrix":y,"Array, Matrix, Matrix":function(C,b,A){return y(i(C),b,A)},"Array, Array, Matrix":function(C,b,A){return y(i(C),i(b),A)},"Array, Matrix, Array":function(C,b,A){return y(i(C),b,i(A))},"Matrix, Array, Matrix":function(C,b,A){return y(C,i(b),A)},"Matrix, Array, Array":function(C,b,A){return y(C,i(b),i(A))},"Matrix, Matrix, Array":function(C,b,A){return y(C,b,i(A))},"Array, Array, Array":function(C,b,A){return y(i(C),i(b),i(A)).toArray()}});function y(w,C,b){for(var A=C.size()[0],E=w.size()[0],S=t(w),O=S.T,F=S.U,M=t(a(-1,C)),_=M.T,k=M.U,L=a(a(f(F),b),k),Y=s(0,E),$=[],V=(Ae,ze)=>l(Ae,ze,1),q=(Ae,ze)=>l(Ae,ze,0),R=0;R1e-5){for(var j=q(u(L,o(Y,R)),u(L,o(Y,R+1))),U=0;U{var{typed:r,matrix:t,identity:n,multiply:i,qr:a,norm:s,subtract:l}=e;return r(xT,{Array:function(u){var p=f(t(u));return{U:p.U.valueOf(),T:p.T.valueOf()}},Matrix:function(u){return f(u)}});function f(o){var u=o.size()[0],p=o,h=n(u),d=0,x;do{x=p;var v=a(p),y=v.Q,w=v.R;if(p=i(w,y),h=i(h,y),d++>100)break}while(s(l(p,x))>1e-4);return{U:h,T:p}}});var bT="lyap",Kz=["typed","matrix","sylvester","multiply","transpose"],wT=T(bT,Kz,e=>{var{typed:r,matrix:t,sylvester:n,multiply:i,transpose:a}=e;return r(bT,{"Matrix, Matrix":function(l,f){return n(l,a(l),i(-1,f))},"Array, Matrix":function(l,f){return n(t(l),a(t(l)),i(-1,f))},"Matrix, Array":function(l,f){return n(l,a(t(l)),t(i(-1,f)))},"Array, Array":function(l,f){return n(t(l),a(t(l)),t(i(-1,f))).toArray()}})});var jz="divide",eW=["typed","matrix","multiply","equalScalar","divideScalar","inv"],DT=T(jz,eW,e=>{var{typed:r,matrix:t,multiply:n,equalScalar:i,divideScalar:a,inv:s}=e,l=Jr({typed:r,equalScalar:i}),f=Bt({typed:r});return r("divide",xc({"Array | Matrix, Array | Matrix":function(u,p){return n(u,s(p))},"DenseMatrix, any":function(u,p){return f(u,p,a,!1)},"SparseMatrix, any":function(u,p){return l(u,p,a,!1)},"Array, any":function(u,p){return f(t(u),p,a,!1).valueOf()},"any, Array | Matrix":function(u,p){return n(u,s(p))}},a.signatures))});var ST="distance",rW=["typed","addScalar","subtractScalar","divideScalar","multiplyScalar","deepEqual","sqrt","abs"],NT=T(ST,rW,e=>{var{typed:r,addScalar:t,subtractScalar:n,multiplyScalar:i,divideScalar:a,deepEqual:s,sqrt:l,abs:f}=e;return r(ST,{"Array, Array, Array":function(E,S,O){if(E.length===2&&S.length===2&&O.length===2){if(!u(E))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!u(S))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!u(O))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(s(S,O))throw new TypeError("LinePoint1 should not be same with LinePoint2");var F=n(O[1],S[1]),M=n(S[0],O[0]),_=n(i(O[0],S[1]),i(S[0],O[1]));return y(E[0],E[1],F,M,_)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object, Object":function(E,S,O){if(Object.keys(E).length===2&&Object.keys(S).length===2&&Object.keys(O).length===2){if(!u(E))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!u(S))throw new TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!u(O))throw new TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");if(s(x(S),x(O)))throw new TypeError("LinePoint1 should not be same with LinePoint2");if("pointX"in E&&"pointY"in E&&"lineOnePtX"in S&&"lineOnePtY"in S&&"lineTwoPtX"in O&&"lineTwoPtY"in O){var F=n(O.lineTwoPtY,S.lineOnePtY),M=n(S.lineOnePtX,O.lineTwoPtX),_=n(i(O.lineTwoPtX,S.lineOnePtY),i(S.lineOnePtX,O.lineTwoPtY));return y(E.pointX,E.pointY,F,M,_)}else throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},"Array, Array":function(E,S){if(E.length===2&&S.length===3){if(!u(E))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!p(S))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return y(E[0],E[1],S[0],S[1],S[2])}else if(E.length===3&&S.length===6){if(!p(E))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!d(S))throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument");return w(E[0],E[1],E[2],S[0],S[1],S[2],S[3],S[4],S[5])}else if(E.length===S.length&&E.length>0){if(!h(E))throw new TypeError("All values of an array should be numbers or BigNumbers");if(!h(S))throw new TypeError("All values of an array should be numbers or BigNumbers");return C(E,S)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object":function(E,S){if(Object.keys(E).length===2&&Object.keys(S).length===3){if(!u(E))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!p(S))throw new TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if("pointX"in E&&"pointY"in E&&"xCoeffLine"in S&&"yCoeffLine"in S&&"constant"in S)return y(E.pointX,E.pointY,S.xCoeffLine,S.yCoeffLine,S.constant);throw new TypeError("Key names do not match")}else if(Object.keys(E).length===3&&Object.keys(S).length===6){if(!p(E))throw new TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!d(S))throw new TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if("pointX"in E&&"pointY"in E&&"x0"in S&&"y0"in S&&"z0"in S&&"a"in S&&"b"in S&&"c"in S)return w(E.pointX,E.pointY,E.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(E).length===2&&Object.keys(S).length===2){if(!u(E))throw new TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!u(S))throw new TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if("pointOneX"in E&&"pointOneY"in E&&"pointTwoX"in S&&"pointTwoY"in S)return C([E.pointOneX,E.pointOneY],[S.pointTwoX,S.pointTwoY]);throw new TypeError("Key names do not match")}else if(Object.keys(E).length===3&&Object.keys(S).length===3){if(!p(E))throw new TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!p(S))throw new TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if("pointOneX"in E&&"pointOneY"in E&&"pointOneZ"in E&&"pointTwoX"in S&&"pointTwoY"in S&&"pointTwoZ"in S)return C([E.pointOneX,E.pointOneY,E.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(E){if(!v(E))throw new TypeError("Incorrect array format entered for pairwise distance calculation");return b(E)}});function o(A){return typeof A=="number"||je(A)}function u(A){return A.constructor!==Array&&(A=x(A)),o(A[0])&&o(A[1])}function p(A){return A.constructor!==Array&&(A=x(A)),o(A[0])&&o(A[1])&&o(A[2])}function h(A){return Array.isArray(A)||(A=x(A)),A.every(o)}function d(A){return A.constructor!==Array&&(A=x(A)),o(A[0])&&o(A[1])&&o(A[2])&&o(A[3])&&o(A[4])&&o(A[5])}function x(A){for(var E=Object.keys(A),S=[],O=0;OE.length!==2||!o(E[0])||!o(E[1])))return!1}else if(A[0].length===3&&o(A[0][0])&&o(A[0][1])&&o(A[0][2])){if(A.some(E=>E.length!==3||!o(E[0])||!o(E[1])||!o(E[2])))return!1}else return!1;return!0}function y(A,E,S,O,F){var M=f(t(t(i(S,A),i(O,E)),F)),_=l(t(i(S,S),i(O,O)));return a(M,_)}function w(A,E,S,O,F,M,_,k,L){var Y=[n(i(n(F,E),L),i(n(M,S),k)),n(i(n(M,S),_),i(n(O,A),L)),n(i(n(O,A),k),i(n(F,E),_))];Y=l(t(t(i(Y[0],Y[0]),i(Y[1],Y[1])),i(Y[2],Y[2])));var $=l(t(t(i(_,_),i(k,k)),i(L,L)));return a(Y,$)}function C(A,E){for(var S=A.length,O=0,F=0,M=0;M{var{typed:r,config:t,abs:n,add:i,addScalar:a,matrix:s,multiply:l,multiplyScalar:f,divideScalar:o,subtract:u,smaller:p,equalScalar:h,flatten:d,isZero:x,isNumeric:v}=e;return r("intersect",{"Array, Array, Array":y,"Array, Array, Array, Array":w,"Matrix, Matrix, Matrix":function(k,L,Y){var $=y(k.valueOf(),L.valueOf(),Y.valueOf());return $===null?null:s($)},"Matrix, Matrix, Matrix, Matrix":function(k,L,Y,$){var V=w(k.valueOf(),L.valueOf(),Y.valueOf(),$.valueOf());return V===null?null:s(V)}});function y(_,k,L){if(_=C(_),k=C(k),L=C(L),!A(_))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!A(k))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!E(L))throw new TypeError("Array with 4 numbers expected as third argument");return M(_[0],_[1],_[2],k[0],k[1],k[2],L[0],L[1],L[2],L[3])}function w(_,k,L,Y){if(_=C(_),k=C(k),L=C(L),Y=C(Y),_.length===2){if(!b(_))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!b(k))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!b(L))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(!b(Y))throw new TypeError("Array with 2 numbers or BigNumbers expected for fourth argument");return S(_,k,L,Y)}else if(_.length===3){if(!A(_))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!A(k))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!A(L))throw new TypeError("Array with 3 numbers or BigNumbers expected for third argument");if(!A(Y))throw new TypeError("Array with 3 numbers or BigNumbers expected for fourth argument");return F(_[0],_[1],_[2],k[0],k[1],k[2],L[0],L[1],L[2],Y[0],Y[1],Y[2])}else throw new TypeError("Arrays with two or thee dimensional points expected")}function C(_){return _.length===1?_[0]:_.length>1&&Array.isArray(_[0])&&_.every(k=>Array.isArray(k)&&k.length===1)?d(_):_}function b(_){return _.length===2&&v(_[0])&&v(_[1])}function A(_){return _.length===3&&v(_[0])&&v(_[1])&&v(_[2])}function E(_){return _.length===4&&v(_[0])&&v(_[1])&&v(_[2])&&v(_[3])}function S(_,k,L,Y){var $=_,V=L,q=u($,k),R=u(V,Y),j=u(f(q[0],R[1]),f(R[0],q[1]));if(x(j)||p(n(j),t.epsilon))return null;var U=f(R[0],$[1]),oe=f(R[1],$[0]),me=f(R[0],V[1]),ie=f(R[1],V[0]),H=o(a(u(u(U,oe),me),ie),j);return i(l(q,H),$)}function O(_,k,L,Y,$,V,q,R,j,U,oe,me){var ie=f(u(_,k),u(L,Y)),H=f(u($,V),u(q,R)),ce=f(u(j,U),u(oe,me));return a(a(ie,H),ce)}function F(_,k,L,Y,$,V,q,R,j,U,oe,me){var ie=O(_,q,U,q,k,R,oe,R,L,j,me,j),H=O(U,q,Y,_,oe,R,$,k,me,j,V,L),ce=O(_,q,Y,_,k,R,$,k,L,j,V,L),Me=O(U,q,U,q,oe,R,oe,R,me,j,me,j),pe=O(Y,_,Y,_,$,k,$,k,V,L,V,L),ge=u(f(ie,H),f(ce,Me)),Se=u(f(pe,Me),f(H,H));if(x(Se))return null;var xe=o(ge,Se),be=o(a(ie,f(xe,H)),Me),De=a(_,f(xe,u(Y,_))),Ae=a(k,f(xe,u($,k))),ze=a(L,f(xe,u(V,L))),Ze=a(q,f(be,u(U,q))),K=a(R,f(be,u(oe,R))),te=a(j,f(be,u(me,j)));return h(De,Ze)&&h(Ae,K)&&h(ze,te)?[De,Ae,ze]:null}function M(_,k,L,Y,$,V,q,R,j,U){var oe=f(_,q),me=f(Y,q),ie=f(k,R),H=f($,R),ce=f(L,j),Me=f(V,j),pe=u(u(u(U,oe),ie),ce),ge=u(u(u(a(a(me,H),Me),oe),ie),ce),Se=o(pe,ge),xe=a(_,f(Se,u(Y,_))),be=a(k,f(Se,u($,k))),De=a(L,f(Se,u(V,L)));return[xe,be,De]}});var ET="sum",iW=["typed","config","add","numeric"],Lp=T(ET,iW,e=>{var{typed:r,config:t,add:n,numeric:i}=e;return r(ET,{"Array | Matrix":a,"Array | Matrix, number | BigNumber":s,"...":function(f){if(di(f))throw new TypeError("Scalar values expected in function sum");return a(f)}});function a(l){var f;return hn(l,function(o){try{f=f===void 0?o:n(f,o)}catch(u){throw St(u,"sum",o)}}),f===void 0&&(f=i(0,t.number)),typeof f=="string"&&(f=i(f,t.number)),f}function s(l,f){try{var o=Do(l,f,n);return o}catch(u){throw St(u,"sum")}}});var qp="cumsum",aW=["typed","add","unaryPlus"],Up=T(qp,aW,e=>{var{typed:r,add:t,unaryPlus:n}=e;return r(qp,{Array:i,Matrix:function(o){return o.create(i(o.valueOf()))},"Array, number | BigNumber":s,"Matrix, number | BigNumber":function(o,u){return o.create(s(o.valueOf(),u))},"...":function(o){if(di(o))throw new TypeError("All values expected to be scalar in function cumsum");return i(o)}});function i(f){try{return a(f)}catch(o){throw St(o,qp)}}function a(f){if(f.length===0)return[];for(var o=[n(f[0])],u=1;u=u.length)throw new Xt(o,u.length);try{return l(f,o)}catch(p){throw St(p,qp)}}function l(f,o){var u,p,h;if(o<=0){var d=f[0][0];if(Array.isArray(d)){for(h=Rc(f),p=[],u=0;u{var{typed:r,add:t,divide:n}=e;return r(CT,{"Array | Matrix":a,"Array | Matrix, number | BigNumber":i,"...":function(l){if(di(l))throw new TypeError("Scalar values expected in function mean");return a(l)}});function i(s,l){try{var f=Do(s,l,t),o=Array.isArray(s)?or(s):s.size();return n(f,o[l])}catch(u){throw St(u,"mean")}}function a(s){var l,f=0;if(hn(s,function(o){try{l=l===void 0?o:t(l,o),f++}catch(u){throw St(u,"mean",o)}}),f===0)throw new Error("Cannot calculate the mean of an empty array");return n(l,f)}});var MT="median",sW=["typed","add","divide","compare","partitionSelect"],_T=T(MT,sW,e=>{var{typed:r,add:t,divide:n,compare:i,partitionSelect:a}=e;function s(o){try{o=gr(o.valueOf());var u=o.length;if(u===0)throw new Error("Cannot calculate median of an empty array");if(u%2===0){for(var p=u/2-1,h=a(o,p+1),d=o[p],x=0;x0&&(d=o[x]);return f(d,h)}else{var v=a(o,(u-1)/2);return l(v)}}catch(y){throw St(y,"median")}}var l=r({"number | BigNumber | Complex | Unit":function(u){return u}}),f=r({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(u,p){return n(t(u,p),2)}});return r(MT,{"Array | Matrix":s,"Array | Matrix, number | BigNumber":function(u,p){throw new Error("median(A, dim) is not yet supported")},"...":function(u){if(di(u))throw new TypeError("Scalar values expected in function median");return s(u)}})});var TT="mad",uW=["typed","abs","map","median","subtract"],FT=T(TT,uW,e=>{var{typed:r,abs:t,map:n,median:i,subtract:a}=e;return r(TT,{"Array | Matrix":s,"...":function(f){return s(f)}});function s(l){if(l=gr(l.valueOf()),l.length===0)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var f=i(l);return i(n(l,function(o){return t(a(o,f))}))}catch(o){throw o instanceof TypeError&&o.message.indexOf("median")!==-1?new TypeError(o.message.replace("median","mad")):St(o,"mad")}}});var bg="unbiased",OT="variance",fW=["typed","add","subtract","multiply","divide","apply","isNaN"],Wp=T(OT,fW,e=>{var{typed:r,add:t,subtract:n,multiply:i,divide:a,apply:s,isNaN:l}=e;return r(OT,{"Array | Matrix":function(p){return f(p,bg)},"Array | Matrix, string":f,"Array | Matrix, number | BigNumber":function(p,h){return o(p,h,bg)},"Array | Matrix, number | BigNumber, string":o,"...":function(p){return f(p,bg)}});function f(u,p){var h,d=0;if(u.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");if(hn(u,function(y){try{h=h===void 0?y:t(h,y),d++}catch(w){throw St(w,"variance",y)}}),d===0)throw new Error("Cannot calculate variance of an empty array");var x=a(h,d);if(h=void 0,hn(u,function(y){var w=n(y,x);h=h===void 0?i(w,w):t(h,i(w,w))}),l(h))return h;switch(p){case"uncorrected":return a(h,d);case"biased":return a(h,d+1);case"unbiased":{var v=je(h)?h.mul(0):0;return d===1?v:a(h,d-1)}default:throw new Error('Unknown normalization "'+p+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function o(u,p,h){try{if(u.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");return s(u,p,d=>f(d,h))}catch(d){throw St(d,"variance")}}});var BT="quantileSeq",lW=["typed","?bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger"],Vp=T(BT,lW,e=>{var{typed:r,bignumber:t,add:n,subtract:i,divide:a,multiply:s,partitionSelect:l,compare:f,isInteger:o,smaller:u,smallerEq:p,larger:h}=e,d=ou({typed:r,isInteger:o});return r(BT,{"Array | Matrix, number | BigNumber":(C,b)=>v(C,b,!1),"Array | Matrix, number | BigNumber, number":(C,b,A)=>x(C,b,!1,A,v),"Array | Matrix, number | BigNumber, boolean":v,"Array | Matrix, number | BigNumber, boolean, number":(C,b,A,E)=>x(C,b,A,E,v),"Array | Matrix, Array | Matrix":(C,b)=>y(C,b,!1),"Array | Matrix, Array | Matrix, number":(C,b,A)=>x(C,b,!1,A,y),"Array | Matrix, Array | Matrix, boolean":y,"Array | Matrix, Array | Matrix, boolean, number":(C,b,A,E)=>x(C,b,A,E,y)});function x(C,b,A,E,S){return d(C,E,O=>S(O,b,A))}function v(C,b,A){var E,S=C.valueOf();if(u(b,0))throw new Error("N/prob must be non-negative");if(p(b,1))return ar(b)?w(S,b,A):t(w(S,b,A));if(h(b,1)){if(!o(b))throw new Error("N must be a positive integer");if(h(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);E=[];for(var F=0;u(F,b);F++){var M=a(F+1,O);E.push(w(S,M,A))}return ar(b)?E:t(E)}}function y(C,b,A){for(var E=C.valueOf(),S=b.valueOf(),O=[],F=0;F0&&(_=E[L])}return n(s(_,i(1,M)),s(k,M))}});var IT="std",cW=["typed","map","sqrt","variance"],Yp=T(IT,cW,e=>{var{typed:r,map:t,sqrt:n,variance:i}=e;return r(IT,{"Array | Matrix":a,"Array | Matrix, string":a,"Array | Matrix, number | BigNumber":a,"Array | Matrix, number | BigNumber, string":a,"...":function(l){return a(l)}});function a(s,l){if(s.length===0)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{var f=i.apply(null,arguments);return bt(f)?t(f,n):n(f)}catch(o){throw o instanceof TypeError&&o.message.indexOf(" variance")!==-1?new TypeError(o.message.replace(" variance"," std")):o}}});var PT="corr",pW=["typed","matrix","mean","sqrt","sum","add","subtract","multiply","pow","divide"],kT=T(PT,pW,e=>{var{typed:r,matrix:t,sqrt:n,sum:i,add:a,subtract:s,multiply:l,pow:f,divide:o}=e;return r(PT,{"Array, Array":function(d,x){return u(d,x)},"Matrix, Matrix":function(d,x){var v=u(d.toArray(),x.toArray());return Array.isArray(v)?t(v):v}});function u(h,d){var x=[];if(Array.isArray(h[0])&&Array.isArray(d[0])){if(h.length!==d.length)throw new SyntaxError("Dimension mismatch. Array A and B must have the same length.");for(var v=0;va(S,l(O,d[F])),0),C=i(h.map(S=>f(S,2))),b=i(d.map(S=>f(S,2))),A=s(l(x,w),l(v,y)),E=n(l(s(l(x,C),f(v,2)),s(l(x,b),f(y,2))));return o(A,E)}});var RT="combinations",mW=["typed"],qT=T(RT,mW,e=>{var{typed:r}=e;return r(RT,{"number, number":Bv,"BigNumber, BigNumber":function(n,i){var a=n.constructor,s,l,f=n.minus(i),o=new a(1);if(!LT(n)||!LT(i))throw new TypeError("Positive integer value expected in function combinations");if(i.gt(n))throw new TypeError("k must be less than n in function combinations");if(s=o,i.lt(f))for(l=o;l.lte(f);l=l.plus(o))s=s.times(i.plus(l)).dividedBy(l);else for(l=o;l.lte(i);l=l.plus(o))s=s.times(f.plus(l)).dividedBy(l);return s}})});function LT(e){return e.isInteger()&&e.gte(0)}var UT="combinationsWithRep",hW=["typed"],WT=T(UT,hW,e=>{var{typed:r}=e;return r(UT,{"number, number":function(n,i){if(!He(n)||n<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(!He(i)||i<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(i{var{typed:r,config:t,multiplyScalar:n,pow:i,BigNumber:a,Complex:s}=e;function l(o){if(o.im===0)return Sf(o.re);if(o.re<.5){var u=new s(1-o.re,-o.im),p=new s(Math.PI*o.re,Math.PI*o.im);return new s(Math.PI).div(p.sin()).div(l(u))}o=new s(o.re-1,o.im);for(var h=new s(is[0],0),d=1;d2;)h-=2,x+=h,d=d.times(x);return new a(d.toPrecision(a.precision))}});var HT="lgamma",vW=["Complex","typed"],GT=T(HT,vW,e=>{var{Complex:r,typed:t}=e,n=7,i=7,a=[-.029550653594771242,.00641025641025641,-.0019175269175269176,.0008417508417508417,-.0005952380952380953,.0007936507936507937,-.002777777777777778,.08333333333333333];return t(HT,{number:Nf,Complex:s,BigNumber:function(){throw new Error("mathjs doesn't yet provide an implementation of the algorithm lgamma for BigNumber")}});function s(o){var u=6.283185307179586,p=1.1447298858494002,h=.1;if(o.isNaN())return new r(NaN,NaN);if(o.im===0)return new r(Nf(o.re),0);if(o.re>=n||Math.abs(o.im)>=i)return l(o);if(o.re<=h){var d=vy(u,o.im)*Math.floor(.5*o.re+.25),x=o.mul(Math.PI).sin().log(),v=s(new r(1-o.re,-o.im));return new r(p,d).sub(x).sub(v)}else return o.im>=0?f(o):f(o.conjugate()).conjugate()}function l(o){for(var u=o.sub(.5).mul(o.log()).sub(o).add(Uv),p=new r(1,0).div(o),h=p.div(o),d=a[0],x=a[1],v=2*h.re,y=h.re*h.re+h.im*h.im,w=2;w<8;w++){var C=x;x=-y*d+a[w],d=v*d+C}var b=p.mul(h.mul(d).add(x));return u.add(b)}function f(o){var u=0,p=0,h=o;for(o=o.add(1);o.re<=n;){h=h.mul(o);var d=h.im<0?1:0;d!==0&&p===0&&u++,p=d,o=o.add(1)}return l(o).sub(h.log()).sub(new r(0,u*2*Math.PI*1))}});var $T="factorial",gW=["typed","gamma"],ZT=T($T,gW,e=>{var{typed:r,gamma:t}=e;return r($T,{number:function(i){if(i<0)throw new Error("Value must be non-negative");return t(i+1)},BigNumber:function(i){if(i.isNegative())throw new Error("Value must be non-negative");return t(i.plus(1))},"Array | Matrix":r.referToSelf(n=>i=>Je(i,n))})});var QT="kldivergence",xW=["typed","matrix","divide","sum","multiply","map","dotDivide","log","isNumeric"],XT=T(QT,xW,e=>{var{typed:r,matrix:t,divide:n,sum:i,multiply:a,map:s,dotDivide:l,log:f,isNumeric:o}=e;return r(QT,{"Array, Array":function(h,d){return u(t(h),t(d))},"Matrix, Array":function(h,d){return u(h,t(d))},"Array, Matrix":function(h,d){return u(t(h),d)},"Matrix, Matrix":function(h,d){return u(h,d)}});function u(p,h){var d=h.size().length,x=p.size().length;if(d>1)throw new Error("first object must be one dimensional");if(x>1)throw new Error("second object must be one dimensional");if(d!==x)throw new Error("Length of two vectors must be equal");var v=i(p);if(v===0)throw new Error("Sum of elements in first object must be non zero");var y=i(h);if(y===0)throw new Error("Sum of elements in second object must be non zero");var w=n(p,i(p)),C=n(h,i(h)),b=i(a(w,s(l(w,C),A=>f(A))));return o(b)?b:Number.NaN}});var JT="multinomial",yW=["typed","add","divide","multiply","factorial","isInteger","isPositive"],KT=T(JT,yW,e=>{var{typed:r,add:t,divide:n,multiply:i,factorial:a,isInteger:s,isPositive:l}=e;return r(JT,{"Array | Matrix":function(o){var u=0,p=1;return hn(o,function(h){if(!s(h)||!l(h))throw new TypeError("Positive integer value expected in function multinomial");u=t(u,h),p=i(p,a(h))}),n(a(u),p)}})});var jT="permutations",bW=["typed","factorial"],rF=T(jT,bW,e=>{var{typed:r,factorial:t}=e;return r(jT,{"number | BigNumber":t,"number, number":function(i,a){if(!He(i)||i<0)throw new TypeError("Positive integer value expected in function permutations");if(!He(a)||a<0)throw new TypeError("Positive integer value expected in function permutations");if(a>i)throw new TypeError("second argument k must be less than or equal to first argument n");return jn(i-a+1,i)},"BigNumber, BigNumber":function(i,a){var s,l;if(!eF(i)||!eF(a))throw new TypeError("Positive integer value expected in function permutations");if(a.gt(i))throw new TypeError("second argument k must be less than or equal to first argument n");var f=i.mul(0).add(1);for(s=f,l=i.minus(a).plus(1);l.lte(i);l=l.plus(1))s=s.times(l);return s}})});function eF(e){return e.isInteger()&&e.gte(0)}var Cg=Xn(xF(),1),CW=(0,Cg.default)(Date.now());function Ua(e){var r;function t(i){r=i===null?CW:(0,Cg.default)(String(i))}t(e);function n(){return r()}return n}var yF="pickRandom",MW=["typed","config","?on"],bF=T(yF,MW,e=>{var{typed:r,config:t,on:n}=e,i=Ua(t.randomSeed);return n&&n("config",function(s,l){s.randomSeed!==l.randomSeed&&(i=Ua(s.randomSeed))}),r(yF,{"Array | Matrix":function(l){return a(l,{})},"Array | Matrix, Object":function(l,f){return a(l,f)},"Array | Matrix, number":function(l,f){return a(l,{number:f})},"Array | Matrix, Array | Matrix":function(l,f){return a(l,{weights:f})},"Array | Matrix, Array | Matrix, number":function(l,f,o){return a(l,{number:o,weights:f})},"Array | Matrix, number, Array | Matrix":function(l,f,o){return a(l,{number:f,weights:o})}});function a(s,l){var{number:f,weights:o,elementWise:u=!0}=l,p=typeof f>"u";p&&(f=1);var h=Ge(s)?s.create:Ge(o)?o.create:null;s=s.valueOf(),o&&(o=o.valueOf()),u===!0&&(s=gr(s),o=gr(o));var d=0;if(typeof o<"u"){if(o.length!==s.length)throw new Error("Weights must have the same length as possibles");for(var x=0,v=o.length;x"u")C=s[Math.floor(i()*y)];else for(var b=i()*d,A=0,E=s.length;A1)for(var n=0,i=e.shift();n{var{typed:r,config:t,on:n}=e,i=Ua(t.randomSeed);return n&&n("config",function(l,f){l.randomSeed!==f.randomSeed&&(i=Ua(l.randomSeed))}),r(wF,{"":()=>s(0,1),number:l=>s(0,l),"number, number":(l,f)=>s(l,f),"Array | Matrix":l=>a(l,0,1),"Array | Matrix, number":(l,f)=>a(l,0,f),"Array | Matrix, number, number":(l,f,o)=>a(l,f,o)});function a(l,f,o){var u=_f(l.valueOf(),()=>s(f,o));return Ge(l)?l.create(u):u}function s(l,f){return l+i()*(f-l)}});var SF="randomInt",TW=["typed","config","?on"],NF=T(SF,TW,e=>{var{typed:r,config:t,on:n}=e,i=Ua(t.randomSeed);return n&&n("config",function(l,f){l.randomSeed!==f.randomSeed&&(i=Ua(l.randomSeed))}),r(SF,{"":()=>s(0,1),number:l=>s(0,l),"number, number":(l,f)=>s(l,f),"Array | Matrix":l=>a(l,0,1),"Array | Matrix, number":(l,f)=>a(l,0,f),"Array | Matrix, number, number":(l,f,o)=>a(l,f,o)});function a(l,f,o){var u=_f(l.valueOf(),()=>s(f,o));return Ge(l)?l.create(u):u}function s(l,f){return Math.floor(l+i()*(f-l))}});var AF="stirlingS2",FW=["typed","addScalar","subtractScalar","multiplyScalar","divideScalar","pow","factorial","combinations","isNegative","isInteger","number","?bignumber","larger"],EF=T(AF,FW,e=>{var{typed:r,addScalar:t,subtractScalar:n,multiplyScalar:i,divideScalar:a,pow:s,factorial:l,combinations:f,isNegative:o,isInteger:u,number:p,bignumber:h,larger:d}=e,x=[],v=[];return r(AF,{"number | BigNumber, number | BigNumber":function(w,C){if(!u(w)||o(w)||!u(C)||o(C))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(d(C,w))throw new TypeError("k must be less than or equal to n in function stirlingS2");var b=!(ar(w)&&ar(C)),A=b?v:x,E=b?h:p,S=p(w),O=p(C);if(A[S]&&A[S].length>O)return A[S][O];for(var F=0;F<=S;++F)if(A[F]||(A[F]=[E(F===0?1:0)]),F!==0)for(var M=A[F],_=A[F-1],k=M.length;k<=F&&k<=O;++k)k===F?M[k]=1:M[k]=t(i(E(k),_[k]),_[k-1]);return A[S][O]}})});var CF="bellNumbers",OW=["typed","addScalar","isNegative","isInteger","stirlingS2"],MF=T(CF,OW,e=>{var{typed:r,addScalar:t,isNegative:n,isInteger:i,stirlingS2:a}=e;return r(CF,{"number | BigNumber":function(l){if(!i(l)||n(l))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var f=0,o=0;o<=l;o++)f=t(f,a(l,o));return f}})});var _F="catalan",BW=["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],TF=T(_F,BW,e=>{var{typed:r,addScalar:t,divideScalar:n,multiplyScalar:i,combinations:a,isNegative:s,isInteger:l}=e;return r(_F,{"number | BigNumber":function(o){if(!l(o)||s(o))throw new TypeError("Non-negative integer value expected in function catalan");return n(a(i(o,2),o),t(o,1))}})});var FF="composition",IW=["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],OF=T(FF,IW,e=>{var{typed:r,addScalar:t,combinations:n,isPositive:i,isNegative:a,isInteger:s,larger:l}=e;return r(FF,{"number | BigNumber, number | BigNumber":function(o,u){if(!s(o)||!i(o)||!s(u)||!i(u))throw new TypeError("Positive integer value expected in function composition");if(l(u,o))throw new TypeError("k must be less than or equal to n in function composition");return n(t(o,-1),t(u,-1))}})});var BF="leafCount",PW=["parse","typed"],IF=T(BF,PW,e=>{var{parse:r,typed:t}=e;function n(i){var a=0;return i.forEach(s=>{a+=n(s)}),a||1}return t(BF,{Node:function(a){return n(a)}})});function Mg(e){return yr(e)||ut(e)&&e.isUnary()&&yr(e.args[0])}function Tf(e){return!!(yr(e)||(fn(e)||ut(e))&&e.args.every(Tf)||Zt(e)&&Tf(e.content))}function PF(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function _g(e){for(var r=1;r{var{FunctionNode:r,OperatorNode:t,SymbolNode:n}=e,i=!0,a=!1,s="defaultF",l={add:{trivial:i,total:i,commutative:i,associative:i},unaryPlus:{trivial:i,total:i,commutative:i,associative:i},subtract:{trivial:a,total:i,commutative:a,associative:a},multiply:{trivial:i,total:i,commutative:i,associative:i},divide:{trivial:a,total:i,commutative:a,associative:a},paren:{trivial:i,total:i,commutative:i,associative:a},defaultF:{trivial:a,total:i,commutative:a,associative:a}},f={divide:{total:a},log:{total:a}},o={subtract:{total:a},abs:{trivial:i},log:{total:i}};function u(b,A){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:l,S=s;if(typeof b=="string"?S=b:ut(b)?S=b.fn.toString():fn(b)?S=b.name:Zt(b)&&(S="paren"),$e(E,S)){var O=E[S];if($e(O,A))return O[A];if($e(l,S))return l[S][A]}if($e(E,s)){var F=E[s];return $e(F,A)?F[A]:l[s][A]}if($e(l,S)){var M=l[S];if($e(M,A))return M[A]}return l[s][A]}function p(b){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;return u(b,"commutative",A)}function h(b){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;return u(b,"associative",A)}function d(b,A){var E=_g({},b);for(var S in A)$e(b,S)?E[S]=_g(_g({},A[S]),b[S]):E[S]=A[S];return E}function x(b,A){if(!b.args||b.args.length===0)return b;b.args=v(b,A);for(var E=0;E2&&h(b,A)){for(var F=b.args.pop();b.args.length>0;)F=E([b.args.pop(),F]);b.args=F.args}}}function w(b,A){if(!(!b.args||b.args.length===0)){for(var E=C(b),S=b.args.length,O=0;O2&&h(b,A)){for(var F=b.args.shift();b.args.length>0;)F=E([F,b.args.shift()]);b.args=F.args}}}function C(b){return ut(b)?function(A){try{return new t(b.op,b.fn,A,b.implicit)}catch(E){return console.error(E),[]}}:function(A){return new r(new n(b.name),A)}}return{createMakeNodeFunction:C,hasProperty:u,isCommutative:p,isAssociative:h,mergeContext:d,flatten:x,allChildren:v,unflattenr:y,unflattenl:w,defaultContext:l,realContext:f,positiveContext:o}});var LW="simplify",qW=["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"],kF=T(LW,qW,e=>{var{config:r,typed:t,parse:n,add:i,subtract:a,multiply:s,divide:l,pow:f,isZero:o,equal:u,resolve:p,simplifyConstant:h,simplifyCore:d,fraction:x,bignumber:v,mathWithTransform:y,matrix:w,AccessorNode:C,ArrayNode:b,ConstantNode:A,FunctionNode:E,IndexNode:S,ObjectNode:O,OperatorNode:F,ParenthesisNode:M,SymbolNode:_}=e,{hasProperty:k,isCommutative:L,isAssociative:Y,mergeContext:$,flatten:V,unflattenr:q,unflattenl:R,createMakeNodeFunction:j,defaultContext:U,realContext:oe,positiveContext:me}=du({FunctionNode:E,OperatorNode:F,SymbolNode:_});t.addConversion({from:"Object",to:"Map",convert:ka});var ie=t("simplify",{Node:xe,"Node, Map":(ee,ne)=>xe(ee,!1,ne),"Node, Map, Object":(ee,ne,ue)=>xe(ee,!1,ne,ue),"Node, Array":xe,"Node, Array, Map":xe,"Node, Array, Map, Object":xe});t.removeConversion({from:"Object",to:"Map",convert:ka}),ie.defaultContext=U,ie.realContext=oe,ie.positiveContext=me;function H(ee){return ee.transform(function(ne,ue,Ee){return Zt(ne)?H(ne.content):ne})}var ce={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};ie.rules=[d,{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}}},h,{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}}},h,{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 Me(ee,ne){var ue={};if(ee.s){var Ee=ee.s.split("->");if(Ee.length===2)ue.l=Ee[0],ue.r=Ee[1];else throw SyntaxError("Could not parse rule: "+ee.s)}else ue.l=ee.l,ue.r=ee.r;ue.l=H(n(ue.l)),ue.r=H(n(ue.r));for(var Ce of["imposeContext","repeat","assuming"])Ce in ee&&(ue[Ce]=ee[Ce]);if(ee.evaluate&&(ue.evaluate=n(ee.evaluate)),Y(ue.l,ne)){var Le=!L(ue.l,ne),Ie;Le&&(Ie=Se());var sr=j(ue.l),ir=Se();ue.expanded={},ue.expanded.l=sr([ue.l,ir]),V(ue.expanded.l,ne),q(ue.expanded.l,ne),ue.expanded.r=sr([ue.r,ir]),Le&&(ue.expandedNC1={},ue.expandedNC1.l=sr([Ie,ue.l]),ue.expandedNC1.r=sr([Ie,ue.r]),ue.expandedNC2={},ue.expandedNC2.l=sr([Ie,ue.expanded.l]),ue.expandedNC2.r=sr([Ie,ue.expanded.r]))}return ue}function pe(ee,ne){for(var ue=[],Ee=0;Ee2&&arguments[2]!==void 0?arguments[2]:go(),Ee=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},Ce=Ee.consoleDebug;ne=pe(ne||ie.rules,Ee.context);var Le=p(ee,ue);Le=H(Le);for(var Ie={},sr=Le.toString({parenthesis:"all"});!Ie[sr];){Ie[sr]=!0,ge=0;var ir=sr;Ce&&console.log("Working on: ",sr);for(var Xe=0;Xe ").concat(ne[Xe].r.toString()))),Ce){var re=Le.toString({parenthesis:"all"});re!==ir&&(console.log("Applying",Or,"produced",re),ir=re)}R(Le,Ee.context)}sr=Le.toString({parenthesis:"all"})}return Le}function be(ee,ne,ue){var Ee=ee;if(ee)for(var Ce=0;Ce1&&(ir=Le(ee.args.slice(0,sr))),Ce=ee.args.slice(sr),Ee=Ce.length===1?Ce[0]:Le(Ce),ue.push(Le([ir,Ee]))}return ue}function ze(ee,ne){var ue={placeholders:{}};if(!ee.placeholders&&!ne.placeholders)return ue;if(ee.placeholders){if(!ne.placeholders)return ee}else return ne;for(var Ee in ee.placeholders)if($e(ee.placeholders,Ee)&&(ue.placeholders[Ee]=ee.placeholders[Ee],$e(ne.placeholders,Ee)&&!ye(ee.placeholders[Ee],ne.placeholders[Ee])))return null;for(var Ce in ne.placeholders)$e(ne.placeholders,Ce)&&(ue.placeholders[Ce]=ne.placeholders[Ce]);return ue}function Ze(ee,ne){var ue=[];if(ee.length===0||ne.length===0)return ue;for(var Ee,Ce=0;Ce2)throw new Error("permuting >2 commutative non-associative rule arguments not yet implemented");var ir=te(ee.args[0],ne.args[1],ue);if(ir.length===0)return[];var Xe=te(ee.args[1],ne.args[0],ue);if(Xe.length===0)return[];Le=[ir,Xe]}Ce=K(Le)}else if(ne.args.length>=2&&ee.args.length===2){for(var Or=Ae(ne,ue),re=[],le=0;le2)throw Error("Unexpected non-binary associative function: "+ee.toString());return[]}}else if(ee instanceof _){if(ee.name.length===0)throw new Error("Symbol in rule has 0 length...!?");if(ce[ee.name]){if(ee.name!==ne.name)return[]}else switch(ee.name[1]>="a"&&ee.name[1]<="z"?ee.name.substring(0,2):ee.name[0]){case"n":case"_p":Ce[0].placeholders[ee.name]=ne;break;case"c":case"cl":if(yr(ne))Ce[0].placeholders[ee.name]=ne;else return[];break;case"v":if(!yr(ne))Ce[0].placeholders[ee.name]=ne;else return[];break;case"vl":if(rt(ne))Ce[0].placeholders[ee.name]=ne;else return[];break;case"cd":if(Mg(ne))Ce[0].placeholders[ee.name]=ne;else return[];break;case"vd":if(!Mg(ne))Ce[0].placeholders[ee.name]=ne;else return[];break;case"ce":if(Tf(ne))Ce[0].placeholders[ee.name]=ne;else return[];break;case"ve":if(!Tf(ne))Ce[0].placeholders[ee.name]=ne;else return[];break;default:throw new Error("Invalid symbol in rule: "+ee.name)}}else if(ee instanceof A){if(!u(ee.value,ne.value))return[]}else return[];return Ce}function ye(ee,ne){if(ee instanceof A&&ne instanceof A){if(!u(ee.value,ne.value))return!1}else if(ee instanceof _&&ne instanceof _){if(ee.name!==ne.name)return!1}else if(ee instanceof F&&ne instanceof F||ee instanceof E&&ne instanceof E){if(ee instanceof F){if(ee.op!==ne.op||ee.fn!==ne.fn)return!1}else if(ee instanceof E&&ee.name!==ne.name)return!1;if(ee.args.length!==ne.args.length)return!1;for(var ue=0;ue{var{typed:r,config:t,mathWithTransform:n,matrix:i,fraction:a,bignumber:s,AccessorNode:l,ArrayNode:f,ConstantNode:o,FunctionNode:u,IndexNode:p,ObjectNode:h,OperatorNode:d,SymbolNode:x}=e,{isCommutative:v,isAssociative:y,allChildren:w,createMakeNodeFunction:C}=du({FunctionNode:u,OperatorNode:d,SymbolNode:x}),b=r("simplifyConstant",{Node:V=>O($(V,{})),"Node, Object":function(q,R){return O($(q,R))}});function A(V){return Jn(V)?V.valueOf():V instanceof Array?V.map(A):Ge(V)?i(A(V.valueOf())):V}function E(V,q,R){try{return n[V].apply(null,q)}catch{return q=q.map(A),M(n[V].apply(null,q),R)}}var S=r({Fraction:k,number:function(q){return q<0?_(new o(-q)):new o(q)},BigNumber:function(q){return q<0?_(new o(-q)):new o(q)},Complex:function(q){throw new Error("Cannot convert Complex number to Node")},string:function(q){return new o(q)},Matrix:function(q){return new f(q.valueOf().map(R=>S(R)))}});function O(V){return Sr(V)?V:S(V)}function F(V,q){var R=q&&q.exactFractions!==!1;if(R&&isFinite(V)&&a){var j=a(V),U=q&&typeof q.fractionsLimit=="number"?q.fractionsLimit:1/0;if(j.valueOf()===V&&j.n0;)if(yr(j[0])&&typeof j[0].value!="string"){var U=M(j.shift().value,R);$t(V)?V=V.items[U-1]:(V=V.valueOf()[U-1],V instanceof Array&&(V=i(V)))}else if(j.length>1&&yr(j[1])&&typeof j[1].value!="string"){var oe=M(j[1].value,R),me=[],ie=$t(V)?V.items:V.valueOf();for(var H of ie)if($t(H))me.push(H.items[oe-1]);else if(Ge(V))me.push(H[oe-1]);else break;if(me.length===ie.length)$t(V)?V=new f(me):V=i(me),j.splice(1,1);else break}else break;return j.length===q.dimensions.length?new l(O(V),q):j.length>0?(q=new p(j),new l(O(V),q)):V}if(la(V)&&q.dimensions.length===1&&yr(q.dimensions[0])){var ce=q.dimensions[0].value;return ce in V.properties?V.properties[ce]:new o}return new l(O(V),q)}function Y(V,q,R,j){var U=q.shift(),oe=q.reduce((me,ie)=>{if(!Sr(ie)){var H=me.pop();if(Sr(H))return[H,ie];try{return me.push(E(V,[H,ie],j)),me}catch{me.push(H)}}me.push(O(me.pop()));var ce=me.length===1?me[0]:R(me);return[R([ce,O(ie)])]},[U]);return oe.length===1?oe[0]:R([oe[0],S(oe[1])])}function $(V,q){switch(V.type){case"SymbolNode":return V;case"ConstantNode":switch(typeof V.value){case"number":return M(V.value,q);case"string":return V.value;default:if(!isNaN(V.value))return M(V.value,q)}return V;case"FunctionNode":if(n[V.name]&&n[V.name].rawArgs)return V;{var R=["add","multiply"];if(R.indexOf(V.name)===-1){var j=V.args.map(De=>$(De,q));if(!j.some(Sr))try{return E(V.name,j,q)}catch{}if(V.name==="size"&&j.length===1&&$t(j[0])){for(var U=[],oe=j[0];$t(oe);)U.push(oe.items.length),oe=oe.items[0];return i(U)}return new u(V.name,j.map(O))}}case"OperatorNode":{var me=V.fn.toString(),ie,H,ce=C(V);if(ut(V)&&V.isUnary())ie=[$(V.args[0],q)],Sr(ie[0])?H=ce(ie):H=E(me,ie,q);else if(y(V,q.context))if(ie=w(V,q.context),ie=ie.map(De=>$(De,q)),v(me,q.context)){for(var Me=[],pe=[],ge=0;ge1?(H=Y(me,Me,ce,q),pe.unshift(H),H=Y(me,pe,ce,q)):H=Y(me,ie,ce,q)}else H=Y(me,ie,ce,q);else ie=V.args.map(De=>$(De,q)),H=Y(me,ie,ce,q);return H}case"ParenthesisNode":return $(V.content,q);case"AccessorNode":return L($(V.object,q),$(V.index,q),q);case"ArrayNode":{var Se=V.items.map(De=>$(De,q));return Se.some(Sr)?new f(Se.map(O)):i(Se)}case"IndexNode":return new p(V.dimensions.map(De=>b(De,q)));case"ObjectNode":{var xe={};for(var be in V.properties)xe[be]=b(V.properties[be],q);return new h(xe)}case"AssignmentNode":case"BlockNode":case"FunctionAssignmentNode":case"RangeNode":case"ConditionalNode":default:throw new Error("Unimplemented node type in simplifyConstant: ".concat(V.type))}}return b});var LF="simplifyCore",WW=["typed","parse","equal","isZero","add","subtract","multiply","divide","pow","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],qF=T(LF,WW,e=>{var{typed:r,parse:t,equal:n,isZero:i,add:a,subtract:s,multiply:l,divide:f,pow:o,AccessorNode:u,ArrayNode:p,ConstantNode:h,FunctionNode:d,IndexNode:x,ObjectNode:v,OperatorNode:y,ParenthesisNode:w,SymbolNode:C}=e,b=new h(0),A=new h(1),E=new h(!0),S=new h(!1);function O(k){return ut(k)&&["and","not","or"].includes(k.op)}var{hasProperty:F,isCommutative:M}=du({FunctionNode:d,OperatorNode:y,SymbolNode:C});function _(k){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Y=L?L.context:void 0;if(F(k,"trivial",Y)){if(fn(k)&&k.args.length===1)return _(k.args[0],L);var $=!1,V=0;if(k.forEach(pe=>{++V,V===1&&($=_(pe,L))}),V===1)return $}var q=k;if(fn(q)){var R=_2(q.name);if(R){if(q.args.length>2&&F(q,"associative",Y))for(;q.args.length>2;){var j=q.args.pop(),U=q.args.pop();q.args.push(new y(R,q.name,[j,U]))}q=new y(R,q.name,q.args)}else return new d(_(q.fn),q.args.map(pe=>_(pe,L)))}if(ut(q)&&q.isUnary()){var oe=_(q.args[0],L);if(q.op==="~"&&ut(oe)&&oe.isUnary()&&oe.op==="~"||q.op==="not"&&ut(oe)&&oe.isUnary()&&oe.op==="not"&&O(oe.args[0]))return oe.args[0];var me=!0;if(q.op==="-"&&ut(oe)&&(oe.isBinary()&&oe.fn==="subtract"&&(q=new y("-","subtract",[oe.args[1],oe.args[0]]),me=!1),oe.isUnary()&&oe.op==="-"))return oe.args[0];if(me)return new y(q.op,q.fn,[oe])}if(ut(q)&&q.isBinary()){var ie=_(q.args[0],L),H=_(q.args[1],L);if(q.op==="+"){if(yr(ie)&&i(ie.value))return H;if(yr(H)&&i(H.value))return ie;ut(H)&&H.isUnary()&&H.op==="-"&&(H=H.args[0],q=new y("-","subtract",[ie,H]))}if(q.op==="-")return ut(H)&&H.isUnary()&&H.op==="-"?_(new y("+","add",[ie,H.args[0]]),L):yr(ie)&&i(ie.value)?_(new y("-","unaryMinus",[H])):yr(H)&&i(H.value)?ie:new y(q.op,q.fn,[ie,H]);if(q.op==="*"){if(yr(ie)){if(i(ie.value))return b;if(n(ie.value,1))return H}if(yr(H)){if(i(H.value))return b;if(n(H.value,1))return ie;if(M(q,Y))return new y(q.op,q.fn,[H,ie],q.implicit)}return new y(q.op,q.fn,[ie,H],q.implicit)}if(q.op==="/")return yr(ie)&&i(ie.value)?b:yr(H)&&n(H.value,1)?ie:new y(q.op,q.fn,[ie,H]);if(q.op==="^"&&yr(H)){if(i(H.value))return A;if(n(H.value,1))return ie}if(q.op==="and"){if(yr(ie))if(ie.value){if(O(H))return H;if(yr(H))return H.value?E:S}else return S;if(yr(H))if(H.value){if(O(ie))return ie}else return S}if(q.op==="or"){if(yr(ie)){if(ie.value)return E;if(O(H))return H}if(yr(H)){if(H.value)return E;if(O(ie))return ie}}return new y(q.op,q.fn,[ie,H])}if(ut(q))return new y(q.op,q.fn,q.args.map(pe=>_(pe,L)));if($t(q))return new p(q.items.map(pe=>_(pe,L)));if(Sn(q))return new u(_(q.object,L),_(q.index,L));if(kn(q))return new x(q.dimensions.map(pe=>_(pe,L)));if(la(q)){var ce={};for(var Me in q.properties)ce[Me]=_(q.properties[Me],L);return new v(ce)}return q}return r(LF,{Node:_,"Node,Object":_})});var VW="resolve",YW=["typed","parse","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode"],UF=T(VW,YW,e=>{var{typed:r,parse:t,ConstantNode:n,FunctionNode:i,OperatorNode:a,ParenthesisNode:s}=e;function l(f,o){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Set;if(!o)return f;if(rt(f)){if(u.has(f.name)){var p=Array.from(u).join(", ");throw new ReferenceError("recursive loop of variable definitions among {".concat(p,"}"))}var h=o.get(f.name);if(Sr(h)){var d=new Set(u);return d.add(f.name),l(h,o,d)}else return typeof h=="number"?t(String(h)):h!==void 0?new n(h):f}else if(ut(f)){var x=f.args.map(function(y){return l(y,o,u)});return new a(f.op,f.fn,x,f.implicit)}else{if(Zt(f))return new s(l(f.content,o,u));if(fn(f)){var v=f.args.map(function(y){return l(y,o,u)});return new i(f.name,v)}}return f.map(y=>l(y,o,u))}return r("resolve",{Node:l,"Node, Map | null | undefined":l,"Node, Object":(f,o)=>l(f,ka(o)),"Array | Matrix":r.referToSelf(f=>o=>o.map(u=>f(u))),"Array | Matrix, null | undefined":r.referToSelf(f=>o=>o.map(u=>f(u))),"Array, Object":r.referTo("Array,Map",f=>(o,u)=>f(o,ka(u))),"Matrix, Object":r.referTo("Matrix,Map",f=>(o,u)=>f(o,ka(u))),"Array | Matrix, Map":r.referToSelf(f=>(o,u)=>o.map(p=>f(p,u)))})});var zF="symbolicEqual",HW=["parse","simplify","typed","OperatorNode"],WF=T(zF,HW,e=>{var{parse:r,simplify:t,typed:n,OperatorNode:i}=e;function a(s,l){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=new i("-","subtract",[s,l]),u=t(o,{},f);return yr(u)&&!u.value}return n(zF,{"Node, Node":a,"Node, Node, Object":a})});var VF="derivative",GW=["typed","config","parse","simplify","equal","isZero","numeric","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],YF=T(VF,GW,e=>{var{typed:r,config:t,parse:n,simplify:i,equal:a,isZero:s,numeric:l,ConstantNode:f,FunctionNode:o,OperatorNode:u,ParenthesisNode:p,SymbolNode:h}=e;function d(b,A){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{simplify:!0},S={};y(S,b,A.name);var O=w(b,S);return E.simplify?i(O):O}r.addConversion({from:"identifier",to:"SymbolNode",convert:n});var x=r(VF,{"Node, SymbolNode":d,"Node, SymbolNode, Object":d});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(A,E){return yr(A)&&_r(A.value)==="string"?v(n(A.value).toString(),E.toString(),1):v(A.toTex(),E.toString(),1)},"Node, ConstantNode":function(A,E){if(_r(E.value)==="string")return v(A,n(E.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(A,E,S){return v(A.toString(),E.name,S.value)},"string, string, number":function(A,E,S){var O;return S===1?O="{d\\\\over d"+E+"}":O="{d^{"+S+"}\\\\over d"+E+"^{"+S+"}}",O+"\\\\left[".concat(A,"\\\\right]")}}),y=r("constTag",{"Object, ConstantNode, string":function(A,E){return A[E]=!0,!0},"Object, SymbolNode, string":function(A,E,S){return E.name!==S?(A[E]=!0,!0):!1},"Object, ParenthesisNode, string":function(A,E,S){return y(A,E.content,S)},"Object, FunctionAssignmentNode, string":function(A,E,S){return E.params.indexOf(S)===-1?(A[E]=!0,!0):y(A,E.expr,S)},"Object, FunctionNode | OperatorNode, string":function(A,E,S){if(E.args.length>0){for(var O=y(A,E.args[0],S),F=1;F0){var O=A.args.filter(function(V){return E[V]===void 0}),F=O.length===1?O[0]:new u("*","multiply",O),M=S.concat(w(F,E));return new u("*","multiply",M)}return new u("+","add",A.args.map(function(V){return new u("*","multiply",A.args.map(function(q){return q===V?w(q,E):q.clone()}))}))}if(A.op==="/"&&A.isBinary()){var _=A.args[0],k=A.args[1];return E[k]!==void 0?new u("/","divide",[w(_,E),k]):E[_]!==void 0?new u("*","multiply",[new u("-","unaryMinus",[_]),new u("/","divide",[w(k,E),new u("^","pow",[k.clone(),C(2)])])]):new u("/","divide",[new u("-","subtract",[new u("*","multiply",[w(_,E),k.clone()]),new u("*","multiply",[_.clone(),w(k,E)])]),new u("^","pow",[k.clone(),C(2)])])}if(A.op==="^"&&A.isBinary()){var L=A.args[0],Y=A.args[1];if(E[L]!==void 0)return yr(L)&&(s(L.value)||a(L.value,1))?C(0):new u("*","multiply",[A,new u("*","multiply",[new o("log",[L.clone()]),w(Y.clone(),E)])]);if(E[Y]!==void 0){if(yr(Y)){if(s(Y.value))return C(0);if(a(Y.value,1))return w(L,E)}var $=new u("^","pow",[L.clone(),new u("-","subtract",[Y,C(1)])]);return new u("*","multiply",[Y.clone(),new u("*","multiply",[w(L,E),$])])}return new u("*","multiply",[new u("^","pow",[L.clone(),Y.clone()]),new u("+","add",[new u("*","multiply",[w(L,E),new u("/","divide",[Y.clone(),L.clone()])]),new u("*","multiply",[w(Y,E),new o("log",[L.clone()])])])])}throw new Error('Cannot process operator "'+A.op+'" in derivative: the operator is not supported, undefined, or the number of arguments passed to it are not supported')}});function C(b,A){return new f(l(b,A||t.number))}return x});var HF="rationalize",$W=["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"],GF=T(HF,$W,e=>{var{config:r,typed:t,equal:n,isZero:i,add:a,subtract:s,multiply:l,divide:f,pow:o,parse:u,simplifyConstant:p,simplifyCore:h,simplify:d,fraction:x,bignumber:v,mathWithTransform:y,matrix:w,AccessorNode:C,ArrayNode:b,ConstantNode:A,FunctionNode:E,IndexNode:S,ObjectNode:O,OperatorNode:F,SymbolNode:M,ParenthesisNode:_}=e;function k(q){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,U=Y(),oe=L(q,R,!0,U.firstRules),me=oe.variables.length,ie={exactFractions:!1},H={exactFractions:!0};if(q=oe.expression,me>=1){q=$(q);var ce,Me,pe=!0,ge=!1;q=d(q,U.firstRules,{},ie);for(var Se;Me=pe?U.distrDivRules:U.sucDivRules,q=d(q,Me,{},H),pe=!pe,Se=q.toString(),Se!==ce;)ge=!0,ce=Se;ge&&(q=d(q,U.firstRulesAgain,{},ie)),q=d(q,U.finalRules,{},ie)}var xe=[],be={};return q.type==="OperatorNode"&&q.isBinary()&&q.op==="/"?(me===1&&(q.args[0]=V(q.args[0],xe),q.args[1]=V(q.args[1])),j&&(be.numerator=q.args[0],be.denominator=q.args[1])):(me===1&&(q=V(q,xe)),j&&(be.numerator=q,be.denominator=null)),j?(be.coefficients=xe,be.variables=oe.variables,be.expression=q,be):q}return t(HF,{Node:k,"Node, boolean":(q,R)=>k(q,{},R),"Node, Object":k,"Node, Object, boolean":k});function L(q,R,j,U){var oe=[],me=d(q,U,R,{exactFractions:!1});j=!!j;var ie="+-*"+(j?"/":"");ce(me);var H={};return H.expression=me,H.variables=oe,H;function ce(Me){var pe=Me.type;if(pe==="FunctionNode")throw new Error("There is an unsolved function call");if(pe==="OperatorNode")if(Me.op==="^"){if(Me.args[1].type!=="ConstantNode"||!He(parseFloat(Me.args[1].value)))throw new Error("There is a non-integer exponent");ce(Me.args[0])}else{if(ie.indexOf(Me.op)===-1)throw new Error("Operator "+Me.op+" invalid in polynomial expression");for(var ge=0;ge1;if(U==="OperatorNode"&&q.isBinary()){var me=!1,ie;if(q.op==="^"&&(q.args[0].type==="ParenthesisNode"||q.args[0].type==="OperatorNode")&&q.args[1].type==="ConstantNode"&&(ie=parseFloat(q.args[1].value),me=ie>=2&&He(ie)),me){if(ie>2){var H=q.args[0],ce=new F("^","pow",[q.args[0].cloneDeep(),new A(ie-1)]);q=new F("*","multiply",[H,ce])}else q=new F("*","multiply",[q.args[0],q.args[0].cloneDeep()]);oe&&(j==="content"?R.content=q:R.args[j]=q)}}if(U==="ParenthesisNode")$(q.content,q,"content");else if(U!=="ConstantNode"&&U!=="SymbolNode")for(var Me=0;Me=0;H--)if(R[H]!==0){var ce=new A(me?R[H]:Math.abs(R[H])),Me=R[H]<0?"-":"+";if(H>0){var pe=new M(oe);if(H>1){var ge=new A(H);pe=new F("^","pow",[pe,ge])}R[H]===-1&&me?ce=new F("-","unaryMinus",[pe]):Math.abs(R[H])===1?ce=pe:ce=new F("*","multiply",[ce,pe])}me?ie=ce:Me==="+"?ie=new F("+","add",[ie,ce]):ie=new F("-","subtract",[ie,ce]),me=!1}if(me)return new A(0);return ie;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 ze=0;zeU&&(R[Ze]=0),R[Ze]+=De.cte*(De.oper==="+"?1:-1),U=Math.max(Ze,U);return}De.cte=Ze,De.fire===""&&(R[0]+=De.cte*(De.oper==="+"?1:-1))}else throw new Error("Type "+Ae+" is not allowed")}}});var $F="zpk2tf",ZW=["typed","add","multiply","Complex","number"],ZF=T($F,ZW,e=>{var{typed:r,add:t,multiply:n,Complex:i,number:a}=e;return r($F,{"Array,Array,number":function(o,u,p){return s(o,u,p)},"Array,Array":function(o,u){return s(o,u,1)},"Matrix,Matrix,number":function(o,u,p){return s(o.valueOf(),u.valueOf(),p)},"Matrix,Matrix":function(o,u){return s(o.valueOf(),u.valueOf(),1)}});function s(f,o,u){f.some(C=>C.type==="BigNumber")&&(f=f.map(C=>a(C))),o.some(C=>C.type==="BigNumber")&&(o=o.map(C=>a(C)));for(var p=[i(1,0)],h=[i(1,0)],d=0;d=0&&p-h{var{typed:r,add:t,multiply:n,Complex:i,divide:a,matrix:s}=e;return r(QF,{"Array, Array":function(u,p){var h=f(512);return l(u,p,h)},"Array, Array, Array":function(u,p,h){return l(u,p,h)},"Array, Array, number":function(u,p,h){if(h<0)throw new Error("w must be a positive number");var d=f(h);return l(u,p,d)},"Matrix, Matrix":function(u,p){var h=f(512),{w:d,h:x}=l(u.valueOf(),p.valueOf(),h);return{w:s(d),h:s(x)}},"Matrix, Matrix, Matrix":function(u,p,h){var{h:d}=l(u.valueOf(),p.valueOf(),h.valueOf());return{h:s(d),w:s(h)}},"Matrix, Matrix, number":function(u,p,h){if(h<0)throw new Error("w must be a positive number");var d=f(h),{h:x}=l(u.valueOf(),p.valueOf(),d);return{h:s(x),w:s(d)}}});function l(o,u,p){for(var h=[],d=[],x=0;x{var{classes:r}=e;return function(n,i){var a=r[i&&i.mathjs];return a&&typeof a.fromJSON=="function"?a.fromJSON(i):i}});var KW="replacer",jW=[],KF=T(KW,jW,()=>function(r,t){return typeof t=="number"&&(!isFinite(t)||isNaN(t))?{mathjs:"number",value:String(t)}:t});var jF="12.4.1";var e3=T("true",[],()=>!0),r3=T("false",[],()=>!1),t3=T("null",[],()=>null),n3=ri("Infinity",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(1/0):1/0}),i3=ri("NaN",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(NaN):NaN}),a3=ri("pi",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?Cf(t):m1}),o3=ri("tau",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?GS(t):h1}),s3=ri("e",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?YS(t):d1}),u3=ri("phi",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?HS(t):v1}),f3=ri("LN2",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(2).ln():Math.LN2}),l3=ri("LN10",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(10).ln():Math.LN10}),c3=ri("LOG2E",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(1).div(new t(2).ln()):Math.LOG2E}),p3=ri("LOG10E",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(1).div(new t(10).ln()):Math.LOG10E}),m3=ri("SQRT1_2",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t("0.5").sqrt():Math.SQRT1_2}),h3=ri("SQRT2",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(2).sqrt():Math.SQRT2}),d3=ri("i",["Complex"],e=>{var{Complex:r}=e;return r.I}),v3=T("PI",["pi"],e=>{var{pi:r}=e;return r}),g3=T("E",["e"],e=>{var{e:r}=e;return r}),x3=T("version",[],()=>jF);function ri(e,r,t){return T(e,r,t,{recreateOnConfigChange:!0})}var y3=Cr("speedOfLight","299792458","m s^-1"),b3=Cr("gravitationConstant","6.67430e-11","m^3 kg^-1 s^-2"),w3=Cr("planckConstant","6.62607015e-34","J s"),D3=Cr("reducedPlanckConstant","1.0545718176461565e-34","J s"),S3=Cr("magneticConstant","1.25663706212e-6","N A^-2"),N3=Cr("electricConstant","8.8541878128e-12","F m^-1"),A3=Cr("vacuumImpedance","376.730313667","ohm"),E3=Cr("coulomb","8.987551792261171e9","N m^2 C^-2"),C3=Cr("elementaryCharge","1.602176634e-19","C"),M3=Cr("bohrMagneton","9.2740100783e-24","J T^-1"),_3=Cr("conductanceQuantum","7.748091729863649e-5","S"),T3=Cr("inverseConductanceQuantum","12906.403729652257","ohm"),F3=Cr("magneticFluxQuantum","2.0678338484619295e-15","Wb"),O3=Cr("nuclearMagneton","5.0507837461e-27","J T^-1"),B3=Cr("klitzing","25812.807459304513","ohm");var I3=Cr("bohrRadius","5.29177210903e-11","m"),P3=Cr("classicalElectronRadius","2.8179403262e-15","m"),k3=Cr("electronMass","9.1093837015e-31","kg"),R3=Cr("fermiCoupling","1.1663787e-5","GeV^-2"),L3=Gp("fineStructure",.0072973525693),q3=Cr("hartreeEnergy","4.3597447222071e-18","J"),U3=Cr("protonMass","1.67262192369e-27","kg"),z3=Cr("deuteronMass","3.3435830926e-27","kg"),W3=Cr("neutronMass","1.6749271613e-27","kg"),V3=Cr("quantumOfCirculation","3.6369475516e-4","m^2 s^-1"),Y3=Cr("rydberg","10973731.568160","m^-1"),H3=Cr("thomsonCrossSection","6.6524587321e-29","m^2"),G3=Gp("weakMixingAngle",.2229),$3=Gp("efimovFactor",22.7),Z3=Cr("atomicMass","1.66053906660e-27","kg"),Q3=Cr("avogadro","6.02214076e23","mol^-1"),X3=Cr("boltzmann","1.380649e-23","J K^-1"),J3=Cr("faraday","96485.33212331001","C mol^-1"),K3=Cr("firstRadiation","3.7417718521927573e-16","W m^2"),j3=Cr("loschmidt","2.686780111798444e25","m^-3"),eO=Cr("gasConstant","8.31446261815324","J K^-1 mol^-1"),rO=Cr("molarPlanckConstant","3.990312712893431e-10","J s mol^-1"),tO=Cr("molarVolume","0.022413969545014137","m^3 mol^-1"),nO=Gp("sackurTetrode",-1.16487052358),iO=Cr("secondRadiation","0.014387768775039337","m K"),aO=Cr("stefanBoltzmann","5.67037441918443e-8","W m^-2 K^-4"),oO=Cr("wienDisplacement","2.897771955e-3","m K"),sO=Cr("molarMass","0.99999999965e-3","kg mol^-1"),uO=Cr("molarMassC12","11.9999999958e-3","kg mol^-1"),fO=Cr("gravity","9.80665","m s^-2"),lO=Cr("planckLength","1.616255e-35","m"),cO=Cr("planckMass","2.176435e-8","kg"),pO=Cr("planckTime","5.391245e-44","s"),mO=Cr("planckCharge","1.87554603778e-18","C"),hO=Cr("planckTemperature","1.416785e+32","K");function Cr(e,r,t){var n=["config","Unit","BigNumber"];return T(e,n,i=>{var{config:a,Unit:s,BigNumber:l}=i,f=a.number==="BigNumber"?new l(r):parseFloat(r),o=new s(f,t);return o.fixPrefix=!0,o})}function Gp(e,r){var t=["config","BigNumber"];return T(e,t,n=>{var{config:i,BigNumber:a}=n;return i.number==="BigNumber"?new a(r):r})}var eV="apply",rV=["typed","isInteger"],dO=T(eV,rV,e=>{var{typed:r,isInteger:t}=e,n=ou({typed:r,isInteger:t});return r("apply",{"...any":function(a){var s=a[1];ar(s)?a[1]=s-1:je(s)&&(a[1]=s.minus(1));try{return n.apply(null,a)}catch(l){throw lt(l)}}})},{isTransformFunction:!0});var tV="column",nV=["typed","Index","matrix","range"],vO=T(tV,nV,e=>{var{typed:r,Index:t,matrix:n,range:i}=e,a=Xc({typed:r,Index:t,matrix:n,range:i});return r("column",{"...any":function(l){var f=l.length-1,o=l[f];ar(o)&&(l[f]=o-1);try{return a.apply(null,l)}catch(u){throw lt(u)}}})},{isTransformFunction:!0});function vu(e,r,t){var n=e.filter(function(f){return rt(f)&&!(f.name in r)&&!t.has(f.name)})[0];if(!n)throw new Error('No undefined variable found in inline expression "'+e+'"');var i=n.name,a=new Map,s=new eu(t,a,new Set([i])),l=e.compile();return function(o){return a.set(i,o),l.evaluate(s)}}var iV="filter",aV=["typed"],xO=T(iV,aV,e=>{var{typed:r}=e;function t(i,a,s){var l,f;return i[0]&&(l=i[0].compile().evaluate(s)),i[1]&&(rt(i[1])||mi(i[1])?f=i[1].compile().evaluate(s):f=vu(i[1],a,s)),n(l,f)}t.rawArgs=!0;var n=r("filter",{"Array, function":gO,"Matrix, function":function(a,s){return a.create(gO(a.toArray(),s))},"Array, RegExp":Ks,"Matrix, RegExp":function(a,s){return a.create(Ks(a.toArray(),s))}});return t},{isTransformFunction:!0});function gO(e,r){return Ec(e,function(t,n,i){return gi(r,t,[n+1],i,"filter")})}var oV="forEach",sV=["typed"],yO=T(oV,sV,e=>{var{typed:r}=e;function t(i,a,s){var l,f;return i[0]&&(l=i[0].compile().evaluate(s)),i[1]&&(rt(i[1])||mi(i[1])?f=i[1].compile().evaluate(s):f=vu(i[1],a,s)),n(l,f)}t.rawArgs=!0;var n=r("forEach",{"Array | Matrix, function":function(a,s){var l=function f(o,u){if(Array.isArray(o))ho(o,function(p,h){f(p,u.concat(h+1))});else return gi(s,o,u,a,"forEach")};l(a.valueOf(),[])}});return t},{isTransformFunction:!0});var uV="index",fV=["Index","getMatrixDataType"],bO=T(uV,fV,e=>{var{Index:r,getMatrixDataType:t}=e;return function(){for(var i=[],a=0,s=arguments.length;a0?0:2;else if(l&&l.isSet===!0)l=l.map(function(o){return o-1});else if(Ar(l)||Ge(l))t(l)!=="boolean"&&(l=l.map(function(o){return o-1}));else if(ar(l))l--;else if(je(l))l=l.toNumber()-1;else if(typeof l!="string")throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");i[a]=l}var f=new r;return r.apply(f,i),f}},{isTransformFunction:!0});var lV="map",cV=["typed"],DO=T(lV,cV,e=>{var{typed:r}=e;function t(i,a,s){var l,f;return i[0]&&(l=i[0].compile().evaluate(s)),i[1]&&(rt(i[1])||mi(i[1])?f=i[1].compile().evaluate(s):f=vu(i[1],a,s)),n(l,f)}t.rawArgs=!0;var n=r("map",{"Array, function":function(a,s){return wO(a,s,a)},"Matrix, function":function(a,s){return a.create(wO(a.valueOf(),s,a))}});return t},{isTransformFunction:!0});function wO(e,r,t){function n(i,a){return Array.isArray(i)?Rn(i,function(s,l){return n(s,a.concat(l+1))}):gi(r,i,a,t,"map")}return n(e,[])}function vn(e){if(e.length===2&&bt(e[0])){e=e.slice();var r=e[1];ar(r)?e[1]=r-1:je(r)&&(e[1]=r.minus(1))}return e}var pV="max",mV=["typed","config","numeric","larger"],SO=T(pV,mV,e=>{var{typed:r,config:t,numeric:n,larger:i}=e,a=mp({typed:r,config:t,numeric:n,larger:i});return r("max",{"...any":function(l){l=vn(l);try{return a.apply(null,l)}catch(f){throw lt(f)}}})},{isTransformFunction:!0});var hV="mean",dV=["typed","add","divide"],NO=T(hV,dV,e=>{var{typed:r,add:t,divide:n}=e,i=zp({typed:r,add:t,divide:n});return r("mean",{"...any":function(s){s=vn(s);try{return i.apply(null,s)}catch(l){throw lt(l)}}})},{isTransformFunction:!0});var vV="min",gV=["typed","config","numeric","smaller"],AO=T(vV,gV,e=>{var{typed:r,config:t,numeric:n,smaller:i}=e,a=hp({typed:r,config:t,numeric:n,smaller:i});return r("min",{"...any":function(l){l=vn(l);try{return a.apply(null,l)}catch(f){throw lt(f)}}})},{isTransformFunction:!0});var xV="range",yV=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq","add","isPositive"],EO=T(xV,yV,e=>{var{typed:r,config:t,matrix:n,bignumber:i,smaller:a,smallerEq:s,larger:l,largerEq:f,add:o,isPositive:u}=e,p=ep({typed:r,config:t,matrix:n,bignumber:i,smaller:a,smallerEq:s,larger:l,largerEq:f,add:o,isPositive:u});return r("range",{"...any":function(d){var x=d.length-1,v=d[x];return typeof v!="boolean"&&d.push(!0),p.apply(null,d)}})},{isTransformFunction:!0});var bV="row",wV=["typed","Index","matrix","range"],CO=T(bV,wV,e=>{var{typed:r,Index:t,matrix:n,range:i}=e,a=rp({typed:r,Index:t,matrix:n,range:i});return r("row",{"...any":function(l){var f=l.length-1,o=l[f];ar(o)&&(l[f]=o-1);try{return a.apply(null,l)}catch(u){throw lt(u)}}})},{isTransformFunction:!0});var DV="subset",SV=["typed","matrix","zeros","add"],MO=T(DV,SV,e=>{var{typed:r,matrix:t,zeros:n,add:i}=e,a=tp({typed:r,matrix:t,zeros:n,add:i});return r("subset",{"...any":function(l){try{return a.apply(null,l)}catch(f){throw lt(f)}}})},{isTransformFunction:!0});var NV="concat",AV=["typed","matrix","isInteger"],_O=T(NV,AV,e=>{var{typed:r,matrix:t,isInteger:n}=e,i=Qc({typed:r,matrix:t,isInteger:n});return r("concat",{"...any":function(s){var l=s.length-1,f=s[l];ar(f)?s[l]=f-1:je(f)&&(s[l]=f.minus(1));try{return i.apply(null,s)}catch(o){throw lt(o)}}})},{isTransformFunction:!0});var TO="diff",EV=["typed","matrix","subtract","number","bignumber"],FO=T(TO,EV,e=>{var{typed:r,matrix:t,subtract:n,number:i,bignumber:a}=e,s=Jc({typed:r,matrix:t,subtract:n,number:i,bignumber:a});return r(TO,{"...any":function(f){f=vn(f);try{return s.apply(null,f)}catch(o){throw lt(o)}}})},{isTransformFunction:!0});var CV="std",MV=["typed","map","sqrt","variance"],OO=T(CV,MV,e=>{var{typed:r,map:t,sqrt:n,variance:i}=e,a=Yp({typed:r,map:t,sqrt:n,variance:i});return r("std",{"...any":function(l){l=vn(l);try{return a.apply(null,l)}catch(f){throw lt(f)}}})},{isTransformFunction:!0});var BO="sum",_V=["typed","config","add","numeric"],IO=T(BO,_V,e=>{var{typed:r,config:t,add:n,numeric:i}=e,a=Lp({typed:r,config:t,add:n,numeric:i});return r(BO,{"...any":function(l){l=vn(l);try{return a.apply(null,l)}catch(f){throw lt(f)}}})},{isTransformFunction:!0});var TV="quantileSeq",FV=["typed","bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger"],PO=T(TV,FV,e=>{var{typed:r,bignumber:t,add:n,subtract:i,divide:a,multiply:s,partitionSelect:l,compare:f,isInteger:o,smaller:u,smallerEq:p,larger:h}=e,d=Vp({typed:r,bignumber:t,add:n,subtract:i,divide:a,multiply:s,partitionSelect:l,compare:f,isInteger:o,smaller:u,smallerEq:p,larger:h});return r("quantileSeq",{"Array | Matrix, number | BigNumber":d,"Array | Matrix, number | BigNumber, number":(v,y,w)=>d(v,y,x(w)),"Array | Matrix, number | BigNumber, boolean":d,"Array | Matrix, number | BigNumber, boolean, number":(v,y,w,C)=>d(v,y,w,x(C)),"Array | Matrix, Array | Matrix":d,"Array | Matrix, Array | Matrix, number":(v,y,w)=>d(v,y,x(w)),"Array | Matrix, Array | Matrix, boolean":d,"Array | Matrix, Array | Matrix, boolean, number":(v,y,w,C)=>d(v,y,w,x(C))});function x(v){return vn([[],v])[1]}},{isTransformFunction:!0});var kO="cumsum",OV=["typed","add","unaryPlus"],RO=T(kO,OV,e=>{var{typed:r,add:t,unaryPlus:n}=e,i=Up({typed:r,add:t,unaryPlus:n});return r(kO,{"...any":function(s){if(s.length===2&&bt(s[0])){var l=s[1];ar(l)?s[1]=l-1:je(l)&&(s[1]=l.minus(1))}try{return i.apply(null,s)}catch(f){throw lt(f)}}})},{isTransformFunction:!0});var LO="variance",BV=["typed","add","subtract","multiply","divide","apply","isNaN"],qO=T(LO,BV,e=>{var{typed:r,add:t,subtract:n,multiply:i,divide:a,apply:s,isNaN:l}=e,f=Wp({typed:r,add:t,subtract:n,multiply:i,divide:a,apply:s,isNaN:l});return r(LO,{"...any":function(u){u=vn(u);try{return f.apply(null,u)}catch(p){throw lt(p)}}})},{isTransformFunction:!0});var UO="print",IV=["typed","matrix","zeros","add"],zO=T(UO,IV,e=>{var{typed:r,matrix:t,zeros:n,add:i}=e,a=ip({typed:r,matrix:t,zeros:n,add:i});return r(UO,{"string, Object | Array":function(f,o){return a(s(f),o)},"string, Object | Array, number | Object":function(f,o,u){return a(s(f),o,u)}});function s(l){return l.replace(np,f=>{var o=f.slice(1).split("."),u=o.map(function(p){return!isNaN(p)&&p.length>0?parseInt(p)-1:p});return"$"+u.join(".")})}},{isTransformFunction:!0});var PV="and",kV=["typed","matrix","zeros","add","equalScalar","not","concat"],WO=T(PV,kV,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:i,not:a,concat:s}=e,l=ap({typed:r,matrix:t,equalScalar:n,zeros:i,not:a,concat:s});function f(o,u,p){var h=o[0].compile().evaluate(p);if(!bt(h)&&!l(h,!0))return!1;var d=o[1].compile().evaluate(p);return l(h,d)}return f.rawArgs=!0,f},{isTransformFunction:!0});var RV="or",LV=["typed","matrix","equalScalar","DenseMatrix","concat"],VO=T(RV,LV,e=>{var{typed:r,matrix:t,equalScalar:n,DenseMatrix:i,concat:a}=e,s=Zc({typed:r,matrix:t,equalScalar:n,DenseMatrix:i,concat:a});function l(f,o,u){var p=f[0].compile().evaluate(u);if(!bt(p)&&s(p,!1))return!0;var h=f[1].compile().evaluate(u);return s(p,h)}return l.rawArgs=!0,l},{isTransformFunction:!0});var qV="bitAnd",UV=["typed","matrix","zeros","add","equalScalar","not","concat"],YO=T(qV,UV,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:i,not:a,concat:s}=e,l=Gc({typed:r,matrix:t,equalScalar:n,zeros:i,not:a,concat:s});function f(o,u,p){var h=o[0].compile().evaluate(p);if(!bt(h)){if(isNaN(h))return NaN;if(h===0||h===!1)return 0}var d=o[1].compile().evaluate(p);return l(h,d)}return f.rawArgs=!0,f},{isTransformFunction:!0});var zV="bitOr",WV=["typed","matrix","equalScalar","DenseMatrix","concat"],HO=T(zV,WV,e=>{var{typed:r,matrix:t,equalScalar:n,DenseMatrix:i,concat:a}=e,s=$c({typed:r,matrix:t,equalScalar:n,DenseMatrix:i,concat:a});function l(f,o,u){var p=f[0].compile().evaluate(u);if(!bt(p)){if(isNaN(p))return NaN;if(p===-1)return-1;if(p===!0)return 1}var h=f[1].compile().evaluate(u);return s(p,h)}return l.rawArgs=!0,l},{isTransformFunction:!0});var Fg=Tg;var XO=Xn(yc(),1);var $O=Xn(GO(),1);function ZO(e){var r=new $O.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 QO(e,r,t,n){function i(y,w){var C=arguments.length;if(C!==1&&C!==2)throw new ei("import",C,1,2);w||(w={});function b(O,F,M){if(Array.isArray(F))F.forEach(L=>b(O,L));else if(typeof F=="object")for(var _ in F)$e(F,_)&&b(O,F[_],_);else if(es(F)||M!==void 0){var k=es(F)?x(F)?F.fn+".transform":F.fn:M;if($e(O,k)&&O[k]!==F&&!w.silent)throw new Error('Cannot import "'+k+'" twice');O[k]=F}else if(!w.silent)throw new TypeError("Factory, Object, or Array expected")}var A={};b(A,y);for(var E in A)if($e(A,E)){var S=A[E];if(es(S))o(S,w);else if(u(S))a(E,S,w);else if(!w.silent)throw new TypeError("Factory, Object, or Array expected")}}function a(y,w,C){if(C.wrap&&typeof w=="function"&&(w=f(w)),p(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],s(y,w),t.emit("import",y,function(){return w});return}if(t[y]===void 0||C.override){t[y]=w,delete n[y],s(y,w),t.emit("import",y,function(){return w});return}if(!C.silent)throw new Error('Cannot import "'+y+'": already exists')}function s(y,w){w&&typeof w.transform=="function"?(t.expression.transform[y]=w.transform,h(y)&&(t.expression.mathWithTransform[y]=w.transform)):(delete t.expression.transform[y],h(y)&&(t.expression.mathWithTransform[y]=w))}function l(y){delete t.expression.transform[y],h(y)?t.expression.mathWithTransform[y]=t[y]:delete t.expression.mathWithTransform[y]}function f(y){var w=function(){for(var b=[],A=0,E=arguments.length;A2&&arguments[2]!==void 0?arguments[2]:y.fn;if($d(C,"."))throw new Error("Factory name should not contain a nested path. Name: "+JSON.stringify(C));var b=x(y)?t.expression.transform:t,A=C in t.expression.transform,E=$e(b,C)?b[C]:void 0,S=function(){var F={};y.dependencies.map(Xd).forEach(_=>{if($d(_,"."))throw new Error("Factory dependency should not contain a nested path. Name: "+JSON.stringify(_));_==="math"?F.math=t:_==="mathWithTransform"?F.mathWithTransform=t.expression.mathWithTransform:_==="classes"?F.classes=t:F[_]=t[_]});var M=y(F);if(M&&typeof M.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(E===void 0||w.override)return M;if(e.isTypedFunction(E)&&e.isTypedFunction(M))return e(E,M);if(w.silent)return E;throw new Error('Cannot import "'+C+'": already exists')};!y.meta||y.meta.lazy!==!1?(Zs(b,C,S),E&&A?l(C):(x(y)||d(y))&&Zs(t.expression.mathWithTransform,C,()=>b[C])):(b[C]=S(),E&&A?l(C):(x(y)||d(y))&&Zs(t.expression.mathWithTransform,C,()=>b[C])),n[C]=y,t.emit("import",C,S)}function u(y){return typeof y=="function"||typeof y=="number"||typeof y=="string"||typeof y=="boolean"||y===null||qt(y)||Gt(y)||je(y)||Jn(y)||Ge(y)||Array.isArray(y)}function p(y){return typeof y=="function"&&typeof y.signature=="string"}function h(y){return!$e(v,y)}function d(y){return y.fn.indexOf(".")===-1&&!$e(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 i}function $p(e,r){var t=Mt({},ac,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=ZO({isNumber:ar,isComplex:Gt,isBigNumber:je,isFraction:Jn,isUnit:qt,isString:yt,isArray:Ar,isMatrix:Ge,isCollection:bt,isDenseMatrix:Ia,isSparseMatrix:Kn,isRange:mo,isIndex:ua,isBoolean:oc,isResultSet:sc,isHelp:Hs,isFunction:uc,isDate:fc,isRegExp:lc,isObject:fa,isNull:cc,isUndefined:pc,isAccessorNode:Sn,isArrayNode:$t,isAssignmentNode:mc,isBlockNode:hc,isConditionalNode:dc,isConstantNode:yr,isFunctionAssignmentNode:mi,isFunctionNode:fn,isIndexNode:kn,isNode:Sr,isObjectNode:la,isOperatorNode:ut,isParenthesisNode:Zt,isRangeNode:vc,isRelationalNode:gc,isSymbolNode:rt,isChain:Gs});n.config=ny(t,n.emit),n.expression={transform:{},mathWithTransform:{config:n.config}};var i=[],a=[];function s(u){if(es(u))return u(n);var p=u[Object.keys(u)[0]];if(es(p))return p(n);if(!Kx(u))throw console.warn("Factory object with properties \`type\`, \`name\`, and \`factory\` expected",u),new Error("Factory object with properties \`type\`, \`name\`, and \`factory\` expected");var h=i.indexOf(u),d;return h===-1?(u.math===!0?d=u.factory(n.type,t,s,n.typed,n):d=u.factory(n.type,t,s,n.typed),i.push(u),a.push(d)):d=a[h],d}var l={};function f(){for(var u=arguments.length,p=new Array(u),h=0;h{Rd(l).forEach(u=>{u&&u.meta&&u.meta.recreateOnConfigChange&&o(u,{override:!0})})}),n.create=$p.bind(null,e),n.factory=T,n.import(Rd(Xx(e))),n.ArgumentsError=ei,n.DimensionError=pr,n.IndexError=Xt,n}var gu=Xn(Xl());var JO=(e,r,t)=>{if(e.length!==1)return"";let n=e.map(function(s){return s.compile().evaluate(t)}),i=t.get(n[0]),a=t.get("$properties")?.[n[0]]?.type;return(a=="file"||a=="link"||a=="context")&&(a.includes("multi")?i=Ui(i).map(s=>t.get("$paths").get(s)??s):i=t.get("$paths").get(i)??i),i??""};JO.rawArgs=!0;var KO=(e,r,t)=>{if((e.length-1)%2!==0)return"";for(let n=0;n{if(e.length<1||e.length>2)return"";let n=e[0].compile().evaluate(t);n instanceof Date||(n=new Date(n));let i=e[1]?.compile().evaluate(t);return i?.length>0?Ba(n,i):Ba(n,t.get("$settings")?.dateFormat??"yyyy-MM-dd")};jO.rawArgs=!0;var ti=e=>typeof e=="string"||e instanceof String?e:e instanceof Date?Ba(e,"yyyy-MM-dd"):typeof e=="number"?e.toFixed(2):e.path?e.path:"",eB={prop:JO,slice:(e,r,t)=>(e=ti(e),e.slice(r,t)),if:(e,r,t)=>e===!0?r:t,ifs:KO,empty:e=>e.length!==1?"":e[0]===""?"true":"false",length:e=>e.length,substring:(e,r,t)=>(e=ti(e),t?e.substring(r,t):e.substring(r)),contains:(e,r)=>(e=ti(e),r=ti(r),e.includes(r)),test:(e,r)=>(e=ti(e),new RegExp(r).test(e)),match:(e,r)=>(e=ti(e),e.match(new RegExp(r))),replace:(e,r,t)=>(e=ti(e),e.replace(new RegExp(r),t)),replaceAll:(e,r,t)=>(e=ti(e),r=ti(r),t=ti(t),e.replace(new RegExp(r,"g"),t)),lower:e=>(e=ti(e),e.toLowerCase()),upper:e=>(e=ti(e),e.toUpperCase()),repeat:(e,r)=>e.repeat(r),format:ti,toNumber:e=>e instanceof Date?e.getTime():typeof e=="string"?parseFloat(e):e,now:()=>new Date,minute:e=>e.getMinutes(),hour:e=>e.getHours(),day:e=>e.getDay(),date:e=>e.getDate(),week:e=>Ba(e,"w"),month:e=>e.getMonth()+1,year:e=>e.getFullYear(),dateAdd:(e,r,t)=>(t==="days"&&e.setDate(e.getDate()+r),t==="months"&&e.setMonth(e.getMonth()+r),t==="years"&&e.setFullYear(e.getFullYear()+r),t==="quarters"&&e.setMonth(e.getMonth()+r*3),t==="weeks"&&e.setDate(e.getDate()+r*7),t==="hours"&&e.setHours(e.getHours()+r),t==="minutes"&&e.setMinutes(e.getMinutes()+r),t==="seconds"&&e.setSeconds(e.getSeconds()+r),e),dateSubtract:(e,r,t)=>(t==="day"&&e.setDate(e.getDate()-r),t==="month"&&e.setMonth(e.getMonth()-r),t==="year"&&e.setFullYear(e.getFullYear()-r),t==="quarter"&&e.setMonth(e.getMonth()-r*3),t==="week"&&e.setDate(e.getDate()-r*7),t==="hour"&&e.setHours(e.getHours()-r),t==="minute"&&e.setMinutes(e.getMinutes()-r),t==="second"&&e.setSeconds(e.getSeconds()-r),e),dateBetween:(e,r,t)=>{let s=Math.abs(r.getTime()-e.getTime());switch(t){case"days":return Math.round(s/864e5);case"months":return Math.round(s/2592e6);case"years":return Math.round(s/31536e6);case"hours":return Math.round(s/(60*60*1e3));case"minutes":return Math.round(s/(60*1e3));case"seconds":return Math.round(s/1e3);case"weeks":return Math.round(s/(864e5*7));case"quarters":return Math.round(s/(2592e6*3));default:return Math.round(s/864e5)}},style:(e,r)=>e,timeStamp:e=>e.getTime(),formatDate:jO,parseDate:e=>(0,gu.isNumber)(e)?new Date(e):(0,gu.isString)(e)?new Date(e):(0,gu.isDate)(e)?e:""};var rB=(e,r,t,n)=>{if(!r)return"";let i=new Map;Object.keys(n).forEach(f=>i.set(f,n[f])),i.set("$properties",t),i.set("$paths",e);let a={...Fg,createAdd:T("add",[],()=>function(o,u){return o+u})},s=$p(a);s.import(eB,{override:!0});let l;try{l=s.evaluate(r,i),l=ec("",l)}catch(f){console.log(r,f)}return l};var tB=(e,r,t)=>({...r,...t.filter(n=>n.type=="fileprop"||n.name=="tags").reduce((n,i)=>{let{value:a}=Pd(i.value,i.type);return{...n,[i.name]:rB(e,a,t.reduce((s,l)=>({...s,[l.name]:l}),{}),r)}},{})});var YV=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239],uB=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],HV="\\u200C\\u200D\\xB7\\u0300-\\u036F\\u0387\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u0669\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u06F0-\\u06F9\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07C0-\\u07C9\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u0898-\\u089F\\u08CA-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096F\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09E6-\\u09EF\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A66-\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AE6-\\u0AEF\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B55-\\u0B57\\u0B62\\u0B63\\u0B66-\\u0B6F\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C04\\u0C3C\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0CE6-\\u0CEF\\u0CF3\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D66-\\u0D6F\\u0D81-\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0E50-\\u0E59\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECE\\u0ED0-\\u0ED9\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1040-\\u1049\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F-\\u109D\\u135D-\\u135F\\u1369-\\u1371\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u180F-\\u1819\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u194F\\u19D0-\\u19DA\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AB0-\\u1ABD\\u1ABF-\\u1ACE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BB0-\\u1BB9\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1C40-\\u1C49\\u1C50-\\u1C59\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DFF\\u200C\\u200D\\u203F\\u2040\\u2054\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\u30FB\\uA620-\\uA629\\uA66F\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA82C\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8D0-\\uA8D9\\uA8E0-\\uA8F1\\uA8FF-\\uA909\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9D0-\\uA9D9\\uA9E5\\uA9F0-\\uA9F9\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA50-\\uAA59\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF10-\\uFF19\\uFF3F\\uFF65",fB="\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u0870-\\u0887\\u0889-\\u088E\\u08A0-\\u08C9\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C5D\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D04-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u1711\\u171F-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4C\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309B-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7CA\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7D9\\uA7F2-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC",Ig={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Pg="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",GV={5:Pg,"5module":Pg+" export import",6:Pg+" const class extends export import super"},$V=/^in(stanceof)?$/,ZV=new RegExp("["+fB+"]"),QV=new RegExp("["+fB+HV+"]");function Rg(e,r){for(var t=65536,n=0;ne)return!1;if(t+=r[n+1],t>=e)return!0}return!1}function za(e,r){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&ZV.test(String.fromCharCode(e)):r===!1?!1:Rg(e,uB)}function xu(e,r){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&QV.test(String.fromCharCode(e)):r===!1?!1:Rg(e,uB)||Rg(e,YV)}var tt=function(r,t){t===void 0&&(t={}),this.label=r,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function bi(e,r){return new tt(e,{beforeExpr:!0,binop:r})}var wi={beforeExpr:!0},zn={startsExpr:!0},Ug={};function $r(e,r){return r===void 0&&(r={}),r.keyword=e,Ug[e]=new tt(e,r)}var X={num:new tt("num",zn),regexp:new tt("regexp",zn),string:new tt("string",zn),name:new tt("name",zn),privateId:new tt("privateId",zn),eof:new tt("eof"),bracketL:new tt("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new tt("]"),braceL:new tt("{",{beforeExpr:!0,startsExpr:!0}),braceR:new tt("}"),parenL:new tt("(",{beforeExpr:!0,startsExpr:!0}),parenR:new tt(")"),comma:new tt(",",wi),semi:new tt(";",wi),colon:new tt(":",wi),dot:new tt("."),question:new tt("?",wi),questionDot:new tt("?."),arrow:new tt("=>",wi),template:new tt("template"),invalidTemplate:new tt("invalidTemplate"),ellipsis:new tt("...",wi),backQuote:new tt("\`",zn),dollarBraceL:new tt("\${",{beforeExpr:!0,startsExpr:!0}),eq:new tt("=",{beforeExpr:!0,isAssign:!0}),assign:new tt("_=",{beforeExpr:!0,isAssign:!0}),incDec:new tt("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new tt("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:bi("||",1),logicalAND:bi("&&",2),bitwiseOR:bi("|",3),bitwiseXOR:bi("^",4),bitwiseAND:bi("&",5),equality:bi("==/!=/===/!==",6),relational:bi("/<=/>=",7),bitShift:bi("<>/>>>",8),plusMin:new tt("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:bi("%",10),star:bi("*",10),slash:bi("/",10),starstar:new tt("**",{beforeExpr:!0}),coalesce:bi("??",1),_break:$r("break"),_case:$r("case",wi),_catch:$r("catch"),_continue:$r("continue"),_debugger:$r("debugger"),_default:$r("default",wi),_do:$r("do",{isLoop:!0,beforeExpr:!0}),_else:$r("else",wi),_finally:$r("finally"),_for:$r("for",{isLoop:!0}),_function:$r("function",zn),_if:$r("if"),_return:$r("return",wi),_switch:$r("switch"),_throw:$r("throw",wi),_try:$r("try"),_var:$r("var"),_const:$r("const"),_while:$r("while",{isLoop:!0}),_with:$r("with"),_new:$r("new",{beforeExpr:!0,startsExpr:!0}),_this:$r("this",zn),_super:$r("super",zn),_class:$r("class",zn),_extends:$r("extends",wi),_export:$r("export"),_import:$r("import",zn),_null:$r("null",zn),_true:$r("true",zn),_false:$r("false",zn),_in:$r("in",{beforeExpr:!0,binop:7}),_instanceof:$r("instanceof",{beforeExpr:!0,binop:7}),_typeof:$r("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:$r("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:$r("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Ni=/\\r\\n?|\\n|\\u2028|\\u2029/,XV=new RegExp(Ni.source,"g");function yu(e){return e===10||e===13||e===8232||e===8233}function lB(e,r,t){t===void 0&&(t=e.length);for(var n=r;n>10)+55296,(e&1023)+56320))}var jV=/(?:[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])/,Of=function(r,t){this.line=r,this.column=t};Of.prototype.offset=function(r){return new Of(this.line,this.column+r)};var Kp=function(r,t,n){this.start=t,this.end=n,r.sourceFile!==null&&(this.source=r.sourceFile)};function mB(e,r){for(var t=1,n=0;;){var i=lB(e,n,r);if(i<0)return new Of(t,r-n);++t,n=i}}var Lg={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},aB=!1;function eY(e){var r={};for(var t in Lg)r[t]=e&&If(e,t)?e[t]:Lg[t];if(r.ecmaVersion==="latest"?r.ecmaVersion=1e8:r.ecmaVersion==null?(!aB&&typeof console=="object"&&console.warn&&(aB=!0,console.warn(\`Since Acorn 8.0.0, options.ecmaVersion is required. +Defaulting to 2020, but this will stop working in the future.\`)),r.ecmaVersion=11):r.ecmaVersion>=2015&&(r.ecmaVersion-=2009),r.allowReserved==null&&(r.allowReserved=r.ecmaVersion<5),(!e||e.allowHashBang==null)&&(r.allowHashBang=r.ecmaVersion>=14),nB(r.onToken)){var n=r.onToken;r.onToken=function(i){return n.push(i)}}return nB(r.onComment)&&(r.onComment=rY(r,r.onComment)),r}function rY(e,r){return function(t,n,i,a,s,l){var f={type:t?"Block":"Line",value:n,start:i,end:a};e.locations&&(f.loc=new Kp(this,s,l)),e.ranges&&(f.range=[i,a]),r.push(f)}}var Bf=1,bu=2,zg=4,hB=8,dB=16,vB=32,Wg=64,gB=128,Pf=256,Vg=Bf|bu|Pf;function Yg(e,r){return bu|(e?zg:0)|(r?hB:0)}var Qp=0,Hg=1,Va=2,xB=3,yB=4,bB=5,Kt=function(r,t,n){this.options=r=eY(r),this.sourceFile=r.sourceFile,this.keywords=Ao(GV[r.ecmaVersion>=6?6:r.sourceType==="module"?"5module":5]);var i="";r.allowReserved!==!0&&(i=Ig[r.ecmaVersion>=6?6:r.ecmaVersion===5?5:3],r.sourceType==="module"&&(i+=" await")),this.reservedWords=Ao(i);var a=(i?i+" ":"")+Ig.strict;this.reservedWordsStrict=Ao(a),this.reservedWordsStrictBind=Ao(a+" "+Ig.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf(\` +\`,n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(Ni).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=X.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=r.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&r.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Bf),this.regexpState=null,this.privateNameStack=[]},da={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};Kt.prototype.parse=function(){var r=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(r)};da.inFunction.get=function(){return(this.currentVarScope().flags&bu)>0};da.inGenerator.get=function(){return(this.currentVarScope().flags&hB)>0&&!this.currentVarScope().inClassFieldInit};da.inAsync.get=function(){return(this.currentVarScope().flags&zg)>0&&!this.currentVarScope().inClassFieldInit};da.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var r=this.scopeStack[e];if(r.inClassFieldInit||r.flags&Pf)return!1;if(r.flags&bu)return(r.flags&zg)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};da.allowSuper.get=function(){var e=this.currentThisScope(),r=e.flags,t=e.inClassFieldInit;return(r&Wg)>0||t||this.options.allowSuperOutsideMethod};da.allowDirectSuper.get=function(){return(this.currentThisScope().flags&gB)>0};da.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};da.allowNewDotTarget.get=function(){var e=this.currentThisScope(),r=e.flags,t=e.inClassFieldInit;return(r&(bu|Pf))>0||t};da.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Pf)>0};Kt.extend=function(){for(var r=[],t=arguments.length;t--;)r[t]=arguments[t];for(var n=this,i=0;i=,?^&]/.test(i)||i==="!"&&this.input.charAt(n+1)==="=")}e+=r[0].length,Di.lastIndex=e,e+=Di.exec(this.input)[0].length,this.input[e]===";"&&e++}};Nn.eat=function(e){return this.type===e?(this.next(),!0):!1};Nn.isContextual=function(e){return this.type===X.name&&this.value===e&&!this.containsEsc};Nn.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};Nn.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};Nn.canInsertSemicolon=function(){return this.type===X.eof||this.type===X.braceR||Ni.test(this.input.slice(this.lastTokEnd,this.start))};Nn.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};Nn.semicolon=function(){!this.eat(X.semi)&&!this.insertSemicolon()&&this.unexpected()};Nn.afterTrailingComma=function(e,r){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),r||this.next(),!0};Nn.expect=function(e){this.eat(e)||this.unexpected()};Nn.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var jp=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Nn.checkPatternErrors=function(e,r){if(!!e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var t=r?e.parenthesizedAssign:e.parenthesizedBind;t>-1&&this.raiseRecoverable(t,r?"Assigning to rvalue":"Parenthesized pattern")}};Nn.checkExpressionErrors=function(e,r){if(!e)return!1;var t=e.shorthandAssign,n=e.doubleProto;if(!r)return t>=0||n>=0;t>=0&&this.raise(t,"Shorthand property assignments are valid only in destructuring patterns"),n>=0&&this.raiseRecoverable(n,"Redefinition of __proto__ property")};Nn.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&n<56320)return!0;if(za(n,!0)){for(var i=t+1;xu(n=this.input.charCodeAt(i),!0);)++i;if(n===92||n>55295&&n<56320)return!0;var a=this.input.slice(t,i);if(!$V.test(a))return!0}return!1};hr.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;Di.lastIndex=this.pos;var e=Di.exec(this.input),r=this.pos+e[0].length,t;return!Ni.test(this.input.slice(this.pos,r))&&this.input.slice(r,r+8)==="function"&&(r+8===this.input.length||!(xu(t=this.input.charCodeAt(r+8))||t>55295&&t<56320))};hr.parseStatement=function(e,r,t){var n=this.type,i=this.startNode(),a;switch(this.isLet(e)&&(n=X._var,a="let"),n){case X._break:case X._continue:return this.parseBreakContinueStatement(i,n.keyword);case X._debugger:return this.parseDebuggerStatement(i);case X._do:return this.parseDoStatement(i);case X._for:return this.parseForStatement(i);case X._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case X._class:return e&&this.unexpected(),this.parseClass(i,!0);case X._if:return this.parseIfStatement(i);case X._return:return this.parseReturnStatement(i);case X._switch:return this.parseSwitchStatement(i);case X._throw:return this.parseThrowStatement(i);case X._try:return this.parseTryStatement(i);case X._const:case X._var:return a=a||this.value,e&&a!=="var"&&this.unexpected(),this.parseVarStatement(i,a);case X._while:return this.parseWhileStatement(i);case X._with:return this.parseWithStatement(i);case X.braceL:return this.parseBlock(!0,i);case X.semi:return this.parseEmptyStatement(i);case X._export:case X._import:if(this.options.ecmaVersion>10&&n===X._import){Di.lastIndex=this.pos;var s=Di.exec(this.input),l=this.pos+s[0].length,f=this.input.charCodeAt(l);if(f===40||f===46)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(r||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),n===X._import?this.parseImport(i):this.parseExport(i,t);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var o=this.value,u=this.parseExpression();return n===X.name&&u.type==="Identifier"&&this.eat(X.colon)?this.parseLabeledStatement(i,o,u,e):this.parseExpressionStatement(i,u)}};hr.parseBreakContinueStatement=function(e,r){var t=r==="break";this.next(),this.eat(X.semi)||this.insertSemicolon()?e.label=null:this.type!==X.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var n=0;n=6?this.eat(X.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};hr.parseForStatement=function(e){this.next();var r=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Gg),this.enterScope(0),this.expect(X.parenL),this.type===X.semi)return r>-1&&this.unexpected(r),this.parseFor(e,null);var t=this.isLet();if(this.type===X._var||this.type===X._const||t){var n=this.startNode(),i=t?"let":this.value;return this.next(),this.parseVar(n,!0,i),this.finishNode(n,"VariableDeclaration"),(this.type===X._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&n.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===X._in?r>-1&&this.unexpected(r):e.await=r>-1),this.parseForIn(e,n)):(r>-1&&this.unexpected(r),this.parseFor(e,n))}var a=this.isContextual("let"),s=!1,l=new jp,f=this.parseExpression(r>-1?"await":!0,l);return this.type===X._in||(s=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===X._in?r>-1&&this.unexpected(r):e.await=r>-1),a&&s&&this.raise(f.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(f,!1,l),this.checkLValPattern(f),this.parseForIn(e,f)):(this.checkExpressionErrors(l,!0),r>-1&&this.unexpected(r),this.parseFor(e,f))};hr.parseFunctionStatement=function(e,r,t){return this.next(),this.parseFunction(e,Ff|(t?0:qg),!1,r)};hr.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(X._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};hr.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(X.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};hr.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(X.braceL),this.labels.push(nY),this.enterScope(0);for(var r,t=!1;this.type!==X.braceR;)if(this.type===X._case||this.type===X._default){var n=this.type===X._case;r&&this.finishNode(r,"SwitchCase"),e.cases.push(r=this.startNode()),r.consequent=[],this.next(),n?r.test=this.parseExpression():(t&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),t=!0,r.test=null),this.expect(X.colon)}else r||this.unexpected(),r.consequent.push(this.parseStatement(null));return this.exitScope(),r&&this.finishNode(r,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};hr.parseThrowStatement=function(e){return this.next(),Ni.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var iY=[];hr.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),r=e.type==="Identifier";return this.enterScope(r?vB:0),this.checkLValPattern(e,r?yB:Va),this.expect(X.parenR),e};hr.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===X._catch){var r=this.startNode();this.next(),this.eat(X.parenL)?r.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),r.param=null,this.enterScope(0)),r.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(r,"CatchClause")}return e.finalizer=this.eat(X._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};hr.parseVarStatement=function(e,r,t){return this.next(),this.parseVar(e,!1,r,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")};hr.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Gg),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};hr.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};hr.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};hr.parseLabeledStatement=function(e,r,t,n){for(var i=0,a=this.labels;i=0;f--){var o=this.labels[f];if(o.statementStart===e.start)o.statementStart=this.start,o.kind=l;else break}return this.labels.push({name:r,kind:l,statementStart:this.start}),e.body=this.parseStatement(n?n.indexOf("label")===-1?n+"label":n:"label"),this.labels.pop(),e.label=t,this.finishNode(e,"LabeledStatement")};hr.parseExpressionStatement=function(e,r){return e.expression=r,this.semicolon(),this.finishNode(e,"ExpressionStatement")};hr.parseBlock=function(e,r,t){for(e===void 0&&(e=!0),r===void 0&&(r=this.startNode()),r.body=[],this.expect(X.braceL),e&&this.enterScope(0);this.type!==X.braceR;){var n=this.parseStatement(null);r.body.push(n)}return t&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(r,"BlockStatement")};hr.parseFor=function(e,r){return e.init=r,this.expect(X.semi),e.test=this.type===X.semi?null:this.parseExpression(),this.expect(X.semi),e.update=this.type===X.parenR?null:this.parseExpression(),this.expect(X.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};hr.parseForIn=function(e,r){var t=this.type===X._in;return this.next(),r.type==="VariableDeclaration"&&r.declarations[0].init!=null&&(!t||this.options.ecmaVersion<8||this.strict||r.kind!=="var"||r.declarations[0].id.type!=="Identifier")&&this.raise(r.start,(t?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=r,e.right=t?this.parseExpression():this.parseMaybeAssign(),this.expect(X.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,t?"ForInStatement":"ForOfStatement")};hr.parseVar=function(e,r,t,n){for(e.declarations=[],e.kind=t;;){var i=this.startNode();if(this.parseVarId(i,t),this.eat(X.eq)?i.init=this.parseMaybeAssign(r):!n&&t==="const"&&!(this.type===X._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!n&&i.id.type!=="Identifier"&&!(r&&(this.type===X._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):i.init=null,e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(X.comma))break}return e};hr.parseVarId=function(e,r){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,r==="var"?Hg:Va,!1)};var Ff=1,qg=2,wB=4;hr.parseFunction=function(e,r,t,n,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!n)&&(this.type===X.star&&r&qg&&this.unexpected(),e.generator=this.eat(X.star)),this.options.ecmaVersion>=8&&(e.async=!!n),r&Ff&&(e.id=r&wB&&this.type!==X.name?null:this.parseIdent(),e.id&&!(r&qg)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Hg:Va:xB));var a=this.yieldPos,s=this.awaitPos,l=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Yg(e.async,e.generator)),r&Ff||(e.id=this.type===X.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,t,!1,i),this.yieldPos=a,this.awaitPos=s,this.awaitIdentPos=l,this.finishNode(e,r&Ff?"FunctionDeclaration":"FunctionExpression")};hr.parseFunctionParams=function(e){this.expect(X.parenL),e.params=this.parseBindingList(X.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};hr.parseClass=function(e,r){this.next();var t=this.strict;this.strict=!0,this.parseClassId(e,r),this.parseClassSuper(e);var n=this.enterClassBody(),i=this.startNode(),a=!1;for(i.body=[],this.expect(X.braceL);this.type!==X.braceR;){var s=this.parseClassElement(e.superClass!==null);s&&(i.body.push(s),s.type==="MethodDefinition"&&s.kind==="constructor"?(a&&this.raiseRecoverable(s.start,"Duplicate constructor in the same class"),a=!0):s.key&&s.key.type==="PrivateIdentifier"&&aY(n,s)&&this.raiseRecoverable(s.key.start,"Identifier '#"+s.key.name+"' has already been declared"))}return this.strict=t,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,r?"ClassDeclaration":"ClassExpression")};hr.parseClassElement=function(e){if(this.eat(X.semi))return null;var r=this.options.ecmaVersion,t=this.startNode(),n="",i=!1,a=!1,s="method",l=!1;if(this.eatContextual("static")){if(r>=13&&this.eat(X.braceL))return this.parseClassStaticBlock(t),t;this.isClassElementNameStart()||this.type===X.star?l=!0:n="static"}if(t.static=l,!n&&r>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===X.star)&&!this.canInsertSemicolon()?a=!0:n="async"),!n&&(r>=9||!a)&&this.eat(X.star)&&(i=!0),!n&&!a&&!i){var f=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?s=f:n=f)}if(n?(t.computed=!1,t.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),t.key.name=n,this.finishNode(t.key,"Identifier")):this.parseClassElementName(t),r<13||this.type===X.parenL||s!=="method"||i||a){var o=!t.static&&Xp(t,"constructor"),u=o&&e;o&&s!=="method"&&this.raise(t.key.start,"Constructor can't have get/set modifier"),t.kind=o?"constructor":s,this.parseClassMethod(t,i,a,u)}else this.parseClassField(t);return t};hr.isClassElementNameStart=function(){return this.type===X.name||this.type===X.privateId||this.type===X.num||this.type===X.string||this.type===X.bracketL||this.type.keyword};hr.parseClassElementName=function(e){this.type===X.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};hr.parseClassMethod=function(e,r,t,n){var i=e.key;e.kind==="constructor"?(r&&this.raise(i.start,"Constructor can't be a generator"),t&&this.raise(i.start,"Constructor can't be an async method")):e.static&&Xp(e,"prototype")&&this.raise(i.start,"Classes may not have a static property named prototype");var a=e.value=this.parseMethod(r,t,n);return e.kind==="get"&&a.params.length!==0&&this.raiseRecoverable(a.start,"getter should have no params"),e.kind==="set"&&a.params.length!==1&&this.raiseRecoverable(a.start,"setter should have exactly one param"),e.kind==="set"&&a.params[0].type==="RestElement"&&this.raiseRecoverable(a.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};hr.parseClassField=function(e){if(Xp(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&Xp(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(X.eq)){var r=this.currentThisScope(),t=r.inClassFieldInit;r.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),r.inClassFieldInit=t}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};hr.parseClassStaticBlock=function(e){e.body=[];var r=this.labels;for(this.labels=[],this.enterScope(Pf|Wg);this.type!==X.braceR;){var t=this.parseStatement(null);e.body.push(t)}return this.next(),this.exitScope(),this.labels=r,this.finishNode(e,"StaticBlock")};hr.parseClassId=function(e,r){this.type===X.name?(e.id=this.parseIdent(),r&&this.checkLValSimple(e.id,Va,!1)):(r===!0&&this.unexpected(),e.id=null)};hr.parseClassSuper=function(e){e.superClass=this.eat(X._extends)?this.parseExprSubscripts(null,!1):null};hr.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};hr.exitClassBody=function(){var e=this.privateNameStack.pop(),r=e.declared,t=e.used;if(!!this.options.checkPrivateFields)for(var n=this.privateNameStack.length,i=n===0?null:this.privateNameStack[n-1],a=0;a=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(r,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==X.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};hr.parseExport=function(e,r){if(this.next(),this.eat(X.star))return this.parseExportAllDeclaration(e,r);if(this.eat(X._default))return this.checkExport(r,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(r,e.declaration.declarations):this.checkExport(r,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(r),this.eatContextual("from"))this.type!==X.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var t=0,n=e.specifiers;t=13&&this.type===X.string){var e=this.parseLiteral(this.value);return jV.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};hr.adaptDirectivePrologue=function(e){for(var r=0;r=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var Ai=Kt.prototype;Ai.toAssignable=function(e,r,t){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",t&&this.checkPatternErrors(t,!0);for(var n=0,i=e.properties;n=8&&!l&&f.name==="async"&&!this.canInsertSemicolon()&&this.eat(X._function))return this.overrideContext(Nt.f_expr),this.parseFunction(this.startNodeAt(a,s),0,!1,!0,r);if(i&&!this.canInsertSemicolon()){if(this.eat(X.arrow))return this.parseArrowExpression(this.startNodeAt(a,s),[f],!1,r);if(this.options.ecmaVersion>=8&&f.name==="async"&&this.type===X.name&&!l&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return f=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(X.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,s),[f],!0,r)}return f;case X.regexp:var o=this.value;return n=this.parseLiteral(o.value),n.regex={pattern:o.pattern,flags:o.flags},n;case X.num:case X.string:return this.parseLiteral(this.value);case X._null:case X._true:case X._false:return n=this.startNode(),n.value=this.type===X._null?null:this.type===X._true,n.raw=this.type.keyword,this.next(),this.finishNode(n,"Literal");case X.parenL:var u=this.start,p=this.parseParenAndDistinguishExpression(i,r);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(p)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),p;case X.bracketL:return n=this.startNode(),this.next(),n.elements=this.parseExprList(X.bracketR,!0,!0,e),this.finishNode(n,"ArrayExpression");case X.braceL:return this.overrideContext(Nt.b_expr),this.parseObj(!1,e);case X._function:return n=this.startNode(),this.next(),this.parseFunction(n,0);case X._class:return this.parseClass(this.startNode(),!1);case X._new:return this.parseNew();case X.backQuote:return this.parseTemplate();case X._import:return this.options.ecmaVersion>=11?this.parseExprImport(t):this.unexpected();default:return this.parseExprAtomDefault()}};Mr.parseExprAtomDefault=function(){this.unexpected()};Mr.parseExprImport=function(e){var r=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===X.parenL&&!e)return this.parseDynamicImport(r);if(this.type===X.dot){var t=this.startNodeAt(r.start,r.loc&&r.loc.start);return t.name="import",r.meta=this.finishNode(t,"Identifier"),this.parseImportMeta(r)}else this.unexpected()};Mr.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(X.parenR)){var r=this.start;this.eat(X.comma)&&this.eat(X.parenR)?this.raiseRecoverable(r,"Trailing comma is not allowed in import()"):this.unexpected(r)}return this.finishNode(e,"ImportExpression")};Mr.parseImportMeta=function(e){this.next();var r=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),r&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};Mr.parseLiteral=function(e){var r=this.startNode();return r.value=e,r.raw=this.input.slice(this.start,this.end),r.raw.charCodeAt(r.raw.length-1)===110&&(r.bigint=r.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(r,"Literal")};Mr.parseParenExpression=function(){this.expect(X.parenL);var e=this.parseExpression();return this.expect(X.parenR),e};Mr.shouldParseArrow=function(e){return!this.canInsertSemicolon()};Mr.parseParenAndDistinguishExpression=function(e,r){var t=this.start,n=this.startLoc,i,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var s=this.start,l=this.startLoc,f=[],o=!0,u=!1,p=new jp,h=this.yieldPos,d=this.awaitPos,x;for(this.yieldPos=0,this.awaitPos=0;this.type!==X.parenR;)if(o?o=!1:this.expect(X.comma),a&&this.afterTrailingComma(X.parenR,!0)){u=!0;break}else if(this.type===X.ellipsis){x=this.start,f.push(this.parseParenItem(this.parseRestBinding())),this.type===X.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else f.push(this.parseMaybeAssign(!1,p,this.parseParenItem));var v=this.lastTokEnd,y=this.lastTokEndLoc;if(this.expect(X.parenR),e&&this.shouldParseArrow(f)&&this.eat(X.arrow))return this.checkPatternErrors(p,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=h,this.awaitPos=d,this.parseParenArrowList(t,n,f,r);(!f.length||u)&&this.unexpected(this.lastTokStart),x&&this.unexpected(x),this.checkExpressionErrors(p,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=d||this.awaitPos,f.length>1?(i=this.startNodeAt(s,l),i.expressions=f,this.finishNodeAt(i,"SequenceExpression",v,y)):i=f[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var w=this.startNodeAt(t,n);return w.expression=i,this.finishNode(w,"ParenthesizedExpression")}else return i};Mr.parseParenItem=function(e){return e};Mr.parseParenArrowList=function(e,r,t,n){return this.parseArrowExpression(this.startNodeAt(e,r),t,!1,n)};var oY=[];Mr.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===X.dot){var r=this.startNodeAt(e.start,e.loc&&e.loc.start);r.name="new",e.meta=this.finishNode(r,"Identifier"),this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),t&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var n=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),n,i,!0,!1),this.eat(X.parenL)?e.arguments=this.parseExprList(X.parenR,this.options.ecmaVersion>=8,!1):e.arguments=oY,this.finishNode(e,"NewExpression")};Mr.parseTemplateElement=function(e){var r=e.isTagged,t=this.startNode();return this.type===X.invalidTemplate?(r||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),t.value={raw:this.value,cooked:null}):t.value={raw:this.input.slice(this.start,this.end).replace(/\\r\\n?/g,\` +\`),cooked:this.value},this.next(),t.tail=this.type===X.backQuote,this.finishNode(t,"TemplateElement")};Mr.parseTemplate=function(e){e===void 0&&(e={});var r=e.isTagged;r===void 0&&(r=!1);var t=this.startNode();this.next(),t.expressions=[];var n=this.parseTemplateElement({isTagged:r});for(t.quasis=[n];!n.tail;)this.type===X.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(X.dollarBraceL),t.expressions.push(this.parseExpression()),this.expect(X.braceR),t.quasis.push(n=this.parseTemplateElement({isTagged:r}));return this.next(),this.finishNode(t,"TemplateLiteral")};Mr.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===X.name||this.type===X.num||this.type===X.string||this.type===X.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===X.star)&&!Ni.test(this.input.slice(this.lastTokEnd,this.start))};Mr.parseObj=function(e,r){var t=this.startNode(),n=!0,i={};for(t.properties=[],this.next();!this.eat(X.braceR);){if(n)n=!1;else if(this.expect(X.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(X.braceR))break;var a=this.parseProperty(e,r);e||this.checkPropClash(a,i,r),t.properties.push(a)}return this.finishNode(t,e?"ObjectPattern":"ObjectExpression")};Mr.parseProperty=function(e,r){var t=this.startNode(),n,i,a,s;if(this.options.ecmaVersion>=9&&this.eat(X.ellipsis))return e?(t.argument=this.parseIdent(!1),this.type===X.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(t,"RestElement")):(t.argument=this.parseMaybeAssign(!1,r),this.type===X.comma&&r&&r.trailingComma<0&&(r.trailingComma=this.start),this.finishNode(t,"SpreadElement"));this.options.ecmaVersion>=6&&(t.method=!1,t.shorthand=!1,(e||r)&&(a=this.start,s=this.startLoc),e||(n=this.eat(X.star)));var l=this.containsEsc;return this.parsePropertyName(t),!e&&!l&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(t)?(i=!0,n=this.options.ecmaVersion>=9&&this.eat(X.star),this.parsePropertyName(t)):i=!1,this.parsePropertyValue(t,e,n,i,a,s,r,l),this.finishNode(t,"Property")};Mr.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var r=e.kind==="get"?0:1;if(e.value.params.length!==r){var t=e.value.start;e.kind==="get"?this.raiseRecoverable(t,"getter should have no params"):this.raiseRecoverable(t,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};Mr.parsePropertyValue=function(e,r,t,n,i,a,s,l){(t||n)&&this.type===X.colon&&this.unexpected(),this.eat(X.colon)?(e.value=r?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,s),e.kind="init"):this.options.ecmaVersion>=6&&this.type===X.parenL?(r&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(t,n)):!r&&!l&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==X.comma&&this.type!==X.braceR&&this.type!==X.eq?((t||n)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((t||n)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=i),e.kind="init",r?e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key)):this.type===X.eq&&s?(s.shorthandAssign<0&&(s.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected()};Mr.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(X.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(X.bracketR),e.key;e.computed=!1}return e.key=this.type===X.num||this.type===X.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};Mr.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};Mr.parseMethod=function(e,r,t){var n=this.startNode(),i=this.yieldPos,a=this.awaitPos,s=this.awaitIdentPos;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!r),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Yg(r,n.generator)|Wg|(t?gB:0)),this.expect(X.parenL),n.params=this.parseBindingList(X.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1,!0,!1),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=s,this.finishNode(n,"FunctionExpression")};Mr.parseArrowExpression=function(e,r,t,n){var i=this.yieldPos,a=this.awaitPos,s=this.awaitIdentPos;return this.enterScope(Yg(t,!1)|dB),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(r,!0),this.parseFunctionBody(e,!0,!1,n),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=s,this.finishNode(e,"ArrowFunctionExpression")};Mr.parseFunctionBody=function(e,r,t,n){var i=r&&this.type!==X.braceL,a=this.strict,s=!1;if(i)e.body=this.parseMaybeAssign(n),e.expression=!0,this.checkParams(e,!1);else{var l=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!a||l)&&(s=this.strictDirective(this.end),s&&l&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var f=this.labels;this.labels=[],s&&(this.strict=!0),this.checkParams(e,!a&&!s&&!r&&!t&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,bB),e.body=this.parseBlock(!1,void 0,s&&!a),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=f}this.exitScope()};Mr.isSimpleParamList=function(e){for(var r=0,t=e;r-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&Bf&&delete this.undefinedExports[e]}else if(r===yB){var a=this.currentScope();a.lexical.push(e)}else if(r===xB){var s=this.currentScope();this.treatFunctionsAsVar?n=s.lexical.indexOf(e)>-1:n=s.lexical.indexOf(e)>-1||s.var.indexOf(e)>-1,s.functions.push(e)}else for(var l=this.scopeStack.length-1;l>=0;--l){var f=this.scopeStack[l];if(f.lexical.indexOf(e)>-1&&!(f.flags&vB&&f.lexical[0]===e)||!this.treatFunctionsAsVarInScope(f)&&f.functions.indexOf(e)>-1){n=!0;break}if(f.var.push(e),this.inModule&&f.flags&Bf&&delete this.undefinedExports[e],f.flags&Vg)break}n&&this.raiseRecoverable(t,"Identifier '"+e+"' has already been declared")};Co.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};Co.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};Co.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var r=this.scopeStack[e];if(r.flags&Vg)return r}};Co.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var r=this.scopeStack[e];if(r.flags&Vg&&!(r.flags&dB))return r}};var em=function(r,t,n){this.type="",this.start=t,this.end=0,r.options.locations&&(this.loc=new Kp(r,n)),r.options.directSourceFile&&(this.sourceFile=r.options.directSourceFile),r.options.ranges&&(this.range=[t,0])},kf=Kt.prototype;kf.startNode=function(){return new em(this,this.start,this.startLoc)};kf.startNodeAt=function(e,r){return new em(this,e,r)};function SB(e,r,t,n){return e.type=r,e.end=t,this.options.locations&&(e.loc.end=n),this.options.ranges&&(e.range[1]=t),e}kf.finishNode=function(e,r){return SB.call(this,e,r,this.lastTokEnd,this.lastTokEndLoc)};kf.finishNodeAt=function(e,r,t,n){return SB.call(this,e,r,t,n)};kf.copyNode=function(e){var r=new em(this,e.start,this.startLoc);for(var t in e)r[t]=e[t];return r};var NB="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",AB=NB+" Extended_Pictographic",EB=AB,CB=EB+" EBase EComp EMod EPres ExtPict",MB=CB,uY=MB,fY={9:NB,10:AB,11:EB,12:CB,13:MB,14:uY},lY="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",cY={9:"",10:"",11:"",12:"",13:"",14:lY},oB="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",_B="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",TB=_B+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",FB=TB+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",OB=FB+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",BB=OB+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",pY=BB+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz",mY={9:_B,10:TB,11:FB,12:OB,13:BB,14:pY},IB={};function hY(e){var r=IB[e]={binary:Ao(fY[e]+" "+oB),binaryOfStrings:Ao(cY[e]),nonBinary:{General_Category:Ao(oB),Script:Ao(mY[e])}};r.nonBinary.Script_Extensions=r.nonBinary.Script,r.nonBinary.gc=r.nonBinary.General_Category,r.nonBinary.sc=r.nonBinary.Script,r.nonBinary.scx=r.nonBinary.Script_Extensions}for(Zp=0,kg=[9,10,11,12,13,14];Zp=6?"uy":"")+(r.options.ecmaVersion>=9?"s":"")+(r.options.ecmaVersion>=13?"d":"")+(r.options.ecmaVersion>=15?"v":""),this.unicodeProperties=IB[r.options.ecmaVersion>=14?14:r.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};va.prototype.reset=function(r,t,n){var i=n.indexOf("v")!==-1,a=n.indexOf("u")!==-1;this.start=r|0,this.source=t+"",this.flags=n,i&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=a&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=a&&this.parser.options.ecmaVersion>=9)};va.prototype.raise=function(r){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+r)};va.prototype.at=function(r,t){t===void 0&&(t=!1);var n=this.source,i=n.length;if(r>=i)return-1;var a=n.charCodeAt(r);if(!(t||this.switchU)||a<=55295||a>=57344||r+1>=i)return a;var s=n.charCodeAt(r+1);return s>=56320&&s<=57343?(a<<10)+s-56613888:a};va.prototype.nextIndex=function(r,t){t===void 0&&(t=!1);var n=this.source,i=n.length;if(r>=i)return i;var a=n.charCodeAt(r),s;return!(t||this.switchU)||a<=55295||a>=57344||r+1>=i||(s=n.charCodeAt(r+1))<56320||s>57343?r+1:r+2};va.prototype.current=function(r){return r===void 0&&(r=!1),this.at(this.pos,r)};va.prototype.lookahead=function(r){return r===void 0&&(r=!1),this.at(this.nextIndex(this.pos,r),r)};va.prototype.advance=function(r){r===void 0&&(r=!1),this.pos=this.nextIndex(this.pos,r)};va.prototype.eat=function(r,t){return t===void 0&&(t=!1),this.current(t)===r?(this.advance(t),!0):!1};va.prototype.eatChars=function(r,t){t===void 0&&(t=!1);for(var n=this.pos,i=0,a=r;i-1&&this.raise(e.start,"Duplicate regular expression flag"),s==="u"&&(n=!0),s==="v"&&(i=!0)}this.options.ecmaVersion>=15&&n&&i&&this.raise(e.start,"Invalid regular expression flag")};ur.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))};ur.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var r=0,t=e.backReferenceNames;r=9&&(t=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!t,!0}return e.pos=r,!1};ur.regexp_eatQuantifier=function(e,r){return r===void 0&&(r=!1),this.regexp_eatQuantifierPrefix(e,r)?(e.eat(63),!0):!1};ur.regexp_eatQuantifierPrefix=function(e,r){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,r)};ur.regexp_eatBracedQuantifier=function(e,r){var t=e.pos;if(e.eat(123)){var n=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(n=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return i!==-1&&i=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};ur.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};ur.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};ur.regexp_eatSyntaxCharacter=function(e){var r=e.current();return PB(r)?(e.lastIntValue=r,e.advance(),!0):!1};function PB(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}ur.regexp_eatPatternCharacters=function(e){for(var r=e.pos,t=0;(t=e.current())!==-1&&!PB(t);)e.advance();return e.pos!==r};ur.regexp_eatExtendedPatternCharacter=function(e){var r=e.current();return r!==-1&&r!==36&&!(r>=40&&r<=43)&&r!==46&&r!==63&&r!==91&&r!==94&&r!==124?(e.advance(),!0):!1};ur.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e)){e.groupNames.indexOf(e.lastStringValue)!==-1&&e.raise("Duplicate capture group name"),e.groupNames.push(e.lastStringValue);return}e.raise("Invalid group")}};ur.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};ur.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=Eo(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=Eo(e.lastIntValue);return!0}return!1};ur.regexp_eatRegExpIdentifierStart=function(e){var r=e.pos,t=this.options.ecmaVersion>=11,n=e.current(t);return e.advance(t),n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,t)&&(n=e.lastIntValue),dY(n)?(e.lastIntValue=n,!0):(e.pos=r,!1)};function dY(e){return za(e,!0)||e===36||e===95}ur.regexp_eatRegExpIdentifierPart=function(e){var r=e.pos,t=this.options.ecmaVersion>=11,n=e.current(t);return e.advance(t),n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,t)&&(n=e.lastIntValue),vY(n)?(e.lastIntValue=n,!0):(e.pos=r,!1)};function vY(e){return xu(e,!0)||e===36||e===95||e===8204||e===8205}ur.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};ur.regexp_eatBackReference=function(e){var r=e.pos;if(this.regexp_eatDecimalEscape(e)){var t=e.lastIntValue;if(e.switchU)return t>e.maxBackReference&&(e.maxBackReference=t),!0;if(t<=e.numCapturingParens)return!0;e.pos=r}return!1};ur.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};ur.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};ur.regexp_eatCControlLetter=function(e){var r=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=r}return!1};ur.regexp_eatZero=function(e){return e.current()===48&&!rm(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};ur.regexp_eatControlEscape=function(e){var r=e.current();return r===116?(e.lastIntValue=9,e.advance(),!0):r===110?(e.lastIntValue=10,e.advance(),!0):r===118?(e.lastIntValue=11,e.advance(),!0):r===102?(e.lastIntValue=12,e.advance(),!0):r===114?(e.lastIntValue=13,e.advance(),!0):!1};ur.regexp_eatControlLetter=function(e){var r=e.current();return kB(r)?(e.lastIntValue=r%32,e.advance(),!0):!1};function kB(e){return e>=65&&e<=90||e>=97&&e<=122}ur.regexp_eatRegExpUnicodeEscapeSequence=function(e,r){r===void 0&&(r=!1);var t=e.pos,n=r||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(n&&i>=55296&&i<=56319){var a=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var s=e.lastIntValue;if(s>=56320&&s<=57343)return e.lastIntValue=(i-55296)*1024+(s-56320)+65536,!0}e.pos=a,e.lastIntValue=i}return!0}if(n&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&gY(e.lastIntValue))return!0;n&&e.raise("Invalid unicode escape"),e.pos=t}return!1};function gY(e){return e>=0&&e<=1114111}ur.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var r=e.current();return r!==99&&(!e.switchN||r!==107)?(e.lastIntValue=r,e.advance(),!0):!1};ur.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var r=e.current();if(r>=49&&r<=57){do e.lastIntValue=10*e.lastIntValue+(r-48),e.advance();while((r=e.current())>=48&&r<=57);return!0}return!1};var RB=0,Wa=1,Si=2;ur.regexp_eatCharacterClassEscape=function(e){var r=e.current();if(xY(r))return e.lastIntValue=-1,e.advance(),Wa;var t=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((t=r===80)||r===112)){e.lastIntValue=-1,e.advance();var n;if(e.eat(123)&&(n=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return t&&n===Si&&e.raise("Invalid property name"),n;e.raise("Invalid property name")}return RB};function xY(e){return e===100||e===68||e===115||e===83||e===119||e===87}ur.regexp_eatUnicodePropertyValueExpression=function(e){var r=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var t=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var n=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,t,n),Wa}}if(e.pos=r,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return RB};ur.regexp_validateUnicodePropertyNameAndValue=function(e,r,t){If(e.unicodeProperties.nonBinary,r)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[r].test(t)||e.raise("Invalid property value")};ur.regexp_validateUnicodePropertyNameOrValue=function(e,r){if(e.unicodeProperties.binary.test(r))return Wa;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(r))return Si;e.raise("Invalid property name")};ur.regexp_eatUnicodePropertyName=function(e){var r=0;for(e.lastStringValue="";LB(r=e.current());)e.lastStringValue+=Eo(r),e.advance();return e.lastStringValue!==""};function LB(e){return kB(e)||e===95}ur.regexp_eatUnicodePropertyValue=function(e){var r=0;for(e.lastStringValue="";yY(r=e.current());)e.lastStringValue+=Eo(r),e.advance();return e.lastStringValue!==""};function yY(e){return LB(e)||rm(e)}ur.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};ur.regexp_eatCharacterClass=function(e){if(e.eat(91)){var r=e.eat(94),t=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),r&&t===Si&&e.raise("Negated character class may contain strings"),!0}return!1};ur.regexp_classContents=function(e){return e.current()===93?Wa:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),Wa)};ur.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var r=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var t=e.lastIntValue;e.switchU&&(r===-1||t===-1)&&e.raise("Invalid character class"),r!==-1&&t!==-1&&r>t&&e.raise("Range out of order in character class")}}};ur.regexp_eatClassAtom=function(e){var r=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var t=e.current();(t===99||zB(t))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=r}var n=e.current();return n!==93?(e.lastIntValue=n,e.advance(),!0):!1};ur.regexp_eatClassEscape=function(e){var r=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=r}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};ur.regexp_classSetExpression=function(e){var r=Wa,t;if(!this.regexp_eatClassSetRange(e))if(t=this.regexp_eatClassSetOperand(e)){t===Si&&(r=Si);for(var n=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(t=this.regexp_eatClassSetOperand(e))){t!==Si&&(r=Wa);continue}e.raise("Invalid character in character class")}if(n!==e.pos)return r;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(n!==e.pos)return r}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(t=this.regexp_eatClassSetOperand(e),!t)return r;t===Si&&(r=Si)}};ur.regexp_eatClassSetRange=function(e){var r=e.pos;if(this.regexp_eatClassSetCharacter(e)){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;return t!==-1&&n!==-1&&t>n&&e.raise("Range out of order in character class"),!0}e.pos=r}return!1};ur.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?Wa:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};ur.regexp_eatNestedClass=function(e){var r=e.pos;if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);if(e.eat(93))return t&&n===Si&&e.raise("Negated character class may contain strings"),n;e.pos=r}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=r}return null};ur.regexp_eatClassStringDisjunction=function(e){var r=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var t=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return t}else e.raise("Invalid escape");e.pos=r}return null};ur.regexp_classStringDisjunctionContents=function(e){for(var r=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===Si&&(r=Si);return r};ur.regexp_classString=function(e){for(var r=0;this.regexp_eatClassSetCharacter(e);)r++;return r===1?Wa:Si};ur.regexp_eatClassSetCharacter=function(e){var r=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=r,!1);var t=e.current();return t<0||t===e.lookahead()&&bY(t)||wY(t)?!1:(e.advance(),e.lastIntValue=t,!0)};function bY(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function wY(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}ur.regexp_eatClassSetReservedPunctuator=function(e){var r=e.current();return DY(r)?(e.lastIntValue=r,e.advance(),!0):!1};function DY(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}ur.regexp_eatClassControlLetter=function(e){var r=e.current();return rm(r)||r===95?(e.lastIntValue=r%32,e.advance(),!0):!1};ur.regexp_eatHexEscapeSequence=function(e){var r=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=r}return!1};ur.regexp_eatDecimalDigits=function(e){var r=e.pos,t=0;for(e.lastIntValue=0;rm(t=e.current());)e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();return e.pos!==r};function rm(e){return e>=48&&e<=57}ur.regexp_eatHexDigits=function(e){var r=e.pos,t=0;for(e.lastIntValue=0;qB(t=e.current());)e.lastIntValue=16*e.lastIntValue+UB(t),e.advance();return e.pos!==r};function qB(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function UB(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}ur.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var r=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;r<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=r*64+t*8+e.lastIntValue:e.lastIntValue=r*8+t}else e.lastIntValue=r;return!0}return!1};ur.regexp_eatOctalDigit=function(e){var r=e.current();return zB(r)?(e.lastIntValue=r-48,e.advance(),!0):(e.lastIntValue=0,!1)};function zB(e){return e>=48&&e<=55}ur.regexp_eatFixedHexDigits=function(e,r){var t=e.pos;e.lastIntValue=0;for(var n=0;n=this.input.length)return this.finishToken(X.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};Yr.readToken=function(e){return za(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};Yr.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var r=this.input.charCodeAt(this.pos+1);return r<=56319||r>=57344?e:(e<<10)+r-56613888};Yr.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),r=this.pos,t=this.input.indexOf("*/",this.pos+=2);if(t===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=t+2,this.options.locations)for(var n=void 0,i=r;(n=lB(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=n;this.options.onComment&&this.options.onComment(!0,this.input.slice(r+2,t),r,this.pos,e,this.curPosition())};Yr.skipLineComment=function(e){for(var r=this.pos,t=this.options.onComment&&this.curPosition(),n=this.input.charCodeAt(this.pos+=e);this.pos8&&e<14||e>=5760&&cB.test(String.fromCharCode(e)))++this.pos;else break e}}};Yr.finishToken=function(e,r){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var t=this.type;this.type=e,this.value=r,this.updateContext(t)};Yr.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var r=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&r===46?(this.pos+=3,this.finishToken(X.ellipsis)):(++this.pos,this.finishToken(X.dot))};Yr.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(X.assign,2):this.finishOp(X.slash,1)};Yr.readToken_mult_modulo_exp=function(e){var r=this.input.charCodeAt(this.pos+1),t=1,n=e===42?X.star:X.modulo;return this.options.ecmaVersion>=7&&e===42&&r===42&&(++t,n=X.starstar,r=this.input.charCodeAt(this.pos+2)),r===61?this.finishOp(X.assign,t+1):this.finishOp(n,t)};Yr.readToken_pipe_amp=function(e){var r=this.input.charCodeAt(this.pos+1);if(r===e){if(this.options.ecmaVersion>=12){var t=this.input.charCodeAt(this.pos+2);if(t===61)return this.finishOp(X.assign,3)}return this.finishOp(e===124?X.logicalOR:X.logicalAND,2)}return r===61?this.finishOp(X.assign,2):this.finishOp(e===124?X.bitwiseOR:X.bitwiseAND,1)};Yr.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(X.assign,2):this.finishOp(X.bitwiseXOR,1)};Yr.readToken_plus_min=function(e){var r=this.input.charCodeAt(this.pos+1);return r===e?r===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||Ni.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(X.incDec,2):r===61?this.finishOp(X.assign,2):this.finishOp(X.plusMin,1)};Yr.readToken_lt_gt=function(e){var r=this.input.charCodeAt(this.pos+1),t=1;return r===e?(t=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+t)===61?this.finishOp(X.assign,t+1):this.finishOp(X.bitShift,t)):r===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(r===61&&(t=2),this.finishOp(X.relational,t))};Yr.readToken_eq_excl=function(e){var r=this.input.charCodeAt(this.pos+1);return r===61?this.finishOp(X.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&r===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(X.arrow)):this.finishOp(e===61?X.eq:X.prefix,1)};Yr.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var r=this.input.charCodeAt(this.pos+1);if(r===46){var t=this.input.charCodeAt(this.pos+2);if(t<48||t>57)return this.finishOp(X.questionDot,2)}if(r===63){if(e>=12){var n=this.input.charCodeAt(this.pos+2);if(n===61)return this.finishOp(X.assign,3)}return this.finishOp(X.coalesce,2)}}return this.finishOp(X.question,1)};Yr.readToken_numberSign=function(){var e=this.options.ecmaVersion,r=35;if(e>=13&&(++this.pos,r=this.fullCharCodeAtPos(),za(r,!0)||r===92))return this.finishToken(X.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+Eo(r)+"'")};Yr.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(X.parenL);case 41:return++this.pos,this.finishToken(X.parenR);case 59:return++this.pos,this.finishToken(X.semi);case 44:return++this.pos,this.finishToken(X.comma);case 91:return++this.pos,this.finishToken(X.bracketL);case 93:return++this.pos,this.finishToken(X.bracketR);case 123:return++this.pos,this.finishToken(X.braceL);case 125:return++this.pos,this.finishToken(X.braceR);case 58:return++this.pos,this.finishToken(X.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(X.backQuote);case 48:var r=this.input.charCodeAt(this.pos+1);if(r===120||r===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(r===111||r===79)return this.readRadixNumber(8);if(r===98||r===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(X.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Eo(e)+"'")};Yr.finishOp=function(e,r){var t=this.input.slice(this.pos,this.pos+r);return this.pos+=r,this.finishToken(e,t)};Yr.readRegexp=function(){for(var e,r,t=this.pos;;){this.pos>=this.input.length&&this.raise(t,"Unterminated regular expression");var n=this.input.charAt(this.pos);if(Ni.test(n)&&this.raise(t,"Unterminated regular expression"),e)e=!1;else{if(n==="[")r=!0;else if(n==="]"&&r)r=!1;else if(n==="/"&&!r)break;e=n==="\\\\"}++this.pos}var i=this.input.slice(t,this.pos);++this.pos;var a=this.pos,s=this.readWord1();this.containsEsc&&this.unexpected(a);var l=this.regexpState||(this.regexpState=new va(this));l.reset(t,i,s),this.validateRegExpFlags(l),this.validateRegExpPattern(l);var f=null;try{f=new RegExp(i,s)}catch{}return this.finishToken(X.regexp,{pattern:i,flags:s,value:f})};Yr.readInt=function(e,r,t){for(var n=this.options.ecmaVersion>=12&&r===void 0,i=t&&this.input.charCodeAt(this.pos)===48,a=this.pos,s=0,l=0,f=0,o=r??1/0;f=97?p=u-97+10:u>=65?p=u-65+10:u>=48&&u<=57?p=u-48:p=1/0,p>=e)break;l=u,s=s*e+p}return n&&l===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===a||r!=null&&this.pos-a!==r?null:s};function SY(e,r){return r?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function WB(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}Yr.readRadixNumber=function(e){var r=this.pos;this.pos+=2;var t=this.readInt(e);return t==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(t=WB(this.input.slice(r,this.pos)),++this.pos):za(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(X.num,t)};Yr.readNumber=function(e){var r=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(r,"Invalid number");var t=this.pos-r>=2&&this.input.charCodeAt(r)===48;t&&this.strict&&this.raise(r,"Invalid number");var n=this.input.charCodeAt(this.pos);if(!t&&!e&&this.options.ecmaVersion>=11&&n===110){var i=WB(this.input.slice(r,this.pos));return++this.pos,za(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(X.num,i)}t&&/[89]/.test(this.input.slice(r,this.pos))&&(t=!1),n===46&&!t&&(++this.pos,this.readInt(10),n=this.input.charCodeAt(this.pos)),(n===69||n===101)&&!t&&(n=this.input.charCodeAt(++this.pos),(n===43||n===45)&&++this.pos,this.readInt(10)===null&&this.raise(r,"Invalid number")),za(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var a=SY(this.input.slice(r,this.pos),t);return this.finishToken(X.num,a)};Yr.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),r;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;r=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,r>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else r=this.readHexChar(4);return r};Yr.readString=function(e){for(var r="",t=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var n=this.input.charCodeAt(this.pos);if(n===e)break;n===92?(r+=this.input.slice(t,this.pos),r+=this.readEscapedChar(!1),t=this.pos):n===8232||n===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(yu(n)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return r+=this.input.slice(t,this.pos++),this.finishToken(X.string,r)};var VB={};Yr.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===VB)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};Yr.invalidStringToken=function(e,r){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw VB;this.raise(e,r)};Yr.readTmplToken=function(){for(var e="",r=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var t=this.input.charCodeAt(this.pos);if(t===96||t===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===X.template||this.type===X.invalidTemplate)?t===36?(this.pos+=2,this.finishToken(X.dollarBraceL)):(++this.pos,this.finishToken(X.backQuote)):(e+=this.input.slice(r,this.pos),this.finishToken(X.template,e));if(t===92)e+=this.input.slice(r,this.pos),e+=this.readEscapedChar(!0),r=this.pos;else if(yu(t)){switch(e+=this.input.slice(r,this.pos),++this.pos,t){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=\` \`;break;default:e+=String.fromCharCode(t);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),r=this.pos}else++this.pos}};Yr.readInvalidTemplateToken=function(){for(;this.pos=48&&r<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(n,8);return i>255&&(n=n.slice(0,-1),i=parseInt(n,8)),this.pos+=n.length-1,r=this.input.charCodeAt(this.pos),(n!=="0"||r===56||r===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-n.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}return xu(r)?"":String.fromCharCode(r)}};Yr.readHexChar=function(e){var r=this.pos,t=this.readInt(16,e);return t===null&&this.invalidStringToken(r,"Bad character escape sequence"),t};Yr.readWord1=function(){this.containsEsc=!1;for(var e="",r=!0,t=this.pos,n=this.options.ecmaVersion>=6;this.pos{let r=/^["'](?:[^"\\\\]|\\\\.)*["'](?:;)?$/.test(e),t=e?.replace(/;+$/,""),n=!isNaN(parseFloat(t))&&!isNaN(t);return r||n||t=="false"||t=="true"||e==null||e==""};var $g=(e,r)=>{let t=r?\`($event, $value, $state, $saveState, $api) => { \${e} }\`:e,n=typeof t=="string"||t instanceof String?t.includes(\` -\`):!1,i;try{i=n&&!r&&!t.startsWith("(")?new Function(\`with(this) { \${t} }\`):new Function(\`with(this) { return \${t}; }\`)}catch(a){console.log(a,e)}return i},Zg=e=>{let r={...e,execActions:{},execProps:{},execStyles:{},execPropsOptions:{}},{sortedKeys:t,dependencies:n}=HB(r.node.props,\`\${r.id}.props\`),{sortedKeys:i,dependencies:a}=HB(r.node.styles,\`\${r.id}.styles\`);r.execPropsOptions.props=t.map(l=>({name:l,isConst:YB(r.node.props[l]),deps:n.get(l)||[]})),r.execProps=rm(r.node.props,l=>$g(l,!1)),r.execStyles=rm(r.node.styles,l=>$g(l,!1)),r.execActions=rm(r.node.actions,l=>$g(l,!0)),r.children=r.children.map(l=>Zg(l)),r.execPropsOptions.children=[...r.children.flatMap(l=>l.execPropsOptions.children),...r.children.map(l=>l.id)];let s=[...r.children.flatMap(l=>l.execPropsOptions.deps),...r.execPropsOptions.props.flatMap(l=>l.deps),...[...a.values()].flat()];return r.execPropsOptions.deps=s.filter(l=>l[0]!=r.id),r.node.type=="list"&&(r.execPropsOptions.template=r.children),r};function AY(e){let r=[];function t(i,a=[]){if(i.type==="Identifier")return a.push(i.name),a;if(i.type==="MemberExpression"){let s=t(i.object,a);if(s&&i.computed)return i.property.type==="Literal"?(s.push(String(i.property.value)),s):null;if(s)return t(i.property,s)}else if(i.type==="Literal")return a.push(String(i.value)),a;return null}function n(i){if(i.type==="MemberExpression"){let a=t(i);a&&r.push(a);return}for(let a in i)typeof i[a]=="object"&&i[a]!==null&&n(i[a])}try{let i=em(e.replace("return ",""),{ecmaVersion:2020});n(i)}catch{return[]}return r}function HB(e,r){let t=new Map,n=new Map,i=new Map;for(let o in e){let u=e[o],p=AY(u),h=p.filter(d=>d.slice(0,-1).join(".")===r);n.set(o,h),i.set(o,p),t.has(o)||t.set(o,new Set);for(let d of h){let x=d[d.length-1];x!==o&&t.get(o).add(x)}}let a=new Set,s=[],l=new Set,f=o=>{if(l.has(o))throw new Error("Circular dependency detected");if(!a.has(o)){l.add(o);let u=t.get(o)||new Set;for(let p of u)f(p);a.add(o),l.delete(o),s.push(o)}};for(let o in e)a.has(o)||f(o);return{sortedKeys:s,dependencies:i}}function GB(e,r,t,n,i){var a=[];t||(t=Qe),function s(l,f,o){var u=o||l.type,p=l!==a[a.length-1];p&&a.push(l),t[u](l,f,s),r[u]&&r[u](l,f||a,a),p&&a.pop()}(e,n,i)}function Qg(e,r,t){t(e,r)}function us(e,r,t){}var Qe={};Qe.Program=Qe.BlockStatement=Qe.StaticBlock=function(e,r,t){for(var n=0,i=e.body;n":9,"<=":9,">=":9,in:9,instanceof:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"%":12,"/":12,"**":13},Zi=17,CY={ArrayExpression:20,TaggedTemplateExpression:20,ThisExpression:20,Identifier:20,PrivateIdentifier:20,Literal:18,TemplateLiteral:20,Super:20,SequenceExpression:20,MemberExpression:19,ChainExpression:19,CallExpression:19,NewExpression:19,ArrowFunctionExpression:Zi,ClassExpression:Zi,FunctionExpression:Zi,ObjectExpression:Zi,UpdateExpression:16,UnaryExpression:15,AwaitExpression:15,BinaryExpression:14,LogicalExpression:13,ConditionalExpression:4,AssignmentExpression:3,YieldExpression:2,RestElement:1};function wu(e,r){let{generator:t}=e;if(e.write("("),r!=null&&r.length>0){t[r[0].type](r[0],e);let{length:n}=r;for(let i=1;i=48&&r<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(n,8);return i>255&&(n=n.slice(0,-1),i=parseInt(n,8)),this.pos+=n.length-1,r=this.input.charCodeAt(this.pos),(n!=="0"||r===56||r===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-n.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}return yu(r)?"":String.fromCharCode(r)}};Yr.readHexChar=function(e){var r=this.pos,t=this.readInt(16,e);return t===null&&this.invalidStringToken(r,"Bad character escape sequence"),t};Yr.readWord1=function(){this.containsEsc=!1;for(var e="",r=!0,t=this.pos,n=this.options.ecmaVersion>=6;this.pos{let r=/^["'](?:[^"\\\\]|\\\\.)*["'](?:;)?$/.test(e),t=e?.replace(/;+$/,""),n=!isNaN(parseFloat(t))&&!isNaN(t);return r||n||t=="false"||t=="true"||e==null||e==""};var Zg=(e,r)=>{let t=r?\`($event, $value, $state, $saveState, $api) => { \${e} }\`:e,n=typeof t=="string"||t instanceof String?t.includes(\` +\`):!1,i;try{i=n&&!r&&!t.startsWith("(")?new Function(\`with(this) { \${t} }\`):new Function(\`with(this) { return \${t}; }\`)}catch(a){console.log(a,e)}return i},Qg=e=>{let r={...e,execActions:{},execProps:{},execStyles:{},execPropsOptions:{}},{sortedKeys:t,dependencies:n}=GB(r.node.props,\`\${r.id}.props\`),{sortedKeys:i,dependencies:a}=GB(r.node.styles,\`\${r.id}.styles\`);r.execPropsOptions.props=t.map(l=>({name:l,isConst:HB(r.node.props[l]),deps:n.get(l)||[]})),r.execProps=nm(r.node.props,l=>Zg(l,!1)),r.execStyles=nm(r.node.styles,l=>Zg(l,!1)),r.execActions=nm(r.node.actions,l=>Zg(l,!0)),r.children=r.children.map(l=>Qg(l)),r.execPropsOptions.children=[...r.children.flatMap(l=>l.execPropsOptions.children),...r.children.map(l=>l.id)];let s=[...r.children.flatMap(l=>l.execPropsOptions.deps),...r.execPropsOptions.props.flatMap(l=>l.deps),...[...a.values()].flat()];return r.execPropsOptions.deps=s.filter(l=>l[0]!=r.id),r.node.type=="list"&&(r.execPropsOptions.template=r.children),r};function EY(e){let r=[];function t(i,a=[]){if(i.type==="Identifier")return a.push(i.name),a;if(i.type==="MemberExpression"){let s=t(i.object,a);if(s&&i.computed)return i.property.type==="Literal"?(s.push(String(i.property.value)),s):null;if(s)return t(i.property,s)}else if(i.type==="Literal")return a.push(String(i.value)),a;return null}function n(i){if(i.type==="MemberExpression"){let a=t(i);a&&r.push(a);return}for(let a in i)typeof i[a]=="object"&&i[a]!==null&&n(i[a])}try{let i=tm(e.replace("return ",""),{ecmaVersion:2020});n(i)}catch{return[]}return r}function GB(e,r){let t=new Map,n=new Map,i=new Map;for(let o in e){let u=e[o],p=EY(u),h=p.filter(d=>d.slice(0,-1).join(".")===r);n.set(o,h),i.set(o,p),t.has(o)||t.set(o,new Set);for(let d of h){let x=d[d.length-1];x!==o&&t.get(o).add(x)}}let a=new Set,s=[],l=new Set,f=o=>{if(l.has(o))throw new Error("Circular dependency detected");if(!a.has(o)){l.add(o);let u=t.get(o)||new Set;for(let p of u)f(p);a.add(o),l.delete(o),s.push(o)}};for(let o in e)a.has(o)||f(o);return{sortedKeys:s,dependencies:i}}function $B(e,r,t,n,i){var a=[];t||(t=Qe),function s(l,f,o){var u=o||l.type,p=l!==a[a.length-1];p&&a.push(l),t[u](l,f,s),r[u]&&r[u](l,f||a,a),p&&a.pop()}(e,n,i)}function Xg(e,r,t){t(e,r)}function us(e,r,t){}var Qe={};Qe.Program=Qe.BlockStatement=Qe.StaticBlock=function(e,r,t){for(var n=0,i=e.body;n":9,"<=":9,">=":9,in:9,instanceof:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"%":12,"/":12,"**":13},Zi=17,MY={ArrayExpression:20,TaggedTemplateExpression:20,ThisExpression:20,Identifier:20,PrivateIdentifier:20,Literal:18,TemplateLiteral:20,Super:20,SequenceExpression:20,MemberExpression:19,ChainExpression:19,CallExpression:19,NewExpression:19,ArrowFunctionExpression:Zi,ClassExpression:Zi,FunctionExpression:Zi,ObjectExpression:Zi,UpdateExpression:16,UnaryExpression:15,AwaitExpression:15,BinaryExpression:14,LogicalExpression:13,ConditionalExpression:4,AssignmentExpression:3,YieldExpression:2,RestElement:1};function Du(e,r){let{generator:t}=e;if(e.write("("),r!=null&&r.length>0){t[r[0].type](r[0],e);let{length:n}=r;for(let i=1;i0){e.write(n);for(let s=1;s0){t.VariableDeclarator(n[0],e);for(let a=1;a0){r.write(n),i&&e.comments!=null&&An(r,e.comments,a,n);let{length:l}=s;for(let f=0;f0){for(;i0&&r.write(", ");let a=t[i],s=a.type[6];if(s==="D")r.write(a.local.name,a),i++;else if(s==="N")r.write("* as "+a.local.name,a),i++;else break}if(i0)for(let i=0;;){let a=t[i],{name:s}=a.local;if(r.write(s,a),s!==a.exported.name&&r.write(" as "+a.exported.name),++i "),e.body.type[0]==="O"?(r.write("("),this.ObjectExpression(e.body,r),r.write(")")):this[e.body.type](e.body,r)},ThisExpression(e,r){r.write("this",e)},Super(e,r){r.write("super",e)},RestElement:QB=function(e,r){r.write("..."),this[e.argument.type](e.argument,r)},SpreadElement:QB,YieldExpression(e,r){r.write(e.delegate?"yield*":"yield"),e.argument&&(r.write(" "),this[e.argument.type](e.argument,r))},AwaitExpression(e,r){r.write("await ",e),nm(r,e.argument,e)},TemplateLiteral(e,r){let{quasis:t,expressions:n}=e;r.write("\`");let{length:i}=n;for(let s=0;s0){let{elements:t}=e,{length:n}=t;for(let i=0;;){let a=t[i];if(a!=null&&this[a.type](a,r),++i0){r.write(n),i&&e.comments!=null&&An(r,e.comments,a,n);let s=","+n,{properties:l}=e,{length:f}=l;for(let o=0;;){let u=l[o];if(i&&u.comments!=null&&An(r,u.comments,a,n),r.write(a),this[u.type](u,r),++o0){let{properties:t}=e,{length:n}=t;for(let i=0;this[t[i].type](t[i],r),++i1||i[0]==="U"&&(i[1]==="n"||i[1]==="p")&&n.prefix&&n.operator[0]===t&&(t==="+"||t==="-"))&&r.write(" "),a?(r.write(t.length>1?" (":"("),this[i](n,r),r.write(")")):this[i](n,r)}else this[e.argument.type](e.argument,r),r.write(e.operator)},UpdateExpression(e,r){e.prefix?(r.write(e.operator),this[e.argument.type](e.argument,r)):(this[e.argument.type](e.argument,r),r.write(e.operator))},AssignmentExpression(e,r){this[e.left.type](e.left,r),r.write(" "+e.operator+" "),this[e.right.type](e.right,r)},AssignmentPattern(e,r){this[e.left.type](e.left,r),r.write(" = "),this[e.right.type](e.right,r)},BinaryExpression:XB=function(e,r){let t=e.operator==="in";t&&r.write("("),nm(r,e.left,e,!1),r.write(" "+e.operator+" "),nm(r,e.right,e,!0),t&&r.write(")")},LogicalExpression:XB,ConditionalExpression(e,r){let{test:t}=e,n=r.expressionsPrecedence[t.type];n===Zi||n<=r.expressionsPrecedence.ConditionalExpression?(r.write("("),this[t.type](t,r),r.write(")")):this[t.type](t,r),r.write(" ? "),this[e.consequent.type](e.consequent,r),r.write(" : "),this[e.alternate.type](e.alternate,r)},NewExpression(e,r){r.write("new ");let t=r.expressionsPrecedence[e.callee.type];t===Zi||t0){t.VariableDeclarator(n[0],e);for(let a=1;a0){r.write(n),i&&e.comments!=null&&An(r,e.comments,a,n);let{length:l}=s;for(let f=0;f0){for(;i0&&r.write(", ");let a=t[i],s=a.type[6];if(s==="D")r.write(a.local.name,a),i++;else if(s==="N")r.write("* as "+a.local.name,a),i++;else break}if(i0)for(let i=0;;){let a=t[i],{name:s}=a.local;if(r.write(s,a),s!==a.exported.name&&r.write(" as "+a.exported.name),++i "),e.body.type[0]==="O"?(r.write("("),this.ObjectExpression(e.body,r),r.write(")")):this[e.body.type](e.body,r)},ThisExpression(e,r){r.write("this",e)},Super(e,r){r.write("super",e)},RestElement:XB=function(e,r){r.write("..."),this[e.argument.type](e.argument,r)},SpreadElement:XB,YieldExpression(e,r){r.write(e.delegate?"yield*":"yield"),e.argument&&(r.write(" "),this[e.argument.type](e.argument,r))},AwaitExpression(e,r){r.write("await ",e),am(r,e.argument,e)},TemplateLiteral(e,r){let{quasis:t,expressions:n}=e;r.write("\`");let{length:i}=n;for(let s=0;s0){let{elements:t}=e,{length:n}=t;for(let i=0;;){let a=t[i];if(a!=null&&this[a.type](a,r),++i0){r.write(n),i&&e.comments!=null&&An(r,e.comments,a,n);let s=","+n,{properties:l}=e,{length:f}=l;for(let o=0;;){let u=l[o];if(i&&u.comments!=null&&An(r,u.comments,a,n),r.write(a),this[u.type](u,r),++o0){let{properties:t}=e,{length:n}=t;for(let i=0;this[t[i].type](t[i],r),++i1||i[0]==="U"&&(i[1]==="n"||i[1]==="p")&&n.prefix&&n.operator[0]===t&&(t==="+"||t==="-"))&&r.write(" "),a?(r.write(t.length>1?" (":"("),this[i](n,r),r.write(")")):this[i](n,r)}else this[e.argument.type](e.argument,r),r.write(e.operator)},UpdateExpression(e,r){e.prefix?(r.write(e.operator),this[e.argument.type](e.argument,r)):(this[e.argument.type](e.argument,r),r.write(e.operator))},AssignmentExpression(e,r){this[e.left.type](e.left,r),r.write(" "+e.operator+" "),this[e.right.type](e.right,r)},AssignmentPattern(e,r){this[e.left.type](e.left,r),r.write(" = "),this[e.right.type](e.right,r)},BinaryExpression:JB=function(e,r){let t=e.operator==="in";t&&r.write("("),am(r,e.left,e,!1),r.write(" "+e.operator+" "),am(r,e.right,e,!0),t&&r.write(")")},LogicalExpression:JB,ConditionalExpression(e,r){let{test:t}=e,n=r.expressionsPrecedence[t.type];n===Zi||n<=r.expressionsPrecedence.ConditionalExpression?(r.write("("),this[t.type](t,r),r.write(")")):this[t.type](t,r),r.write(" ? "),this[e.consequent.type](e.consequent,r),r.write(" : "),this[e.alternate.type](e.alternate,r)},NewExpression(e,r){r.write("new ");let t=r.expressionsPrecedence[e.callee.type];t===Zi||t0&&(this.lineEndSize>0&&(i.length===1?r[n-1]===i:r.endsWith(i))?(this.line+=this.lineEndSize,this.column=0):this.column+=n)}toString(){return this.output}};function eI(e,r){let t=new Jg(r);return t.generator[e.type](e,t),t.output}var Kg=(e,r,t)=>{let n,i=xx(e),a=i.includes(\` +\`?(l=0,f++):l++;this.column=l,this.line=f;return}}let{length:n}=r,{lineEnd:i}=this;n>0&&(this.lineEndSize>0&&(i.length===1?r[n-1]===i:r.endsWith(i))?(this.line+=this.lineEndSize,this.column=0):this.column+=n)}toString(){return this.output}};function rI(e,r){let t=new Kg(r);return t.generator[e.type](e,t),t.output}var jg=(e,r,t)=>{let n,i=yx(e),a=i.includes(\` \`),s=!1;if(a){let l=i.split(\` \`).filter(f=>f.trim()!=="");l[l.length-1].includes("return")&&(s=!0),l[l.length-1]=\`\${l[l.length-1].replace("return ","")}\`,i=l.join(\` -\`)}try{let l=em(i,{ecmaVersion:2020,locations:!0});GB(l,{Identifier(f,o){let u=o[o.length-2];(u.type!=="MemberExpression"||u.object===f)&&f.name==r&&(f.name=t)},Property(f){f.key.type==="Identifier"&&f.key.name===r&&(f.key.name=t)},ObjectExpression(f){f.properties.forEach(o=>{o.key.type==="Identifier"&&o.key.name===r&&(o.key.name=t)})}}),n=eI(l).trimEnd()}catch(l){console.log(l,e,name),n='"error"'}if(a&&s){let l=n.split(\` +\`)}try{let l=tm(i,{ecmaVersion:2020,locations:!0});$B(l,{Identifier(f,o){let u=o[o.length-2];(u.type!=="MemberExpression"||u.object===f)&&f.name==r&&(f.name=t)},Property(f){f.key.type==="Identifier"&&f.key.name===r&&(f.key.name=t)},ObjectExpression(f){f.properties.forEach(o=>{o.key.type==="Identifier"&&o.key.name===r&&(o.key.name=t)})}}),n=rI(l).trimEnd()}catch(l){console.log(l,e,name),n='"error"'}if(a&&s){let l=n.split(\` \`).filter(f=>f.trim()!=="");l[l.length-1]=\`return \${l[l.length-1]}\`,n=l.join(\` -\`)}return n};var rI=(e,r)=>{let t=(i,a,s)=>{let l,f=s.node;return s.children&&(l=s.children.map(o=>t(i,a,o))),{...s,children:l,node:{...s.node,parentId:f.parentId==i?a:f.parentId,props:Object.keys(f?.props??{}).reduce((o,u)=>({...o,[u]:Kg(f.props[u],i,a)}),f.props),actions:Object.keys(f?.actions??{}).reduce((o,u)=>({...o,[u]:Kg(f.actions[u],i,a)}),f.actions),styles:Object.keys(f?.styles??{}).reduce((o,u)=>({...o,[u]:Kg(f.styles[u],i,a)}),f.styles)}}};return((i,a,s)=>{let l=(f,o,u)=>{let p=o.node.parentId?o.id+u:f.id,h={...o,node:{...o.node,id:p},id:p};if(h=t(o.id,p,h),h.children){let[d,x]=h.children.reduce((v,y,w)=>{let[C,b]=l(h,y,u+w+1);return v[0].push(C),[v[0],b]},[[],u]);h.children=d,u=x}return[h,u+1]};return l(i,a,s)})(e,e,r)};var jg=async(e,r,t)=>{let n=e;if(r.prevState[n.id]&&n.node.type!="content"){let a=!1;if(n.node.type=="slides"||n.node.type=="slide"||n.node.type=="delta")a=!1;else{let s=(n.execPropsOptions.children??[]).some(u=>Object.keys(r.newState).includes(u)),l=Object.keys(r.newState[n.id]?.props??{}).every(u=>r.newState[n.id]?.props[u]==r.prevState[n.id]?.props[u]),f=Object.keys(r.newState[n.id]?.styles??{}).every(u=>r.newState[n.id]?.styles[u]==r.prevState[n.id]?.styles[u]),o=n.execPropsOptions.deps.every(u=>u[0]=="$api"||r.newState[u[0]]?.[u[1]]?.[u[2]]===void 0?!0:r.newState[u[0]]?.[u[1]]?.[u[2]]===r.prevState[u[0]]?.[u[1]]?.[u[2]]);l&&f&&o&&!s&&(a=!0)}if(a)return{id:t.runID,root:t.root,exec:n,state:r.state,slides:r.slides,newState:r.newState,prevState:r.prevState}}let i=await OY(n,r,t.contexts,t.api);if(n.node.type=="list"){let a=0;n.children=fd(i.state[n.id].props.value).flatMap((s,l)=>n.execPropsOptions.template.map(f=>{let[o,u]=rI({...f,node:{...f.node,props:{...f.node.props,value:\`\${n.id}.props.value[\${l}]\`}}},a);return a=u,Zg(o)}))}typeof i.state[n.id]?.actions?.onRun=="function"&&i.state[n.id].actions?.onRun(null,null,i,a=>{t.saveState(a,{state:i.state,slides:i.slides,root:t.root,exec:t.exec,id:t.runID})},t.api),n.children=[...n.children.filter(a=>a.node.type=="slides"),...n.children.filter(a=>a.node.type!="slides")];for(let a=0;a[{state:f.state,newState:f.newState,slides:f.slides,prevState:f.prevState},f.exec]);if(i=s,n.children[a]=l,l.node.type=="slides"){let f=s.state[l.id].props.value,o=s.state[l.node.parentId]?.props[f],u;t.selectedSlide&&(u=l.children.find(p=>p.id==t.selectedSlide)),o!==null&&!u&&(u=l.children.find(p=>s.state[p.id].props.value==o)),u&&u.children.forEach(p=>{i.newState[p.node.ref]||(i.newState[p.node.ref]={props:{},styles:{},actions:{}}),p.node.ref==n.id?(i.state[p.node.ref].props={...i.state[p.node.ref].props,...i.state[p.node.id].props},i.state[p.node.ref].styles={...i.state[p.node.ref].styles,...i.state[p.node.id].styles},i.state[p.node.ref].actions={...i.state[p.node.ref].actions,...i.state[p.node.id].actions}):(i.newState[p.node.ref].props={...i.newState[p.node.ref].props,...i.state[p.node.id].props},i.newState[p.node.ref].styles={...i.newState[p.node.ref].styles,...i.state[p.node.id].styles},i.newState[p.node.ref].actions={...i.newState[p.node.ref].actions,...i.state[p.node.id].actions})})}}return{id:t.runID,root:t.root,exec:n,state:i.state,slides:i.slides,newState:i.newState,prevState:i.prevState}},OY=async(e,r,t,n)=>{let i=await BY(e,r,t,n),a=tI(e.node,"styles",e.execStyles,i);return tI(e.node,"actions",e.execActions,a)};var BY=async(e,r,t,n)=>{let{id:i}=e.node,a=e.execProps??{},s=r.state;s[i]={props:r.state[i]?.props??{},actions:r.state[i]?.actions??{},styles:r.state[i]?.styles??{}},s.$contexts=t,s.$api=n;for(let{name:l,isConst:f}of e.execPropsOptions.props)try{let o;l in(r.newState?.[i]?.props||{})&&f?o=r.newState[i].props[l]:o=a[l]?.call(s),o!==null?(s[i].props[l]=o,r.state[i].props[l]=o,r.newState&&(r.newState[i]=r.newState[i]??{props:{},styles:{},actions:{}},r.newState[i].props[l]=o)):(delete s[i].props[l],delete r.state[i].props[l],r.newState?.[i]&&delete r.newState[i].props[l])}catch(o){console.log(l,o,a[l])}return r};function tI(e,r,t,n){let{id:i}=e;for(let a of Object.keys(t)){let s;try{a in(n.newState?.[i]?.[r]||{})?s=n.newState[i][r][a]:s=t[a]?.call(n.state),s!==null?n.state[e.id][r][a]=s:delete n.state[e.id][r][a]}catch(l){console.log(l,a)}}return n}function nI(e){return e.table.rows.map(r=>rB(e.paths,r,e.table.cols))}function iI(e){let{queries:r,pathsIndex:t,count:n}=e,i=[];for(let[a,s]of t)!s.hidden&&Td(r,s)&&i.push(s);return i.slice(0,n)}function aI(e){let{root:r,store:t,context:n}=e;return jg(r,t,n)}var IY=self;IY.onmessage=async e=>{let{payload:r,job:t}=e.data,n;t.type=="search"?n=iI(r):t.type=="table"?n=nI(r):t.type=="instance"&&(n=aI(r));try{postMessage({job:t,result:n})}catch(i){console.log(i),postMessage({job:t,result:{$error:\`Failed to run \${t.type} \${t.path}: \${i}\`}})}}; +\`)}return n};var tI=(e,r)=>{let t=(i,a,s)=>{let l,f=s.node;return s.children&&(l=s.children.map(o=>t(i,a,o))),{...s,children:l,node:{...s.node,parentId:f.parentId==i?a:f.parentId,props:Object.keys(f?.props??{}).reduce((o,u)=>({...o,[u]:jg(f.props[u],i,a)}),f.props),actions:Object.keys(f?.actions??{}).reduce((o,u)=>({...o,[u]:jg(f.actions[u],i,a)}),f.actions),styles:Object.keys(f?.styles??{}).reduce((o,u)=>({...o,[u]:jg(f.styles[u],i,a)}),f.styles)}}};return((i,a,s)=>{let l=(f,o,u)=>{let p=o.node.parentId?o.id+u:f.id,h={...o,node:{...o.node,id:p},id:p};if(h=t(o.id,p,h),h.children){let[d,x]=h.children.reduce((v,y,w)=>{let[C,b]=l(h,y,u+w+1);return v[0].push(C),[v[0],b]},[[],u]);h.children=d,u=x}return[h,u+1]};return l(i,a,s)})(e,e,r)};var e0=async(e,r,t)=>{let n=e;if(r.prevState[n.id]&&n.node.type!="content"){let a=!1;if(n.node.type=="slides"||n.node.type=="slide"||n.node.type=="delta")a=!1;else{let s=(n.execPropsOptions.children??[]).some(u=>Object.keys(r.newState).includes(u)),l=Object.keys(r.newState[n.id]?.props??{}).every(u=>r.newState[n.id]?.props[u]==r.prevState[n.id]?.props[u]),f=Object.keys(r.newState[n.id]?.styles??{}).every(u=>r.newState[n.id]?.styles[u]==r.prevState[n.id]?.styles[u]),o=n.execPropsOptions.deps.every(u=>u[0]=="$api"||r.newState[u[0]]?.[u[1]]?.[u[2]]===void 0?!0:r.newState[u[0]]?.[u[1]]?.[u[2]]===r.prevState[u[0]]?.[u[1]]?.[u[2]]);l&&f&&o&&!s&&(a=!0)}if(a)return{id:t.runID,root:t.root,exec:n,state:r.state,slides:r.slides,newState:r.newState,prevState:r.prevState}}let i=await BY(n,r,t.contexts,t.api);if(n.node.type=="list"){let a=0;n.children=ld(i.state[n.id].props.value).flatMap((s,l)=>n.execPropsOptions.template.map(f=>{let[o,u]=tI({...f,node:{...f.node,props:{...f.node.props,value:\`\${n.id}.props.value[\${l}]\`}}},a);return a=u,Qg(o)}))}typeof i.state[n.id]?.actions?.onRun=="function"&&i.state[n.id].actions?.onRun(null,null,i,a=>{t.saveState(a,{state:i.state,slides:i.slides,root:t.root,exec:t.exec,id:t.runID})},t.api),n.children=[...n.children.filter(a=>a.node.type=="slides"),...n.children.filter(a=>a.node.type!="slides")];for(let a=0;a[{state:f.state,newState:f.newState,slides:f.slides,prevState:f.prevState},f.exec]);if(i=s,n.children[a]=l,l.node.type=="slides"){let f=s.state[l.id].props.value,o=s.state[l.node.parentId]?.props[f],u;t.selectedSlide&&(u=l.children.find(p=>p.id==t.selectedSlide)),o!==null&&!u&&(u=l.children.find(p=>s.state[p.id].props.value==o)),u&&u.children.forEach(p=>{i.newState[p.node.ref]||(i.newState[p.node.ref]={props:{},styles:{},actions:{}}),p.node.ref==n.id?(i.state[p.node.ref].props={...i.state[p.node.ref].props,...i.state[p.node.id].props},i.state[p.node.ref].styles={...i.state[p.node.ref].styles,...i.state[p.node.id].styles},i.state[p.node.ref].actions={...i.state[p.node.ref].actions,...i.state[p.node.id].actions}):(i.newState[p.node.ref].props={...i.newState[p.node.ref].props,...i.state[p.node.id].props},i.newState[p.node.ref].styles={...i.newState[p.node.ref].styles,...i.state[p.node.id].styles},i.newState[p.node.ref].actions={...i.newState[p.node.ref].actions,...i.state[p.node.id].actions})})}}return{id:t.runID,root:t.root,exec:n,state:i.state,slides:i.slides,newState:i.newState,prevState:i.prevState}},BY=async(e,r,t,n)=>{let i=await IY(e,r,t,n),a=nI(e.node,"styles",e.execStyles,i);return nI(e.node,"actions",e.execActions,a)};var IY=async(e,r,t,n)=>{let{id:i}=e.node,a=e.execProps??{},s=r.state;s[i]={props:r.state[i]?.props??{},actions:r.state[i]?.actions??{},styles:r.state[i]?.styles??{}},s.$contexts=t,s.$api=n;for(let{name:l,isConst:f}of e.execPropsOptions.props)try{let o;l in(r.newState?.[i]?.props||{})&&f?o=r.newState[i].props[l]:o=a[l]?.call(s),o!==null?(s[i].props[l]=o,r.state[i].props[l]=o,r.newState&&(r.newState[i]=r.newState[i]??{props:{},styles:{},actions:{}},r.newState[i].props[l]=o)):(delete s[i].props[l],delete r.state[i].props[l],r.newState?.[i]&&delete r.newState[i].props[l])}catch(o){console.log(l,o,a[l])}return r};function nI(e,r,t,n){let{id:i}=e;for(let a of Object.keys(t)){let s;try{a in(n.newState?.[i]?.[r]||{})?s=n.newState[i][r][a]:s=t[a]?.call(n.state),s!==null?n.state[e.id][r][a]=s:delete n.state[e.id][r][a]}catch(l){console.log(l,a)}}return n}function iI(e){return e.table.rows.map(r=>tB(e.paths,r,e.table.cols))}function aI(e){let{queries:r,pathsIndex:t,count:n}=e,i=[];for(let[a,s]of t)!s.hidden&&Fd(r,s)&&i.push(s);return i.slice(0,n)}function oI(e){let{root:r,store:t,context:n}=e;return e0(r,t,n)}var PY=self;PY.onmessage=async e=>{let{payload:r,job:t}=e.data,n;t.type=="search"?n=aI(r):t.type=="table"?n=iI(r):t.type=="instance"&&(n=oI(r));try{postMessage({job:t,result:n})}catch(i){console.log(i),postMessage({job:t,result:{$error:\`Failed to run \${t.type} \${t.path}: \${i}\`}})}}; /*! * decimal.js v10.4.3 * An arbitrary-precision Decimal type for JavaScript. @@ -88613,10 +88622,10 @@ var Runner = class { if (job !== void 0) this.send(job, index); if ("$error" in data2) { - for (const [_17, reject] of calls) + for (const [_18, reject] of calls) reject(data2["$error"]); } else { - for (const [callback, _17] of calls) + for (const [callback, _18] of calls) callback(data2); } } @@ -88914,17 +88923,17 @@ var Superstate = class { async onSpaceDefinitionChanged(space2, oldDef) { const currentPaths = this.spacesMap.getInverse(space2.path); const newPaths = []; - if (space2.metadata?.links && !import_lodash7.default.isEqual(space2.metadata.links, oldDef?.links)) { + if (space2.metadata?.links && !import_lodash8.default.isEqual(space2.metadata.links, oldDef?.links)) { newPaths.push(...space2.metadata.links); } - if (space2.metadata?.filters && !import_lodash7.default.isEqual(space2.metadata?.filters, oldDef?.filters)) { + if (space2.metadata?.filters && !import_lodash8.default.isEqual(space2.metadata?.filters, oldDef?.filters)) { for (const [k2, f2] of this.pathsIndex) { if (!f2.hidden && pathByDef(space2.metadata?.filters, f2)) { newPaths.push(k2); } } } - const diff = [...import_lodash7.default.difference(newPaths, [...currentPaths]), ...import_lodash7.default.difference([...currentPaths], newPaths)]; + const diff = [...import_lodash8.default.difference(newPaths, [...currentPaths]), ...import_lodash8.default.difference([...currentPaths], newPaths)]; const cachedPromises = diff.map((f2) => this.reloadPath(f2).then((g) => this.dispatchEvent("pathStateUpdated", { path: f2 }))); await Promise.all(cachedPromises); } @@ -89203,7 +89212,7 @@ var Superstate = class { let spaceDefChanged = false; const spaceSort = metadata?.sort ?? { field: "rank", asc: true, group: true }; const sortable = spaceSort.field == "rank"; - if (!import_lodash7.default.isEqual(space2.metadata.links, metadata.links) || !import_lodash7.default.isEqual(space2.metadata.filters, metadata.filters)) { + if (!import_lodash8.default.isEqual(space2.metadata.links, metadata.links) || !import_lodash8.default.isEqual(space2.metadata.filters, metadata.filters)) { spaceDefChanged = true; } const newSpaceCache = { @@ -89266,7 +89275,7 @@ var Superstate = class { } this.tagsMap.set(path, new Set(cache2.tags)); this.linksMap.set(path, new Set(cache2.outlinks)); - if (!import_lodash7.default.isEqual(cache2.spaces, Array.from(this.spacesMap.get(path)))) { + if (!import_lodash8.default.isEqual(cache2.spaces, Array.from(this.spacesMap.get(path)))) { this.spacesMap.set(path, new Set(cache2.spaces)); const promises = cache2.tags.map((f2) => this.spacesIndex.has(tagSpacePathFromTag(f2)) ? null : fileSystemSpaceInfoFromTag(this.spaceManager, f2)).filter((f2) => f2).map( async (f2) => { @@ -89659,7 +89668,7 @@ var FilesystemSpaceAdapter = class { const file = await this.fileSystem.getFile(parent); return this.fileSystem.newFileFragment(file, type, name317, content3).then((f2) => file.path); } - return this.fileSystem.newFile(parent, name317, type, content3).then((f2) => f2.path); + return this.fileSystem.newFile(parent, name317, type, content3).then((f2) => f2?.path); } async renamePath(oldPath, path) { const uri = this.uriByPath(oldPath); @@ -90179,10 +90188,10 @@ function baseToString(value) { function toString2(value) { return value == null ? "" : baseToString(value); } -function isString2(value) { +function isString3(value) { return typeof value === "string"; } -function isNumber2(value) { +function isNumber3(value) { return typeof value === "number"; } function isBoolean2(value) { @@ -90240,7 +90249,7 @@ function createKey(key2) { let src = null; let weight = 1; let getFn = null; - if (isString2(key2) || isArray4(key2)) { + if (isString3(key2) || isArray4(key2)) { src = key2; path = createKeyPath(key2); id3 = createKeyId(key2); @@ -90283,7 +90292,7 @@ function get(obj, path) { if (!isDefined(value)) { return; } - if (index === path2.length - 1 && (isString2(value) || isNumber2(value) || isBoolean2(value))) { + if (index === path2.length - 1 && (isString3(value) || isNumber3(value) || isBoolean2(value))) { list.push(toString2(value)); } else if (isArray4(value)) { arr = true; @@ -90295,7 +90304,7 @@ function get(obj, path) { } } }; - deepGet(obj, isString2(path) ? path.split(".") : path, 0); + deepGet(obj, isString3(path) ? path.split(".") : path, 0); return arr ? list : list[0]; } var MatchOptions = { @@ -90376,7 +90385,7 @@ var FuseIndex = class { return; } this.isCreated = true; - if (isString2(this.docs[0])) { + if (isString3(this.docs[0])) { this.docs.forEach((doc, docIndex) => { this._addString(doc, docIndex); }); @@ -90389,7 +90398,7 @@ var FuseIndex = class { } add(doc) { const idx = this.size(); - if (isString2(doc)) { + if (isString3(doc)) { this._addString(doc, idx); } else { this._addObject(doc, idx); @@ -90433,7 +90442,7 @@ var FuseIndex = class { if (!isDefined(value2)) { continue; } - if (isString2(value2) && !isBlank(value2)) { + if (isString3(value2) && !isBlank(value2)) { let subRecord = { v: value2, i: nestedArrIndex, @@ -90451,7 +90460,7 @@ var FuseIndex = class { ; } record.$[keyIndex] = subRecords; - } else if (isString2(value) && !isBlank(value)) { + } else if (isString3(value) && !isBlank(value)) { let subRecord = { v: value, n: this.norm.get(value) @@ -91040,7 +91049,7 @@ var ExtendedSearch = class { this.pattern = isCaseSensitive ? pattern : pattern.toLowerCase(); this.query = parseQuery(this.pattern, this.options); } - static condition(_17, options) { + static condition(_18, options) { return options.useExtendedSearch; } searchIn(text2) { @@ -91137,7 +91146,7 @@ function parse5(query, options, { auto = true } = {}) { if (isLeaf(query2)) { const key2 = isQueryPath ? query2[KeyType.PATH] : keys[0]; const pattern = isQueryPath ? query2[KeyType.PATTERN] : query2[key2]; - if (!isString2(pattern)) { + if (!isString3(pattern)) { throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key2)); } const obj = { @@ -91285,12 +91294,12 @@ var Fuse = class { sortFn, ignoreFieldNorm } = this.options; - let results = isString2(query) ? isString2(this._docs[0]) ? this._searchStringList(query) : this._searchObjectList(query) : this._searchLogical(query); + let results = isString3(query) ? isString3(this._docs[0]) ? this._searchStringList(query) : this._searchObjectList(query) : this._searchLogical(query); computeScore(results, { ignoreFieldNorm }); if (shouldSort) { results.sort(sortFn); } - if (isNumber2(limit) && limit > -1) { + if (isNumber3(limit) && limit > -1) { results = results.slice(0, limit); } return format6(results, this._docs, { @@ -91572,6 +91581,12 @@ var SelectMenuSuggestionsComponent = (props) => { ref: ref2, className: "mk-menu-options-inner" }, props.item.onToggle && /* @__PURE__ */ import_react15.default.createElement("div", null, "Toggle"), /* @__PURE__ */ import_react15.default.createElement("span", { + style: props.item.color?.length > 0 ? { + background: props.item.color, + padding: "2px 4px", + borderRadius: "4px", + color: props.item.color == "var(--mk-color-none)" ? "inherit" : "var(--mk-color-white)" + } : {}, dangerouslySetInnerHTML: { __html: markIt(props.item.name, props.query) } @@ -92119,7 +92134,7 @@ var SelectMenu = import_react17.default.forwardRef( ); const onDelete = (0, import_react17.useCallback)( (tagIndex) => { - const newTags = tags3.filter((_17, i3) => i3 !== tagIndex); + const newTags = tags3.filter((_18, i3) => i3 !== tagIndex); setTags(newTags); if (props.saveOptions) props.saveOptions( @@ -92474,7 +92489,7 @@ var sortReturnForCol = (col, sort, row, row2) => { }; // src/core/react/context/ContextEditorContext.tsx -var import_lodash8 = __toESM(require_lodash()); +var import_lodash10 = __toESM(require_lodash()); var import_react24 = __toESM(require_react()); // src/core/utils/contexts/predicate/predicate.tsx @@ -92528,6 +92543,7 @@ var defaultPredicate = { // src/core/react/context/ContextMDBContext.tsx var import_react22 = __toESM(require_react()); +var import_lodash9 = __toESM(require_lodash()); // src/core/react/context/SpaceContext.tsx var import_react21 = __toESM(require_react()); @@ -92811,8 +92827,11 @@ var ContextMDBProvider = (props) => { path: spaceInfo.path + "/#^" + dbSchema.id, payload: { table: newTable } }).then((g) => { - if (g) + if (import_lodash9.default.isEqual(g, data2)) + return; + if (g) { setData(g); + } }); }; const [data2, setData] = (0, import_react22.useState)([]); @@ -93379,8 +93398,8 @@ var ContextEditorProvider = (props) => { } return r2; }); - const rowsChanged = !import_lodash8.default.isEqual(newRows, tableData?.rows); - const colsChanged = !import_lodash8.default.isEqual(tableData?.cols, f2.cols); + const rowsChanged = !import_lodash10.default.isEqual(newRows, tableData?.rows); + const colsChanged = !import_lodash10.default.isEqual(tableData?.cols, f2.cols); if (rowsChanged || colsChanged) { saveDB({ ...f2, @@ -93572,7 +93591,7 @@ var ContextEditorProvider = (props) => { var import_react79 = __toESM(require_react()); // src/core/react/components/SpaceView/Contexts/DataTypeView/DataTypeView.tsx -var import_lodash12 = __toESM(require_lodash()); +var import_lodash14 = __toESM(require_lodash()); var import_react77 = __toESM(require_react()); // node_modules/@tanstack/react-table/build/lib/index.mjs @@ -94678,7 +94697,7 @@ var ColumnSizing = { column.resetSize = () => { table.setColumnSizing((_ref2) => { let { - [column.id]: _17, + [column.id]: _18, ...rest } = _ref2; return rest; @@ -95139,7 +95158,7 @@ var RowExpanding = { } if (exists && !expanded) { const { - [row.id]: _17, + [row.id]: _18, ...rest } = oldExpanded; return rest; @@ -95273,7 +95292,7 @@ var RowPagination = { table.getPageOptions = memo2(() => [table.getPageCount()], (pageCount) => { let pageOptions = []; if (pageCount && pageCount > 0) { - pageOptions = [...new Array(pageCount)].fill(null).map((_17, i3) => i3); + pageOptions = [...new Array(pageCount)].fill(null).map((_18, i3) => i3); } return pageOptions; }, getMemoOptions(table.options, "debugTable", "getPageOptions")); @@ -95820,20 +95839,20 @@ var RowSorting = { createColumn: (column, table) => { column.getAutoSortingFn = () => { const firstRows = table.getFilteredRowModel().flatRows.slice(10); - let isString3 = false; + let isString4 = false; for (const row of firstRows) { const value = row == null ? void 0 : row.getValue(column.id); if (Object.prototype.toString.call(value) === "[object Date]") { return sortingFns.datetime; } if (typeof value === "string") { - isString3 = true; + isString4 = true; if (value.split(reSplitAlphaNumeric).length > 1) { return sortingFns.alphanumeric; } } } - if (isString3) { + if (isString4) { return sortingFns.text; } return sortingFns.basic; @@ -96546,14 +96565,14 @@ var PathCrumb = (props) => { }, cache2 && /* @__PURE__ */ import_react27.default.createElement(PathStickerView, { superstate: props.superstate, pathState: cache2 - }), (!props.hideName && cache2?.displayName) ?? path); + }), (!props.hideName && cache2?.displayName) ?? path, props.children); }; // src/core/react/components/SpaceView/Contexts/DataTypeView/ContextCell.tsx var import_react29 = __toESM(require_react()); // src/core/react/components/SpaceView/Contexts/DataTypeView/OptionCell.tsx -var import_lodash9 = __toESM(require_lodash()); +var import_lodash11 = __toESM(require_lodash()); var import_react28 = __toESM(require_react()); var OptionCell = (props) => { const parsedValue = (0, import_react28.useMemo)( @@ -96563,51 +96582,64 @@ var OptionCell = (props) => { props.superstate, props.source ), - [props.propertyValue] + [props.propertyValue, props.source] ); const serializeValue = (newOptions, value2) => { return JSON.stringify({ ...value2, - options: newOptions.map((f2) => ({ name: f2.name, value: f2.value })) + options: newOptions.map((f2) => ({ + name: f2.name, + value: f2.value, + color: f2.color + })) }); }; - const initialValue = (props.multi ? parseMultiString(props.initialValue) ?? [] : [props.initialValue]).filter((f2) => f2); - const initialOptions = [ - ...(parsedValue.options ?? []).filter((f2) => f2.value).map((t5) => ({ - name: t5.name, - description: t5.description, - value: t5.value, - removeable: props.editMode >= 2 /* EditModeView */ - })) ?? [], - ...initialValue.map((f2) => ({ - name: f2, - value: f2, - removeable: props.editMode >= 2 /* EditModeView */ - })) - ].filter(onlyUniqueProp("value")).filter((f2) => f2.value.length > 0); - const [options, setOptions] = (0, import_react28.useState)(initialOptions); - const [value, setValue] = (0, import_react28.useState)(initialValue); - (0, import_react28.useEffect)(() => { - setValue( - (props.multi ? parseMultiString(props.initialValue) ?? [] : [props.initialValue]).filter((f2) => f2) + const parseOptions = (_options, values2, editMode, editable) => { + return [ + ...(_options ?? []).filter((f2) => f2.value).map((t5) => ({ + ...t5, + color: editable ? t5.color?.length > 0 ? t5.color : "var(--mk-color-none)" : void 0, + removeable: editable ? editMode >= 2 /* EditModeView */ : false + })) ?? [], + ...values2.map((f2) => { + return { + name: f2, + value: f2, + color: editable ? "var(--mk-color-none)" : void 0, + removeable: editable ? editMode >= 2 /* EditModeView */ : false + }; + }) + ].filter(onlyUniqueProp("value")).filter((f2) => f2.value.length > 0); + }; + const parseValues = (value2, multi) => { + return (multi ? parseMultiString(value2) ?? [] : [value2]).filter( + (f2) => f2 && f2.length > 0 ); - }, [props.initialValue]); + }; + const [options, setOptions] = (0, import_react28.useState)( + parseOptions( + parsedValue.options ?? [], + parseValues(props.initialValue, props.multi), + props.editMode, + parsedValue.source ? false : true + ) + ); + const [value, setValue] = (0, import_react28.useState)( + parseValues(props.initialValue, props.multi) + ); + (0, import_react28.useEffect)(() => { + setValue(parseValues(props.initialValue, props.multi)); + }, [props.initialValue, props.multi]); (0, import_react28.useEffect)(() => { setOptions( - [ - ...(parsedValue.options ?? []).filter((f2) => f2.value).map((t5) => ({ - name: t5.name, - value: t5.value, - removeable: props.editMode >= 2 /* EditModeView */ - })) ?? [], - ...initialValue.map((f2) => ({ - name: f2, - value: f2, - removeable: props.editMode >= 2 /* EditModeView */ - })) - ].filter(onlyUniqueProp("value")).filter((f2) => f2.value.length > 0) + parseOptions( + parsedValue.options ?? [], + value, + props.editMode, + parsedValue.source ? false : true + ) ); - }, [parsedValue]); + }, [parsedValue, value, props.editMode]); const removeValue = (v2) => { const newValues = value.filter((f2) => f2 != v2); setValue(newValues); @@ -96630,44 +96662,35 @@ var OptionCell = (props) => { ); }; const saveOptions = (_options, _value) => { + const newOptions = (0, import_lodash11.uniq)([..._options, ..._value]).filter((f2) => f2.length > 0).map( + (t5) => options.find((f2) => f2.value == t5) ?? { + name: t5, + value: t5 + } + ); if (!props.multi) { - if (props.editMode >= 2 /* EditModeView */) - setOptions( - _options.filter((f2) => f2.length > 0).map((t5) => ({ name: t5, value: t5, removeable: true })) - ); + if (props.editMode >= 2 /* EditModeView */) { + setOptions(newOptions); + } setValue(_value); props.saveOptions( - serializeValue( - (0, import_lodash9.uniq)([..._options, ..._value]).filter((f2) => f2.length > 0).map((t5) => ({ name: t5, value: t5 })), - parsedValue - ), + serializeValue(newOptions, parsedValue), serializeMultiString(_value) ); } else { - const newValues = (0, import_lodash9.uniq)([...value, _value[0]]); + const newValues = (0, import_lodash11.uniq)([...value, _value[0]]); if (props.editMode >= 2 /* EditModeView */) - setOptions( - (0, import_lodash9.uniq)([..._options, ..._value]).map((t5) => ({ - name: t5, - value: t5, - removeable: true - })) - ); + setOptions(newOptions); setValue(newValues); props.saveOptions( - serializeValue( - _options.filter((f2) => f2.length > 0).map((t5) => ({ name: t5, value: t5 })), - parsedValue - ), + serializeValue(newOptions, parsedValue), serializeMultiString(newValues) ); } }; - const renameOption = (option, newValue) => { - const newOptions = options.map( - (t5) => t5.value == option ? { ...t5, name: newValue, value: newValue } : t5 - ); - const newValues = value.map((t5) => t5 == option ? newValue : t5); + const saveOption = (option, newValue) => { + const newOptions = options.map((t5) => t5.value == option ? newValue : t5); + const newValues = value; setOptions(newOptions); setValue(newValues); props.saveOptions( @@ -96675,9 +96698,33 @@ var OptionCell = (props) => { serializeMultiString(newValues) ); }; - const showOptionMenu = (e4, option) => { + const showOptionMenu = (e4, optionValue) => { + const option = options.find((f2) => f2.value == optionValue); const menuOptions = []; - menuOptions.push(menuInput(option, (value2) => renameOption(option, value2))); + menuOptions.push( + menuInput( + option.value, + (value2) => saveOption(option.value, { ...option, value: value2 }) + ) + ); + menuOptions.push(menuSeparator); + menuOptions.push({ + name: "None", + color: "var(--mk-color-none)", + onClick: () => { + saveOption(option.value, { ...option, color: "" }); + } + }); + colors.forEach((f2) => { + menuOptions.push({ + name: f2[0], + value: f2[1], + color: `${f2[1]}`, + onClick: () => { + saveOption(option.value, { ...option, color: f2[1] }); + } + }); + }); props.superstate.ui.openMenu( e4.target.getBoundingClientRect(), defaultMenu(props.superstate.ui, menuOptions) @@ -96703,15 +96750,19 @@ var OptionCell = (props) => { value, menuProps, multi: props.multi, + removeValue, selectLabel: props.compactMode ? props.property.name : i18n_default.labels.select, editMode: props.editMode, - labelElement: (_props) => /* @__PURE__ */ import_react28.default.createElement(import_react28.default.Fragment, null, /* @__PURE__ */ import_react28.default.createElement("div", null, _props.value), props.editMode && props.multi ? /* @__PURE__ */ import_react28.default.createElement("div", { - className: "mk-icon-xsmall", - onClick: () => removeValue(_props.value), - dangerouslySetInnerHTML: { - __html: props.superstate.ui.getSticker("ui//close") - } - }) : /* @__PURE__ */ import_react28.default.createElement(import_react28.default.Fragment, null)) + labelElement: (_props) => { + const color2 = options.find((f2) => f2.value == _props.value)?.color ?? "var(--mk-color-none)"; + return /* @__PURE__ */ import_react28.default.createElement("div", { + className: "mk-cell-option-item", + style: { + background: `${color2}`, + color: color2 == "var(--mk-color-none)" ? "inherit" : "var(--mk-color-white)" + } + }, _props.value, _props.children); + } }); }; var OptionCellBase = (props) => { @@ -96736,22 +96787,43 @@ var OptionCellBase = (props) => { return /* @__PURE__ */ import_react28.default.createElement("div", { className: props.baseClass, ref: ref2 - }, value.length > 0 ? value.map((o2, i3) => /* @__PURE__ */ import_react28.default.createElement("div", { - key: i3, - className: "mk-cell-option-item" + }, value.length > 0 ? value.map((o2, i3) => /* @__PURE__ */ import_react28.default.createElement(import_react28.default.Fragment, { + key: i3 }, props.labelElement && /* @__PURE__ */ import_react28.default.createElement(props.labelElement, { value: o2 - }), editable && !props.multi && value.length > 0 ? /* @__PURE__ */ import_react28.default.createElement(import_react28.default.Fragment, null, /* @__PURE__ */ import_react28.default.createElement("span", null), /* @__PURE__ */ import_react28.default.createElement("div", { - onClick: (e4) => editable && !props.multi && showMenu2(), + }, editable ? !props.multi && value.length > 0 ? /* @__PURE__ */ import_react28.default.createElement(import_react28.default.Fragment, null, /* @__PURE__ */ import_react28.default.createElement("span", null), /* @__PURE__ */ import_react28.default.createElement("div", { + onClick: (e4) => { + e4.stopPropagation(); + showMenu2(); + }, className: "mk-cell-option-select mk-icon-xxsmall mk-icon-rotated", dangerouslySetInnerHTML: { - __html: props.superstate.ui.getSticker("ui//collapse-solid") + __html: props.superstate.ui.getSticker( + "ui//collapse-solid" + ) + } + })) : props.multi ? /* @__PURE__ */ import_react28.default.createElement("div", { + className: "mk-cell-option-remove mk-icon-xxsmall", + onClick: (e4) => { + e4.stopPropagation(); + props.removeValue(o2); + }, + dangerouslySetInnerHTML: { + __html: props.superstate.ui.getSticker("ui//close") + } + }) : null : null))) : editable && !props.multi ? /* @__PURE__ */ import_react28.default.createElement("div", { + className: "mk-cell-option-item", + onClick: (e4) => { + showMenu2(); } - })) : /* @__PURE__ */ import_react28.default.createElement(import_react28.default.Fragment, null))) : editable && !props.multi ? /* @__PURE__ */ import_react28.default.createElement("div", { - className: "mk-cell-option-item" }, /* @__PURE__ */ import_react28.default.createElement("div", { - onClick: (e4) => !props.multi && showMenu2() - }, props.selectLabel)) : props.editMode == 0 /* EditModeReadOnly */ ? /* @__PURE__ */ import_react28.default.createElement("div", { + className: "mk-cell-empty" + }, props.selectLabel), /* @__PURE__ */ import_react28.default.createElement("div", { + className: "mk-cell-option-select mk-icon-xxsmall mk-icon-rotated", + dangerouslySetInnerHTML: { + __html: props.superstate.ui.getSticker("ui//collapse-solid") + } + })) : props.editMode == 0 /* EditModeReadOnly */ ? /* @__PURE__ */ import_react28.default.createElement("div", { className: "mk-cell-option-item mk-cell-empty" }, /* @__PURE__ */ import_react28.default.createElement("div", null, i18n_default.menu.none)) : /* @__PURE__ */ import_react28.default.createElement(import_react28.default.Fragment, null), editable && props.multi ? /* @__PURE__ */ import_react28.default.createElement("div", { onClick: (e4) => editable && showMenu2(), @@ -96776,7 +96848,7 @@ var ContextCell = (props) => { ) : null, [fieldValue.space, spaceState] ); - const initialValue = props.multi ? parseMultiString(props.initialValue) ?? [] : [props.initialValue]; + const parseValue = (v2, multi) => (multi ? parseMultiString(v2) ?? [] : [v2]).filter((f2) => f2); const [propValues, setPropValues] = (0, import_react29.useState)( props.superstate.contextsIndex.get(spacePath)?.spaceMap[fieldValue.spaceField]?.[props.path] ?? [] ); @@ -96791,7 +96863,9 @@ var ContextCell = (props) => { description: f2.path, value: f2.path })); - const [value, setValue] = (0, import_react29.useState)(initialValue); + const [value, setValue] = (0, import_react29.useState)( + parseValue(props.initialValue, props.multi) + ); const allValues = (0, import_react29.useMemo)( () => uniq([...value, ...propValues]), [value, propValues] @@ -96815,10 +96889,8 @@ var ContextCell = (props) => { } }; (0, import_react29.useEffect)(() => { - setValue( - props.multi ? parseMultiString(props.initialValue) ?? [] : [props.initialValue] - ); - }, [props.initialValue]); + setValue(parseValue(props.initialValue, props.multi)); + }, [props.initialValue, props.multi]); const saveOptions = (_options, _value) => { insertContextItems(props.superstate.spaceManager, _value, spacePath); if (!props.multi) { @@ -96852,20 +96924,13 @@ var ContextCell = (props) => { baseClass: "mk-cell-context", superstate: props.superstate, menuProps, + removeValue, selectLabel: props.compactMode ? props.property.name : i18n_default.labels.select, - labelElement: (_props) => /* @__PURE__ */ import_react29.default.createElement("div", { - className: "mk-cell-context-label" - }, /* @__PURE__ */ import_react29.default.createElement(PathCrumb, { + labelElement: (_props) => /* @__PURE__ */ import_react29.default.createElement(PathCrumb, { superstate: props.superstate, path: _props.value, source: spaceState?.path - }), props.editMode && props.multi ? /* @__PURE__ */ import_react29.default.createElement("div", { - className: "mk-icon-xsmall", - onClick: () => removeValue(_props.value), - dangerouslySetInnerHTML: { - __html: props.superstate.ui.getSticker("ui//close") - } - }) : /* @__PURE__ */ import_react29.default.createElement(import_react29.default.Fragment, null)), + }, _props.children), value: allValues, multi: props.multi, editMode: props.editMode @@ -99618,7 +99683,7 @@ var Stack = class { this.parent = parent; } toString() { - return `[${this.stack.filter((_17, i3) => i3 % 3 == 0).concat(this.state)}]@${this.pos}${this.score ? "!" + this.score : ""}`; + return `[${this.stack.filter((_18, i3) => i3 % 3 == 0).concat(this.state)}]@${this.pos}${this.score ? "!" + this.score : ""}`; } static start(p, state, pos = 0) { let cx = p.parser.context; @@ -100329,7 +100394,7 @@ var TokenCache = class { this.tokens = []; this.mainToken = null; this.actions = []; - this.tokens = parser2.tokenizers.map((_17) => new CachedToken()); + this.tokens = parser2.tokenizers.map((_18) => new CachedToken()); } getActions(stack) { let actionIndex = 0; @@ -105137,45 +105202,43 @@ var PathCell = (props) => { var import_react40 = __toESM(require_react()); var TextCell = (props) => { const { initialValue, saveValue } = props; - const [value, setValue] = import_react40.default.useState(initialValue ?? ""); const ref2 = (0, import_react40.useRef)(null); - const onBlur = () => { + const onBlur = (e4) => { + const value = e4.currentTarget.innerText; if (initialValue != value) saveValue(value); }; const onKeyDown = (e4) => { e4.stopPropagation(); if (e4.key == "Enter") { - e4.target.blur(); - props.setEditMode(null); + if (!e4.shiftKey) { + e4.target.blur(); + props.setEditMode(null); + } } if (e4.key == "Escape") { - setValue(initialValue); + ref2.current.innerText = initialValue; e4.target.blur(); props.setEditMode(null); } }; - import_react40.default.useEffect(() => { - setValue(initialValue ?? ""); - }, [initialValue]); (0, import_react40.useEffect)(() => { if (props.editMode == 4 /* EditModeActive */) { ref2?.current?.focus(); } }, [props.editMode]); - return props.editMode > 2 /* EditModeView */ ? /* @__PURE__ */ import_react40.default.createElement("input", { + return props.editMode > 2 /* EditModeView */ ? /* @__PURE__ */ import_react40.default.createElement("div", { onClick: (e4) => e4.stopPropagation(), className: "mk-cell-text", ref: ref2, - type: "text", - placeholder: props.compactMode ? props.property.name : null, - value, - onChange: (e4) => setValue(e4.target.value), + "data-ph": props.compactMode ? props.property.name : "Empty", onKeyDown, - onBlur + onBlur, + contentEditable: true, + dangerouslySetInnerHTML: { __html: initialValue } }) : /* @__PURE__ */ import_react40.default.createElement("div", { className: "mk-cell-text" - }, value); + }, initialValue); }; // src/core/react/components/UI/Menus/contexts/newSpacePropertyMenu.tsx @@ -105213,7 +105276,7 @@ var PropertyValueComponent = (props) => { multi: false, editable: true, searchable: true, - saveOptions: (_17, v2) => { + saveOptions: (_18, v2) => { if (saveProperty) { saveProperty(v2[0]); } else { @@ -105333,7 +105396,7 @@ var PropertyValueComponent = (props) => { }, /* @__PURE__ */ import_react41.default.createElement("span", null, i18n_default.labels.propertyValueSpace), /* @__PURE__ */ import_react41.default.createElement("span", null, spaceNameFromSpacePath(parsedValue.space, props.superstate))), parsedValue.space?.length > 0 && props.contextPath && /* @__PURE__ */ import_react41.default.createElement("div", { className: "mk-menu-option", onClick: (e4) => selectSpaceProperty(e4) - }, /* @__PURE__ */ import_react41.default.createElement("span", null, i18n_default.labels.propertyValueProperty), /* @__PURE__ */ import_react41.default.createElement("span", null, parsedValue.field))) : props.fieldType == "fileprop" ? /* @__PURE__ */ import_react41.default.createElement(import_react41.default.Fragment, null, /* @__PURE__ */ import_react41.default.createElement("div", { + }, /* @__PURE__ */ import_react41.default.createElement("span", null, i18n_default.labels.propertyValueProperty), /* @__PURE__ */ import_react41.default.createElement("span", null, parsedValue.field))) : props.fieldType == "number" ? /* @__PURE__ */ import_react41.default.createElement(import_react41.default.Fragment, null) : props.fieldType == "fileprop" ? /* @__PURE__ */ import_react41.default.createElement(import_react41.default.Fragment, null, /* @__PURE__ */ import_react41.default.createElement("div", { className: "mk-menu-option", onClick: (e4) => editFormula(e4) }, /* @__PURE__ */ import_react41.default.createElement("span", null, i18n_default.labels.propertyLookup))) : props.fieldType == "super" ? /* @__PURE__ */ import_react41.default.createElement(import_react41.default.Fragment, null, /* @__PURE__ */ import_react41.default.createElement("div", { @@ -105382,13 +105445,13 @@ var NewPropertyMenuComponent = (props) => { ); return options2; }, [spaceCaches]); - const selectedType = (_17, value) => { + const selectedType = (_18, value) => { setFieldType(value[0]); }; const selectedValue = (value) => { setFieldValue(value); }; - const selectedSource = (_17, value) => { + const selectedSource = (_18, value) => { setFieldSource(value[0]); }; const toggleMulti = () => { @@ -105558,7 +105621,7 @@ var selectPropertyTypeMenu = (e4, ui, selectedType) => { }; var PropertyMenuComponent = (props) => { const [field, setField] = (0, import_react43.useState)(props.field); - const selectedType = (_17, value) => { + const selectedType = (_18, value) => { const newField = { ...field, type: value[0], @@ -105967,7 +106030,7 @@ var SpacePropertyEditor = (props) => { editable: true, value: [], options: f2.map((m4) => ({ name: m4, value: m4 })), - saveOptions: (_17, value) => addTag2(value[0]), + saveOptions: (_18, value) => addTag2(value[0]), placeholder: i18n_default.labels.contextItemSelectPlaceholder, searchable: true, showAll: true @@ -106124,7 +106187,7 @@ function SortableItem(props) { transition }; const icon = stickerForField(props.field); - const selectedType = (_17, value) => { + const selectedType = (_18, value) => { const newField = { ...props.field, type: value[0] @@ -106188,7 +106251,7 @@ var showLinkMenu = (e4, superstate, saveLink, options) => { editable: true, value: [], options: suggestions, - saveOptions: (_17, value) => { + saveOptions: (_18, value) => { saveLink(value[0]); }, placeholder: i18n_default.labels.linkItemSelectPlaceholder, @@ -107376,7 +107439,7 @@ var FilterBar = (props) => { defaultMenu(props.superstate.ui, menuOptions) ); }; - const addSort = (_17, sort) => { + const addSort = (_18, sort) => { const field = sort[0]; const fieldType = filteredCols.find((f2) => f2.name + f2.table == field)?.type; if (fieldType) { @@ -107394,7 +107457,7 @@ var FilterBar = (props) => { }); } }; - const saveGroupBy = (_17, groupBy2) => { + const saveGroupBy = (_18, groupBy2) => { savePredicate({ ...predicate, groupBy: groupBy2 @@ -107407,7 +107470,7 @@ var FilterBar = (props) => { sort: newSort }); }; - const addFilter = (_17, filter2) => { + const addFilter = (_18, filter2) => { const field = filter2[0]; const fieldType = filteredCols.find((f2) => f2.name + f2.table == field)?.type; if (fieldType) { @@ -107432,7 +107495,7 @@ var FilterBar = (props) => { }; const changeSortMenu = (e4, sort) => { const offset2 = e4.target.getBoundingClientRect(); - const saveSort = (_17, newType) => { + const saveSort = (_18, newType) => { const type = newType[0]; const newSort = { ...sort, @@ -107498,7 +107561,7 @@ var FilterBar = (props) => { }; const changeFilterMenu = (e4, filter2) => { const offset2 = e4.target.getBoundingClientRect(); - const saveFilter = (_17, newType) => { + const saveFilter = (_18, newType) => { const type = newType[0]; const newFilter = { ...filter2, @@ -108035,7 +108098,7 @@ var SpaceQuery = (props) => { name: f2 == "any" ? "or" : "and", value: f2 })), - saveOptions: (_17, value) => setGroupType(i3, value[0]), + saveOptions: (_18, value) => setGroupType(i3, value[0]), searchable: false, showAll: true }); @@ -108050,7 +108113,7 @@ var SpaceQuery = (props) => { editable: true, value: [], options: _filters.map((f2) => ({ name: filterFnLabels[f2], value: f2 })), - saveOptions: (_17, value) => setDefFilterFn(value[0], i3, k2), + saveOptions: (_18, value) => setDefFilterFn(value[0], i3, k2), placeholder: i18n_default.labels.contextItemSelectPlaceholder, searchable: true, showAll: true @@ -108064,7 +108127,7 @@ var SpaceQuery = (props) => { editable: false, value: [], options: props.fields.map((f2) => ({ name: f2.label, value: f2 })), - saveOptions: (_17, value) => setDefFilter(value[0], i3, k2), + saveOptions: (_18, value) => setDefFilter(value[0], i3, k2), placeholder: i18n_default.labels.contextItemSelectPlaceholder, searchable: true, showAll: true, @@ -108731,7 +108794,7 @@ var selectRange = (currSel, newSel, array) => { }; // src/core/react/components/SpaceView/Contexts/TableView/TableView.tsx -var import_lodash11 = __toESM(require_lodash()); +var import_lodash13 = __toESM(require_lodash()); // src/core/react/components/UI/Modals/ImageModal.tsx var import_react62 = __toESM(require_react()); @@ -108859,7 +108922,7 @@ var LinkCell = (props) => { setValue(newValues); props.saveValue(serializeMultiString(newValues)); }; - const saveOptions = (_17, _value) => { + const saveOptions = (_18, _value) => { if (!props.multi) { setValue(_value); props.saveValue(serializeMultiString(_value)); @@ -108903,18 +108966,13 @@ var LinkCell = (props) => { return /* @__PURE__ */ import_react64.default.createElement(OptionCellBase, { superstate: props.superstate, baseClass: "mk-cell-link", + removeValue, selectLabel: props.compactMode ? props.property.name : i18n_default.labels.select, menuProps, - labelElement: (_props) => /* @__PURE__ */ import_react64.default.createElement("div", null, /* @__PURE__ */ import_react64.default.createElement(PathCrumb, { + labelElement: (_props) => /* @__PURE__ */ import_react64.default.createElement(PathCrumb, { superstate: props.superstate, path: _props.value - }), props.editMode && props.multi ? /* @__PURE__ */ import_react64.default.createElement("div", { - className: "mk-icon-xsmall", - onClick: () => removeValue(_props.value), - dangerouslySetInnerHTML: { - __html: props.superstate.ui.getSticker("ui//close") - } - }) : /* @__PURE__ */ import_react64.default.createElement(import_react64.default.Fragment, null)), + }, _props.children), value, multi: props.multi, editMode: props.editMode @@ -109046,7 +109104,7 @@ var ContextListEditSelector = (props) => { value: `spaces://$kit/#*${mdbSchemaToFrameSchema(f2.schema).def.id}` })) ], - saveOptions: (_17, value, isNew) => { + saveOptions: (_18, value, isNew) => { selectFrame(value[0], frame); }, placeholder: i18n_default.hintText.createListItem, @@ -109285,7 +109343,7 @@ var PropertyField = (props) => { ) } }), props.context && /* @__PURE__ */ import_react67.default.createElement("div", { - className: "mk-path-context-field-space mk-icon-xsmall", + className: "mk-path-context-field-space", dangerouslySetInnerHTML: { __html: props.superstate.ui.getSticker( props.context.label?.sticker @@ -109434,7 +109492,7 @@ var PropertiesView = (props) => { editable: false, value: [], options, - saveOptions: (_17, value) => { + saveOptions: (_18, value) => { saveMetadata(property, value[0]); }, placeholder: i18n_default.labels.spaceSelectPlaceholder, @@ -109469,7 +109527,7 @@ var PropertiesView = (props) => { multi: false, editable: false, searchable: false, - saveOptions: (_17, v2) => selectedType(v2, key2), + saveOptions: (_18, v2) => selectedType(v2, key2), value: [], showAll: true, options: fieldTypes.filter((f2) => f2.metadata).map((f2, i3) => ({ @@ -109627,7 +109685,7 @@ var PropertyView = (props) => { }; // src/core/react/components/SpaceView/Contexts/DataTypeView/ObjectCell.tsx -var import_lodash10 = __toESM(require_lodash()); +var import_lodash12 = __toESM(require_lodash()); var import_react69 = __toESM(require_react()); var ObjectEditor = (props) => { const { value, saveValue, saveType } = props; @@ -109660,10 +109718,11 @@ var ObjectEditor = (props) => { false ); }; - return /* @__PURE__ */ import_react69.default.createElement(import_react69.default.Fragment, null, Object.keys(type).map((f2, i3) => /* @__PURE__ */ import_react69.default.createElement(import_react69.default.Fragment, null, /* @__PURE__ */ import_react69.default.createElement(PropertyView, { + return /* @__PURE__ */ import_react69.default.createElement(import_react69.default.Fragment, null, Object.keys(type).map((f2, i3) => /* @__PURE__ */ import_react69.default.createElement(PropertyView, { + key: i3, superstate: props.superstate, savePropertyValue: (v2, f3) => saveVal(f3.name, v2), - showMenu: import_lodash10.default.noop, + showMenu: import_lodash12.default.noop, values: value, columns: props.columns, path: null, @@ -109675,7 +109734,7 @@ var ObjectEditor = (props) => { value: type[f2].value }, editable: true - }))), props.editMode > 3 /* EditModeValueOnly */ && /* @__PURE__ */ import_react69.default.createElement("button", { + })), props.editMode > 3 /* EditModeValueOnly */ && /* @__PURE__ */ import_react69.default.createElement("button", { onClick: (e4) => newProperty(e4), className: "mk-inline-button" }, /* @__PURE__ */ import_react69.default.createElement("div", { @@ -109852,7 +109911,7 @@ var ParameterSetter = (props) => { superstate: props.superstate, initialValue: removeQuotes(value?.[field.name]), compactMode: true, - updateFieldValue: (_17, f2) => saveValue(field.name, wrapQuotes(f2)), + updateFieldValue: (_18, f2) => saveValue(field.name, wrapQuotes(f2)), updateValue: (value2) => saveValue(field.name, wrapQuotes(value2)), column: { ...field, table: "" }, editMode: 5 /* EditModeAlways */ @@ -109910,20 +109969,15 @@ var TagCell = (props) => { return /* @__PURE__ */ import_react71.default.createElement(OptionCellBase, { superstate: props.superstate, baseClass: "mk-cell-tags", + removeValue, menuProps, selectLabel: props.compactMode ? props.property.name : i18n_default.labels.select, value, multi: true, editMode: props.editMode, - labelElement: (_props) => /* @__PURE__ */ import_react71.default.createElement(import_react71.default.Fragment, null, /* @__PURE__ */ import_react71.default.createElement("div", { + labelElement: (_props) => /* @__PURE__ */ import_react71.default.createElement("div", { className: "mk-cell-tags-label" - }, _props.value), props.editMode ? /* @__PURE__ */ import_react71.default.createElement("div", { - className: "mk-icon-xsmall", - onClick: () => removeValue(_props.value), - dangerouslySetInnerHTML: { - __html: props.superstate.ui.getSticker("ui//close") - } - }) : /* @__PURE__ */ import_react71.default.createElement(import_react71.default.Fragment, null)) + }, _props.value, _props.children) }); }; @@ -109971,7 +110025,7 @@ var TableView = (props) => { debouncedSavePredicate(newColSize); }; const debouncedSavePredicate = (0, import_react72.useCallback)( - (0, import_lodash11.debounce)( + (0, import_lodash13.debounce)( (nextValue) => savePredicate({ ...predicate, colsSize: nextValue @@ -109995,9 +110049,9 @@ var TableView = (props) => { }; const deleteRow = (rowIndex) => { const row = tableData.rows.find((f2, i3) => i3 == rowIndex); - if (dbSchema.primary == "true") - deletePath(props.superstate, row[PathPropertyName]); if (row) { + if (dbSchema.primary == "true") + deletePath(props.superstate, row[PathPropertyName]); saveDB({ ...tableData, rows: tableData.rows.filter((f2, i3) => i3 != rowIndex) @@ -110506,7 +110560,7 @@ var TableView = (props) => { cell.row.index, cell.column.columnDef.accessorKey ), - className: `${cell.column.columnDef.accessorKey == selectedColumn ? "mk-selected-cell " : void 0} mk-td ${cell.getIsPlaceholder() ? "mk-td-empty" : void 0}`, + className: `${cell.column.columnDef.accessorKey == selectedColumn ? "mk-selected-cell " : ""} mk-td ${cell.getIsPlaceholder() ? "mk-td-empty" : ""}`, key: cell.id, style: { minWidth: cell.getIsPlaceholder() ? "0px" : colsSize[cell.column.columnDef.accessorKey] ?? "50px" @@ -110615,7 +110669,7 @@ var PropertySelectCell = (props) => { const [value, setValue] = (0, import_react75.useState)( parseLinkedPropertyToValue(props.initialValue) ); - const saveOptions = (_17, _value) => { + const saveOptions = (_18, _value) => { setValue(parseLinkedPropertyToValue(_value[0])); props.saveValue(serializeMultiString(_value)); }; @@ -110639,6 +110693,7 @@ var PropertySelectCell = (props) => { }; return /* @__PURE__ */ import_react75.default.createElement(OptionCellBase, { superstate: props.superstate, + removeValue: null, baseClass: "mk-cell-link", selectLabel: props.compactMode ? props.property.name : i18n_default.labels.select, menuProps, @@ -110668,7 +110723,7 @@ var SpaceCell = (props) => { value: f2.path, description: f2.name })), - saveOptions: (_17, value) => props.saveValue(value[0]), + saveOptions: (_18, value) => props.saveValue(value[0]), removeOption: () => { }, placeholder: i18n_default.labels.optionItemSelectPlaceholder, @@ -110686,7 +110741,7 @@ var SpaceCell = (props) => { value: f2.id, description: f2.name })), - saveOptions: (_17, value) => props.saveValue(`${spaceObject?.space}/#^${value[0]}`), + saveOptions: (_18, value) => props.saveValue(`${spaceObject?.space}/#^${value[0]}`), removeOption: () => { }, placeholder: i18n_default.labels.optionItemSelectPlaceholder, @@ -110745,7 +110800,7 @@ var DataTypeView = (props) => { initialValue, saveValue, editMode: props.editMode, - setEditMode: import_lodash12.default.noop, + setEditMode: import_lodash14.default.noop, superstate: props.superstate, propertyValue: column.value, path: props.source ?? row?.[PathPropertyName], @@ -111305,11 +111360,11 @@ var import_react150 = __toESM(require_react()); var import_react84 = __toESM(require_react()); // src/core/react/context/FrameInstanceContext.tsx -var import_lodash14 = __toESM(require_lodash()); +var import_lodash16 = __toESM(require_lodash()); var import_react83 = __toESM(require_react()); // src/core/react/context/FrameEditorRootContext.tsx -var import_lodash13 = __toESM(require_lodash()); +var import_lodash15 = __toESM(require_lodash()); var import_react81 = __toESM(require_react()); var FramesEditorRootContext = (0, import_react81.createContext)({ root: null, @@ -111535,7 +111590,7 @@ var FrameEditorProvider = (props) => { ...newUniqueNode(groupNode, parentId, nodes, frameSchema.id) }; const newNodes = treeNodes.map((f2) => { - const node = import_lodash13.default.cloneDeep(f2); + const node = import_lodash15.default.cloneDeep(f2); node.parentId = group.id; return node; }); @@ -111772,7 +111827,7 @@ var FrameInstanceProvider = (props) => { const [rootProps, setRootProps] = (0, import_react83.useState)(props.props); (0, import_react83.useEffect)(() => { setRootProps((p) => { - if (import_lodash14.default.isEqual(p, props.props)) + if (import_lodash16.default.isEqual(p, props.props)) return p; return props.props; }); @@ -111802,7 +111857,7 @@ var FrameInstanceProvider = (props) => { { state, newState: applyPropsToState(newState, rootProps, _exec.id), - prevState: import_lodash14.default.cloneDeep(prevState), + prevState: import_lodash16.default.cloneDeep(prevState), slides: {} }, { @@ -111845,8 +111900,8 @@ var FrameInstanceProvider = (props) => { ); const runRoot = () => { if (root) { - const newRoot = import_lodash14.default.cloneDeep(root); - const runID = (0, import_lodash14.uniqueId)(); + const newRoot = import_lodash16.default.cloneDeep(root); + const runID = (0, import_lodash16.uniqueId)(); activeRunID.current = runID; executeTreeNode( newRoot, @@ -112004,11 +112059,11 @@ var FrameSelectionProvider = (props) => { }; // src/core/react/components/SpaceView/Contexts/ContextListContainer.tsx -var import_lodash19 = __toESM(require_lodash()); +var import_lodash21 = __toESM(require_lodash()); var import_react149 = __toESM(require_react()); // src/core/react/components/SpaceView/Contexts/ContextBuilder/ContextListInstance.tsx -var import_lodash18 = __toESM(require_lodash()); +var import_lodash20 = __toESM(require_lodash()); var import_react146 = __toESM(require_react()); // src/core/utils/frames/editor/dropFrame.ts @@ -112337,7 +112392,7 @@ var showNewFrameMenu = (rect, superstate, space2, addNode, options = { searchabl editable: false, value: [], options: selectOptions, - saveOptions: (_17, value) => insertNode(value[0]), + saveOptions: (_18, value) => insertNode(value[0]), searchable: options.searchable, showAll: true }); @@ -112373,7 +112428,7 @@ var ColorSetter = (props) => { var import_react89 = __toESM(require_react()); // src/core/react/components/SpaceView/Frames/Setters/StepSetter.tsx -var import_lodash15 = __toESM(require_lodash()); +var import_lodash17 = __toESM(require_lodash()); var import_react87 = __toESM(require_react()); function countDecimals(value) { if (Math.floor(value) === value) @@ -112410,7 +112465,7 @@ function InputDrag({ setValue(+newValue); onChange?.(+newValue, inputRef.current); }; - const handleDragEnd = (0, import_lodash15.debounce)((newValue) => { + const handleDragEnd = (0, import_lodash17.debounce)((newValue) => { onChange?.(newValue, inputRef.current); }, 200); const handleInput = (0, import_react87.useCallback)( @@ -113365,7 +113420,7 @@ var TextSubmenu = (props) => { multi: false, editable: false, searchable: true, - saveOptions: (_17, v2) => { + saveOptions: (_18, v2) => { saveStyleValue("--font-text", `'${v2[0]}'`); }, value: [selectedNode.styles?.["--font-text"] ?? ""], @@ -113775,25 +113830,25 @@ var import_react112 = __toESM(require_react()); var import_react_error_boundary_cjs = __toESM(require_react_error_boundary_cjs(), 1); // src/core/react/components/Navigator/SpaceTree/SpaceTreeView.tsx -var import_lodash17 = __toESM(require_lodash()); +var import_lodash19 = __toESM(require_lodash()); // src/core/react/context/SidebarContext.tsx -var import_lodash16 = __toESM(require_lodash()); +var import_lodash18 = __toESM(require_lodash()); var import_react103 = __toESM(require_react()); var NavigatorContext = (0, import_react103.createContext)({ dragPaths: [], - setDragPaths: import_lodash16.default.noop, + setDragPaths: import_lodash18.default.noop, selectedPaths: [], - setSelectedPaths: import_lodash16.default.noop, + setSelectedPaths: import_lodash18.default.noop, activePath: null, - setActivePath: import_lodash16.default.noop, + setActivePath: import_lodash18.default.noop, activeViewSpaces: [], waypoints: [], - setWaypoints: import_lodash16.default.noop, - saveActiveSpace: import_lodash16.default.noop, - closeActiveSpace: import_lodash16.default.noop, + setWaypoints: import_lodash18.default.noop, + saveActiveSpace: import_lodash18.default.noop, + closeActiveSpace: import_lodash18.default.noop, modifier: null, - setModifier: import_lodash16.default.noop + setModifier: import_lodash18.default.noop }); var SidebarProvider = (props) => { const [modifier, setModifier] = (0, import_react103.useState)(null); @@ -114050,7 +114105,7 @@ function __awaiter(thisArg, _arguments, P3, generator) { }); } function __generator(thisArg, body) { - var _17 = { label: 0, sent: function() { + var _18 = { label: 0, sent: function() { if (t5[0] & 1) throw t5[1]; return t5[1]; @@ -114066,7 +114121,7 @@ function __generator(thisArg, body) { function step(op) { if (f2) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_17 = 0)), _17) + while (g && (g = 0, op[0] && (_18 = 0)), _18) try { if (f2 = 1, y3 && (t5 = op[0] & 2 ? y3["return"] : op[0] ? y3["throw"] || ((t5 = y3["return"]) && t5.call(y3), 0) : y3.next) && !(t5 = t5.call(y3, op[1])).done) return t5; @@ -114078,42 +114133,42 @@ function __generator(thisArg, body) { t5 = op; break; case 4: - _17.label++; + _18.label++; return { value: op[1], done: false }; case 5: - _17.label++; + _18.label++; y3 = op[1]; op = [0]; continue; case 7: - op = _17.ops.pop(); - _17.trys.pop(); + op = _18.ops.pop(); + _18.trys.pop(); continue; default: - if (!(t5 = _17.trys, t5 = t5.length > 0 && t5[t5.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _17 = 0; + if (!(t5 = _18.trys, t5 = t5.length > 0 && t5[t5.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _18 = 0; continue; } if (op[0] === 3 && (!t5 || op[1] > t5[0] && op[1] < t5[3])) { - _17.label = op[1]; + _18.label = op[1]; break; } - if (op[0] === 6 && _17.label < t5[1]) { - _17.label = t5[1]; + if (op[0] === 6 && _18.label < t5[1]) { + _18.label = t5[1]; t5 = op; break; } - if (t5 && _17.label < t5[2]) { - _17.label = t5[2]; - _17.ops.push(op); + if (t5 && _18.label < t5[2]) { + _18.label = t5[2]; + _18.ops.push(op); break; } if (t5[2]) - _17.ops.pop(); - _17.trys.pop(); + _18.ops.pop(); + _18.trys.pop(); continue; } - op = body.call(thisArg, _17); + op = body.call(thisArg, _18); } catch (e4) { op = [6, e4]; y3 = 0; @@ -116569,7 +116624,7 @@ var SpaceTreeComponent = (props) => { const tree = []; const id3 = parentId ? parentId + "/" + space2.path : space2.path; const spaceCollapsed = !expandedSpaces.includes(id3) || activeId2 == id3; - const spaceSort = sort?.field && sort?.field != "rank" ? space2.metadata?.sort : sort ?? { + const spaceSort = space2.metadata?.sort?.field && space2.metadata?.sort?.field != "rank" ? space2.metadata?.sort : sort ?? { field: "rank", asc: true, group: true @@ -116807,7 +116862,7 @@ var SpaceTreeComponent = (props) => { modifier, activeItem?.space ) : null; - setProjected((p) => !(0, import_lodash17.isEqual)(p, _projected) ? _projected : p); + setProjected((p) => !(0, import_lodash19.isEqual)(p, _projected) ? _projected : p); }, [ activeId, flattenedTree, @@ -121134,20 +121189,15 @@ var NewNodeView = (props) => { section: "list", value: "" }, - ...[ - contextNode, - dividerNode, - iconNode, - imageNode, - groupNode, - inputNode - ].map((f2) => ({ - name: f2.node.name, - value: f2, - icon: f2.def?.icon, - section: "base", - description: f2.def?.description - })), + ...[contextNode, dividerNode, iconNode, imageNode, groupNode].map( + (f2) => ({ + name: f2.node.name, + value: f2, + icon: f2.def?.icon, + section: "base", + description: f2.def?.description + }) + ), ...[ buttonNode, ratingNode, @@ -122069,7 +122119,7 @@ var FrameEditorInstance = (props) => { var ContextListInstance = (props) => { const [contexts, setContexts] = (0, import_react146.useState)(props.contexts); (0, import_react146.useEffect)( - () => setContexts((p) => import_lodash18.default.isEqual(props.contexts, p) ? p : props.contexts), + () => setContexts((p) => import_lodash20.default.isEqual(props.contexts, p) ? p : props.contexts), [props.contexts] ); const { spaceInfo } = (0, import_react146.useContext)(SpaceContext); @@ -122417,7 +122467,7 @@ var ContextListContainer = (props) => { initiateString(predicate.listItem, "spaces://$kit/#*rowItem") ) }; - setURIs((p) => !import_lodash19.default.isEqual(newURIs, p) ? newURIs : p); + setURIs((p) => !import_lodash21.default.isEqual(newURIs, p) ? newURIs : p); }, [predicate]); return /* @__PURE__ */ import_react149.default.createElement("div", { className: "mk-context-container" @@ -122618,7 +122668,9 @@ var SpaceHeaderView = (props) => { dangerouslySetInnerHTML: { __html: props.superstate.ui.getSticker(f2.icon) } - }), f2.label))), /* @__PURE__ */ import_react152.default.createElement("div", null, props.spacePathStates.map((f2, i3) => /* @__PURE__ */ import_react152.default.createElement(PathProvider, { + }), f2.label))), /* @__PURE__ */ import_react152.default.createElement("div", { + className: "mk-props-contexts" + }, props.spacePathStates.map((f2, i3) => /* @__PURE__ */ import_react152.default.createElement(PathProvider, { key: i3, superstate: props.superstate, path: f2.path, @@ -123964,7 +124016,8 @@ var defaultConfigFile = async (plugin) => { (0, import_obsidian6.normalizePath)(plugin.app.vault.configDir + "/app.json") ); }; -var fileExtensionForFile = (path) => path?.split(".").pop(); +var fileExtensionForFile = (path) => path?.indexOf(".") > 0 ? path.split(".").pop() : "md"; +var fileNameForFile = (path) => path?.indexOf("/") > 0 ? path.split("/").pop().split(".").shift() : path.split(".").shift(); var uniqueFileName = (oldName, name317, extension, folder) => { let newName = sanitizeFileName(name317); let uniqueName = false; @@ -124039,7 +124092,7 @@ var openPath = async (leaf, path, plugin, flow) => { plugin.superstate, f3, fileExtensionForFile(path), - null + fileNameForFile(path) ); }); } @@ -124775,7 +124828,6 @@ var editBlockExtensions = () => [ var arrowKeyAnnotation = import_state8.Annotation.define(); // src/adapters/obsidian/utils/flow/flowEditor.ts -var import_obsidian9 = require("obsidian"); var getLineRangeFromRef = (path, ref2, plugin) => { if (!ref2) { return [void 0, void 0]; @@ -124873,14 +124925,15 @@ var loadFlowEditor = async (leaf, cm, flowEditorInfo2, source, plugin) => { const path = plugin.superstate.spaceManager.uriByString(flowEditorInfo2.link, source); const basePath = plugin.superstate.spaceManager.resolvePath(path.basePath, source); if (dom) { - const file = getAbstractFileAtPath(plugin.app, path.basePath) ?? getAbstractFileAtPath(plugin.app, basePath); - if (file instanceof import_obsidian9.TFolder) { + const spaceCache = plugin.superstate.spacesIndex.get(path.basePath); + if (spaceCache) { if (!dom.hasAttribute("ready")) { dom.setAttribute("ready", ""); plugin.superstate.ui.openPath(path.fullPath, false, dom); return; } } else { + const file = getAbstractFileAtPath(plugin.app, path.basePath) ?? getAbstractFileAtPath(plugin.app, basePath); if (file) { const selectiveRange = getLineRangeFromRef(file.path, path.refStr, plugin); if (!dom.hasAttribute("ready")) { @@ -124922,7 +124975,7 @@ var openPathInElement = (plugin, parentLeaf, initiatingEl, fileName, onShowCallb }; // src/adapters/obsidian/ui/editors/markdownView/flowEditor/flowEditor.tsx -var import_obsidian10 = require("obsidian"); +var import_obsidian9 = require("obsidian"); var toggleFlowEditor = import_state10.Annotation.define(); var cacheFlowEditorHeight = import_state10.Annotation.define(); var preloadFlowEditor = import_state10.EditorState.transactionFilter.of( @@ -125174,8 +125227,8 @@ var FlowEditorSelector = class extends import_view10.WidgetType { const div2 = document.createElement("div"); div2.classList.add("mk-floweditor-selector"); const reactEl = this.plugin.ui.createRoot(div2); - if (this.info.link && view.state.field(import_obsidian10.editorInfoField, false)) { - const infoField = view.state.field(import_obsidian10.editorInfoField, false); + if (this.info.link && view.state.field(import_obsidian9.editorInfoField, false)) { + const infoField = view.state.field(import_obsidian9.editorInfoField, false); const file = infoField.file; reactEl.render( /* @__PURE__ */ import_react172.default.createElement(FlowEditorHover, { @@ -126000,11 +126053,11 @@ var DEFAULT_SETTINGS = { }; // src/main.ts -var import_obsidian29 = require("obsidian"); +var import_obsidian28 = require("obsidian"); // src/adapters/obsidian/settings.ts -var import_obsidian11 = require("obsidian"); -var MakeMDPluginSettingsTab = class extends import_obsidian11.PluginSettingTab { +var import_obsidian10 = require("obsidian"); +var MakeMDPluginSettingsTab = class extends import_obsidian10.PluginSettingTab { constructor(app2, plugin) { super(app2, plugin); this.plugin = plugin; @@ -126016,7 +126069,7 @@ var MakeMDPluginSettingsTab = class extends import_obsidian11.PluginSettingTab { const { containerEl } = this; containerEl.innerHTML = ""; containerEl.createEl("h1", { text: i18n_default.settings.sectionSidebar }); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.spaces.name).setDesc(i18n_default.settings.spaces.desc).addToggle( + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.spaces.name).setDesc(i18n_default.settings.spaces.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.spacesEnabled).onChange((value) => { this.plugin.superstate.settings.spacesEnabled = value; this.plugin.saveSettings(); @@ -126028,20 +126081,20 @@ var MakeMDPluginSettingsTab = class extends import_obsidian11.PluginSettingTab { this.refreshView(); }) ); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.defaultSpaces.name).setDesc(i18n_default.settings.defaultSpaces.desc).addToggle( + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.defaultSpaces.name).setDesc(i18n_default.settings.defaultSpaces.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.enableDefaultSpaces).onChange((value) => { this.plugin.superstate.settings.enableDefaultSpaces = value; this.plugin.saveSettings(); }) ); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.spacesStickers.name).setDesc(i18n_default.settings.spacesStickers.desc).addToggle( + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.spacesStickers.name).setDesc(i18n_default.settings.spacesStickers.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.spacesStickers).onChange((value) => { this.plugin.superstate.settings.spacesStickers = value; this.plugin.saveSettings(); this.refreshView(); }) ); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.spaceView.name).setDesc(i18n_default.settings.spaceView.desc).addToggle( + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.spaceView.name).setDesc(i18n_default.settings.spaceView.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.spaceViewEnabled).onChange((value) => { this.plugin.superstate.settings.spaceViewEnabled = value; this.plugin.saveSettings(); @@ -126050,7 +126103,7 @@ var MakeMDPluginSettingsTab = class extends import_obsidian11.PluginSettingTab { if (this.plugin.superstate.settings.enableDefaultSpaces) { containerEl.createEl("h3", { text: i18n_default.settings.sectionDefault }); const defaultSpaces = containerEl.createEl("div"); - new import_obsidian11.Setting(defaultSpaces).setName(i18n_default.settings.tagSpaces.name).setDesc(i18n_default.settings.tagSpaces.desc).addToggle( + new import_obsidian10.Setting(defaultSpaces).setName(i18n_default.settings.tagSpaces.name).setDesc(i18n_default.settings.tagSpaces.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.enableTagSpaces).onChange((value) => { this.plugin.superstate.settings.enableTagSpaces = value; this.plugin.saveSettings(); @@ -126060,90 +126113,90 @@ var MakeMDPluginSettingsTab = class extends import_obsidian11.PluginSettingTab { if (this.plugin.superstate.settings.spacesEnabled) { containerEl.createEl("h3", { text: i18n_default.settings.sectionNavigator }); const spaceAppearances = containerEl.createEl("div"); - new import_obsidian11.Setting(spaceAppearances).setName(i18n_default.settings.sidebarTabs.name).setDesc(i18n_default.settings.sidebarTabs.desc).addToggle( + new import_obsidian10.Setting(spaceAppearances).setName(i18n_default.settings.sidebarTabs.name).setDesc(i18n_default.settings.sidebarTabs.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.sidebarTabs).onChange((value) => { this.plugin.superstate.settings.sidebarTabs = value; this.plugin.saveSettings(); document.body.classList.toggle("mk-hide-tabs", !value); }) ); - new import_obsidian11.Setting(spaceAppearances).setName(i18n_default.settings.hideRibbon.name).setDesc(i18n_default.settings.hideRibbon.desc).addToggle( + new import_obsidian10.Setting(spaceAppearances).setName(i18n_default.settings.hideRibbon.name).setDesc(i18n_default.settings.hideRibbon.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.showRibbon).onChange((value) => { this.plugin.superstate.settings.showRibbon = value; this.plugin.saveSettings(); document.body.classList.toggle("mk-hide-ribbon", !value); }) ); - new import_obsidian11.Setting(spaceAppearances).setName(i18n_default.settings.folderIndentationLines.name).setDesc(i18n_default.settings.folderIndentationLines.desc).addToggle( + new import_obsidian10.Setting(spaceAppearances).setName(i18n_default.settings.folderIndentationLines.name).setDesc(i18n_default.settings.folderIndentationLines.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.folderIndentationLines).onChange((value) => { this.plugin.superstate.settings.folderIndentationLines = value; this.plugin.saveSettings(); document.body.classList.toggle("mk-folder-lines", value); }) ); - new import_obsidian11.Setting(spaceAppearances).setName(i18n_default.settings.spacesAlias.name).setDesc(i18n_default.settings.spacesAlias.desc).addToggle( + new import_obsidian10.Setting(spaceAppearances).setName(i18n_default.settings.spacesAlias.name).setDesc(i18n_default.settings.spacesAlias.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.spacesUseAlias).onChange((value) => { this.plugin.superstate.settings.spacesUseAlias = value; this.plugin.saveSettings(); this.refreshView(); }) ); - new import_obsidian11.Setting(spaceAppearances).setName(i18n_default.settings.readableLineWidth.name).setDesc(i18n_default.settings.readableLineWidth.desc).addToggle( + new import_obsidian10.Setting(spaceAppearances).setName(i18n_default.settings.readableLineWidth.name).setDesc(i18n_default.settings.readableLineWidth.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.readableLineWidth).onChange((value) => { this.plugin.superstate.settings.readableLineWidth = value; this.plugin.saveSettings(); }) ); - new import_obsidian11.Setting(spaceAppearances).setName(i18n_default.settings.openSpacesOnLaunch.name).setDesc(i18n_default.settings.openSpacesOnLaunch.desc).addToggle( + new import_obsidian10.Setting(spaceAppearances).setName(i18n_default.settings.openSpacesOnLaunch.name).setDesc(i18n_default.settings.openSpacesOnLaunch.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.openSpacesOnLaunch).onChange((value) => { this.plugin.superstate.settings.openSpacesOnLaunch = value; this.plugin.saveSettings(); }) ); - new import_obsidian11.Setting(spaceAppearances).setName(i18n_default.settings.spaceRowHeight.name).setDesc(i18n_default.settings.spaceRowHeight.desc).addText((text2) => { + new import_obsidian10.Setting(spaceAppearances).setName(i18n_default.settings.spaceRowHeight.name).setDesc(i18n_default.settings.spaceRowHeight.desc).addText((text2) => { text2.setValue(this.plugin.superstate.settings.spaceRowHeight.toString()).onChange(async (value) => { text2.setValue(parseInt(value).toString()); this.plugin.superstate.settings.spaceRowHeight = parseInt(value); await this.plugin.saveSettings(); }); }); - new import_obsidian11.Setting(spaceAppearances).setName(i18n_default.settings.expandFolder.name).setDesc(i18n_default.settings.expandFolder.desc).addToggle( + new import_obsidian10.Setting(spaceAppearances).setName(i18n_default.settings.expandFolder.name).setDesc(i18n_default.settings.expandFolder.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.expandFolderOnClick).onChange((value) => { this.plugin.superstate.settings.expandFolderOnClick = value; this.plugin.saveSettings(); }) ); - new import_obsidian11.Setting(spaceAppearances).setName(i18n_default.settings.hoverPreview.name).setDesc(i18n_default.settings.hoverPreview.desc).addToggle( + new import_obsidian10.Setting(spaceAppearances).setName(i18n_default.settings.hoverPreview.name).setDesc(i18n_default.settings.hoverPreview.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.filePreviewOnHover).onChange((value) => { this.plugin.superstate.settings.filePreviewOnHover = value; this.plugin.saveSettings(); }) ); - new import_obsidian11.Setting(spaceAppearances).setName(i18n_default.settings.activeFile.name).setDesc(i18n_default.settings.activeFile.desc).addToggle( + new import_obsidian10.Setting(spaceAppearances).setName(i18n_default.settings.activeFile.name).setDesc(i18n_default.settings.activeFile.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.revealActiveFile).onChange((value) => { this.plugin.superstate.settings.revealActiveFile = value; this.plugin.saveSettings(); }) ); - new import_obsidian11.Setting(spaceAppearances).setName(i18n_default.settings.spacesFileExplorerDual.name).setDesc(i18n_default.settings.spacesFileExplorerDual.desc).addToggle( + new import_obsidian10.Setting(spaceAppearances).setName(i18n_default.settings.spacesFileExplorerDual.name).setDesc(i18n_default.settings.spacesFileExplorerDual.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.spacesDisablePatch).onChange((value) => { this.plugin.superstate.settings.spacesDisablePatch = value; this.plugin.saveSettings(); }) ); - new import_obsidian11.Setting(spaceAppearances).setName(i18n_default.settings.spacesPerformance.name).setDesc(i18n_default.settings.spacesPerformance.desc).addToggle( + new import_obsidian10.Setting(spaceAppearances).setName(i18n_default.settings.spacesPerformance.name).setDesc(i18n_default.settings.spacesPerformance.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.spacesPerformance).onChange((value) => { this.plugin.superstate.settings.spacesPerformance = value; this.plugin.saveSettings(); }) ); - new import_obsidian11.Setting(spaceAppearances).setName(i18n_default.settings.generateThumbnails.name).setDesc(i18n_default.settings.generateThumbnails.desc).addToggle( + new import_obsidian10.Setting(spaceAppearances).setName(i18n_default.settings.generateThumbnails.name).setDesc(i18n_default.settings.generateThumbnails.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.imageThumbnails).onChange((value) => { this.plugin.superstate.settings.imageThumbnails = value; this.plugin.saveSettings(); }) ); - new import_obsidian11.Setting(spaceAppearances).setName(i18n_default.settings.spacesDeleteOption.name).setDesc(i18n_default.settings.spacesDeleteOption.desc).addDropdown((dropdown) => { + new import_obsidian10.Setting(spaceAppearances).setName(i18n_default.settings.spacesDeleteOption.name).setDesc(i18n_default.settings.spacesDeleteOption.desc).addDropdown((dropdown) => { dropdown.addOption( "permanent", i18n_default.settings.spacesDeleteOptions.permanant @@ -126159,7 +126212,7 @@ var MakeMDPluginSettingsTab = class extends import_obsidian11.PluginSettingTab { this.plugin.saveSettings(); }); }); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.newNotePlaceholder.name).setDesc(i18n_default.settings.newNotePlaceholder.desc).addText((text2) => { + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.newNotePlaceholder.name).setDesc(i18n_default.settings.newNotePlaceholder.desc).addText((text2) => { text2.setValue(this.plugin.superstate.settings.newNotePlaceholder).onChange(async (value) => { this.plugin.superstate.settings.newNotePlaceholder = value; await this.plugin.saveSettings(); @@ -126168,7 +126221,7 @@ var MakeMDPluginSettingsTab = class extends import_obsidian11.PluginSettingTab { } if (this.plugin.superstate.settings.spacesStickers) { containerEl.createEl("h3", { text: i18n_default.settings.sectionStickers }); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.indexSVG.name).setDesc(i18n_default.settings.indexSVG.desc).addToggle( + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.indexSVG.name).setDesc(i18n_default.settings.indexSVG.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.indexSVG).onChange((value) => { this.plugin.superstate.settings.indexSVG = value; this.plugin.saveSettings(); @@ -126177,13 +126230,13 @@ var MakeMDPluginSettingsTab = class extends import_obsidian11.PluginSettingTab { } if (this.plugin.superstate.settings.spaceViewEnabled) { containerEl.createEl("h3", { text: i18n_default.settings.sectionSpaceView }); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.defaultSpaceTemplate.name).setDesc(i18n_default.settings.defaultSpaceTemplate.desc).addText((text2) => { + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.defaultSpaceTemplate.name).setDesc(i18n_default.settings.defaultSpaceTemplate.desc).addText((text2) => { text2.setValue(this.plugin.superstate.settings.defaultSpaceTemplate).onChange(async (value) => { this.plugin.superstate.settings.defaultSpaceTemplate = value; await this.plugin.saveSettings(); }); }); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.minimalThemeFix.name).setDesc(i18n_default.settings.minimalThemeFix.description).addToggle( + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.minimalThemeFix.name).setDesc(i18n_default.settings.minimalThemeFix.description).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.minimalFix).onChange((value) => { this.plugin.superstate.settings.minimalFix = value; this.plugin.saveSettings(); @@ -126192,34 +126245,34 @@ var MakeMDPluginSettingsTab = class extends import_obsidian11.PluginSettingTab { ); } containerEl.createEl("h1", { text: i18n_default.settings.sectionContext }); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.contexts.name).setDesc(i18n_default.settings.contexts.desc).addToggle( + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.contexts.name).setDesc(i18n_default.settings.contexts.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.contextEnabled).onChange((value) => { this.plugin.superstate.settings.contextEnabled = value; this.plugin.saveSettings(); this.plugin.reloadExtensions(false); }) ); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.defaultDateFormat.name).setDesc(i18n_default.settings.defaultDateFormat.desc).addText((text2) => { + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.defaultDateFormat.name).setDesc(i18n_default.settings.defaultDateFormat.desc).addText((text2) => { text2.setValue(this.plugin.superstate.settings.defaultDateFormat).onChange(async (value) => { this.plugin.superstate.settings.defaultDateFormat = value; await this.plugin.saveSettings(); }); }); containerEl.createEl("h3", { text: i18n_default.settings.sectionAdvanced }); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.openFileContext.name).setDesc(i18n_default.settings.openFileContext.desc).addToggle( + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.openFileContext.name).setDesc(i18n_default.settings.openFileContext.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.autoOpenFileContext).onChange((value) => { this.plugin.superstate.settings.autoOpenFileContext = value; this.plugin.saveSettings(); }) ); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.syncContextToFrontmatter.name).setDesc(i18n_default.settings.syncContextToFrontmatter.desc).addToggle( + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.syncContextToFrontmatter.name).setDesc(i18n_default.settings.syncContextToFrontmatter.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.saveAllContextToFrontmatter).onChange((value) => { this.plugin.superstate.settings.saveAllContextToFrontmatter = value; this.plugin.saveSettings(); }) ); containerEl.createEl("h1", { text: i18n_default.settings.sectionBlink }); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.blink.name).setDesc(i18n_default.settings.blink.desc).addToggle( + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.blink.name).setDesc(i18n_default.settings.blink.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.blinkEnabled).onChange(async (value) => { this.plugin.superstate.settings.blinkEnabled = value; await this.plugin.saveSettings(); @@ -126227,7 +126280,7 @@ var MakeMDPluginSettingsTab = class extends import_obsidian11.PluginSettingTab { }) ); containerEl.createEl("h1", { text: i18n_default.settings.sectionFlow }); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.editorMakerMode.name).setDesc(i18n_default.settings.editorMakerMode.desc).addToggle( + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.editorMakerMode.name).setDesc(i18n_default.settings.editorMakerMode.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.makerMode).onChange((value) => { this.plugin.superstate.settings.makerMode = value; this.plugin.saveSettings(); @@ -126236,20 +126289,20 @@ var MakeMDPluginSettingsTab = class extends import_obsidian11.PluginSettingTab { ); if (this.plugin.superstate.settings.makerMode) { containerEl.createEl("h3", { text: i18n_default.settings.sectionInlineContext }); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.inlineContextExplorer.name).setDesc(i18n_default.settings.inlineContextExplorer.desc).addToggle( + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.inlineContextExplorer.name).setDesc(i18n_default.settings.inlineContextExplorer.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.inlineContext).onChange((value) => { this.plugin.superstate.settings.inlineContext = value; this.plugin.saveSettings(); this.plugin.reloadExtensions(false); }) ); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.inlineContextExpanded.name).setDesc(i18n_default.settings.inlineContextExpanded.desc).addToggle( + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.inlineContextExpanded.name).setDesc(i18n_default.settings.inlineContextExpanded.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.inlineContextSectionsExpanded).onChange((value) => { this.plugin.superstate.settings.inlineContextSectionsExpanded = value; this.plugin.saveSettings(); }) ); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.inlineContextHorizontal.name).setDesc(i18n_default.settings.inlineContextHorizontal.desc).addDropdown((dropdown) => { + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.inlineContextHorizontal.name).setDesc(i18n_default.settings.inlineContextHorizontal.desc).addDropdown((dropdown) => { dropdown.addOption("vertical", i18n_default.settings.layoutVertical); dropdown.addOption("horizontal", i18n_default.settings.layoutHorizontal); dropdown.setValue(this.plugin.superstate.settings.inlineContextNameLayout); @@ -126258,20 +126311,20 @@ var MakeMDPluginSettingsTab = class extends import_obsidian11.PluginSettingTab { this.plugin.saveSettings(); }); }); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.hideFrontmatter.name).setDesc(i18n_default.settings.hideFrontmatter.desc).addToggle( + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.hideFrontmatter.name).setDesc(i18n_default.settings.hideFrontmatter.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.hideFrontmatter).onChange(async (value) => { this.plugin.superstate.settings.hideFrontmatter = value; await this.plugin.saveSettings(); this.plugin.reloadExtensions(false); }) ); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.dataviewInlineContext.name).setDesc(i18n_default.settings.dataviewInlineContext.desc).addToggle( + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.dataviewInlineContext.name).setDesc(i18n_default.settings.dataviewInlineContext.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.dataviewInlineContext).onChange((value) => { this.plugin.superstate.settings.dataviewInlineContext = value; this.plugin.saveSettings(); }) ); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.inlineBacklinks.name).setDesc(i18n_default.settings.inlineBacklinks.desc).addToggle( + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.inlineBacklinks.name).setDesc(i18n_default.settings.inlineBacklinks.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.inlineBacklinks).onChange(async (value) => { this.plugin.superstate.settings.inlineBacklinks = value; await this.plugin.saveSettings(); @@ -126279,21 +126332,21 @@ var MakeMDPluginSettingsTab = class extends import_obsidian11.PluginSettingTab { }) ); containerEl.createEl("h3", { text: i18n_default.settings.sectionFlow }); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.editorFlowReplace.name).setDesc(i18n_default.settings.editorFlowReplace.desc).addToggle( + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.editorFlowReplace.name).setDesc(i18n_default.settings.editorFlowReplace.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.editorFlow).onChange((value) => { this.plugin.superstate.settings.editorFlow = value; this.plugin.saveSettings(); this.refreshView(); }) ); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.internalLinkFlowEditor.name).setDesc(i18n_default.settings.internalLinkFlowEditor.desc).addToggle( + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.internalLinkFlowEditor.name).setDesc(i18n_default.settings.internalLinkFlowEditor.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.internalLinkClickFlow).onChange(async (value) => { this.plugin.superstate.settings.internalLinkClickFlow = value; await this.plugin.saveSettings(); this.plugin.reloadExtensions(false); }) ); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.editorFlowStyle.name).setDesc(i18n_default.settings.editorFlowStyle.desc).addDropdown((dropdown) => { + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.editorFlowStyle.name).setDesc(i18n_default.settings.editorFlowStyle.desc).addDropdown((dropdown) => { dropdown.addOption("classic", i18n_default.settings.editorFlowStyle.classic); dropdown.addOption("seamless", i18n_default.settings.editorFlowStyle.seamless); dropdown.addOption("minimal", i18n_default.settings.editorFlowStyle.minimal); @@ -126311,14 +126364,14 @@ var MakeMDPluginSettingsTab = class extends import_obsidian11.PluginSettingTab { }); }); containerEl.createEl("h3", { text: i18n_default.settings.sectionFlowMenu }); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.editorMakeMenu.name).setDesc(i18n_default.settings.editorMakeMenu.desc).addToggle( + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.editorMakeMenu.name).setDesc(i18n_default.settings.editorMakeMenu.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.flowMenuEnabled).onChange(async (value) => { this.plugin.superstate.settings.flowMenuEnabled = value; await this.plugin.saveSettings(); this.plugin.reloadExtensions(false); }) ); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.makeChar.name).setDesc(i18n_default.settings.makeChar.desc).addText((text2) => { + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.makeChar.name).setDesc(i18n_default.settings.makeChar.desc).addText((text2) => { text2.setValue(this.plugin.superstate.settings.menuTriggerChar).onChange(async (value) => { if (value.length < 1) { text2.setValue(this.plugin.superstate.settings.menuTriggerChar); @@ -126333,7 +126386,7 @@ var MakeMDPluginSettingsTab = class extends import_obsidian11.PluginSettingTab { await this.plugin.saveSettings(); }); }); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.editorMakePlacholder.name).setDesc(i18n_default.settings.editorMakePlacholder.desc).addToggle( + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.editorMakePlacholder.name).setDesc(i18n_default.settings.editorMakePlacholder.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.makeMenuPlaceholder).onChange(async (value) => { this.plugin.superstate.settings.makeMenuPlaceholder = value; await this.plugin.saveSettings(); @@ -126341,28 +126394,28 @@ var MakeMDPluginSettingsTab = class extends import_obsidian11.PluginSettingTab { }) ); containerEl.createEl("h3", { text: i18n_default.settings.sectionFlowStyler }); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.inlineStyler.name).setDesc(i18n_default.settings.inlineStyler.desc).addToggle( + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.inlineStyler.name).setDesc(i18n_default.settings.inlineStyler.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.inlineStyler).onChange(async (value) => { this.plugin.superstate.settings.inlineStyler = value; await this.plugin.saveSettings(); this.plugin.reloadExtensions(false); }) ); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.inlineStickerMenu.name).setDesc(i18n_default.settings.inlineStickerMenu.desc).addToggle( + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.inlineStickerMenu.name).setDesc(i18n_default.settings.inlineStickerMenu.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.inlineStickerMenu).onChange(async (value) => { this.plugin.superstate.settings.inlineStickerMenu = value; await this.plugin.saveSettings(); this.plugin.reloadExtensions(false); }) ); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.inlineStylerColor.name).setDesc(i18n_default.settings.inlineStylerColor.desc).addToggle( + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.inlineStylerColor.name).setDesc(i18n_default.settings.inlineStylerColor.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.inlineStylerColors).onChange((value) => { this.plugin.superstate.settings.inlineStylerColors = value; this.plugin.saveSettings(); this.refreshView(); }) ); - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.mobileMakeBar.name).setDesc(i18n_default.settings.mobileMakeBar.desc).addToggle( + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.mobileMakeBar.name).setDesc(i18n_default.settings.mobileMakeBar.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.mobileMakeBar).onChange((value) => { this.plugin.superstate.settings.mobileMakeBar = value; this.plugin.saveSettings(); @@ -126370,7 +126423,7 @@ var MakeMDPluginSettingsTab = class extends import_obsidian11.PluginSettingTab { }) ); } - new import_obsidian11.Setting(containerEl).setName(i18n_default.settings.experimental.name).setDesc(i18n_default.settings.experimental.desc).addToggle( + new import_obsidian10.Setting(containerEl).setName(i18n_default.settings.experimental.name).setDesc(i18n_default.settings.experimental.desc).addToggle( (toggle) => toggle.setValue(this.plugin.superstate.settings.experimental).onChange((value) => { this.plugin.superstate.settings.experimental = value; this.plugin.saveSettings(); @@ -126381,12 +126434,12 @@ var MakeMDPluginSettingsTab = class extends import_obsidian11.PluginSettingTab { }; // src/adapters/obsidian/ui/navigator/NavigatorView.tsx -var import_obsidian12 = require("obsidian"); +var import_obsidian11 = require("obsidian"); var import_react177 = __toESM(require_react()); var FILE_TREE_VIEW_TYPE = "mk-path-view"; var VIEW_DISPLAY_TEXT = "Spaces"; var ICON = "layout-grid"; -var FileTreeView = class extends import_obsidian12.ItemView { +var FileTreeView = class extends import_obsidian11.ItemView { constructor(leaf, superstate, ui) { super(leaf); this.navigation = false; @@ -126394,7 +126447,7 @@ var FileTreeView = class extends import_obsidian12.ItemView { this.ui = ui; } revealInFolder(file) { - if (file instanceof import_obsidian12.TFolder) { + if (file instanceof import_obsidian11.TFolder) { this.leaf.view.app.workspace.activeLeaf.setViewState({ type: SPACE_VIEW_TYPE, state: { path: file.path } @@ -126466,10 +126519,10 @@ var replaceMobileMainMenu = (superstate) => { }; // src/adapters/obsidian/ui/editors/MDBFileViewer.tsx -var import_obsidian13 = require("obsidian"); +var import_obsidian12 = require("obsidian"); var import_react179 = __toESM(require_react()); var MDB_FILE_VIEWER_TYPE = "make-mdb-viewer"; -var MDBFileViewer = class extends import_obsidian13.FileView { +var MDBFileViewer = class extends import_obsidian12.FileView { constructor(leaf, plugin) { super(leaf); this.navigation = true; @@ -126538,9 +126591,9 @@ var MDBFileViewer = class extends import_obsidian13.FileView { }; // src/adapters/obsidian/ui/explorer/ContextExplorerLeafView.tsx -var import_obsidian14 = require("obsidian"); +var import_obsidian13 = require("obsidian"); var import_react180 = __toESM(require_react()); -var ContextExplorerLeafView = class extends import_obsidian14.ItemView { +var ContextExplorerLeafView = class extends import_obsidian13.ItemView { constructor(leaf, superstate, ui) { super(leaf); this.navigation = false; @@ -126627,7 +126680,7 @@ var ReadingModeHeader = (props) => { }; // src/adapters/obsidian/utils/markdownPost.tsx -var import_obsidian15 = require("obsidian"); +var import_obsidian14 = require("obsidian"); var import_react182 = __toESM(require_react()); var replaceInlineContext = (plugin, el, ctx) => { replaceMarkdownForReadingMode(el, async (dom) => { @@ -126649,7 +126702,7 @@ var replaceInlineContext = (plugin, el, ctx) => { } if (ctxElement.getAttribute("data-path") != ctx.sourcePath) { ctxElement.setAttribute("data-path", ctx.sourcePath); - ctx.addChild(new import_obsidian15.MarkdownRenderChild(element)); + ctx.addChild(new import_obsidian14.MarkdownRenderChild(element)); const root = plugin.ui.createRoot(ctxElement); const construct = (root2) => { if (ctx.sourcePath.match(urlRegex)) { @@ -126686,8 +126739,8 @@ var replaceInlineContext = (plugin, el, ctx) => { }; // src/adapters/obsidian/ui/icons.ts -var import_obsidian16 = require("obsidian"); -var lucideIcon = (value) => (0, import_obsidian16.getIcon)(value)?.outerHTML; +var import_obsidian15 = require("obsidian"); +var lucideIcon = (value) => (0, import_obsidian15.getIcon)(value)?.outerHTML; var mkLogo = ` @@ -127707,10 +127760,10 @@ function around1(obj, method, createWrapper) { } // src/adapters/obsidian/utils/patches.ts -var import_obsidian17 = require("obsidian"); +var import_obsidian16 = require("obsidian"); var patchFilesPlugin = (plugin) => { plugin.register( - around(import_obsidian17.Workspace.prototype, { + around(import_obsidian16.Workspace.prototype, { getLeavesOfType(old) { return function(type) { if (type == "file-explorer") { @@ -127724,7 +127777,7 @@ var patchFilesPlugin = (plugin) => { }; var patchWorkspace = (plugin) => { let layoutChanging = false; - const uninstaller = around(import_obsidian17.Workspace.prototype, { + const uninstaller = around(import_obsidian16.Workspace.prototype, { changeLayout(old) { return async function(workspace) { layoutChanging = true; @@ -127745,7 +127798,7 @@ var patchWorkspace = (plugin) => { return false; if (layoutChanging) return false; - if (parent === plugin.app.workspace.rootSplit || import_obsidian17.WorkspaceContainer && parent instanceof import_obsidian17.WorkspaceContainer) { + if (parent === plugin.app.workspace.rootSplit || import_obsidian16.WorkspaceContainer && parent instanceof import_obsidian16.WorkspaceContainer) { for (const popover of FlowEditor.popoversForWindow( parent.win )) { @@ -128327,7 +128380,7 @@ var mdbSchemaToCommandSchema = (schema) => { }; // src/adapters/mdb/mdbAdapter.ts -var import_lodash20 = __toESM(require_lodash()); +var import_lodash22 = __toESM(require_lodash()); // src/adapters/mdb/db/sqljs.js var import_sql = __toESM(require_sql_wasm()); @@ -128547,7 +128600,7 @@ var MDBFileTypeAdapter = class { const schema = schemas.find((t5) => t5.id == fragmentId); const newCommand = content3(mdbTable); const newSchema = frameSchemaToTableSchema(newCommand.schema); - if (!import_lodash20.default.isEqual(newSchema, schema)) { + if (!import_lodash22.default.isEqual(newSchema, schema)) { const dbTables = saveSchemaToDBTables(newSchema, schemas); await saveDBToPath(this, file.path, dbTables); } @@ -128571,17 +128624,17 @@ var MDBFileTypeAdapter = class { }; // src/adapters/obsidian/filesystem/rebuildIndex.ts -var import_lodash21 = __toESM(require_lodash()); +var import_lodash23 = __toESM(require_lodash()); // src/adapters/obsidian/filesystem/indexCurrentFileTree.ts -var import_obsidian18 = require("obsidian"); +var import_obsidian17 = require("obsidian"); var indexCurrentFileTree = (plugin, vaultDB) => { const treeItems = getAllAbstractFilesInVault(plugin.app).map((file) => ({ ...vaultDB.find((f2) => f2.path == file.path) ?? {}, path: file.path, parent: file.parent?.path, - created: file instanceof import_obsidian18.TFile ? file.stat.ctime.toString() : void 0, - folder: file instanceof import_obsidian18.TFolder ? "true" : "false" + created: file instanceof import_obsidian17.TFile ? file.stat.ctime.toString() : void 0, + folder: file instanceof import_obsidian17.TFolder ? "true" : "false" })); return { vault: { @@ -128595,14 +128648,14 @@ var indexCurrentFileTree = (plugin, vaultDB) => { var rebuildIndex = async (filesystem, plugin, save) => { const start = Date.now(); const newTables = indexCurrentFileTree(plugin, filesystem.vaultDBCache ?? []); - if (save && !import_lodash21.default.isEqual(newTables.vault.rows, filesystem.vaultDBCache)) { + if (save && !import_lodash23.default.isEqual(newTables.vault.rows, filesystem.vaultDBCache)) { await filesystem.saveSpacesDatabaseToDisk(newTables, save); } plugin.superstate.ui.notify(`Make.md - Vault Reindexed in ${(Date.now() - start) / 1e3} seconds`, "console"); }; // src/adapters/obsidian/utils/tags.ts -var import_obsidian19 = require("obsidian"); +var import_obsidian18 = require("obsidian"); var tagKeys = ["tags"]; var loadTags = (app2, settings) => { const folder = settings.spacesFolder == "" ? app2.vault.getRoot() : getAbstractFileAtPath( @@ -128612,14 +128665,14 @@ var loadTags = (app2, settings) => { return uniq([ ...Object.keys(app2.metadataCache.getTags()).map((f2) => f2.toLowerCase()), ...folder?.children.filter( - (f2) => f2 instanceof import_obsidian19.TFolder && f2.name.charAt(0) == "#" + (f2) => f2 instanceof import_obsidian18.TFolder && f2.name.charAt(0) == "#" ).map((f2) => tagPathToTag(f2.name)) ?? [] ]); }; var tagExists = (currentCache, findTag) => { let currentTags = []; - if ((0, import_obsidian19.getAllTags)(currentCache)) { - currentTags = (0, import_obsidian19.getAllTags)(currentCache); + if ((0, import_obsidian18.getAllTags)(currentCache)) { + currentTags = (0, import_obsidian18.getAllTags)(currentCache); } return currentTags.find((tag2) => tag2.toLowerCase() == findTag.toLowerCase()) ? true : false; }; @@ -128781,11 +128834,11 @@ var editTagInFileBody = async (plugin, oldTag, newTag, positions, file) => { }; // src/adapters/obsidian/filesystem/filesystem.ts -var import_lodash24 = __toESM(require_lodash()); -var import_obsidian21 = require("obsidian"); +var import_lodash26 = __toESM(require_lodash()); +var import_obsidian20 = require("obsidian"); // src/adapters/mdb/localCache/localCache.ts -var import_lodash22 = __toESM(require_lodash()); +var import_lodash24 = __toESM(require_lodash()); // src/schemas/cache.ts var CacheDBSchema = { uniques: ["path"], cols: ["path", "cache", "version"], rows: [] }; @@ -128796,7 +128849,7 @@ var LocalStorageCache = class { this.storageDBPath = storageDBPath; this.mdbAdapter = mdbAdapter; this.indexVersion = Date.now().toString(); - this.debounceSaveSpaceDatabase = (0, import_lodash22.debounce)( + this.debounceSaveSpaceDatabase = (0, import_lodash24.debounce)( () => { saveZippedDBFile(this.mdbAdapter, this.storageDBPath, this.db.export().buffer); }, @@ -128857,14 +128910,14 @@ var LocalStorageCache = class { }; // src/adapters/mdb/localCache/localCacheMobile.ts -var import_lodash23 = __toESM(require_lodash()); +var import_lodash25 = __toESM(require_lodash()); var MobileCachePersister = class { constructor(storageDBPath, mdbAdapter, types2) { this.storageDBPath = storageDBPath; this.mdbAdapter = mdbAdapter; this.types = types2; this.indexVersion = Date.now().toString(); - this.debounceSaveSpaceDatabase = (0, import_lodash23.debounce)( + this.debounceSaveSpaceDatabase = (0, import_lodash25.debounce)( (maps) => { const tables = Object.keys(maps).reduce((p, c3) => { return { @@ -128934,13 +128987,13 @@ var MobileCachePersister = class { }; // src/adapters/obsidian/filetypes/frontmatter/fm.ts -var import_obsidian20 = require("obsidian"); +var import_obsidian19 = require("obsidian"); var getAllFrontmatterKeys = (plugin) => { return uniq(getAllAbstractFilesInVault(plugin.app).flatMap((f2) => Object.keys(frontMatterForFile(app, f2) ?? {}) ?? []).filter((f2) => !FMSpaceKeys(plugin.superstate.settings).includes(f2))); }; var frontMatterForFile = (app2, file) => { let currentCache; - if (file instanceof import_obsidian20.TFile && app2.metadataCache.getFileCache(file) !== null) { + if (file instanceof import_obsidian19.TFile && app2.metadataCache.getFileCache(file) !== null) { currentCache = app2.metadataCache.getFileCache(file); } return currentCache?.frontmatter; @@ -128954,10 +129007,10 @@ var ObsidianFileSystem = class { this.vaultDBCache = []; this.cache = /* @__PURE__ */ new Map(); this.vaultQueue = Promise.resolve(); - this.spacesDBPath = (0, import_obsidian21.normalizePath)( + this.spacesDBPath = (0, import_obsidian20.normalizePath)( this.plugin.app.vault.configDir + "/plugins/make-md/Spaces.mdb" ); - this.debounceSaveSpaceDatabase = (0, import_lodash24.debounce)( + this.debounceSaveSpaceDatabase = (0, import_lodash26.debounce)( (tables) => { saveDBToPath(this.plugin.mdbFileAdapter, this.spacesDBPath, tables); }, @@ -128970,7 +129023,7 @@ var ObsidianFileSystem = class { if (!file) return; this.addToVaultQueue(async () => { - const folder = file instanceof import_obsidian21.TFolder; + const folder = file instanceof import_obsidian20.TFolder; const parent = file.parent; await this.saveSpacesDatabaseToDisk({ vault: { ...vaultSchema, rows: [...this.vaultDBCache, { path: file.path, @@ -129001,7 +129054,7 @@ var ObsidianFileSystem = class { if (!file) return; this.addToVaultQueue(async () => { - if (file instanceof import_obsidian21.TFolder) { + if (file instanceof import_obsidian20.TFolder) { const newVaultRows = this.vaultDBCache.filter((f2) => f2.path != file.path && !f2.parent.startsWith(file.path)); await this.saveSpacesDatabaseToDisk({ vault: { ...vaultSchema, rows: newVaultRows } }); } else { @@ -129015,7 +129068,7 @@ var ObsidianFileSystem = class { if (!file) return; this.addToVaultQueue(async () => { - if (file instanceof import_obsidian21.TFolder) { + if (file instanceof import_obsidian20.TFolder) { const newVaultRows = this.vaultDBCache.map((f2) => f2.path == oldPath ? { ...f2, path: file.path, @@ -129050,7 +129103,7 @@ var ObsidianFileSystem = class { }; this.middleware = middleware; this.plugin = plugin; - if (import_obsidian21.Platform.isMobile) { + if (import_obsidian20.Platform.isMobile) { this.persister = new MobileCachePersister(".makemd/fileCache.mdc", this.plugin.mdbFileAdapter, ["file"]); } else { this.persister = new LocalStorageCache(".makemd/fileCache.mdc", this.plugin.mdbFileAdapter, ["file"]); @@ -129065,7 +129118,7 @@ var ObsidianFileSystem = class { return; const oldCache = this.cache.get(path); const newCache = { ...oldCache, ...cache2 }; - if (oldCache && import_lodash24.default.isEqual(newCache, oldCache)) { + if (oldCache && import_lodash26.default.isEqual(newCache, oldCache)) { return; } this.cache.set(path, newCache); @@ -129212,7 +129265,7 @@ var ObsidianFileSystem = class { } } async saveSpacesDatabaseToDisk(tables, save = true) { - if (await this.plugin.files.fileExists((0, import_obsidian21.normalizePath)(this.spacesDBPath)) && !this.vaultDBLoaded) { + if (await this.plugin.files.fileExists((0, import_obsidian20.normalizePath)(this.spacesDBPath)) && !this.vaultDBLoaded) { return; } this.vaultDBLoaded = true; @@ -129227,7 +129280,7 @@ var ObsidianFileSystem = class { } resourcePathForPath(path) { const file = this.plugin.app.vault.getAbstractFileByPath(path); - if (file instanceof import_obsidian21.TFile) { + if (file instanceof import_obsidian20.TFile) { return this.plugin.app.vault.getResourcePath(file); } else if (path.match(urlRegex)) { return path; @@ -129424,7 +129477,7 @@ var ObsidianCanvasFiletypeAdapter = class { }; // src/adapters/obsidian/filetypes/markdownAdapter.ts -var import_obsidian22 = require("obsidian"); +var import_obsidian21 = require("obsidian"); var ObsidianMarkdownFiletypeAdapter = class { constructor(plugin) { this.plugin = plugin; @@ -129525,14 +129578,14 @@ var ObsidianMarkdownFiletypeAdapter = class { parentFolder = getAbstractFileAtPath(this.app, parent); } return this.app.fileManager.createNewMarkdownFile( - parentFolder ? parentFolder instanceof import_obsidian22.TFolder ? parentFolder : parentFolder.parent : this.app.vault.getRoot(), + parentFolder ? parentFolder instanceof import_obsidian21.TFolder ? parentFolder : parentFolder.parent : this.app.vault.getRoot(), name317 ).then((f2) => tFileToAFile(f2)); } async saveContent(file, fragmentType, fragmentId, content3) { if (fragmentType == "label") { const afile = this.app.vault.getAbstractFileByPath(file.path); - if (afile && afile instanceof import_obsidian22.TFile) { + if (afile && afile instanceof import_obsidian21.TFile) { if (this.app.fileManager.processFrontMatter) { await this.app.fileManager.processFrontMatter(afile, (frontmatter) => { if (fragmentId == "sticker") { @@ -129546,7 +129599,7 @@ var ObsidianMarkdownFiletypeAdapter = class { } if (fragmentType == "frontmatter" || fragmentType == "property") { const afile = this.app.vault.getAbstractFileByPath(file.path); - if (afile && afile instanceof import_obsidian22.TFile) { + if (afile && afile instanceof import_obsidian21.TFile) { if (this.app.fileManager.processFrontMatter) { await this.app.fileManager.processFrontMatter(afile, (frontmatter) => { const newFrontmatter = content3(frontmatter); @@ -129564,7 +129617,7 @@ var ObsidianMarkdownFiletypeAdapter = class { async deleteContent(file, fragmentType, fragmentId) { if (fragmentType == "frontmatter" || fragmentType == "property") { const afile = this.app.vault.getAbstractFileByPath(file.path); - if (afile && afile instanceof import_obsidian22.TFile) { + if (afile && afile instanceof import_obsidian21.TFile) { if (this.app.fileManager.processFrontMatter) { return this.app.fileManager.processFrontMatter(afile, (frontmatter) => { delete frontmatter[fragmentId]; @@ -130350,7 +130403,7 @@ var stickerFromString = (sticker, plugin) => { }; // src/adapters/obsidian/ui/editors/markdownView/menus/MakeMenu/MakeMenu.tsx -var import_obsidian23 = require("obsidian"); +var import_obsidian22 = require("obsidian"); // src/adapters/obsidian/ui/editors/markdownView/menus/MakeMenu/commands/default.ts var default_default2 = [ @@ -130460,7 +130513,7 @@ function resolveCommands(plugin) { } // src/adapters/obsidian/ui/editors/markdownView/menus/MakeMenu/MakeMenu.tsx -var MakeMenu = class extends import_obsidian23.EditorSuggest { +var MakeMenu = class extends import_obsidian22.EditorSuggest { constructor(app2, plugin) { super(app2); this.inCmd = false; @@ -130555,7 +130608,7 @@ var MakeMenu = class extends import_obsidian23.EditorSuggest { }; // src/adapters/obsidian/ui/editors/markdownView/menus/StickerMenu.tsx -var import_obsidian24 = require("obsidian"); +var import_obsidian23 = require("obsidian"); var import_react184 = __toESM(require_react()); // src/schemas/emoji.ts @@ -135951,7 +136004,7 @@ var emojis = { }; // src/adapters/obsidian/ui/editors/markdownView/menus/StickerMenu.tsx -var StickerMenu = class extends import_obsidian24.EditorSuggest { +var StickerMenu = class extends import_obsidian23.EditorSuggest { constructor(app2, plugin) { super(app2); this.inCmd = false; @@ -136033,7 +136086,7 @@ var registerEditorMenus = (plugin) => { }; // src/adapters/obsidian/ui/ui.tsx -var import_obsidian26 = require("obsidian"); +var import_obsidian25 = require("obsidian"); var import_react191 = __toESM(require_react()); var import_client = __toESM(require_client()); @@ -136051,11 +136104,11 @@ var workspaceLeafForDom = (app2, dom) => { }; // src/adapters/obsidian/utils/modifyTabSticker.ts -var import_obsidian25 = require("obsidian"); +var import_obsidian24 = require("obsidian"); var modifyTabSticker = (plugin) => { if (!plugin.superstate.settings.spacesStickers) return; - let leaf = plugin.app.workspace.getActiveViewOfType(import_obsidian25.MarkdownView)?.leaf; + let leaf = plugin.app.workspace.getActiveViewOfType(import_obsidian24.MarkdownView)?.leaf; if (leaf) { const file = plugin.app.workspace.getActiveFile(); if (!file) @@ -136334,7 +136387,7 @@ var HiddenPaths = (props) => { superstate.saveSettings(); superstate.initializePaths(); }; - const saveFile = (_17, value) => { + const saveFile = (_18, value) => { superstate.settings.hiddenFiles = [ ...superstate.settings.hiddenFiles, ...value @@ -136592,7 +136645,7 @@ var ObsidianUI = class { return stickerFromString(icon, this.plugin); }; this.openToast = (content3) => { - new import_obsidian26.Notice(content3); + new import_obsidian25.Notice(content3); }; this.openPalette = (modal, className) => { showModal({ ui: this, fc: modal, isPalette: true, className }); @@ -136610,7 +136663,7 @@ var ObsidianUI = class { const file = getAbstractFileAtPath(this.plugin.app, path); if (!file) return; - if (file instanceof import_obsidian26.TFile) { + if (file instanceof import_obsidian25.TFile) { const dragData = this.plugin.app.dragManager.dragFile( e4.nativeEvent, file @@ -136659,7 +136712,7 @@ var ObsidianUI = class { type: "lucide", keywords: f2, value: f2, - html: (0, import_obsidian26.getIcon)(f2).outerHTML + html: (0, import_obsidian25.getIcon)(f2).outerHTML })); const allCustom = [ ...this.plugin.superstate.iconsCache.keys() @@ -136686,7 +136739,7 @@ var ObsidianUI = class { }; this.getUIPath = (path) => { const file = this.plugin.app.vault.getAbstractFileByPath(path); - if (file instanceof import_obsidian26.TFile) { + if (file instanceof import_obsidian25.TFile) { return this.plugin.app.vault.getResourcePath(file); } else if (path?.match(urlRegex)) { return path; @@ -136714,7 +136767,7 @@ var ObsidianUI = class { null, async (editor) => { const leaf2 = editor.attachLeaf(); - if (this.plugin.app.vault.getAbstractFileByPath(path) instanceof import_obsidian26.TFile) { + if (this.plugin.app.vault.getAbstractFileByPath(path) instanceof import_obsidian25.TFile) { await leaf2.openFile( this.plugin.app.vault.getAbstractFileByPath(path) ); @@ -136765,10 +136818,10 @@ var ObsidianUI = class { openPath(leaf, path, this.plugin); }; this.primaryInteractionType = () => { - return import_obsidian26.Platform.isMobile ? 0 /* Touch */ : 1 /* Mouse */; + return import_obsidian25.Platform.isMobile ? 0 /* Touch */ : 1 /* Mouse */; }; this.getScreenType = () => { - return import_obsidian26.Platform.isMobileApp ? 0 /* Phone */ : import_obsidian26.Platform.isTablet ? 2 /* Tablet */ : 1 /* Desktop */; + return import_obsidian25.Platform.isMobileApp ? 0 /* Phone */ : import_obsidian25.Platform.isTablet ? 2 /* Tablet */ : 1 /* Desktop */; }; const newDiv = document.createElement("div"); document.body.appendChild(newDiv); @@ -136789,7 +136842,7 @@ var parseSortStrat = (str) => { }; // src/adapters/obsidian/utils/migration.ts -var import_obsidian27 = require("obsidian"); +var import_obsidian26 = require("obsidian"); var migrate09 = async (plugin) => { const allFrames = [...plugin.superstate.framesIndex.values()]; for (const f2 of allFrames) { @@ -136856,9 +136909,9 @@ var migrate08 = async (plugin) => { } }); const spaceFolder = getAbstractFileAtPath(plugin.app, "Context"); - if (spaceFolder instanceof import_obsidian27.TFolder) { + if (spaceFolder instanceof import_obsidian26.TFolder) { promises.push(...spaceFolder.children.map((f2) => { - if (f2 instanceof import_obsidian27.TFile && f2.extension == "mdb") { + if (f2 instanceof import_obsidian26.TFile && f2.extension == "mdb") { const folderPath = `${plugin.superstate.settings.spacesFolder}/${f2.basename}/.space`; return plugin.files.fileExists(folderPath).then((g) => { if (!g) @@ -136873,7 +136926,7 @@ var migrate08 = async (plugin) => { function recursiveFx(folder) { for (const child of folder.children) { if (!folder.path.startsWith(plugin2.superstate.settings.spacesFolder)) { - if (child instanceof import_obsidian27.TFolder) { + if (child instanceof import_obsidian26.TFolder) { const childFolder = child; folders.push(child); if (childFolder.children) @@ -137440,7 +137493,7 @@ var TestComponent = (props) => { }; // src/adapters/image/imageAdapter.ts -var import_obsidian28 = require("obsidian"); +var import_obsidian27 = require("obsidian"); var import_pica = __toESM(require_pica()); var hashCode = (str) => { let hash = 0; @@ -137499,7 +137552,7 @@ var ImageFileTypeAdapter = class { return; const thumbnailPath = `${this.cacheDirectory}/${hashCode(file.path)}.${file.extension}`; let thumbnail = file.path; - if (!await this.middleware.fileExists(thumbnailPath) && !import_obsidian28.Platform.isMobile && this.plugin.superstate.settings.imageThumbnails) { + if (!await this.middleware.fileExists(thumbnailPath) && !import_obsidian27.Platform.isMobile && this.plugin.superstate.settings.imageThumbnails) { const thumbnailResult = await this.generateThumnail(file, thumbnailPath); if (thumbnailResult) { thumbnail = thumbnailPath; @@ -137528,7 +137581,7 @@ var ImageFileTypeAdapter = class { // src/main.ts var makeMDVersion = 0.9; -var MakeMDPlugin = class extends import_obsidian29.Plugin { +var MakeMDPlugin = class extends import_obsidian28.Plugin { constructor() { super(...arguments); this.debouncedRefresh = () => null; @@ -137732,8 +137785,8 @@ var MakeMDPlugin = class extends import_obsidian29.Plugin { convertPathToSpace() { const activeLeaf = this.app.workspace.activeLeaf; if (activeLeaf?.view.getViewType() == "markdown") { - const view = this.app.workspace.getActiveViewOfType(import_obsidian29.MarkdownView); - if (view instanceof import_obsidian29.MarkdownView && view.file instanceof import_obsidian29.TFile) { + const view = this.app.workspace.getActiveViewOfType(import_obsidian28.MarkdownView); + if (view instanceof import_obsidian28.MarkdownView && view.file instanceof import_obsidian28.TFile) { convertPathToSpace(this.superstate, view.file.path, true); } } else { @@ -137746,7 +137799,7 @@ var MakeMDPlugin = class extends import_obsidian29.Plugin { } getActiveFile() { let filePath = null; - let leaf = this.app.workspace.getActiveViewOfType(import_obsidian29.MarkdownView)?.leaf; + let leaf = this.app.workspace.getActiveViewOfType(import_obsidian28.MarkdownView)?.leaf; if (!leaf) { leaf = this.app.workspace.getActiveViewOfType(SpaceViewContainer)?.leaf; } @@ -137952,7 +138005,7 @@ var MakeMDPlugin = class extends import_obsidian29.Plugin { const start = Date.now(); this.mdbFileAdapter = new MDBFileTypeAdapter(this); this.files = FilesystemMiddleware.create(); - this.obsidianAdapter = new ObsidianFileSystem(this, this.files, (0, import_obsidian29.normalizePath)( + this.obsidianAdapter = new ObsidianFileSystem(this, this.files, (0, import_obsidian28.normalizePath)( this.app.vault.configDir + "/plugins/make-md/Spaces.mdb" )); this.files.initiateFileSystemAdapter(this.obsidianAdapter, true); @@ -137979,11 +138032,11 @@ var MakeMDPlugin = class extends import_obsidian29.Plugin { if (this.superstate.settings.experimental) this.files.initiateFiletypeAdapter(new TextCacher(this)); this.superstate.spaceManager.addSpaceAdapter(filesystemCosmoform, true); - (0, import_obsidian29.addIcon)("mk-logo", mkLogo); + (0, import_obsidian28.addIcon)("mk-logo", mkLogo); this.superstate.saveSettings = () => this.saveSettings(); this.loadViews(); let cachePersister; - if (import_obsidian29.Platform.isMobile) { + if (import_obsidian28.Platform.isMobile) { cachePersister = new MobileCachePersister(".makemd/superstate.mdc", this.mdbFileAdapter, ["path", "space", "frame", "context", "icon"]); } else { cachePersister = new LocalStorageCache(".makemd/superstate.mdc", this.mdbFileAdapter, ["path", "space", "frame", "context", "icon"]); diff --git a/manifest.json b/manifest.json index 9717603..c90f2be 100755 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "make-md", "name": "MAKE.md", - "version": "0.9.16", + "version": "0.9.17", "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", diff --git a/styles.css b/styles.css index e9cc840..463d42c 100644 --- a/styles.css +++ b/styles.css @@ -31,18 +31,21 @@ body { --mk-ui-text-accent: var(--text-on-accent); --mk-shadow-card: 0px 1px 4px 0px rgba(0, 0, 0, 0.4); --mk-shadow-menu: 0px 0px 32px 0px rgba(0, 0, 0, 0.2); + --mk-color-none: rgba(var(--mono-rgb-100), 0.025); --mk-color-blue: #3867d6; --mk-color-green: #20bf6b; --mk-color-orange: #fa8231; --mk-color-purple: #8854d0; --mk-color-red: #eb3b5a; --mk-color-turquoise: #0fb9b1; - --mk-color-yellow: #f7b731; + --mk-color-yellow: #E5A216; --mk-color-charcoal: #4b6584; --mk-color-teal: #2d98da; - --mk-color-pink: #FC489F; + --mk-color-pink: #E83289; --mk-color-brown: #68381E; --mk-color-gray: #8392A4; + --mk-color-black: #000000; + --mk-color-white: #ffffff; --mk-color-base-0: var(--color-base-00); --mk-color-base-10: var(--color-base-10); --mk-color-base-20: var(--color-base-20); @@ -97,6 +100,7 @@ body { display: flex; flex-direction: column; gap: 8px; + width: 100%; } .mk-editor-header { } @@ -794,6 +798,9 @@ div:not(.mk-flowspace-editor) > .mk-floweditor .cm-content { width: 100%; align-items: flex-start; } +.mk-props-contexts .mk-path-context-row { + width: 100%; +} .mk-props-contexts .mk-divider { border-bottom: thin solid var(--mk-ui-divider); width: 100%; @@ -805,6 +812,9 @@ div:not(.mk-flowspace-editor) > .mk-floweditor .cm-content { align-items: flex-start; gap: 4px; } +.mk-props-contexts .mk-cell-boolean { + padding: 0px; +} .mk-props-contexts-space-list { display: flex; flex-wrap: wrap; @@ -1894,6 +1904,7 @@ body:not(.is-mobile) .mk-main-menu-button:hover { display: flex; flex-direction: column; overflow: hidden; + align-items: flex-start; } .mk-menu-options-section { flex: 1; @@ -2408,6 +2419,7 @@ body .markdown-source-view.mod-cm6.mod-cm6.is-readable-line-width .mk-inline-tit width: auto; } .mk-inline-title { + margin-top: 8px; margin-bottom: 0; } .mk-path-context-component .mk-tag-selector { @@ -2463,7 +2475,6 @@ body .markdown-source-view.mod-cm6.mod-cm6.is-readable-line-width .mk-inline-tit .mk-path-context-row .mk-cell-option { width: unset; align-items: flex-start; - padding: 2px 4px; } .mk-inline-button { font-size: 13px; @@ -2486,10 +2497,16 @@ body .markdown-source-view.mod-cm6.mod-cm6.is-readable-line-width .mk-inline-tit height: 18px; border-radius: 9px; position: absolute; + align-items: center; top: 12px; left: 10px; background: var(--mk-ui-background); } +.mk-path-context-field-space svg { + width: 12px; + height: 12px; + color: var(--mk-ui-text-tertiary); +} .mk-path-context-field-space:hover { opacity: 1; } @@ -2552,9 +2569,6 @@ body .markdown-source-view.mod-cm6.mod-cm6.is-readable-line-width .mk-inline-tit .mk-path-context .mk-cell-text { background: var(var(--mk-ui-active-hover)) !important; } -.mk-path-context .mk-path-context-row { - flex-wrap: wrap; -} .mk-path-preview { display: flex; max-width: 100px; @@ -4177,6 +4191,7 @@ body:not(.is-mobile) .markdown-source-view.mod-cm6.is-readable-line-width .mk-sp border-left: thin solid var(--mk-ui-divider); align-items: flex-start; gap: 8px; + width: 100%; } .mk-cell-object .mk-path-context-field-key { width: 100%; @@ -4190,6 +4205,16 @@ body:not(.is-mobile) .markdown-source-view.mod-cm6.is-readable-line-width .mk-sp .mk-cell-object-row { display: flex; } +.mk-cell-text { + white-space: pre-line; + width: 100%; + min-height: 24px; + padding: 4px 0; +} +.mk-cell-text:empty::before { + content: attr(data-ph); + color: var(--mk-ui-text-tertiary); +} .mk-table .mk-cell-text { padding: 4px; } @@ -4252,7 +4277,7 @@ body:not(.is-mobile) .markdown-source-view.mod-cm6.is-readable-line-width .mk-sp padding: 2px 4px; } .mk-cell-date-value:hover { - background: var(var(--mk-ui-active-hover)); + background: var(--mk-ui-active-hover); } .mk-cell-link, .mk-cell-context, @@ -4265,6 +4290,9 @@ body:not(.is-mobile) .markdown-source-view.mod-cm6.is-readable-line-width .mk-sp display: flex; flex-wrap: wrap; } +.mk-cell-link .mk-path { + background: var(--mk-color-none); +} .mk-cell-boolean { padding: 4px; display: flex; @@ -4278,6 +4306,7 @@ body:not(.is-mobile) .markdown-source-view.mod-cm6.is-readable-line-width .mk-sp display: flex; gap: 8px; } +.mk-cell-tags-label, .mk-cell-option-item { background: rgba(var(--mono-rgb-100), 0.025); border-radius: 4px; @@ -4286,9 +4315,12 @@ body:not(.is-mobile) .markdown-source-view.mod-cm6.is-readable-line-width .mk-sp align-items: center; gap: 2px; white-space: nowrap; -} -.mk-cell-option-item .mk-path { - padding: 0; + height: 24px; + padding: 2px 4px; + -webkit-line-clamp: 1; + line-clamp: 1; + -webkit-box-orient: vertical; + max-width: 100px; } .mk-cell-option-item.mk-active { background: var(--mk-ui-active) !important; @@ -4296,15 +4328,6 @@ body:not(.is-mobile) .markdown-source-view.mod-cm6.is-readable-line-width .mk-sp .mk-cell-option-item input { margin: 0; } -.mk-cell-option-item > div { - padding: 2px 4px; - display: flex; - -webkit-line-clamp: 1; - line-clamp: 1; - -webkit-box-orient: vertical; - max-width: 100px; - overflow: hidden; -} .mk-cell-icon > div { display: flex; width: 16px; @@ -4314,10 +4337,7 @@ body:not(.is-mobile) .markdown-source-view.mod-cm6.is-readable-line-width .mk-sp .mk-cell-icon .mk-cell-placeholder { width: auto; } -.mk-cell-option-item { - --icon-container-size: 16px; -} -.mk-cell-option-item > div:hover { +.mk-cell-option-item:hover { background: var(--mk-ui-active-hover); } .mk-cell-fileprop { @@ -4444,16 +4464,32 @@ body:not(.is-mobile) .markdown-source-view.mod-cm6.is-readable-line-width .mk-sp .mk-cell-option span { flex-grow: 1; } -.mk-cell-option-select { +.mk-cell-option-placeholder { + color: var(--mk-ui-text-tertiary); +} +.mk-cell-option-select, +.mk-cell-option-remove { display: flex; align-items: center; + padding: 4px; + border-radius: 4px; +} +.mk-cell-option-select svg, +.mk-cell-option-remove svg { + color: var(--mk-ui-text-primary); +} +.mk-cell-option-select:hover, +.mk-cell-option-remove:hover { + background: var(--mk-ui-background-hover); } .mk-cell-option-new { visibility: hidden; background: rgba(var(--mono-rgb-100), 0.025); - padding: 2px; + padding: 4px; display: flex; border-radius: 4px; + height: 24px; + width: 24px; } .mk-cell-tags:hover .mk-cell-option-new, .mk-cell-link:hover .mk-cell-option-new,