From ae25864dac033f3436337f88a19a70b6bf9dcf9d Mon Sep 17 00:00:00 2001 From: Dmytro Date: Tue, 22 Feb 2022 20:48:13 +0200 Subject: [PATCH 01/11] Apply hungarian algorithm --- tracker.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tracker.js b/tracker.js index d51fa3c..a0e8891 100644 --- a/tracker.js +++ b/tracker.js @@ -43,7 +43,8 @@ const params = { distanceLimit: 10000, // The algorithm used to match tracks with new detections. Can be either // 'kdTree' or 'munkres'. - matchingAlgorithm: 'kdTree', + matchingAlgorithm: 'munkres', + // matchingAlgorithm: 'kdTree', } // A dictionary of itemTracked currently tracked @@ -124,7 +125,8 @@ exports.updateTrackedItemsWithNewFrame = function(detectionsOfThisFrame, frameNb } } }); - } else if (params.matchingAlgorithm === 'kdTree') { + } + else if (params.matchingAlgorithm === 'kdTree') { mapOfItemsTracked.forEach(function(itemTracked) { // First predict the new position of the itemTracked From 5c215e8eea65a65b5325aa6ec2dc6cfb8f3aa52f Mon Sep 17 00:00:00 2001 From: Dmytro Date: Sat, 2 Apr 2022 21:24:29 +0300 Subject: [PATCH 02/11] Add bundle parser, and bundle the code to one ESM module --- .babelrc.json | 3 + .gitignore | 1 + bundle.js | 3790 +++++++++++++++++++++++++++++++ package-lock.json | 5477 ++++++++++++++++++++++++++++++--------------- package.json | 17 +- rollup.config.js | 20 + 6 files changed, 7489 insertions(+), 1819 deletions(-) create mode 100644 .babelrc.json create mode 100644 bundle.js create mode 100644 rollup.config.js diff --git a/.babelrc.json b/.babelrc.json new file mode 100644 index 0000000..863493d --- /dev/null +++ b/.babelrc.json @@ -0,0 +1,3 @@ +{ + "presets": ["@babel/env"] +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index b7fb5b4..3335fbb 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ logs npm-debug.log* yarn-debug.log* yarn-error.log* +.idea # Runtime data pids diff --git a/bundle.js b/bundle.js new file mode 100644 index 0000000..d34e3a4 --- /dev/null +++ b/bundle.js @@ -0,0 +1,3790 @@ +function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); +} + +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); +} + +function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); +} + +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); +} + +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + + return arr2; +} + +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} + +var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + +var tracker = {}; + +var ItemTracked$1 = {}; + +var rngBrowser = {exports: {}}; + +// browser this is a little complicated due to unknown quality of Math.random() +// and inconsistent support for the `crypto` API. We do the best we can via +// feature-detection +// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. + +var getRandomValues = typeof crypto != 'undefined' && crypto.getRandomValues.bind(crypto) || typeof msCrypto != 'undefined' && msCrypto.getRandomValues.bind(msCrypto); + +if (getRandomValues) { + // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto + var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef + + rngBrowser.exports = function whatwgRNG() { + getRandomValues(rnds8); + return rnds8; + }; +} else { + // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). It's fast, but is of unspecified + // quality. + var rnds = new Array(16); + + rngBrowser.exports = function mathRNG() { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) r = Math.random() * 0x100000000; + rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return rnds; + }; +} + +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +var byteToHex = []; + +for (var i = 0; i < 256; ++i) { + byteToHex[i] = (i + 0x100).toString(16).substr(1); +} + +function bytesToUuid$1(buf, offset) { + var i = offset || 0; + var bth = byteToHex; + return bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]]; +} + +var bytesToUuid_1 = bytesToUuid$1; + +var rng = rngBrowser.exports; +var bytesToUuid = bytesToUuid_1; + +function v4(options, buf, offset) { + var i = buf && offset || 0; + + if (typeof options == 'string') { + buf = options === 'binary' ? new Array(16) : null; + options = null; + } + + options = options || {}; + var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || bytesToUuid(rnds); +} + +var v4_1 = v4; + +var utils = {}; + +utils.isDetectionTooLarge = function (detections, largestAllowed) { + if (detections.w >= largestAllowed) { + return true; + } else { + return false; + } +}; + +var isInsideArea = function isInsideArea(area, point) { + var xMin = area.x - area.w / 2; + var xMax = area.x + area.w / 2; + var yMin = area.y - area.h / 2; + var yMax = area.y + area.h / 2; + + if (point.x >= xMin && point.x <= xMax && point.y >= yMin && point.y <= yMax) { + return true; + } else { + return false; + } +}; + +utils.isInsideArea = isInsideArea; + +utils.isInsideSomeAreas = function (areas, point) { + var isInside = areas.some(function (area) { + return isInsideArea(area, point); + }); + return isInside; +}; + +utils.ignoreObjectsNotToDetect = function (detections, objectsToDetect) { + return detections.filter(function (detection) { + return objectsToDetect.indexOf(detection.name) > -1; + }); +}; + +var getRectangleEdges = function getRectangleEdges(item) { + return { + x0: item.x - item.w / 2, + y0: item.y - item.h / 2, + x1: item.x + item.w / 2, + y1: item.y + item.h / 2 + }; +}; + +utils.getRectangleEdges = getRectangleEdges; + +utils.iouAreas = function (item1, item2) { + var rect1 = getRectangleEdges(item1); + var rect2 = getRectangleEdges(item2); // Get overlap rectangle + + var overlap_x0 = Math.max(rect1.x0, rect2.x0); + var overlap_y0 = Math.max(rect1.y0, rect2.y0); + var overlap_x1 = Math.min(rect1.x1, rect2.x1); + var overlap_y1 = Math.min(rect1.y1, rect2.y1); // if there an overlap + + if (overlap_x1 - overlap_x0 <= 0 || overlap_y1 - overlap_y0 <= 0) { + // no overlap + return 0; + } else { + area_rect1 = item1.w * item1.h; + area_rect2 = item2.w * item2.h; + area_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0); + area_union = area_rect1 + area_rect2 - area_intersection; + return area_intersection / area_union; + } +}; + +utils.computeVelocityVector = function (item1, item2, nbFrame) { + return { + dx: (item2.x - item1.x) / nbFrame, + dy: (item2.y - item1.y) / nbFrame + }; +}; +/* + + computeBearingIn360 + + dY + + ^ XX + | XXX + | XX + | XX + | XX + | XXX + | XX + | XX + | XX bearing = this angle in degree + | XX + |XX ++----------------------XX-----------------------> dX + | + | + | + | + | + | + | + | + | + | + | + + + +*/ + + +utils.computeBearingIn360 = function (dx, dy) { + var angle = Math.atan(dx / dy) / (Math.PI / 180); + + if (angle > 0) { + if (dy > 0) return angle;else return 180 + angle; + } else { + if (dx > 0) return 180 + angle;else return 360 + angle; + } +}; + +var uuidv4 = v4_1; +var computeBearingIn360 = utils.computeBearingIn360; +var computeVelocityVector = utils.computeVelocityVector; // Properties example +// { +// "x": 1021, +// "y": 65, +// "w": 34, +// "h": 27, +// "confidence": 26, +// "name": "car" +// } +// Use a simple incremental unique id for the display + +var idDisplay = 0; + +ItemTracked$1.ItemTracked = function (properties, frameNb, unMatchedFramesTolerance, fastDelete) { + var DEFAULT_UNMATCHEDFRAMES_TOLERANCE = unMatchedFramesTolerance; + var itemTracked = {}; // ==== Private ===== + // Am I available to be matched? + + itemTracked.available = true; // Should I be deleted? + + itemTracked["delete"] = false; + itemTracked.fastDelete = fastDelete; // How many unmatched frame should I survive? + + itemTracked.frameUnmatchedLeftBeforeDying = unMatchedFramesTolerance; + itemTracked.isZombie = false; + itemTracked.appearFrame = frameNb; + itemTracked.disappearFrame = null; + itemTracked.disappearArea = {}; // Keep track of the most counted class + + itemTracked.nameCount = {}; + itemTracked.nameCount[properties.name] = 1; // ==== Public ===== + + itemTracked.x = properties.x; + itemTracked.y = properties.y; + itemTracked.w = properties.w; + itemTracked.h = properties.h; + itemTracked.name = properties.name; + itemTracked.confidence = properties.confidence; + itemTracked.itemHistory = []; + itemTracked.itemHistory.push({ + x: properties.x, + y: properties.y, + w: properties.w, + h: properties.h, + confidence: properties.confidence + }); + itemTracked.velocity = { + dx: 0, + dy: 0 + }; + itemTracked.nbTimeMatched = 1; // Assign an unique id to each Item tracked + + itemTracked.id = uuidv4(); // Use an simple id for the display and debugging + + itemTracked.idDisplay = idDisplay; + idDisplay++; // Give me a new location / size + + itemTracked.update = function (properties, frameNb) { + // if it was zombie and disappear frame was set, reset it to null + if (this.disappearFrame) { + this.disappearFrame = null; + this.disappearArea = {}; + } + + this.isZombie = false; + this.nbTimeMatched += 1; + this.x = properties.x; + this.y = properties.y; + this.w = properties.w; + this.h = properties.h; + this.confidence = properties.confidence; + this.itemHistory.push({ + x: this.x, + y: this.y, + w: this.w, + h: this.h, + confidence: this.confidence + }); + this.name = properties.name; + + if (this.nameCount[properties.name]) { + this.nameCount[properties.name]++; + } else { + this.nameCount[properties.name] = 1; + } // Reset dying counter + + + this.frameUnmatchedLeftBeforeDying = DEFAULT_UNMATCHEDFRAMES_TOLERANCE; // Compute new velocityVector based on last positions history + + this.velocity = this.updateVelocityVector(); + }; + + itemTracked.makeAvailable = function () { + this.available = true; + return this; + }; + + itemTracked.makeUnavailable = function () { + this.available = false; + return this; + }; + + itemTracked.countDown = function (frameNb) { + // Set frame disappear number + if (this.disappearFrame === null) { + this.disappearFrame = frameNb; + this.disappearArea = { + x: this.x, + y: this.y, + w: this.w, + h: this.h + }; + } + + this.frameUnmatchedLeftBeforeDying--; + this.isZombie = true; // If it was matched less than 1 time, it should die quick + + if (this.fastDelete && this.nbTimeMatched <= 1) { + this.frameUnmatchedLeftBeforeDying = -1; + } + }; + + itemTracked.updateTheoricalPositionAndSize = function () { + this.itemHistory.push({ + x: this.x, + y: this.y, + w: this.w, + h: this.h, + confidence: this.confidence + }); + this.x = this.x + this.velocity.dx; + this.y = this.y + this.velocity.dy; + }; + + itemTracked.predictNextPosition = function () { + return { + x: this.x + this.velocity.dx, + y: this.y + this.velocity.dy, + w: this.w, + h: this.h + }; + }; + + itemTracked.isDead = function () { + return this.frameUnmatchedLeftBeforeDying < 0; + }; // Velocity vector based on the last 15 frames + + + itemTracked.updateVelocityVector = function () { + var AVERAGE_NBFRAME = 15; + + if (this.itemHistory.length <= AVERAGE_NBFRAME) { + return computeVelocityVector(this.itemHistory[0], this.itemHistory[this.itemHistory.length - 1], this.itemHistory.length); + } else { + return computeVelocityVector(this.itemHistory[this.itemHistory.length - AVERAGE_NBFRAME], this.itemHistory[this.itemHistory.length - 1], AVERAGE_NBFRAME); + } + }; + + itemTracked.getMostlyMatchedName = function () { + var _this = this; + + var nameMostlyMatchedOccurences = 0; + var nameMostlyMatched = ''; + Object.keys(this.nameCount).map(function (name) { + if (_this.nameCount[name] > nameMostlyMatchedOccurences) { + nameMostlyMatched = name; + nameMostlyMatchedOccurences = _this.nameCount[name]; + } + }); + return nameMostlyMatched; + }; + + itemTracked.toJSONDebug = function () { + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return { + id: this.id, + idDisplay: this.idDisplay, + x: roundInt ? parseInt(this.x, 10) : this.x, + y: roundInt ? parseInt(this.y, 10) : this.y, + w: roundInt ? parseInt(this.w, 10) : this.w, + h: roundInt ? parseInt(this.h, 10) : this.h, + confidence: Math.round(this.confidence * 100) / 100, + // Here we negate dy to be in "normal" carthesian coordinates + bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy)), + name: this.getMostlyMatchedName(), + isZombie: this.isZombie, + appearFrame: this.appearFrame, + disappearFrame: this.disappearFrame + }; + }; + + itemTracked.toJSON = function () { + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return { + id: this.idDisplay, + x: roundInt ? parseInt(this.x, 10) : this.x, + y: roundInt ? parseInt(this.y, 10) : this.y, + w: roundInt ? parseInt(this.w, 10) : this.w, + h: roundInt ? parseInt(this.h, 10) : this.h, + confidence: Math.round(this.confidence * 100) / 100, + // Here we negate dy to be in "normal" carthesian coordinates + bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy), 10), + name: this.getMostlyMatchedName(), + isZombie: this.isZombie + }; + }; + + itemTracked.toMOT = function (frameIndex) { + return "".concat(frameIndex, ",").concat(this.idDisplay, ",").concat(this.x - this.w / 2, ",").concat(this.y - this.h / 2, ",").concat(this.w, ",").concat(this.h, ",").concat(this.confidence / 100, ",-1,-1,-1"); + }; + + itemTracked.toJSONGenericInfo = function () { + return { + id: this.id, + idDisplay: this.idDisplay, + appearFrame: this.appearFrame, + disappearFrame: this.disappearFrame, + disappearArea: this.disappearArea, + nbActiveFrame: this.disappearFrame - this.appearFrame, + name: this.getMostlyMatchedName() + }; + }; + + return itemTracked; +}; + +ItemTracked$1.reset = function () { + idDisplay = 0; +}; + +var kdTreeMin = {}; + +/** + * k-d Tree JavaScript - V 1.01 + * + * https://github.com/ubilabs/kd-tree-javascript + * + * @author Mircea Pricop , 2012 + * @author Martin Kleppe , 2012 + * @author Ubilabs http://ubilabs.net, 2012 + * @license MIT License + */ + +(function (exports) { + (function (e, t) { + { + t(exports); + } + })(commonjsGlobal, function (e) { + function t(e, t, n) { + this.obj = e; + this.left = null; + this.right = null; + this.parent = n; + this.dimension = t; + } + + function n(e, n, i) { + function o(e, n, r) { + var s = n % i.length, + u, + a; + + if (e.length === 0) { + return null; + } + + if (e.length === 1) { + return new t(e[0], s, r); + } + + e.sort(function (e, t) { + return e[i[s]] - t[i[s]]; + }); + u = Math.floor(e.length / 2); + a = new t(e[u], s, r); + a.left = o(e.slice(0, u), n + 1, a); + a.right = o(e.slice(u + 1), n + 1, a); + return a; + } + + function u(e) { + function t(e) { + if (e.left) { + e.left.parent = e; + t(e.left); + } + + if (e.right) { + e.right.parent = e; + t(e.right); + } + } + + s.root = e; + t(s.root); + } + + var s = this; + if (!Array.isArray(e)) u(e);else this.root = o(e, 0, null); + + this.toJSON = function (e) { + if (!e) e = this.root; + var n = new t(e.obj, e.dimension, null); + if (e.left) n.left = s.toJSON(e.left); + if (e.right) n.right = s.toJSON(e.right); + return n; + }; + + this.insert = function (e) { + function n(t, r) { + if (t === null) { + return r; + } + + var s = i[t.dimension]; + + if (e[s] < t.obj[s]) { + return n(t.left, t); + } else { + return n(t.right, t); + } + } + + var r = n(this.root, null), + s, + o; + + if (r === null) { + this.root = new t(e, 0, null); + return; + } + + s = new t(e, (r.dimension + 1) % i.length, r); + o = i[r.dimension]; + + if (e[o] < r.obj[o]) { + r.left = s; + } else { + r.right = s; + } + }; + + this.remove = function (e) { + function n(t) { + if (t === null) { + return null; + } + + if (t.obj === e) { + return t; + } + + var r = i[t.dimension]; + + if (e[r] < t.obj[r]) { + return n(t.left); + } else { + return n(t.right); + } + } + + function r(e) { + function u(e, t) { + var n, r, s, o, a; + + if (e === null) { + return null; + } + + n = i[t]; + + if (e.dimension === t) { + if (e.right !== null) { + return u(e.right, t); + } + + return e; + } + + r = e.obj[n]; + s = u(e.left, t); + o = u(e.right, t); + a = e; + + if (s !== null && s.obj[n] > r) { + a = s; + } + + if (o !== null && o.obj[n] > a.obj[n]) { + a = o; + } + + return a; + } + + function a(e, t) { + var n, r, s, o, u; + + if (e === null) { + return null; + } + + n = i[t]; + + if (e.dimension === t) { + if (e.left !== null) { + return a(e.left, t); + } + + return e; + } + + r = e.obj[n]; + s = a(e.left, t); + o = a(e.right, t); + u = e; + + if (s !== null && s.obj[n] < r) { + u = s; + } + + if (o !== null && o.obj[n] < u.obj[n]) { + u = o; + } + + return u; + } + + var t, n, o; + + if (e.left === null && e.right === null) { + if (e.parent === null) { + s.root = null; + return; + } + + o = i[e.parent.dimension]; + + if (e.obj[o] < e.parent.obj[o]) { + e.parent.left = null; + } else { + e.parent.right = null; + } + + return; + } + + if (e.left !== null) { + t = u(e.left, e.dimension); + } else { + t = a(e.right, e.dimension); + } + + n = t.obj; + r(t); + e.obj = n; + } + + var t; + t = n(s.root); + + if (t === null) { + return; + } + + r(t); + }; + + this.nearest = function (e, t, o) { + function l(r) { + function d(e, n) { + f.push([e, n]); + + if (f.size() > t) { + f.pop(); + } + } + + var s, + o = i[r.dimension], + u = n(e, r.obj), + a = {}, + c, + h, + p; + + for (p = 0; p < i.length; p += 1) { + if (p === r.dimension) { + a[i[p]] = e[i[p]]; + } else { + a[i[p]] = r.obj[i[p]]; + } + } + + c = n(a, r.obj); + + if (r.right === null && r.left === null) { + if (f.size() < t || u < f.peek()[1]) { + d(r, u); + } + + return; + } + + if (r.right === null) { + s = r.left; + } else if (r.left === null) { + s = r.right; + } else { + if (e[o] < r.obj[o]) { + s = r.left; + } else { + s = r.right; + } + } + + l(s); + + if (f.size() < t || u < f.peek()[1]) { + d(r, u); + } + + if (f.size() < t || Math.abs(c) < f.peek()[1]) { + if (s === r.left) { + h = r.right; + } else { + h = r.left; + } + + if (h !== null) { + l(h); + } + } + } + + var u, a, f; + f = new r(function (e) { + return -e[1]; + }); + + if (o) { + for (u = 0; u < t; u += 1) { + f.push([null, o]); + } + } + + l(s.root); + a = []; + + for (u = 0; u < t; u += 1) { + if (f.content[u][0]) { + a.push([f.content[u][0].obj, f.content[u][1]]); + } + } + + return a; + }; + + this.balanceFactor = function () { + function e(t) { + if (t === null) { + return 0; + } + + return Math.max(e(t.left), e(t.right)) + 1; + } + + function t(e) { + if (e === null) { + return 0; + } + + return t(e.left) + t(e.right) + 1; + } + + return e(s.root) / (Math.log(t(s.root)) / Math.log(2)); + }; + } + + function r(e) { + this.content = []; + this.scoreFunction = e; + } + + r.prototype = { + push: function push(e) { + this.content.push(e); + this.bubbleUp(this.content.length - 1); + }, + pop: function pop() { + var e = this.content[0]; + var t = this.content.pop(); + + if (this.content.length > 0) { + this.content[0] = t; + this.sinkDown(0); + } + + return e; + }, + peek: function peek() { + return this.content[0]; + }, + remove: function remove(e) { + var t = this.content.length; + + for (var n = 0; n < t; n++) { + if (this.content[n] == e) { + var r = this.content.pop(); + + if (n != t - 1) { + this.content[n] = r; + if (this.scoreFunction(r) < this.scoreFunction(e)) this.bubbleUp(n);else this.sinkDown(n); + } + + return; + } + } + + throw new Error("Node not found."); + }, + size: function size() { + return this.content.length; + }, + bubbleUp: function bubbleUp(e) { + var t = this.content[e]; + + while (e > 0) { + var n = Math.floor((e + 1) / 2) - 1, + r = this.content[n]; + + if (this.scoreFunction(t) < this.scoreFunction(r)) { + this.content[n] = t; + this.content[e] = r; + e = n; + } else { + break; + } + } + }, + sinkDown: function sinkDown(e) { + var t = this.content.length, + n = this.content[e], + r = this.scoreFunction(n); + + while (true) { + var i = (e + 1) * 2, + s = i - 1; + var o = null; + + if (s < t) { + var u = this.content[s], + a = this.scoreFunction(u); + if (a < r) o = s; + } + + if (i < t) { + var f = this.content[i], + l = this.scoreFunction(f); + + if (l < (o == null ? r : a)) { + o = i; + } + } + + if (o != null) { + this.content[e] = this.content[o]; + this.content[o] = n; + e = o; + } else { + break; + } + } + } + }; + this.kdTree = n; + e.kdTree = n; + e.BinaryHeap = r; + }); +})(kdTreeMin); + +var lodash_isequal = {exports: {}}; + +/** + * Lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright JS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +(function (module, exports) { + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + /** Used to stand-in for `undefined` hash values. */ + + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + /** Used to compose bitmasks for value comparisons. */ + + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + /** Used as references for various `Number` constants. */ + + var MAX_SAFE_INTEGER = 9007199254740991; + /** `Object#toString` result references. */ + + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]'; + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + /** Used to detect host constructors (Safari). */ + + var reIsHostCtor = /^\[object .+?Constructor\]$/; + /** Used to detect unsigned integer values. */ + + var reIsUint = /^(?:0|[1-9]\d*)$/; + /** Used to identify `toStringTag` values of typed arrays. */ + + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + /** Detect free variable `global` from Node.js. */ + + var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + /** Detect free variable `self`. */ + + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + /** Used as a reference to the global object. */ + + var root = freeGlobal || freeSelf || Function('return this')(); + /** Detect free variable `exports`. */ + + var freeExports = exports && !exports.nodeType && exports; + /** Detect free variable `module`. */ + + var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; + /** Detect the popular CommonJS extension `module.exports`. */ + + var moduleExports = freeModule && freeModule.exports === freeExports; + /** Detect free variable `process` from Node.js. */ + + var freeProcess = moduleExports && freeGlobal.process; + /** Used to access faster Node.js helpers. */ + + var nodeUtil = function () { + try { + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + }(); + /* Node.js helper references. */ + + + var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + + return result; + } + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + + + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + + return array; + } + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + + + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + + return false; + } + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + + + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + + return result; + } + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + + + function baseUnary(func) { + return function (value) { + return func(value); + }; + } + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function cacheHas(cache, key) { + return cache.has(key); + } + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + + + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + + + function mapToArray(map) { + var index = -1, + result = Array(map.size); + map.forEach(function (value, key) { + result[++index] = [key, value]; + }); + return result; + } + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + + + function overArg(func, transform) { + return function (arg) { + return func(transform(arg)); + }; + } + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + + + function setToArray(set) { + var index = -1, + result = Array(set.size); + set.forEach(function (value) { + result[++index] = value; + }); + return result; + } + /** Used for built-in method references. */ + + + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + /** Used to detect overreaching core-js shims. */ + + var coreJsData = root['__core-js_shared__']; + /** Used to resolve the decompiled source of functions. */ + + var funcToString = funcProto.toString; + /** Used to check objects for own properties. */ + + var hasOwnProperty = objectProto.hasOwnProperty; + /** Used to detect methods masquerading as native. */ + + var maskSrcKey = function () { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? 'Symbol(src)_1.' + uid : ''; + }(); + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + + + var nativeObjectToString = objectProto.toString; + /** Used to detect if a method is native. */ + + var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); + /** Built-in value references. */ + + var Buffer = moduleExports ? root.Buffer : undefined, + Symbol = root.Symbol, + Uint8Array = root.Uint8Array, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + /* Built-in method references for those with the same name as other `lodash` methods. */ + + var nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeKeys = overArg(Object.keys, Object); + /* Built-in method references that are verified to be native. */ + + var DataView = getNative(root, 'DataView'), + Map = getNative(root, 'Map'), + Promise = getNative(root, 'Promise'), + Set = getNative(root, 'Set'), + WeakMap = getNative(root, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + /** Used to detect maps, sets, and weakmaps. */ + + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + /** Used to convert symbols to primitives and strings. */ + + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + this.clear(); + + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + + + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function hashGet(key) { + var data = this.__data__; + + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); + } + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + + + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value; + return this; + } // Add methods to `Hash`. + + + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + this.clear(); + + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + + + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + + var lastIndex = data.length - 1; + + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + + --this.size; + return true; + } + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + return index < 0 ? undefined : data[index][1]; + } + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + + + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + + return this; + } // Add methods to `ListCache`. + + + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + this.clear(); + + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + + + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash(), + 'map': new (Map || ListCache)(), + 'string': new Hash() + }; + } + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + + + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } // Add methods to `MapCache`. + + + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + this.__data__ = new MapCache(); + + while (++index < length) { + this.add(values[index]); + } + } + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + + + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + + return this; + } + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + + + function setCacheHas(value) { + return this.__data__.has(value); + } // Add methods to `SetCache`. + + + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + + + function stackClear() { + this.__data__ = new ListCache(); + this.size = 0; + } + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + this.size = data.size; + return result; + } + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function stackGet(key) { + return this.__data__.get(key); + } + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function stackHas(key) { + return this.__data__.has(key); + } + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + + + function stackSet(key, value) { + var data = this.__data__; + + if (data instanceof ListCache) { + var pairs = data.__data__; + + if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + + data = this.__data__ = new MapCache(pairs); + } + + data.set(key, value); + this.size = data.size; + return this; + } // Add methods to `Stack`. + + + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. + isBuff && (key == 'offset' || key == 'parent') || // PhantomJS 2 has enumerable non-index properties on typed arrays. + isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || // Skip index properties. + isIndex(key, length)))) { + result.push(key); + } + } + + return result; + } + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + + + function assocIndexOf(array, key) { + var length = array.length; + + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + + return -1; + } + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + + + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + + + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + + return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); + } + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + + + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + + + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + + if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) { + return value !== value && other !== other; + } + + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + + + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + + objIsArr = true; + objIsObj = false; + } + + if (isSameTag && !objIsObj) { + stack || (stack = new Stack()); + return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + stack || (stack = new Stack()); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + + if (!isSameTag) { + return false; + } + + stack || (stack = new Stack()); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + + + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + + + function baseIsTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + + + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + + var result = []; + + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + + return result; + } + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + + + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } // Assume cyclic values are equal. + + + var stacked = stack.get(array); + + if (stacked && stack.get(other)) { + return stacked == other; + } + + var index = -1, + result = true, + seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined; + stack.set(array, other); + stack.set(other, array); // Ignore non-index properties. + + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); + } + + if (compared !== undefined) { + if (compared) { + continue; + } + + result = false; + break; + } // Recursively compare arrays (susceptible to call stack limits). + + + if (seen) { + if (!arraySome(other, function (othValue, othIndex) { + if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + result = false; + break; + } + } + + stack['delete'](array); + stack['delete'](other); + return result; + } + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + + + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { + return false; + } + + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == other + ''; + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } // Assume cyclic values are equal. + + + var stacked = stack.get(object); + + if (stacked) { + return stacked == other; + } + + bitmask |= COMPARE_UNORDERED_FLAG; // Recursively compare objects (susceptible to call stack limits). + + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + + } + + return false; + } + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + + + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + + var index = objLength; + + while (index--) { + var key = objProps[index]; + + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } // Assume cyclic values are equal. + + + var stacked = stack.get(object); + + if (stacked && stack.get(other)) { + return stacked == other; + } + + var result = true; + stack.set(object, other); + stack.set(other, object); + var skipCtor = isPartial; + + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); + } // Recursively compare objects (susceptible to call stack limits). + + + if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { + result = false; + break; + } + + skipCtor || (skipCtor = key == 'constructor'); + } + + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. + + if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + + stack['delete'](object); + stack['delete'](other); + return result; + } + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + + + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + + + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; + } + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + + + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + + + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + + return result; + } + /** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + + + var getSymbols = !nativeGetSymbols ? stubArray : function (object) { + if (object == null) { + return []; + } + + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function (symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + + var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + + if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) { + getTag = function (value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag; + + case mapCtorString: + return mapTag; + + case promiseCtorString: + return promiseTag; + + case setCtorString: + return setTag; + + case weakMapCtorString: + return weakMapTag; + } + } + + return result; + }; + } + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + + + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length; + } + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + + + function isKeyable(value) { + var type = typeof value; + return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null; + } + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + + + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + + + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = typeof Ctor == 'function' && Ctor.prototype || objectProto; + return value === proto; + } + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + + + function objectToString(value) { + return nativeObjectToString.call(value); + } + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + + + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + + try { + return func + ''; + } catch (e) {} + } + + return ''; + } + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + + + function eq(value, other) { + return value === other || value !== value && other !== other; + } + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + + + var isArguments = baseIsArguments(function () { + return arguments; + }()) ? baseIsArguments : function (value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); + }; + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + + var isArray = Array.isArray; + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + + + var isBuffer = nativeIsBuffer || stubFalse; + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + + function isEqual(value, other) { + return baseIsEqual(value, other); + } + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + + + function isFunction(value) { + if (!isObject(value)) { + return false; + } // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + + + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + + + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + + + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + + + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + + + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + /** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ + + + function stubArray() { + return []; + } + /** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ + + + function stubFalse() { + return false; + } + + module.exports = isEqual; +})(lodash_isequal, lodash_isequal.exports); + +var munkres$1 = {exports: {}}; + +/** + * Introduction + * ============ + * + * The Munkres module provides an implementation of the Munkres algorithm + * (also called the Hungarian algorithm or the Kuhn-Munkres algorithm), + * useful for solving the Assignment Problem. + * + * Assignment Problem + * ================== + * + * Let C be an n×n-matrix representing the costs of each of n workers + * to perform any of n jobs. The assignment problem is to assign jobs to + * workers in a way that minimizes the total cost. Since each worker can perform + * only one job and each job can be assigned to only one worker the assignments + * represent an independent set of the matrix C. + * + * One way to generate the optimal set is to create all permutations of + * the indices necessary to traverse the matrix so that no row and column + * are used more than once. For instance, given this matrix (expressed in + * Python) + * + * matrix = [[5, 9, 1], + * [10, 3, 2], + * [8, 7, 4]] + * + * You could use this code to generate the traversal indices:: + * + * def permute(a, results): + * if len(a) == 1: + * results.insert(len(results), a) + * + * else: + * for i in range(0, len(a)): + * element = a[i] + * a_copy = [a[j] for j in range(0, len(a)) if j != i] + * subresults = [] + * permute(a_copy, subresults) + * for subresult in subresults: + * result = [element] + subresult + * results.insert(len(results), result) + * + * results = [] + * permute(range(len(matrix)), results) # [0, 1, 2] for a 3x3 matrix + * + * After the call to permute(), the results matrix would look like this:: + * + * [[0, 1, 2], + * [0, 2, 1], + * [1, 0, 2], + * [1, 2, 0], + * [2, 0, 1], + * [2, 1, 0]] + * + * You could then use that index matrix to loop over the original cost matrix + * and calculate the smallest cost of the combinations + * + * n = len(matrix) + * minval = sys.maxsize + * for row in range(n): + * cost = 0 + * for col in range(n): + * cost += matrix[row][col] + * minval = min(cost, minval) + * + * print minval + * + * While this approach works fine for small matrices, it does not scale. It + * executes in O(n!) time: Calculating the permutations for an n×x-matrix + * requires n! operations. For a 12×12 matrix, that’s 479,001,600 + * traversals. Even if you could manage to perform each traversal in just one + * millisecond, it would still take more than 133 hours to perform the entire + * traversal. A 20×20 matrix would take 2,432,902,008,176,640,000 operations. At + * an optimistic millisecond per operation, that’s more than 77 million years. + * + * The Munkres algorithm runs in O(n³) time, rather than O(n!). This + * package provides an implementation of that algorithm. + * + * This version is based on + * http://csclab.murraystate.edu/~bob.pilgrim/445/munkres.html + * + * This version was originally written for Python by Brian Clapper from the + * algorithm at the above web site (The ``Algorithm::Munkres`` Perl version, + * in CPAN, was clearly adapted from the same web site.) and ported to + * JavaScript by Anna Henningsen (addaleax). + * + * Usage + * ===== + * + * Construct a Munkres object + * + * var m = new Munkres(); + * + * Then use it to compute the lowest cost assignment from a cost matrix. Here’s + * a sample program + * + * var matrix = [[5, 9, 1], + * [10, 3, 2], + * [8, 7, 4]]; + * var m = new Munkres(); + * var indices = m.compute(matrix); + * console.log(format_matrix(matrix), 'Lowest cost through this matrix:'); + * var total = 0; + * for (var i = 0; i < indices.length; ++i) { + * var row = indices[l][0], col = indices[l][1]; + * var value = matrix[row][col]; + * total += value; + * + * console.log('(' + rol + ', ' + col + ') -> ' + value); + * } + * + * console.log('total cost:', total); + * + * Running that program produces:: + * + * Lowest cost through this matrix: + * [5, 9, 1] + * [10, 3, 2] + * [8, 7, 4] + * (0, 0) -> 5 + * (1, 1) -> 3 + * (2, 2) -> 4 + * total cost: 12 + * + * The instantiated Munkres object can be used multiple times on different + * matrices. + * + * Non-square Cost Matrices + * ======================== + * + * The Munkres algorithm assumes that the cost matrix is square. However, it's + * possible to use a rectangular matrix if you first pad it with 0 values to make + * it square. This module automatically pads rectangular cost matrices to make + * them square. + * + * Notes: + * + * - The module operates on a *copy* of the caller's matrix, so any padding will + * not be seen by the caller. + * - The cost matrix must be rectangular or square. An irregular matrix will + * *not* work. + * + * Calculating Profit, Rather than Cost + * ==================================== + * + * The cost matrix is just that: A cost matrix. The Munkres algorithm finds + * the combination of elements (one from each row and column) that results in + * the smallest cost. It’s also possible to use the algorithm to maximize + * profit. To do that, however, you have to convert your profit matrix to a + * cost matrix. The simplest way to do that is to subtract all elements from a + * large value. + * + * The ``munkres`` module provides a convenience method for creating a cost + * matrix from a profit matrix, i.e. make_cost_matrix. + * + * References + * ========== + * + * 1. http://www.public.iastate.edu/~ddoty/HungarianAlgorithm.html + * + * 2. Harold W. Kuhn. The Hungarian Method for the assignment problem. + * *Naval Research Logistics Quarterly*, 2:83-97, 1955. + * + * 3. Harold W. Kuhn. Variants of the Hungarian method for assignment + * problems. *Naval Research Logistics Quarterly*, 3: 253-258, 1956. + * + * 4. Munkres, J. Algorithms for the Assignment and Transportation Problems. + * *Journal of the Society of Industrial and Applied Mathematics*, + * 5(1):32-38, March, 1957. + * + * 5. https://en.wikipedia.org/wiki/Hungarian_algorithm + * + * Copyright and License + * ===================== + * + * Copyright 2008-2016 Brian M. Clapper + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function (module) { + /** + * A very large numerical value which can be used like an integer + * (i. e., adding integers of similar size does not result in overflow). + */ + var MAX_SIZE = parseInt(Number.MAX_SAFE_INTEGER / 2) || (1 << 26) * (1 << 26); + /** + * A default value to pad the cost matrix with if it is not quadratic. + */ + + var DEFAULT_PAD_VALUE = 0; // --------------------------------------------------------------------------- + // Classes + // --------------------------------------------------------------------------- + + /** + * Calculate the Munkres solution to the classical assignment problem. + * See the module documentation for usage. + * @constructor + */ + + function Munkres() { + this.C = null; + this.row_covered = []; + this.col_covered = []; + this.n = 0; + this.Z0_r = 0; + this.Z0_c = 0; + this.marked = null; + this.path = null; + } + /** + * Pad a possibly non-square matrix to make it square. + * + * @param {Array} matrix An array of arrays containing the matrix cells + * @param {Number} [pad_value] The value used to pad a rectangular matrix + * + * @return {Array} An array of arrays representing the padded matrix + */ + + + Munkres.prototype.pad_matrix = function (matrix, pad_value) { + pad_value = pad_value || DEFAULT_PAD_VALUE; + var max_columns = 0; + var total_rows = matrix.length; + var i; + + for (i = 0; i < total_rows; ++i) if (matrix[i].length > max_columns) max_columns = matrix[i].length; + + total_rows = max_columns > total_rows ? max_columns : total_rows; + var new_matrix = []; + + for (i = 0; i < total_rows; ++i) { + var row = matrix[i] || []; + var new_row = row.slice(); // If this row is too short, pad it + + while (total_rows > new_row.length) new_row.push(pad_value); + + new_matrix.push(new_row); + } + + return new_matrix; + }; + /** + * Compute the indices for the lowest-cost pairings between rows and columns + * in the database. Returns a list of (row, column) tuples that can be used + * to traverse the matrix. + * + * **WARNING**: This code handles square and rectangular matrices. + * It does *not* handle irregular matrices. + * + * @param {Array} cost_matrix The cost matrix. If this cost matrix is not square, + * it will be padded with DEFAULT_PAD_VALUE. Optionally, + * the pad value can be specified via options.padValue. + * This method does *not* modify the caller's matrix. + * It operates on a copy of the matrix. + * @param {Object} [options] Additional options to pass in + * @param {Number} [options.padValue] The value to use to pad a rectangular cost_matrix + * + * @return {Array} An array of ``(row, column)`` arrays that describe the lowest + * cost path through the matrix + */ + + + Munkres.prototype.compute = function (cost_matrix, options) { + options = options || {}; + options.padValue = options.padValue || DEFAULT_PAD_VALUE; + this.C = this.pad_matrix(cost_matrix, options.padValue); + this.n = this.C.length; + this.original_length = cost_matrix.length; + this.original_width = cost_matrix[0].length; + var nfalseArray = []; + /* array of n false values */ + + while (nfalseArray.length < this.n) nfalseArray.push(false); + + this.row_covered = nfalseArray.slice(); + this.col_covered = nfalseArray.slice(); + this.Z0_r = 0; + this.Z0_c = 0; + this.path = this.__make_matrix(this.n * 2, 0); + this.marked = this.__make_matrix(this.n, 0); + var step = 1; + var steps = { + 1: this.__step1, + 2: this.__step2, + 3: this.__step3, + 4: this.__step4, + 5: this.__step5, + 6: this.__step6 + }; + + while (true) { + var func = steps[step]; + if (!func) // done + break; + step = func.apply(this); + } + + var results = []; + + for (var i = 0; i < this.original_length; ++i) for (var j = 0; j < this.original_width; ++j) if (this.marked[i][j] == 1) results.push([i, j]); + + return results; + }; + /** + * Create an n×n matrix, populating it with the specific value. + * + * @param {Number} n Matrix dimensions + * @param {Number} val Value to populate the matrix with + * + * @return {Array} An array of arrays representing the newly created matrix + */ + + + Munkres.prototype.__make_matrix = function (n, val) { + var matrix = []; + + for (var i = 0; i < n; ++i) { + matrix[i] = []; + + for (var j = 0; j < n; ++j) matrix[i][j] = val; + } + + return matrix; + }; + /** + * For each row of the matrix, find the smallest element and + * subtract it from every element in its row. Go to Step 2. + */ + + + Munkres.prototype.__step1 = function () { + for (var i = 0; i < this.n; ++i) { + // Find the minimum value for this row and subtract that minimum + // from every element in the row. + var minval = Math.min.apply(Math, this.C[i]); + + for (var j = 0; j < this.n; ++j) this.C[i][j] -= minval; + } + + return 2; + }; + /** + * Find a zero (Z) in the resulting matrix. If there is no starred + * zero in its row or column, star Z. Repeat for each element in the + * matrix. Go to Step 3. + */ + + + Munkres.prototype.__step2 = function () { + for (var i = 0; i < this.n; ++i) { + for (var j = 0; j < this.n; ++j) { + if (this.C[i][j] === 0 && !this.col_covered[j] && !this.row_covered[i]) { + this.marked[i][j] = 1; + this.col_covered[j] = true; + this.row_covered[i] = true; + break; + } + } + } + + this.__clear_covers(); + + return 3; + }; + /** + * Cover each column containing a starred zero. If K columns are + * covered, the starred zeros describe a complete set of unique + * assignments. In this case, Go to DONE, otherwise, Go to Step 4. + */ + + + Munkres.prototype.__step3 = function () { + var count = 0; + + for (var i = 0; i < this.n; ++i) { + for (var j = 0; j < this.n; ++j) { + if (this.marked[i][j] == 1 && this.col_covered[j] == false) { + this.col_covered[j] = true; + ++count; + } + } + } + + return count >= this.n ? 7 : 4; + }; + /** + * Find a noncovered zero and prime it. If there is no starred zero + * in the row containing this primed zero, Go to Step 5. Otherwise, + * cover this row and uncover the column containing the starred + * zero. Continue in this manner until there are no uncovered zeros + * left. Save the smallest uncovered value and Go to Step 6. + */ + + + Munkres.prototype.__step4 = function () { + var done = false; + var row = -1, + col = -1, + star_col = -1; + + while (!done) { + var z = this.__find_a_zero(); + + row = z[0]; + col = z[1]; + if (row < 0) return 6; + this.marked[row][col] = 2; + star_col = this.__find_star_in_row(row); + + if (star_col >= 0) { + col = star_col; + this.row_covered[row] = true; + this.col_covered[col] = false; + } else { + this.Z0_r = row; + this.Z0_c = col; + return 5; + } + } + }; + /** + * Construct a series of alternating primed and starred zeros as + * follows. Let Z0 represent the uncovered primed zero found in Step 4. + * Let Z1 denote the starred zero in the column of Z0 (if any). + * Let Z2 denote the primed zero in the row of Z1 (there will always + * be one). Continue until the series terminates at a primed zero + * that has no starred zero in its column. Unstar each starred zero + * of the series, star each primed zero of the series, erase all + * primes and uncover every line in the matrix. Return to Step 3 + */ + + + Munkres.prototype.__step5 = function () { + var count = 0; + this.path[count][0] = this.Z0_r; + this.path[count][1] = this.Z0_c; + var done = false; + + while (!done) { + var row = this.__find_star_in_col(this.path[count][1]); + + if (row >= 0) { + count++; + this.path[count][0] = row; + this.path[count][1] = this.path[count - 1][1]; + } else { + done = true; + } + + if (!done) { + var col = this.__find_prime_in_row(this.path[count][0]); + + count++; + this.path[count][0] = this.path[count - 1][0]; + this.path[count][1] = col; + } + } + + this.__convert_path(this.path, count); + + this.__clear_covers(); + + this.__erase_primes(); + + return 3; + }; + /** + * Add the value found in Step 4 to every element of each covered + * row, and subtract it from every element of each uncovered column. + * Return to Step 4 without altering any stars, primes, or covered + * lines. + */ + + + Munkres.prototype.__step6 = function () { + var minval = this.__find_smallest(); + + for (var i = 0; i < this.n; ++i) { + for (var j = 0; j < this.n; ++j) { + if (this.row_covered[i]) this.C[i][j] += minval; + if (!this.col_covered[j]) this.C[i][j] -= minval; + } + } + + return 4; + }; + /** + * Find the smallest uncovered value in the matrix. + * + * @return {Number} The smallest uncovered value, or MAX_SIZE if no value was found + */ + + + Munkres.prototype.__find_smallest = function () { + var minval = MAX_SIZE; + + for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (!this.row_covered[i] && !this.col_covered[j]) if (minval > this.C[i][j]) minval = this.C[i][j]; + + return minval; + }; + /** + * Find the first uncovered element with value 0. + * + * @return {Array} The indices of the found element or [-1, -1] if not found + */ + + + Munkres.prototype.__find_a_zero = function () { + for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.C[i][j] === 0 && !this.row_covered[i] && !this.col_covered[j]) return [i, j]; + + return [-1, -1]; + }; + /** + * Find the first starred element in the specified row. Returns + * the column index, or -1 if no starred element was found. + * + * @param {Number} row The index of the row to search + * @return {Number} + */ + + + Munkres.prototype.__find_star_in_row = function (row) { + for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 1) return j; + + return -1; + }; + /** + * Find the first starred element in the specified column. + * + * @return {Number} The row index, or -1 if no starred element was found + */ + + + Munkres.prototype.__find_star_in_col = function (col) { + for (var i = 0; i < this.n; ++i) if (this.marked[i][col] == 1) return i; + + return -1; + }; + /** + * Find the first prime element in the specified row. + * + * @return {Number} The column index, or -1 if no prime element was found + */ + + + Munkres.prototype.__find_prime_in_row = function (row) { + for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 2) return j; + + return -1; + }; + + Munkres.prototype.__convert_path = function (path, count) { + for (var i = 0; i <= count; ++i) this.marked[path[i][0]][path[i][1]] = this.marked[path[i][0]][path[i][1]] == 1 ? 0 : 1; + }; + /** Clear all covered matrix cells */ + + + Munkres.prototype.__clear_covers = function () { + for (var i = 0; i < this.n; ++i) { + this.row_covered[i] = false; + this.col_covered[i] = false; + } + }; + /** Erase all prime markings */ + + + Munkres.prototype.__erase_primes = function () { + for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.marked[i][j] == 2) this.marked[i][j] = 0; + }; // --------------------------------------------------------------------------- + // Functions + // --------------------------------------------------------------------------- + + /** + * Create a cost matrix from a profit matrix by calling + * 'inversion_function' to invert each value. The inversion + * function must take one numeric argument (of any type) and return + * another numeric argument which is presumed to be the cost inverse + * of the original profit. + * + * This is a static method. Call it like this: + * + * cost_matrix = make_cost_matrix(matrix[, inversion_func]); + * + * For example: + * + * cost_matrix = make_cost_matrix(matrix, function(x) { return MAXIMUM - x; }); + * + * @param {Array} profit_matrix An array of arrays representing the matrix + * to convert from a profit to a cost matrix + * @param {Function} [inversion_function] The function to use to invert each + * entry in the profit matrix + * + * @return {Array} The converted matrix + */ + + + function make_cost_matrix(profit_matrix, inversion_function) { + var i, j; + + if (!inversion_function) { + var maximum = -1.0 / 0.0; + + for (i = 0; i < profit_matrix.length; ++i) for (j = 0; j < profit_matrix[i].length; ++j) if (profit_matrix[i][j] > maximum) maximum = profit_matrix[i][j]; + + inversion_function = function (x) { + return maximum - x; + }; + } + + var cost_matrix = []; + + for (i = 0; i < profit_matrix.length; ++i) { + var row = profit_matrix[i]; + cost_matrix[i] = []; + + for (j = 0; j < row.length; ++j) cost_matrix[i][j] = inversion_function(profit_matrix[i][j]); + } + + return cost_matrix; + } + /** + * Convenience function: Converts the contents of a matrix of integers + * to a printable string. + * + * @param {Array} matrix The matrix to print + * + * @return {String} The formatted matrix + */ + + + function format_matrix(matrix) { + var columnWidths = []; + var i, j; + + for (i = 0; i < matrix.length; ++i) { + for (j = 0; j < matrix[i].length; ++j) { + var entryWidth = String(matrix[i][j]).length; + if (!columnWidths[j] || entryWidth >= columnWidths[j]) columnWidths[j] = entryWidth; + } + } + + var formatted = ''; + + for (i = 0; i < matrix.length; ++i) { + for (j = 0; j < matrix[i].length; ++j) { + var s = String(matrix[i][j]); // pad at front with spaces + + while (s.length < columnWidths[j]) s = ' ' + s; + + formatted += s; // separate columns + + if (j != matrix[i].length - 1) formatted += ' '; + } + + if (i != matrix[i].length - 1) formatted += '\n'; + } + + return formatted; + } // --------------------------------------------------------------------------- + // Exports + // --------------------------------------------------------------------------- + + + function computeMunkres(cost_matrix, options) { + var m = new Munkres(); + return m.compute(cost_matrix, options); + } + + computeMunkres.version = "1.2.2"; + computeMunkres.format_matrix = format_matrix; + computeMunkres.make_cost_matrix = make_cost_matrix; + computeMunkres.Munkres = Munkres; // backwards compatibility + + if (module.exports) { + module.exports = computeMunkres; + } +})(munkres$1); + +var itemTrackedModule = ItemTracked$1; +var ItemTracked = itemTrackedModule.ItemTracked; +var kdTree = kdTreeMin.kdTree; +var iouAreas = utils.iouAreas; +var munkres = munkres$1.exports; + +var iouDistance = function iouDistance(item1, item2) { + // IOU distance, between 0 and 1 + // The smaller the less overlap + var iou = iouAreas(item1, item2); // Invert this as the KDTREESEARCH is looking for the smaller value + + var distance = 1 - iou; // If the overlap is iou < 0.95, exclude value + + if (distance > 1 - params.iouLimit) { + distance = params.distanceLimit + 1; + } + + return distance; +}; + +var params = { + // DEFAULT_UNMATCHEDFRAMES_TOLERANCE + // This the number of frame we wait when an object isn't matched before considering it gone + unMatchedFramesTolerance: 5, + // DEFAULT_IOU_LIMIT, exclude things from beeing matched if their IOU is lower than this + // 1 means total overlap whereas 0 means no overlap + iouLimit: 0.05, + // Remove new objects fast if they could not be matched in the next frames. + // Setting this to false ensures the object will stick around at least + // unMatchedFramesTolerance frames, even if they could neven be matched in + // subsequent frames. + fastDelete: true, + // The function to use to determine the distance between to detected objects + distanceFunc: iouDistance, + // The distance limit for matching. If values need to be excluded from + // matching set their distance to something greater than the distance limit + distanceLimit: 10000, + // The algorithm used to match tracks with new detections. Can be either + // 'kdTree' or 'munkres'. + matchingAlgorithm: 'munkres' // matchingAlgorithm: 'kdTree', + +}; // A dictionary of itemTracked currently tracked +// key: uuid +// value: ItemTracked object + +var mapOfItemsTracked = new Map(); // A dictionnary keeping memory of all tracked object (even after they disappear) +// Useful to ouput the file of all items tracked + +var mapOfAllItemsTracked = new Map(); // By default, we do not keep all the history in memory + +var keepAllHistoryInMemory = false; +var computeDistance = tracker.computeDistance = iouDistance; + +var updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameNb) { + // A kd-tree containing all the itemtracked + // Need to rebuild on each frame, because itemTracked positions have changed + var treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ["x", "y", "w", "h"]); // Contruct a kd tree for the detections of this frame + + var treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ["x", "y", "w", "h"]); // SCENARIO 1: itemsTracked map is empty + + if (mapOfItemsTracked.size === 0) { + // Just add every detected item as item Tracked + detectionsOfThisFrame.forEach(function (itemDetected) { + var newItemTracked = new ItemTracked(itemDetected, frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map + + mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree + + treeItemsTracked.insert(newItemTracked); + }); + } // SCENARIO 2: We already have itemsTracked in the map + else { + var matchedList = new Array(detectionsOfThisFrame.length); + matchedList.fill(false); // Match existing Tracked items with the items detected in the new frame + // For each look in the new detection to find the closest match + + if (detectionsOfThisFrame.length > 0) { + if (params.matchingAlgorithm === 'munkres') { + var trackedItemIds = Array.from(mapOfItemsTracked.keys()); + var costMatrix = Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { + var predictedPosition = itemTracked.predictNextPosition(); + return detectionsOfThisFrame.map(function (detection) { + return params.distanceFunc(predictedPosition, detection); + }); + }); + mapOfItemsTracked.forEach(function (itemTracked) { + itemTracked.makeAvailable(); + }); + munkres(costMatrix).filter(function (m) { + return costMatrix[m[0]][m[1]] <= params.distanceLimit; + }).forEach(function (m) { + var itemTracked = mapOfItemsTracked.get(trackedItemIds[m[0]]); + var updatedTrackedItemProperties = detectionsOfThisFrame[m[1]]; + matchedList[m[1]] = { + idDisplay: itemTracked.idDisplay + }; + itemTracked.makeUnavailable().update(updatedTrackedItemProperties, frameNb); + }); + matchedList.forEach(function (matched, index) { + if (!matched) { + if (Math.min.apply(Math, _toConsumableArray(costMatrix.map(function (m) { + return m[index]; + }))) > params.distanceLimit) { + var newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); + mapOfItemsTracked.set(newItemTracked.id, newItemTracked); + newItemTracked.makeUnavailable(); + costMatrix.push(detectionsOfThisFrame.map(function (detection) { + return params.distanceFunc(newItemTracked, detection); + })); + } + } + }); + } else if (params.matchingAlgorithm === 'kdTree') { + mapOfItemsTracked.forEach(function (itemTracked) { + // First predict the new position of the itemTracked + var predictedPosition = itemTracked.predictNextPosition(); // Make available for matching + + itemTracked.makeAvailable(); // Search for a detection that matches + + var treeSearchResult = treeDetectionsOfThisFrame.nearest(predictedPosition, 1, params.distanceLimit)[0]; // Only for debug assessments of predictions + + treeDetectionsOfThisFrame.nearest(itemTracked, 1, params.distanceLimit)[0]; // Only if we enable the extra refinement + + treeDetectionsOfThisFrame.nearest(predictedPosition, 2, params.distanceLimit); // If we have found something + + if (treeSearchResult) { + + var indexClosestNewDetectedItem = detectionsOfThisFrame.indexOf(treeSearchResult[0]); // If this detections was not already matched to a tracked item + // (otherwise it would be matched to two tracked items...) + + if (!matchedList[indexClosestNewDetectedItem]) { + matchedList[indexClosestNewDetectedItem] = { + idDisplay: itemTracked.idDisplay + }; // Update properties of tracked object + + var updatedTrackedItemProperties = detectionsOfThisFrame[indexClosestNewDetectedItem]; + mapOfItemsTracked.get(itemTracked.id).makeUnavailable().update(updatedTrackedItemProperties, frameNb); + } + } + }); + } else { + throw "Unknown matching algorithm \"".concat(params.matchingAlgorithm, "\""); + } + } else { + + + mapOfItemsTracked.forEach(function (itemTracked) { + itemTracked.makeAvailable(); + }); + } + + if (params.matchingAlgorithm === 'kdTree') { + // Add any unmatched items as new trackedItem only if those new items are not too similar + // to existing trackedItems this avoids adding some double match of YOLO and bring down drasticly reassignments + if (mapOfItemsTracked.size > 0) { + // Safety check to see if we still have object tracked (could have been deleted previously) + // Rebuild tracked item tree to take in account the new positions + treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ["x", "y", "w", "h"]); // console.log(`Nb new items Unmatched : ${matchedList.filter((isMatched) => isMatched === false).length}`) + + matchedList.forEach(function (matched, index) { + // Iterate through unmatched new detections + if (!matched) { + // Do not add as new tracked item if it is to similar to an existing one + var treeSearchResult = treeItemsTracked.nearest(detectionsOfThisFrame[index], 1, params.distanceLimit)[0]; + + if (!treeSearchResult) { + var newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map + + mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree + + treeItemsTracked.insert(newItemTracked); // Make unvailable + + newItemTracked.makeUnavailable(); + } + } + }); + } + } // Start killing the itemTracked (and predicting next position) + // that are tracked but haven't been matched this frame + + + mapOfItemsTracked.forEach(function (itemTracked) { + if (itemTracked.available) { + itemTracked.countDown(frameNb); + itemTracked.updateTheoricalPositionAndSize(); + + if (itemTracked.isDead()) { + mapOfItemsTracked["delete"](itemTracked.id); + treeItemsTracked.remove(itemTracked); + + if (keepAllHistoryInMemory) { + mapOfAllItemsTracked.set(itemTracked.id, itemTracked); + } + } + } + }); + } +}; + +var reset = tracker.reset = function () { + mapOfItemsTracked = new Map(); + mapOfAllItemsTracked = new Map(); + itemTrackedModule.reset(); +}; + +var setParams = tracker.setParams = function (newParams) { + Object.keys(newParams).forEach(function (key) { + params[key] = newParams[key]; + }); +}; + +var enableKeepInMemory = tracker.enableKeepInMemory = function () { + keepAllHistoryInMemory = true; +}; + +var disableKeepInMemory = tracker.disableKeepInMemory = function () { + keepAllHistoryInMemory = false; +}; + +var getJSONOfTrackedItems = tracker.getJSONOfTrackedItems = function () { + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { + return itemTracked.toJSON(roundInt); + }); +}; + +var getJSONDebugOfTrackedItems = tracker.getJSONDebugOfTrackedItems = function () { + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { + return itemTracked.toJSONDebug(roundInt); + }); +}; + +var getTrackedItemsInMOTFormat = tracker.getTrackedItemsInMOTFormat = function (frameNb) { + return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { + return itemTracked.toMOT(frameNb); + }); +}; // Work only if keepInMemory is enabled + + +var getAllTrackedItems = tracker.getAllTrackedItems = function () { + return mapOfAllItemsTracked; +}; // Work only if keepInMemory is enabled + + +var getJSONOfAllTrackedItems = tracker.getJSONOfAllTrackedItems = function () { + return Array.from(mapOfAllItemsTracked.values()).map(function (itemTracked) { + return itemTracked.toJSONGenericInfo(); + }); +}; + +export { computeDistance, tracker as default, disableKeepInMemory, enableKeepInMemory, getAllTrackedItems, getJSONDebugOfTrackedItems, getJSONOfAllTrackedItems, getJSONOfTrackedItems, getTrackedItemsInMOTFormat, reset, setParams, updateTrackedItemsWithNewFrame }; diff --git a/package-lock.json b/package-lock.json index e6a2ded..aa8650e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "0.9.0", "license": "MIT", "dependencies": { + "crypto": "^1.0.1", "lodash.isequal": "^4.5.0", "minimist": "^1.2.0", "munkres-js": "^1.2.2", @@ -18,2615 +19,4461 @@ "node-moving-things-tracker": "main.js" }, "devDependencies": { - "jasmine": "^3.6.1" + "@babel/core": "^7.17.8", + "@babel/preset-env": "^7.16.11", + "@rollup/plugin-babel": "^5.3.1", + "@rollup/plugin-commonjs": "^21.0.3", + "@rollup/plugin-node-resolve": "^13.1.3", + "jasmine": "^3.6.1", + "rollup": "^2.70.1", + "rollup-plugin-sizes": "^1.0.4" } }, - "node_modules/@mrmlnc/readdir-enhanced": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", - "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", + "node_modules/@ampproject/remapping": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz", + "integrity": "sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==", "dev": true, "dependencies": { - "call-me-maybe": "^1.0.1", - "glob-to-regexp": "^0.3.0" + "@jridgewell/trace-mapping": "^0.3.0" }, "engines": { - "node": ">=4" + "node": ">=6.0.0" } }, - "node_modules/@nodelib/fs.stat": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", - "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", + "node_modules/@babel/code-frame": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", "dev": true, + "dependencies": { + "@babel/highlight": "^7.16.7" + }, "engines": { - "node": ">= 6" + "node": ">=6.9.0" } }, - "node_modules/arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "node_modules/@babel/compat-data": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.7.tgz", + "integrity": "sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "node_modules/@babel/core": { + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.8.tgz", + "integrity": "sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ==", "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.1.0", + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.17.7", + "@babel/helper-compilation-targets": "^7.17.7", + "@babel/helper-module-transforms": "^7.17.7", + "@babel/helpers": "^7.17.8", + "@babel/parser": "^7.17.8", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.17.3", + "@babel/types": "^7.17.0", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.1.2", + "semver": "^6.3.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" } }, - "node_modules/arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "node_modules/@babel/generator": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", + "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", "dev": true, + "dependencies": { + "@babel/types": "^7.17.0", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", + "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", "dev": true, + "dependencies": { + "@babel/types": "^7.16.7" + }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.7.tgz", + "integrity": "sha512-C6FdbRaxYjwVu/geKW4ZeQ0Q31AftgRcdSnZ5/jsH6BzCJbtvXvhpfkbkThYSuutZA7nCXpPR6AD9zd1dprMkA==", "dev": true, + "dependencies": { + "@babel/helper-explode-assignable-expression": "^7.16.7", + "@babel/types": "^7.16.7" + }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "node_modules/@babel/helper-compilation-targets": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.7.tgz", + "integrity": "sha512-UFzlz2jjd8kroj0hmCFV5zr+tQPi1dpC2cRsDV/3IEW8bJfCPrPpmcSN6ZS8RqIq4LXcmpipCQFPddyFA5Yc7w==", "dev": true, - "bin": { - "atob": "bin/atob.js" + "dependencies": { + "@babel/compat-data": "^7.17.7", + "@babel/helper-validator-option": "^7.16.7", + "browserslist": "^4.17.5", + "semver": "^6.3.0" }, "engines": { - "node": ">= 4.5.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "node_modules/base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "node_modules/@babel/helper-create-class-features-plugin": { + "version": "7.17.6", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.6.tgz", + "integrity": "sha512-SogLLSxXm2OkBbSsHZMM4tUi8fUzjs63AT/d0YQIzr6GSd8Hxsbk2KYDX0k0DweAzGMj/YWeiCsorIdtdcW8Eg==", "dev": true, "dependencies": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-member-expression-to-functions": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "node_modules/base/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "node_modules/@babel/helper-create-regexp-features-plugin": { + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.17.0.tgz", + "integrity": "sha512-awO2So99wG6KnlE+TPs6rn83gCz5WlEePJDTnLEqbchMVrBeAujURVphRdigsk094VhvZehFoNOihSlcBjwsXA==", "dev": true, "dependencies": { - "is-descriptor": "^1.0.0" + "@babel/helper-annotate-as-pure": "^7.16.7", + "regexpu-core": "^5.0.1" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "node_modules/base/node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "node_modules/@babel/helper-define-polyfill-provider": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz", + "integrity": "sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA==", "dev": true, "dependencies": { - "kind-of": "^6.0.0" + "@babel/helper-compilation-targets": "^7.13.0", + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/traverse": "^7.13.0", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2", + "semver": "^6.1.2" }, - "engines": { - "node": ">=0.10.0" + "peerDependencies": { + "@babel/core": "^7.4.0-0" } }, - "node_modules/base/node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "node_modules/@babel/helper-environment-visitor": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", + "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", "dev": true, "dependencies": { - "kind-of": "^6.0.0" + "@babel/types": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/base/node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "node_modules/@babel/helper-explode-assignable-expression": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.7.tgz", + "integrity": "sha512-KyUenhWMC8VrxzkGP0Jizjo4/Zx+1nNZhgocs+gLzyZyB8SHidhoq9KK/8Ato4anhwsivfkBLftky7gvzbZMtQ==", "dev": true, "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "@babel/types": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "node_modules/@babel/helper-function-name": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", + "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", "dev": true, "dependencies": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" + "@babel/helper-get-function-arity": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/types": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/braces/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "node_modules/@babel/helper-get-function-arity": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", + "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", "dev": true, "dependencies": { - "is-extendable": "^0.1.0" + "@babel/types": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "node_modules/@babel/helper-hoist-variables": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", + "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", "dev": true, "dependencies": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" + "@babel/types": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/call-me-maybe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", - "dev": true - }, - "node_modules/class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.17.7.tgz", + "integrity": "sha512-thxXgnQ8qQ11W2wVUObIqDL4p148VMxkt5T/qpN5k2fboRyzFGFmKsTGViquyM5QHKUy48OZoca8kw4ajaDPyw==", "dev": true, "dependencies": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" + "@babel/types": "^7.17.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/class-utils/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "node_modules/@babel/helper-module-imports": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", + "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", "dev": true, "dependencies": { - "is-descriptor": "^0.1.0" + "@babel/types": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "node_modules/@babel/helper-module-transforms": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz", + "integrity": "sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw==", "dev": true, "dependencies": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-simple-access": "^7.17.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.17.3", + "@babel/types": "^7.17.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, - "node_modules/copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz", + "integrity": "sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w==", "dev": true, + "dependencies": { + "@babel/types": "^7.16.7" + }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "node_modules/@babel/helper-plugin-utils": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz", + "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==", "dev": true, - "dependencies": { - "ms": "2.0.0" + "engines": { + "node": ">=6.9.0" } }, - "node_modules/decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "node_modules/@babel/helper-remap-async-to-generator": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.8.tgz", + "integrity": "sha512-fm0gH7Flb8H51LqJHy3HJ3wnE1+qtYR2A99K06ahwrawLdOFsCEWjZOrYricXJHoPSudNKxrMBUPEIPxiIIvBw==", "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-wrap-function": "^7.16.8", + "@babel/types": "^7.16.8" + }, "engines": { - "node": ">=0.10" + "node": ">=6.9.0" } }, - "node_modules/define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "node_modules/@babel/helper-replace-supers": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz", + "integrity": "sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw==", "dev": true, "dependencies": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-member-expression-to-functions": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/define-property/node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "node_modules/@babel/helper-simple-access": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.17.7.tgz", + "integrity": "sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA==", "dev": true, "dependencies": { - "kind-of": "^6.0.0" + "@babel/types": "^7.17.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/define-property/node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "node_modules/@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz", + "integrity": "sha512-+il1gTy0oHwUsBQZyJvukbB4vPMdcYBrFHa0Uc4AizLxbq6BOYC51Rv4tWocX9BLBDLZ4kc6qUFpQ6HRgL+3zw==", "dev": true, "dependencies": { - "kind-of": "^6.0.0" + "@babel/types": "^7.16.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/define-property/node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", + "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", "dev": true, "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "@babel/types": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "node_modules/@babel/helper-validator-identifier": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", "dev": true, - "dependencies": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/expand-brackets/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "node_modules/@babel/helper-validator-option": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", + "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", "dev": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/expand-brackets/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "node_modules/@babel/helper-wrap-function": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.16.8.tgz", + "integrity": "sha512-8RpyRVIAW1RcDDGTA+GpPAwV22wXCfKOoM9bet6TLkGIFTkRQSkH1nMQ5Yet4MpoXe1ZwHPVtNasc2w0uZMqnw==", "dev": true, "dependencies": { - "is-extendable": "^0.1.0" + "@babel/helper-function-name": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.8", + "@babel/types": "^7.16.8" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "node_modules/@babel/helpers": { + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.8.tgz", + "integrity": "sha512-QcL86FGxpfSJwGtAvv4iG93UL6bmqBdmoVY0CMCU2g+oD2ezQse3PT5Pa+jiD6LJndBQi0EDlpzOWNlLuhz5gw==", "dev": true, "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.17.3", + "@babel/types": "^7.17.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/extend-shallow/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "node_modules/@babel/highlight": { + "version": "7.16.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", + "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", "dev": true, "dependencies": { - "is-plain-object": "^2.0.4" + "@babel/helper-validator-identifier": "^7.16.7", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "node_modules/@babel/parser": { + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.8.tgz", + "integrity": "sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==", "dev": true, - "dependencies": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "bin": { + "parser": "bin/babel-parser.js" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.0.0" } }, - "node_modules/extglob/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.16.7.tgz", + "integrity": "sha512-anv/DObl7waiGEnC24O9zqL0pSuI9hljihqiDuFHC8d7/bjr/4RLGPWuc8rYOff/QPzbEPSkzG8wGG9aDuhHRg==", "dev": true, "dependencies": { - "is-descriptor": "^1.0.0" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "node_modules/extglob/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.16.7.tgz", + "integrity": "sha512-di8vUHRdf+4aJ7ltXhaDbPoszdkh59AQtJM5soLsuHpQJdFQZOA4uGj0V2u/CZ8bJ/u8ULDL5yq6FO/bCXnKHw==", "dev": true, "dependencies": { - "is-extendable": "^0.1.0" + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", + "@babel/plugin-proposal-optional-chaining": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.13.0" } }, - "node_modules/extglob/node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "node_modules/@babel/plugin-proposal-async-generator-functions": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.8.tgz", + "integrity": "sha512-71YHIvMuiuqWJQkebWJtdhQTfd4Q4mF76q2IX37uZPkG9+olBxsX+rH1vkhFto4UeJZ9dPY2s+mDvhDm1u2BGQ==", "dev": true, "dependencies": { - "kind-of": "^6.0.0" + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-remap-async-to-generator": "^7.16.8", + "@babel/plugin-syntax-async-generators": "^7.8.4" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/extglob/node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "node_modules/@babel/plugin-proposal-class-properties": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.7.tgz", + "integrity": "sha512-IobU0Xme31ewjYOShSIqd/ZGM/r/cuOz2z0MDbNrhF5FW+ZVgi0f2lyeoj9KFPDOAqsYxmLWZte1WOwlvY9aww==", "dev": true, "dependencies": { - "kind-of": "^6.0.0" + "@babel/helper-create-class-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/extglob/node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "node_modules/@babel/plugin-proposal-class-static-block": { + "version": "7.17.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.17.6.tgz", + "integrity": "sha512-X/tididvL2zbs7jZCeeRJ8167U/+Ac135AM6jCAx6gYXDUviZV5Ku9UDvWS2NCuWlFjIRXklYhwo6HhAC7ETnA==", "dev": true, "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "@babel/helper-create-class-features-plugin": "^7.17.6", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-class-static-block": "^7.14.5" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0" } }, - "node_modules/fast-glob": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz", - "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==", + "node_modules/@babel/plugin-proposal-dynamic-import": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.7.tgz", + "integrity": "sha512-I8SW9Ho3/8DRSdmDdH3gORdyUuYnk1m4cMxUAdu5oy4n3OfN8flDEH+d60iG7dUfi0KkYwSvoalHzzdRzpWHTg==", "dev": true, "dependencies": { - "@mrmlnc/readdir-enhanced": "^2.2.1", - "@nodelib/fs.stat": "^1.1.2", - "glob-parent": "^3.1.0", - "is-glob": "^4.0.0", - "merge2": "^1.2.3", - "micromatch": "^3.1.10" + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" }, "engines": { - "node": ">=4.0.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "node_modules/@babel/plugin-proposal-export-namespace-from": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.16.7.tgz", + "integrity": "sha512-ZxdtqDXLRGBL64ocZcs7ovt71L3jhC1RGSyR996svrCi3PYqHNkb3SwPJCs8RIzD86s+WPpt2S73+EHCGO+NUA==", "dev": true, "dependencies": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/fill-range/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "node_modules/@babel/plugin-proposal-json-strings": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.7.tgz", + "integrity": "sha512-lNZ3EEggsGY78JavgbHsK9u5P3pQaW7k4axlgFLYkMd7UBsiNahCITShLjNQschPyjtO6dADrL24757IdhBrsQ==", "dev": true, "dependencies": { - "is-extendable": "^0.1.0" + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-json-strings": "^7.8.3" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "node_modules/@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.16.7.tgz", + "integrity": "sha512-K3XzyZJGQCr00+EtYtrDjmwX7o7PLK6U9bi1nCwkQioRFVUv6dJoxbQjtWVtP+bCPy82bONBKG8NPyQ4+i6yjg==", "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.16.7.tgz", + "integrity": "sha512-aUOrYU3EVtjf62jQrCj63pYZ7k6vns2h/DQvHPWGmsJRYzWXZ6/AsfgpiRy6XiuIDADhJzP2Q9MwSMKauBQ+UQ==", "dev": true, "dependencies": { - "map-cache": "^0.2.2" + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "node_modules/@babel/plugin-proposal-numeric-separator": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.7.tgz", + "integrity": "sha512-vQgPMknOIgiuVqbokToyXbkY/OmmjAzr/0lhSIbG/KmnzXPGwW/AdhdKpi+O4X/VkWiWjnkKOBiqJrTaC98VKw==", "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "node_modules/@babel/plugin-proposal-object-rest-spread": { + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.17.3.tgz", + "integrity": "sha512-yuL5iQA/TbZn+RGAfxQXfi7CNLmKi1f8zInn4IgobuCWcAb7i+zj4TYzQ9l8cEzVyJ89PDGuqxK1xZpUDISesw==", "dev": true, "dependencies": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" + "@babel/compat-data": "^7.17.0", + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/glob-parent/node_modules/is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "node_modules/@babel/plugin-proposal-optional-catch-binding": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.7.tgz", + "integrity": "sha512-eMOH/L4OvWSZAE1VkHbr1vckLG1WUcHGJSLqqQwl2GaUqG6QjddvrOaTUMNYiv77H5IKPMZ9U9P7EaHwvAShfA==", "dev": true, "dependencies": { - "is-extglob": "^2.1.0" + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/glob-to-regexp": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", - "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", - "dev": true - }, - "node_modules/has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "node_modules/@babel/plugin-proposal-optional-chaining": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.7.tgz", + "integrity": "sha512-eC3xy+ZrUcBtP7x+sq62Q/HYd674pPTb/77XZMb5wbDPGWIdUbSr4Agr052+zaUPSb+gGRnjxXfKFvx5iMJ+DA==", "dev": true, "dependencies": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "node_modules/@babel/plugin-proposal-private-methods": { + "version": "7.16.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.11.tgz", + "integrity": "sha512-F/2uAkPlXDr8+BHpZvo19w3hLFKge+k75XUprE6jaqKxjGkSYcK+4c+bup5PdW/7W/Rpjwql7FTVEDW+fRAQsw==", "dev": true, "dependencies": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" + "@babel/helper-create-class-features-plugin": "^7.16.10", + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/has-values/node_modules/kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "node_modules/@babel/plugin-proposal-private-property-in-object": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.16.7.tgz", + "integrity": "sha512-rMQkjcOFbm+ufe3bTZLyOfsOUOxyvLXZJCTARhJr+8UMSoZmqTe1K1BgkFcrW37rAchWg57yI69ORxiWvUINuQ==", "dev": true, "dependencies": { - "is-buffer": "^1.1.5" + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-create-class-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "node_modules/@babel/plugin-proposal-unicode-property-regex": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.7.tgz", + "integrity": "sha512-QRK0YI/40VLhNVGIjRNAAQkEHws0cswSdFFjpFyt943YmJIU1da9uW63Iu6NFV6CxTZW5eTDCrwZUstBWgp/Rg==", "dev": true, "dependencies": { - "kind-of": "^3.0.2" + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, "dependencies": { - "is-buffer": "^1.1.5" + "@babel/helper-plugin-utils": "^7.8.0" }, - "engines": { - "node": ">=0.10.0" + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } }, - "node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", "dev": true, "dependencies": { - "kind-of": "^3.0.2" + "@babel/helper-plugin-utils": "^7.14.5" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "node_modules/@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", "dev": true, "dependencies": { - "is-buffer": "^1.1.5" + "@babel/helper-plugin-utils": "^7.8.0" }, - "engines": { - "node": ">=0.10.0" + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "node_modules/@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", "dev": true, "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" + "@babel/helper-plugin-utils": "^7.8.3" }, - "engines": { - "node": ">=0.10.0" + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/is-descriptor/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", "dev": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", "dev": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", "dev": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", "dev": true, "dependencies": { - "is-extglob": "^2.1.1" + "@babel/helper-plugin-utils": "^7.10.4" }, - "engines": { - "node": ">=0.10.0" + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dev": true, "dependencies": { - "kind-of": "^3.0.2" + "@babel/helper-plugin-utils": "^7.8.0" }, - "engines": { - "node": ">=0.10.0" + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/is-number/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "dev": true, "dependencies": { - "is-buffer": "^1.1.5" + "@babel/helper-plugin-utils": "^7.8.0" }, - "engines": { - "node": ">=0.10.0" + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", "dev": true, "dependencies": { - "isobject": "^3.0.1" + "@babel/helper-plugin-utils": "^7.8.0" }, - "engines": { - "node": ">=0.10.0" + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/jasmine": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-3.6.1.tgz", - "integrity": "sha512-Jqp8P6ZWkTVFGmJwBK46p+kJNrZCdqkQ4GL+PGuBXZwK1fM4ST9BizkYgIwCFqYYqnTizAy6+XG2Ej5dFrej9Q==", + "node_modules/@babel/plugin-transform-arrow-functions": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.7.tgz", + "integrity": "sha512-9ffkFFMbvzTvv+7dTp/66xvZAWASuPD5Tl9LK3Z9vhOmANo6j94rik+5YMBt4CwHVMWLWpMsriIc2zsa3WW3xQ==", "dev": true, "dependencies": { - "fast-glob": "^2.2.6", - "jasmine-core": "~3.6.0" + "@babel/helper-plugin-utils": "^7.16.7" }, - "bin": { - "jasmine": "bin/jasmine.js" + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/jasmine-core": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.6.0.tgz", - "integrity": "sha512-8uQYa7zJN8hq9z+g8z1bqCfdC8eoDAeVnM5sfqs7KHv9/ifoJ500m018fpFc7RDaO6SWCLCXwo/wPSNcdYTgcw==", - "dev": true - }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "node_modules/@babel/plugin-transform-async-to-generator": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.8.tgz", + "integrity": "sha512-MtmUmTJQHCnyJVrScNzNlofQJ3dLFuobYn3mwOTKHnSCMtbNsqvF71GQmJfFjdrXSsAA7iysFmYWw4bXZ20hOg==", "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-remap-async-to-generator": "^7.16.8" + }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" - }, - "node_modules/map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "node_modules/@babel/plugin-transform-block-scoped-functions": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.7.tgz", + "integrity": "sha512-JUuzlzmF40Z9cXyytcbZEZKckgrQzChbQJw/5PuEHYeqzCsvebDx0K0jWnIIVcmmDOAVctCgnYs0pMcrYj2zJg==", "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.16.7" + }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "node_modules/@babel/plugin-transform-block-scoping": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.7.tgz", + "integrity": "sha512-ObZev2nxVAYA4bhyusELdo9hb3H+A56bxH3FZMbEImZFiEDYVHXQSJ1hQKFlDnlt8G9bBrCZ5ZpURZUrV4G5qQ==", "dev": true, "dependencies": { - "object-visit": "^1.0.0" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "node_modules/@babel/plugin-transform-classes": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.7.tgz", + "integrity": "sha512-WY7og38SFAGYRe64BrjKf8OrE6ulEHtr5jEYaZMwox9KebgqPi67Zqz8K53EKk1fFEJgm96r32rkKZ3qA2nCWQ==", "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "globals": "^11.1.0" + }, "engines": { - "node": ">= 8" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "node_modules/@babel/plugin-transform-computed-properties": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.7.tgz", + "integrity": "sha512-gN72G9bcmenVILj//sv1zLNaPyYcOzUho2lIJBMh/iakJ9ygCo/hEF9cpGb61SCMEDxbbyBoVQxrt+bWKu5KGw==", "dev": true, "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - }, - "node_modules/mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "node_modules/@babel/plugin-transform-destructuring": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.17.7.tgz", + "integrity": "sha512-XVh0r5yq9sLR4vZ6eVZe8FKfIcSgaTBxVBRSYokRj2qksf6QerYnTxz9/GTuKTH/n/HwLP7t6gtlybHetJ/6hQ==", "dev": true, "dependencies": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/mixin-deep/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "node_modules/@babel/plugin-transform-dotall-regex": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.7.tgz", + "integrity": "sha512-Lyttaao2SjZF6Pf4vk1dVKv8YypMpomAbygW+mU5cYP3S5cWTfCJjG8xV6CFdzGFlfWK81IjL9viiTvpb6G7gQ==", "dev": true, "dependencies": { - "is-plain-object": "^2.0.4" + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "node_modules/munkres-js": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/munkres-js/-/munkres-js-1.2.2.tgz", - "integrity": "sha1-4D2YBo1F1YexX1Y+uGDrZ6qFKLc=" - }, - "node_modules/nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "node_modules/@babel/plugin-transform-duplicate-keys": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.7.tgz", + "integrity": "sha512-03DvpbRfvWIXyK0/6QiR1KMTWeT6OcQ7tbhjrXyFS02kjuX/mu5Bvnh5SDSWHxyawit2g5aWhKwI86EE7GUnTw==", "dev": true, "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "node_modules/@babel/plugin-transform-exponentiation-operator": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.7.tgz", + "integrity": "sha512-8UYLSlyLgRixQvlYH3J2ekXFHDFLQutdy7FfFAMm3CPZ6q9wHCwnUyiXpQCe3gVVnQlHc5nsuiEVziteRNTXEA==", "dev": true, "dependencies": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/object-copy/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "node_modules/@babel/plugin-transform-for-of": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.7.tgz", + "integrity": "sha512-/QZm9W92Ptpw7sjI9Nx1mbcsWz33+l8kuMIQnDwgQBG5s3fAfQvkRjQ7NqXhtNcKOnPkdICmUHyCaWW06HCsqg==", "dev": true, "dependencies": { - "is-descriptor": "^0.1.0" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/object-copy/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "node_modules/@babel/plugin-transform-function-name": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.7.tgz", + "integrity": "sha512-SU/C68YVwTRxqWj5kgsbKINakGag0KTgq9f2iZEXdStoAbOzLHEBRYzImmA6yFo8YZhJVflvXmIHUO7GWHmxxA==", "dev": true, "dependencies": { - "is-buffer": "^1.1.5" + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "node_modules/@babel/plugin-transform-literals": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.7.tgz", + "integrity": "sha512-6tH8RTpTWI0s2sV6uq3e/C9wPo4PTqqZps4uF0kzQ9/xPLFQtipynvmT1g/dOfEJ+0EQsHhkQ/zyRId8J2b8zQ==", "dev": true, "dependencies": { - "isobject": "^3.0.0" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "node_modules/@babel/plugin-transform-member-expression-literals": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.7.tgz", + "integrity": "sha512-mBruRMbktKQwbxaJof32LT9KLy2f3gH+27a5XSuXo6h7R3vqltl0PgZ80C8ZMKw98Bf8bqt6BEVi3svOh2PzMw==", "dev": true, "dependencies": { - "isobject": "^3.0.1" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "node_modules/@babel/plugin-transform-modules-amd": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.7.tgz", + "integrity": "sha512-KaaEtgBL7FKYwjJ/teH63oAmE3lP34N3kshz8mm4VMAw7U3PxjVwwUmxEFksbgsNUaO3wId9R2AVQYSEGRa2+g==", "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "node_modules/posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "node_modules/@babel/plugin-transform-modules-commonjs": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.17.7.tgz", + "integrity": "sha512-ITPmR2V7MqioMJyrxUo2onHNC3e+MvfFiFIR0RP21d3PtlVb6sfzoxNKiphSZUOM9hEIdzCcZe83ieX3yoqjUA==", "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.17.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-simple-access": "^7.17.7", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "node_modules/@babel/plugin-transform-modules-systemjs": { + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.17.8.tgz", + "integrity": "sha512-39reIkMTUVagzgA5x88zDYXPCMT6lcaRKs1+S9K6NKBPErbgO/w/kP8GlNQTC87b412ZTlmNgr3k2JrWgHH+Bw==", "dev": true, "dependencies": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-module-transforms": "^7.17.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", + "babel-plugin-dynamic-import-node": "^2.3.3" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "deprecated": "https://github.com/lydell/resolve-url#deprecated", - "dev": true - }, - "node_modules/ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "node_modules/@babel/plugin-transform-modules-umd": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.7.tgz", + "integrity": "sha512-EMh7uolsC8O4xhudF2F6wedbSHm1HHZ0C6aJ7K67zcDNidMzVcxWdGr+htW9n21klm+bOn+Rx4CBsAntZd3rEQ==", "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + }, "engines": { - "node": ">=0.12" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.8.tgz", + "integrity": "sha512-j3Jw+n5PvpmhRR+mrgIh04puSANCk/T/UA3m3P1MjJkhlK906+ApHhDIqBQDdOgL/r1UYpz4GNclTXxyZrYGSw==", "dev": true, "dependencies": { - "ret": "~0.1.10" + "@babel/helper-create-regexp-features-plugin": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "node_modules/set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "node_modules/@babel/plugin-transform-new-target": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.7.tgz", + "integrity": "sha512-xiLDzWNMfKoGOpc6t3U+etCE2yRnn3SM09BXqWPIZOBpL2gvVrBWUKnsJx0K/ADi5F5YC5f8APFfWrz25TdlGg==", "dev": true, "dependencies": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/set-value/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "node_modules/@babel/plugin-transform-object-super": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.7.tgz", + "integrity": "sha512-14J1feiQVWaGvRxj2WjyMuXS2jsBkgB3MdSN5HuC2G5nRspa5RK9COcs82Pwy5BuGcjb+fYaUj94mYcOj7rCvw==", "dev": true, "dependencies": { - "is-extendable": "^0.1.0" + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "node_modules/@babel/plugin-transform-parameters": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.7.tgz", + "integrity": "sha512-AT3MufQ7zZEhU2hwOA11axBnExW0Lszu4RL/tAlUJBuNoRak+wehQW8h6KcXOcgjY42fHtDxswuMhMjFEuv/aw==", "dev": true, "dependencies": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "node_modules/@babel/plugin-transform-property-literals": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.7.tgz", + "integrity": "sha512-z4FGr9NMGdoIl1RqavCqGG+ZuYjfZ/hkCIeuH6Do7tXmSm0ls11nYVSJqFEUOSJbDab5wC6lRE/w6YjVcr6Hqw==", "dev": true, "dependencies": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/snapdragon-node/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "node_modules/@babel/plugin-transform-regenerator": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.7.tgz", + "integrity": "sha512-mF7jOgGYCkSJagJ6XCujSQg+6xC1M77/03K2oBmVJWoFGNUtnVJO4WHKJk3dnPC8HCcj4xBQP1Egm8DWh3Pb3Q==", "dev": true, "dependencies": { - "is-descriptor": "^1.0.0" + "regenerator-transform": "^0.14.2" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/snapdragon-node/node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "node_modules/@babel/plugin-transform-reserved-words": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.16.7.tgz", + "integrity": "sha512-KQzzDnZ9hWQBjwi5lpY5v9shmm6IVG0U9pB18zvMu2i4H90xpT4gmqwPYsn8rObiadYe2M0gmgsiOIF5A/2rtg==", "dev": true, "dependencies": { - "kind-of": "^6.0.0" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/snapdragon-node/node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "node_modules/@babel/plugin-transform-shorthand-properties": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.7.tgz", + "integrity": "sha512-hah2+FEnoRoATdIb05IOXf+4GzXYTq75TVhIn1PewihbpyrNWUt2JbudKQOETWw6QpLe+AIUpJ5MVLYTQbeeUg==", "dev": true, "dependencies": { - "kind-of": "^6.0.0" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/snapdragon-node/node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "node_modules/@babel/plugin-transform-spread": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.7.tgz", + "integrity": "sha512-+pjJpgAngb53L0iaA5gU/1MLXJIfXcYepLgXB3esVRf4fqmj8f2cxM3/FKaHsZms08hFQJkFccEWuIpm429TXg==", "dev": true, "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "node_modules/@babel/plugin-transform-sticky-regex": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.7.tgz", + "integrity": "sha512-NJa0Bd/87QV5NZZzTuZG5BPJjLYadeSZ9fO6oOUoL4iQx+9EEuw/eEM92SrsT19Yc2jgB1u1hsjqDtH02c3Drw==", "dev": true, "dependencies": { - "kind-of": "^3.2.0" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/snapdragon-util/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "node_modules/@babel/plugin-transform-template-literals": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.7.tgz", + "integrity": "sha512-VwbkDDUeenlIjmfNeDX/V0aWrQH2QiVyJtwymVQSzItFDTpxfyJh3EVaQiS0rIN/CqbLGr0VcGmuwyTdZtdIsA==", "dev": true, "dependencies": { - "is-buffer": "^1.1.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/snapdragon/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "node_modules/@babel/plugin-transform-typeof-symbol": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.7.tgz", + "integrity": "sha512-p2rOixCKRJzpg9JB4gjnG4gjWkWa89ZoYUnl9snJ1cWIcTH/hvxZqfO+WjG6T8DRBpctEol5jw1O5rA8gkCokQ==", "dev": true, "dependencies": { - "is-descriptor": "^0.1.0" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/snapdragon/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "node_modules/@babel/plugin-transform-unicode-escapes": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.7.tgz", + "integrity": "sha512-TAV5IGahIz3yZ9/Hfv35TV2xEm+kaBDaZQCn2S/hG9/CZ0DktxJv9eKfPc7yYCvOYR4JGx1h8C+jcSOvgaaI/Q==", "dev": true, "dependencies": { - "is-extendable": "^0.1.0" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "node_modules/@babel/plugin-transform-unicode-regex": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.7.tgz", + "integrity": "sha512-oC5tYYKw56HO75KZVLQ+R/Nl3Hro9kf8iG0hXoaHP7tjAyCpvqBiSNe6vGrZni1Z6MggmUOC6A7VP7AVmw225Q==", "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", + "node_modules/@babel/preset-env": { + "version": "7.16.11", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.16.11.tgz", + "integrity": "sha512-qcmWG8R7ZW6WBRPZK//y+E3Cli151B20W1Rv7ln27vuPaXU/8TKms6jFdiJtF7UDTxcrb7mZd88tAeK9LjdT8g==", "dev": true, "dependencies": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" + "@babel/compat-data": "^7.16.8", + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-validator-option": "^7.16.7", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.16.7", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.16.7", + "@babel/plugin-proposal-async-generator-functions": "^7.16.8", + "@babel/plugin-proposal-class-properties": "^7.16.7", + "@babel/plugin-proposal-class-static-block": "^7.16.7", + "@babel/plugin-proposal-dynamic-import": "^7.16.7", + "@babel/plugin-proposal-export-namespace-from": "^7.16.7", + "@babel/plugin-proposal-json-strings": "^7.16.7", + "@babel/plugin-proposal-logical-assignment-operators": "^7.16.7", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7", + "@babel/plugin-proposal-numeric-separator": "^7.16.7", + "@babel/plugin-proposal-object-rest-spread": "^7.16.7", + "@babel/plugin-proposal-optional-catch-binding": "^7.16.7", + "@babel/plugin-proposal-optional-chaining": "^7.16.7", + "@babel/plugin-proposal-private-methods": "^7.16.11", + "@babel/plugin-proposal-private-property-in-object": "^7.16.7", + "@babel/plugin-proposal-unicode-property-regex": "^7.16.7", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-transform-arrow-functions": "^7.16.7", + "@babel/plugin-transform-async-to-generator": "^7.16.8", + "@babel/plugin-transform-block-scoped-functions": "^7.16.7", + "@babel/plugin-transform-block-scoping": "^7.16.7", + "@babel/plugin-transform-classes": "^7.16.7", + "@babel/plugin-transform-computed-properties": "^7.16.7", + "@babel/plugin-transform-destructuring": "^7.16.7", + "@babel/plugin-transform-dotall-regex": "^7.16.7", + "@babel/plugin-transform-duplicate-keys": "^7.16.7", + "@babel/plugin-transform-exponentiation-operator": "^7.16.7", + "@babel/plugin-transform-for-of": "^7.16.7", + "@babel/plugin-transform-function-name": "^7.16.7", + "@babel/plugin-transform-literals": "^7.16.7", + "@babel/plugin-transform-member-expression-literals": "^7.16.7", + "@babel/plugin-transform-modules-amd": "^7.16.7", + "@babel/plugin-transform-modules-commonjs": "^7.16.8", + "@babel/plugin-transform-modules-systemjs": "^7.16.7", + "@babel/plugin-transform-modules-umd": "^7.16.7", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.16.8", + "@babel/plugin-transform-new-target": "^7.16.7", + "@babel/plugin-transform-object-super": "^7.16.7", + "@babel/plugin-transform-parameters": "^7.16.7", + "@babel/plugin-transform-property-literals": "^7.16.7", + "@babel/plugin-transform-regenerator": "^7.16.7", + "@babel/plugin-transform-reserved-words": "^7.16.7", + "@babel/plugin-transform-shorthand-properties": "^7.16.7", + "@babel/plugin-transform-spread": "^7.16.7", + "@babel/plugin-transform-sticky-regex": "^7.16.7", + "@babel/plugin-transform-template-literals": "^7.16.7", + "@babel/plugin-transform-typeof-symbol": "^7.16.7", + "@babel/plugin-transform-unicode-escapes": "^7.16.7", + "@babel/plugin-transform-unicode-regex": "^7.16.7", + "@babel/preset-modules": "^0.1.5", + "@babel/types": "^7.16.8", + "babel-plugin-polyfill-corejs2": "^0.3.0", + "babel-plugin-polyfill-corejs3": "^0.5.0", + "babel-plugin-polyfill-regenerator": "^0.3.0", + "core-js-compat": "^3.20.2", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "deprecated": "See https://github.com/lydell/source-map-url#deprecated", - "dev": true - }, - "node_modules/split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "node_modules/@babel/preset-modules": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", + "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", "dev": true, "dependencies": { - "extend-shallow": "^3.0.0" + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" }, - "engines": { - "node": ">=0.10.0" + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "node_modules/@babel/runtime": { + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.8.tgz", + "integrity": "sha512-dQpEpK0O9o6lj6oPu0gRDbbnk+4LeHlNcBpspf6Olzt3GIX4P1lWF1gS+pHLDFlaJvbR6q7jCfQ08zA4QJBnmA==", "dev": true, "dependencies": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" + "regenerator-runtime": "^0.13.4" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/static-extend/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "node_modules/@babel/template": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", "dev": true, "dependencies": { - "is-descriptor": "^0.1.0" + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "node_modules/@babel/traverse": { + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz", + "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==", "dev": true, "dependencies": { - "kind-of": "^3.0.2" + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.17.3", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.17.3", + "@babel/types": "^7.17.0", + "debug": "^4.1.0", + "globals": "^11.1.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/to-object-path/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "node_modules/@babel/types": { + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", + "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", "dev": true, "dependencies": { - "is-buffer": "^1.1.5" + "@babel/helper-validator-identifier": "^7.16.7", + "to-fast-properties": "^2.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "node_modules/@jridgewell/resolve-uri": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz", + "integrity": "sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==", "dev": true, - "dependencies": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - }, "engines": { - "node": ">=0.10.0" + "node": ">=6.0.0" } }, - "node_modules/to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz", + "integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.4.tgz", + "integrity": "sha512-vFv9ttIedivx0ux3QSjhgtCVjPZd5l46ZOMDSCwnH1yUO2e964gO8LZGyv2QkqcgR6TnBU1v+1IFqmeoG+0UJQ==", "dev": true, "dependencies": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - }, - "engines": { - "node": ">=0.10.0" + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "node_modules/union-value": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "node_modules/@rollup/plugin-babel": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", + "integrity": "sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==", "dev": true, "dependencies": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" + "@babel/helper-module-imports": "^7.10.4", + "@rollup/pluginutils": "^3.1.0" }, "engines": { - "node": ">=0.10.0" + "node": ">= 10.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0", + "@types/babel__core": "^7.1.9", + "rollup": "^1.20.0||^2.0.0" + }, + "peerDependenciesMeta": { + "@types/babel__core": { + "optional": true + } } }, - "node_modules/unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "node_modules/@rollup/plugin-commonjs": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.0.3.tgz", + "integrity": "sha512-ThGfwyvcLc6cfP/MWxA5ACF+LZCvsuhUq7V5134Az1oQWsiC7lNpLT4mJI86WQunK7BYmpUiHmMk2Op6OAHs0g==", "dev": true, "dependencies": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" + "@rollup/pluginutils": "^3.1.0", + "commondir": "^1.0.1", + "estree-walker": "^2.0.1", + "glob": "^7.1.6", + "is-reference": "^1.2.1", + "magic-string": "^0.25.7", + "resolve": "^1.17.0" }, "engines": { - "node": ">=0.10.0" + "node": ">= 8.0.0" + }, + "peerDependencies": { + "rollup": "^2.38.3" } }, - "node_modules/unset-value/node_modules/has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "node_modules/@rollup/plugin-commonjs/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + }, + "node_modules/@rollup/plugin-node-resolve": { + "version": "13.1.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.3.tgz", + "integrity": "sha512-BdxNk+LtmElRo5d06MGY4zoepyrXX1tkzX2hrnPEZ53k78GuOMWLqmJDGIIOPwVRIFZrLQOo+Yr6KtCuLIA0AQ==", "dev": true, "dependencies": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" + "@rollup/pluginutils": "^3.1.0", + "@types/resolve": "1.17.1", + "builtin-modules": "^3.1.0", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.19.0" }, "engines": { - "node": ">=0.10.0" + "node": ">= 10.0.0" + }, + "peerDependencies": { + "rollup": "^2.42.0" } }, - "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "node_modules/@rollup/pluginutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", "dev": true, "dependencies": { - "isarray": "1.0.0" + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" }, "engines": { - "node": ">=0.10.0" + "node": ">= 8.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0" } }, - "node_modules/unset-value/node_modules/has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } + "node_modules/@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true }, - "node_modules/urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "deprecated": "Please see https://github.com/lydell/urix#deprecated", + "node_modules/@types/node": { + "version": "17.0.23", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz", + "integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==", "dev": true }, - "node_modules/use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "node_modules/@types/resolve": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", + "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", "dev": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "@types/node": "*" } }, - "node_modules/uuid": { + "node_modules/ansi-styles": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "bin": { - "uuid": "bin/uuid" - } - } - }, - "dependencies": { - "@mrmlnc/readdir-enhanced": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", - "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, - "requires": { - "call-me-maybe": "^1.0.1", - "glob-to-regexp": "^0.3.0" + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" } }, - "@nodelib/fs.stat": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", - "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", - "dev": true - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "node_modules/babel-plugin-dynamic-import-node": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } + "object.assign": "^4.1.0" } }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "node_modules/babel-plugin-polyfill-corejs2": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz", + "integrity": "sha512-v7/T6EQcNfVLfcN2X8Lulb7DjprieyLWJK/zOWH5DUYcAgex9sP3h25Q+DLsX9TloXe3y1O8l2q2Jv9q8UVB9w==", "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" + "dependencies": { + "@babel/compat-data": "^7.13.11", + "@babel/helper-define-polyfill-provider": "^0.3.1", + "semver": "^6.1.1" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "call-me-maybe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", - "dev": true - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "node_modules/babel-plugin-polyfill-corejs3": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz", + "integrity": "sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ==", "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } + "@babel/helper-define-polyfill-provider": "^0.3.1", + "core-js-compat": "^3.21.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "node_modules/babel-plugin-polyfill-regenerator": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.1.tgz", + "integrity": "sha512-Y2B06tvgHYt1x0yz17jGkGeeMr5FeKUu+ASJ+N6nB5lQ8Dapfg42i0OVrf8PNGJ3zKL4A23snMi1IRwrqqND7A==", "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.3.1" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "requires": { - "ms": "2.0.0" + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "node_modules/browserslist": { + "version": "4.20.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.2.tgz", + "integrity": "sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA==", "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001317", + "electron-to-chromium": "^1.4.84", + "escalade": "^3.1.1", + "node-releases": "^2.0.2", + "picocolors": "^1.0.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "node_modules/builtin-modules": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", + "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==", "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "engines": { + "node": ">=6" }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } + "node_modules/caniuse-lite": { + "version": "1.0.30001324", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001324.tgz", + "integrity": "sha512-/eYp1J6zYh1alySQB4uzYFkLmxxI8tk0kxldbNHXp8+v+rdMKdUBNjRLz7T7fz6Iox+1lIdYpc7rq6ZcXfTukg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" } - } + ] }, - "fast-glob": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz", - "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==", + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, - "requires": { - "@mrmlnc/readdir-enhanced": "^2.2.1", - "@nodelib/fs.stat": "^1.1.2", - "glob-parent": "^3.1.0", - "is-glob": "^4.0.0", - "merge2": "^1.2.3", - "micromatch": "^3.1.10" + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" } }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } + "color-name": "1.1.3" } }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "node_modules/convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } + "safe-buffer": "~5.1.1" } }, - "glob-to-regexp": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", - "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", - "dev": true - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "node_modules/core-js-compat": { + "version": "3.21.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.21.1.tgz", + "integrity": "sha512-gbgX5AUvMb8gwxC7FLVWYT7Kkgu/y7+h/h1X43yJkNqhlK2fuYyQimqvKGNZFAY6CKii/GFKJ2cp/1/42TN36g==", "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" + "dependencies": { + "browserslist": "^4.19.1", + "semver": "7.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" } }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "node_modules/core-js-compat/node_modules/semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } + "bin": { + "semver": "bin/semver.js" } }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "node_modules/crypto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/crypto/-/crypto-1.0.1.tgz", + "integrity": "sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig==", + "deprecated": "This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in." + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true } } }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "node_modules/deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } + "engines": { + "node": ">=0.10.0" } }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "node_modules/define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } + "object-keys": "^1.0.12" + }, + "engines": { + "node": ">= 0.4" } }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "node_modules/electron-to-chromium": { + "version": "1.4.103", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.103.tgz", + "integrity": "sha512-c/uKWR1Z/W30Wy/sx3dkZoj4BijbXX85QKWu9jJfjho3LBAXNEGAEW3oWiGb+dotA6C6BzCTxL2/aLes7jlUeg==", "dev": true }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true, - "requires": { - "is-extglob": "^2.1.1" + "engines": { + "node": ">=6" } }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/filesize": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-6.4.0.tgz", + "integrity": "sha512-mjFIpOHC4jbfcTfoh4rkWpI31mF7viw9ikj/JyLoKzqlwG/YsefKfvYlYhdYdg/9mtK2z1AzgN/0LvVQ3zdlSQ==", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-core-module": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", + "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", + "dev": true + }, + "node_modules/is-reference": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", + "dev": true, + "dependencies": { + "@types/estree": "*" + } + }, + "node_modules/jasmine": { + "version": "3.99.0", + "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-3.99.0.tgz", + "integrity": "sha512-YIThBuHzaIIcjxeuLmPD40SjxkEcc8i//sGMDKCgkRMVgIwRJf5qyExtlJpQeh7pkeoBSOe6lQEdg+/9uKg9mw==", + "dev": true, + "dependencies": { + "glob": "^7.1.6", + "jasmine-core": "~3.99.0" + }, + "bin": { + "jasmine": "bin/jasmine.js" + } + }, + "node_modules/jasmine-core": { + "version": "3.99.1", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.99.1.tgz", + "integrity": "sha512-Hu1dmuoGcZ7AfyynN3LsfruwMbxMALMka+YtZeGoLuDEySVmVAPaonkNoBRIw/ectu8b9tVQCJNgp4a4knp+tg==", + "dev": true + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json5": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" + }, + "node_modules/magic-string": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", + "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", + "dev": true, + "dependencies": { + "sourcemap-codec": "^1.4.8" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" + }, + "node_modules/module-details-from-path": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/module-details-from-path/-/module-details-from-path-1.0.3.tgz", + "integrity": "sha1-EUyUlnPiqKNenTV4hSeqN7Z52is=", + "dev": true + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/munkres-js": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/munkres-js/-/munkres-js-1.2.2.tgz", + "integrity": "sha1-4D2YBo1F1YexX1Y+uGDrZ6qFKLc=" + }, + "node_modules/node-releases": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.2.tgz", + "integrity": "sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==", + "dev": true + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "dev": true + }, + "node_modules/regenerate-unicode-properties": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz", + "integrity": "sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw==", + "dev": true, + "dependencies": { + "regenerate": "^1.4.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, + "node_modules/regenerator-transform": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", + "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.8.4" + } + }, + "node_modules/regexpu-core": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.0.1.tgz", + "integrity": "sha512-CriEZlrKK9VJw/xQGJpQM5rY88BtuL8DM+AEwvcThHilbxiTAy8vq4iJnd2tqq8wLmjbGZzP7ZcKFjbGkmEFrw==", + "dev": true, + "dependencies": { + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^10.0.1", + "regjsgen": "^0.6.0", + "regjsparser": "^0.8.2", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regjsgen": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.6.0.tgz", + "integrity": "sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA==", + "dev": true + }, + "node_modules/regjsparser": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.8.4.tgz", + "integrity": "sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA==", + "dev": true, + "dependencies": { + "jsesc": "~0.5.0" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + } + }, + "node_modules/resolve": { + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/rollup": { + "version": "2.70.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.70.1.tgz", + "integrity": "sha512-CRYsI5EuzLbXdxC6RnYhOuRdtz4bhejPMSWjsFLfVM/7w/85n2szZv6yExqUXsBdz5KT8eoubeyDUDjhLHEslA==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=10.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/rollup-plugin-sizes": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/rollup-plugin-sizes/-/rollup-plugin-sizes-1.0.4.tgz", + "integrity": "sha512-sZtFW+X/d4qytqFG6aKxhUj5aJadxOpMZbDrB9j9GpMKrXy2jt4RD/xbfnagbSbH+0q1kBcNd8L9tuoETjOu6g==", + "dev": true, + "dependencies": { + "filesize": "^6.0.1", + "module-details-from-path": "^1.0.3" + }, + "peerDependencies": { + "rollup": "^2.0.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "dev": true + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-canonical-property-names-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", + "dev": true, + "dependencies": { + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-value-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", + "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-property-aliases-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", + "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/uuid": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", + "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + } + }, + "dependencies": { + "@ampproject/remapping": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz", + "integrity": "sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.0" + } + }, + "@babel/code-frame": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "dev": true, + "requires": { + "@babel/highlight": "^7.16.7" + } + }, + "@babel/compat-data": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.7.tgz", + "integrity": "sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ==", + "dev": true + }, + "@babel/core": { + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.8.tgz", + "integrity": "sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ==", + "dev": true, + "requires": { + "@ampproject/remapping": "^2.1.0", + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.17.7", + "@babel/helper-compilation-targets": "^7.17.7", + "@babel/helper-module-transforms": "^7.17.7", + "@babel/helpers": "^7.17.8", + "@babel/parser": "^7.17.8", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.17.3", + "@babel/types": "^7.17.0", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.1.2", + "semver": "^6.3.0" + } + }, + "@babel/generator": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", + "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", + "dev": true, + "requires": { + "@babel/types": "^7.17.0", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", + "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.7.tgz", + "integrity": "sha512-C6FdbRaxYjwVu/geKW4ZeQ0Q31AftgRcdSnZ5/jsH6BzCJbtvXvhpfkbkThYSuutZA7nCXpPR6AD9zd1dprMkA==", + "dev": true, + "requires": { + "@babel/helper-explode-assignable-expression": "^7.16.7", + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.7.tgz", + "integrity": "sha512-UFzlz2jjd8kroj0hmCFV5zr+tQPi1dpC2cRsDV/3IEW8bJfCPrPpmcSN6ZS8RqIq4LXcmpipCQFPddyFA5Yc7w==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.17.7", + "@babel/helper-validator-option": "^7.16.7", + "browserslist": "^4.17.5", + "semver": "^6.3.0" + } + }, + "@babel/helper-create-class-features-plugin": { + "version": "7.17.6", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.6.tgz", + "integrity": "sha512-SogLLSxXm2OkBbSsHZMM4tUi8fUzjs63AT/d0YQIzr6GSd8Hxsbk2KYDX0k0DweAzGMj/YWeiCsorIdtdcW8Eg==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-member-expression-to-functions": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7" + } + }, + "@babel/helper-create-regexp-features-plugin": { + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.17.0.tgz", + "integrity": "sha512-awO2So99wG6KnlE+TPs6rn83gCz5WlEePJDTnLEqbchMVrBeAujURVphRdigsk094VhvZehFoNOihSlcBjwsXA==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "regexpu-core": "^5.0.1" + } + }, + "@babel/helper-define-polyfill-provider": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz", + "integrity": "sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA==", + "dev": true, + "requires": { + "@babel/helper-compilation-targets": "^7.13.0", + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/traverse": "^7.13.0", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2", + "semver": "^6.1.2" + } + }, + "@babel/helper-environment-visitor": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", + "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-explode-assignable-expression": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.7.tgz", + "integrity": "sha512-KyUenhWMC8VrxzkGP0Jizjo4/Zx+1nNZhgocs+gLzyZyB8SHidhoq9KK/8Ato4anhwsivfkBLftky7gvzbZMtQ==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-function-name": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", + "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", + "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", + "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.17.7.tgz", + "integrity": "sha512-thxXgnQ8qQ11W2wVUObIqDL4p148VMxkt5T/qpN5k2fboRyzFGFmKsTGViquyM5QHKUy48OZoca8kw4ajaDPyw==", + "dev": true, + "requires": { + "@babel/types": "^7.17.0" + } + }, + "@babel/helper-module-imports": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", + "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-module-transforms": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz", + "integrity": "sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-simple-access": "^7.17.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.17.3", + "@babel/types": "^7.17.0" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz", + "integrity": "sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz", + "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==", + "dev": true + }, + "@babel/helper-remap-async-to-generator": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.8.tgz", + "integrity": "sha512-fm0gH7Flb8H51LqJHy3HJ3wnE1+qtYR2A99K06ahwrawLdOFsCEWjZOrYricXJHoPSudNKxrMBUPEIPxiIIvBw==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-wrap-function": "^7.16.8", + "@babel/types": "^7.16.8" + } + }, + "@babel/helper-replace-supers": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz", + "integrity": "sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-member-expression-to-functions": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-simple-access": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.17.7.tgz", + "integrity": "sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA==", + "dev": true, + "requires": { + "@babel/types": "^7.17.0" + } + }, + "@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz", + "integrity": "sha512-+il1gTy0oHwUsBQZyJvukbB4vPMdcYBrFHa0Uc4AizLxbq6BOYC51Rv4tWocX9BLBDLZ4kc6qUFpQ6HRgL+3zw==", + "dev": true, + "requires": { + "@babel/types": "^7.16.0" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", + "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "dev": true + }, + "@babel/helper-validator-option": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", + "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", + "dev": true + }, + "@babel/helper-wrap-function": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.16.8.tgz", + "integrity": "sha512-8RpyRVIAW1RcDDGTA+GpPAwV22wXCfKOoM9bet6TLkGIFTkRQSkH1nMQ5Yet4MpoXe1ZwHPVtNasc2w0uZMqnw==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.8", + "@babel/types": "^7.16.8" + } + }, + "@babel/helpers": { + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.8.tgz", + "integrity": "sha512-QcL86FGxpfSJwGtAvv4iG93UL6bmqBdmoVY0CMCU2g+oD2ezQse3PT5Pa+jiD6LJndBQi0EDlpzOWNlLuhz5gw==", + "dev": true, + "requires": { + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.17.3", + "@babel/types": "^7.17.0" + } + }, + "@babel/highlight": { + "version": "7.16.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", + "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.16.7", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.8.tgz", + "integrity": "sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==", + "dev": true + }, + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.16.7.tgz", + "integrity": "sha512-anv/DObl7waiGEnC24O9zqL0pSuI9hljihqiDuFHC8d7/bjr/4RLGPWuc8rYOff/QPzbEPSkzG8wGG9aDuhHRg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.16.7.tgz", + "integrity": "sha512-di8vUHRdf+4aJ7ltXhaDbPoszdkh59AQtJM5soLsuHpQJdFQZOA4uGj0V2u/CZ8bJ/u8ULDL5yq6FO/bCXnKHw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", + "@babel/plugin-proposal-optional-chaining": "^7.16.7" + } + }, + "@babel/plugin-proposal-async-generator-functions": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.8.tgz", + "integrity": "sha512-71YHIvMuiuqWJQkebWJtdhQTfd4Q4mF76q2IX37uZPkG9+olBxsX+rH1vkhFto4UeJZ9dPY2s+mDvhDm1u2BGQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-remap-async-to-generator": "^7.16.8", + "@babel/plugin-syntax-async-generators": "^7.8.4" + } + }, + "@babel/plugin-proposal-class-properties": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.7.tgz", + "integrity": "sha512-IobU0Xme31ewjYOShSIqd/ZGM/r/cuOz2z0MDbNrhF5FW+ZVgi0f2lyeoj9KFPDOAqsYxmLWZte1WOwlvY9aww==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-proposal-class-static-block": { + "version": "7.17.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.17.6.tgz", + "integrity": "sha512-X/tididvL2zbs7jZCeeRJ8167U/+Ac135AM6jCAx6gYXDUviZV5Ku9UDvWS2NCuWlFjIRXklYhwo6HhAC7ETnA==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.17.6", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-class-static-block": "^7.14.5" + } + }, + "@babel/plugin-proposal-dynamic-import": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.7.tgz", + "integrity": "sha512-I8SW9Ho3/8DRSdmDdH3gORdyUuYnk1m4cMxUAdu5oy4n3OfN8flDEH+d60iG7dUfi0KkYwSvoalHzzdRzpWHTg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + } + }, + "@babel/plugin-proposal-export-namespace-from": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.16.7.tgz", + "integrity": "sha512-ZxdtqDXLRGBL64ocZcs7ovt71L3jhC1RGSyR996svrCi3PYqHNkb3SwPJCs8RIzD86s+WPpt2S73+EHCGO+NUA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + } + }, + "@babel/plugin-proposal-json-strings": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.7.tgz", + "integrity": "sha512-lNZ3EEggsGY78JavgbHsK9u5P3pQaW7k4axlgFLYkMd7UBsiNahCITShLjNQschPyjtO6dADrL24757IdhBrsQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-json-strings": "^7.8.3" + } + }, + "@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.16.7.tgz", + "integrity": "sha512-K3XzyZJGQCr00+EtYtrDjmwX7o7PLK6U9bi1nCwkQioRFVUv6dJoxbQjtWVtP+bCPy82bONBKG8NPyQ4+i6yjg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + } + }, + "@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.16.7.tgz", + "integrity": "sha512-aUOrYU3EVtjf62jQrCj63pYZ7k6vns2h/DQvHPWGmsJRYzWXZ6/AsfgpiRy6XiuIDADhJzP2Q9MwSMKauBQ+UQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + } + }, + "@babel/plugin-proposal-numeric-separator": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.7.tgz", + "integrity": "sha512-vQgPMknOIgiuVqbokToyXbkY/OmmjAzr/0lhSIbG/KmnzXPGwW/AdhdKpi+O4X/VkWiWjnkKOBiqJrTaC98VKw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + } + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.17.3.tgz", + "integrity": "sha512-yuL5iQA/TbZn+RGAfxQXfi7CNLmKi1f8zInn4IgobuCWcAb7i+zj4TYzQ9l8cEzVyJ89PDGuqxK1xZpUDISesw==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.17.0", + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.16.7" + } + }, + "@babel/plugin-proposal-optional-catch-binding": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.7.tgz", + "integrity": "sha512-eMOH/L4OvWSZAE1VkHbr1vckLG1WUcHGJSLqqQwl2GaUqG6QjddvrOaTUMNYiv77H5IKPMZ9U9P7EaHwvAShfA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + } + }, + "@babel/plugin-proposal-optional-chaining": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.7.tgz", + "integrity": "sha512-eC3xy+ZrUcBtP7x+sq62Q/HYd674pPTb/77XZMb5wbDPGWIdUbSr4Agr052+zaUPSb+gGRnjxXfKFvx5iMJ+DA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + } + }, + "@babel/plugin-proposal-private-methods": { + "version": "7.16.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.11.tgz", + "integrity": "sha512-F/2uAkPlXDr8+BHpZvo19w3hLFKge+k75XUprE6jaqKxjGkSYcK+4c+bup5PdW/7W/Rpjwql7FTVEDW+fRAQsw==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.16.10", + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-proposal-private-property-in-object": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.16.7.tgz", + "integrity": "sha512-rMQkjcOFbm+ufe3bTZLyOfsOUOxyvLXZJCTARhJr+8UMSoZmqTe1K1BgkFcrW37rAchWg57yI69ORxiWvUINuQ==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-create-class-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + } + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.7.tgz", + "integrity": "sha512-QRK0YI/40VLhNVGIjRNAAQkEHws0cswSdFFjpFyt943YmJIU1da9uW63Iu6NFV6CxTZW5eTDCrwZUstBWgp/Rg==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.7.tgz", + "integrity": "sha512-9ffkFFMbvzTvv+7dTp/66xvZAWASuPD5Tl9LK3Z9vhOmANo6j94rik+5YMBt4CwHVMWLWpMsriIc2zsa3WW3xQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-async-to-generator": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.8.tgz", + "integrity": "sha512-MtmUmTJQHCnyJVrScNzNlofQJ3dLFuobYn3mwOTKHnSCMtbNsqvF71GQmJfFjdrXSsAA7iysFmYWw4bXZ20hOg==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-remap-async-to-generator": "^7.16.8" + } + }, + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.7.tgz", + "integrity": "sha512-JUuzlzmF40Z9cXyytcbZEZKckgrQzChbQJw/5PuEHYeqzCsvebDx0K0jWnIIVcmmDOAVctCgnYs0pMcrYj2zJg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-block-scoping": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.7.tgz", + "integrity": "sha512-ObZev2nxVAYA4bhyusELdo9hb3H+A56bxH3FZMbEImZFiEDYVHXQSJ1hQKFlDnlt8G9bBrCZ5ZpURZUrV4G5qQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.7.tgz", + "integrity": "sha512-WY7og38SFAGYRe64BrjKf8OrE6ulEHtr5jEYaZMwox9KebgqPi67Zqz8K53EKk1fFEJgm96r32rkKZ3qA2nCWQ==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "globals": "^11.1.0" + } + }, + "@babel/plugin-transform-computed-properties": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.7.tgz", + "integrity": "sha512-gN72G9bcmenVILj//sv1zLNaPyYcOzUho2lIJBMh/iakJ9ygCo/hEF9cpGb61SCMEDxbbyBoVQxrt+bWKu5KGw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.17.7.tgz", + "integrity": "sha512-XVh0r5yq9sLR4vZ6eVZe8FKfIcSgaTBxVBRSYokRj2qksf6QerYnTxz9/GTuKTH/n/HwLP7t6gtlybHetJ/6hQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-dotall-regex": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.7.tgz", + "integrity": "sha512-Lyttaao2SjZF6Pf4vk1dVKv8YypMpomAbygW+mU5cYP3S5cWTfCJjG8xV6CFdzGFlfWK81IjL9viiTvpb6G7gQ==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-duplicate-keys": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.7.tgz", + "integrity": "sha512-03DvpbRfvWIXyK0/6QiR1KMTWeT6OcQ7tbhjrXyFS02kjuX/mu5Bvnh5SDSWHxyawit2g5aWhKwI86EE7GUnTw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-exponentiation-operator": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.7.tgz", + "integrity": "sha512-8UYLSlyLgRixQvlYH3J2ekXFHDFLQutdy7FfFAMm3CPZ6q9wHCwnUyiXpQCe3gVVnQlHc5nsuiEVziteRNTXEA==", + "dev": true, + "requires": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-for-of": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.7.tgz", + "integrity": "sha512-/QZm9W92Ptpw7sjI9Nx1mbcsWz33+l8kuMIQnDwgQBG5s3fAfQvkRjQ7NqXhtNcKOnPkdICmUHyCaWW06HCsqg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-function-name": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.7.tgz", + "integrity": "sha512-SU/C68YVwTRxqWj5kgsbKINakGag0KTgq9f2iZEXdStoAbOzLHEBRYzImmA6yFo8YZhJVflvXmIHUO7GWHmxxA==", + "dev": true, + "requires": { + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-literals": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.7.tgz", + "integrity": "sha512-6tH8RTpTWI0s2sV6uq3e/C9wPo4PTqqZps4uF0kzQ9/xPLFQtipynvmT1g/dOfEJ+0EQsHhkQ/zyRId8J2b8zQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-member-expression-literals": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.7.tgz", + "integrity": "sha512-mBruRMbktKQwbxaJof32LT9KLy2f3gH+27a5XSuXo6h7R3vqltl0PgZ80C8ZMKw98Bf8bqt6BEVi3svOh2PzMw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-modules-amd": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.7.tgz", + "integrity": "sha512-KaaEtgBL7FKYwjJ/teH63oAmE3lP34N3kshz8mm4VMAw7U3PxjVwwUmxEFksbgsNUaO3wId9R2AVQYSEGRa2+g==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.17.7.tgz", + "integrity": "sha512-ITPmR2V7MqioMJyrxUo2onHNC3e+MvfFiFIR0RP21d3PtlVb6sfzoxNKiphSZUOM9hEIdzCcZe83ieX3yoqjUA==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.17.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-simple-access": "^7.17.7", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.17.8.tgz", + "integrity": "sha512-39reIkMTUVagzgA5x88zDYXPCMT6lcaRKs1+S9K6NKBPErbgO/w/kP8GlNQTC87b412ZTlmNgr3k2JrWgHH+Bw==", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-module-transforms": "^7.17.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-umd": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.7.tgz", + "integrity": "sha512-EMh7uolsC8O4xhudF2F6wedbSHm1HHZ0C6aJ7K67zcDNidMzVcxWdGr+htW9n21klm+bOn+Rx4CBsAntZd3rEQ==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.8.tgz", + "integrity": "sha512-j3Jw+n5PvpmhRR+mrgIh04puSANCk/T/UA3m3P1MjJkhlK906+ApHhDIqBQDdOgL/r1UYpz4GNclTXxyZrYGSw==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.16.7" + } + }, + "@babel/plugin-transform-new-target": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.7.tgz", + "integrity": "sha512-xiLDzWNMfKoGOpc6t3U+etCE2yRnn3SM09BXqWPIZOBpL2gvVrBWUKnsJx0K/ADi5F5YC5f8APFfWrz25TdlGg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-object-super": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.7.tgz", + "integrity": "sha512-14J1feiQVWaGvRxj2WjyMuXS2jsBkgB3MdSN5HuC2G5nRspa5RK9COcs82Pwy5BuGcjb+fYaUj94mYcOj7rCvw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7" + } + }, + "@babel/plugin-transform-parameters": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.7.tgz", + "integrity": "sha512-AT3MufQ7zZEhU2hwOA11axBnExW0Lszu4RL/tAlUJBuNoRak+wehQW8h6KcXOcgjY42fHtDxswuMhMjFEuv/aw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-property-literals": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.7.tgz", + "integrity": "sha512-z4FGr9NMGdoIl1RqavCqGG+ZuYjfZ/hkCIeuH6Do7tXmSm0ls11nYVSJqFEUOSJbDab5wC6lRE/w6YjVcr6Hqw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-regenerator": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.7.tgz", + "integrity": "sha512-mF7jOgGYCkSJagJ6XCujSQg+6xC1M77/03K2oBmVJWoFGNUtnVJO4WHKJk3dnPC8HCcj4xBQP1Egm8DWh3Pb3Q==", + "dev": true, + "requires": { + "regenerator-transform": "^0.14.2" + } + }, + "@babel/plugin-transform-reserved-words": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.16.7.tgz", + "integrity": "sha512-KQzzDnZ9hWQBjwi5lpY5v9shmm6IVG0U9pB18zvMu2i4H90xpT4gmqwPYsn8rObiadYe2M0gmgsiOIF5A/2rtg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-shorthand-properties": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.7.tgz", + "integrity": "sha512-hah2+FEnoRoATdIb05IOXf+4GzXYTq75TVhIn1PewihbpyrNWUt2JbudKQOETWw6QpLe+AIUpJ5MVLYTQbeeUg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-spread": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.7.tgz", + "integrity": "sha512-+pjJpgAngb53L0iaA5gU/1MLXJIfXcYepLgXB3esVRf4fqmj8f2cxM3/FKaHsZms08hFQJkFccEWuIpm429TXg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0" + } + }, + "@babel/plugin-transform-sticky-regex": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.7.tgz", + "integrity": "sha512-NJa0Bd/87QV5NZZzTuZG5BPJjLYadeSZ9fO6oOUoL4iQx+9EEuw/eEM92SrsT19Yc2jgB1u1hsjqDtH02c3Drw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-template-literals": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.7.tgz", + "integrity": "sha512-VwbkDDUeenlIjmfNeDX/V0aWrQH2QiVyJtwymVQSzItFDTpxfyJh3EVaQiS0rIN/CqbLGr0VcGmuwyTdZtdIsA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-typeof-symbol": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.7.tgz", + "integrity": "sha512-p2rOixCKRJzpg9JB4gjnG4gjWkWa89ZoYUnl9snJ1cWIcTH/hvxZqfO+WjG6T8DRBpctEol5jw1O5rA8gkCokQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-unicode-escapes": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.7.tgz", + "integrity": "sha512-TAV5IGahIz3yZ9/Hfv35TV2xEm+kaBDaZQCn2S/hG9/CZ0DktxJv9eKfPc7yYCvOYR4JGx1h8C+jcSOvgaaI/Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-unicode-regex": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.7.tgz", + "integrity": "sha512-oC5tYYKw56HO75KZVLQ+R/Nl3Hro9kf8iG0hXoaHP7tjAyCpvqBiSNe6vGrZni1Z6MggmUOC6A7VP7AVmw225Q==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/preset-env": { + "version": "7.16.11", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.16.11.tgz", + "integrity": "sha512-qcmWG8R7ZW6WBRPZK//y+E3Cli151B20W1Rv7ln27vuPaXU/8TKms6jFdiJtF7UDTxcrb7mZd88tAeK9LjdT8g==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.16.8", + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-validator-option": "^7.16.7", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.16.7", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.16.7", + "@babel/plugin-proposal-async-generator-functions": "^7.16.8", + "@babel/plugin-proposal-class-properties": "^7.16.7", + "@babel/plugin-proposal-class-static-block": "^7.16.7", + "@babel/plugin-proposal-dynamic-import": "^7.16.7", + "@babel/plugin-proposal-export-namespace-from": "^7.16.7", + "@babel/plugin-proposal-json-strings": "^7.16.7", + "@babel/plugin-proposal-logical-assignment-operators": "^7.16.7", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7", + "@babel/plugin-proposal-numeric-separator": "^7.16.7", + "@babel/plugin-proposal-object-rest-spread": "^7.16.7", + "@babel/plugin-proposal-optional-catch-binding": "^7.16.7", + "@babel/plugin-proposal-optional-chaining": "^7.16.7", + "@babel/plugin-proposal-private-methods": "^7.16.11", + "@babel/plugin-proposal-private-property-in-object": "^7.16.7", + "@babel/plugin-proposal-unicode-property-regex": "^7.16.7", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-transform-arrow-functions": "^7.16.7", + "@babel/plugin-transform-async-to-generator": "^7.16.8", + "@babel/plugin-transform-block-scoped-functions": "^7.16.7", + "@babel/plugin-transform-block-scoping": "^7.16.7", + "@babel/plugin-transform-classes": "^7.16.7", + "@babel/plugin-transform-computed-properties": "^7.16.7", + "@babel/plugin-transform-destructuring": "^7.16.7", + "@babel/plugin-transform-dotall-regex": "^7.16.7", + "@babel/plugin-transform-duplicate-keys": "^7.16.7", + "@babel/plugin-transform-exponentiation-operator": "^7.16.7", + "@babel/plugin-transform-for-of": "^7.16.7", + "@babel/plugin-transform-function-name": "^7.16.7", + "@babel/plugin-transform-literals": "^7.16.7", + "@babel/plugin-transform-member-expression-literals": "^7.16.7", + "@babel/plugin-transform-modules-amd": "^7.16.7", + "@babel/plugin-transform-modules-commonjs": "^7.16.8", + "@babel/plugin-transform-modules-systemjs": "^7.16.7", + "@babel/plugin-transform-modules-umd": "^7.16.7", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.16.8", + "@babel/plugin-transform-new-target": "^7.16.7", + "@babel/plugin-transform-object-super": "^7.16.7", + "@babel/plugin-transform-parameters": "^7.16.7", + "@babel/plugin-transform-property-literals": "^7.16.7", + "@babel/plugin-transform-regenerator": "^7.16.7", + "@babel/plugin-transform-reserved-words": "^7.16.7", + "@babel/plugin-transform-shorthand-properties": "^7.16.7", + "@babel/plugin-transform-spread": "^7.16.7", + "@babel/plugin-transform-sticky-regex": "^7.16.7", + "@babel/plugin-transform-template-literals": "^7.16.7", + "@babel/plugin-transform-typeof-symbol": "^7.16.7", + "@babel/plugin-transform-unicode-escapes": "^7.16.7", + "@babel/plugin-transform-unicode-regex": "^7.16.7", + "@babel/preset-modules": "^0.1.5", + "@babel/types": "^7.16.8", + "babel-plugin-polyfill-corejs2": "^0.3.0", + "babel-plugin-polyfill-corejs3": "^0.5.0", + "babel-plugin-polyfill-regenerator": "^0.3.0", + "core-js-compat": "^3.20.2", + "semver": "^6.3.0" + } + }, + "@babel/preset-modules": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", + "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + } + }, + "@babel/runtime": { + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.8.tgz", + "integrity": "sha512-dQpEpK0O9o6lj6oPu0gRDbbnk+4LeHlNcBpspf6Olzt3GIX4P1lWF1gS+pHLDFlaJvbR6q7jCfQ08zA4QJBnmA==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@babel/template": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" + } + }, + "@babel/traverse": { + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz", + "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.17.3", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.17.3", + "@babel/types": "^7.17.0", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", + "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.16.7", + "to-fast-properties": "^2.0.0" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz", + "integrity": "sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==", + "dev": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz", + "integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.4.tgz", + "integrity": "sha512-vFv9ttIedivx0ux3QSjhgtCVjPZd5l46ZOMDSCwnH1yUO2e964gO8LZGyv2QkqcgR6TnBU1v+1IFqmeoG+0UJQ==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "@rollup/plugin-babel": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", + "integrity": "sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.10.4", + "@rollup/pluginutils": "^3.1.0" + } + }, + "@rollup/plugin-commonjs": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.0.3.tgz", + "integrity": "sha512-ThGfwyvcLc6cfP/MWxA5ACF+LZCvsuhUq7V5134Az1oQWsiC7lNpLT4mJI86WQunK7BYmpUiHmMk2Op6OAHs0g==", "dev": true, "requires": { - "kind-of": "^3.0.2" + "@rollup/pluginutils": "^3.1.0", + "commondir": "^1.0.1", + "estree-walker": "^2.0.1", + "glob": "^7.1.6", + "is-reference": "^1.2.1", + "magic-string": "^0.25.7", + "resolve": "^1.17.0" }, "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } + "estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true } } }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "@rollup/plugin-node-resolve": { + "version": "13.1.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.3.tgz", + "integrity": "sha512-BdxNk+LtmElRo5d06MGY4zoepyrXX1tkzX2hrnPEZ53k78GuOMWLqmJDGIIOPwVRIFZrLQOo+Yr6KtCuLIA0AQ==", "dev": true, "requires": { - "isobject": "^3.0.1" + "@rollup/pluginutils": "^3.1.0", + "@types/resolve": "1.17.1", + "builtin-modules": "^3.1.0", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.19.0" } }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true + "@rollup/pluginutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "dev": true, + "requires": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + } }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", "dev": true }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "@types/node": { + "version": "17.0.23", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz", + "integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==", "dev": true }, - "jasmine": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-3.6.1.tgz", - "integrity": "sha512-Jqp8P6ZWkTVFGmJwBK46p+kJNrZCdqkQ4GL+PGuBXZwK1fM4ST9BizkYgIwCFqYYqnTizAy6+XG2Ej5dFrej9Q==", + "@types/resolve": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", + "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", "dev": true, "requires": { - "fast-glob": "^2.2.6", - "jasmine-core": "~3.6.0" + "@types/node": "*" } }, - "jasmine-core": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.6.0.tgz", - "integrity": "sha512-8uQYa7zJN8hq9z+g8z1bqCfdC8eoDAeVnM5sfqs7KHv9/ifoJ500m018fpFc7RDaO6SWCLCXwo/wPSNcdYTgcw==", - "dev": true + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true + "babel-plugin-dynamic-import-node": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", + "dev": true, + "requires": { + "object.assign": "^4.1.0" + } }, - "lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" + "babel-plugin-polyfill-corejs2": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz", + "integrity": "sha512-v7/T6EQcNfVLfcN2X8Lulb7DjprieyLWJK/zOWH5DUYcAgex9sP3h25Q+DLsX9TloXe3y1O8l2q2Jv9q8UVB9w==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.13.11", + "@babel/helper-define-polyfill-provider": "^0.3.1", + "semver": "^6.1.1" + } + }, + "babel-plugin-polyfill-corejs3": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz", + "integrity": "sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ==", + "dev": true, + "requires": { + "@babel/helper-define-polyfill-provider": "^0.3.1", + "core-js-compat": "^3.21.0" + } + }, + "babel-plugin-polyfill-regenerator": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.1.tgz", + "integrity": "sha512-Y2B06tvgHYt1x0yz17jGkGeeMr5FeKUu+ASJ+N6nB5lQ8Dapfg42i0OVrf8PNGJ3zKL4A23snMi1IRwrqqND7A==", + "dev": true, + "requires": { + "@babel/helper-define-polyfill-provider": "^0.3.1" + } }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { - "object-visit": "^1.0.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "browserslist": { + "version": "4.20.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.2.tgz", + "integrity": "sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001317", + "electron-to-chromium": "^1.4.84", + "escalade": "^3.1.1", + "node-releases": "^2.0.2", + "picocolors": "^1.0.0" + } + }, + "builtin-modules": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", + "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==", "dev": true }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "dev": true, "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" } }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + "caniuse-lite": { + "version": "1.0.30001324", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001324.tgz", + "integrity": "sha512-/eYp1J6zYh1alySQB4uzYFkLmxxI8tk0kxldbNHXp8+v+rdMKdUBNjRLz7T7fz6Iox+1lIdYpc7rq6ZcXfTukg==", + "dev": true }, - "mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, - "munkres-js": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/munkres-js/-/munkres-js-1.2.2.tgz", - "integrity": "sha1-4D2YBo1F1YexX1Y+uGDrZ6qFKLc=" + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", "dev": true, "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "safe-buffer": "~5.1.1" } }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "core-js-compat": { + "version": "3.21.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.21.1.tgz", + "integrity": "sha512-gbgX5AUvMb8gwxC7FLVWYT7Kkgu/y7+h/h1X43yJkNqhlK2fuYyQimqvKGNZFAY6CKii/GFKJ2cp/1/42TN36g==", "dev": true, "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" + "browserslist": "^4.19.1", + "semver": "7.0.0" }, "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } + "semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true } } }, - "object-visit": { + "crypto": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "resolved": "https://registry.npmjs.org/crypto/-/crypto-1.0.1.tgz", + "integrity": "sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig==" + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { - "isobject": "^3.0.0" + "ms": "2.1.2" } }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "dev": true + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", "dev": true, "requires": { - "isobject": "^3.0.1" + "object-keys": "^1.0.12" } }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "electron-to-chromium": { + "version": "1.4.103", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.103.tgz", + "integrity": "sha512-c/uKWR1Z/W30Wy/sx3dkZoj4BijbXX85QKWu9jJfjho3LBAXNEGAEW3oWiGb+dotA6C6BzCTxL2/aLes7jlUeg==", "dev": true }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "filesize": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-6.4.0.tgz", + "integrity": "sha512-mjFIpOHC4jbfcTfoh4rkWpI31mF7viw9ikj/JyLoKzqlwG/YsefKfvYlYhdYdg/9mtK2z1AzgN/0LvVQ3zdlSQ==", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", "dev": true, "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" } }, - "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "is-core-module": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", + "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", "dev": true }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "is-reference": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", "dev": true, "requires": { - "ret": "~0.1.10" + "@types/estree": "*" } }, - "set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "jasmine": { + "version": "3.99.0", + "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-3.99.0.tgz", + "integrity": "sha512-YIThBuHzaIIcjxeuLmPD40SjxkEcc8i//sGMDKCgkRMVgIwRJf5qyExtlJpQeh7pkeoBSOe6lQEdg+/9uKg9mw==", "dev": true, "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } + "glob": "^7.1.6", + "jasmine-core": "~3.99.0" } }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "jasmine-core": { + "version": "3.99.1", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.99.1.tgz", + "integrity": "sha512-Hu1dmuoGcZ7AfyynN3LsfruwMbxMALMka+YtZeGoLuDEySVmVAPaonkNoBRIw/ectu8b9tVQCJNgp4a4knp+tg==", + "dev": true + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "json5": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "dev": true + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" + }, + "magic-string": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", + "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", "dev": true, "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } + "sourcemap-codec": "^1.4.8" } }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" + }, + "module-details-from-path": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/module-details-from-path/-/module-details-from-path-1.0.3.tgz", + "integrity": "sha1-EUyUlnPiqKNenTV4hSeqN7Z52is=", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "munkres-js": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/munkres-js/-/munkres-js-1.2.2.tgz", + "integrity": "sha1-4D2YBo1F1YexX1Y+uGDrZ6qFKLc=" + }, + "node-releases": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.2.tgz", + "integrity": "sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" } }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } + "wrappy": "1" } }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, - "source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "dev": true + }, + "regenerate-unicode-properties": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz", + "integrity": "sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw==", "dev": true, "requires": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" + "regenerate": "^1.4.2" } }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", "dev": true }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "regenerator-transform": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", + "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", "dev": true, "requires": { - "extend-shallow": "^3.0.0" + "@babel/runtime": "^7.8.4" } }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "regexpu-core": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.0.1.tgz", + "integrity": "sha512-CriEZlrKK9VJw/xQGJpQM5rY88BtuL8DM+AEwvcThHilbxiTAy8vq4iJnd2tqq8wLmjbGZzP7ZcKFjbGkmEFrw==", + "dev": true, + "requires": { + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^10.0.1", + "regjsgen": "^0.6.0", + "regjsparser": "^0.8.2", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.0.0" + } + }, + "regjsgen": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.6.0.tgz", + "integrity": "sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA==", + "dev": true + }, + "regjsparser": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.8.4.tgz", + "integrity": "sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA==", "dev": true, "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" + "jsesc": "~0.5.0" }, "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true } } }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "resolve": { + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", "dev": true, "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" } }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "rollup": { + "version": "2.70.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.70.1.tgz", + "integrity": "sha512-CRYsI5EuzLbXdxC6RnYhOuRdtz4bhejPMSWjsFLfVM/7w/85n2szZv6yExqUXsBdz5KT8eoubeyDUDjhLHEslA==", "dev": true, "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" + "fsevents": "~2.3.2" } }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "rollup-plugin-sizes": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/rollup-plugin-sizes/-/rollup-plugin-sizes-1.0.4.tgz", + "integrity": "sha512-sZtFW+X/d4qytqFG6aKxhUj5aJadxOpMZbDrB9j9GpMKrXy2jt4RD/xbfnagbSbH+0q1kBcNd8L9tuoETjOu6g==", "dev": true, "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" + "filesize": "^6.0.1", + "module-details-from-path": "^1.0.3" } }, - "union-value": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" + "has-flag": "^3.0.0" } }, - "unset-value": { + "supports-preserve-symlinks-flag": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - } + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, + "unicode-canonical-property-names-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", + "dev": true + }, + "unicode-match-property-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", + "dev": true, + "requires": { + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" } }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "unicode-match-property-value-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", + "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", "dev": true }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "unicode-property-aliases-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", + "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", "dev": true }, "uuid": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true } } } diff --git a/package.json b/package.json index 9c08763..c564196 100644 --- a/package.json +++ b/package.json @@ -3,12 +3,13 @@ "version": "0.9.0", "description": "Tracker by detections in javascript for node.js / browsers", "url": "https://github.com/opendatacam/node-moving-things-tracker", - "main": "main.js", + "main": "bundle.js", "bin": { - "node-moving-things-tracker": "main.js" + "node-moving-things-tracker": "bundle.js" }, "scripts": { - "test": "jasmine" + "test": "jasmine", + "build": "rollup -c" }, "author": "@tdurand", "contributors": [ @@ -18,12 +19,20 @@ ], "license": "MIT", "dependencies": { + "crypto": "^1.0.1", "lodash.isequal": "^4.5.0", "minimist": "^1.2.0", "munkres-js": "^1.2.2", "uuid": "^3.2.1" }, "devDependencies": { - "jasmine": "^3.6.1" + "@babel/core": "^7.17.8", + "@babel/preset-env": "^7.16.11", + "@rollup/plugin-babel": "^5.3.1", + "@rollup/plugin-commonjs": "^21.0.3", + "@rollup/plugin-node-resolve": "^13.1.3", + "jasmine": "^3.6.1", + "rollup": "^2.70.1", + "rollup-plugin-sizes": "^1.0.4" } } diff --git a/rollup.config.js b/rollup.config.js new file mode 100644 index 0000000..2efe472 --- /dev/null +++ b/rollup.config.js @@ -0,0 +1,20 @@ +import resolve from "@rollup/plugin-node-resolve"; +import { babel } from "@rollup/plugin-babel"; +import sizes from "rollup-plugin-sizes"; +import commonjs from '@rollup/plugin-commonjs'; + +const config = { + input: 'tracker.js', + output: { + file: 'bundle.js', + format: 'esm' + }, + plugins: [ + resolve({ browser: true, preferBuiltins: false }), + commonjs({ transformMixedEsModules: true }), + babel({ babelHelpers: 'bundled' }), + sizes() + ] +}; + +export default config; \ No newline at end of file From 1353e0d03e0d7acb5639738544204e2919cb6174 Mon Sep 17 00:00:00 2001 From: Dmytro Date: Sat, 2 Apr 2022 21:50:28 +0300 Subject: [PATCH 03/11] move to cjs --- bundle.cjs.js | 3805 ++++++++++++++++++++++++++++++++++++ bundle.js => bundle.esm.js | 0 package.json | 4 +- rollup.config.js | 4 +- 4 files changed, 3809 insertions(+), 4 deletions(-) create mode 100644 bundle.cjs.js rename bundle.js => bundle.esm.js (100%) diff --git a/bundle.cjs.js b/bundle.cjs.js new file mode 100644 index 0000000..4ef24b6 --- /dev/null +++ b/bundle.cjs.js @@ -0,0 +1,3805 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); +} + +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); +} + +function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); +} + +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); +} + +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + + return arr2; +} + +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} + +var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + +var tracker = {}; + +var ItemTracked$1 = {}; + +var rngBrowser = {exports: {}}; + +// browser this is a little complicated due to unknown quality of Math.random() +// and inconsistent support for the `crypto` API. We do the best we can via +// feature-detection +// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. + +var getRandomValues = typeof crypto != 'undefined' && crypto.getRandomValues.bind(crypto) || typeof msCrypto != 'undefined' && msCrypto.getRandomValues.bind(msCrypto); + +if (getRandomValues) { + // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto + var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef + + rngBrowser.exports = function whatwgRNG() { + getRandomValues(rnds8); + return rnds8; + }; +} else { + // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). It's fast, but is of unspecified + // quality. + var rnds = new Array(16); + + rngBrowser.exports = function mathRNG() { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) r = Math.random() * 0x100000000; + rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return rnds; + }; +} + +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +var byteToHex = []; + +for (var i = 0; i < 256; ++i) { + byteToHex[i] = (i + 0x100).toString(16).substr(1); +} + +function bytesToUuid$1(buf, offset) { + var i = offset || 0; + var bth = byteToHex; + return bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]]; +} + +var bytesToUuid_1 = bytesToUuid$1; + +var rng = rngBrowser.exports; +var bytesToUuid = bytesToUuid_1; + +function v4(options, buf, offset) { + var i = buf && offset || 0; + + if (typeof options == 'string') { + buf = options === 'binary' ? new Array(16) : null; + options = null; + } + + options = options || {}; + var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || bytesToUuid(rnds); +} + +var v4_1 = v4; + +var utils = {}; + +utils.isDetectionTooLarge = function (detections, largestAllowed) { + if (detections.w >= largestAllowed) { + return true; + } else { + return false; + } +}; + +var isInsideArea = function isInsideArea(area, point) { + var xMin = area.x - area.w / 2; + var xMax = area.x + area.w / 2; + var yMin = area.y - area.h / 2; + var yMax = area.y + area.h / 2; + + if (point.x >= xMin && point.x <= xMax && point.y >= yMin && point.y <= yMax) { + return true; + } else { + return false; + } +}; + +utils.isInsideArea = isInsideArea; + +utils.isInsideSomeAreas = function (areas, point) { + var isInside = areas.some(function (area) { + return isInsideArea(area, point); + }); + return isInside; +}; + +utils.ignoreObjectsNotToDetect = function (detections, objectsToDetect) { + return detections.filter(function (detection) { + return objectsToDetect.indexOf(detection.name) > -1; + }); +}; + +var getRectangleEdges = function getRectangleEdges(item) { + return { + x0: item.x - item.w / 2, + y0: item.y - item.h / 2, + x1: item.x + item.w / 2, + y1: item.y + item.h / 2 + }; +}; + +utils.getRectangleEdges = getRectangleEdges; + +utils.iouAreas = function (item1, item2) { + var rect1 = getRectangleEdges(item1); + var rect2 = getRectangleEdges(item2); // Get overlap rectangle + + var overlap_x0 = Math.max(rect1.x0, rect2.x0); + var overlap_y0 = Math.max(rect1.y0, rect2.y0); + var overlap_x1 = Math.min(rect1.x1, rect2.x1); + var overlap_y1 = Math.min(rect1.y1, rect2.y1); // if there an overlap + + if (overlap_x1 - overlap_x0 <= 0 || overlap_y1 - overlap_y0 <= 0) { + // no overlap + return 0; + } else { + area_rect1 = item1.w * item1.h; + area_rect2 = item2.w * item2.h; + area_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0); + area_union = area_rect1 + area_rect2 - area_intersection; + return area_intersection / area_union; + } +}; + +utils.computeVelocityVector = function (item1, item2, nbFrame) { + return { + dx: (item2.x - item1.x) / nbFrame, + dy: (item2.y - item1.y) / nbFrame + }; +}; +/* + + computeBearingIn360 + + dY + + ^ XX + | XXX + | XX + | XX + | XX + | XXX + | XX + | XX + | XX bearing = this angle in degree + | XX + |XX ++----------------------XX-----------------------> dX + | + | + | + | + | + | + | + | + | + | + | + + + +*/ + + +utils.computeBearingIn360 = function (dx, dy) { + var angle = Math.atan(dx / dy) / (Math.PI / 180); + + if (angle > 0) { + if (dy > 0) return angle;else return 180 + angle; + } else { + if (dx > 0) return 180 + angle;else return 360 + angle; + } +}; + +var uuidv4 = v4_1; +var computeBearingIn360 = utils.computeBearingIn360; +var computeVelocityVector = utils.computeVelocityVector; // Properties example +// { +// "x": 1021, +// "y": 65, +// "w": 34, +// "h": 27, +// "confidence": 26, +// "name": "car" +// } +// Use a simple incremental unique id for the display + +var idDisplay = 0; + +ItemTracked$1.ItemTracked = function (properties, frameNb, unMatchedFramesTolerance, fastDelete) { + var DEFAULT_UNMATCHEDFRAMES_TOLERANCE = unMatchedFramesTolerance; + var itemTracked = {}; // ==== Private ===== + // Am I available to be matched? + + itemTracked.available = true; // Should I be deleted? + + itemTracked["delete"] = false; + itemTracked.fastDelete = fastDelete; // How many unmatched frame should I survive? + + itemTracked.frameUnmatchedLeftBeforeDying = unMatchedFramesTolerance; + itemTracked.isZombie = false; + itemTracked.appearFrame = frameNb; + itemTracked.disappearFrame = null; + itemTracked.disappearArea = {}; // Keep track of the most counted class + + itemTracked.nameCount = {}; + itemTracked.nameCount[properties.name] = 1; // ==== Public ===== + + itemTracked.x = properties.x; + itemTracked.y = properties.y; + itemTracked.w = properties.w; + itemTracked.h = properties.h; + itemTracked.name = properties.name; + itemTracked.confidence = properties.confidence; + itemTracked.itemHistory = []; + itemTracked.itemHistory.push({ + x: properties.x, + y: properties.y, + w: properties.w, + h: properties.h, + confidence: properties.confidence + }); + itemTracked.velocity = { + dx: 0, + dy: 0 + }; + itemTracked.nbTimeMatched = 1; // Assign an unique id to each Item tracked + + itemTracked.id = uuidv4(); // Use an simple id for the display and debugging + + itemTracked.idDisplay = idDisplay; + idDisplay++; // Give me a new location / size + + itemTracked.update = function (properties, frameNb) { + // if it was zombie and disappear frame was set, reset it to null + if (this.disappearFrame) { + this.disappearFrame = null; + this.disappearArea = {}; + } + + this.isZombie = false; + this.nbTimeMatched += 1; + this.x = properties.x; + this.y = properties.y; + this.w = properties.w; + this.h = properties.h; + this.confidence = properties.confidence; + this.itemHistory.push({ + x: this.x, + y: this.y, + w: this.w, + h: this.h, + confidence: this.confidence + }); + this.name = properties.name; + + if (this.nameCount[properties.name]) { + this.nameCount[properties.name]++; + } else { + this.nameCount[properties.name] = 1; + } // Reset dying counter + + + this.frameUnmatchedLeftBeforeDying = DEFAULT_UNMATCHEDFRAMES_TOLERANCE; // Compute new velocityVector based on last positions history + + this.velocity = this.updateVelocityVector(); + }; + + itemTracked.makeAvailable = function () { + this.available = true; + return this; + }; + + itemTracked.makeUnavailable = function () { + this.available = false; + return this; + }; + + itemTracked.countDown = function (frameNb) { + // Set frame disappear number + if (this.disappearFrame === null) { + this.disappearFrame = frameNb; + this.disappearArea = { + x: this.x, + y: this.y, + w: this.w, + h: this.h + }; + } + + this.frameUnmatchedLeftBeforeDying--; + this.isZombie = true; // If it was matched less than 1 time, it should die quick + + if (this.fastDelete && this.nbTimeMatched <= 1) { + this.frameUnmatchedLeftBeforeDying = -1; + } + }; + + itemTracked.updateTheoricalPositionAndSize = function () { + this.itemHistory.push({ + x: this.x, + y: this.y, + w: this.w, + h: this.h, + confidence: this.confidence + }); + this.x = this.x + this.velocity.dx; + this.y = this.y + this.velocity.dy; + }; + + itemTracked.predictNextPosition = function () { + return { + x: this.x + this.velocity.dx, + y: this.y + this.velocity.dy, + w: this.w, + h: this.h + }; + }; + + itemTracked.isDead = function () { + return this.frameUnmatchedLeftBeforeDying < 0; + }; // Velocity vector based on the last 15 frames + + + itemTracked.updateVelocityVector = function () { + var AVERAGE_NBFRAME = 15; + + if (this.itemHistory.length <= AVERAGE_NBFRAME) { + return computeVelocityVector(this.itemHistory[0], this.itemHistory[this.itemHistory.length - 1], this.itemHistory.length); + } else { + return computeVelocityVector(this.itemHistory[this.itemHistory.length - AVERAGE_NBFRAME], this.itemHistory[this.itemHistory.length - 1], AVERAGE_NBFRAME); + } + }; + + itemTracked.getMostlyMatchedName = function () { + var _this = this; + + var nameMostlyMatchedOccurences = 0; + var nameMostlyMatched = ''; + Object.keys(this.nameCount).map(function (name) { + if (_this.nameCount[name] > nameMostlyMatchedOccurences) { + nameMostlyMatched = name; + nameMostlyMatchedOccurences = _this.nameCount[name]; + } + }); + return nameMostlyMatched; + }; + + itemTracked.toJSONDebug = function () { + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return { + id: this.id, + idDisplay: this.idDisplay, + x: roundInt ? parseInt(this.x, 10) : this.x, + y: roundInt ? parseInt(this.y, 10) : this.y, + w: roundInt ? parseInt(this.w, 10) : this.w, + h: roundInt ? parseInt(this.h, 10) : this.h, + confidence: Math.round(this.confidence * 100) / 100, + // Here we negate dy to be in "normal" carthesian coordinates + bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy)), + name: this.getMostlyMatchedName(), + isZombie: this.isZombie, + appearFrame: this.appearFrame, + disappearFrame: this.disappearFrame + }; + }; + + itemTracked.toJSON = function () { + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return { + id: this.idDisplay, + x: roundInt ? parseInt(this.x, 10) : this.x, + y: roundInt ? parseInt(this.y, 10) : this.y, + w: roundInt ? parseInt(this.w, 10) : this.w, + h: roundInt ? parseInt(this.h, 10) : this.h, + confidence: Math.round(this.confidence * 100) / 100, + // Here we negate dy to be in "normal" carthesian coordinates + bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy), 10), + name: this.getMostlyMatchedName(), + isZombie: this.isZombie + }; + }; + + itemTracked.toMOT = function (frameIndex) { + return "".concat(frameIndex, ",").concat(this.idDisplay, ",").concat(this.x - this.w / 2, ",").concat(this.y - this.h / 2, ",").concat(this.w, ",").concat(this.h, ",").concat(this.confidence / 100, ",-1,-1,-1"); + }; + + itemTracked.toJSONGenericInfo = function () { + return { + id: this.id, + idDisplay: this.idDisplay, + appearFrame: this.appearFrame, + disappearFrame: this.disappearFrame, + disappearArea: this.disappearArea, + nbActiveFrame: this.disappearFrame - this.appearFrame, + name: this.getMostlyMatchedName() + }; + }; + + return itemTracked; +}; + +ItemTracked$1.reset = function () { + idDisplay = 0; +}; + +var kdTreeMin = {}; + +/** + * k-d Tree JavaScript - V 1.01 + * + * https://github.com/ubilabs/kd-tree-javascript + * + * @author Mircea Pricop , 2012 + * @author Martin Kleppe , 2012 + * @author Ubilabs http://ubilabs.net, 2012 + * @license MIT License + */ + +(function (exports) { + (function (e, t) { + { + t(exports); + } + })(commonjsGlobal, function (e) { + function t(e, t, n) { + this.obj = e; + this.left = null; + this.right = null; + this.parent = n; + this.dimension = t; + } + + function n(e, n, i) { + function o(e, n, r) { + var s = n % i.length, + u, + a; + + if (e.length === 0) { + return null; + } + + if (e.length === 1) { + return new t(e[0], s, r); + } + + e.sort(function (e, t) { + return e[i[s]] - t[i[s]]; + }); + u = Math.floor(e.length / 2); + a = new t(e[u], s, r); + a.left = o(e.slice(0, u), n + 1, a); + a.right = o(e.slice(u + 1), n + 1, a); + return a; + } + + function u(e) { + function t(e) { + if (e.left) { + e.left.parent = e; + t(e.left); + } + + if (e.right) { + e.right.parent = e; + t(e.right); + } + } + + s.root = e; + t(s.root); + } + + var s = this; + if (!Array.isArray(e)) u(e);else this.root = o(e, 0, null); + + this.toJSON = function (e) { + if (!e) e = this.root; + var n = new t(e.obj, e.dimension, null); + if (e.left) n.left = s.toJSON(e.left); + if (e.right) n.right = s.toJSON(e.right); + return n; + }; + + this.insert = function (e) { + function n(t, r) { + if (t === null) { + return r; + } + + var s = i[t.dimension]; + + if (e[s] < t.obj[s]) { + return n(t.left, t); + } else { + return n(t.right, t); + } + } + + var r = n(this.root, null), + s, + o; + + if (r === null) { + this.root = new t(e, 0, null); + return; + } + + s = new t(e, (r.dimension + 1) % i.length, r); + o = i[r.dimension]; + + if (e[o] < r.obj[o]) { + r.left = s; + } else { + r.right = s; + } + }; + + this.remove = function (e) { + function n(t) { + if (t === null) { + return null; + } + + if (t.obj === e) { + return t; + } + + var r = i[t.dimension]; + + if (e[r] < t.obj[r]) { + return n(t.left); + } else { + return n(t.right); + } + } + + function r(e) { + function u(e, t) { + var n, r, s, o, a; + + if (e === null) { + return null; + } + + n = i[t]; + + if (e.dimension === t) { + if (e.right !== null) { + return u(e.right, t); + } + + return e; + } + + r = e.obj[n]; + s = u(e.left, t); + o = u(e.right, t); + a = e; + + if (s !== null && s.obj[n] > r) { + a = s; + } + + if (o !== null && o.obj[n] > a.obj[n]) { + a = o; + } + + return a; + } + + function a(e, t) { + var n, r, s, o, u; + + if (e === null) { + return null; + } + + n = i[t]; + + if (e.dimension === t) { + if (e.left !== null) { + return a(e.left, t); + } + + return e; + } + + r = e.obj[n]; + s = a(e.left, t); + o = a(e.right, t); + u = e; + + if (s !== null && s.obj[n] < r) { + u = s; + } + + if (o !== null && o.obj[n] < u.obj[n]) { + u = o; + } + + return u; + } + + var t, n, o; + + if (e.left === null && e.right === null) { + if (e.parent === null) { + s.root = null; + return; + } + + o = i[e.parent.dimension]; + + if (e.obj[o] < e.parent.obj[o]) { + e.parent.left = null; + } else { + e.parent.right = null; + } + + return; + } + + if (e.left !== null) { + t = u(e.left, e.dimension); + } else { + t = a(e.right, e.dimension); + } + + n = t.obj; + r(t); + e.obj = n; + } + + var t; + t = n(s.root); + + if (t === null) { + return; + } + + r(t); + }; + + this.nearest = function (e, t, o) { + function l(r) { + function d(e, n) { + f.push([e, n]); + + if (f.size() > t) { + f.pop(); + } + } + + var s, + o = i[r.dimension], + u = n(e, r.obj), + a = {}, + c, + h, + p; + + for (p = 0; p < i.length; p += 1) { + if (p === r.dimension) { + a[i[p]] = e[i[p]]; + } else { + a[i[p]] = r.obj[i[p]]; + } + } + + c = n(a, r.obj); + + if (r.right === null && r.left === null) { + if (f.size() < t || u < f.peek()[1]) { + d(r, u); + } + + return; + } + + if (r.right === null) { + s = r.left; + } else if (r.left === null) { + s = r.right; + } else { + if (e[o] < r.obj[o]) { + s = r.left; + } else { + s = r.right; + } + } + + l(s); + + if (f.size() < t || u < f.peek()[1]) { + d(r, u); + } + + if (f.size() < t || Math.abs(c) < f.peek()[1]) { + if (s === r.left) { + h = r.right; + } else { + h = r.left; + } + + if (h !== null) { + l(h); + } + } + } + + var u, a, f; + f = new r(function (e) { + return -e[1]; + }); + + if (o) { + for (u = 0; u < t; u += 1) { + f.push([null, o]); + } + } + + l(s.root); + a = []; + + for (u = 0; u < t; u += 1) { + if (f.content[u][0]) { + a.push([f.content[u][0].obj, f.content[u][1]]); + } + } + + return a; + }; + + this.balanceFactor = function () { + function e(t) { + if (t === null) { + return 0; + } + + return Math.max(e(t.left), e(t.right)) + 1; + } + + function t(e) { + if (e === null) { + return 0; + } + + return t(e.left) + t(e.right) + 1; + } + + return e(s.root) / (Math.log(t(s.root)) / Math.log(2)); + }; + } + + function r(e) { + this.content = []; + this.scoreFunction = e; + } + + r.prototype = { + push: function push(e) { + this.content.push(e); + this.bubbleUp(this.content.length - 1); + }, + pop: function pop() { + var e = this.content[0]; + var t = this.content.pop(); + + if (this.content.length > 0) { + this.content[0] = t; + this.sinkDown(0); + } + + return e; + }, + peek: function peek() { + return this.content[0]; + }, + remove: function remove(e) { + var t = this.content.length; + + for (var n = 0; n < t; n++) { + if (this.content[n] == e) { + var r = this.content.pop(); + + if (n != t - 1) { + this.content[n] = r; + if (this.scoreFunction(r) < this.scoreFunction(e)) this.bubbleUp(n);else this.sinkDown(n); + } + + return; + } + } + + throw new Error("Node not found."); + }, + size: function size() { + return this.content.length; + }, + bubbleUp: function bubbleUp(e) { + var t = this.content[e]; + + while (e > 0) { + var n = Math.floor((e + 1) / 2) - 1, + r = this.content[n]; + + if (this.scoreFunction(t) < this.scoreFunction(r)) { + this.content[n] = t; + this.content[e] = r; + e = n; + } else { + break; + } + } + }, + sinkDown: function sinkDown(e) { + var t = this.content.length, + n = this.content[e], + r = this.scoreFunction(n); + + while (true) { + var i = (e + 1) * 2, + s = i - 1; + var o = null; + + if (s < t) { + var u = this.content[s], + a = this.scoreFunction(u); + if (a < r) o = s; + } + + if (i < t) { + var f = this.content[i], + l = this.scoreFunction(f); + + if (l < (o == null ? r : a)) { + o = i; + } + } + + if (o != null) { + this.content[e] = this.content[o]; + this.content[o] = n; + e = o; + } else { + break; + } + } + } + }; + this.kdTree = n; + e.kdTree = n; + e.BinaryHeap = r; + }); +})(kdTreeMin); + +var lodash_isequal = {exports: {}}; + +/** + * Lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright JS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +(function (module, exports) { + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + /** Used to stand-in for `undefined` hash values. */ + + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + /** Used to compose bitmasks for value comparisons. */ + + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + /** Used as references for various `Number` constants. */ + + var MAX_SAFE_INTEGER = 9007199254740991; + /** `Object#toString` result references. */ + + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]'; + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + /** Used to detect host constructors (Safari). */ + + var reIsHostCtor = /^\[object .+?Constructor\]$/; + /** Used to detect unsigned integer values. */ + + var reIsUint = /^(?:0|[1-9]\d*)$/; + /** Used to identify `toStringTag` values of typed arrays. */ + + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + /** Detect free variable `global` from Node.js. */ + + var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + /** Detect free variable `self`. */ + + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + /** Used as a reference to the global object. */ + + var root = freeGlobal || freeSelf || Function('return this')(); + /** Detect free variable `exports`. */ + + var freeExports = exports && !exports.nodeType && exports; + /** Detect free variable `module`. */ + + var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; + /** Detect the popular CommonJS extension `module.exports`. */ + + var moduleExports = freeModule && freeModule.exports === freeExports; + /** Detect free variable `process` from Node.js. */ + + var freeProcess = moduleExports && freeGlobal.process; + /** Used to access faster Node.js helpers. */ + + var nodeUtil = function () { + try { + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + }(); + /* Node.js helper references. */ + + + var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + + return result; + } + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + + + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + + return array; + } + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + + + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + + return false; + } + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + + + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + + return result; + } + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + + + function baseUnary(func) { + return function (value) { + return func(value); + }; + } + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function cacheHas(cache, key) { + return cache.has(key); + } + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + + + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + + + function mapToArray(map) { + var index = -1, + result = Array(map.size); + map.forEach(function (value, key) { + result[++index] = [key, value]; + }); + return result; + } + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + + + function overArg(func, transform) { + return function (arg) { + return func(transform(arg)); + }; + } + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + + + function setToArray(set) { + var index = -1, + result = Array(set.size); + set.forEach(function (value) { + result[++index] = value; + }); + return result; + } + /** Used for built-in method references. */ + + + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + /** Used to detect overreaching core-js shims. */ + + var coreJsData = root['__core-js_shared__']; + /** Used to resolve the decompiled source of functions. */ + + var funcToString = funcProto.toString; + /** Used to check objects for own properties. */ + + var hasOwnProperty = objectProto.hasOwnProperty; + /** Used to detect methods masquerading as native. */ + + var maskSrcKey = function () { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? 'Symbol(src)_1.' + uid : ''; + }(); + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + + + var nativeObjectToString = objectProto.toString; + /** Used to detect if a method is native. */ + + var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); + /** Built-in value references. */ + + var Buffer = moduleExports ? root.Buffer : undefined, + Symbol = root.Symbol, + Uint8Array = root.Uint8Array, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + /* Built-in method references for those with the same name as other `lodash` methods. */ + + var nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeKeys = overArg(Object.keys, Object); + /* Built-in method references that are verified to be native. */ + + var DataView = getNative(root, 'DataView'), + Map = getNative(root, 'Map'), + Promise = getNative(root, 'Promise'), + Set = getNative(root, 'Set'), + WeakMap = getNative(root, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + /** Used to detect maps, sets, and weakmaps. */ + + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + /** Used to convert symbols to primitives and strings. */ + + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + this.clear(); + + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + + + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function hashGet(key) { + var data = this.__data__; + + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); + } + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + + + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value; + return this; + } // Add methods to `Hash`. + + + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + this.clear(); + + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + + + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + + var lastIndex = data.length - 1; + + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + + --this.size; + return true; + } + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + return index < 0 ? undefined : data[index][1]; + } + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + + + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + + return this; + } // Add methods to `ListCache`. + + + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + this.clear(); + + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + + + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash(), + 'map': new (Map || ListCache)(), + 'string': new Hash() + }; + } + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + + + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } // Add methods to `MapCache`. + + + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + this.__data__ = new MapCache(); + + while (++index < length) { + this.add(values[index]); + } + } + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + + + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + + return this; + } + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + + + function setCacheHas(value) { + return this.__data__.has(value); + } // Add methods to `SetCache`. + + + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + + + function stackClear() { + this.__data__ = new ListCache(); + this.size = 0; + } + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + this.size = data.size; + return result; + } + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function stackGet(key) { + return this.__data__.get(key); + } + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function stackHas(key) { + return this.__data__.has(key); + } + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + + + function stackSet(key, value) { + var data = this.__data__; + + if (data instanceof ListCache) { + var pairs = data.__data__; + + if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + + data = this.__data__ = new MapCache(pairs); + } + + data.set(key, value); + this.size = data.size; + return this; + } // Add methods to `Stack`. + + + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. + isBuff && (key == 'offset' || key == 'parent') || // PhantomJS 2 has enumerable non-index properties on typed arrays. + isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || // Skip index properties. + isIndex(key, length)))) { + result.push(key); + } + } + + return result; + } + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + + + function assocIndexOf(array, key) { + var length = array.length; + + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + + return -1; + } + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + + + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + + + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + + return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); + } + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + + + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + + + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + + if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) { + return value !== value && other !== other; + } + + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + + + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + + objIsArr = true; + objIsObj = false; + } + + if (isSameTag && !objIsObj) { + stack || (stack = new Stack()); + return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + stack || (stack = new Stack()); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + + if (!isSameTag) { + return false; + } + + stack || (stack = new Stack()); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + + + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + + + function baseIsTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + + + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + + var result = []; + + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + + return result; + } + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + + + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } // Assume cyclic values are equal. + + + var stacked = stack.get(array); + + if (stacked && stack.get(other)) { + return stacked == other; + } + + var index = -1, + result = true, + seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined; + stack.set(array, other); + stack.set(other, array); // Ignore non-index properties. + + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); + } + + if (compared !== undefined) { + if (compared) { + continue; + } + + result = false; + break; + } // Recursively compare arrays (susceptible to call stack limits). + + + if (seen) { + if (!arraySome(other, function (othValue, othIndex) { + if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + result = false; + break; + } + } + + stack['delete'](array); + stack['delete'](other); + return result; + } + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + + + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { + return false; + } + + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == other + ''; + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } // Assume cyclic values are equal. + + + var stacked = stack.get(object); + + if (stacked) { + return stacked == other; + } + + bitmask |= COMPARE_UNORDERED_FLAG; // Recursively compare objects (susceptible to call stack limits). + + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + + } + + return false; + } + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + + + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + + var index = objLength; + + while (index--) { + var key = objProps[index]; + + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } // Assume cyclic values are equal. + + + var stacked = stack.get(object); + + if (stacked && stack.get(other)) { + return stacked == other; + } + + var result = true; + stack.set(object, other); + stack.set(other, object); + var skipCtor = isPartial; + + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); + } // Recursively compare objects (susceptible to call stack limits). + + + if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { + result = false; + break; + } + + skipCtor || (skipCtor = key == 'constructor'); + } + + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. + + if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + + stack['delete'](object); + stack['delete'](other); + return result; + } + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + + + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + + + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; + } + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + + + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + + + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + + return result; + } + /** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + + + var getSymbols = !nativeGetSymbols ? stubArray : function (object) { + if (object == null) { + return []; + } + + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function (symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + + var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + + if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) { + getTag = function (value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag; + + case mapCtorString: + return mapTag; + + case promiseCtorString: + return promiseTag; + + case setCtorString: + return setTag; + + case weakMapCtorString: + return weakMapTag; + } + } + + return result; + }; + } + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + + + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length; + } + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + + + function isKeyable(value) { + var type = typeof value; + return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null; + } + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + + + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + + + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = typeof Ctor == 'function' && Ctor.prototype || objectProto; + return value === proto; + } + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + + + function objectToString(value) { + return nativeObjectToString.call(value); + } + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + + + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + + try { + return func + ''; + } catch (e) {} + } + + return ''; + } + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + + + function eq(value, other) { + return value === other || value !== value && other !== other; + } + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + + + var isArguments = baseIsArguments(function () { + return arguments; + }()) ? baseIsArguments : function (value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); + }; + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + + var isArray = Array.isArray; + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + + + var isBuffer = nativeIsBuffer || stubFalse; + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + + function isEqual(value, other) { + return baseIsEqual(value, other); + } + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + + + function isFunction(value) { + if (!isObject(value)) { + return false; + } // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + + + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + + + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + + + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + + + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + + + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + /** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ + + + function stubArray() { + return []; + } + /** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ + + + function stubFalse() { + return false; + } + + module.exports = isEqual; +})(lodash_isequal, lodash_isequal.exports); + +var munkres$1 = {exports: {}}; + +/** + * Introduction + * ============ + * + * The Munkres module provides an implementation of the Munkres algorithm + * (also called the Hungarian algorithm or the Kuhn-Munkres algorithm), + * useful for solving the Assignment Problem. + * + * Assignment Problem + * ================== + * + * Let C be an n×n-matrix representing the costs of each of n workers + * to perform any of n jobs. The assignment problem is to assign jobs to + * workers in a way that minimizes the total cost. Since each worker can perform + * only one job and each job can be assigned to only one worker the assignments + * represent an independent set of the matrix C. + * + * One way to generate the optimal set is to create all permutations of + * the indices necessary to traverse the matrix so that no row and column + * are used more than once. For instance, given this matrix (expressed in + * Python) + * + * matrix = [[5, 9, 1], + * [10, 3, 2], + * [8, 7, 4]] + * + * You could use this code to generate the traversal indices:: + * + * def permute(a, results): + * if len(a) == 1: + * results.insert(len(results), a) + * + * else: + * for i in range(0, len(a)): + * element = a[i] + * a_copy = [a[j] for j in range(0, len(a)) if j != i] + * subresults = [] + * permute(a_copy, subresults) + * for subresult in subresults: + * result = [element] + subresult + * results.insert(len(results), result) + * + * results = [] + * permute(range(len(matrix)), results) # [0, 1, 2] for a 3x3 matrix + * + * After the call to permute(), the results matrix would look like this:: + * + * [[0, 1, 2], + * [0, 2, 1], + * [1, 0, 2], + * [1, 2, 0], + * [2, 0, 1], + * [2, 1, 0]] + * + * You could then use that index matrix to loop over the original cost matrix + * and calculate the smallest cost of the combinations + * + * n = len(matrix) + * minval = sys.maxsize + * for row in range(n): + * cost = 0 + * for col in range(n): + * cost += matrix[row][col] + * minval = min(cost, minval) + * + * print minval + * + * While this approach works fine for small matrices, it does not scale. It + * executes in O(n!) time: Calculating the permutations for an n×x-matrix + * requires n! operations. For a 12×12 matrix, that’s 479,001,600 + * traversals. Even if you could manage to perform each traversal in just one + * millisecond, it would still take more than 133 hours to perform the entire + * traversal. A 20×20 matrix would take 2,432,902,008,176,640,000 operations. At + * an optimistic millisecond per operation, that’s more than 77 million years. + * + * The Munkres algorithm runs in O(n³) time, rather than O(n!). This + * package provides an implementation of that algorithm. + * + * This version is based on + * http://csclab.murraystate.edu/~bob.pilgrim/445/munkres.html + * + * This version was originally written for Python by Brian Clapper from the + * algorithm at the above web site (The ``Algorithm::Munkres`` Perl version, + * in CPAN, was clearly adapted from the same web site.) and ported to + * JavaScript by Anna Henningsen (addaleax). + * + * Usage + * ===== + * + * Construct a Munkres object + * + * var m = new Munkres(); + * + * Then use it to compute the lowest cost assignment from a cost matrix. Here’s + * a sample program + * + * var matrix = [[5, 9, 1], + * [10, 3, 2], + * [8, 7, 4]]; + * var m = new Munkres(); + * var indices = m.compute(matrix); + * console.log(format_matrix(matrix), 'Lowest cost through this matrix:'); + * var total = 0; + * for (var i = 0; i < indices.length; ++i) { + * var row = indices[l][0], col = indices[l][1]; + * var value = matrix[row][col]; + * total += value; + * + * console.log('(' + rol + ', ' + col + ') -> ' + value); + * } + * + * console.log('total cost:', total); + * + * Running that program produces:: + * + * Lowest cost through this matrix: + * [5, 9, 1] + * [10, 3, 2] + * [8, 7, 4] + * (0, 0) -> 5 + * (1, 1) -> 3 + * (2, 2) -> 4 + * total cost: 12 + * + * The instantiated Munkres object can be used multiple times on different + * matrices. + * + * Non-square Cost Matrices + * ======================== + * + * The Munkres algorithm assumes that the cost matrix is square. However, it's + * possible to use a rectangular matrix if you first pad it with 0 values to make + * it square. This module automatically pads rectangular cost matrices to make + * them square. + * + * Notes: + * + * - The module operates on a *copy* of the caller's matrix, so any padding will + * not be seen by the caller. + * - The cost matrix must be rectangular or square. An irregular matrix will + * *not* work. + * + * Calculating Profit, Rather than Cost + * ==================================== + * + * The cost matrix is just that: A cost matrix. The Munkres algorithm finds + * the combination of elements (one from each row and column) that results in + * the smallest cost. It’s also possible to use the algorithm to maximize + * profit. To do that, however, you have to convert your profit matrix to a + * cost matrix. The simplest way to do that is to subtract all elements from a + * large value. + * + * The ``munkres`` module provides a convenience method for creating a cost + * matrix from a profit matrix, i.e. make_cost_matrix. + * + * References + * ========== + * + * 1. http://www.public.iastate.edu/~ddoty/HungarianAlgorithm.html + * + * 2. Harold W. Kuhn. The Hungarian Method for the assignment problem. + * *Naval Research Logistics Quarterly*, 2:83-97, 1955. + * + * 3. Harold W. Kuhn. Variants of the Hungarian method for assignment + * problems. *Naval Research Logistics Quarterly*, 3: 253-258, 1956. + * + * 4. Munkres, J. Algorithms for the Assignment and Transportation Problems. + * *Journal of the Society of Industrial and Applied Mathematics*, + * 5(1):32-38, March, 1957. + * + * 5. https://en.wikipedia.org/wiki/Hungarian_algorithm + * + * Copyright and License + * ===================== + * + * Copyright 2008-2016 Brian M. Clapper + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function (module) { + /** + * A very large numerical value which can be used like an integer + * (i. e., adding integers of similar size does not result in overflow). + */ + var MAX_SIZE = parseInt(Number.MAX_SAFE_INTEGER / 2) || (1 << 26) * (1 << 26); + /** + * A default value to pad the cost matrix with if it is not quadratic. + */ + + var DEFAULT_PAD_VALUE = 0; // --------------------------------------------------------------------------- + // Classes + // --------------------------------------------------------------------------- + + /** + * Calculate the Munkres solution to the classical assignment problem. + * See the module documentation for usage. + * @constructor + */ + + function Munkres() { + this.C = null; + this.row_covered = []; + this.col_covered = []; + this.n = 0; + this.Z0_r = 0; + this.Z0_c = 0; + this.marked = null; + this.path = null; + } + /** + * Pad a possibly non-square matrix to make it square. + * + * @param {Array} matrix An array of arrays containing the matrix cells + * @param {Number} [pad_value] The value used to pad a rectangular matrix + * + * @return {Array} An array of arrays representing the padded matrix + */ + + + Munkres.prototype.pad_matrix = function (matrix, pad_value) { + pad_value = pad_value || DEFAULT_PAD_VALUE; + var max_columns = 0; + var total_rows = matrix.length; + var i; + + for (i = 0; i < total_rows; ++i) if (matrix[i].length > max_columns) max_columns = matrix[i].length; + + total_rows = max_columns > total_rows ? max_columns : total_rows; + var new_matrix = []; + + for (i = 0; i < total_rows; ++i) { + var row = matrix[i] || []; + var new_row = row.slice(); // If this row is too short, pad it + + while (total_rows > new_row.length) new_row.push(pad_value); + + new_matrix.push(new_row); + } + + return new_matrix; + }; + /** + * Compute the indices for the lowest-cost pairings between rows and columns + * in the database. Returns a list of (row, column) tuples that can be used + * to traverse the matrix. + * + * **WARNING**: This code handles square and rectangular matrices. + * It does *not* handle irregular matrices. + * + * @param {Array} cost_matrix The cost matrix. If this cost matrix is not square, + * it will be padded with DEFAULT_PAD_VALUE. Optionally, + * the pad value can be specified via options.padValue. + * This method does *not* modify the caller's matrix. + * It operates on a copy of the matrix. + * @param {Object} [options] Additional options to pass in + * @param {Number} [options.padValue] The value to use to pad a rectangular cost_matrix + * + * @return {Array} An array of ``(row, column)`` arrays that describe the lowest + * cost path through the matrix + */ + + + Munkres.prototype.compute = function (cost_matrix, options) { + options = options || {}; + options.padValue = options.padValue || DEFAULT_PAD_VALUE; + this.C = this.pad_matrix(cost_matrix, options.padValue); + this.n = this.C.length; + this.original_length = cost_matrix.length; + this.original_width = cost_matrix[0].length; + var nfalseArray = []; + /* array of n false values */ + + while (nfalseArray.length < this.n) nfalseArray.push(false); + + this.row_covered = nfalseArray.slice(); + this.col_covered = nfalseArray.slice(); + this.Z0_r = 0; + this.Z0_c = 0; + this.path = this.__make_matrix(this.n * 2, 0); + this.marked = this.__make_matrix(this.n, 0); + var step = 1; + var steps = { + 1: this.__step1, + 2: this.__step2, + 3: this.__step3, + 4: this.__step4, + 5: this.__step5, + 6: this.__step6 + }; + + while (true) { + var func = steps[step]; + if (!func) // done + break; + step = func.apply(this); + } + + var results = []; + + for (var i = 0; i < this.original_length; ++i) for (var j = 0; j < this.original_width; ++j) if (this.marked[i][j] == 1) results.push([i, j]); + + return results; + }; + /** + * Create an n×n matrix, populating it with the specific value. + * + * @param {Number} n Matrix dimensions + * @param {Number} val Value to populate the matrix with + * + * @return {Array} An array of arrays representing the newly created matrix + */ + + + Munkres.prototype.__make_matrix = function (n, val) { + var matrix = []; + + for (var i = 0; i < n; ++i) { + matrix[i] = []; + + for (var j = 0; j < n; ++j) matrix[i][j] = val; + } + + return matrix; + }; + /** + * For each row of the matrix, find the smallest element and + * subtract it from every element in its row. Go to Step 2. + */ + + + Munkres.prototype.__step1 = function () { + for (var i = 0; i < this.n; ++i) { + // Find the minimum value for this row and subtract that minimum + // from every element in the row. + var minval = Math.min.apply(Math, this.C[i]); + + for (var j = 0; j < this.n; ++j) this.C[i][j] -= minval; + } + + return 2; + }; + /** + * Find a zero (Z) in the resulting matrix. If there is no starred + * zero in its row or column, star Z. Repeat for each element in the + * matrix. Go to Step 3. + */ + + + Munkres.prototype.__step2 = function () { + for (var i = 0; i < this.n; ++i) { + for (var j = 0; j < this.n; ++j) { + if (this.C[i][j] === 0 && !this.col_covered[j] && !this.row_covered[i]) { + this.marked[i][j] = 1; + this.col_covered[j] = true; + this.row_covered[i] = true; + break; + } + } + } + + this.__clear_covers(); + + return 3; + }; + /** + * Cover each column containing a starred zero. If K columns are + * covered, the starred zeros describe a complete set of unique + * assignments. In this case, Go to DONE, otherwise, Go to Step 4. + */ + + + Munkres.prototype.__step3 = function () { + var count = 0; + + for (var i = 0; i < this.n; ++i) { + for (var j = 0; j < this.n; ++j) { + if (this.marked[i][j] == 1 && this.col_covered[j] == false) { + this.col_covered[j] = true; + ++count; + } + } + } + + return count >= this.n ? 7 : 4; + }; + /** + * Find a noncovered zero and prime it. If there is no starred zero + * in the row containing this primed zero, Go to Step 5. Otherwise, + * cover this row and uncover the column containing the starred + * zero. Continue in this manner until there are no uncovered zeros + * left. Save the smallest uncovered value and Go to Step 6. + */ + + + Munkres.prototype.__step4 = function () { + var done = false; + var row = -1, + col = -1, + star_col = -1; + + while (!done) { + var z = this.__find_a_zero(); + + row = z[0]; + col = z[1]; + if (row < 0) return 6; + this.marked[row][col] = 2; + star_col = this.__find_star_in_row(row); + + if (star_col >= 0) { + col = star_col; + this.row_covered[row] = true; + this.col_covered[col] = false; + } else { + this.Z0_r = row; + this.Z0_c = col; + return 5; + } + } + }; + /** + * Construct a series of alternating primed and starred zeros as + * follows. Let Z0 represent the uncovered primed zero found in Step 4. + * Let Z1 denote the starred zero in the column of Z0 (if any). + * Let Z2 denote the primed zero in the row of Z1 (there will always + * be one). Continue until the series terminates at a primed zero + * that has no starred zero in its column. Unstar each starred zero + * of the series, star each primed zero of the series, erase all + * primes and uncover every line in the matrix. Return to Step 3 + */ + + + Munkres.prototype.__step5 = function () { + var count = 0; + this.path[count][0] = this.Z0_r; + this.path[count][1] = this.Z0_c; + var done = false; + + while (!done) { + var row = this.__find_star_in_col(this.path[count][1]); + + if (row >= 0) { + count++; + this.path[count][0] = row; + this.path[count][1] = this.path[count - 1][1]; + } else { + done = true; + } + + if (!done) { + var col = this.__find_prime_in_row(this.path[count][0]); + + count++; + this.path[count][0] = this.path[count - 1][0]; + this.path[count][1] = col; + } + } + + this.__convert_path(this.path, count); + + this.__clear_covers(); + + this.__erase_primes(); + + return 3; + }; + /** + * Add the value found in Step 4 to every element of each covered + * row, and subtract it from every element of each uncovered column. + * Return to Step 4 without altering any stars, primes, or covered + * lines. + */ + + + Munkres.prototype.__step6 = function () { + var minval = this.__find_smallest(); + + for (var i = 0; i < this.n; ++i) { + for (var j = 0; j < this.n; ++j) { + if (this.row_covered[i]) this.C[i][j] += minval; + if (!this.col_covered[j]) this.C[i][j] -= minval; + } + } + + return 4; + }; + /** + * Find the smallest uncovered value in the matrix. + * + * @return {Number} The smallest uncovered value, or MAX_SIZE if no value was found + */ + + + Munkres.prototype.__find_smallest = function () { + var minval = MAX_SIZE; + + for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (!this.row_covered[i] && !this.col_covered[j]) if (minval > this.C[i][j]) minval = this.C[i][j]; + + return minval; + }; + /** + * Find the first uncovered element with value 0. + * + * @return {Array} The indices of the found element or [-1, -1] if not found + */ + + + Munkres.prototype.__find_a_zero = function () { + for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.C[i][j] === 0 && !this.row_covered[i] && !this.col_covered[j]) return [i, j]; + + return [-1, -1]; + }; + /** + * Find the first starred element in the specified row. Returns + * the column index, or -1 if no starred element was found. + * + * @param {Number} row The index of the row to search + * @return {Number} + */ + + + Munkres.prototype.__find_star_in_row = function (row) { + for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 1) return j; + + return -1; + }; + /** + * Find the first starred element in the specified column. + * + * @return {Number} The row index, or -1 if no starred element was found + */ + + + Munkres.prototype.__find_star_in_col = function (col) { + for (var i = 0; i < this.n; ++i) if (this.marked[i][col] == 1) return i; + + return -1; + }; + /** + * Find the first prime element in the specified row. + * + * @return {Number} The column index, or -1 if no prime element was found + */ + + + Munkres.prototype.__find_prime_in_row = function (row) { + for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 2) return j; + + return -1; + }; + + Munkres.prototype.__convert_path = function (path, count) { + for (var i = 0; i <= count; ++i) this.marked[path[i][0]][path[i][1]] = this.marked[path[i][0]][path[i][1]] == 1 ? 0 : 1; + }; + /** Clear all covered matrix cells */ + + + Munkres.prototype.__clear_covers = function () { + for (var i = 0; i < this.n; ++i) { + this.row_covered[i] = false; + this.col_covered[i] = false; + } + }; + /** Erase all prime markings */ + + + Munkres.prototype.__erase_primes = function () { + for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.marked[i][j] == 2) this.marked[i][j] = 0; + }; // --------------------------------------------------------------------------- + // Functions + // --------------------------------------------------------------------------- + + /** + * Create a cost matrix from a profit matrix by calling + * 'inversion_function' to invert each value. The inversion + * function must take one numeric argument (of any type) and return + * another numeric argument which is presumed to be the cost inverse + * of the original profit. + * + * This is a static method. Call it like this: + * + * cost_matrix = make_cost_matrix(matrix[, inversion_func]); + * + * For example: + * + * cost_matrix = make_cost_matrix(matrix, function(x) { return MAXIMUM - x; }); + * + * @param {Array} profit_matrix An array of arrays representing the matrix + * to convert from a profit to a cost matrix + * @param {Function} [inversion_function] The function to use to invert each + * entry in the profit matrix + * + * @return {Array} The converted matrix + */ + + + function make_cost_matrix(profit_matrix, inversion_function) { + var i, j; + + if (!inversion_function) { + var maximum = -1.0 / 0.0; + + for (i = 0; i < profit_matrix.length; ++i) for (j = 0; j < profit_matrix[i].length; ++j) if (profit_matrix[i][j] > maximum) maximum = profit_matrix[i][j]; + + inversion_function = function (x) { + return maximum - x; + }; + } + + var cost_matrix = []; + + for (i = 0; i < profit_matrix.length; ++i) { + var row = profit_matrix[i]; + cost_matrix[i] = []; + + for (j = 0; j < row.length; ++j) cost_matrix[i][j] = inversion_function(profit_matrix[i][j]); + } + + return cost_matrix; + } + /** + * Convenience function: Converts the contents of a matrix of integers + * to a printable string. + * + * @param {Array} matrix The matrix to print + * + * @return {String} The formatted matrix + */ + + + function format_matrix(matrix) { + var columnWidths = []; + var i, j; + + for (i = 0; i < matrix.length; ++i) { + for (j = 0; j < matrix[i].length; ++j) { + var entryWidth = String(matrix[i][j]).length; + if (!columnWidths[j] || entryWidth >= columnWidths[j]) columnWidths[j] = entryWidth; + } + } + + var formatted = ''; + + for (i = 0; i < matrix.length; ++i) { + for (j = 0; j < matrix[i].length; ++j) { + var s = String(matrix[i][j]); // pad at front with spaces + + while (s.length < columnWidths[j]) s = ' ' + s; + + formatted += s; // separate columns + + if (j != matrix[i].length - 1) formatted += ' '; + } + + if (i != matrix[i].length - 1) formatted += '\n'; + } + + return formatted; + } // --------------------------------------------------------------------------- + // Exports + // --------------------------------------------------------------------------- + + + function computeMunkres(cost_matrix, options) { + var m = new Munkres(); + return m.compute(cost_matrix, options); + } + + computeMunkres.version = "1.2.2"; + computeMunkres.format_matrix = format_matrix; + computeMunkres.make_cost_matrix = make_cost_matrix; + computeMunkres.Munkres = Munkres; // backwards compatibility + + if (module.exports) { + module.exports = computeMunkres; + } +})(munkres$1); + +var itemTrackedModule = ItemTracked$1; +var ItemTracked = itemTrackedModule.ItemTracked; +var kdTree = kdTreeMin.kdTree; +var iouAreas = utils.iouAreas; +var munkres = munkres$1.exports; + +var iouDistance = function iouDistance(item1, item2) { + // IOU distance, between 0 and 1 + // The smaller the less overlap + var iou = iouAreas(item1, item2); // Invert this as the KDTREESEARCH is looking for the smaller value + + var distance = 1 - iou; // If the overlap is iou < 0.95, exclude value + + if (distance > 1 - params.iouLimit) { + distance = params.distanceLimit + 1; + } + + return distance; +}; + +var params = { + // DEFAULT_UNMATCHEDFRAMES_TOLERANCE + // This the number of frame we wait when an object isn't matched before considering it gone + unMatchedFramesTolerance: 5, + // DEFAULT_IOU_LIMIT, exclude things from beeing matched if their IOU is lower than this + // 1 means total overlap whereas 0 means no overlap + iouLimit: 0.05, + // Remove new objects fast if they could not be matched in the next frames. + // Setting this to false ensures the object will stick around at least + // unMatchedFramesTolerance frames, even if they could neven be matched in + // subsequent frames. + fastDelete: true, + // The function to use to determine the distance between to detected objects + distanceFunc: iouDistance, + // The distance limit for matching. If values need to be excluded from + // matching set their distance to something greater than the distance limit + distanceLimit: 10000, + // The algorithm used to match tracks with new detections. Can be either + // 'kdTree' or 'munkres'. + matchingAlgorithm: 'munkres' // matchingAlgorithm: 'kdTree', + +}; // A dictionary of itemTracked currently tracked +// key: uuid +// value: ItemTracked object + +var mapOfItemsTracked = new Map(); // A dictionnary keeping memory of all tracked object (even after they disappear) +// Useful to ouput the file of all items tracked + +var mapOfAllItemsTracked = new Map(); // By default, we do not keep all the history in memory + +var keepAllHistoryInMemory = false; +var computeDistance = tracker.computeDistance = iouDistance; + +var updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameNb) { + // A kd-tree containing all the itemtracked + // Need to rebuild on each frame, because itemTracked positions have changed + var treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ["x", "y", "w", "h"]); // Contruct a kd tree for the detections of this frame + + var treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ["x", "y", "w", "h"]); // SCENARIO 1: itemsTracked map is empty + + if (mapOfItemsTracked.size === 0) { + // Just add every detected item as item Tracked + detectionsOfThisFrame.forEach(function (itemDetected) { + var newItemTracked = new ItemTracked(itemDetected, frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map + + mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree + + treeItemsTracked.insert(newItemTracked); + }); + } // SCENARIO 2: We already have itemsTracked in the map + else { + var matchedList = new Array(detectionsOfThisFrame.length); + matchedList.fill(false); // Match existing Tracked items with the items detected in the new frame + // For each look in the new detection to find the closest match + + if (detectionsOfThisFrame.length > 0) { + if (params.matchingAlgorithm === 'munkres') { + var trackedItemIds = Array.from(mapOfItemsTracked.keys()); + var costMatrix = Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { + var predictedPosition = itemTracked.predictNextPosition(); + return detectionsOfThisFrame.map(function (detection) { + return params.distanceFunc(predictedPosition, detection); + }); + }); + mapOfItemsTracked.forEach(function (itemTracked) { + itemTracked.makeAvailable(); + }); + munkres(costMatrix).filter(function (m) { + return costMatrix[m[0]][m[1]] <= params.distanceLimit; + }).forEach(function (m) { + var itemTracked = mapOfItemsTracked.get(trackedItemIds[m[0]]); + var updatedTrackedItemProperties = detectionsOfThisFrame[m[1]]; + matchedList[m[1]] = { + idDisplay: itemTracked.idDisplay + }; + itemTracked.makeUnavailable().update(updatedTrackedItemProperties, frameNb); + }); + matchedList.forEach(function (matched, index) { + if (!matched) { + if (Math.min.apply(Math, _toConsumableArray(costMatrix.map(function (m) { + return m[index]; + }))) > params.distanceLimit) { + var newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); + mapOfItemsTracked.set(newItemTracked.id, newItemTracked); + newItemTracked.makeUnavailable(); + costMatrix.push(detectionsOfThisFrame.map(function (detection) { + return params.distanceFunc(newItemTracked, detection); + })); + } + } + }); + } else if (params.matchingAlgorithm === 'kdTree') { + mapOfItemsTracked.forEach(function (itemTracked) { + // First predict the new position of the itemTracked + var predictedPosition = itemTracked.predictNextPosition(); // Make available for matching + + itemTracked.makeAvailable(); // Search for a detection that matches + + var treeSearchResult = treeDetectionsOfThisFrame.nearest(predictedPosition, 1, params.distanceLimit)[0]; // Only for debug assessments of predictions + + treeDetectionsOfThisFrame.nearest(itemTracked, 1, params.distanceLimit)[0]; // Only if we enable the extra refinement + + treeDetectionsOfThisFrame.nearest(predictedPosition, 2, params.distanceLimit); // If we have found something + + if (treeSearchResult) { + + var indexClosestNewDetectedItem = detectionsOfThisFrame.indexOf(treeSearchResult[0]); // If this detections was not already matched to a tracked item + // (otherwise it would be matched to two tracked items...) + + if (!matchedList[indexClosestNewDetectedItem]) { + matchedList[indexClosestNewDetectedItem] = { + idDisplay: itemTracked.idDisplay + }; // Update properties of tracked object + + var updatedTrackedItemProperties = detectionsOfThisFrame[indexClosestNewDetectedItem]; + mapOfItemsTracked.get(itemTracked.id).makeUnavailable().update(updatedTrackedItemProperties, frameNb); + } + } + }); + } else { + throw "Unknown matching algorithm \"".concat(params.matchingAlgorithm, "\""); + } + } else { + + + mapOfItemsTracked.forEach(function (itemTracked) { + itemTracked.makeAvailable(); + }); + } + + if (params.matchingAlgorithm === 'kdTree') { + // Add any unmatched items as new trackedItem only if those new items are not too similar + // to existing trackedItems this avoids adding some double match of YOLO and bring down drasticly reassignments + if (mapOfItemsTracked.size > 0) { + // Safety check to see if we still have object tracked (could have been deleted previously) + // Rebuild tracked item tree to take in account the new positions + treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ["x", "y", "w", "h"]); // console.log(`Nb new items Unmatched : ${matchedList.filter((isMatched) => isMatched === false).length}`) + + matchedList.forEach(function (matched, index) { + // Iterate through unmatched new detections + if (!matched) { + // Do not add as new tracked item if it is to similar to an existing one + var treeSearchResult = treeItemsTracked.nearest(detectionsOfThisFrame[index], 1, params.distanceLimit)[0]; + + if (!treeSearchResult) { + var newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map + + mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree + + treeItemsTracked.insert(newItemTracked); // Make unvailable + + newItemTracked.makeUnavailable(); + } + } + }); + } + } // Start killing the itemTracked (and predicting next position) + // that are tracked but haven't been matched this frame + + + mapOfItemsTracked.forEach(function (itemTracked) { + if (itemTracked.available) { + itemTracked.countDown(frameNb); + itemTracked.updateTheoricalPositionAndSize(); + + if (itemTracked.isDead()) { + mapOfItemsTracked["delete"](itemTracked.id); + treeItemsTracked.remove(itemTracked); + + if (keepAllHistoryInMemory) { + mapOfAllItemsTracked.set(itemTracked.id, itemTracked); + } + } + } + }); + } +}; + +var reset = tracker.reset = function () { + mapOfItemsTracked = new Map(); + mapOfAllItemsTracked = new Map(); + itemTrackedModule.reset(); +}; + +var setParams = tracker.setParams = function (newParams) { + Object.keys(newParams).forEach(function (key) { + params[key] = newParams[key]; + }); +}; + +var enableKeepInMemory = tracker.enableKeepInMemory = function () { + keepAllHistoryInMemory = true; +}; + +var disableKeepInMemory = tracker.disableKeepInMemory = function () { + keepAllHistoryInMemory = false; +}; + +var getJSONOfTrackedItems = tracker.getJSONOfTrackedItems = function () { + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { + return itemTracked.toJSON(roundInt); + }); +}; + +var getJSONDebugOfTrackedItems = tracker.getJSONDebugOfTrackedItems = function () { + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { + return itemTracked.toJSONDebug(roundInt); + }); +}; + +var getTrackedItemsInMOTFormat = tracker.getTrackedItemsInMOTFormat = function (frameNb) { + return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { + return itemTracked.toMOT(frameNb); + }); +}; // Work only if keepInMemory is enabled + + +var getAllTrackedItems = tracker.getAllTrackedItems = function () { + return mapOfAllItemsTracked; +}; // Work only if keepInMemory is enabled + + +var getJSONOfAllTrackedItems = tracker.getJSONOfAllTrackedItems = function () { + return Array.from(mapOfAllItemsTracked.values()).map(function (itemTracked) { + return itemTracked.toJSONGenericInfo(); + }); +}; + +exports.computeDistance = computeDistance; +exports["default"] = tracker; +exports.disableKeepInMemory = disableKeepInMemory; +exports.enableKeepInMemory = enableKeepInMemory; +exports.getAllTrackedItems = getAllTrackedItems; +exports.getJSONDebugOfTrackedItems = getJSONDebugOfTrackedItems; +exports.getJSONOfAllTrackedItems = getJSONOfAllTrackedItems; +exports.getJSONOfTrackedItems = getJSONOfTrackedItems; +exports.getTrackedItemsInMOTFormat = getTrackedItemsInMOTFormat; +exports.reset = reset; +exports.setParams = setParams; +exports.updateTrackedItemsWithNewFrame = updateTrackedItemsWithNewFrame; diff --git a/bundle.js b/bundle.esm.js similarity index 100% rename from bundle.js rename to bundle.esm.js diff --git a/package.json b/package.json index c564196..a79dbc6 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,9 @@ "version": "0.9.0", "description": "Tracker by detections in javascript for node.js / browsers", "url": "https://github.com/opendatacam/node-moving-things-tracker", - "main": "bundle.js", + "main": "bundle.cjs.js", "bin": { - "node-moving-things-tracker": "bundle.js" + "node-moving-things-tracker": "bundle.cjs.js" }, "scripts": { "test": "jasmine", diff --git a/rollup.config.js b/rollup.config.js index 2efe472..459c6db 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -6,8 +6,8 @@ import commonjs from '@rollup/plugin-commonjs'; const config = { input: 'tracker.js', output: { - file: 'bundle.js', - format: 'esm' + file: 'bundle.cjs.js', + format: 'cjs' }, plugins: [ resolve({ browser: true, preferBuiltins: false }), From b899406e37c500fb7ff4a389ec112991c9c38a3b Mon Sep 17 00:00:00 2001 From: Dmytro Date: Sat, 2 Apr 2022 22:14:54 +0300 Subject: [PATCH 04/11] removr kd-tree lib, use api instead this will fix bundle issue --- bundle.cjs.js | 518 +++++++++++----------------------------------- bundle.esm.js | 518 +++++++++++----------------------------------- lib/kdTree-min.js | 10 - package-lock.json | 13 +- package.json | 1 + tracker.js | 2 +- 6 files changed, 252 insertions(+), 810 deletions(-) delete mode 100644 lib/kdTree-min.js diff --git a/bundle.cjs.js b/bundle.cjs.js index 4ef24b6..c37c5e3 100644 --- a/bundle.cjs.js +++ b/bundle.cjs.js @@ -487,441 +487,161 @@ var kdTreeMin = {}; */ (function (exports) { - (function (e, t) { - { - t(exports); - } - })(commonjsGlobal, function (e) { - function t(e, t, n) { - this.obj = e; - this.left = null; - this.right = null; - this.parent = n; - this.dimension = t; + !function (t, n) { + n(exports ); + }(commonjsGlobal, function (t) { + function n(t, n, o) { + this.obj = t, this.left = null, this.right = null, this.parent = o, this.dimension = n; } - function n(e, n, i) { - function o(e, n, r) { - var s = n % i.length, - u, - a; + function o(t) { + this.content = [], this.scoreFunction = t; + } - if (e.length === 0) { - return null; + o.prototype = { + push: function (t) { + this.content.push(t), this.bubbleUp(this.content.length - 1); + }, + pop: function () { + var t = this.content[0], + n = this.content.pop(); + return this.content.length > 0 && (this.content[0] = n, this.sinkDown(0)), t; + }, + peek: function () { + return this.content[0]; + }, + remove: function (t) { + for (var n = this.content.length, o = 0; o < n; o++) if (this.content[o] == t) { + var i = this.content.pop(); + return void (o != n - 1 && (this.content[o] = i, this.scoreFunction(i) < this.scoreFunction(t) ? this.bubbleUp(o) : this.sinkDown(o))); } - if (e.length === 1) { - return new t(e[0], s, r); + throw new Error("Node not found."); + }, + size: function () { + return this.content.length; + }, + bubbleUp: function (t) { + for (var n = this.content[t]; t > 0;) { + var o = Math.floor((t + 1) / 2) - 1, + i = this.content[o]; + if (!(this.scoreFunction(n) < this.scoreFunction(i))) break; + this.content[o] = n, this.content[t] = i, t = o; } - - e.sort(function (e, t) { - return e[i[s]] - t[i[s]]; - }); - u = Math.floor(e.length / 2); - a = new t(e[u], s, r); - a.left = o(e.slice(0, u), n + 1, a); - a.right = o(e.slice(u + 1), n + 1, a); - return a; - } - - function u(e) { - function t(e) { - if (e.left) { - e.left.parent = e; - t(e.left); + }, + sinkDown: function (t) { + for (var n = this.content.length, o = this.content[t], i = this.scoreFunction(o);;) { + var e = 2 * (t + 1), + r = e - 1, + l = null; + + if (r < n) { + var u = this.content[r], + h = this.scoreFunction(u); + h < i && (l = r); } - if (e.right) { - e.right.parent = e; - t(e.right); + if (e < n) { + var s = this.content[e]; + this.scoreFunction(s) < (null == l ? i : h) && (l = e); } - } - s.root = e; - t(s.root); + if (null == l) break; + this.content[t] = this.content[l], this.content[l] = o, t = l; + } + } + }, t.kdTree = function (t, i, e) { + function r(t, o, i) { + var l, + u, + h = o % e.length; + return 0 === t.length ? null : 1 === t.length ? new n(t[0], h, i) : (t.sort(function (t, n) { + return t[e[h]] - n[e[h]]; + }), l = Math.floor(t.length / 2), u = new n(t[l], h, i), u.left = r(t.slice(0, l), o + 1, u), u.right = r(t.slice(l + 1), o + 1, u), u); } - var s = this; - if (!Array.isArray(e)) u(e);else this.root = o(e, 0, null); - - this.toJSON = function (e) { - if (!e) e = this.root; - var n = new t(e.obj, e.dimension, null); - if (e.left) n.left = s.toJSON(e.left); - if (e.right) n.right = s.toJSON(e.right); - return n; - }; - - this.insert = function (e) { - function n(t, r) { - if (t === null) { - return r; - } - - var s = i[t.dimension]; - - if (e[s] < t.obj[s]) { - return n(t.left, t); - } else { - return n(t.right, t); - } + var l = this; + Array.isArray(t) ? this.root = r(t, 0, null) : function (t) { + function n(t) { + t.left && (t.left.parent = t, n(t.left)), t.right && (t.right.parent = t, n(t.right)); } - var r = n(this.root, null), - s, - o; - - if (r === null) { - this.root = new t(e, 0, null); - return; + l.root = t, n(l.root); + }(t), this.toJSON = function (t) { + t || (t = this.root); + var o = new n(t.obj, t.dimension, null); + return t.left && (o.left = l.toJSON(t.left)), t.right && (o.right = l.toJSON(t.right)), o; + }, this.insert = function (t) { + function o(n, i) { + if (null === n) return i; + var r = e[n.dimension]; + return t[r] < n.obj[r] ? o(n.left, n) : o(n.right, n); } - s = new t(e, (r.dimension + 1) % i.length, r); - o = i[r.dimension]; - - if (e[o] < r.obj[o]) { - r.left = s; - } else { - r.right = s; + var i, + r, + l = o(this.root, null); + null !== l ? (i = new n(t, (l.dimension + 1) % e.length, l), r = e[l.dimension], t[r] < l.obj[r] ? l.left = i : l.right = i) : this.root = new n(t, 0, null); + }, this.remove = function (t) { + function n(o) { + if (null === o) return null; + if (o.obj === t) return o; + var i = e[o.dimension]; + return t[i] < o.obj[i] ? n(o.left) : n(o.right); } - }; - - this.remove = function (e) { - function n(t) { - if (t === null) { - return null; - } - if (t.obj === e) { - return t; + function o(t) { + function n(t, o) { + var i, r, l, u, h; + return null === t ? null : (i = e[o], t.dimension === o ? null !== t.left ? n(t.left, o) : t : (r = t.obj[i], l = n(t.left, o), u = n(t.right, o), h = t, null !== l && l.obj[i] < r && (h = l), null !== u && u.obj[i] < h.obj[i] && (h = u), h)); } - var r = i[t.dimension]; - - if (e[r] < t.obj[r]) { - return n(t.left); - } else { - return n(t.right); - } + var i, r, u; + if (null === t.left && null === t.right) return null === t.parent ? void (l.root = null) : (u = e[t.parent.dimension], void (t.obj[u] < t.parent.obj[u] ? t.parent.left = null : t.parent.right = null)); + null !== t.right ? (r = (i = n(t.right, t.dimension)).obj, o(i), t.obj = r) : (r = (i = n(t.left, t.dimension)).obj, o(i), t.right = t.left, t.left = null, t.obj = r); } - function r(e) { - function u(e, t) { - var n, r, s, o, a; - - if (e === null) { - return null; - } - - n = i[t]; - - if (e.dimension === t) { - if (e.right !== null) { - return u(e.right, t); - } - - return e; - } - - r = e.obj[n]; - s = u(e.left, t); - o = u(e.right, t); - a = e; - - if (s !== null && s.obj[n] > r) { - a = s; - } - - if (o !== null && o.obj[n] > a.obj[n]) { - a = o; - } - - return a; - } - - function a(e, t) { - var n, r, s, o, u; - - if (e === null) { - return null; - } - - n = i[t]; - - if (e.dimension === t) { - if (e.left !== null) { - return a(e.left, t); - } - - return e; - } - - r = e.obj[n]; - s = a(e.left, t); - o = a(e.right, t); - u = e; - - if (s !== null && s.obj[n] < r) { - u = s; - } - - if (o !== null && o.obj[n] < u.obj[n]) { - u = o; - } - - return u; + var i; + null !== (i = n(l.root)) && o(i); + }, this.nearest = function (t, n, r) { + function u(o) { + function r(t, o) { + f.push([t, o]), f.size() > n && f.pop(); } - var t, n, o; - - if (e.left === null && e.right === null) { - if (e.parent === null) { - s.root = null; - return; - } - - o = i[e.parent.dimension]; - - if (e.obj[o] < e.parent.obj[o]) { - e.parent.left = null; - } else { - e.parent.right = null; - } - - return; - } - - if (e.left !== null) { - t = u(e.left, e.dimension); - } else { - t = a(e.right, e.dimension); - } - - n = t.obj; - r(t); - e.obj = n; - } - - var t; - t = n(s.root); - - if (t === null) { - return; - } - - r(t); - }; - - this.nearest = function (e, t, o) { - function l(r) { - function d(e, n) { - f.push([e, n]); - - if (f.size() > t) { - f.pop(); - } - } - - var s, - o = i[r.dimension], - u = n(e, r.obj), - a = {}, - c, + var l, h, - p; - - for (p = 0; p < i.length; p += 1) { - if (p === r.dimension) { - a[i[p]] = e[i[p]]; - } else { - a[i[p]] = r.obj[i[p]]; - } - } - - c = n(a, r.obj); - - if (r.right === null && r.left === null) { - if (f.size() < t || u < f.peek()[1]) { - d(r, u); - } - - return; - } - - if (r.right === null) { - s = r.left; - } else if (r.left === null) { - s = r.right; - } else { - if (e[o] < r.obj[o]) { - s = r.left; - } else { - s = r.right; - } - } - - l(s); - - if (f.size() < t || u < f.peek()[1]) { - d(r, u); - } - - if (f.size() < t || Math.abs(c) < f.peek()[1]) { - if (s === r.left) { - h = r.right; - } else { - h = r.left; - } - - if (h !== null) { - l(h); - } - } - } - - var u, a, f; - f = new r(function (e) { - return -e[1]; - }); - - if (o) { - for (u = 0; u < t; u += 1) { - f.push([null, o]); - } - } + s, + c, + a = e[o.dimension], + g = i(t, o.obj), + p = {}; - l(s.root); - a = []; + for (c = 0; c < e.length; c += 1) c === o.dimension ? p[e[c]] = t[e[c]] : p[e[c]] = o.obj[e[c]]; - for (u = 0; u < t; u += 1) { - if (f.content[u][0]) { - a.push([f.content[u][0].obj, f.content[u][1]]); - } + h = i(p, o.obj), null !== o.right || null !== o.left ? (u(l = null === o.right ? o.left : null === o.left ? o.right : t[a] < o.obj[a] ? o.left : o.right), (f.size() < n || g < f.peek()[1]) && r(o, g), (f.size() < n || Math.abs(h) < f.peek()[1]) && null !== (s = l === o.left ? o.right : o.left) && u(s)) : (f.size() < n || g < f.peek()[1]) && r(o, g); } - return a; - }; + var h, s, f; + if (f = new o(function (t) { + return -t[1]; + }), r) for (h = 0; h < n; h += 1) f.push([null, r]); - this.balanceFactor = function () { - function e(t) { - if (t === null) { - return 0; - } + for (l.root && u(l.root), s = [], h = 0; h < Math.min(n, f.content.length); h += 1) f.content[h][0] && s.push([f.content[h][0].obj, f.content[h][1]]); - return Math.max(e(t.left), e(t.right)) + 1; + return s; + }, this.balanceFactor = function () { + function t(n) { + return null === n ? 0 : Math.max(t(n.left), t(n.right)) + 1; } - function t(e) { - if (e === null) { - return 0; - } - - return t(e.left) + t(e.right) + 1; + function n(t) { + return null === t ? 0 : n(t.left) + n(t.right) + 1; } - return e(s.root) / (Math.log(t(s.root)) / Math.log(2)); + return t(l.root) / (Math.log(n(l.root)) / Math.log(2)); }; - } - - function r(e) { - this.content = []; - this.scoreFunction = e; - } - - r.prototype = { - push: function push(e) { - this.content.push(e); - this.bubbleUp(this.content.length - 1); - }, - pop: function pop() { - var e = this.content[0]; - var t = this.content.pop(); - - if (this.content.length > 0) { - this.content[0] = t; - this.sinkDown(0); - } - - return e; - }, - peek: function peek() { - return this.content[0]; - }, - remove: function remove(e) { - var t = this.content.length; - - for (var n = 0; n < t; n++) { - if (this.content[n] == e) { - var r = this.content.pop(); - - if (n != t - 1) { - this.content[n] = r; - if (this.scoreFunction(r) < this.scoreFunction(e)) this.bubbleUp(n);else this.sinkDown(n); - } - - return; - } - } - - throw new Error("Node not found."); - }, - size: function size() { - return this.content.length; - }, - bubbleUp: function bubbleUp(e) { - var t = this.content[e]; - - while (e > 0) { - var n = Math.floor((e + 1) / 2) - 1, - r = this.content[n]; - - if (this.scoreFunction(t) < this.scoreFunction(r)) { - this.content[n] = t; - this.content[e] = r; - e = n; - } else { - break; - } - } - }, - sinkDown: function sinkDown(e) { - var t = this.content.length, - n = this.content[e], - r = this.scoreFunction(n); - - while (true) { - var i = (e + 1) * 2, - s = i - 1; - var o = null; - - if (s < t) { - var u = this.content[s], - a = this.scoreFunction(u); - if (a < r) o = s; - } - - if (i < t) { - var f = this.content[i], - l = this.scoreFunction(f); - - if (l < (o == null ? r : a)) { - o = i; - } - } - - if (o != null) { - this.content[e] = this.content[o]; - this.content[o] = n; - e = o; - } else { - break; - } - } - } - }; - this.kdTree = n; - e.kdTree = n; - e.BinaryHeap = r; + }, t.BinaryHeap = o; }); })(kdTreeMin); diff --git a/bundle.esm.js b/bundle.esm.js index d34e3a4..ccf12e3 100644 --- a/bundle.esm.js +++ b/bundle.esm.js @@ -483,441 +483,161 @@ var kdTreeMin = {}; */ (function (exports) { - (function (e, t) { - { - t(exports); - } - })(commonjsGlobal, function (e) { - function t(e, t, n) { - this.obj = e; - this.left = null; - this.right = null; - this.parent = n; - this.dimension = t; + !function (t, n) { + n(exports ); + }(commonjsGlobal, function (t) { + function n(t, n, o) { + this.obj = t, this.left = null, this.right = null, this.parent = o, this.dimension = n; } - function n(e, n, i) { - function o(e, n, r) { - var s = n % i.length, - u, - a; + function o(t) { + this.content = [], this.scoreFunction = t; + } - if (e.length === 0) { - return null; + o.prototype = { + push: function (t) { + this.content.push(t), this.bubbleUp(this.content.length - 1); + }, + pop: function () { + var t = this.content[0], + n = this.content.pop(); + return this.content.length > 0 && (this.content[0] = n, this.sinkDown(0)), t; + }, + peek: function () { + return this.content[0]; + }, + remove: function (t) { + for (var n = this.content.length, o = 0; o < n; o++) if (this.content[o] == t) { + var i = this.content.pop(); + return void (o != n - 1 && (this.content[o] = i, this.scoreFunction(i) < this.scoreFunction(t) ? this.bubbleUp(o) : this.sinkDown(o))); } - if (e.length === 1) { - return new t(e[0], s, r); + throw new Error("Node not found."); + }, + size: function () { + return this.content.length; + }, + bubbleUp: function (t) { + for (var n = this.content[t]; t > 0;) { + var o = Math.floor((t + 1) / 2) - 1, + i = this.content[o]; + if (!(this.scoreFunction(n) < this.scoreFunction(i))) break; + this.content[o] = n, this.content[t] = i, t = o; } - - e.sort(function (e, t) { - return e[i[s]] - t[i[s]]; - }); - u = Math.floor(e.length / 2); - a = new t(e[u], s, r); - a.left = o(e.slice(0, u), n + 1, a); - a.right = o(e.slice(u + 1), n + 1, a); - return a; - } - - function u(e) { - function t(e) { - if (e.left) { - e.left.parent = e; - t(e.left); + }, + sinkDown: function (t) { + for (var n = this.content.length, o = this.content[t], i = this.scoreFunction(o);;) { + var e = 2 * (t + 1), + r = e - 1, + l = null; + + if (r < n) { + var u = this.content[r], + h = this.scoreFunction(u); + h < i && (l = r); } - if (e.right) { - e.right.parent = e; - t(e.right); + if (e < n) { + var s = this.content[e]; + this.scoreFunction(s) < (null == l ? i : h) && (l = e); } - } - s.root = e; - t(s.root); + if (null == l) break; + this.content[t] = this.content[l], this.content[l] = o, t = l; + } + } + }, t.kdTree = function (t, i, e) { + function r(t, o, i) { + var l, + u, + h = o % e.length; + return 0 === t.length ? null : 1 === t.length ? new n(t[0], h, i) : (t.sort(function (t, n) { + return t[e[h]] - n[e[h]]; + }), l = Math.floor(t.length / 2), u = new n(t[l], h, i), u.left = r(t.slice(0, l), o + 1, u), u.right = r(t.slice(l + 1), o + 1, u), u); } - var s = this; - if (!Array.isArray(e)) u(e);else this.root = o(e, 0, null); - - this.toJSON = function (e) { - if (!e) e = this.root; - var n = new t(e.obj, e.dimension, null); - if (e.left) n.left = s.toJSON(e.left); - if (e.right) n.right = s.toJSON(e.right); - return n; - }; - - this.insert = function (e) { - function n(t, r) { - if (t === null) { - return r; - } - - var s = i[t.dimension]; - - if (e[s] < t.obj[s]) { - return n(t.left, t); - } else { - return n(t.right, t); - } + var l = this; + Array.isArray(t) ? this.root = r(t, 0, null) : function (t) { + function n(t) { + t.left && (t.left.parent = t, n(t.left)), t.right && (t.right.parent = t, n(t.right)); } - var r = n(this.root, null), - s, - o; - - if (r === null) { - this.root = new t(e, 0, null); - return; + l.root = t, n(l.root); + }(t), this.toJSON = function (t) { + t || (t = this.root); + var o = new n(t.obj, t.dimension, null); + return t.left && (o.left = l.toJSON(t.left)), t.right && (o.right = l.toJSON(t.right)), o; + }, this.insert = function (t) { + function o(n, i) { + if (null === n) return i; + var r = e[n.dimension]; + return t[r] < n.obj[r] ? o(n.left, n) : o(n.right, n); } - s = new t(e, (r.dimension + 1) % i.length, r); - o = i[r.dimension]; - - if (e[o] < r.obj[o]) { - r.left = s; - } else { - r.right = s; + var i, + r, + l = o(this.root, null); + null !== l ? (i = new n(t, (l.dimension + 1) % e.length, l), r = e[l.dimension], t[r] < l.obj[r] ? l.left = i : l.right = i) : this.root = new n(t, 0, null); + }, this.remove = function (t) { + function n(o) { + if (null === o) return null; + if (o.obj === t) return o; + var i = e[o.dimension]; + return t[i] < o.obj[i] ? n(o.left) : n(o.right); } - }; - - this.remove = function (e) { - function n(t) { - if (t === null) { - return null; - } - if (t.obj === e) { - return t; + function o(t) { + function n(t, o) { + var i, r, l, u, h; + return null === t ? null : (i = e[o], t.dimension === o ? null !== t.left ? n(t.left, o) : t : (r = t.obj[i], l = n(t.left, o), u = n(t.right, o), h = t, null !== l && l.obj[i] < r && (h = l), null !== u && u.obj[i] < h.obj[i] && (h = u), h)); } - var r = i[t.dimension]; - - if (e[r] < t.obj[r]) { - return n(t.left); - } else { - return n(t.right); - } + var i, r, u; + if (null === t.left && null === t.right) return null === t.parent ? void (l.root = null) : (u = e[t.parent.dimension], void (t.obj[u] < t.parent.obj[u] ? t.parent.left = null : t.parent.right = null)); + null !== t.right ? (r = (i = n(t.right, t.dimension)).obj, o(i), t.obj = r) : (r = (i = n(t.left, t.dimension)).obj, o(i), t.right = t.left, t.left = null, t.obj = r); } - function r(e) { - function u(e, t) { - var n, r, s, o, a; - - if (e === null) { - return null; - } - - n = i[t]; - - if (e.dimension === t) { - if (e.right !== null) { - return u(e.right, t); - } - - return e; - } - - r = e.obj[n]; - s = u(e.left, t); - o = u(e.right, t); - a = e; - - if (s !== null && s.obj[n] > r) { - a = s; - } - - if (o !== null && o.obj[n] > a.obj[n]) { - a = o; - } - - return a; - } - - function a(e, t) { - var n, r, s, o, u; - - if (e === null) { - return null; - } - - n = i[t]; - - if (e.dimension === t) { - if (e.left !== null) { - return a(e.left, t); - } - - return e; - } - - r = e.obj[n]; - s = a(e.left, t); - o = a(e.right, t); - u = e; - - if (s !== null && s.obj[n] < r) { - u = s; - } - - if (o !== null && o.obj[n] < u.obj[n]) { - u = o; - } - - return u; + var i; + null !== (i = n(l.root)) && o(i); + }, this.nearest = function (t, n, r) { + function u(o) { + function r(t, o) { + f.push([t, o]), f.size() > n && f.pop(); } - var t, n, o; - - if (e.left === null && e.right === null) { - if (e.parent === null) { - s.root = null; - return; - } - - o = i[e.parent.dimension]; - - if (e.obj[o] < e.parent.obj[o]) { - e.parent.left = null; - } else { - e.parent.right = null; - } - - return; - } - - if (e.left !== null) { - t = u(e.left, e.dimension); - } else { - t = a(e.right, e.dimension); - } - - n = t.obj; - r(t); - e.obj = n; - } - - var t; - t = n(s.root); - - if (t === null) { - return; - } - - r(t); - }; - - this.nearest = function (e, t, o) { - function l(r) { - function d(e, n) { - f.push([e, n]); - - if (f.size() > t) { - f.pop(); - } - } - - var s, - o = i[r.dimension], - u = n(e, r.obj), - a = {}, - c, + var l, h, - p; - - for (p = 0; p < i.length; p += 1) { - if (p === r.dimension) { - a[i[p]] = e[i[p]]; - } else { - a[i[p]] = r.obj[i[p]]; - } - } - - c = n(a, r.obj); - - if (r.right === null && r.left === null) { - if (f.size() < t || u < f.peek()[1]) { - d(r, u); - } - - return; - } - - if (r.right === null) { - s = r.left; - } else if (r.left === null) { - s = r.right; - } else { - if (e[o] < r.obj[o]) { - s = r.left; - } else { - s = r.right; - } - } - - l(s); - - if (f.size() < t || u < f.peek()[1]) { - d(r, u); - } - - if (f.size() < t || Math.abs(c) < f.peek()[1]) { - if (s === r.left) { - h = r.right; - } else { - h = r.left; - } - - if (h !== null) { - l(h); - } - } - } - - var u, a, f; - f = new r(function (e) { - return -e[1]; - }); - - if (o) { - for (u = 0; u < t; u += 1) { - f.push([null, o]); - } - } + s, + c, + a = e[o.dimension], + g = i(t, o.obj), + p = {}; - l(s.root); - a = []; + for (c = 0; c < e.length; c += 1) c === o.dimension ? p[e[c]] = t[e[c]] : p[e[c]] = o.obj[e[c]]; - for (u = 0; u < t; u += 1) { - if (f.content[u][0]) { - a.push([f.content[u][0].obj, f.content[u][1]]); - } + h = i(p, o.obj), null !== o.right || null !== o.left ? (u(l = null === o.right ? o.left : null === o.left ? o.right : t[a] < o.obj[a] ? o.left : o.right), (f.size() < n || g < f.peek()[1]) && r(o, g), (f.size() < n || Math.abs(h) < f.peek()[1]) && null !== (s = l === o.left ? o.right : o.left) && u(s)) : (f.size() < n || g < f.peek()[1]) && r(o, g); } - return a; - }; + var h, s, f; + if (f = new o(function (t) { + return -t[1]; + }), r) for (h = 0; h < n; h += 1) f.push([null, r]); - this.balanceFactor = function () { - function e(t) { - if (t === null) { - return 0; - } + for (l.root && u(l.root), s = [], h = 0; h < Math.min(n, f.content.length); h += 1) f.content[h][0] && s.push([f.content[h][0].obj, f.content[h][1]]); - return Math.max(e(t.left), e(t.right)) + 1; + return s; + }, this.balanceFactor = function () { + function t(n) { + return null === n ? 0 : Math.max(t(n.left), t(n.right)) + 1; } - function t(e) { - if (e === null) { - return 0; - } - - return t(e.left) + t(e.right) + 1; + function n(t) { + return null === t ? 0 : n(t.left) + n(t.right) + 1; } - return e(s.root) / (Math.log(t(s.root)) / Math.log(2)); + return t(l.root) / (Math.log(n(l.root)) / Math.log(2)); }; - } - - function r(e) { - this.content = []; - this.scoreFunction = e; - } - - r.prototype = { - push: function push(e) { - this.content.push(e); - this.bubbleUp(this.content.length - 1); - }, - pop: function pop() { - var e = this.content[0]; - var t = this.content.pop(); - - if (this.content.length > 0) { - this.content[0] = t; - this.sinkDown(0); - } - - return e; - }, - peek: function peek() { - return this.content[0]; - }, - remove: function remove(e) { - var t = this.content.length; - - for (var n = 0; n < t; n++) { - if (this.content[n] == e) { - var r = this.content.pop(); - - if (n != t - 1) { - this.content[n] = r; - if (this.scoreFunction(r) < this.scoreFunction(e)) this.bubbleUp(n);else this.sinkDown(n); - } - - return; - } - } - - throw new Error("Node not found."); - }, - size: function size() { - return this.content.length; - }, - bubbleUp: function bubbleUp(e) { - var t = this.content[e]; - - while (e > 0) { - var n = Math.floor((e + 1) / 2) - 1, - r = this.content[n]; - - if (this.scoreFunction(t) < this.scoreFunction(r)) { - this.content[n] = t; - this.content[e] = r; - e = n; - } else { - break; - } - } - }, - sinkDown: function sinkDown(e) { - var t = this.content.length, - n = this.content[e], - r = this.scoreFunction(n); - - while (true) { - var i = (e + 1) * 2, - s = i - 1; - var o = null; - - if (s < t) { - var u = this.content[s], - a = this.scoreFunction(u); - if (a < r) o = s; - } - - if (i < t) { - var f = this.content[i], - l = this.scoreFunction(f); - - if (l < (o == null ? r : a)) { - o = i; - } - } - - if (o != null) { - this.content[e] = this.content[o]; - this.content[o] = n; - e = o; - } else { - break; - } - } - } - }; - this.kdTree = n; - e.kdTree = n; - e.BinaryHeap = r; + }, t.BinaryHeap = o; }); })(kdTreeMin); diff --git a/lib/kdTree-min.js b/lib/kdTree-min.js deleted file mode 100644 index 45cdf4b..0000000 --- a/lib/kdTree-min.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * k-d Tree JavaScript - V 1.01 - * - * https://github.com/ubilabs/kd-tree-javascript - * - * @author Mircea Pricop , 2012 - * @author Martin Kleppe , 2012 - * @author Ubilabs http://ubilabs.net, 2012 - * @license MIT License - */(function(e,t){if(typeof define==="function"&&define.amd){define(["exports"],t)}else if(typeof exports==="object"){t(exports)}else{t(e.commonJsStrict={})}})(this,function(e){function t(e,t,n){this.obj=e;this.left=null;this.right=null;this.parent=n;this.dimension=t}function n(e,n,i){function o(e,n,r){var s=n%i.length,u,a;if(e.length===0){return null}if(e.length===1){return new t(e[0],s,r)}e.sort(function(e,t){return e[i[s]]-t[i[s]]});u=Math.floor(e.length/2);a=new t(e[u],s,r);a.left=o(e.slice(0,u),n+1,a);a.right=o(e.slice(u+1),n+1,a);return a}function u(e){function t(e){if(e.left){e.left.parent=e;t(e.left)}if(e.right){e.right.parent=e;t(e.right)}}s.root=e;t(s.root)}var s=this;if(!Array.isArray(e))u(e,n,i);else this.root=o(e,0,null);this.toJSON=function(e){if(!e)e=this.root;var n=new t(e.obj,e.dimension,null);if(e.left)n.left=s.toJSON(e.left);if(e.right)n.right=s.toJSON(e.right);return n};this.insert=function(e){function n(t,r){if(t===null){return r}var s=i[t.dimension];if(e[s]r){a=s}if(o!==null&&o.obj[n]>a.obj[n]){a=o}return a}function a(e,t){var n,r,s,o,u;if(e===null){return null}n=i[t];if(e.dimension===t){if(e.left!==null){return a(e.left,t)}return e}r=e.obj[n];s=a(e.left,t);o=a(e.right,t);u=e;if(s!==null&&s.obj[n]t){f.pop()}}var s,o=i[r.dimension],u=n(e,r.obj),a={},c,h,p;for(p=0;p0){this.content[0]=t;this.sinkDown(0)}return e},peek:function(){return this.content[0]},remove:function(e){var t=this.content.length;for(var n=0;n0){var n=Math.floor((e+1)/2)-1,r=this.content[n];if(this.scoreFunction(t)=6" } }, + "node_modules/kd-tree-javascript": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/kd-tree-javascript/-/kd-tree-javascript-1.0.3.tgz", + "integrity": "sha512-7oSugmaxTCJFqey11rlTSEQD3hGDnRgROMj9MEREvDGV8SlIFwN7x3jJRyFoi+mjO0+4wuSuaDLS1reNQHP7uA==" + }, "node_modules/lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", @@ -4186,6 +4192,11 @@ "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", "dev": true }, + "kd-tree-javascript": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/kd-tree-javascript/-/kd-tree-javascript-1.0.3.tgz", + "integrity": "sha512-7oSugmaxTCJFqey11rlTSEQD3hGDnRgROMj9MEREvDGV8SlIFwN7x3jJRyFoi+mjO0+4wuSuaDLS1reNQHP7uA==" + }, "lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", diff --git a/package.json b/package.json index a79dbc6..d2a2138 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "license": "MIT", "dependencies": { "crypto": "^1.0.1", + "kd-tree-javascript": "^1.0.3", "lodash.isequal": "^4.5.0", "minimist": "^1.2.0", "munkres-js": "^1.2.2", diff --git a/tracker.js b/tracker.js index a0e8891..3437827 100644 --- a/tracker.js +++ b/tracker.js @@ -1,6 +1,6 @@ const itemTrackedModule = require('./ItemTracked'); var ItemTracked = itemTrackedModule.ItemTracked; -var kdTree = require('./lib/kdTree-min.js').kdTree; +var kdTree = require('kd-tree-javascript').kdTree; var isEqual = require('lodash.isequal') var iouAreas = require('./utils').iouAreas var munkres = require('munkres-js'); From 55025fb90adf394b4a28efdd696bd7eb99a2206c Mon Sep 17 00:00:00 2001 From: Dmytro Date: Sat, 2 Apr 2022 22:53:50 +0300 Subject: [PATCH 05/11] Add let,const --- bundle.cjs.js | 8 +- bundle.esm.js | 3510 ------------------------------------------------- tracker.js | 70 +- utils.js | 22 +- 4 files changed, 50 insertions(+), 3560 deletions(-) delete mode 100644 bundle.esm.js diff --git a/bundle.cjs.js b/bundle.cjs.js index c37c5e3..913cd19 100644 --- a/bundle.cjs.js +++ b/bundle.cjs.js @@ -183,10 +183,10 @@ utils.iouAreas = function (item1, item2) { // no overlap return 0; } else { - area_rect1 = item1.w * item1.h; - area_rect2 = item2.w * item2.h; - area_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0); - area_union = area_rect1 + area_rect2 - area_intersection; + var area_rect1 = item1.w * item1.h; + var area_rect2 = item2.w * item2.h; + var area_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0); + var area_union = area_rect1 + area_rect2 - area_intersection; return area_intersection / area_union; } }; diff --git a/bundle.esm.js b/bundle.esm.js deleted file mode 100644 index ccf12e3..0000000 --- a/bundle.esm.js +++ /dev/null @@ -1,3510 +0,0 @@ -function _toConsumableArray(arr) { - return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); -} - -function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) return _arrayLikeToArray(arr); -} - -function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); -} - -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); -} - -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - - return arr2; -} - -function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} - -var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - -var tracker = {}; - -var ItemTracked$1 = {}; - -var rngBrowser = {exports: {}}; - -// browser this is a little complicated due to unknown quality of Math.random() -// and inconsistent support for the `crypto` API. We do the best we can via -// feature-detection -// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. - -var getRandomValues = typeof crypto != 'undefined' && crypto.getRandomValues.bind(crypto) || typeof msCrypto != 'undefined' && msCrypto.getRandomValues.bind(msCrypto); - -if (getRandomValues) { - // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto - var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef - - rngBrowser.exports = function whatwgRNG() { - getRandomValues(rnds8); - return rnds8; - }; -} else { - // Math.random()-based (RNG) - // - // If all else fails, use Math.random(). It's fast, but is of unspecified - // quality. - var rnds = new Array(16); - - rngBrowser.exports = function mathRNG() { - for (var i = 0, r; i < 16; i++) { - if ((i & 0x03) === 0) r = Math.random() * 0x100000000; - rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; - } - - return rnds; - }; -} - -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ -var byteToHex = []; - -for (var i = 0; i < 256; ++i) { - byteToHex[i] = (i + 0x100).toString(16).substr(1); -} - -function bytesToUuid$1(buf, offset) { - var i = offset || 0; - var bth = byteToHex; - return bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]]; -} - -var bytesToUuid_1 = bytesToUuid$1; - -var rng = rngBrowser.exports; -var bytesToUuid = bytesToUuid_1; - -function v4(options, buf, offset) { - var i = buf && offset || 0; - - if (typeof options == 'string') { - buf = options === 'binary' ? new Array(16) : null; - options = null; - } - - options = options || {}; - var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - - rnds[6] = rnds[6] & 0x0f | 0x40; - rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided - - if (buf) { - for (var ii = 0; ii < 16; ++ii) { - buf[i + ii] = rnds[ii]; - } - } - - return buf || bytesToUuid(rnds); -} - -var v4_1 = v4; - -var utils = {}; - -utils.isDetectionTooLarge = function (detections, largestAllowed) { - if (detections.w >= largestAllowed) { - return true; - } else { - return false; - } -}; - -var isInsideArea = function isInsideArea(area, point) { - var xMin = area.x - area.w / 2; - var xMax = area.x + area.w / 2; - var yMin = area.y - area.h / 2; - var yMax = area.y + area.h / 2; - - if (point.x >= xMin && point.x <= xMax && point.y >= yMin && point.y <= yMax) { - return true; - } else { - return false; - } -}; - -utils.isInsideArea = isInsideArea; - -utils.isInsideSomeAreas = function (areas, point) { - var isInside = areas.some(function (area) { - return isInsideArea(area, point); - }); - return isInside; -}; - -utils.ignoreObjectsNotToDetect = function (detections, objectsToDetect) { - return detections.filter(function (detection) { - return objectsToDetect.indexOf(detection.name) > -1; - }); -}; - -var getRectangleEdges = function getRectangleEdges(item) { - return { - x0: item.x - item.w / 2, - y0: item.y - item.h / 2, - x1: item.x + item.w / 2, - y1: item.y + item.h / 2 - }; -}; - -utils.getRectangleEdges = getRectangleEdges; - -utils.iouAreas = function (item1, item2) { - var rect1 = getRectangleEdges(item1); - var rect2 = getRectangleEdges(item2); // Get overlap rectangle - - var overlap_x0 = Math.max(rect1.x0, rect2.x0); - var overlap_y0 = Math.max(rect1.y0, rect2.y0); - var overlap_x1 = Math.min(rect1.x1, rect2.x1); - var overlap_y1 = Math.min(rect1.y1, rect2.y1); // if there an overlap - - if (overlap_x1 - overlap_x0 <= 0 || overlap_y1 - overlap_y0 <= 0) { - // no overlap - return 0; - } else { - area_rect1 = item1.w * item1.h; - area_rect2 = item2.w * item2.h; - area_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0); - area_union = area_rect1 + area_rect2 - area_intersection; - return area_intersection / area_union; - } -}; - -utils.computeVelocityVector = function (item1, item2, nbFrame) { - return { - dx: (item2.x - item1.x) / nbFrame, - dy: (item2.y - item1.y) / nbFrame - }; -}; -/* - - computeBearingIn360 - - dY - - ^ XX - | XXX - | XX - | XX - | XX - | XXX - | XX - | XX - | XX bearing = this angle in degree - | XX - |XX -+----------------------XX-----------------------> dX - | - | - | - | - | - | - | - | - | - | - | - + - -*/ - - -utils.computeBearingIn360 = function (dx, dy) { - var angle = Math.atan(dx / dy) / (Math.PI / 180); - - if (angle > 0) { - if (dy > 0) return angle;else return 180 + angle; - } else { - if (dx > 0) return 180 + angle;else return 360 + angle; - } -}; - -var uuidv4 = v4_1; -var computeBearingIn360 = utils.computeBearingIn360; -var computeVelocityVector = utils.computeVelocityVector; // Properties example -// { -// "x": 1021, -// "y": 65, -// "w": 34, -// "h": 27, -// "confidence": 26, -// "name": "car" -// } -// Use a simple incremental unique id for the display - -var idDisplay = 0; - -ItemTracked$1.ItemTracked = function (properties, frameNb, unMatchedFramesTolerance, fastDelete) { - var DEFAULT_UNMATCHEDFRAMES_TOLERANCE = unMatchedFramesTolerance; - var itemTracked = {}; // ==== Private ===== - // Am I available to be matched? - - itemTracked.available = true; // Should I be deleted? - - itemTracked["delete"] = false; - itemTracked.fastDelete = fastDelete; // How many unmatched frame should I survive? - - itemTracked.frameUnmatchedLeftBeforeDying = unMatchedFramesTolerance; - itemTracked.isZombie = false; - itemTracked.appearFrame = frameNb; - itemTracked.disappearFrame = null; - itemTracked.disappearArea = {}; // Keep track of the most counted class - - itemTracked.nameCount = {}; - itemTracked.nameCount[properties.name] = 1; // ==== Public ===== - - itemTracked.x = properties.x; - itemTracked.y = properties.y; - itemTracked.w = properties.w; - itemTracked.h = properties.h; - itemTracked.name = properties.name; - itemTracked.confidence = properties.confidence; - itemTracked.itemHistory = []; - itemTracked.itemHistory.push({ - x: properties.x, - y: properties.y, - w: properties.w, - h: properties.h, - confidence: properties.confidence - }); - itemTracked.velocity = { - dx: 0, - dy: 0 - }; - itemTracked.nbTimeMatched = 1; // Assign an unique id to each Item tracked - - itemTracked.id = uuidv4(); // Use an simple id for the display and debugging - - itemTracked.idDisplay = idDisplay; - idDisplay++; // Give me a new location / size - - itemTracked.update = function (properties, frameNb) { - // if it was zombie and disappear frame was set, reset it to null - if (this.disappearFrame) { - this.disappearFrame = null; - this.disappearArea = {}; - } - - this.isZombie = false; - this.nbTimeMatched += 1; - this.x = properties.x; - this.y = properties.y; - this.w = properties.w; - this.h = properties.h; - this.confidence = properties.confidence; - this.itemHistory.push({ - x: this.x, - y: this.y, - w: this.w, - h: this.h, - confidence: this.confidence - }); - this.name = properties.name; - - if (this.nameCount[properties.name]) { - this.nameCount[properties.name]++; - } else { - this.nameCount[properties.name] = 1; - } // Reset dying counter - - - this.frameUnmatchedLeftBeforeDying = DEFAULT_UNMATCHEDFRAMES_TOLERANCE; // Compute new velocityVector based on last positions history - - this.velocity = this.updateVelocityVector(); - }; - - itemTracked.makeAvailable = function () { - this.available = true; - return this; - }; - - itemTracked.makeUnavailable = function () { - this.available = false; - return this; - }; - - itemTracked.countDown = function (frameNb) { - // Set frame disappear number - if (this.disappearFrame === null) { - this.disappearFrame = frameNb; - this.disappearArea = { - x: this.x, - y: this.y, - w: this.w, - h: this.h - }; - } - - this.frameUnmatchedLeftBeforeDying--; - this.isZombie = true; // If it was matched less than 1 time, it should die quick - - if (this.fastDelete && this.nbTimeMatched <= 1) { - this.frameUnmatchedLeftBeforeDying = -1; - } - }; - - itemTracked.updateTheoricalPositionAndSize = function () { - this.itemHistory.push({ - x: this.x, - y: this.y, - w: this.w, - h: this.h, - confidence: this.confidence - }); - this.x = this.x + this.velocity.dx; - this.y = this.y + this.velocity.dy; - }; - - itemTracked.predictNextPosition = function () { - return { - x: this.x + this.velocity.dx, - y: this.y + this.velocity.dy, - w: this.w, - h: this.h - }; - }; - - itemTracked.isDead = function () { - return this.frameUnmatchedLeftBeforeDying < 0; - }; // Velocity vector based on the last 15 frames - - - itemTracked.updateVelocityVector = function () { - var AVERAGE_NBFRAME = 15; - - if (this.itemHistory.length <= AVERAGE_NBFRAME) { - return computeVelocityVector(this.itemHistory[0], this.itemHistory[this.itemHistory.length - 1], this.itemHistory.length); - } else { - return computeVelocityVector(this.itemHistory[this.itemHistory.length - AVERAGE_NBFRAME], this.itemHistory[this.itemHistory.length - 1], AVERAGE_NBFRAME); - } - }; - - itemTracked.getMostlyMatchedName = function () { - var _this = this; - - var nameMostlyMatchedOccurences = 0; - var nameMostlyMatched = ''; - Object.keys(this.nameCount).map(function (name) { - if (_this.nameCount[name] > nameMostlyMatchedOccurences) { - nameMostlyMatched = name; - nameMostlyMatchedOccurences = _this.nameCount[name]; - } - }); - return nameMostlyMatched; - }; - - itemTracked.toJSONDebug = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - return { - id: this.id, - idDisplay: this.idDisplay, - x: roundInt ? parseInt(this.x, 10) : this.x, - y: roundInt ? parseInt(this.y, 10) : this.y, - w: roundInt ? parseInt(this.w, 10) : this.w, - h: roundInt ? parseInt(this.h, 10) : this.h, - confidence: Math.round(this.confidence * 100) / 100, - // Here we negate dy to be in "normal" carthesian coordinates - bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy)), - name: this.getMostlyMatchedName(), - isZombie: this.isZombie, - appearFrame: this.appearFrame, - disappearFrame: this.disappearFrame - }; - }; - - itemTracked.toJSON = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - return { - id: this.idDisplay, - x: roundInt ? parseInt(this.x, 10) : this.x, - y: roundInt ? parseInt(this.y, 10) : this.y, - w: roundInt ? parseInt(this.w, 10) : this.w, - h: roundInt ? parseInt(this.h, 10) : this.h, - confidence: Math.round(this.confidence * 100) / 100, - // Here we negate dy to be in "normal" carthesian coordinates - bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy), 10), - name: this.getMostlyMatchedName(), - isZombie: this.isZombie - }; - }; - - itemTracked.toMOT = function (frameIndex) { - return "".concat(frameIndex, ",").concat(this.idDisplay, ",").concat(this.x - this.w / 2, ",").concat(this.y - this.h / 2, ",").concat(this.w, ",").concat(this.h, ",").concat(this.confidence / 100, ",-1,-1,-1"); - }; - - itemTracked.toJSONGenericInfo = function () { - return { - id: this.id, - idDisplay: this.idDisplay, - appearFrame: this.appearFrame, - disappearFrame: this.disappearFrame, - disappearArea: this.disappearArea, - nbActiveFrame: this.disappearFrame - this.appearFrame, - name: this.getMostlyMatchedName() - }; - }; - - return itemTracked; -}; - -ItemTracked$1.reset = function () { - idDisplay = 0; -}; - -var kdTreeMin = {}; - -/** - * k-d Tree JavaScript - V 1.01 - * - * https://github.com/ubilabs/kd-tree-javascript - * - * @author Mircea Pricop , 2012 - * @author Martin Kleppe , 2012 - * @author Ubilabs http://ubilabs.net, 2012 - * @license MIT License - */ - -(function (exports) { - !function (t, n) { - n(exports ); - }(commonjsGlobal, function (t) { - function n(t, n, o) { - this.obj = t, this.left = null, this.right = null, this.parent = o, this.dimension = n; - } - - function o(t) { - this.content = [], this.scoreFunction = t; - } - - o.prototype = { - push: function (t) { - this.content.push(t), this.bubbleUp(this.content.length - 1); - }, - pop: function () { - var t = this.content[0], - n = this.content.pop(); - return this.content.length > 0 && (this.content[0] = n, this.sinkDown(0)), t; - }, - peek: function () { - return this.content[0]; - }, - remove: function (t) { - for (var n = this.content.length, o = 0; o < n; o++) if (this.content[o] == t) { - var i = this.content.pop(); - return void (o != n - 1 && (this.content[o] = i, this.scoreFunction(i) < this.scoreFunction(t) ? this.bubbleUp(o) : this.sinkDown(o))); - } - - throw new Error("Node not found."); - }, - size: function () { - return this.content.length; - }, - bubbleUp: function (t) { - for (var n = this.content[t]; t > 0;) { - var o = Math.floor((t + 1) / 2) - 1, - i = this.content[o]; - if (!(this.scoreFunction(n) < this.scoreFunction(i))) break; - this.content[o] = n, this.content[t] = i, t = o; - } - }, - sinkDown: function (t) { - for (var n = this.content.length, o = this.content[t], i = this.scoreFunction(o);;) { - var e = 2 * (t + 1), - r = e - 1, - l = null; - - if (r < n) { - var u = this.content[r], - h = this.scoreFunction(u); - h < i && (l = r); - } - - if (e < n) { - var s = this.content[e]; - this.scoreFunction(s) < (null == l ? i : h) && (l = e); - } - - if (null == l) break; - this.content[t] = this.content[l], this.content[l] = o, t = l; - } - } - }, t.kdTree = function (t, i, e) { - function r(t, o, i) { - var l, - u, - h = o % e.length; - return 0 === t.length ? null : 1 === t.length ? new n(t[0], h, i) : (t.sort(function (t, n) { - return t[e[h]] - n[e[h]]; - }), l = Math.floor(t.length / 2), u = new n(t[l], h, i), u.left = r(t.slice(0, l), o + 1, u), u.right = r(t.slice(l + 1), o + 1, u), u); - } - - var l = this; - Array.isArray(t) ? this.root = r(t, 0, null) : function (t) { - function n(t) { - t.left && (t.left.parent = t, n(t.left)), t.right && (t.right.parent = t, n(t.right)); - } - - l.root = t, n(l.root); - }(t), this.toJSON = function (t) { - t || (t = this.root); - var o = new n(t.obj, t.dimension, null); - return t.left && (o.left = l.toJSON(t.left)), t.right && (o.right = l.toJSON(t.right)), o; - }, this.insert = function (t) { - function o(n, i) { - if (null === n) return i; - var r = e[n.dimension]; - return t[r] < n.obj[r] ? o(n.left, n) : o(n.right, n); - } - - var i, - r, - l = o(this.root, null); - null !== l ? (i = new n(t, (l.dimension + 1) % e.length, l), r = e[l.dimension], t[r] < l.obj[r] ? l.left = i : l.right = i) : this.root = new n(t, 0, null); - }, this.remove = function (t) { - function n(o) { - if (null === o) return null; - if (o.obj === t) return o; - var i = e[o.dimension]; - return t[i] < o.obj[i] ? n(o.left) : n(o.right); - } - - function o(t) { - function n(t, o) { - var i, r, l, u, h; - return null === t ? null : (i = e[o], t.dimension === o ? null !== t.left ? n(t.left, o) : t : (r = t.obj[i], l = n(t.left, o), u = n(t.right, o), h = t, null !== l && l.obj[i] < r && (h = l), null !== u && u.obj[i] < h.obj[i] && (h = u), h)); - } - - var i, r, u; - if (null === t.left && null === t.right) return null === t.parent ? void (l.root = null) : (u = e[t.parent.dimension], void (t.obj[u] < t.parent.obj[u] ? t.parent.left = null : t.parent.right = null)); - null !== t.right ? (r = (i = n(t.right, t.dimension)).obj, o(i), t.obj = r) : (r = (i = n(t.left, t.dimension)).obj, o(i), t.right = t.left, t.left = null, t.obj = r); - } - - var i; - null !== (i = n(l.root)) && o(i); - }, this.nearest = function (t, n, r) { - function u(o) { - function r(t, o) { - f.push([t, o]), f.size() > n && f.pop(); - } - - var l, - h, - s, - c, - a = e[o.dimension], - g = i(t, o.obj), - p = {}; - - for (c = 0; c < e.length; c += 1) c === o.dimension ? p[e[c]] = t[e[c]] : p[e[c]] = o.obj[e[c]]; - - h = i(p, o.obj), null !== o.right || null !== o.left ? (u(l = null === o.right ? o.left : null === o.left ? o.right : t[a] < o.obj[a] ? o.left : o.right), (f.size() < n || g < f.peek()[1]) && r(o, g), (f.size() < n || Math.abs(h) < f.peek()[1]) && null !== (s = l === o.left ? o.right : o.left) && u(s)) : (f.size() < n || g < f.peek()[1]) && r(o, g); - } - - var h, s, f; - if (f = new o(function (t) { - return -t[1]; - }), r) for (h = 0; h < n; h += 1) f.push([null, r]); - - for (l.root && u(l.root), s = [], h = 0; h < Math.min(n, f.content.length); h += 1) f.content[h][0] && s.push([f.content[h][0].obj, f.content[h][1]]); - - return s; - }, this.balanceFactor = function () { - function t(n) { - return null === n ? 0 : Math.max(t(n.left), t(n.right)) + 1; - } - - function n(t) { - return null === t ? 0 : n(t.left) + n(t.right) + 1; - } - - return t(l.root) / (Math.log(n(l.root)) / Math.log(2)); - }; - }, t.BinaryHeap = o; - }); -})(kdTreeMin); - -var lodash_isequal = {exports: {}}; - -/** - * Lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright JS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -(function (module, exports) { - /** Used as the size to enable large array optimizations. */ - var LARGE_ARRAY_SIZE = 200; - /** Used to stand-in for `undefined` hash values. */ - - var HASH_UNDEFINED = '__lodash_hash_undefined__'; - /** Used to compose bitmasks for value comparisons. */ - - var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - /** Used as references for various `Number` constants. */ - - var MAX_SAFE_INTEGER = 9007199254740991; - /** `Object#toString` result references. */ - - var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - asyncTag = '[object AsyncFunction]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - mapTag = '[object Map]', - numberTag = '[object Number]', - nullTag = '[object Null]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - proxyTag = '[object Proxy]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]', - undefinedTag = '[object Undefined]', - weakMapTag = '[object WeakMap]'; - var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - /** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ - - var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - /** Used to detect host constructors (Safari). */ - - var reIsHostCtor = /^\[object .+?Constructor\]$/; - /** Used to detect unsigned integer values. */ - - var reIsUint = /^(?:0|[1-9]\d*)$/; - /** Used to identify `toStringTag` values of typed arrays. */ - - var typedArrayTags = {}; - typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; - typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; - /** Detect free variable `global` from Node.js. */ - - var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; - /** Detect free variable `self`. */ - - var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - /** Used as a reference to the global object. */ - - var root = freeGlobal || freeSelf || Function('return this')(); - /** Detect free variable `exports`. */ - - var freeExports = exports && !exports.nodeType && exports; - /** Detect free variable `module`. */ - - var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; - /** Detect the popular CommonJS extension `module.exports`. */ - - var moduleExports = freeModule && freeModule.exports === freeExports; - /** Detect free variable `process` from Node.js. */ - - var freeProcess = moduleExports && freeGlobal.process; - /** Used to access faster Node.js helpers. */ - - var nodeUtil = function () { - try { - return freeProcess && freeProcess.binding && freeProcess.binding('util'); - } catch (e) {} - }(); - /* Node.js helper references. */ - - - var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; - /** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ - - function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - - if (predicate(value, index, array)) { - result[resIndex++] = value; - } - } - - return result; - } - /** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ - - - function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - - while (++index < length) { - array[offset + index] = values[index]; - } - - return array; - } - /** - * A specialized version of `_.some` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ - - - function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - - return false; - } - /** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ - - - function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - - return result; - } - /** - * The base implementation of `_.unary` without support for storing metadata. - * - * @private - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. - */ - - - function baseUnary(func) { - return function (value) { - return func(value); - }; - } - /** - * Checks if a `cache` value for `key` exists. - * - * @private - * @param {Object} cache The cache to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - - - function cacheHas(cache, key) { - return cache.has(key); - } - /** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ - - - function getValue(object, key) { - return object == null ? undefined : object[key]; - } - /** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. - */ - - - function mapToArray(map) { - var index = -1, - result = Array(map.size); - map.forEach(function (value, key) { - result[++index] = [key, value]; - }); - return result; - } - /** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ - - - function overArg(func, transform) { - return function (arg) { - return func(transform(arg)); - }; - } - /** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ - - - function setToArray(set) { - var index = -1, - result = Array(set.size); - set.forEach(function (value) { - result[++index] = value; - }); - return result; - } - /** Used for built-in method references. */ - - - var arrayProto = Array.prototype, - funcProto = Function.prototype, - objectProto = Object.prototype; - /** Used to detect overreaching core-js shims. */ - - var coreJsData = root['__core-js_shared__']; - /** Used to resolve the decompiled source of functions. */ - - var funcToString = funcProto.toString; - /** Used to check objects for own properties. */ - - var hasOwnProperty = objectProto.hasOwnProperty; - /** Used to detect methods masquerading as native. */ - - var maskSrcKey = function () { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? 'Symbol(src)_1.' + uid : ''; - }(); - /** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ - - - var nativeObjectToString = objectProto.toString; - /** Used to detect if a method is native. */ - - var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); - /** Built-in value references. */ - - var Buffer = moduleExports ? root.Buffer : undefined, - Symbol = root.Symbol, - Uint8Array = root.Uint8Array, - propertyIsEnumerable = objectProto.propertyIsEnumerable, - splice = arrayProto.splice, - symToStringTag = Symbol ? Symbol.toStringTag : undefined; - /* Built-in method references for those with the same name as other `lodash` methods. */ - - var nativeGetSymbols = Object.getOwnPropertySymbols, - nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, - nativeKeys = overArg(Object.keys, Object); - /* Built-in method references that are verified to be native. */ - - var DataView = getNative(root, 'DataView'), - Map = getNative(root, 'Map'), - Promise = getNative(root, 'Promise'), - Set = getNative(root, 'Set'), - WeakMap = getNative(root, 'WeakMap'), - nativeCreate = getNative(Object, 'create'); - /** Used to detect maps, sets, and weakmaps. */ - - var dataViewCtorString = toSource(DataView), - mapCtorString = toSource(Map), - promiseCtorString = toSource(Promise), - setCtorString = toSource(Set), - weakMapCtorString = toSource(WeakMap); - /** Used to convert symbols to primitives and strings. */ - - var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - /** - * Creates a hash object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - - function Hash(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - this.clear(); - - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } - /** - * Removes all key-value entries from the hash. - * - * @private - * @name clear - * @memberOf Hash - */ - - - function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; - this.size = 0; - } - /** - * Removes `key` and its value from the hash. - * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - - - function hashDelete(key) { - var result = this.has(key) && delete this.__data__[key]; - this.size -= result ? 1 : 0; - return result; - } - /** - * Gets the hash value for `key`. - * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - - - function hashGet(key) { - var data = this.__data__; - - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; - } - - return hasOwnProperty.call(data, key) ? data[key] : undefined; - } - /** - * Checks if a hash value for `key` exists. - * - * @private - * @name has - * @memberOf Hash - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - - - function hashHas(key) { - var data = this.__data__; - return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); - } - /** - * Sets the hash `key` to `value`. - * - * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. - */ - - - function hashSet(key, value) { - var data = this.__data__; - this.size += this.has(key) ? 0 : 1; - data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value; - return this; - } // Add methods to `Hash`. - - - Hash.prototype.clear = hashClear; - Hash.prototype['delete'] = hashDelete; - Hash.prototype.get = hashGet; - Hash.prototype.has = hashHas; - Hash.prototype.set = hashSet; - /** - * Creates an list cache object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - - function ListCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - this.clear(); - - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } - /** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ - - - function listCacheClear() { - this.__data__ = []; - this.size = 0; - } - /** - * Removes `key` and its value from the list cache. - * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - - - function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - return false; - } - - var lastIndex = data.length - 1; - - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - - --this.size; - return true; - } - /** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - - - function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - return index < 0 ? undefined : data[index][1]; - } - /** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - - - function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; - } - /** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ - - - function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - ++this.size; - data.push([key, value]); - } else { - data[index][1] = value; - } - - return this; - } // Add methods to `ListCache`. - - - ListCache.prototype.clear = listCacheClear; - ListCache.prototype['delete'] = listCacheDelete; - ListCache.prototype.get = listCacheGet; - ListCache.prototype.has = listCacheHas; - ListCache.prototype.set = listCacheSet; - /** - * Creates a map cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - - function MapCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - this.clear(); - - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } - /** - * Removes all key-value entries from the map. - * - * @private - * @name clear - * @memberOf MapCache - */ - - - function mapCacheClear() { - this.size = 0; - this.__data__ = { - 'hash': new Hash(), - 'map': new (Map || ListCache)(), - 'string': new Hash() - }; - } - /** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - - - function mapCacheDelete(key) { - var result = getMapData(this, key)['delete'](key); - this.size -= result ? 1 : 0; - return result; - } - /** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - - - function mapCacheGet(key) { - return getMapData(this, key).get(key); - } - /** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - - - function mapCacheHas(key) { - return getMapData(this, key).has(key); - } - /** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ - - - function mapCacheSet(key, value) { - var data = getMapData(this, key), - size = data.size; - data.set(key, value); - this.size += data.size == size ? 0 : 1; - return this; - } // Add methods to `MapCache`. - - - MapCache.prototype.clear = mapCacheClear; - MapCache.prototype['delete'] = mapCacheDelete; - MapCache.prototype.get = mapCacheGet; - MapCache.prototype.has = mapCacheHas; - MapCache.prototype.set = mapCacheSet; - /** - * - * Creates an array cache object to store unique values. - * - * @private - * @constructor - * @param {Array} [values] The values to cache. - */ - - function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; - this.__data__ = new MapCache(); - - while (++index < length) { - this.add(values[index]); - } - } - /** - * Adds `value` to the array cache. - * - * @private - * @name add - * @memberOf SetCache - * @alias push - * @param {*} value The value to cache. - * @returns {Object} Returns the cache instance. - */ - - - function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - - return this; - } - /** - * Checks if `value` is in the array cache. - * - * @private - * @name has - * @memberOf SetCache - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. - */ - - - function setCacheHas(value) { - return this.__data__.has(value); - } // Add methods to `SetCache`. - - - SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; - SetCache.prototype.has = setCacheHas; - /** - * Creates a stack cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - - function Stack(entries) { - var data = this.__data__ = new ListCache(entries); - this.size = data.size; - } - /** - * Removes all key-value entries from the stack. - * - * @private - * @name clear - * @memberOf Stack - */ - - - function stackClear() { - this.__data__ = new ListCache(); - this.size = 0; - } - /** - * Removes `key` and its value from the stack. - * - * @private - * @name delete - * @memberOf Stack - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - - - function stackDelete(key) { - var data = this.__data__, - result = data['delete'](key); - this.size = data.size; - return result; - } - /** - * Gets the stack value for `key`. - * - * @private - * @name get - * @memberOf Stack - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - - - function stackGet(key) { - return this.__data__.get(key); - } - /** - * Checks if a stack value for `key` exists. - * - * @private - * @name has - * @memberOf Stack - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - - - function stackHas(key) { - return this.__data__.has(key); - } - /** - * Sets the stack `key` to `value`. - * - * @private - * @name set - * @memberOf Stack - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the stack cache instance. - */ - - - function stackSet(key, value) { - var data = this.__data__; - - if (data instanceof ListCache) { - var pairs = data.__data__; - - if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) { - pairs.push([key, value]); - this.size = ++data.size; - return this; - } - - data = this.__data__ = new MapCache(pairs); - } - - data.set(key, value); - this.size = data.size; - return this; - } // Add methods to `Stack`. - - - Stack.prototype.clear = stackClear; - Stack.prototype['delete'] = stackDelete; - Stack.prototype.get = stackGet; - Stack.prototype.has = stackHas; - Stack.prototype.set = stackSet; - /** - * Creates an array of the enumerable property names of the array-like `value`. - * - * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. - */ - - function arrayLikeKeys(value, inherited) { - var isArr = isArray(value), - isArg = !isArr && isArguments(value), - isBuff = !isArr && !isArg && isBuffer(value), - isType = !isArr && !isArg && !isBuff && isTypedArray(value), - skipIndexes = isArr || isArg || isBuff || isType, - result = skipIndexes ? baseTimes(value.length, String) : [], - length = result.length; - - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. - key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. - isBuff && (key == 'offset' || key == 'parent') || // PhantomJS 2 has enumerable non-index properties on typed arrays. - isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || // Skip index properties. - isIndex(key, length)))) { - result.push(key); - } - } - - return result; - } - /** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - - - function assocIndexOf(array, key) { - var length = array.length; - - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - - return -1; - } - /** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. - */ - - - function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); - } - /** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ - - - function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - - return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); - } - /** - * The base implementation of `_.isArguments`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - */ - - - function baseIsArguments(value) { - return isObjectLike(value) && baseGetTag(value) == argsTag; - } - /** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ - - - function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - - if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) { - return value !== value && other !== other; - } - - return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); - } - /** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - - - function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = objIsArr ? arrayTag : getTag(object), - othTag = othIsArr ? arrayTag : getTag(other); - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - - if (isSameTag && isBuffer(object)) { - if (!isBuffer(other)) { - return false; - } - - objIsArr = true; - objIsObj = false; - } - - if (isSameTag && !objIsObj) { - stack || (stack = new Stack()); - return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); - } - - if (!(bitmask & COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; - stack || (stack = new Stack()); - return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); - } - } - - if (!isSameTag) { - return false; - } - - stack || (stack = new Stack()); - return equalObjects(object, other, bitmask, customizer, equalFunc, stack); - } - /** - * The base implementation of `_.isNative` without bad shim checks. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - */ - - - function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - - var pattern = isFunction(value) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); - } - /** - * The base implementation of `_.isTypedArray` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - */ - - - function baseIsTypedArray(value) { - return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; - } - /** - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ - - - function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); - } - - var result = []; - - for (var key in Object(object)) { - if (hasOwnProperty.call(object, key) && key != 'constructor') { - result.push(key); - } - } - - return result; - } - /** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ - - - function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } // Assume cyclic values are equal. - - - var stacked = stack.get(array); - - if (stacked && stack.get(other)) { - return stacked == other; - } - - var index = -1, - result = true, - seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined; - stack.set(array, other); - stack.set(other, array); // Ignore non-index properties. - - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; - - if (customizer) { - var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); - } - - if (compared !== undefined) { - if (compared) { - continue; - } - - result = false; - break; - } // Recursively compare arrays (susceptible to call stack limits). - - - if (seen) { - if (!arraySome(other, function (othValue, othIndex) { - if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; - } - } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - result = false; - break; - } - } - - stack['delete'](array); - stack['delete'](other); - return result; - } - /** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - - - function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - case dataViewTag: - if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { - return false; - } - - object = object.buffer; - other = other.buffer; - - case arrayBufferTag: - if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { - return false; - } - - return true; - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return eq(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == other + ''; - - case mapTag: - var convert = mapToArray; - - case setTag: - var isPartial = bitmask & COMPARE_PARTIAL_FLAG; - convert || (convert = setToArray); - - if (object.size != other.size && !isPartial) { - return false; - } // Assume cyclic values are equal. - - - var stacked = stack.get(object); - - if (stacked) { - return stacked == other; - } - - bitmask |= COMPARE_UNORDERED_FLAG; // Recursively compare objects (susceptible to call stack limits). - - stack.set(object, other); - var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); - return result; - - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } - - } - - return false; - } - /** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - - - function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - objProps = getAllKeys(object), - objLength = objProps.length, - othProps = getAllKeys(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - - var index = objLength; - - while (index--) { - var key = objProps[index]; - - if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } // Assume cyclic values are equal. - - - var stacked = stack.get(object); - - if (stacked && stack.get(other)) { - return stacked == other; - } - - var result = true; - stack.set(object, other); - stack.set(other, object); - var skipCtor = isPartial; - - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - if (customizer) { - var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); - } // Recursively compare objects (susceptible to call stack limits). - - - if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { - result = false; - break; - } - - skipCtor || (skipCtor = key == 'constructor'); - } - - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. - - if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } - } - - stack['delete'](object); - stack['delete'](other); - return result; - } - /** - * Creates an array of own enumerable property names and symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ - - - function getAllKeys(object) { - return baseGetAllKeys(object, keys, getSymbols); - } - /** - * Gets the data for `map`. - * - * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. - */ - - - function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; - } - /** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ - - - function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; - } - /** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ - - - function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; - - try { - value[symToStringTag] = undefined; - var unmasked = true; - } catch (e) {} - - var result = nativeObjectToString.call(value); - - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; - } - } - - return result; - } - /** - * Creates an array of the own enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ - - - var getSymbols = !nativeGetSymbols ? stubArray : function (object) { - if (object == null) { - return []; - } - - object = Object(object); - return arrayFilter(nativeGetSymbols(object), function (symbol) { - return propertyIsEnumerable.call(object, symbol); - }); - }; - /** - * Gets the `toStringTag` of `value`. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ - - var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. - - if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) { - getTag = function (value) { - var result = baseGetTag(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : ''; - - if (ctorString) { - switch (ctorString) { - case dataViewCtorString: - return dataViewTag; - - case mapCtorString: - return mapTag; - - case promiseCtorString: - return promiseTag; - - case setCtorString: - return setTag; - - case weakMapCtorString: - return weakMapTag; - } - } - - return result; - }; - } - /** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ - - - function isIndex(value, length) { - length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length; - } - /** - * Checks if `value` is suitable for use as unique object key. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. - */ - - - function isKeyable(value) { - var type = typeof value; - return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null; - } - /** - * Checks if `func` has its source masked. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. - */ - - - function isMasked(func) { - return !!maskSrcKey && maskSrcKey in func; - } - /** - * Checks if `value` is likely a prototype object. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. - */ - - - function isPrototype(value) { - var Ctor = value && value.constructor, - proto = typeof Ctor == 'function' && Ctor.prototype || objectProto; - return value === proto; - } - /** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ - - - function objectToString(value) { - return nativeObjectToString.call(value); - } - /** - * Converts `func` to its source code. - * - * @private - * @param {Function} func The function to convert. - * @returns {string} Returns the source code. - */ - - - function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - - try { - return func + ''; - } catch (e) {} - } - - return ''; - } - /** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ - - - function eq(value, other) { - return value === other || value !== value && other !== other; - } - /** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ - - - var isArguments = baseIsArguments(function () { - return arguments; - }()) ? baseIsArguments : function (value) { - return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); - }; - /** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ - - var isArray = Array.isArray; - /** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ - - function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); - } - /** - * Checks if `value` is a buffer. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. - * @example - * - * _.isBuffer(new Buffer(2)); - * // => true - * - * _.isBuffer(new Uint8Array(2)); - * // => false - */ - - - var isBuffer = nativeIsBuffer || stubFalse; - /** - * Performs a deep comparison between two values to determine if they are - * equivalent. - * - * **Note:** This method supports comparing arrays, array buffers, booleans, - * date objects, error objects, maps, numbers, `Object` objects, regexes, - * sets, strings, symbols, and typed arrays. `Object` objects are compared - * by their own, not inherited, enumerable properties. Functions and DOM - * nodes are compared by strict equality, i.e. `===`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.isEqual(object, other); - * // => true - * - * object === other; - * // => false - */ - - function isEqual(value, other) { - return baseIsEqual(value, other); - } - /** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ - - - function isFunction(value) { - if (!isObject(value)) { - return false; - } // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 9 which returns 'object' for typed arrays and other constructors. - - - var tag = baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; - } - /** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ - - - function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; - } - /** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ - - - function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); - } - /** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ - - - function isObjectLike(value) { - return value != null && typeof value == 'object'; - } - /** - * Checks if `value` is classified as a typed array. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - * @example - * - * _.isTypedArray(new Uint8Array); - * // => true - * - * _.isTypedArray([]); - * // => false - */ - - - var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; - /** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ - - function keys(object) { - return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); - } - /** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ - - - function stubArray() { - return []; - } - /** - * This method returns `false`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `false`. - * @example - * - * _.times(2, _.stubFalse); - * // => [false, false] - */ - - - function stubFalse() { - return false; - } - - module.exports = isEqual; -})(lodash_isequal, lodash_isequal.exports); - -var munkres$1 = {exports: {}}; - -/** - * Introduction - * ============ - * - * The Munkres module provides an implementation of the Munkres algorithm - * (also called the Hungarian algorithm or the Kuhn-Munkres algorithm), - * useful for solving the Assignment Problem. - * - * Assignment Problem - * ================== - * - * Let C be an n×n-matrix representing the costs of each of n workers - * to perform any of n jobs. The assignment problem is to assign jobs to - * workers in a way that minimizes the total cost. Since each worker can perform - * only one job and each job can be assigned to only one worker the assignments - * represent an independent set of the matrix C. - * - * One way to generate the optimal set is to create all permutations of - * the indices necessary to traverse the matrix so that no row and column - * are used more than once. For instance, given this matrix (expressed in - * Python) - * - * matrix = [[5, 9, 1], - * [10, 3, 2], - * [8, 7, 4]] - * - * You could use this code to generate the traversal indices:: - * - * def permute(a, results): - * if len(a) == 1: - * results.insert(len(results), a) - * - * else: - * for i in range(0, len(a)): - * element = a[i] - * a_copy = [a[j] for j in range(0, len(a)) if j != i] - * subresults = [] - * permute(a_copy, subresults) - * for subresult in subresults: - * result = [element] + subresult - * results.insert(len(results), result) - * - * results = [] - * permute(range(len(matrix)), results) # [0, 1, 2] for a 3x3 matrix - * - * After the call to permute(), the results matrix would look like this:: - * - * [[0, 1, 2], - * [0, 2, 1], - * [1, 0, 2], - * [1, 2, 0], - * [2, 0, 1], - * [2, 1, 0]] - * - * You could then use that index matrix to loop over the original cost matrix - * and calculate the smallest cost of the combinations - * - * n = len(matrix) - * minval = sys.maxsize - * for row in range(n): - * cost = 0 - * for col in range(n): - * cost += matrix[row][col] - * minval = min(cost, minval) - * - * print minval - * - * While this approach works fine for small matrices, it does not scale. It - * executes in O(n!) time: Calculating the permutations for an n×x-matrix - * requires n! operations. For a 12×12 matrix, that’s 479,001,600 - * traversals. Even if you could manage to perform each traversal in just one - * millisecond, it would still take more than 133 hours to perform the entire - * traversal. A 20×20 matrix would take 2,432,902,008,176,640,000 operations. At - * an optimistic millisecond per operation, that’s more than 77 million years. - * - * The Munkres algorithm runs in O(n³) time, rather than O(n!). This - * package provides an implementation of that algorithm. - * - * This version is based on - * http://csclab.murraystate.edu/~bob.pilgrim/445/munkres.html - * - * This version was originally written for Python by Brian Clapper from the - * algorithm at the above web site (The ``Algorithm::Munkres`` Perl version, - * in CPAN, was clearly adapted from the same web site.) and ported to - * JavaScript by Anna Henningsen (addaleax). - * - * Usage - * ===== - * - * Construct a Munkres object - * - * var m = new Munkres(); - * - * Then use it to compute the lowest cost assignment from a cost matrix. Here’s - * a sample program - * - * var matrix = [[5, 9, 1], - * [10, 3, 2], - * [8, 7, 4]]; - * var m = new Munkres(); - * var indices = m.compute(matrix); - * console.log(format_matrix(matrix), 'Lowest cost through this matrix:'); - * var total = 0; - * for (var i = 0; i < indices.length; ++i) { - * var row = indices[l][0], col = indices[l][1]; - * var value = matrix[row][col]; - * total += value; - * - * console.log('(' + rol + ', ' + col + ') -> ' + value); - * } - * - * console.log('total cost:', total); - * - * Running that program produces:: - * - * Lowest cost through this matrix: - * [5, 9, 1] - * [10, 3, 2] - * [8, 7, 4] - * (0, 0) -> 5 - * (1, 1) -> 3 - * (2, 2) -> 4 - * total cost: 12 - * - * The instantiated Munkres object can be used multiple times on different - * matrices. - * - * Non-square Cost Matrices - * ======================== - * - * The Munkres algorithm assumes that the cost matrix is square. However, it's - * possible to use a rectangular matrix if you first pad it with 0 values to make - * it square. This module automatically pads rectangular cost matrices to make - * them square. - * - * Notes: - * - * - The module operates on a *copy* of the caller's matrix, so any padding will - * not be seen by the caller. - * - The cost matrix must be rectangular or square. An irregular matrix will - * *not* work. - * - * Calculating Profit, Rather than Cost - * ==================================== - * - * The cost matrix is just that: A cost matrix. The Munkres algorithm finds - * the combination of elements (one from each row and column) that results in - * the smallest cost. It’s also possible to use the algorithm to maximize - * profit. To do that, however, you have to convert your profit matrix to a - * cost matrix. The simplest way to do that is to subtract all elements from a - * large value. - * - * The ``munkres`` module provides a convenience method for creating a cost - * matrix from a profit matrix, i.e. make_cost_matrix. - * - * References - * ========== - * - * 1. http://www.public.iastate.edu/~ddoty/HungarianAlgorithm.html - * - * 2. Harold W. Kuhn. The Hungarian Method for the assignment problem. - * *Naval Research Logistics Quarterly*, 2:83-97, 1955. - * - * 3. Harold W. Kuhn. Variants of the Hungarian method for assignment - * problems. *Naval Research Logistics Quarterly*, 3: 253-258, 1956. - * - * 4. Munkres, J. Algorithms for the Assignment and Transportation Problems. - * *Journal of the Society of Industrial and Applied Mathematics*, - * 5(1):32-38, March, 1957. - * - * 5. https://en.wikipedia.org/wiki/Hungarian_algorithm - * - * Copyright and License - * ===================== - * - * Copyright 2008-2016 Brian M. Clapper - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function (module) { - /** - * A very large numerical value which can be used like an integer - * (i. e., adding integers of similar size does not result in overflow). - */ - var MAX_SIZE = parseInt(Number.MAX_SAFE_INTEGER / 2) || (1 << 26) * (1 << 26); - /** - * A default value to pad the cost matrix with if it is not quadratic. - */ - - var DEFAULT_PAD_VALUE = 0; // --------------------------------------------------------------------------- - // Classes - // --------------------------------------------------------------------------- - - /** - * Calculate the Munkres solution to the classical assignment problem. - * See the module documentation for usage. - * @constructor - */ - - function Munkres() { - this.C = null; - this.row_covered = []; - this.col_covered = []; - this.n = 0; - this.Z0_r = 0; - this.Z0_c = 0; - this.marked = null; - this.path = null; - } - /** - * Pad a possibly non-square matrix to make it square. - * - * @param {Array} matrix An array of arrays containing the matrix cells - * @param {Number} [pad_value] The value used to pad a rectangular matrix - * - * @return {Array} An array of arrays representing the padded matrix - */ - - - Munkres.prototype.pad_matrix = function (matrix, pad_value) { - pad_value = pad_value || DEFAULT_PAD_VALUE; - var max_columns = 0; - var total_rows = matrix.length; - var i; - - for (i = 0; i < total_rows; ++i) if (matrix[i].length > max_columns) max_columns = matrix[i].length; - - total_rows = max_columns > total_rows ? max_columns : total_rows; - var new_matrix = []; - - for (i = 0; i < total_rows; ++i) { - var row = matrix[i] || []; - var new_row = row.slice(); // If this row is too short, pad it - - while (total_rows > new_row.length) new_row.push(pad_value); - - new_matrix.push(new_row); - } - - return new_matrix; - }; - /** - * Compute the indices for the lowest-cost pairings between rows and columns - * in the database. Returns a list of (row, column) tuples that can be used - * to traverse the matrix. - * - * **WARNING**: This code handles square and rectangular matrices. - * It does *not* handle irregular matrices. - * - * @param {Array} cost_matrix The cost matrix. If this cost matrix is not square, - * it will be padded with DEFAULT_PAD_VALUE. Optionally, - * the pad value can be specified via options.padValue. - * This method does *not* modify the caller's matrix. - * It operates on a copy of the matrix. - * @param {Object} [options] Additional options to pass in - * @param {Number} [options.padValue] The value to use to pad a rectangular cost_matrix - * - * @return {Array} An array of ``(row, column)`` arrays that describe the lowest - * cost path through the matrix - */ - - - Munkres.prototype.compute = function (cost_matrix, options) { - options = options || {}; - options.padValue = options.padValue || DEFAULT_PAD_VALUE; - this.C = this.pad_matrix(cost_matrix, options.padValue); - this.n = this.C.length; - this.original_length = cost_matrix.length; - this.original_width = cost_matrix[0].length; - var nfalseArray = []; - /* array of n false values */ - - while (nfalseArray.length < this.n) nfalseArray.push(false); - - this.row_covered = nfalseArray.slice(); - this.col_covered = nfalseArray.slice(); - this.Z0_r = 0; - this.Z0_c = 0; - this.path = this.__make_matrix(this.n * 2, 0); - this.marked = this.__make_matrix(this.n, 0); - var step = 1; - var steps = { - 1: this.__step1, - 2: this.__step2, - 3: this.__step3, - 4: this.__step4, - 5: this.__step5, - 6: this.__step6 - }; - - while (true) { - var func = steps[step]; - if (!func) // done - break; - step = func.apply(this); - } - - var results = []; - - for (var i = 0; i < this.original_length; ++i) for (var j = 0; j < this.original_width; ++j) if (this.marked[i][j] == 1) results.push([i, j]); - - return results; - }; - /** - * Create an n×n matrix, populating it with the specific value. - * - * @param {Number} n Matrix dimensions - * @param {Number} val Value to populate the matrix with - * - * @return {Array} An array of arrays representing the newly created matrix - */ - - - Munkres.prototype.__make_matrix = function (n, val) { - var matrix = []; - - for (var i = 0; i < n; ++i) { - matrix[i] = []; - - for (var j = 0; j < n; ++j) matrix[i][j] = val; - } - - return matrix; - }; - /** - * For each row of the matrix, find the smallest element and - * subtract it from every element in its row. Go to Step 2. - */ - - - Munkres.prototype.__step1 = function () { - for (var i = 0; i < this.n; ++i) { - // Find the minimum value for this row and subtract that minimum - // from every element in the row. - var minval = Math.min.apply(Math, this.C[i]); - - for (var j = 0; j < this.n; ++j) this.C[i][j] -= minval; - } - - return 2; - }; - /** - * Find a zero (Z) in the resulting matrix. If there is no starred - * zero in its row or column, star Z. Repeat for each element in the - * matrix. Go to Step 3. - */ - - - Munkres.prototype.__step2 = function () { - for (var i = 0; i < this.n; ++i) { - for (var j = 0; j < this.n; ++j) { - if (this.C[i][j] === 0 && !this.col_covered[j] && !this.row_covered[i]) { - this.marked[i][j] = 1; - this.col_covered[j] = true; - this.row_covered[i] = true; - break; - } - } - } - - this.__clear_covers(); - - return 3; - }; - /** - * Cover each column containing a starred zero. If K columns are - * covered, the starred zeros describe a complete set of unique - * assignments. In this case, Go to DONE, otherwise, Go to Step 4. - */ - - - Munkres.prototype.__step3 = function () { - var count = 0; - - for (var i = 0; i < this.n; ++i) { - for (var j = 0; j < this.n; ++j) { - if (this.marked[i][j] == 1 && this.col_covered[j] == false) { - this.col_covered[j] = true; - ++count; - } - } - } - - return count >= this.n ? 7 : 4; - }; - /** - * Find a noncovered zero and prime it. If there is no starred zero - * in the row containing this primed zero, Go to Step 5. Otherwise, - * cover this row and uncover the column containing the starred - * zero. Continue in this manner until there are no uncovered zeros - * left. Save the smallest uncovered value and Go to Step 6. - */ - - - Munkres.prototype.__step4 = function () { - var done = false; - var row = -1, - col = -1, - star_col = -1; - - while (!done) { - var z = this.__find_a_zero(); - - row = z[0]; - col = z[1]; - if (row < 0) return 6; - this.marked[row][col] = 2; - star_col = this.__find_star_in_row(row); - - if (star_col >= 0) { - col = star_col; - this.row_covered[row] = true; - this.col_covered[col] = false; - } else { - this.Z0_r = row; - this.Z0_c = col; - return 5; - } - } - }; - /** - * Construct a series of alternating primed and starred zeros as - * follows. Let Z0 represent the uncovered primed zero found in Step 4. - * Let Z1 denote the starred zero in the column of Z0 (if any). - * Let Z2 denote the primed zero in the row of Z1 (there will always - * be one). Continue until the series terminates at a primed zero - * that has no starred zero in its column. Unstar each starred zero - * of the series, star each primed zero of the series, erase all - * primes and uncover every line in the matrix. Return to Step 3 - */ - - - Munkres.prototype.__step5 = function () { - var count = 0; - this.path[count][0] = this.Z0_r; - this.path[count][1] = this.Z0_c; - var done = false; - - while (!done) { - var row = this.__find_star_in_col(this.path[count][1]); - - if (row >= 0) { - count++; - this.path[count][0] = row; - this.path[count][1] = this.path[count - 1][1]; - } else { - done = true; - } - - if (!done) { - var col = this.__find_prime_in_row(this.path[count][0]); - - count++; - this.path[count][0] = this.path[count - 1][0]; - this.path[count][1] = col; - } - } - - this.__convert_path(this.path, count); - - this.__clear_covers(); - - this.__erase_primes(); - - return 3; - }; - /** - * Add the value found in Step 4 to every element of each covered - * row, and subtract it from every element of each uncovered column. - * Return to Step 4 without altering any stars, primes, or covered - * lines. - */ - - - Munkres.prototype.__step6 = function () { - var minval = this.__find_smallest(); - - for (var i = 0; i < this.n; ++i) { - for (var j = 0; j < this.n; ++j) { - if (this.row_covered[i]) this.C[i][j] += minval; - if (!this.col_covered[j]) this.C[i][j] -= minval; - } - } - - return 4; - }; - /** - * Find the smallest uncovered value in the matrix. - * - * @return {Number} The smallest uncovered value, or MAX_SIZE if no value was found - */ - - - Munkres.prototype.__find_smallest = function () { - var minval = MAX_SIZE; - - for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (!this.row_covered[i] && !this.col_covered[j]) if (minval > this.C[i][j]) minval = this.C[i][j]; - - return minval; - }; - /** - * Find the first uncovered element with value 0. - * - * @return {Array} The indices of the found element or [-1, -1] if not found - */ - - - Munkres.prototype.__find_a_zero = function () { - for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.C[i][j] === 0 && !this.row_covered[i] && !this.col_covered[j]) return [i, j]; - - return [-1, -1]; - }; - /** - * Find the first starred element in the specified row. Returns - * the column index, or -1 if no starred element was found. - * - * @param {Number} row The index of the row to search - * @return {Number} - */ - - - Munkres.prototype.__find_star_in_row = function (row) { - for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 1) return j; - - return -1; - }; - /** - * Find the first starred element in the specified column. - * - * @return {Number} The row index, or -1 if no starred element was found - */ - - - Munkres.prototype.__find_star_in_col = function (col) { - for (var i = 0; i < this.n; ++i) if (this.marked[i][col] == 1) return i; - - return -1; - }; - /** - * Find the first prime element in the specified row. - * - * @return {Number} The column index, or -1 if no prime element was found - */ - - - Munkres.prototype.__find_prime_in_row = function (row) { - for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 2) return j; - - return -1; - }; - - Munkres.prototype.__convert_path = function (path, count) { - for (var i = 0; i <= count; ++i) this.marked[path[i][0]][path[i][1]] = this.marked[path[i][0]][path[i][1]] == 1 ? 0 : 1; - }; - /** Clear all covered matrix cells */ - - - Munkres.prototype.__clear_covers = function () { - for (var i = 0; i < this.n; ++i) { - this.row_covered[i] = false; - this.col_covered[i] = false; - } - }; - /** Erase all prime markings */ - - - Munkres.prototype.__erase_primes = function () { - for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.marked[i][j] == 2) this.marked[i][j] = 0; - }; // --------------------------------------------------------------------------- - // Functions - // --------------------------------------------------------------------------- - - /** - * Create a cost matrix from a profit matrix by calling - * 'inversion_function' to invert each value. The inversion - * function must take one numeric argument (of any type) and return - * another numeric argument which is presumed to be the cost inverse - * of the original profit. - * - * This is a static method. Call it like this: - * - * cost_matrix = make_cost_matrix(matrix[, inversion_func]); - * - * For example: - * - * cost_matrix = make_cost_matrix(matrix, function(x) { return MAXIMUM - x; }); - * - * @param {Array} profit_matrix An array of arrays representing the matrix - * to convert from a profit to a cost matrix - * @param {Function} [inversion_function] The function to use to invert each - * entry in the profit matrix - * - * @return {Array} The converted matrix - */ - - - function make_cost_matrix(profit_matrix, inversion_function) { - var i, j; - - if (!inversion_function) { - var maximum = -1.0 / 0.0; - - for (i = 0; i < profit_matrix.length; ++i) for (j = 0; j < profit_matrix[i].length; ++j) if (profit_matrix[i][j] > maximum) maximum = profit_matrix[i][j]; - - inversion_function = function (x) { - return maximum - x; - }; - } - - var cost_matrix = []; - - for (i = 0; i < profit_matrix.length; ++i) { - var row = profit_matrix[i]; - cost_matrix[i] = []; - - for (j = 0; j < row.length; ++j) cost_matrix[i][j] = inversion_function(profit_matrix[i][j]); - } - - return cost_matrix; - } - /** - * Convenience function: Converts the contents of a matrix of integers - * to a printable string. - * - * @param {Array} matrix The matrix to print - * - * @return {String} The formatted matrix - */ - - - function format_matrix(matrix) { - var columnWidths = []; - var i, j; - - for (i = 0; i < matrix.length; ++i) { - for (j = 0; j < matrix[i].length; ++j) { - var entryWidth = String(matrix[i][j]).length; - if (!columnWidths[j] || entryWidth >= columnWidths[j]) columnWidths[j] = entryWidth; - } - } - - var formatted = ''; - - for (i = 0; i < matrix.length; ++i) { - for (j = 0; j < matrix[i].length; ++j) { - var s = String(matrix[i][j]); // pad at front with spaces - - while (s.length < columnWidths[j]) s = ' ' + s; - - formatted += s; // separate columns - - if (j != matrix[i].length - 1) formatted += ' '; - } - - if (i != matrix[i].length - 1) formatted += '\n'; - } - - return formatted; - } // --------------------------------------------------------------------------- - // Exports - // --------------------------------------------------------------------------- - - - function computeMunkres(cost_matrix, options) { - var m = new Munkres(); - return m.compute(cost_matrix, options); - } - - computeMunkres.version = "1.2.2"; - computeMunkres.format_matrix = format_matrix; - computeMunkres.make_cost_matrix = make_cost_matrix; - computeMunkres.Munkres = Munkres; // backwards compatibility - - if (module.exports) { - module.exports = computeMunkres; - } -})(munkres$1); - -var itemTrackedModule = ItemTracked$1; -var ItemTracked = itemTrackedModule.ItemTracked; -var kdTree = kdTreeMin.kdTree; -var iouAreas = utils.iouAreas; -var munkres = munkres$1.exports; - -var iouDistance = function iouDistance(item1, item2) { - // IOU distance, between 0 and 1 - // The smaller the less overlap - var iou = iouAreas(item1, item2); // Invert this as the KDTREESEARCH is looking for the smaller value - - var distance = 1 - iou; // If the overlap is iou < 0.95, exclude value - - if (distance > 1 - params.iouLimit) { - distance = params.distanceLimit + 1; - } - - return distance; -}; - -var params = { - // DEFAULT_UNMATCHEDFRAMES_TOLERANCE - // This the number of frame we wait when an object isn't matched before considering it gone - unMatchedFramesTolerance: 5, - // DEFAULT_IOU_LIMIT, exclude things from beeing matched if their IOU is lower than this - // 1 means total overlap whereas 0 means no overlap - iouLimit: 0.05, - // Remove new objects fast if they could not be matched in the next frames. - // Setting this to false ensures the object will stick around at least - // unMatchedFramesTolerance frames, even if they could neven be matched in - // subsequent frames. - fastDelete: true, - // The function to use to determine the distance between to detected objects - distanceFunc: iouDistance, - // The distance limit for matching. If values need to be excluded from - // matching set their distance to something greater than the distance limit - distanceLimit: 10000, - // The algorithm used to match tracks with new detections. Can be either - // 'kdTree' or 'munkres'. - matchingAlgorithm: 'munkres' // matchingAlgorithm: 'kdTree', - -}; // A dictionary of itemTracked currently tracked -// key: uuid -// value: ItemTracked object - -var mapOfItemsTracked = new Map(); // A dictionnary keeping memory of all tracked object (even after they disappear) -// Useful to ouput the file of all items tracked - -var mapOfAllItemsTracked = new Map(); // By default, we do not keep all the history in memory - -var keepAllHistoryInMemory = false; -var computeDistance = tracker.computeDistance = iouDistance; - -var updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameNb) { - // A kd-tree containing all the itemtracked - // Need to rebuild on each frame, because itemTracked positions have changed - var treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ["x", "y", "w", "h"]); // Contruct a kd tree for the detections of this frame - - var treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ["x", "y", "w", "h"]); // SCENARIO 1: itemsTracked map is empty - - if (mapOfItemsTracked.size === 0) { - // Just add every detected item as item Tracked - detectionsOfThisFrame.forEach(function (itemDetected) { - var newItemTracked = new ItemTracked(itemDetected, frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map - - mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree - - treeItemsTracked.insert(newItemTracked); - }); - } // SCENARIO 2: We already have itemsTracked in the map - else { - var matchedList = new Array(detectionsOfThisFrame.length); - matchedList.fill(false); // Match existing Tracked items with the items detected in the new frame - // For each look in the new detection to find the closest match - - if (detectionsOfThisFrame.length > 0) { - if (params.matchingAlgorithm === 'munkres') { - var trackedItemIds = Array.from(mapOfItemsTracked.keys()); - var costMatrix = Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { - var predictedPosition = itemTracked.predictNextPosition(); - return detectionsOfThisFrame.map(function (detection) { - return params.distanceFunc(predictedPosition, detection); - }); - }); - mapOfItemsTracked.forEach(function (itemTracked) { - itemTracked.makeAvailable(); - }); - munkres(costMatrix).filter(function (m) { - return costMatrix[m[0]][m[1]] <= params.distanceLimit; - }).forEach(function (m) { - var itemTracked = mapOfItemsTracked.get(trackedItemIds[m[0]]); - var updatedTrackedItemProperties = detectionsOfThisFrame[m[1]]; - matchedList[m[1]] = { - idDisplay: itemTracked.idDisplay - }; - itemTracked.makeUnavailable().update(updatedTrackedItemProperties, frameNb); - }); - matchedList.forEach(function (matched, index) { - if (!matched) { - if (Math.min.apply(Math, _toConsumableArray(costMatrix.map(function (m) { - return m[index]; - }))) > params.distanceLimit) { - var newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); - mapOfItemsTracked.set(newItemTracked.id, newItemTracked); - newItemTracked.makeUnavailable(); - costMatrix.push(detectionsOfThisFrame.map(function (detection) { - return params.distanceFunc(newItemTracked, detection); - })); - } - } - }); - } else if (params.matchingAlgorithm === 'kdTree') { - mapOfItemsTracked.forEach(function (itemTracked) { - // First predict the new position of the itemTracked - var predictedPosition = itemTracked.predictNextPosition(); // Make available for matching - - itemTracked.makeAvailable(); // Search for a detection that matches - - var treeSearchResult = treeDetectionsOfThisFrame.nearest(predictedPosition, 1, params.distanceLimit)[0]; // Only for debug assessments of predictions - - treeDetectionsOfThisFrame.nearest(itemTracked, 1, params.distanceLimit)[0]; // Only if we enable the extra refinement - - treeDetectionsOfThisFrame.nearest(predictedPosition, 2, params.distanceLimit); // If we have found something - - if (treeSearchResult) { - - var indexClosestNewDetectedItem = detectionsOfThisFrame.indexOf(treeSearchResult[0]); // If this detections was not already matched to a tracked item - // (otherwise it would be matched to two tracked items...) - - if (!matchedList[indexClosestNewDetectedItem]) { - matchedList[indexClosestNewDetectedItem] = { - idDisplay: itemTracked.idDisplay - }; // Update properties of tracked object - - var updatedTrackedItemProperties = detectionsOfThisFrame[indexClosestNewDetectedItem]; - mapOfItemsTracked.get(itemTracked.id).makeUnavailable().update(updatedTrackedItemProperties, frameNb); - } - } - }); - } else { - throw "Unknown matching algorithm \"".concat(params.matchingAlgorithm, "\""); - } - } else { - - - mapOfItemsTracked.forEach(function (itemTracked) { - itemTracked.makeAvailable(); - }); - } - - if (params.matchingAlgorithm === 'kdTree') { - // Add any unmatched items as new trackedItem only if those new items are not too similar - // to existing trackedItems this avoids adding some double match of YOLO and bring down drasticly reassignments - if (mapOfItemsTracked.size > 0) { - // Safety check to see if we still have object tracked (could have been deleted previously) - // Rebuild tracked item tree to take in account the new positions - treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ["x", "y", "w", "h"]); // console.log(`Nb new items Unmatched : ${matchedList.filter((isMatched) => isMatched === false).length}`) - - matchedList.forEach(function (matched, index) { - // Iterate through unmatched new detections - if (!matched) { - // Do not add as new tracked item if it is to similar to an existing one - var treeSearchResult = treeItemsTracked.nearest(detectionsOfThisFrame[index], 1, params.distanceLimit)[0]; - - if (!treeSearchResult) { - var newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map - - mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree - - treeItemsTracked.insert(newItemTracked); // Make unvailable - - newItemTracked.makeUnavailable(); - } - } - }); - } - } // Start killing the itemTracked (and predicting next position) - // that are tracked but haven't been matched this frame - - - mapOfItemsTracked.forEach(function (itemTracked) { - if (itemTracked.available) { - itemTracked.countDown(frameNb); - itemTracked.updateTheoricalPositionAndSize(); - - if (itemTracked.isDead()) { - mapOfItemsTracked["delete"](itemTracked.id); - treeItemsTracked.remove(itemTracked); - - if (keepAllHistoryInMemory) { - mapOfAllItemsTracked.set(itemTracked.id, itemTracked); - } - } - } - }); - } -}; - -var reset = tracker.reset = function () { - mapOfItemsTracked = new Map(); - mapOfAllItemsTracked = new Map(); - itemTrackedModule.reset(); -}; - -var setParams = tracker.setParams = function (newParams) { - Object.keys(newParams).forEach(function (key) { - params[key] = newParams[key]; - }); -}; - -var enableKeepInMemory = tracker.enableKeepInMemory = function () { - keepAllHistoryInMemory = true; -}; - -var disableKeepInMemory = tracker.disableKeepInMemory = function () { - keepAllHistoryInMemory = false; -}; - -var getJSONOfTrackedItems = tracker.getJSONOfTrackedItems = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { - return itemTracked.toJSON(roundInt); - }); -}; - -var getJSONDebugOfTrackedItems = tracker.getJSONDebugOfTrackedItems = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { - return itemTracked.toJSONDebug(roundInt); - }); -}; - -var getTrackedItemsInMOTFormat = tracker.getTrackedItemsInMOTFormat = function (frameNb) { - return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { - return itemTracked.toMOT(frameNb); - }); -}; // Work only if keepInMemory is enabled - - -var getAllTrackedItems = tracker.getAllTrackedItems = function () { - return mapOfAllItemsTracked; -}; // Work only if keepInMemory is enabled - - -var getJSONOfAllTrackedItems = tracker.getJSONOfAllTrackedItems = function () { - return Array.from(mapOfAllItemsTracked.values()).map(function (itemTracked) { - return itemTracked.toJSONGenericInfo(); - }); -}; - -export { computeDistance, tracker as default, disableKeepInMemory, enableKeepInMemory, getAllTrackedItems, getJSONDebugOfTrackedItems, getJSONOfAllTrackedItems, getJSONOfTrackedItems, getTrackedItemsInMOTFormat, reset, setParams, updateTrackedItemsWithNewFrame }; diff --git a/tracker.js b/tracker.js index 3437827..cfb56ea 100644 --- a/tracker.js +++ b/tracker.js @@ -1,20 +1,20 @@ const itemTrackedModule = require('./ItemTracked'); -var ItemTracked = itemTrackedModule.ItemTracked; -var kdTree = require('kd-tree-javascript').kdTree; -var isEqual = require('lodash.isequal') -var iouAreas = require('./utils').iouAreas -var munkres = require('munkres-js'); +const ItemTracked = itemTrackedModule.ItemTracked; +const kdTree = require('kd-tree-javascript').kdTree; +const isEqual = require('lodash.isequal') +const iouAreas = require('./utils').iouAreas +const munkres = require('munkres-js'); -var DEBUG_MODE = false; +const DEBUG_MODE = false; // Distance function const iouDistance = function(item1, item2) { // IOU distance, between 0 and 1 // The smaller the less overlap - var iou = iouAreas(item1, item2); + const iou = iouAreas(item1, item2); // Invert this as the KDTREESEARCH is looking for the smaller value - var distance = 1 - iou; + let distance = 1 - iou; // If the overlap is iou < 0.95, exclude value if(distance > (1 - params.iouLimit)) { @@ -50,14 +50,14 @@ const params = { // A dictionary of itemTracked currently tracked // key: uuid // value: ItemTracked object -var mapOfItemsTracked = new Map(); +let mapOfItemsTracked = new Map(); // A dictionnary keeping memory of all tracked object (even after they disappear) // Useful to ouput the file of all items tracked -var mapOfAllItemsTracked = new Map(); +let mapOfAllItemsTracked = new Map(); // By default, we do not keep all the history in memory -var keepAllHistoryInMemory = false; +let keepAllHistoryInMemory = false; exports.computeDistance = iouDistance; @@ -66,16 +66,16 @@ exports.updateTrackedItemsWithNewFrame = function(detectionsOfThisFrame, frameNb // A kd-tree containing all the itemtracked // Need to rebuild on each frame, because itemTracked positions have changed - var treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ["x", "y", "w", "h"]); + let treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ["x", "y", "w", "h"]); // Contruct a kd tree for the detections of this frame - var treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ["x", "y", "w", "h"]); + const treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ["x", "y", "w", "h"]); // SCENARIO 1: itemsTracked map is empty if(mapOfItemsTracked.size === 0) { // Just add every detected item as item Tracked detectionsOfThisFrame.forEach(function(itemDetected) { - var newItemTracked = new ItemTracked(itemDetected, frameNb, params.unMatchedFramesTolerance, params.fastDelete) + const newItemTracked = new ItemTracked(itemDetected, frameNb, params.unMatchedFramesTolerance, params.fastDelete) // Add it to the map mapOfItemsTracked.set(newItemTracked.id, newItemTracked) // Add it to the kd tree @@ -84,17 +84,17 @@ exports.updateTrackedItemsWithNewFrame = function(detectionsOfThisFrame, frameNb } // SCENARIO 2: We already have itemsTracked in the map else { - var matchedList = new Array(detectionsOfThisFrame.length); + const matchedList = new Array(detectionsOfThisFrame.length); matchedList.fill(false); // Match existing Tracked items with the items detected in the new frame // For each look in the new detection to find the closest match if(detectionsOfThisFrame.length > 0) { if (params.matchingAlgorithm === 'munkres') { - var trackedItemIds = Array.from(mapOfItemsTracked.keys()); + const trackedItemIds = Array.from(mapOfItemsTracked.keys()); - var costMatrix = Array.from(mapOfItemsTracked.values()). + const costMatrix = Array.from(mapOfItemsTracked.values()). map(itemTracked => { - var predictedPosition = itemTracked.predictNextPosition(); + const predictedPosition = itemTracked.predictNextPosition(); return detectionsOfThisFrame.map( detection => params.distanceFunc(predictedPosition, detection)); }); @@ -106,8 +106,8 @@ exports.updateTrackedItemsWithNewFrame = function(detectionsOfThisFrame, frameNb munkres(costMatrix). filter(m => costMatrix[m[0]][m[1]] <= params.distanceLimit). forEach(m => { - var itemTracked = mapOfItemsTracked.get(trackedItemIds[m[0]]); - var updatedTrackedItemProperties = detectionsOfThisFrame[m[1]]; + const itemTracked = mapOfItemsTracked.get(trackedItemIds[m[0]]); + const updatedTrackedItemProperties = detectionsOfThisFrame[m[1]]; matchedList[m[1]] = { idDisplay: itemTracked.idDisplay }; itemTracked. makeUnavailable(). @@ -117,7 +117,7 @@ exports.updateTrackedItemsWithNewFrame = function(detectionsOfThisFrame, frameNb matchedList.forEach(function(matched, index) { if (!matched) { if (Math.min(...costMatrix.map(m => m[index])) > params.distanceLimit) { - var newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete) + const newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete) mapOfItemsTracked.set(newItemTracked.id, newItemTracked) newItemTracked.makeUnavailable(); costMatrix.push(detectionsOfThisFrame.map( @@ -130,18 +130,18 @@ exports.updateTrackedItemsWithNewFrame = function(detectionsOfThisFrame, frameNb mapOfItemsTracked.forEach(function(itemTracked) { // First predict the new position of the itemTracked - var predictedPosition = itemTracked.predictNextPosition() + const predictedPosition = itemTracked.predictNextPosition() // Make available for matching itemTracked.makeAvailable(); // Search for a detection that matches - var treeSearchResult = treeDetectionsOfThisFrame.nearest(predictedPosition, 1, params.distanceLimit)[0]; + const treeSearchResult = treeDetectionsOfThisFrame.nearest(predictedPosition, 1, params.distanceLimit)[0]; // Only for debug assessments of predictions - var treeSearchResultWithoutPrediction = treeDetectionsOfThisFrame.nearest(itemTracked, 1, params.distanceLimit)[0]; + const treeSearchResultWithoutPrediction = treeDetectionsOfThisFrame.nearest(itemTracked, 1, params.distanceLimit)[0]; // Only if we enable the extra refinement - var treeSearchMultipleResults = treeDetectionsOfThisFrame.nearest(predictedPosition, 2, params.distanceLimit); + const treeSearchMultipleResults = treeDetectionsOfThisFrame.nearest(predictedPosition, 2, params.distanceLimit); // If we have found something if(treeSearchResult) { @@ -150,17 +150,17 @@ exports.updateTrackedItemsWithNewFrame = function(detectionsOfThisFrame, frameNb // If IOU overlap is super similar for two potential match, add an extra check // if(treeSearchMultipleResults.length === 2) { - // var indexFirstChoice = 0; + // const indexFirstChoice = 0; // if(treeSearchMultipleResults[0][1] > treeSearchMultipleResults[1][1]) { // indexFirstChoice = 1; // } - // var detectionFirstChoice = { + // const detectionFirstChoice = { // bbox: treeSearchMultipleResults[indexFirstChoice][0], // distance: treeSearchMultipleResults[indexFirstChoice][1] // } - // var detectionSecondChoice = { + // const detectionSecondChoice = { // bbox: treeSearchMultipleResults[1 - indexFirstChoice][0], // distance: treeSearchMultipleResults[1 - indexFirstChoice][1] // } @@ -171,10 +171,10 @@ exports.updateTrackedItemsWithNewFrame = function(detectionsOfThisFrame, frameNb // detectionFirstChoice.area = detectionFirstChoice.bbox.w * detectionFirstChoice.bbox.h; // detectionSecondChoice.area = detectionSecondChoice.bbox.w * detectionSecondChoice.bbox.h; - // var itemTrackedArea = itemTracked.w * itemTracked.h; + // const itemTrackedArea = itemTracked.w * itemTracked.h; - // var deltaAreaFirstChoice = Math.abs(detectionFirstChoice.area - itemTrackedArea) / (detectionFirstChoice.area + itemTrackedArea); - // var deltaAreaSecondChoice = Math.abs(detectionSecondChoice.area - itemTrackedArea) / (detectionSecondChoice.area + itemTrackedArea); + // const deltaAreaFirstChoice = Math.abs(detectionFirstChoice.area - itemTrackedArea) / (detectionFirstChoice.area + itemTrackedArea); + // const deltaAreaSecondChoice = Math.abs(detectionSecondChoice.area - itemTrackedArea) / (detectionSecondChoice.area + itemTrackedArea); // // Compare the area of each, priorize the detections that as a overal similar area // // even if it overlaps less @@ -199,7 +199,7 @@ exports.updateTrackedItemsWithNewFrame = function(detectionsOfThisFrame, frameNb } } - var indexClosestNewDetectedItem = detectionsOfThisFrame.indexOf(treeSearchResult[0]); + const indexClosestNewDetectedItem = detectionsOfThisFrame.indexOf(treeSearchResult[0]); // If this detections was not already matched to a tracked item // (otherwise it would be matched to two tracked items...) if(!matchedList[indexClosestNewDetectedItem]) { @@ -207,7 +207,7 @@ exports.updateTrackedItemsWithNewFrame = function(detectionsOfThisFrame, frameNb idDisplay: itemTracked.idDisplay } // Update properties of tracked object - var updatedTrackedItemProperties = detectionsOfThisFrame[indexClosestNewDetectedItem] + const updatedTrackedItemProperties = detectionsOfThisFrame[indexClosestNewDetectedItem] mapOfItemsTracked.get(itemTracked.id) .makeUnavailable() .update(updatedTrackedItemProperties, frameNb) @@ -241,10 +241,10 @@ exports.updateTrackedItemsWithNewFrame = function(detectionsOfThisFrame, frameNb // Iterate through unmatched new detections if(!matched) { // Do not add as new tracked item if it is to similar to an existing one - var treeSearchResult = treeItemsTracked.nearest(detectionsOfThisFrame[index], 1, params.distanceLimit)[0]; + const treeSearchResult = treeItemsTracked.nearest(detectionsOfThisFrame[index], 1, params.distanceLimit)[0]; if(!treeSearchResult) { - var newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete) + const newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete) // Add it to the map mapOfItemsTracked.set(newItemTracked.id, newItemTracked) // Add it to the kd tree diff --git a/utils.js b/utils.js index 30f6436..fd166a1 100644 --- a/utils.js +++ b/utils.js @@ -46,24 +46,24 @@ exports.getRectangleEdges = getRectangleEdges; exports.iouAreas = (item1, item2) => { - var rect1 = getRectangleEdges(item1); - var rect2 = getRectangleEdges(item2); + const rect1 = getRectangleEdges(item1); + const rect2 = getRectangleEdges(item2); // Get overlap rectangle - var overlap_x0 = Math.max(rect1.x0, rect2.x0) - var overlap_y0 = Math.max(rect1.y0, rect2.y0) - var overlap_x1 = Math.min(rect1.x1, rect2.x1) - var overlap_y1 = Math.min(rect1.y1, rect2.y1) + const overlap_x0 = Math.max(rect1.x0, rect2.x0) + const overlap_y0 = Math.max(rect1.y0, rect2.y0) + const overlap_x1 = Math.min(rect1.x1, rect2.x1) + const overlap_y1 = Math.min(rect1.y1, rect2.y1) // if there an overlap if((overlap_x1 - overlap_x0) <= 0 || (overlap_y1 - overlap_y0) <= 0) { // no overlap return 0 } else { - area_rect1 = item1.w * item1.h - area_rect2 = item2.w * item2.h - area_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0) - area_union = area_rect1 + area_rect2 - area_intersection + const area_rect1 = item1.w * item1.h + const area_rect2 = item2.w * item2.h + const area_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0) + const area_union = area_rect1 + area_rect2 - area_intersection return area_intersection / area_union } } @@ -110,7 +110,7 @@ exports.computeVelocityVector = (item1, item2, nbFrame) => { */ exports.computeBearingIn360 = function(dx,dy) { - var angle = Math.atan(dx/dy)/(Math.PI/180) + const angle = Math.atan(dx/dy)/(Math.PI/180) if ( angle > 0 ) { if (dy > 0) return angle; From 1c80a88dcb645eee48262abbe178f6113ef42ec0 Mon Sep 17 00:00:00 2001 From: Dmytro Kushnir Date: Sun, 3 Apr 2022 12:37:43 +0300 Subject: [PATCH 06/11] Update bundle with the latest update Co-authored-by: Dmytro Kushnir --- bundle.cjs.js | 425 +++++++++++++++++++++++++++----------------------- 1 file changed, 227 insertions(+), 198 deletions(-) diff --git a/bundle.cjs.js b/bundle.cjs.js index 913cd19..32f410a 100644 --- a/bundle.cjs.js +++ b/bundle.cjs.js @@ -241,237 +241,266 @@ utils.computeBearingIn360 = function (dx, dy) { } }; -var uuidv4 = v4_1; -var computeBearingIn360 = utils.computeBearingIn360; -var computeVelocityVector = utils.computeVelocityVector; // Properties example -// { -// "x": 1021, -// "y": 65, -// "w": 34, -// "h": 27, -// "confidence": 26, -// "name": "car" -// } -// Use a simple incremental unique id for the display - -var idDisplay = 0; - -ItemTracked$1.ItemTracked = function (properties, frameNb, unMatchedFramesTolerance, fastDelete) { - var DEFAULT_UNMATCHEDFRAMES_TOLERANCE = unMatchedFramesTolerance; - var itemTracked = {}; // ==== Private ===== - // Am I available to be matched? - - itemTracked.available = true; // Should I be deleted? - - itemTracked["delete"] = false; - itemTracked.fastDelete = fastDelete; // How many unmatched frame should I survive? - - itemTracked.frameUnmatchedLeftBeforeDying = unMatchedFramesTolerance; - itemTracked.isZombie = false; - itemTracked.appearFrame = frameNb; - itemTracked.disappearFrame = null; - itemTracked.disappearArea = {}; // Keep track of the most counted class - - itemTracked.nameCount = {}; - itemTracked.nameCount[properties.name] = 1; // ==== Public ===== - - itemTracked.x = properties.x; - itemTracked.y = properties.y; - itemTracked.w = properties.w; - itemTracked.h = properties.h; - itemTracked.name = properties.name; - itemTracked.confidence = properties.confidence; - itemTracked.itemHistory = []; - itemTracked.itemHistory.push({ - x: properties.x, - y: properties.y, - w: properties.w, - h: properties.h, - confidence: properties.confidence - }); - itemTracked.velocity = { - dx: 0, - dy: 0 - }; - itemTracked.nbTimeMatched = 1; // Assign an unique id to each Item tracked +(function (exports) { + var uuidv4 = v4_1; + var computeBearingIn360 = utils.computeBearingIn360; + var computeVelocityVector = utils.computeVelocityVector; // Properties example + // { + // "x": 1021, + // "y": 65, + // "w": 34, + // "h": 27, + // "confidence": 26, + // "name": "car" + // } + + /** The maximum length of the item history. */ + + exports.ITEM_HISTORY_MAX_LENGTH = 15; // Use a simple incremental unique id for the display + + var idDisplay = 0; + + exports.ItemTracked = function (properties, frameNb, unMatchedFramesTolerance, fastDelete) { + var DEFAULT_UNMATCHEDFRAMES_TOLERANCE = unMatchedFramesTolerance; + var itemTracked = {}; // ==== Private ===== + // Am I available to be matched? + + itemTracked.available = true; // Should I be deleted? + + itemTracked["delete"] = false; + itemTracked.fastDelete = fastDelete; // How many unmatched frame should I survive? + + itemTracked.frameUnmatchedLeftBeforeDying = unMatchedFramesTolerance; + itemTracked.isZombie = false; + itemTracked.appearFrame = frameNb; + itemTracked.disappearFrame = null; + itemTracked.disappearArea = {}; // Keep track of the most counted class + + itemTracked.nameCount = {}; + itemTracked.nameCount[properties.name] = 1; // ==== Public ===== + + itemTracked.x = properties.x; + itemTracked.y = properties.y; + itemTracked.w = properties.w; + itemTracked.h = properties.h; + itemTracked.name = properties.name; + itemTracked.confidence = properties.confidence; + itemTracked.itemHistory = []; + itemTracked.itemHistory.push({ + x: properties.x, + y: properties.y, + w: properties.w, + h: properties.h, + confidence: properties.confidence + }); - itemTracked.id = uuidv4(); // Use an simple id for the display and debugging + if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { + itemTracked.itemHistory.shift(); + } - itemTracked.idDisplay = idDisplay; - idDisplay++; // Give me a new location / size + itemTracked.velocity = { + dx: 0, + dy: 0 + }; + itemTracked.nbTimeMatched = 1; // Assign an unique id to each Item tracked - itemTracked.update = function (properties, frameNb) { - // if it was zombie and disappear frame was set, reset it to null - if (this.disappearFrame) { - this.disappearFrame = null; - this.disappearArea = {}; - } + itemTracked.id = uuidv4(); // Use an simple id for the display and debugging - this.isZombie = false; - this.nbTimeMatched += 1; - this.x = properties.x; - this.y = properties.y; - this.w = properties.w; - this.h = properties.h; - this.confidence = properties.confidence; - this.itemHistory.push({ - x: this.x, - y: this.y, - w: this.w, - h: this.h, - confidence: this.confidence - }); - this.name = properties.name; + itemTracked.idDisplay = idDisplay; + idDisplay++; // Give me a new location / size - if (this.nameCount[properties.name]) { - this.nameCount[properties.name]++; - } else { - this.nameCount[properties.name] = 1; - } // Reset dying counter + itemTracked.update = function (properties, frameNb) { + // if it was zombie and disappear frame was set, reset it to null + if (this.disappearFrame) { + this.disappearFrame = null; + this.disappearArea = {}; + } + this.isZombie = false; + this.nbTimeMatched += 1; + this.x = properties.x; + this.y = properties.y; + this.w = properties.w; + this.h = properties.h; + this.confidence = properties.confidence; + this.itemHistory.push({ + x: this.x, + y: this.y, + w: this.w, + h: this.h, + confidence: this.confidence + }); - this.frameUnmatchedLeftBeforeDying = DEFAULT_UNMATCHEDFRAMES_TOLERANCE; // Compute new velocityVector based on last positions history + if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { + itemTracked.itemHistory.shift(); + } - this.velocity = this.updateVelocityVector(); - }; + this.name = properties.name; - itemTracked.makeAvailable = function () { - this.available = true; - return this; - }; + if (this.nameCount[properties.name]) { + this.nameCount[properties.name]++; + } else { + this.nameCount[properties.name] = 1; + } // Reset dying counter - itemTracked.makeUnavailable = function () { - this.available = false; - return this; - }; - itemTracked.countDown = function (frameNb) { - // Set frame disappear number - if (this.disappearFrame === null) { - this.disappearFrame = frameNb; - this.disappearArea = { + this.frameUnmatchedLeftBeforeDying = DEFAULT_UNMATCHEDFRAMES_TOLERANCE; // Compute new velocityVector based on last positions history + + this.velocity = this.updateVelocityVector(); + }; + + itemTracked.makeAvailable = function () { + this.available = true; + return this; + }; + + itemTracked.makeUnavailable = function () { + this.available = false; + return this; + }; + + itemTracked.countDown = function (frameNb) { + // Set frame disappear number + if (this.disappearFrame === null) { + this.disappearFrame = frameNb; + this.disappearArea = { + x: this.x, + y: this.y, + w: this.w, + h: this.h + }; + } + + this.frameUnmatchedLeftBeforeDying--; + this.isZombie = true; // If it was matched less than 1 time, it should die quick + + if (this.fastDelete && this.nbTimeMatched <= 1) { + this.frameUnmatchedLeftBeforeDying = -1; + } + }; + + itemTracked.updateTheoricalPositionAndSize = function () { + this.itemHistory.push({ x: this.x, y: this.y, w: this.w, - h: this.h - }; - } - - this.frameUnmatchedLeftBeforeDying--; - this.isZombie = true; // If it was matched less than 1 time, it should die quick + h: this.h, + confidence: this.confidence + }); - if (this.fastDelete && this.nbTimeMatched <= 1) { - this.frameUnmatchedLeftBeforeDying = -1; - } - }; + if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { + itemTracked.itemHistory.shift(); + } - itemTracked.updateTheoricalPositionAndSize = function () { - this.itemHistory.push({ - x: this.x, - y: this.y, - w: this.w, - h: this.h, - confidence: this.confidence - }); - this.x = this.x + this.velocity.dx; - this.y = this.y + this.velocity.dy; - }; + this.x = this.x + this.velocity.dx; + this.y = this.y + this.velocity.dy; + }; - itemTracked.predictNextPosition = function () { - return { - x: this.x + this.velocity.dx, - y: this.y + this.velocity.dy, - w: this.w, - h: this.h + itemTracked.predictNextPosition = function () { + return { + x: this.x + this.velocity.dx, + y: this.y + this.velocity.dy, + w: this.w, + h: this.h + }; }; - }; - itemTracked.isDead = function () { - return this.frameUnmatchedLeftBeforeDying < 0; - }; // Velocity vector based on the last 15 frames + itemTracked.isDead = function () { + return this.frameUnmatchedLeftBeforeDying < 0; + }; // Velocity vector based on the last 15 frames - itemTracked.updateVelocityVector = function () { - var AVERAGE_NBFRAME = 15; + itemTracked.updateVelocityVector = function () { + if (exports.ITEM_HISTORY_MAX_LENGTH <= 2) { + return { + dx: undefined, + dy: undefined + }; + } - if (this.itemHistory.length <= AVERAGE_NBFRAME) { - return computeVelocityVector(this.itemHistory[0], this.itemHistory[this.itemHistory.length - 1], this.itemHistory.length); - } else { - return computeVelocityVector(this.itemHistory[this.itemHistory.length - AVERAGE_NBFRAME], this.itemHistory[this.itemHistory.length - 1], AVERAGE_NBFRAME); - } - }; + if (this.itemHistory.length <= exports.ITEM_HISTORY_MAX_LENGTH) { + var start = this.itemHistory[0]; + var end = this.itemHistory[this.itemHistory.length - 1]; + return computeVelocityVector(start, end, this.itemHistory.length); + } else { + var _start = this.itemHistory[this.itemHistory.length - exports.ITEM_HISTORY_MAX_LENGTH]; + var _end = this.itemHistory[this.itemHistory.length - 1]; + return computeVelocityVector(_start, _end, exports.ITEM_HISTORY_MAX_LENGTH); + } + }; - itemTracked.getMostlyMatchedName = function () { - var _this = this; + itemTracked.getMostlyMatchedName = function () { + var _this = this; - var nameMostlyMatchedOccurences = 0; - var nameMostlyMatched = ''; - Object.keys(this.nameCount).map(function (name) { - if (_this.nameCount[name] > nameMostlyMatchedOccurences) { - nameMostlyMatched = name; - nameMostlyMatchedOccurences = _this.nameCount[name]; - } - }); - return nameMostlyMatched; - }; + var nameMostlyMatchedOccurences = 0; + var nameMostlyMatched = ''; + Object.keys(this.nameCount).map(function (name) { + if (_this.nameCount[name] > nameMostlyMatchedOccurences) { + nameMostlyMatched = name; + nameMostlyMatchedOccurences = _this.nameCount[name]; + } + }); + return nameMostlyMatched; + }; - itemTracked.toJSONDebug = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - return { - id: this.id, - idDisplay: this.idDisplay, - x: roundInt ? parseInt(this.x, 10) : this.x, - y: roundInt ? parseInt(this.y, 10) : this.y, - w: roundInt ? parseInt(this.w, 10) : this.w, - h: roundInt ? parseInt(this.h, 10) : this.h, - confidence: Math.round(this.confidence * 100) / 100, - // Here we negate dy to be in "normal" carthesian coordinates - bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy)), - name: this.getMostlyMatchedName(), - isZombie: this.isZombie, - appearFrame: this.appearFrame, - disappearFrame: this.disappearFrame + itemTracked.toJSONDebug = function () { + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return { + id: this.id, + idDisplay: this.idDisplay, + x: roundInt ? parseInt(this.x, 10) : this.x, + y: roundInt ? parseInt(this.y, 10) : this.y, + w: roundInt ? parseInt(this.w, 10) : this.w, + h: roundInt ? parseInt(this.h, 10) : this.h, + confidence: Math.round(this.confidence * 100) / 100, + // Here we negate dy to be in "normal" carthesian coordinates + bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy)), + name: this.getMostlyMatchedName(), + isZombie: this.isZombie, + appearFrame: this.appearFrame, + disappearFrame: this.disappearFrame + }; }; - }; - itemTracked.toJSON = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - return { - id: this.idDisplay, - x: roundInt ? parseInt(this.x, 10) : this.x, - y: roundInt ? parseInt(this.y, 10) : this.y, - w: roundInt ? parseInt(this.w, 10) : this.w, - h: roundInt ? parseInt(this.h, 10) : this.h, - confidence: Math.round(this.confidence * 100) / 100, - // Here we negate dy to be in "normal" carthesian coordinates - bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy), 10), - name: this.getMostlyMatchedName(), - isZombie: this.isZombie + itemTracked.toJSON = function () { + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return { + id: this.idDisplay, + x: roundInt ? parseInt(this.x, 10) : this.x, + y: roundInt ? parseInt(this.y, 10) : this.y, + w: roundInt ? parseInt(this.w, 10) : this.w, + h: roundInt ? parseInt(this.h, 10) : this.h, + confidence: Math.round(this.confidence * 100) / 100, + // Here we negate dy to be in "normal" carthesian coordinates + bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy), 10), + name: this.getMostlyMatchedName(), + isZombie: this.isZombie + }; }; - }; - itemTracked.toMOT = function (frameIndex) { - return "".concat(frameIndex, ",").concat(this.idDisplay, ",").concat(this.x - this.w / 2, ",").concat(this.y - this.h / 2, ",").concat(this.w, ",").concat(this.h, ",").concat(this.confidence / 100, ",-1,-1,-1"); - }; + itemTracked.toMOT = function (frameIndex) { + return "".concat(frameIndex, ",").concat(this.idDisplay, ",").concat(this.x - this.w / 2, ",").concat(this.y - this.h / 2, ",").concat(this.w, ",").concat(this.h, ",").concat(this.confidence / 100, ",-1,-1,-1"); + }; - itemTracked.toJSONGenericInfo = function () { - return { - id: this.id, - idDisplay: this.idDisplay, - appearFrame: this.appearFrame, - disappearFrame: this.disappearFrame, - disappearArea: this.disappearArea, - nbActiveFrame: this.disappearFrame - this.appearFrame, - name: this.getMostlyMatchedName() + itemTracked.toJSONGenericInfo = function () { + return { + id: this.id, + idDisplay: this.idDisplay, + appearFrame: this.appearFrame, + disappearFrame: this.disappearFrame, + disappearArea: this.disappearArea, + nbActiveFrame: this.disappearFrame - this.appearFrame, + name: this.getMostlyMatchedName() + }; }; - }; - return itemTracked; -}; + return itemTracked; + }; -ItemTracked$1.reset = function () { - idDisplay = 0; -}; + exports.reset = function () { + idDisplay = 0; + }; +})(ItemTracked$1); var kdTreeMin = {}; From 2ba85a49e19b06fffb2648afef07c0a737d10db3 Mon Sep 17 00:00:00 2001 From: Dmytro Kushnir Date: Mon, 3 Oct 2022 18:24:37 +0300 Subject: [PATCH 07/11] Add eslint support, update pacakges, add EsM config, run eslint Co-authored-by: Dmytro Kushnir --- .eslintrc.js | 15 + ItemTracked.js | 151 +- bundle.cjs.js | 2082 ++++++++----- bundle.esm.js | 4376 ++++++++++++++++++++++++++ package-lock.json | 6254 ++++++++++++++++++++++++++++---------- package.json | 27 +- rollup.cjs.config.js | 20 + rollup.config.js | 20 - rollup.esm.config.js | 20 + spec/ItemTracked.spec.js | 18 +- spec/Tracker.spec.js | 54 +- tracker.js | 171 +- utils.js | 234 +- 13 files changed, 10861 insertions(+), 2581 deletions(-) create mode 100644 .eslintrc.js create mode 100644 bundle.esm.js create mode 100644 rollup.cjs.config.js delete mode 100644 rollup.config.js create mode 100644 rollup.esm.config.js diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..154c765 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,15 @@ +module.exports = { + env: { + browser: true, + es2021: true, + }, + extends: 'airbnb-base', + overrides: [ + ], + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + }, + rules: { + }, +}; diff --git a/ItemTracked.js b/ItemTracked.js index 5da4f87..5de224c 100644 --- a/ItemTracked.js +++ b/ItemTracked.js @@ -1,6 +1,6 @@ -var uuidv4 = require('uuid/v4'); -var computeBearingIn360 = require('./utils').computeBearingIn360 -var computeVelocityVector = require('./utils').computeVelocityVector +const { v4: uuidv4 } = require('uuid'); +const { computeBearingIn360 } = require('./utils'); +const { computeVelocityVector } = require('./utils'); // Properties example // { @@ -16,11 +16,11 @@ var computeVelocityVector = require('./utils').computeVelocityVector exports.ITEM_HISTORY_MAX_LENGTH = 15; // Use a simple incremental unique id for the display -var idDisplay = 0; +let idDisplay = 0; -exports.ItemTracked = function(properties, frameNb, unMatchedFramesTolerance, fastDelete){ - var DEFAULT_UNMATCHEDFRAMES_TOLERANCE = unMatchedFramesTolerance; - var itemTracked = {}; +exports.ItemTracked = function (properties, frameNb, unMatchedFramesTolerance, fastDelete) { + const DEFAULT_UNMATCHEDFRAMES_TOLERANCE = unMatchedFramesTolerance; + const itemTracked = {}; // ==== Private ===== // Am I available to be matched? itemTracked.available = true; @@ -49,27 +49,27 @@ exports.ItemTracked = function(properties, frameNb, unMatchedFramesTolerance, fa y: properties.y, w: properties.w, h: properties.h, - confidence: properties.confidence + confidence: properties.confidence, }); - if(itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { + if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { itemTracked.itemHistory.shift(); } itemTracked.velocity = { dx: 0, - dy: 0 + dy: 0, }; itemTracked.nbTimeMatched = 1; // Assign an unique id to each Item tracked itemTracked.id = uuidv4(); // Use an simple id for the display and debugging itemTracked.idDisplay = idDisplay; - idDisplay++ + idDisplay++; // Give me a new location / size - itemTracked.update = function(properties, frameNb){ + itemTracked.update = function (properties, frameNb) { // if it was zombie and disappear frame was set, reset it to null - if(this.disappearFrame) { + if (this.disappearFrame) { this.disappearFrame = null; - this.disappearArea = {} + this.disappearArea = {}; } this.isZombie = false; this.nbTimeMatched += 1; @@ -83,105 +83,104 @@ exports.ItemTracked = function(properties, frameNb, unMatchedFramesTolerance, fa y: this.y, w: this.w, h: this.h, - confidence: this.confidence + confidence: this.confidence, }); - if(itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { + if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { itemTracked.itemHistory.shift(); } this.name = properties.name; - if(this.nameCount[properties.name]) { + if (this.nameCount[properties.name]) { this.nameCount[properties.name]++; } else { this.nameCount[properties.name] = 1; } // Reset dying counter - this.frameUnmatchedLeftBeforeDying = DEFAULT_UNMATCHEDFRAMES_TOLERANCE + this.frameUnmatchedLeftBeforeDying = DEFAULT_UNMATCHEDFRAMES_TOLERANCE; // Compute new velocityVector based on last positions history this.velocity = this.updateVelocityVector(); - } - itemTracked.makeAvailable = function() { + }; + itemTracked.makeAvailable = function () { this.available = true; return this; - } - itemTracked.makeUnavailable = function() { + }; + itemTracked.makeUnavailable = function () { this.available = false; return this; - } - itemTracked.countDown = function(frameNb) { + }; + itemTracked.countDown = function (frameNb) { // Set frame disappear number - if(this.disappearFrame === null) { + if (this.disappearFrame === null) { this.disappearFrame = frameNb; this.disappearArea = { x: this.x, y: this.y, w: this.w, - h: this.h - } + h: this.h, + }; } this.frameUnmatchedLeftBeforeDying--; this.isZombie = true; // If it was matched less than 1 time, it should die quick - if(this.fastDelete && this.nbTimeMatched <= 1) { + if (this.fastDelete && this.nbTimeMatched <= 1) { this.frameUnmatchedLeftBeforeDying = -1; } - } - itemTracked.updateTheoricalPositionAndSize = function() { + }; + itemTracked.updateTheoricalPositionAndSize = function () { this.itemHistory.push({ x: this.x, y: this.y, w: this.w, h: this.h, - confidence: this.confidence + confidence: this.confidence, }); - if(itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { + if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { itemTracked.itemHistory.shift(); } - this.x = this.x + this.velocity.dx - this.y = this.y + this.velocity.dy - } + this.x += this.velocity.dx; + this.y += this.velocity.dy; + }; - itemTracked.predictNextPosition = function() { + itemTracked.predictNextPosition = function () { return { - x : this.x + this.velocity.dx, - y : this.y + this.velocity.dy, + x: this.x + this.velocity.dx, + y: this.y + this.velocity.dy, w: this.w, - h: this.h + h: this.h, }; - } + }; - itemTracked.isDead = function() { + itemTracked.isDead = function () { return this.frameUnmatchedLeftBeforeDying < 0; - } + }; // Velocity vector based on the last 15 frames - itemTracked.updateVelocityVector = function() { - if(exports.ITEM_HISTORY_MAX_LENGTH <= 2) { - return { dx: undefined, dy: undefined, } + itemTracked.updateVelocityVector = function () { + if (exports.ITEM_HISTORY_MAX_LENGTH <= 2) { + return { dx: undefined, dy: undefined }; } - if(this.itemHistory.length <= exports.ITEM_HISTORY_MAX_LENGTH) { + if (this.itemHistory.length <= exports.ITEM_HISTORY_MAX_LENGTH) { const start = this.itemHistory[0]; const end = this.itemHistory[this.itemHistory.length - 1]; return computeVelocityVector(start, end, this.itemHistory.length); - } else { - const start = this.itemHistory[this.itemHistory.length - exports.ITEM_HISTORY_MAX_LENGTH]; - const end = this.itemHistory[this.itemHistory.length - 1]; - return computeVelocityVector(start, end, exports.ITEM_HISTORY_MAX_LENGTH); } - } + const start = this.itemHistory[this.itemHistory.length - exports.ITEM_HISTORY_MAX_LENGTH]; + const end = this.itemHistory[this.itemHistory.length - 1]; + return computeVelocityVector(start, end, exports.ITEM_HISTORY_MAX_LENGTH); + }; - itemTracked.getMostlyMatchedName = function() { - var nameMostlyMatchedOccurences = 0; - var nameMostlyMatched = ''; + itemTracked.getMostlyMatchedName = function () { + let nameMostlyMatchedOccurences = 0; + let nameMostlyMatched = ''; Object.keys(this.nameCount).map((name) => { - if(this.nameCount[name] > nameMostlyMatchedOccurences) { + if (this.nameCount[name] > nameMostlyMatchedOccurences) { nameMostlyMatched = name; - nameMostlyMatchedOccurences = this.nameCount[name] + nameMostlyMatchedOccurences = this.nameCount[name]; } - }) + }); return nameMostlyMatched; - } + }; - itemTracked.toJSONDebug = function(roundInt = true) { + itemTracked.toJSONDebug = function (roundInt = true) { return { id: this.id, idDisplay: this.idDisplay, @@ -191,15 +190,15 @@ exports.ItemTracked = function(properties, frameNb, unMatchedFramesTolerance, fa h: (roundInt ? parseInt(this.h, 10) : this.h), confidence: Math.round(this.confidence * 100) / 100, // Here we negate dy to be in "normal" carthesian coordinates - bearing: parseInt(computeBearingIn360(this.velocity.dx, - this.velocity.dy)), + bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy)), name: this.getMostlyMatchedName(), isZombie: this.isZombie, appearFrame: this.appearFrame, - disappearFrame: this.disappearFrame - } - } + disappearFrame: this.disappearFrame, + }; + }; - itemTracked.toJSON = function(roundInt = true) { + itemTracked.toJSON = function (roundInt = true) { return { id: this.idDisplay, x: (roundInt ? parseInt(this.x, 10) : this.x), @@ -208,17 +207,17 @@ exports.ItemTracked = function(properties, frameNb, unMatchedFramesTolerance, fa h: (roundInt ? parseInt(this.h, 10) : this.h), confidence: Math.round(this.confidence * 100) / 100, // Here we negate dy to be in "normal" carthesian coordinates - bearing: parseInt(computeBearingIn360(this.velocity.dx, - this.velocity.dy), 10), + bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy), 10), name: this.getMostlyMatchedName(), - isZombie: this.isZombie - } - } + isZombie: this.isZombie, + }; + }; - itemTracked.toMOT = function(frameIndex) { + itemTracked.toMOT = function (frameIndex) { return `${frameIndex},${this.idDisplay},${this.x - this.w / 2},${this.y - this.h / 2},${this.w},${this.h},${this.confidence / 100},-1,-1,-1`; - } + }; - itemTracked.toJSONGenericInfo = function() { + itemTracked.toJSONGenericInfo = function () { return { id: this.id, idDisplay: this.idDisplay, @@ -226,12 +225,12 @@ exports.ItemTracked = function(properties, frameNb, unMatchedFramesTolerance, fa disappearFrame: this.disappearFrame, disappearArea: this.disappearArea, nbActiveFrame: this.disappearFrame - this.appearFrame, - name: this.getMostlyMatchedName() - } - } + name: this.getMostlyMatchedName(), + }; + }; return itemTracked; }; -exports.reset = function() { +exports.reset = function () { idDisplay = 0; -} +}; diff --git a/bundle.cjs.js b/bundle.cjs.js index 32f410a..2d8d518 100644 --- a/bundle.cjs.js +++ b/bundle.cjs.js @@ -1,5 +1,3 @@ -'use strict'; - Object.defineProperty(exports, '__esModule', { value: true }); function _toConsumableArray(arr) { @@ -11,16 +9,16 @@ function _arrayWithoutHoles(arr) { } function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); + if (typeof Symbol !== 'undefined' && iter[Symbol.iterator] != null || iter['@@iterator'] != null) return Array.from(iter); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + if (typeof o === 'string') return _arrayLikeToArray(o, minLen); + let n = Object.prototype.toString.call(o).slice(8, -1); + if (n === 'Object' && o.constructor) n = o.constructor.name; + if (n === 'Map' || n === 'Set') return Array.from(o); + if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { @@ -32,219 +30,1020 @@ function _arrayLikeToArray(arr, len) { } function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + throw new TypeError('Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'); } -var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; +const commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; -var tracker = {}; +const tracker = {}; -var ItemTracked$1 = {}; +const ItemTracked$1 = {}; -var rngBrowser = {exports: {}}; +const commonjsBrowser = {}; -// browser this is a little complicated due to unknown quality of Math.random() -// and inconsistent support for the `crypto` API. We do the best we can via -// feature-detection -// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. +const v1$1 = {}; -var getRandomValues = typeof crypto != 'undefined' && crypto.getRandomValues.bind(crypto) || typeof msCrypto != 'undefined' && msCrypto.getRandomValues.bind(msCrypto); +const rng$1 = {}; -if (getRandomValues) { - // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto - var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef +Object.defineProperty(rng$1, '__esModule', { + value: true, +}); - rngBrowser.exports = function whatwgRNG() { - getRandomValues(rnds8); - return rnds8; - }; -} else { - // Math.random()-based (RNG) - // - // If all else fails, use Math.random(). It's fast, but is of unspecified - // quality. - var rnds = new Array(16); +rng$1.default = rng; // Unique ID creation requires a high quality random # generator. In the browser we therefore +// require the crypto API and do not support built-in fallback to lower quality random number +// generators (like Math.random()). + +let getRandomValues; +const rnds8 = new Uint8Array(16); + +function rng() { + // lazy load so that environments that need to polyfill have a chance to do so + if (!getRandomValues) { + // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. + getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto); - rngBrowser.exports = function mathRNG() { - for (var i = 0, r; i < 16; i++) { - if ((i & 0x03) === 0) r = Math.random() * 0x100000000; - rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + if (!getRandomValues) { + throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported'); } + } + + return getRandomValues(rnds8); +} + +const stringify$1 = {}; + +const validate$1 = {}; + +const regex = {}; + +Object.defineProperty(regex, '__esModule', { + value: true, +}); +regex.default = void 0; +const _default$c = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; +regex.default = _default$c; + +Object.defineProperty(validate$1, '__esModule', { + value: true, +}); +validate$1.default = void 0; + +const _regex = _interopRequireDefault$8(regex); - return rnds; +function _interopRequireDefault$8(obj) { + return obj && obj.__esModule ? obj : { + default: obj, }; } +function validate(uuid) { + return typeof uuid === 'string' && _regex.default.test(uuid); +} + +const _default$b = validate; +validate$1.default = _default$b; + +Object.defineProperty(stringify$1, '__esModule', { + value: true, +}); +stringify$1.default = void 0; +stringify$1.unsafeStringify = unsafeStringify; + +const _validate$2 = _interopRequireDefault$7(validate$1); + +function _interopRequireDefault$7(obj) { + return obj && obj.__esModule ? obj : { + default: obj, + }; +} /** * Convert array of 16 byte values to UUID string format of the form: * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX */ -var byteToHex = []; -for (var i = 0; i < 256; ++i) { - byteToHex[i] = (i + 0x100).toString(16).substr(1); +const byteToHex = []; + +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).slice(1)); } -function bytesToUuid$1(buf, offset) { - var i = offset || 0; - var bth = byteToHex; - return bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]]; +function unsafeStringify(arr, offset = 0) { + // Note: Be careful editing this code! It's been tuned for performance + // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 + return (`${byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]]}-${byteToHex[arr[offset + 4]]}${byteToHex[arr[offset + 5]]}-${byteToHex[arr[offset + 6]]}${byteToHex[arr[offset + 7]]}-${byteToHex[arr[offset + 8]]}${byteToHex[arr[offset + 9]]}-${byteToHex[arr[offset + 10]]}${byteToHex[arr[offset + 11]]}${byteToHex[arr[offset + 12]]}${byteToHex[arr[offset + 13]]}${byteToHex[arr[offset + 14]]}${byteToHex[arr[offset + 15]]}`).toLowerCase(); } -var bytesToUuid_1 = bytesToUuid$1; +function stringify(arr, offset = 0) { + const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one + // of the following: + // - One or more input array values don't map to a hex octet (leading to + // "undefined" in the uuid) + // - Invalid input values for the RFC `version` or `variant` fields + + if (!(0, _validate$2.default)(uuid)) { + throw TypeError('Stringified UUID is invalid'); + } -var rng = rngBrowser.exports; -var bytesToUuid = bytesToUuid_1; + return uuid; +} -function v4(options, buf, offset) { - var i = buf && offset || 0; +const _default$a = stringify; +stringify$1.default = _default$a; + +Object.defineProperty(v1$1, '__esModule', { + value: true, +}); +v1$1.default = void 0; + +const _rng$1 = _interopRequireDefault$6(rng$1); + +const _stringify$2 = stringify$1; + +function _interopRequireDefault$6(obj) { + return obj && obj.__esModule ? obj : { + default: obj, + }; +} // **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html + +let _nodeId; + +let _clockseq; // Previous uuid creation time + +let _lastMSecs = 0; +let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || _rng$1.default)(); + + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + + let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + + let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) + + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression + + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested + + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + + msecs += 12219292800000; // `time_low` + + const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` - if (typeof options == 'string') { - buf = options === 'binary' ? new Array(16) : null; - options = null; + const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` + + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` + + b[i++] = clockseq & 0xff; // `node` + + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf || (0, _stringify$2.unsafeStringify)(b); +} + +const _default$9 = v1; +v1$1.default = _default$9; + +const v3$1 = {}; + +const v35$1 = {}; + +const parse$1 = {}; + +Object.defineProperty(parse$1, '__esModule', { + value: true, +}); +parse$1.default = void 0; + +const _validate$1 = _interopRequireDefault$5(validate$1); + +function _interopRequireDefault$5(obj) { + return obj && obj.__esModule ? obj : { + default: obj, + }; +} + +function parse(uuid) { + if (!(0, _validate$1.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + let v; + const arr = new Uint8Array(16); // Parse ########-....-....-....-............ + + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 0xff; + arr[2] = v >>> 8 & 0xff; + arr[3] = v & 0xff; // Parse ........-####-....-....-............ + + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 0xff; // Parse ........-....-####-....-............ + + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 0xff; // Parse ........-....-....-####-............ + + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 0xff; // Parse ........-....-....-....-############ + // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) + + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; + arr[11] = v / 0x100000000 & 0xff; + arr[12] = v >>> 24 & 0xff; + arr[13] = v >>> 16 & 0xff; + arr[14] = v >>> 8 & 0xff; + arr[15] = v & 0xff; + return arr; +} + +const _default$8 = parse; +parse$1.default = _default$8; + +Object.defineProperty(v35$1, '__esModule', { + value: true, +}); +v35$1.URL = v35$1.DNS = void 0; + +v35$1.default = v35; + +const _stringify$1 = stringify$1; + +const _parse = _interopRequireDefault$4(parse$1); + +function _interopRequireDefault$4(obj) { + return obj && obj.__esModule ? obj : { + default: obj, + }; +} + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + + const bytes = []; + + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + + return bytes; +} + +const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +v35$1.DNS = DNS; +const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +v35$1.URL = URL; + +function v35(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + let _namespace; + + if (typeof value === 'string') { + value = stringToBytes(value); + } + + if (typeof namespace === 'string') { + namespace = (0, _parse.default)(namespace); + } + + if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { + throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); + } // Compute hash of namespace and value, Per 4.3 + // Future: Use spread syntax when supported on all platforms, e.g. `bytes = + // hashfunc([...namespace, ... value])` + + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + + return buf; + } + + return (0, _stringify$1.unsafeStringify)(bytes); + } // Function#name is not settable on some platforms (#270) + + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support + + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} + +const md5$1 = {}; + +Object.defineProperty(md5$1, '__esModule', { + value: true, +}); +md5$1.default = void 0; +/* + * Browser-compatible JavaScript MD5 + * + * Modification of JavaScript MD5 + * https://github.com/blueimp/JavaScript-MD5 + * + * Copyright 2011, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * https://opensource.org/licenses/MIT + * + * Based on + * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message + * Digest Algorithm, as defined in RFC 1321. + * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009 + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for more info. + */ + +function md5(bytes) { + if (typeof bytes === 'string') { + const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape + + bytes = new Uint8Array(msg.length); + + for (let i = 0; i < msg.length; ++i) { + bytes[i] = msg.charCodeAt(i); + } + } + + return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8)); +} +/* + * Convert an array of little-endian words to an array of bytes + */ + +function md5ToHexEncodedArray(input) { + const output = []; + const length32 = input.length * 32; + const hexTab = '0123456789abcdef'; + + for (let i = 0; i < length32; i += 8) { + const x = input[i >> 5] >>> i % 32 & 0xff; + const hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16); + output.push(hex); + } + + return output; +} +/** + * Calculate output length with padding and bit length + */ + +function getOutputLength(inputLength8) { + return (inputLength8 + 64 >>> 9 << 4) + 14 + 1; +} +/* + * Calculate the MD5 of an array of little-endian words, and a bit length. + */ + +function wordsToMd5(x, len) { + /* append padding */ + x[len >> 5] |= 0x80 << len % 32; + x[getOutputLength(len) - 1] = len; + let a = 1732584193; + let b = -271733879; + let c = -1732584194; + let d = 271733878; + + for (let i = 0; i < x.length; i += 16) { + const olda = a; + const oldb = b; + const oldc = c; + const oldd = d; + a = md5ff(a, b, c, d, x[i], 7, -680876936); + d = md5ff(d, a, b, c, x[i + 1], 12, -389564586); + c = md5ff(c, d, a, b, x[i + 2], 17, 606105819); + b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330); + a = md5ff(a, b, c, d, x[i + 4], 7, -176418897); + d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426); + c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341); + b = md5ff(b, c, d, a, x[i + 7], 22, -45705983); + a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416); + d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417); + c = md5ff(c, d, a, b, x[i + 10], 17, -42063); + b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162); + a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682); + d = md5ff(d, a, b, c, x[i + 13], 12, -40341101); + c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290); + b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329); + a = md5gg(a, b, c, d, x[i + 1], 5, -165796510); + d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632); + c = md5gg(c, d, a, b, x[i + 11], 14, 643717713); + b = md5gg(b, c, d, a, x[i], 20, -373897302); + a = md5gg(a, b, c, d, x[i + 5], 5, -701558691); + d = md5gg(d, a, b, c, x[i + 10], 9, 38016083); + c = md5gg(c, d, a, b, x[i + 15], 14, -660478335); + b = md5gg(b, c, d, a, x[i + 4], 20, -405537848); + a = md5gg(a, b, c, d, x[i + 9], 5, 568446438); + d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690); + c = md5gg(c, d, a, b, x[i + 3], 14, -187363961); + b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501); + a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467); + d = md5gg(d, a, b, c, x[i + 2], 9, -51403784); + c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473); + b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734); + a = md5hh(a, b, c, d, x[i + 5], 4, -378558); + d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463); + c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562); + b = md5hh(b, c, d, a, x[i + 14], 23, -35309556); + a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060); + d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353); + c = md5hh(c, d, a, b, x[i + 7], 16, -155497632); + b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640); + a = md5hh(a, b, c, d, x[i + 13], 4, 681279174); + d = md5hh(d, a, b, c, x[i], 11, -358537222); + c = md5hh(c, d, a, b, x[i + 3], 16, -722521979); + b = md5hh(b, c, d, a, x[i + 6], 23, 76029189); + a = md5hh(a, b, c, d, x[i + 9], 4, -640364487); + d = md5hh(d, a, b, c, x[i + 12], 11, -421815835); + c = md5hh(c, d, a, b, x[i + 15], 16, 530742520); + b = md5hh(b, c, d, a, x[i + 2], 23, -995338651); + a = md5ii(a, b, c, d, x[i], 6, -198630844); + d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415); + c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905); + b = md5ii(b, c, d, a, x[i + 5], 21, -57434055); + a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571); + d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606); + c = md5ii(c, d, a, b, x[i + 10], 15, -1051523); + b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799); + a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359); + d = md5ii(d, a, b, c, x[i + 15], 10, -30611744); + c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380); + b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649); + a = md5ii(a, b, c, d, x[i + 4], 6, -145523070); + d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379); + c = md5ii(c, d, a, b, x[i + 2], 15, 718787259); + b = md5ii(b, c, d, a, x[i + 9], 21, -343485551); + a = safeAdd(a, olda); + b = safeAdd(b, oldb); + c = safeAdd(c, oldc); + d = safeAdd(d, oldd); + } + + return [a, b, c, d]; +} +/* + * Convert an array bytes to an array of little-endian words + * Characters >255 have their high-byte silently ignored. + */ + +function bytesToWords(input) { + if (input.length === 0) { + return []; + } + + const length8 = input.length * 8; + const output = new Uint32Array(getOutputLength(length8)); + + for (let i = 0; i < length8; i += 8) { + output[i >> 5] |= (input[i / 8] & 0xff) << i % 32; + } + + return output; +} +/* + * Add integers, wrapping at 2^32. This uses 16-bit operations internally + * to work around bugs in some JS interpreters. + */ + +function safeAdd(x, y) { + const lsw = (x & 0xffff) + (y & 0xffff); + const msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return msw << 16 | lsw & 0xffff; +} +/* + * Bitwise rotate a 32-bit number to the left. + */ + +function bitRotateLeft(num, cnt) { + return num << cnt | num >>> 32 - cnt; +} +/* + * These functions implement the four basic operations the algorithm uses. + */ + +function md5cmn(q, a, b, x, s, t) { + return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); +} + +function md5ff(a, b, c, d, x, s, t) { + return md5cmn(b & c | ~b & d, a, b, x, s, t); +} + +function md5gg(a, b, c, d, x, s, t) { + return md5cmn(b & d | c & ~d, a, b, x, s, t); +} + +function md5hh(a, b, c, d, x, s, t) { + return md5cmn(b ^ c ^ d, a, b, x, s, t); +} + +function md5ii(a, b, c, d, x, s, t) { + return md5cmn(c ^ (b | ~d), a, b, x, s, t); +} + +const _default$7 = md5; +md5$1.default = _default$7; + +Object.defineProperty(v3$1, '__esModule', { + value: true, +}); +v3$1.default = void 0; + +const _v$1 = _interopRequireDefault$3(v35$1); + +const _md = _interopRequireDefault$3(md5$1); + +function _interopRequireDefault$3(obj) { + return obj && obj.__esModule ? obj : { + default: obj, + }; +} + +const v3 = (0, _v$1.default)('v3', 0x30, _md.default); +const _default$6 = v3; +v3$1.default = _default$6; + +const v4$1 = {}; + +const native = {}; + +Object.defineProperty(native, '__esModule', { + value: true, +}); +native.default = void 0; +const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto); +const _default$5 = { + randomUUID, +}; +native.default = _default$5; + +Object.defineProperty(v4$1, '__esModule', { + value: true, +}); +v4$1.default = void 0; + +const _native = _interopRequireDefault$2(native); + +const _rng = _interopRequireDefault$2(rng$1); + +const _stringify = stringify$1; + +function _interopRequireDefault$2(obj) { + return obj && obj.__esModule ? obj : { + default: obj, + }; +} + +function v4(options, buf, offset) { + if (_native.default.randomUUID && !buf && !options) { + return _native.default.randomUUID(); } options = options || {}; - var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` rnds[6] = rnds[6] & 0x0f | 0x40; rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided if (buf) { - for (var ii = 0; ii < 16; ++ii) { - buf[i + ii] = rnds[ii]; + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; } + + return buf; + } + + return (0, _stringify.unsafeStringify)(rnds); +} + +const _default$4 = v4; +v4$1.default = _default$4; + +const v5$1 = {}; + +const sha1$1 = {}; + +Object.defineProperty(sha1$1, '__esModule', { + value: true, +}); +sha1$1.default = void 0; // Adapted from Chris Veness' SHA1 code at +// http://www.movable-type.co.uk/scripts/sha1.html + +function f(s, x, y, z) { + switch (s) { + case 0: + return x & y ^ ~x & z; + + case 1: + return x ^ y ^ z; + + case 2: + return x & y ^ x & z ^ y & z; + + case 3: + return x ^ y ^ z; } +} - return buf || bytesToUuid(rnds); +function ROTL(x, n) { + return x << n | x >>> 32 - n; } -var v4_1 = v4; +function sha1(bytes) { + const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6]; + const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]; + + if (typeof bytes === 'string') { + const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape -var utils = {}; + bytes = []; + + for (let i = 0; i < msg.length; ++i) { + bytes.push(msg.charCodeAt(i)); + } + } else if (!Array.isArray(bytes)) { + // Convert Array-like to Array + bytes = Array.prototype.slice.call(bytes); + } + + bytes.push(0x80); + const l = bytes.length / 4 + 2; + const N = Math.ceil(l / 16); + const M = new Array(N); + + for (let i = 0; i < N; ++i) { + const arr = new Uint32Array(16); + + for (let j = 0; j < 16; ++j) { + arr[j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3]; + } + + M[i] = arr; + } + + M[N - 1][14] = (bytes.length - 1) * 8 / 2 ** 32; + M[N - 1][14] = Math.floor(M[N - 1][14]); + M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff; + + for (let i = 0; i < N; ++i) { + const W = new Uint32Array(80); + + for (let t = 0; t < 16; ++t) { + W[t] = M[i][t]; + } + + for (let t = 16; t < 80; ++t) { + W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1); + } + + let a = H[0]; + let b = H[1]; + let c = H[2]; + let d = H[3]; + let e = H[4]; + + for (let t = 0; t < 80; ++t) { + const s = Math.floor(t / 20); + const T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0; + e = d; + d = c; + c = ROTL(b, 30) >>> 0; + b = a; + a = T; + } + + H[0] = H[0] + a >>> 0; + H[1] = H[1] + b >>> 0; + H[2] = H[2] + c >>> 0; + H[3] = H[3] + d >>> 0; + H[4] = H[4] + e >>> 0; + } + + return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff]; +} + +const _default$3 = sha1; +sha1$1.default = _default$3; + +Object.defineProperty(v5$1, '__esModule', { + value: true, +}); +v5$1.default = void 0; + +const _v = _interopRequireDefault$1(v35$1); + +const _sha = _interopRequireDefault$1(sha1$1); + +function _interopRequireDefault$1(obj) { + return obj && obj.__esModule ? obj : { + default: obj, + }; +} + +const v5 = (0, _v.default)('v5', 0x50, _sha.default); +const _default$2 = v5; +v5$1.default = _default$2; + +const nil = {}; + +Object.defineProperty(nil, '__esModule', { + value: true, +}); +nil.default = void 0; +const _default$1 = '00000000-0000-0000-0000-000000000000'; +nil.default = _default$1; + +const version$1 = {}; + +Object.defineProperty(version$1, '__esModule', { + value: true, +}); +version$1.default = void 0; + +const _validate = _interopRequireDefault(validate$1); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj, + }; +} + +function version(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + return parseInt(uuid.slice(14, 15), 16); +} + +const _default = version; +version$1.default = _default; + +(function (exports) { + Object.defineProperty(exports, '__esModule', { + value: true, + }); + Object.defineProperty(exports, 'NIL', { + enumerable: true, + get: function get() { + return _nil.default; + }, + }); + Object.defineProperty(exports, 'parse', { + enumerable: true, + get: function get() { + return _parse.default; + }, + }); + Object.defineProperty(exports, 'stringify', { + enumerable: true, + get: function get() { + return _stringify.default; + }, + }); + Object.defineProperty(exports, 'v1', { + enumerable: true, + get: function get() { + return _v.default; + }, + }); + Object.defineProperty(exports, 'v3', { + enumerable: true, + get: function get() { + return _v2.default; + }, + }); + Object.defineProperty(exports, 'v4', { + enumerable: true, + get: function get() { + return _v3.default; + }, + }); + Object.defineProperty(exports, 'v5', { + enumerable: true, + get: function get() { + return _v4.default; + }, + }); + Object.defineProperty(exports, 'validate', { + enumerable: true, + get: function get() { + return _validate.default; + }, + }); + Object.defineProperty(exports, 'version', { + enumerable: true, + get: function get() { + return _version.default; + }, + }); + + var _v = _interopRequireDefault(v1$1); + + var _v2 = _interopRequireDefault(v3$1); + + var _v3 = _interopRequireDefault(v4$1); + + var _v4 = _interopRequireDefault(v5$1); + + var _nil = _interopRequireDefault(nil); + + var _version = _interopRequireDefault(version$1); + + var _validate = _interopRequireDefault(validate$1); + + var _stringify = _interopRequireDefault(stringify$1); + + var _parse = _interopRequireDefault(parse$1); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj, + }; + } +}(commonjsBrowser)); + +const utils = {}; utils.isDetectionTooLarge = function (detections, largestAllowed) { if (detections.w >= largestAllowed) { return true; - } else { - return false; } + return false; }; -var isInsideArea = function isInsideArea(area, point) { - var xMin = area.x - area.w / 2; - var xMax = area.x + area.w / 2; - var yMin = area.y - area.h / 2; - var yMax = area.y + area.h / 2; +const isInsideArea = function isInsideArea(area, point) { + const xMin = area.x - area.w / 2; + const xMax = area.x + area.w / 2; + const yMin = area.y - area.h / 2; + const yMax = area.y + area.h / 2; if (point.x >= xMin && point.x <= xMax && point.y >= yMin && point.y <= yMax) { return true; - } else { - return false; } + return false; }; utils.isInsideArea = isInsideArea; utils.isInsideSomeAreas = function (areas, point) { - var isInside = areas.some(function (area) { - return isInsideArea(area, point); - }); + const isInside = areas.some((area) => isInsideArea(area, point)); return isInside; }; utils.ignoreObjectsNotToDetect = function (detections, objectsToDetect) { - return detections.filter(function (detection) { - return objectsToDetect.indexOf(detection.name) > -1; - }); + return detections.filter((detection) => objectsToDetect.indexOf(detection.name) > -1); }; -var getRectangleEdges = function getRectangleEdges(item) { +const getRectangleEdges = function getRectangleEdges(item) { return { x0: item.x - item.w / 2, y0: item.y - item.h / 2, x1: item.x + item.w / 2, - y1: item.y + item.h / 2 + y1: item.y + item.h / 2, }; }; utils.getRectangleEdges = getRectangleEdges; utils.iouAreas = function (item1, item2) { - var rect1 = getRectangleEdges(item1); - var rect2 = getRectangleEdges(item2); // Get overlap rectangle + const rect1 = getRectangleEdges(item1); + const rect2 = getRectangleEdges(item2); // Get overlap rectangle - var overlap_x0 = Math.max(rect1.x0, rect2.x0); - var overlap_y0 = Math.max(rect1.y0, rect2.y0); - var overlap_x1 = Math.min(rect1.x1, rect2.x1); - var overlap_y1 = Math.min(rect1.y1, rect2.y1); // if there an overlap + const overlap_x0 = Math.max(rect1.x0, rect2.x0); + const overlap_y0 = Math.max(rect1.y0, rect2.y0); + const overlap_x1 = Math.min(rect1.x1, rect2.x1); + const overlap_y1 = Math.min(rect1.y1, rect2.y1); // if there an overlap if (overlap_x1 - overlap_x0 <= 0 || overlap_y1 - overlap_y0 <= 0) { // no overlap return 0; - } else { - var area_rect1 = item1.w * item1.h; - var area_rect2 = item2.w * item2.h; - var area_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0); - var area_union = area_rect1 + area_rect2 - area_intersection; - return area_intersection / area_union; } + const area_rect1 = item1.w * item1.h; + const area_rect2 = item2.w * item2.h; + const area_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0); + const area_union = area_rect1 + area_rect2 - area_intersection; + return area_intersection / area_union; }; utils.computeVelocityVector = function (item1, item2, nbFrame) { return { dx: (item2.x - item1.x) / nbFrame, - dy: (item2.y - item1.y) / nbFrame + dy: (item2.y - item1.y) / nbFrame, }; }; -/* - - computeBearingIn360 - - dY - - ^ XX - | XXX - | XX - | XX - | XX - | XXX - | XX - | XX - | XX bearing = this angle in degree - | XX - |XX -+----------------------XX-----------------------> dX - | - | - | - | - | - | - | - | - | - | - | - + - -*/ +/* + + computeBearingIn360 + + dY + + ^ XX + | XXX + | XX + | XX + | XX + | XXX + | XX + | XX + | XX bearing = this angle in degree + | XX + |XX ++----------------------XX-----------------------> dX + | + | + | + | + | + | + | + | + | + | + | + + +*/ utils.computeBearingIn360 = function (dx, dy) { - var angle = Math.atan(dx / dy) / (Math.PI / 180); + const angle = Math.atan(dx / dy) / (Math.PI / 180); if (angle > 0) { - if (dy > 0) return angle;else return 180 + angle; - } else { - if (dx > 0) return 180 + angle;else return 360 + angle; + if (dy > 0) return angle; return 180 + angle; } + if (dx > 0) return 180 + angle; return 360 + angle; }; (function (exports) { - var uuidv4 = v4_1; - var computeBearingIn360 = utils.computeBearingIn360; - var computeVelocityVector = utils.computeVelocityVector; // Properties example + const uuidv4 = commonjsBrowser.v4; + const { computeBearingIn360 } = utils; + const { computeVelocityVector } = utils; // Properties example // { // "x": 1021, // "y": 65, @@ -258,16 +1057,16 @@ utils.computeBearingIn360 = function (dx, dy) { exports.ITEM_HISTORY_MAX_LENGTH = 15; // Use a simple incremental unique id for the display - var idDisplay = 0; + let idDisplay = 0; exports.ItemTracked = function (properties, frameNb, unMatchedFramesTolerance, fastDelete) { - var DEFAULT_UNMATCHEDFRAMES_TOLERANCE = unMatchedFramesTolerance; - var itemTracked = {}; // ==== Private ===== + const DEFAULT_UNMATCHEDFRAMES_TOLERANCE = unMatchedFramesTolerance; + const itemTracked = {}; // ==== Private ===== // Am I available to be matched? itemTracked.available = true; // Should I be deleted? - itemTracked["delete"] = false; + itemTracked.delete = false; itemTracked.fastDelete = fastDelete; // How many unmatched frame should I survive? itemTracked.frameUnmatchedLeftBeforeDying = unMatchedFramesTolerance; @@ -291,7 +1090,7 @@ utils.computeBearingIn360 = function (dx, dy) { y: properties.y, w: properties.w, h: properties.h, - confidence: properties.confidence + confidence: properties.confidence, }); if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { @@ -300,7 +1099,7 @@ utils.computeBearingIn360 = function (dx, dy) { itemTracked.velocity = { dx: 0, - dy: 0 + dy: 0, }; itemTracked.nbTimeMatched = 1; // Assign an unique id to each Item tracked @@ -328,7 +1127,7 @@ utils.computeBearingIn360 = function (dx, dy) { y: this.y, w: this.w, h: this.h, - confidence: this.confidence + confidence: this.confidence, }); if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { @@ -343,7 +1142,6 @@ utils.computeBearingIn360 = function (dx, dy) { this.nameCount[properties.name] = 1; } // Reset dying counter - this.frameUnmatchedLeftBeforeDying = DEFAULT_UNMATCHEDFRAMES_TOLERANCE; // Compute new velocityVector based on last positions history this.velocity = this.updateVelocityVector(); @@ -367,7 +1165,7 @@ utils.computeBearingIn360 = function (dx, dy) { x: this.x, y: this.y, w: this.w, - h: this.h + h: this.h, }; } @@ -385,15 +1183,15 @@ utils.computeBearingIn360 = function (dx, dy) { y: this.y, w: this.w, h: this.h, - confidence: this.confidence + confidence: this.confidence, }); if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { itemTracked.itemHistory.shift(); } - this.x = this.x + this.velocity.dx; - this.y = this.y + this.velocity.dy; + this.x += this.velocity.dx; + this.y += this.velocity.dy; }; itemTracked.predictNextPosition = function () { @@ -401,7 +1199,7 @@ utils.computeBearingIn360 = function (dx, dy) { x: this.x + this.velocity.dx, y: this.y + this.velocity.dy, w: this.w, - h: this.h + h: this.h, }; }; @@ -409,32 +1207,30 @@ utils.computeBearingIn360 = function (dx, dy) { return this.frameUnmatchedLeftBeforeDying < 0; }; // Velocity vector based on the last 15 frames - itemTracked.updateVelocityVector = function () { if (exports.ITEM_HISTORY_MAX_LENGTH <= 2) { return { dx: undefined, - dy: undefined + dy: undefined, }; } if (this.itemHistory.length <= exports.ITEM_HISTORY_MAX_LENGTH) { - var start = this.itemHistory[0]; - var end = this.itemHistory[this.itemHistory.length - 1]; + const start = this.itemHistory[0]; + const end = this.itemHistory[this.itemHistory.length - 1]; return computeVelocityVector(start, end, this.itemHistory.length); - } else { - var _start = this.itemHistory[this.itemHistory.length - exports.ITEM_HISTORY_MAX_LENGTH]; - var _end = this.itemHistory[this.itemHistory.length - 1]; - return computeVelocityVector(_start, _end, exports.ITEM_HISTORY_MAX_LENGTH); } + const _start = this.itemHistory[this.itemHistory.length - exports.ITEM_HISTORY_MAX_LENGTH]; + const _end = this.itemHistory[this.itemHistory.length - 1]; + return computeVelocityVector(_start, _end, exports.ITEM_HISTORY_MAX_LENGTH); }; itemTracked.getMostlyMatchedName = function () { - var _this = this; + const _this = this; - var nameMostlyMatchedOccurences = 0; - var nameMostlyMatched = ''; - Object.keys(this.nameCount).map(function (name) { + let nameMostlyMatchedOccurences = 0; + let nameMostlyMatched = ''; + Object.keys(this.nameCount).map((name) => { if (_this.nameCount[name] > nameMostlyMatchedOccurences) { nameMostlyMatched = name; nameMostlyMatchedOccurences = _this.nameCount[name]; @@ -444,7 +1240,7 @@ utils.computeBearingIn360 = function (dx, dy) { }; itemTracked.toJSONDebug = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + const roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; return { id: this.id, idDisplay: this.idDisplay, @@ -458,12 +1254,12 @@ utils.computeBearingIn360 = function (dx, dy) { name: this.getMostlyMatchedName(), isZombie: this.isZombie, appearFrame: this.appearFrame, - disappearFrame: this.disappearFrame + disappearFrame: this.disappearFrame, }; }; itemTracked.toJSON = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + const roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; return { id: this.idDisplay, x: roundInt ? parseInt(this.x, 10) : this.x, @@ -474,12 +1270,15 @@ utils.computeBearingIn360 = function (dx, dy) { // Here we negate dy to be in "normal" carthesian coordinates bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy), 10), name: this.getMostlyMatchedName(), - isZombie: this.isZombie + isZombie: this.isZombie, }; }; itemTracked.toMOT = function (frameIndex) { - return "".concat(frameIndex, ",").concat(this.idDisplay, ",").concat(this.x - this.w / 2, ",").concat(this.y - this.h / 2, ",").concat(this.w, ",").concat(this.h, ",").concat(this.confidence / 100, ",-1,-1,-1"); + return ''.concat(frameIndex, ',').concat(this.idDisplay, ',').concat(this.x - this.w / 2, ',').concat(this.y - this.h / 2, ',') + .concat(this.w, ',') + .concat(this.h, ',') + .concat(this.confidence / 100, ',-1,-1,-1'); }; itemTracked.toJSONGenericInfo = function () { @@ -490,7 +1289,7 @@ utils.computeBearingIn360 = function (dx, dy) { disappearFrame: this.disappearFrame, disappearArea: this.disappearArea, nbActiveFrame: this.disappearFrame - this.appearFrame, - name: this.getMostlyMatchedName() + name: this.getMostlyMatchedName(), }; }; @@ -500,9 +1299,9 @@ utils.computeBearingIn360 = function (dx, dy) { exports.reset = function () { idDisplay = 0; }; -})(ItemTracked$1); +}(ItemTracked$1)); -var kdTreeMin = {}; +const kdTreeMin = {}; /** * k-d Tree JavaScript - V 1.01 @@ -516,9 +1315,9 @@ var kdTreeMin = {}; */ (function (exports) { - !function (t, n) { - n(exports ); - }(commonjsGlobal, function (t) { + !(function (t, n) { + n(exports); + }(commonjsGlobal, (t) => { function n(t, n, o) { this.obj = t, this.left = null, this.right = null, this.parent = o, this.dimension = n; } @@ -528,153 +1327,154 @@ var kdTreeMin = {}; } o.prototype = { - push: function (t) { + push(t) { this.content.push(t), this.bubbleUp(this.content.length - 1); }, - pop: function () { - var t = this.content[0], - n = this.content.pop(); + pop() { + const t = this.content[0]; + const n = this.content.pop(); return this.content.length > 0 && (this.content[0] = n, this.sinkDown(0)), t; }, - peek: function () { + peek() { return this.content[0]; }, - remove: function (t) { - for (var n = this.content.length, o = 0; o < n; o++) if (this.content[o] == t) { - var i = this.content.pop(); - return void (o != n - 1 && (this.content[o] = i, this.scoreFunction(i) < this.scoreFunction(t) ? this.bubbleUp(o) : this.sinkDown(o))); + remove(t) { + for (let n = this.content.length, o = 0; o < n; o++) { + if (this.content[o] == t) { + const i = this.content.pop(); + return void (o != n - 1 && (this.content[o] = i, this.scoreFunction(i) < this.scoreFunction(t) ? this.bubbleUp(o) : this.sinkDown(o))); + } } - throw new Error("Node not found."); + throw new Error('Node not found.'); }, - size: function () { + size() { return this.content.length; }, - bubbleUp: function (t) { - for (var n = this.content[t]; t > 0;) { - var o = Math.floor((t + 1) / 2) - 1, - i = this.content[o]; + bubbleUp(t) { + for (let n = this.content[t]; t > 0;) { + const o = Math.floor((t + 1) / 2) - 1; + const i = this.content[o]; if (!(this.scoreFunction(n) < this.scoreFunction(i))) break; this.content[o] = n, this.content[t] = i, t = o; } }, - sinkDown: function (t) { - for (var n = this.content.length, o = this.content[t], i = this.scoreFunction(o);;) { - var e = 2 * (t + 1), - r = e - 1, - l = null; + sinkDown(t) { + for (let n = this.content.length, o = this.content[t], i = this.scoreFunction(o); ;) { + const e = 2 * (t + 1); + const r = e - 1; + let l = null; if (r < n) { - var u = this.content[r], - h = this.scoreFunction(u); + const u = this.content[r]; + var h = this.scoreFunction(u); h < i && (l = r); } if (e < n) { - var s = this.content[e]; - this.scoreFunction(s) < (null == l ? i : h) && (l = e); + const s = this.content[e]; + this.scoreFunction(s) < (l == null ? i : h) && (l = e); } - if (null == l) break; + if (l == null) break; this.content[t] = this.content[l], this.content[l] = o, t = l; } - } + }, }, t.kdTree = function (t, i, e) { function r(t, o, i) { - var l, - u, - h = o % e.length; - return 0 === t.length ? null : 1 === t.length ? new n(t[0], h, i) : (t.sort(function (t, n) { - return t[e[h]] - n[e[h]]; - }), l = Math.floor(t.length / 2), u = new n(t[l], h, i), u.left = r(t.slice(0, l), o + 1, u), u.right = r(t.slice(l + 1), o + 1, u), u); + let l; + let u; + const h = o % e.length; + return t.length === 0 ? null : t.length === 1 ? new n(t[0], h, i) : (t.sort((t, n) => t[e[h]] - n[e[h]]), l = Math.floor(t.length / 2), u = new n(t[l], h, i), u.left = r(t.slice(0, l), o + 1, u), u.right = r(t.slice(l + 1), o + 1, u), u); } - var l = this; - Array.isArray(t) ? this.root = r(t, 0, null) : function (t) { + const l = this; + Array.isArray(t) ? this.root = r(t, 0, null) : (function (t) { function n(t) { t.left && (t.left.parent = t, n(t.left)), t.right && (t.right.parent = t, n(t.right)); } l.root = t, n(l.root); - }(t), this.toJSON = function (t) { + }(t)), this.toJSON = function (t) { t || (t = this.root); - var o = new n(t.obj, t.dimension, null); + const o = new n(t.obj, t.dimension, null); return t.left && (o.left = l.toJSON(t.left)), t.right && (o.right = l.toJSON(t.right)), o; }, this.insert = function (t) { function o(n, i) { - if (null === n) return i; - var r = e[n.dimension]; + if (n === null) return i; + const r = e[n.dimension]; return t[r] < n.obj[r] ? o(n.left, n) : o(n.right, n); } - var i, - r, - l = o(this.root, null); - null !== l ? (i = new n(t, (l.dimension + 1) % e.length, l), r = e[l.dimension], t[r] < l.obj[r] ? l.left = i : l.right = i) : this.root = new n(t, 0, null); + let i; + let r; + const l = o(this.root, null); + l !== null ? (i = new n(t, (l.dimension + 1) % e.length, l), r = e[l.dimension], t[r] < l.obj[r] ? l.left = i : l.right = i) : this.root = new n(t, 0, null); }, this.remove = function (t) { function n(o) { - if (null === o) return null; + if (o === null) return null; if (o.obj === t) return o; - var i = e[o.dimension]; + const i = e[o.dimension]; return t[i] < o.obj[i] ? n(o.left) : n(o.right); } function o(t) { function n(t, o) { - var i, r, l, u, h; - return null === t ? null : (i = e[o], t.dimension === o ? null !== t.left ? n(t.left, o) : t : (r = t.obj[i], l = n(t.left, o), u = n(t.right, o), h = t, null !== l && l.obj[i] < r && (h = l), null !== u && u.obj[i] < h.obj[i] && (h = u), h)); + let i; let r; let l; let u; let + h; + return t === null ? null : (i = e[o], t.dimension === o ? t.left !== null ? n(t.left, o) : t : (r = t.obj[i], l = n(t.left, o), u = n(t.right, o), h = t, l !== null && l.obj[i] < r && (h = l), u !== null && u.obj[i] < h.obj[i] && (h = u), h)); } - var i, r, u; - if (null === t.left && null === t.right) return null === t.parent ? void (l.root = null) : (u = e[t.parent.dimension], void (t.obj[u] < t.parent.obj[u] ? t.parent.left = null : t.parent.right = null)); - null !== t.right ? (r = (i = n(t.right, t.dimension)).obj, o(i), t.obj = r) : (r = (i = n(t.left, t.dimension)).obj, o(i), t.right = t.left, t.left = null, t.obj = r); + let i; let r; let + u; + if (t.left === null && t.right === null) return t.parent === null ? void (l.root = null) : (u = e[t.parent.dimension], void (t.obj[u] < t.parent.obj[u] ? t.parent.left = null : t.parent.right = null)); + t.right !== null ? (r = (i = n(t.right, t.dimension)).obj, o(i), t.obj = r) : (r = (i = n(t.left, t.dimension)).obj, o(i), t.right = t.left, t.left = null, t.obj = r); } - var i; - null !== (i = n(l.root)) && o(i); + let i; + (i = n(l.root)) !== null && o(i); }, this.nearest = function (t, n, r) { function u(o) { function r(t, o) { f.push([t, o]), f.size() > n && f.pop(); } - var l, - h, - s, - c, - a = e[o.dimension], - g = i(t, o.obj), - p = {}; + let l; + let h; + let s; + let c; + const a = e[o.dimension]; + const g = i(t, o.obj); + const p = {}; for (c = 0; c < e.length; c += 1) c === o.dimension ? p[e[c]] = t[e[c]] : p[e[c]] = o.obj[e[c]]; - h = i(p, o.obj), null !== o.right || null !== o.left ? (u(l = null === o.right ? o.left : null === o.left ? o.right : t[a] < o.obj[a] ? o.left : o.right), (f.size() < n || g < f.peek()[1]) && r(o, g), (f.size() < n || Math.abs(h) < f.peek()[1]) && null !== (s = l === o.left ? o.right : o.left) && u(s)) : (f.size() < n || g < f.peek()[1]) && r(o, g); + h = i(p, o.obj), o.right !== null || o.left !== null ? (u(l = o.right === null ? o.left : o.left === null ? o.right : t[a] < o.obj[a] ? o.left : o.right), (f.size() < n || g < f.peek()[1]) && r(o, g), (f.size() < n || Math.abs(h) < f.peek()[1]) && (s = l === o.left ? o.right : o.left) !== null && u(s)) : (f.size() < n || g < f.peek()[1]) && r(o, g); } - var h, s, f; - if (f = new o(function (t) { - return -t[1]; - }), r) for (h = 0; h < n; h += 1) f.push([null, r]); + let h; let s; let + f; + if (f = new o((t) => -t[1]), r) for (h = 0; h < n; h += 1) f.push([null, r]); for (l.root && u(l.root), s = [], h = 0; h < Math.min(n, f.content.length); h += 1) f.content[h][0] && s.push([f.content[h][0].obj, f.content[h][1]]); return s; }, this.balanceFactor = function () { function t(n) { - return null === n ? 0 : Math.max(t(n.left), t(n.right)) + 1; + return n === null ? 0 : Math.max(t(n.left), t(n.right)) + 1; } function n(t) { - return null === t ? 0 : n(t.left) + n(t.right) + 1; + return t === null ? 0 : n(t.left) + n(t.right) + 1; } return t(l.root) / (Math.log(n(l.root)) / Math.log(2)); }; }, t.BinaryHeap = o; - }); -})(kdTreeMin); + })); +}(kdTreeMin)); -var lodash_isequal = {exports: {}}; +const lodash_isequal = { exports: {} }; /** * Lodash (Custom Build) @@ -687,99 +1487,98 @@ var lodash_isequal = {exports: {}}; (function (module, exports) { /** Used as the size to enable large array optimizations. */ - var LARGE_ARRAY_SIZE = 200; + const LARGE_ARRAY_SIZE = 200; /** Used to stand-in for `undefined` hash values. */ - var HASH_UNDEFINED = '__lodash_hash_undefined__'; + const HASH_UNDEFINED = '__lodash_hash_undefined__'; /** Used to compose bitmasks for value comparisons. */ - var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; + const COMPARE_PARTIAL_FLAG = 1; + const COMPARE_UNORDERED_FLAG = 2; /** Used as references for various `Number` constants. */ - var MAX_SAFE_INTEGER = 9007199254740991; + const MAX_SAFE_INTEGER = 9007199254740991; /** `Object#toString` result references. */ - var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - asyncTag = '[object AsyncFunction]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - mapTag = '[object Map]', - numberTag = '[object Number]', - nullTag = '[object Null]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - proxyTag = '[object Proxy]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]', - undefinedTag = '[object Undefined]', - weakMapTag = '[object WeakMap]'; - var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; + const argsTag = '[object Arguments]'; + const arrayTag = '[object Array]'; + const asyncTag = '[object AsyncFunction]'; + const boolTag = '[object Boolean]'; + const dateTag = '[object Date]'; + const errorTag = '[object Error]'; + const funcTag = '[object Function]'; + const genTag = '[object GeneratorFunction]'; + const mapTag = '[object Map]'; + const numberTag = '[object Number]'; + const nullTag = '[object Null]'; + const objectTag = '[object Object]'; + const promiseTag = '[object Promise]'; + const proxyTag = '[object Proxy]'; + const regexpTag = '[object RegExp]'; + const setTag = '[object Set]'; + const stringTag = '[object String]'; + const symbolTag = '[object Symbol]'; + const undefinedTag = '[object Undefined]'; + const weakMapTag = '[object WeakMap]'; + const arrayBufferTag = '[object ArrayBuffer]'; + const dataViewTag = '[object DataView]'; + const float32Tag = '[object Float32Array]'; + const float64Tag = '[object Float64Array]'; + const int8Tag = '[object Int8Array]'; + const int16Tag = '[object Int16Array]'; + const int32Tag = '[object Int32Array]'; + const uint8Tag = '[object Uint8Array]'; + const uint8ClampedTag = '[object Uint8ClampedArray]'; + const uint16Tag = '[object Uint16Array]'; + const uint32Tag = '[object Uint32Array]'; /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ - var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + const reRegExpChar = /[\\^$.*+?()[\]{}|]/g; /** Used to detect host constructors (Safari). */ - var reIsHostCtor = /^\[object .+?Constructor\]$/; + const reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used to detect unsigned integer values. */ - var reIsUint = /^(?:0|[1-9]\d*)$/; + const reIsUint = /^(?:0|[1-9]\d*)$/; /** Used to identify `toStringTag` values of typed arrays. */ - var typedArrayTags = {}; + const typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; /** Detect free variable `global` from Node.js. */ - var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + const freeGlobal = typeof commonjsGlobal === 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; /** Detect free variable `self`. */ - var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + const freeSelf = typeof self === 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ - var root = freeGlobal || freeSelf || Function('return this')(); + const root = freeGlobal || freeSelf || Function('return this')(); /** Detect free variable `exports`. */ - var freeExports = exports && !exports.nodeType && exports; + const freeExports = exports && !exports.nodeType && exports; /** Detect free variable `module`. */ - var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; + const freeModule = freeExports && 'object' === 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ - var moduleExports = freeModule && freeModule.exports === freeExports; + const moduleExports = freeModule && freeModule.exports === freeExports; /** Detect free variable `process` from Node.js. */ - var freeProcess = moduleExports && freeGlobal.process; + const freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ - var nodeUtil = function () { + const nodeUtil = (function () { try { return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} - }(); + }()); /* Node.js helper references. */ - - var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + const nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** * A specialized version of `_.filter` for arrays without support for * iteratee shorthands. @@ -791,13 +1590,13 @@ var lodash_isequal = {exports: {}}; */ function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; + let index = -1; + const length = array == null ? 0 : array.length; + let resIndex = 0; + const result = []; while (++index < length) { - var value = array[index]; + const value = array[index]; if (predicate(value, index, array)) { result[resIndex++] = value; @@ -815,11 +1614,10 @@ var lodash_isequal = {exports: {}}; * @returns {Array} Returns `array`. */ - function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; + let index = -1; + const { length } = values; + const offset = array.length; while (++index < length) { array[offset + index] = values[index]; @@ -838,10 +1636,9 @@ var lodash_isequal = {exports: {}}; * else `false`. */ - function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; + let index = -1; + const length = array == null ? 0 : array.length; while (++index < length) { if (predicate(array[index], index, array)) { @@ -861,10 +1658,9 @@ var lodash_isequal = {exports: {}}; * @returns {Array} Returns the array of results. */ - function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); + let index = -1; + const result = Array(n); while (++index < n) { result[index] = iteratee(index); @@ -880,7 +1676,6 @@ var lodash_isequal = {exports: {}}; * @returns {Function} Returns the new capped function. */ - function baseUnary(func) { return function (value) { return func(value); @@ -895,7 +1690,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function cacheHas(cache, key) { return cache.has(key); } @@ -908,7 +1702,6 @@ var lodash_isequal = {exports: {}}; * @returns {*} Returns the property value. */ - function getValue(object, key) { return object == null ? undefined : object[key]; } @@ -920,11 +1713,10 @@ var lodash_isequal = {exports: {}}; * @returns {Array} Returns the key-value pairs. */ - function mapToArray(map) { - var index = -1, - result = Array(map.size); - map.forEach(function (value, key) { + let index = -1; + const result = Array(map.size); + map.forEach((value, key) => { result[++index] = [key, value]; }); return result; @@ -938,7 +1730,6 @@ var lodash_isequal = {exports: {}}; * @returns {Function} Returns the new function. */ - function overArg(func, transform) { return function (arg) { return func(transform(arg)); @@ -952,79 +1743,76 @@ var lodash_isequal = {exports: {}}; * @returns {Array} Returns the values. */ - function setToArray(set) { - var index = -1, - result = Array(set.size); - set.forEach(function (value) { + let index = -1; + const result = Array(set.size); + set.forEach((value) => { result[++index] = value; }); return result; } /** Used for built-in method references. */ - - var arrayProto = Array.prototype, - funcProto = Function.prototype, - objectProto = Object.prototype; + const arrayProto = Array.prototype; + const funcProto = Function.prototype; + const objectProto = Object.prototype; /** Used to detect overreaching core-js shims. */ - var coreJsData = root['__core-js_shared__']; + const coreJsData = root['__core-js_shared__']; /** Used to resolve the decompiled source of functions. */ - var funcToString = funcProto.toString; + const funcToString = funcProto.toString; /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; + const { hasOwnProperty } = objectProto; /** Used to detect methods masquerading as native. */ - var maskSrcKey = function () { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? 'Symbol(src)_1.' + uid : ''; - }(); + const maskSrcKey = (function () { + const uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? `Symbol(src)_1.${uid}` : ''; + }()); /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ - - var nativeObjectToString = objectProto.toString; + const nativeObjectToString = objectProto.toString; /** Used to detect if a method is native. */ - var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); + const reIsNative = RegExp(`^${funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?')}$`); /** Built-in value references. */ - var Buffer = moduleExports ? root.Buffer : undefined, - Symbol = root.Symbol, - Uint8Array = root.Uint8Array, - propertyIsEnumerable = objectProto.propertyIsEnumerable, - splice = arrayProto.splice, - symToStringTag = Symbol ? Symbol.toStringTag : undefined; + const Buffer = moduleExports ? root.Buffer : undefined; + const { Symbol } = root; + const { Uint8Array } = root; + const { propertyIsEnumerable } = objectProto; + const { splice } = arrayProto; + const symToStringTag = Symbol ? Symbol.toStringTag : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ - var nativeGetSymbols = Object.getOwnPropertySymbols, - nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, - nativeKeys = overArg(Object.keys, Object); + const nativeGetSymbols = Object.getOwnPropertySymbols; + const nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + const nativeKeys = overArg(Object.keys, Object); /* Built-in method references that are verified to be native. */ - var DataView = getNative(root, 'DataView'), - Map = getNative(root, 'Map'), - Promise = getNative(root, 'Promise'), - Set = getNative(root, 'Set'), - WeakMap = getNative(root, 'WeakMap'), - nativeCreate = getNative(Object, 'create'); + const DataView = getNative(root, 'DataView'); + const Map = getNative(root, 'Map'); + const Promise = getNative(root, 'Promise'); + const Set = getNative(root, 'Set'); + const WeakMap = getNative(root, 'WeakMap'); + const nativeCreate = getNative(Object, 'create'); /** Used to detect maps, sets, and weakmaps. */ - var dataViewCtorString = toSource(DataView), - mapCtorString = toSource(Map), - promiseCtorString = toSource(Promise), - setCtorString = toSource(Set), - weakMapCtorString = toSource(WeakMap); + const dataViewCtorString = toSource(DataView); + const mapCtorString = toSource(Map); + const promiseCtorString = toSource(Promise); + const setCtorString = toSource(Set); + const weakMapCtorString = toSource(WeakMap); /** Used to convert symbols to primitives and strings. */ - var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + const symbolProto = Symbol ? Symbol.prototype : undefined; + const symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * Creates a hash object. * @@ -1034,12 +1822,12 @@ var lodash_isequal = {exports: {}}; */ function Hash(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; + let index = -1; + const length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { - var entry = entries[index]; + const entry = entries[index]; this.set(entry[0], entry[1]); } } @@ -1051,7 +1839,6 @@ var lodash_isequal = {exports: {}}; * @memberOf Hash */ - function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; this.size = 0; @@ -1067,9 +1854,8 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - function hashDelete(key) { - var result = this.has(key) && delete this.__data__[key]; + const result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; } @@ -1083,12 +1869,11 @@ var lodash_isequal = {exports: {}}; * @returns {*} Returns the entry value. */ - function hashGet(key) { - var data = this.__data__; + const data = this.__data__; if (nativeCreate) { - var result = data[key]; + const result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } @@ -1104,9 +1889,8 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function hashHas(key) { - var data = this.__data__; + const data = this.__data__; return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); } /** @@ -1120,17 +1904,15 @@ var lodash_isequal = {exports: {}}; * @returns {Object} Returns the hash instance. */ - function hashSet(key, value) { - var data = this.__data__; + const data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value; return this; } // Add methods to `Hash`. - Hash.prototype.clear = hashClear; - Hash.prototype['delete'] = hashDelete; + Hash.prototype.delete = hashDelete; Hash.prototype.get = hashGet; Hash.prototype.has = hashHas; Hash.prototype.set = hashSet; @@ -1143,12 +1925,12 @@ var lodash_isequal = {exports: {}}; */ function ListCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; + let index = -1; + const length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { - var entry = entries[index]; + const entry = entries[index]; this.set(entry[0], entry[1]); } } @@ -1160,7 +1942,6 @@ var lodash_isequal = {exports: {}}; * @memberOf ListCache */ - function listCacheClear() { this.__data__ = []; this.size = 0; @@ -1175,16 +1956,15 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); + const data = this.__data__; + const index = assocIndexOf(data, key); if (index < 0) { return false; } - var lastIndex = data.length - 1; + const lastIndex = data.length - 1; if (index == lastIndex) { data.pop(); @@ -1205,10 +1985,9 @@ var lodash_isequal = {exports: {}}; * @returns {*} Returns the entry value. */ - function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); + const data = this.__data__; + const index = assocIndexOf(data, key); return index < 0 ? undefined : data[index][1]; } /** @@ -1221,7 +2000,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function listCacheHas(key) { return assocIndexOf(this.__data__, key) > -1; } @@ -1236,10 +2014,9 @@ var lodash_isequal = {exports: {}}; * @returns {Object} Returns the list cache instance. */ - function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); + const data = this.__data__; + const index = assocIndexOf(data, key); if (index < 0) { ++this.size; @@ -1251,9 +2028,8 @@ var lodash_isequal = {exports: {}}; return this; } // Add methods to `ListCache`. - ListCache.prototype.clear = listCacheClear; - ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.delete = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; @@ -1266,12 +2042,12 @@ var lodash_isequal = {exports: {}}; */ function MapCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; + let index = -1; + const length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { - var entry = entries[index]; + const entry = entries[index]; this.set(entry[0], entry[1]); } } @@ -1283,13 +2059,12 @@ var lodash_isequal = {exports: {}}; * @memberOf MapCache */ - function mapCacheClear() { this.size = 0; this.__data__ = { - 'hash': new Hash(), - 'map': new (Map || ListCache)(), - 'string': new Hash() + hash: new Hash(), + map: new (Map || ListCache)(), + string: new Hash(), }; } /** @@ -1302,9 +2077,8 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - function mapCacheDelete(key) { - var result = getMapData(this, key)['delete'](key); + const result = getMapData(this, key).delete(key); this.size -= result ? 1 : 0; return result; } @@ -1318,7 +2092,6 @@ var lodash_isequal = {exports: {}}; * @returns {*} Returns the entry value. */ - function mapCacheGet(key) { return getMapData(this, key).get(key); } @@ -1332,7 +2105,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function mapCacheHas(key) { return getMapData(this, key).has(key); } @@ -1347,18 +2119,16 @@ var lodash_isequal = {exports: {}}; * @returns {Object} Returns the map cache instance. */ - function mapCacheSet(key, value) { - var data = getMapData(this, key), - size = data.size; + const data = getMapData(this, key); + const { size } = data; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; } // Add methods to `MapCache`. - MapCache.prototype.clear = mapCacheClear; - MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.delete = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; @@ -1372,8 +2142,8 @@ var lodash_isequal = {exports: {}}; */ function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; + let index = -1; + const length = values == null ? 0 : values.length; this.__data__ = new MapCache(); while (++index < length) { @@ -1391,7 +2161,6 @@ var lodash_isequal = {exports: {}}; * @returns {Object} Returns the cache instance. */ - function setCacheAdd(value) { this.__data__.set(value, HASH_UNDEFINED); @@ -1407,12 +2176,10 @@ var lodash_isequal = {exports: {}}; * @returns {number} Returns `true` if `value` is found, else `false`. */ - function setCacheHas(value) { return this.__data__.has(value); } // Add methods to `SetCache`. - SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; SetCache.prototype.has = setCacheHas; /** @@ -1424,7 +2191,7 @@ var lodash_isequal = {exports: {}}; */ function Stack(entries) { - var data = this.__data__ = new ListCache(entries); + const data = this.__data__ = new ListCache(entries); this.size = data.size; } /** @@ -1435,7 +2202,6 @@ var lodash_isequal = {exports: {}}; * @memberOf Stack */ - function stackClear() { this.__data__ = new ListCache(); this.size = 0; @@ -1450,10 +2216,9 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - function stackDelete(key) { - var data = this.__data__, - result = data['delete'](key); + const data = this.__data__; + const result = data.delete(key); this.size = data.size; return result; } @@ -1467,7 +2232,6 @@ var lodash_isequal = {exports: {}}; * @returns {*} Returns the entry value. */ - function stackGet(key) { return this.__data__.get(key); } @@ -1481,7 +2245,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function stackHas(key) { return this.__data__.has(key); } @@ -1496,12 +2259,11 @@ var lodash_isequal = {exports: {}}; * @returns {Object} Returns the stack cache instance. */ - function stackSet(key, value) { - var data = this.__data__; + let data = this.__data__; if (data instanceof ListCache) { - var pairs = data.__data__; + const pairs = data.__data__; if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) { pairs.push([key, value]); @@ -1517,9 +2279,8 @@ var lodash_isequal = {exports: {}}; return this; } // Add methods to `Stack`. - Stack.prototype.clear = stackClear; - Stack.prototype['delete'] = stackDelete; + Stack.prototype.delete = stackDelete; Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; @@ -1533,20 +2294,20 @@ var lodash_isequal = {exports: {}}; */ function arrayLikeKeys(value, inherited) { - var isArr = isArray(value), - isArg = !isArr && isArguments(value), - isBuff = !isArr && !isArg && isBuffer(value), - isType = !isArr && !isArg && !isBuff && isTypedArray(value), - skipIndexes = isArr || isArg || isBuff || isType, - result = skipIndexes ? baseTimes(value.length, String) : [], - length = result.length; - - for (var key in value) { + const isArr = isArray(value); + const isArg = !isArr && isArguments(value); + const isBuff = !isArr && !isArg && isBuffer(value); + const isType = !isArr && !isArg && !isBuff && isTypedArray(value); + const skipIndexes = isArr || isArg || isBuff || isType; + const result = skipIndexes ? baseTimes(value.length, String) : []; + const { length } = result; + + for (const key in value) { if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. - key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. - isBuff && (key == 'offset' || key == 'parent') || // PhantomJS 2 has enumerable non-index properties on typed arrays. - isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || // Skip index properties. - isIndex(key, length)))) { + key == 'length' // Node.js 0.10 has enumerable non-index properties on buffers. + || isBuff && (key == 'offset' || key == 'parent') // PhantomJS 2 has enumerable non-index properties on typed arrays. + || isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') // Skip index properties. + || isIndex(key, length)))) { result.push(key); } } @@ -1562,9 +2323,8 @@ var lodash_isequal = {exports: {}}; * @returns {number} Returns the index of the matched value, else `-1`. */ - function assocIndexOf(array, key) { - var length = array.length; + let { length } = array; while (length--) { if (eq(array[length][0], key)) { @@ -1586,9 +2346,8 @@ var lodash_isequal = {exports: {}}; * @returns {Array} Returns the array of property names and symbols. */ - function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); + const result = keysFunc(object); return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } /** @@ -1599,7 +2358,6 @@ var lodash_isequal = {exports: {}}; * @returns {string} Returns the `toStringTag`. */ - function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; @@ -1615,7 +2373,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if `value` is an `arguments` object, */ - function baseIsArguments(value) { return isObjectLike(value) && baseGetTag(value) == argsTag; } @@ -1634,7 +2391,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ - function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; @@ -1661,17 +2417,16 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ - function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = objIsArr ? arrayTag : getTag(object), - othTag = othIsArr ? arrayTag : getTag(other); + let objIsArr = isArray(object); + const othIsArr = isArray(other); + let objTag = objIsArr ? arrayTag : getTag(object); + let othTag = othIsArr ? arrayTag : getTag(other); objTag = objTag == argsTag ? objectTag : objTag; othTag = othTag == argsTag ? objectTag : othTag; - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; + let objIsObj = objTag == objectTag; + const othIsObj = othTag == objectTag; + const isSameTag = objTag == othTag; if (isSameTag && isBuffer(object)) { if (!isBuffer(other)) { @@ -1688,12 +2443,12 @@ var lodash_isequal = {exports: {}}; } if (!(bitmask & COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + const objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'); + const othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; + const objUnwrapped = objIsWrapped ? object.value() : object; + const othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new Stack()); return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } @@ -1715,13 +2470,12 @@ var lodash_isequal = {exports: {}}; * else `false`. */ - function baseIsNative(value) { if (!isObject(value) || isMasked(value)) { return false; } - var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + const pattern = isFunction(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } /** @@ -1732,7 +2486,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ - function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } @@ -1744,15 +2497,14 @@ var lodash_isequal = {exports: {}}; * @returns {Array} Returns the array of property names. */ - function baseKeys(object) { if (!isPrototype(object)) { return nativeKeys(object); } - var result = []; + const result = []; - for (var key in Object(object)) { + for (const key in Object(object)) { if (hasOwnProperty.call(object, key) && key != 'constructor') { result.push(key); } @@ -1774,32 +2526,30 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ - function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; + const isPartial = bitmask & COMPARE_PARTIAL_FLAG; + const arrLength = array.length; + const othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } // Assume cyclic values are equal. - - var stacked = stack.get(array); + const stacked = stack.get(array); if (stacked && stack.get(other)) { return stacked == other; } - var index = -1, - result = true, - seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined; + let index = -1; + let result = true; + const seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined; stack.set(array, other); stack.set(other, array); // Ignore non-index properties. while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; + var arrValue = array[index]; + const othValue = other[index]; if (customizer) { var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); @@ -1814,9 +2564,8 @@ var lodash_isequal = {exports: {}}; break; } // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!arraySome(other, function (othValue, othIndex) { + if (!arraySome(other, (othValue, othIndex) => { if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { return seen.push(othIndex); } @@ -1830,8 +2579,8 @@ var lodash_isequal = {exports: {}}; } } - stack['delete'](array); - stack['delete'](other); + stack.delete(array); + stack.delete(other); return result; } /** @@ -1852,7 +2601,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ - function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { switch (tag) { case dataViewTag: @@ -1885,7 +2633,7 @@ var lodash_isequal = {exports: {}}; // Coerce regexes to strings and treat strings, primitives and objects, // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring // for more details. - return object == other + ''; + return object == `${other}`; case mapTag: var convert = mapToArray; @@ -1898,7 +2646,6 @@ var lodash_isequal = {exports: {}}; return false; } // Assume cyclic values are equal. - var stacked = stack.get(object); if (stacked) { @@ -1909,14 +2656,13 @@ var lodash_isequal = {exports: {}}; stack.set(object, other); var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); + stack.delete(object); return result; case symbolTag: if (symbolValueOf) { return symbolValueOf.call(object) == symbolValueOf.call(other); } - } return false; @@ -1935,19 +2681,18 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ - function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - objProps = getAllKeys(object), - objLength = objProps.length, - othProps = getAllKeys(other), - othLength = othProps.length; + const isPartial = bitmask & COMPARE_PARTIAL_FLAG; + const objProps = getAllKeys(object); + const objLength = objProps.length; + const othProps = getAllKeys(other); + const othLength = othProps.length; if (objLength != othLength && !isPartial) { return false; } - var index = objLength; + let index = objLength; while (index--) { var key = objProps[index]; @@ -1957,28 +2702,26 @@ var lodash_isequal = {exports: {}}; } } // Assume cyclic values are equal. - - var stacked = stack.get(object); + const stacked = stack.get(object); if (stacked && stack.get(other)) { return stacked == other; } - var result = true; + let result = true; stack.set(object, other); stack.set(other, object); - var skipCtor = isPartial; + let skipCtor = isPartial; while (++index < objLength) { key = objProps[index]; - var objValue = object[key], - othValue = other[key]; + const objValue = object[key]; + const othValue = other[key]; if (customizer) { var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); } // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { result = false; break; @@ -1988,16 +2731,16 @@ var lodash_isequal = {exports: {}}; } if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. + const objCtor = object.constructor; + const othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { + if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor === 'function' && objCtor instanceof objCtor && typeof othCtor === 'function' && othCtor instanceof othCtor)) { result = false; } } - stack['delete'](object); - stack['delete'](other); + stack.delete(object); + stack.delete(other); return result; } /** @@ -2008,7 +2751,6 @@ var lodash_isequal = {exports: {}}; * @returns {Array} Returns the array of property names and symbols. */ - function getAllKeys(object) { return baseGetAllKeys(object, keys, getSymbols); } @@ -2021,10 +2763,9 @@ var lodash_isequal = {exports: {}}; * @returns {*} Returns the map data. */ - function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; + const data = map.__data__; + return isKeyable(key) ? data[typeof key === 'string' ? 'string' : 'hash'] : data.map; } /** * Gets the native function at `key` of `object`. @@ -2035,9 +2776,8 @@ var lodash_isequal = {exports: {}}; * @returns {*} Returns the function if it's native, else `undefined`. */ - function getNative(object, key) { - var value = getValue(object, key); + const value = getValue(object, key); return baseIsNative(value) ? value : undefined; } /** @@ -2048,17 +2788,16 @@ var lodash_isequal = {exports: {}}; * @returns {string} Returns the raw `toStringTag`. */ - function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; + const isOwn = hasOwnProperty.call(value, symToStringTag); + const tag = value[symToStringTag]; try { value[symToStringTag] = undefined; var unmasked = true; } catch (e) {} - var result = nativeObjectToString.call(value); + const result = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { @@ -2078,16 +2817,13 @@ var lodash_isequal = {exports: {}}; * @returns {Array} Returns the array of symbols. */ - var getSymbols = !nativeGetSymbols ? stubArray : function (object) { if (object == null) { return []; } object = Object(object); - return arrayFilter(nativeGetSymbols(object), function (symbol) { - return propertyIsEnumerable.call(object, symbol); - }); + return arrayFilter(nativeGetSymbols(object), (symbol) => propertyIsEnumerable.call(object, symbol)); }; /** * Gets the `toStringTag` of `value`. @@ -2101,9 +2837,9 @@ var lodash_isequal = {exports: {}}; if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) { getTag = function (value) { - var result = baseGetTag(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : ''; + const result = baseGetTag(value); + const Ctor = result == objectTag ? value.constructor : undefined; + const ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { @@ -2136,10 +2872,9 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ - function isIndex(value, length) { length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length; + return !!length && (typeof value === 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length; } /** * Checks if `value` is suitable for use as unique object key. @@ -2149,9 +2884,8 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ - function isKeyable(value) { - var type = typeof value; + const type = typeof value; return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null; } /** @@ -2162,7 +2896,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ - function isMasked(func) { return !!maskSrcKey && maskSrcKey in func; } @@ -2174,10 +2907,9 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ - function isPrototype(value) { - var Ctor = value && value.constructor, - proto = typeof Ctor == 'function' && Ctor.prototype || objectProto; + const Ctor = value && value.constructor; + const proto = typeof Ctor === 'function' && Ctor.prototype || objectProto; return value === proto; } /** @@ -2188,7 +2920,6 @@ var lodash_isequal = {exports: {}}; * @returns {string} Returns the converted string. */ - function objectToString(value) { return nativeObjectToString.call(value); } @@ -2200,7 +2931,6 @@ var lodash_isequal = {exports: {}}; * @returns {string} Returns the source code. */ - function toSource(func) { if (func != null) { try { @@ -2208,7 +2938,7 @@ var lodash_isequal = {exports: {}}; } catch (e) {} try { - return func + ''; + return `${func}`; } catch (e) {} } @@ -2247,7 +2977,6 @@ var lodash_isequal = {exports: {}}; * // => true */ - function eq(value, other) { return value === other || value !== value && other !== other; } @@ -2270,12 +2999,11 @@ var lodash_isequal = {exports: {}}; * // => false */ - var isArguments = baseIsArguments(function () { return arguments; }()) ? baseIsArguments : function (value) { - return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); - }; + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); + }; /** * Checks if `value` is classified as an `Array` object. * @@ -2300,7 +3028,7 @@ var lodash_isequal = {exports: {}}; * // => false */ - var isArray = Array.isArray; + var { isArray } = Array; /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or @@ -2348,7 +3076,6 @@ var lodash_isequal = {exports: {}}; * // => false */ - var isBuffer = nativeIsBuffer || stubFalse; /** * Performs a deep comparison between two values to determine if they are @@ -2400,15 +3127,13 @@ var lodash_isequal = {exports: {}}; * // => false */ - function isFunction(value) { if (!isObject(value)) { return false; } // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 9 which returns 'object' for typed arrays and other constructors. - - var tag = baseGetTag(value); + const tag = baseGetTag(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } /** @@ -2438,9 +3163,8 @@ var lodash_isequal = {exports: {}}; * // => false */ - function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + return typeof value === 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } /** * Checks if `value` is the @@ -2468,9 +3192,8 @@ var lodash_isequal = {exports: {}}; * // => false */ - function isObject(value) { - var type = typeof value; + const type = typeof value; return value != null && (type == 'object' || type == 'function'); } /** @@ -2498,9 +3221,8 @@ var lodash_isequal = {exports: {}}; * // => false */ - function isObjectLike(value) { - return value != null && typeof value == 'object'; + return value != null && typeof value === 'object'; } /** * Checks if `value` is classified as a typed array. @@ -2520,7 +3242,6 @@ var lodash_isequal = {exports: {}}; * // => false */ - var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; /** * Creates an array of the own enumerable property names of `object`. @@ -2573,7 +3294,6 @@ var lodash_isequal = {exports: {}}; * // => false */ - function stubArray() { return []; } @@ -2591,15 +3311,14 @@ var lodash_isequal = {exports: {}}; * // => [false, false] */ - function stubFalse() { return false; } module.exports = isEqual; -})(lodash_isequal, lodash_isequal.exports); +}(lodash_isequal, lodash_isequal.exports)); -var munkres$1 = {exports: {}}; +const munkres$1 = { exports: {} }; /** * Introduction @@ -2775,9 +3494,9 @@ var munkres$1 = {exports: {}}; * * Copyright and License * ===================== - * + * * Copyright 2008-2016 Brian M. Clapper - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -2796,12 +3515,12 @@ var munkres$1 = {exports: {}}; * A very large numerical value which can be used like an integer * (i. e., adding integers of similar size does not result in overflow). */ - var MAX_SIZE = parseInt(Number.MAX_SAFE_INTEGER / 2) || (1 << 26) * (1 << 26); + const MAX_SIZE = parseInt(Number.MAX_SAFE_INTEGER / 2) || (1 << 26) * (1 << 26); /** * A default value to pad the cost matrix with if it is not quadratic. */ - var DEFAULT_PAD_VALUE = 0; // --------------------------------------------------------------------------- + const DEFAULT_PAD_VALUE = 0; // --------------------------------------------------------------------------- // Classes // --------------------------------------------------------------------------- @@ -2830,21 +3549,20 @@ var munkres$1 = {exports: {}}; * @return {Array} An array of arrays representing the padded matrix */ - Munkres.prototype.pad_matrix = function (matrix, pad_value) { pad_value = pad_value || DEFAULT_PAD_VALUE; - var max_columns = 0; - var total_rows = matrix.length; - var i; + let max_columns = 0; + let total_rows = matrix.length; + let i; for (i = 0; i < total_rows; ++i) if (matrix[i].length > max_columns) max_columns = matrix[i].length; total_rows = max_columns > total_rows ? max_columns : total_rows; - var new_matrix = []; + const new_matrix = []; for (i = 0; i < total_rows; ++i) { - var row = matrix[i] || []; - var new_row = row.slice(); // If this row is too short, pad it + const row = matrix[i] || []; + const new_row = row.slice(); // If this row is too short, pad it while (total_rows > new_row.length) new_row.push(pad_value); @@ -2873,7 +3591,6 @@ var munkres$1 = {exports: {}}; * cost path through the matrix */ - Munkres.prototype.compute = function (cost_matrix, options) { options = options || {}; options.padValue = options.padValue || DEFAULT_PAD_VALUE; @@ -2881,7 +3598,7 @@ var munkres$1 = {exports: {}}; this.n = this.C.length; this.original_length = cost_matrix.length; this.original_width = cost_matrix[0].length; - var nfalseArray = []; + const nfalseArray = []; /* array of n false values */ while (nfalseArray.length < this.n) nfalseArray.push(false); @@ -2892,26 +3609,26 @@ var munkres$1 = {exports: {}}; this.Z0_c = 0; this.path = this.__make_matrix(this.n * 2, 0); this.marked = this.__make_matrix(this.n, 0); - var step = 1; - var steps = { + let step = 1; + const steps = { 1: this.__step1, 2: this.__step2, 3: this.__step3, 4: this.__step4, 5: this.__step5, - 6: this.__step6 + 6: this.__step6, }; while (true) { - var func = steps[step]; + const func = steps[step]; if (!func) // done - break; + { break; } step = func.apply(this); } - var results = []; + const results = []; - for (var i = 0; i < this.original_length; ++i) for (var j = 0; j < this.original_width; ++j) if (this.marked[i][j] == 1) results.push([i, j]); + for (let i = 0; i < this.original_length; ++i) for (let j = 0; j < this.original_width; ++j) if (this.marked[i][j] == 1) results.push([i, j]); return results; }; @@ -2924,14 +3641,13 @@ var munkres$1 = {exports: {}}; * @return {Array} An array of arrays representing the newly created matrix */ - Munkres.prototype.__make_matrix = function (n, val) { - var matrix = []; + const matrix = []; - for (var i = 0; i < n; ++i) { + for (let i = 0; i < n; ++i) { matrix[i] = []; - for (var j = 0; j < n; ++j) matrix[i][j] = val; + for (let j = 0; j < n; ++j) matrix[i][j] = val; } return matrix; @@ -2941,14 +3657,13 @@ var munkres$1 = {exports: {}}; * subtract it from every element in its row. Go to Step 2. */ - Munkres.prototype.__step1 = function () { - for (var i = 0; i < this.n; ++i) { + for (let i = 0; i < this.n; ++i) { // Find the minimum value for this row and subtract that minimum // from every element in the row. - var minval = Math.min.apply(Math, this.C[i]); + const minval = Math.min.apply(Math, this.C[i]); - for (var j = 0; j < this.n; ++j) this.C[i][j] -= minval; + for (let j = 0; j < this.n; ++j) this.C[i][j] -= minval; } return 2; @@ -2959,10 +3674,9 @@ var munkres$1 = {exports: {}}; * matrix. Go to Step 3. */ - Munkres.prototype.__step2 = function () { - for (var i = 0; i < this.n; ++i) { - for (var j = 0; j < this.n; ++j) { + for (let i = 0; i < this.n; ++i) { + for (let j = 0; j < this.n; ++j) { if (this.C[i][j] === 0 && !this.col_covered[j] && !this.row_covered[i]) { this.marked[i][j] = 1; this.col_covered[j] = true; @@ -2982,12 +3696,11 @@ var munkres$1 = {exports: {}}; * assignments. In this case, Go to DONE, otherwise, Go to Step 4. */ - Munkres.prototype.__step3 = function () { - var count = 0; + let count = 0; - for (var i = 0; i < this.n; ++i) { - for (var j = 0; j < this.n; ++j) { + for (let i = 0; i < this.n; ++i) { + for (let j = 0; j < this.n; ++j) { if (this.marked[i][j] == 1 && this.col_covered[j] == false) { this.col_covered[j] = true; ++count; @@ -3005,15 +3718,14 @@ var munkres$1 = {exports: {}}; * left. Save the smallest uncovered value and Go to Step 6. */ - Munkres.prototype.__step4 = function () { - var done = false; - var row = -1, - col = -1, - star_col = -1; + const done = false; + let row = -1; + let col = -1; + let star_col = -1; while (!done) { - var z = this.__find_a_zero(); + const z = this.__find_a_zero(); row = z[0]; col = z[1]; @@ -3043,15 +3755,14 @@ var munkres$1 = {exports: {}}; * primes and uncover every line in the matrix. Return to Step 3 */ - Munkres.prototype.__step5 = function () { - var count = 0; + let count = 0; this.path[count][0] = this.Z0_r; this.path[count][1] = this.Z0_c; - var done = false; + let done = false; while (!done) { - var row = this.__find_star_in_col(this.path[count][1]); + const row = this.__find_star_in_col(this.path[count][1]); if (row >= 0) { count++; @@ -3062,7 +3773,7 @@ var munkres$1 = {exports: {}}; } if (!done) { - var col = this.__find_prime_in_row(this.path[count][0]); + const col = this.__find_prime_in_row(this.path[count][0]); count++; this.path[count][0] = this.path[count - 1][0]; @@ -3085,12 +3796,11 @@ var munkres$1 = {exports: {}}; * lines. */ - Munkres.prototype.__step6 = function () { - var minval = this.__find_smallest(); + const minval = this.__find_smallest(); - for (var i = 0; i < this.n; ++i) { - for (var j = 0; j < this.n; ++j) { + for (let i = 0; i < this.n; ++i) { + for (let j = 0; j < this.n; ++j) { if (this.row_covered[i]) this.C[i][j] += minval; if (!this.col_covered[j]) this.C[i][j] -= minval; } @@ -3104,11 +3814,10 @@ var munkres$1 = {exports: {}}; * @return {Number} The smallest uncovered value, or MAX_SIZE if no value was found */ - Munkres.prototype.__find_smallest = function () { - var minval = MAX_SIZE; + let minval = MAX_SIZE; - for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (!this.row_covered[i] && !this.col_covered[j]) if (minval > this.C[i][j]) minval = this.C[i][j]; + for (let i = 0; i < this.n; ++i) for (let j = 0; j < this.n; ++j) if (!this.row_covered[i] && !this.col_covered[j]) if (minval > this.C[i][j]) minval = this.C[i][j]; return minval; }; @@ -3118,9 +3827,8 @@ var munkres$1 = {exports: {}}; * @return {Array} The indices of the found element or [-1, -1] if not found */ - Munkres.prototype.__find_a_zero = function () { - for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.C[i][j] === 0 && !this.row_covered[i] && !this.col_covered[j]) return [i, j]; + for (let i = 0; i < this.n; ++i) for (let j = 0; j < this.n; ++j) if (this.C[i][j] === 0 && !this.row_covered[i] && !this.col_covered[j]) return [i, j]; return [-1, -1]; }; @@ -3132,9 +3840,8 @@ var munkres$1 = {exports: {}}; * @return {Number} */ - Munkres.prototype.__find_star_in_row = function (row) { - for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 1) return j; + for (let j = 0; j < this.n; ++j) if (this.marked[row][j] == 1) return j; return -1; }; @@ -3144,9 +3851,8 @@ var munkres$1 = {exports: {}}; * @return {Number} The row index, or -1 if no starred element was found */ - Munkres.prototype.__find_star_in_col = function (col) { - for (var i = 0; i < this.n; ++i) if (this.marked[i][col] == 1) return i; + for (let i = 0; i < this.n; ++i) if (this.marked[i][col] == 1) return i; return -1; }; @@ -3156,30 +3862,27 @@ var munkres$1 = {exports: {}}; * @return {Number} The column index, or -1 if no prime element was found */ - Munkres.prototype.__find_prime_in_row = function (row) { - for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 2) return j; + for (let j = 0; j < this.n; ++j) if (this.marked[row][j] == 2) return j; return -1; }; Munkres.prototype.__convert_path = function (path, count) { - for (var i = 0; i <= count; ++i) this.marked[path[i][0]][path[i][1]] = this.marked[path[i][0]][path[i][1]] == 1 ? 0 : 1; + for (let i = 0; i <= count; ++i) this.marked[path[i][0]][path[i][1]] = this.marked[path[i][0]][path[i][1]] == 1 ? 0 : 1; }; /** Clear all covered matrix cells */ - Munkres.prototype.__clear_covers = function () { - for (var i = 0; i < this.n; ++i) { + for (let i = 0; i < this.n; ++i) { this.row_covered[i] = false; this.col_covered[i] = false; } }; /** Erase all prime markings */ - Munkres.prototype.__erase_primes = function () { - for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.marked[i][j] == 2) this.marked[i][j] = 0; + for (let i = 0; i < this.n; ++i) for (let j = 0; j < this.n; ++j) if (this.marked[i][j] == 2) this.marked[i][j] = 0; }; // --------------------------------------------------------------------------- // Functions // --------------------------------------------------------------------------- @@ -3207,12 +3910,12 @@ var munkres$1 = {exports: {}}; * @return {Array} The converted matrix */ - function make_cost_matrix(profit_matrix, inversion_function) { - var i, j; + let i; let + j; if (!inversion_function) { - var maximum = -1.0 / 0.0; + let maximum = -1.0 / 0.0; for (i = 0; i < profit_matrix.length; ++i) for (j = 0; j < profit_matrix[i].length; ++j) if (profit_matrix[i][j] > maximum) maximum = profit_matrix[i][j]; @@ -3221,10 +3924,10 @@ var munkres$1 = {exports: {}}; }; } - var cost_matrix = []; + const cost_matrix = []; for (i = 0; i < profit_matrix.length; ++i) { - var row = profit_matrix[i]; + const row = profit_matrix[i]; cost_matrix[i] = []; for (j = 0; j < row.length; ++j) cost_matrix[i][j] = inversion_function(profit_matrix[i][j]); @@ -3241,25 +3944,25 @@ var munkres$1 = {exports: {}}; * @return {String} The formatted matrix */ - function format_matrix(matrix) { - var columnWidths = []; - var i, j; + const columnWidths = []; + let i; let + j; for (i = 0; i < matrix.length; ++i) { for (j = 0; j < matrix[i].length; ++j) { - var entryWidth = String(matrix[i][j]).length; + const entryWidth = String(matrix[i][j]).length; if (!columnWidths[j] || entryWidth >= columnWidths[j]) columnWidths[j] = entryWidth; } } - var formatted = ''; + let formatted = ''; for (i = 0; i < matrix.length; ++i) { for (j = 0; j < matrix[i].length; ++j) { - var s = String(matrix[i][j]); // pad at front with spaces + let s = String(matrix[i][j]); // pad at front with spaces - while (s.length < columnWidths[j]) s = ' ' + s; + while (s.length < columnWidths[j]) s = ` ${s}`; formatted += s; // separate columns @@ -3274,13 +3977,12 @@ var munkres$1 = {exports: {}}; // Exports // --------------------------------------------------------------------------- - function computeMunkres(cost_matrix, options) { - var m = new Munkres(); + const m = new Munkres(); return m.compute(cost_matrix, options); } - computeMunkres.version = "1.2.2"; + computeMunkres.version = '1.2.2'; computeMunkres.format_matrix = format_matrix; computeMunkres.make_cost_matrix = make_cost_matrix; computeMunkres.Munkres = Munkres; // backwards compatibility @@ -3288,20 +3990,20 @@ var munkres$1 = {exports: {}}; if (module.exports) { module.exports = computeMunkres; } -})(munkres$1); +}(munkres$1)); -var itemTrackedModule = ItemTracked$1; -var ItemTracked = itemTrackedModule.ItemTracked; -var kdTree = kdTreeMin.kdTree; -var iouAreas = utils.iouAreas; -var munkres = munkres$1.exports; +const itemTrackedModule = ItemTracked$1; +const { ItemTracked } = itemTrackedModule; +const { kdTree } = kdTreeMin; +const { iouAreas } = utils; +const munkres = munkres$1.exports; -var iouDistance = function iouDistance(item1, item2) { +const iouDistance = function iouDistance(item1, item2) { // IOU distance, between 0 and 1 // The smaller the less overlap - var iou = iouAreas(item1, item2); // Invert this as the KDTREESEARCH is looking for the smaller value + const iou = iouAreas(item1, item2); // Invert this as the KDTREESEARCH is looking for the smaller value - var distance = 1 - iou; // If the overlap is iou < 0.95, exclude value + let distance = 1 - iou; // If the overlap is iou < 0.95, exclude value if (distance > 1 - params.iouLimit) { distance = params.distanceLimit + 1; @@ -3329,31 +4031,31 @@ var params = { distanceLimit: 10000, // The algorithm used to match tracks with new detections. Can be either // 'kdTree' or 'munkres'. - matchingAlgorithm: 'munkres' // matchingAlgorithm: 'kdTree', + matchingAlgorithm: 'munkres', // matchingAlgorithm: 'kdTree', }; // A dictionary of itemTracked currently tracked // key: uuid // value: ItemTracked object -var mapOfItemsTracked = new Map(); // A dictionnary keeping memory of all tracked object (even after they disappear) +let mapOfItemsTracked = new Map(); // A dictionnary keeping memory of all tracked object (even after they disappear) // Useful to ouput the file of all items tracked -var mapOfAllItemsTracked = new Map(); // By default, we do not keep all the history in memory +let mapOfAllItemsTracked = new Map(); // By default, we do not keep all the history in memory -var keepAllHistoryInMemory = false; -var computeDistance = tracker.computeDistance = iouDistance; +let keepAllHistoryInMemory = false; +const computeDistance = tracker.computeDistance = iouDistance; -var updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameNb) { +const updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameNb) { // A kd-tree containing all the itemtracked // Need to rebuild on each frame, because itemTracked positions have changed - var treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ["x", "y", "w", "h"]); // Contruct a kd tree for the detections of this frame + let treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ['x', 'y', 'w', 'h']); // Contruct a kd tree for the detections of this frame - var treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ["x", "y", "w", "h"]); // SCENARIO 1: itemsTracked map is empty + const treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ['x', 'y', 'w', 'h']); // SCENARIO 1: itemsTracked map is empty if (mapOfItemsTracked.size === 0) { // Just add every detected item as item Tracked - detectionsOfThisFrame.forEach(function (itemDetected) { - var newItemTracked = new ItemTracked(itemDetected, frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map + detectionsOfThisFrame.forEach((itemDetected) => { + const newItemTracked = new ItemTracked(itemDetected, frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree @@ -3361,81 +4063,70 @@ var updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = fu }); } // SCENARIO 2: We already have itemsTracked in the map else { - var matchedList = new Array(detectionsOfThisFrame.length); + const matchedList = new Array(detectionsOfThisFrame.length); matchedList.fill(false); // Match existing Tracked items with the items detected in the new frame // For each look in the new detection to find the closest match if (detectionsOfThisFrame.length > 0) { if (params.matchingAlgorithm === 'munkres') { - var trackedItemIds = Array.from(mapOfItemsTracked.keys()); - var costMatrix = Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { - var predictedPosition = itemTracked.predictNextPosition(); - return detectionsOfThisFrame.map(function (detection) { - return params.distanceFunc(predictedPosition, detection); - }); + const trackedItemIds = Array.from(mapOfItemsTracked.keys()); + const costMatrix = Array.from(mapOfItemsTracked.values()).map((itemTracked) => { + const predictedPosition = itemTracked.predictNextPosition(); + return detectionsOfThisFrame.map((detection) => params.distanceFunc(predictedPosition, detection)); }); - mapOfItemsTracked.forEach(function (itemTracked) { + mapOfItemsTracked.forEach((itemTracked) => { itemTracked.makeAvailable(); }); - munkres(costMatrix).filter(function (m) { - return costMatrix[m[0]][m[1]] <= params.distanceLimit; - }).forEach(function (m) { - var itemTracked = mapOfItemsTracked.get(trackedItemIds[m[0]]); - var updatedTrackedItemProperties = detectionsOfThisFrame[m[1]]; + munkres(costMatrix).filter((m) => costMatrix[m[0]][m[1]] <= params.distanceLimit).forEach((m) => { + const itemTracked = mapOfItemsTracked.get(trackedItemIds[m[0]]); + const updatedTrackedItemProperties = detectionsOfThisFrame[m[1]]; matchedList[m[1]] = { - idDisplay: itemTracked.idDisplay + idDisplay: itemTracked.idDisplay, }; itemTracked.makeUnavailable().update(updatedTrackedItemProperties, frameNb); }); - matchedList.forEach(function (matched, index) { + matchedList.forEach((matched, index) => { if (!matched) { - if (Math.min.apply(Math, _toConsumableArray(costMatrix.map(function (m) { - return m[index]; - }))) > params.distanceLimit) { - var newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); + if (Math.min.apply(Math, _toConsumableArray(costMatrix.map((m) => m[index]))) > params.distanceLimit) { + const newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); mapOfItemsTracked.set(newItemTracked.id, newItemTracked); newItemTracked.makeUnavailable(); - costMatrix.push(detectionsOfThisFrame.map(function (detection) { - return params.distanceFunc(newItemTracked, detection); - })); + costMatrix.push(detectionsOfThisFrame.map((detection) => params.distanceFunc(newItemTracked, detection))); } } }); } else if (params.matchingAlgorithm === 'kdTree') { - mapOfItemsTracked.forEach(function (itemTracked) { + mapOfItemsTracked.forEach((itemTracked) => { // First predict the new position of the itemTracked - var predictedPosition = itemTracked.predictNextPosition(); // Make available for matching + const predictedPosition = itemTracked.predictNextPosition(); // Make available for matching itemTracked.makeAvailable(); // Search for a detection that matches - var treeSearchResult = treeDetectionsOfThisFrame.nearest(predictedPosition, 1, params.distanceLimit)[0]; // Only for debug assessments of predictions + const treeSearchResult = treeDetectionsOfThisFrame.nearest(predictedPosition, 1, params.distanceLimit)[0]; // Only for debug assessments of predictions treeDetectionsOfThisFrame.nearest(itemTracked, 1, params.distanceLimit)[0]; // Only if we enable the extra refinement treeDetectionsOfThisFrame.nearest(predictedPosition, 2, params.distanceLimit); // If we have found something if (treeSearchResult) { - - var indexClosestNewDetectedItem = detectionsOfThisFrame.indexOf(treeSearchResult[0]); // If this detections was not already matched to a tracked item + const indexClosestNewDetectedItem = detectionsOfThisFrame.indexOf(treeSearchResult[0]); // If this detections was not already matched to a tracked item // (otherwise it would be matched to two tracked items...) if (!matchedList[indexClosestNewDetectedItem]) { matchedList[indexClosestNewDetectedItem] = { - idDisplay: itemTracked.idDisplay + idDisplay: itemTracked.idDisplay, }; // Update properties of tracked object - var updatedTrackedItemProperties = detectionsOfThisFrame[indexClosestNewDetectedItem]; + const updatedTrackedItemProperties = detectionsOfThisFrame[indexClosestNewDetectedItem]; mapOfItemsTracked.get(itemTracked.id).makeUnavailable().update(updatedTrackedItemProperties, frameNb); } } }); } else { - throw "Unknown matching algorithm \"".concat(params.matchingAlgorithm, "\""); + throw 'Unknown matching algorithm "'.concat(params.matchingAlgorithm, '"'); } } else { - - - mapOfItemsTracked.forEach(function (itemTracked) { + mapOfItemsTracked.forEach((itemTracked) => { itemTracked.makeAvailable(); }); } @@ -3446,16 +4137,16 @@ var updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = fu if (mapOfItemsTracked.size > 0) { // Safety check to see if we still have object tracked (could have been deleted previously) // Rebuild tracked item tree to take in account the new positions - treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ["x", "y", "w", "h"]); // console.log(`Nb new items Unmatched : ${matchedList.filter((isMatched) => isMatched === false).length}`) + treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ['x', 'y', 'w', 'h']); // console.log(`Nb new items Unmatched : ${matchedList.filter((isMatched) => isMatched === false).length}`) - matchedList.forEach(function (matched, index) { + matchedList.forEach((matched, index) => { // Iterate through unmatched new detections if (!matched) { // Do not add as new tracked item if it is to similar to an existing one - var treeSearchResult = treeItemsTracked.nearest(detectionsOfThisFrame[index], 1, params.distanceLimit)[0]; + const treeSearchResult = treeItemsTracked.nearest(detectionsOfThisFrame[index], 1, params.distanceLimit)[0]; if (!treeSearchResult) { - var newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map + const newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree @@ -3469,14 +4160,13 @@ var updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = fu } // Start killing the itemTracked (and predicting next position) // that are tracked but haven't been matched this frame - - mapOfItemsTracked.forEach(function (itemTracked) { + mapOfItemsTracked.forEach((itemTracked) => { if (itemTracked.available) { itemTracked.countDown(frameNb); itemTracked.updateTheoricalPositionAndSize(); if (itemTracked.isDead()) { - mapOfItemsTracked["delete"](itemTracked.id); + mapOfItemsTracked.delete(itemTracked.id); treeItemsTracked.remove(itemTracked); if (keepAllHistoryInMemory) { @@ -3488,60 +4178,50 @@ var updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = fu } }; -var reset = tracker.reset = function () { +const reset = tracker.reset = function () { mapOfItemsTracked = new Map(); mapOfAllItemsTracked = new Map(); itemTrackedModule.reset(); }; -var setParams = tracker.setParams = function (newParams) { - Object.keys(newParams).forEach(function (key) { +const setParams = tracker.setParams = function (newParams) { + Object.keys(newParams).forEach((key) => { params[key] = newParams[key]; }); }; -var enableKeepInMemory = tracker.enableKeepInMemory = function () { +const enableKeepInMemory = tracker.enableKeepInMemory = function () { keepAllHistoryInMemory = true; }; -var disableKeepInMemory = tracker.disableKeepInMemory = function () { +const disableKeepInMemory = tracker.disableKeepInMemory = function () { keepAllHistoryInMemory = false; }; -var getJSONOfTrackedItems = tracker.getJSONOfTrackedItems = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { - return itemTracked.toJSON(roundInt); - }); +const getJSONOfTrackedItems = tracker.getJSONOfTrackedItems = function () { + const roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return Array.from(mapOfItemsTracked.values()).map((itemTracked) => itemTracked.toJSON(roundInt)); }; -var getJSONDebugOfTrackedItems = tracker.getJSONDebugOfTrackedItems = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { - return itemTracked.toJSONDebug(roundInt); - }); +const getJSONDebugOfTrackedItems = tracker.getJSONDebugOfTrackedItems = function () { + const roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return Array.from(mapOfItemsTracked.values()).map((itemTracked) => itemTracked.toJSONDebug(roundInt)); }; -var getTrackedItemsInMOTFormat = tracker.getTrackedItemsInMOTFormat = function (frameNb) { - return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { - return itemTracked.toMOT(frameNb); - }); +const getTrackedItemsInMOTFormat = tracker.getTrackedItemsInMOTFormat = function (frameNb) { + return Array.from(mapOfItemsTracked.values()).map((itemTracked) => itemTracked.toMOT(frameNb)); }; // Work only if keepInMemory is enabled - -var getAllTrackedItems = tracker.getAllTrackedItems = function () { +const getAllTrackedItems = tracker.getAllTrackedItems = function () { return mapOfAllItemsTracked; }; // Work only if keepInMemory is enabled - -var getJSONOfAllTrackedItems = tracker.getJSONOfAllTrackedItems = function () { - return Array.from(mapOfAllItemsTracked.values()).map(function (itemTracked) { - return itemTracked.toJSONGenericInfo(); - }); +const getJSONOfAllTrackedItems = tracker.getJSONOfAllTrackedItems = function () { + return Array.from(mapOfAllItemsTracked.values()).map((itemTracked) => itemTracked.toJSONGenericInfo()); }; exports.computeDistance = computeDistance; -exports["default"] = tracker; +exports.default = tracker; exports.disableKeepInMemory = disableKeepInMemory; exports.enableKeepInMemory = enableKeepInMemory; exports.getAllTrackedItems = getAllTrackedItems; diff --git a/bundle.esm.js b/bundle.esm.js new file mode 100644 index 0000000..84a3f1b --- /dev/null +++ b/bundle.esm.js @@ -0,0 +1,4376 @@ +function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); +} + +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); +} + +function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); +} + +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); +} + +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + + return arr2; +} + +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} + +var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + +var tracker = {}; + +var ItemTracked$1 = {}; + +var commonjsBrowser = {}; + +var v1$1 = {}; + +var rng$1 = {}; + +Object.defineProperty(rng$1, "__esModule", { + value: true +}); + +rng$1.default = rng; // Unique ID creation requires a high quality random # generator. In the browser we therefore +// require the crypto API and do not support built-in fallback to lower quality random number +// generators (like Math.random()). + + +let getRandomValues; +const rnds8 = new Uint8Array(16); + +function rng() { + // lazy load so that environments that need to polyfill have a chance to do so + if (!getRandomValues) { + // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. + getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto); + + if (!getRandomValues) { + throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported'); + } + } + + return getRandomValues(rnds8); +} + +var stringify$1 = {}; + +var validate$1 = {}; + +var regex = {}; + +Object.defineProperty(regex, "__esModule", { + value: true +}); +regex.default = void 0; +var _default$c = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; +regex.default = _default$c; + +Object.defineProperty(validate$1, "__esModule", { + value: true +}); +validate$1.default = void 0; + +var _regex = _interopRequireDefault$8(regex); + +function _interopRequireDefault$8(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function validate(uuid) { + return typeof uuid === 'string' && _regex.default.test(uuid); +} + +var _default$b = validate; +validate$1.default = _default$b; + +Object.defineProperty(stringify$1, "__esModule", { + value: true +}); +stringify$1.default = void 0; +stringify$1.unsafeStringify = unsafeStringify; + +var _validate$2 = _interopRequireDefault$7(validate$1); + +function _interopRequireDefault$7(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ + + +const byteToHex = []; + +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).slice(1)); +} + +function unsafeStringify(arr, offset = 0) { + // Note: Be careful editing this code! It's been tuned for performance + // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 + return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); +} + +function stringify(arr, offset = 0) { + const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one + // of the following: + // - One or more input array values don't map to a hex octet (leading to + // "undefined" in the uuid) + // - Invalid input values for the RFC `version` or `variant` fields + + if (!(0, _validate$2.default)(uuid)) { + throw TypeError('Stringified UUID is invalid'); + } + + return uuid; +} + +var _default$a = stringify; +stringify$1.default = _default$a; + +Object.defineProperty(v1$1, "__esModule", { + value: true +}); +v1$1.default = void 0; + +var _rng$1 = _interopRequireDefault$6(rng$1); + +var _stringify$2 = stringify$1; + +function _interopRequireDefault$6(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} // **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html + + +let _nodeId; + +let _clockseq; // Previous uuid creation time + + +let _lastMSecs = 0; +let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || _rng$1.default)(); + + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + + + let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + + let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) + + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression + + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + + + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested + + + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + + msecs += 12219292800000; // `time_low` + + const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` + + const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` + + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` + + b[i++] = clockseq & 0xff; // `node` + + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf || (0, _stringify$2.unsafeStringify)(b); +} + +var _default$9 = v1; +v1$1.default = _default$9; + +var v3$1 = {}; + +var v35$1 = {}; + +var parse$1 = {}; + +Object.defineProperty(parse$1, "__esModule", { + value: true +}); +parse$1.default = void 0; + +var _validate$1 = _interopRequireDefault$5(validate$1); + +function _interopRequireDefault$5(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function parse(uuid) { + if (!(0, _validate$1.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + let v; + const arr = new Uint8Array(16); // Parse ########-....-....-....-............ + + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 0xff; + arr[2] = v >>> 8 & 0xff; + arr[3] = v & 0xff; // Parse ........-####-....-....-............ + + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 0xff; // Parse ........-....-####-....-............ + + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 0xff; // Parse ........-....-....-####-............ + + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 0xff; // Parse ........-....-....-....-############ + // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) + + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; + arr[11] = v / 0x100000000 & 0xff; + arr[12] = v >>> 24 & 0xff; + arr[13] = v >>> 16 & 0xff; + arr[14] = v >>> 8 & 0xff; + arr[15] = v & 0xff; + return arr; +} + +var _default$8 = parse; +parse$1.default = _default$8; + +Object.defineProperty(v35$1, "__esModule", { + value: true +}); +v35$1.URL = v35$1.DNS = void 0; + +v35$1.default = v35; + +var _stringify$1 = stringify$1; + +var _parse = _interopRequireDefault$4(parse$1); + +function _interopRequireDefault$4(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + + const bytes = []; + + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + + return bytes; +} + +const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +v35$1.DNS = DNS; +const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +v35$1.URL = URL; + +function v35(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + var _namespace; + + if (typeof value === 'string') { + value = stringToBytes(value); + } + + if (typeof namespace === 'string') { + namespace = (0, _parse.default)(namespace); + } + + if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { + throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); + } // Compute hash of namespace and value, Per 4.3 + // Future: Use spread syntax when supported on all platforms, e.g. `bytes = + // hashfunc([...namespace, ... value])` + + + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + + return buf; + } + + return (0, _stringify$1.unsafeStringify)(bytes); + } // Function#name is not settable on some platforms (#270) + + + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support + + + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} + +var md5$1 = {}; + +Object.defineProperty(md5$1, "__esModule", { + value: true +}); +md5$1.default = void 0; +/* + * Browser-compatible JavaScript MD5 + * + * Modification of JavaScript MD5 + * https://github.com/blueimp/JavaScript-MD5 + * + * Copyright 2011, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * https://opensource.org/licenses/MIT + * + * Based on + * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message + * Digest Algorithm, as defined in RFC 1321. + * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009 + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for more info. + */ + +function md5(bytes) { + if (typeof bytes === 'string') { + const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape + + bytes = new Uint8Array(msg.length); + + for (let i = 0; i < msg.length; ++i) { + bytes[i] = msg.charCodeAt(i); + } + } + + return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8)); +} +/* + * Convert an array of little-endian words to an array of bytes + */ + + +function md5ToHexEncodedArray(input) { + const output = []; + const length32 = input.length * 32; + const hexTab = '0123456789abcdef'; + + for (let i = 0; i < length32; i += 8) { + const x = input[i >> 5] >>> i % 32 & 0xff; + const hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16); + output.push(hex); + } + + return output; +} +/** + * Calculate output length with padding and bit length + */ + + +function getOutputLength(inputLength8) { + return (inputLength8 + 64 >>> 9 << 4) + 14 + 1; +} +/* + * Calculate the MD5 of an array of little-endian words, and a bit length. + */ + + +function wordsToMd5(x, len) { + /* append padding */ + x[len >> 5] |= 0x80 << len % 32; + x[getOutputLength(len) - 1] = len; + let a = 1732584193; + let b = -271733879; + let c = -1732584194; + let d = 271733878; + + for (let i = 0; i < x.length; i += 16) { + const olda = a; + const oldb = b; + const oldc = c; + const oldd = d; + a = md5ff(a, b, c, d, x[i], 7, -680876936); + d = md5ff(d, a, b, c, x[i + 1], 12, -389564586); + c = md5ff(c, d, a, b, x[i + 2], 17, 606105819); + b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330); + a = md5ff(a, b, c, d, x[i + 4], 7, -176418897); + d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426); + c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341); + b = md5ff(b, c, d, a, x[i + 7], 22, -45705983); + a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416); + d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417); + c = md5ff(c, d, a, b, x[i + 10], 17, -42063); + b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162); + a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682); + d = md5ff(d, a, b, c, x[i + 13], 12, -40341101); + c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290); + b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329); + a = md5gg(a, b, c, d, x[i + 1], 5, -165796510); + d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632); + c = md5gg(c, d, a, b, x[i + 11], 14, 643717713); + b = md5gg(b, c, d, a, x[i], 20, -373897302); + a = md5gg(a, b, c, d, x[i + 5], 5, -701558691); + d = md5gg(d, a, b, c, x[i + 10], 9, 38016083); + c = md5gg(c, d, a, b, x[i + 15], 14, -660478335); + b = md5gg(b, c, d, a, x[i + 4], 20, -405537848); + a = md5gg(a, b, c, d, x[i + 9], 5, 568446438); + d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690); + c = md5gg(c, d, a, b, x[i + 3], 14, -187363961); + b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501); + a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467); + d = md5gg(d, a, b, c, x[i + 2], 9, -51403784); + c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473); + b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734); + a = md5hh(a, b, c, d, x[i + 5], 4, -378558); + d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463); + c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562); + b = md5hh(b, c, d, a, x[i + 14], 23, -35309556); + a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060); + d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353); + c = md5hh(c, d, a, b, x[i + 7], 16, -155497632); + b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640); + a = md5hh(a, b, c, d, x[i + 13], 4, 681279174); + d = md5hh(d, a, b, c, x[i], 11, -358537222); + c = md5hh(c, d, a, b, x[i + 3], 16, -722521979); + b = md5hh(b, c, d, a, x[i + 6], 23, 76029189); + a = md5hh(a, b, c, d, x[i + 9], 4, -640364487); + d = md5hh(d, a, b, c, x[i + 12], 11, -421815835); + c = md5hh(c, d, a, b, x[i + 15], 16, 530742520); + b = md5hh(b, c, d, a, x[i + 2], 23, -995338651); + a = md5ii(a, b, c, d, x[i], 6, -198630844); + d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415); + c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905); + b = md5ii(b, c, d, a, x[i + 5], 21, -57434055); + a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571); + d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606); + c = md5ii(c, d, a, b, x[i + 10], 15, -1051523); + b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799); + a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359); + d = md5ii(d, a, b, c, x[i + 15], 10, -30611744); + c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380); + b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649); + a = md5ii(a, b, c, d, x[i + 4], 6, -145523070); + d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379); + c = md5ii(c, d, a, b, x[i + 2], 15, 718787259); + b = md5ii(b, c, d, a, x[i + 9], 21, -343485551); + a = safeAdd(a, olda); + b = safeAdd(b, oldb); + c = safeAdd(c, oldc); + d = safeAdd(d, oldd); + } + + return [a, b, c, d]; +} +/* + * Convert an array bytes to an array of little-endian words + * Characters >255 have their high-byte silently ignored. + */ + + +function bytesToWords(input) { + if (input.length === 0) { + return []; + } + + const length8 = input.length * 8; + const output = new Uint32Array(getOutputLength(length8)); + + for (let i = 0; i < length8; i += 8) { + output[i >> 5] |= (input[i / 8] & 0xff) << i % 32; + } + + return output; +} +/* + * Add integers, wrapping at 2^32. This uses 16-bit operations internally + * to work around bugs in some JS interpreters. + */ + + +function safeAdd(x, y) { + const lsw = (x & 0xffff) + (y & 0xffff); + const msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return msw << 16 | lsw & 0xffff; +} +/* + * Bitwise rotate a 32-bit number to the left. + */ + + +function bitRotateLeft(num, cnt) { + return num << cnt | num >>> 32 - cnt; +} +/* + * These functions implement the four basic operations the algorithm uses. + */ + + +function md5cmn(q, a, b, x, s, t) { + return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); +} + +function md5ff(a, b, c, d, x, s, t) { + return md5cmn(b & c | ~b & d, a, b, x, s, t); +} + +function md5gg(a, b, c, d, x, s, t) { + return md5cmn(b & d | c & ~d, a, b, x, s, t); +} + +function md5hh(a, b, c, d, x, s, t) { + return md5cmn(b ^ c ^ d, a, b, x, s, t); +} + +function md5ii(a, b, c, d, x, s, t) { + return md5cmn(c ^ (b | ~d), a, b, x, s, t); +} + +var _default$7 = md5; +md5$1.default = _default$7; + +Object.defineProperty(v3$1, "__esModule", { + value: true +}); +v3$1.default = void 0; + +var _v$1 = _interopRequireDefault$3(v35$1); + +var _md = _interopRequireDefault$3(md5$1); + +function _interopRequireDefault$3(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +const v3 = (0, _v$1.default)('v3', 0x30, _md.default); +var _default$6 = v3; +v3$1.default = _default$6; + +var v4$1 = {}; + +var native = {}; + +Object.defineProperty(native, "__esModule", { + value: true +}); +native.default = void 0; +const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto); +var _default$5 = { + randomUUID +}; +native.default = _default$5; + +Object.defineProperty(v4$1, "__esModule", { + value: true +}); +v4$1.default = void 0; + +var _native = _interopRequireDefault$2(native); + +var _rng = _interopRequireDefault$2(rng$1); + +var _stringify = stringify$1; + +function _interopRequireDefault$2(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function v4(options, buf, offset) { + if (_native.default.randomUUID && !buf && !options) { + return _native.default.randomUUID(); + } + + options = options || {}; + + const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + + return buf; + } + + return (0, _stringify.unsafeStringify)(rnds); +} + +var _default$4 = v4; +v4$1.default = _default$4; + +var v5$1 = {}; + +var sha1$1 = {}; + +Object.defineProperty(sha1$1, "__esModule", { + value: true +}); +sha1$1.default = void 0; // Adapted from Chris Veness' SHA1 code at +// http://www.movable-type.co.uk/scripts/sha1.html + +function f(s, x, y, z) { + switch (s) { + case 0: + return x & y ^ ~x & z; + + case 1: + return x ^ y ^ z; + + case 2: + return x & y ^ x & z ^ y & z; + + case 3: + return x ^ y ^ z; + } +} + +function ROTL(x, n) { + return x << n | x >>> 32 - n; +} + +function sha1(bytes) { + const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6]; + const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]; + + if (typeof bytes === 'string') { + const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape + + bytes = []; + + for (let i = 0; i < msg.length; ++i) { + bytes.push(msg.charCodeAt(i)); + } + } else if (!Array.isArray(bytes)) { + // Convert Array-like to Array + bytes = Array.prototype.slice.call(bytes); + } + + bytes.push(0x80); + const l = bytes.length / 4 + 2; + const N = Math.ceil(l / 16); + const M = new Array(N); + + for (let i = 0; i < N; ++i) { + const arr = new Uint32Array(16); + + for (let j = 0; j < 16; ++j) { + arr[j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3]; + } + + M[i] = arr; + } + + M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32); + M[N - 1][14] = Math.floor(M[N - 1][14]); + M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff; + + for (let i = 0; i < N; ++i) { + const W = new Uint32Array(80); + + for (let t = 0; t < 16; ++t) { + W[t] = M[i][t]; + } + + for (let t = 16; t < 80; ++t) { + W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1); + } + + let a = H[0]; + let b = H[1]; + let c = H[2]; + let d = H[3]; + let e = H[4]; + + for (let t = 0; t < 80; ++t) { + const s = Math.floor(t / 20); + const T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0; + e = d; + d = c; + c = ROTL(b, 30) >>> 0; + b = a; + a = T; + } + + H[0] = H[0] + a >>> 0; + H[1] = H[1] + b >>> 0; + H[2] = H[2] + c >>> 0; + H[3] = H[3] + d >>> 0; + H[4] = H[4] + e >>> 0; + } + + return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff]; +} + +var _default$3 = sha1; +sha1$1.default = _default$3; + +Object.defineProperty(v5$1, "__esModule", { + value: true +}); +v5$1.default = void 0; + +var _v = _interopRequireDefault$1(v35$1); + +var _sha = _interopRequireDefault$1(sha1$1); + +function _interopRequireDefault$1(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +const v5 = (0, _v.default)('v5', 0x50, _sha.default); +var _default$2 = v5; +v5$1.default = _default$2; + +var nil = {}; + +Object.defineProperty(nil, "__esModule", { + value: true +}); +nil.default = void 0; +var _default$1 = '00000000-0000-0000-0000-000000000000'; +nil.default = _default$1; + +var version$1 = {}; + +Object.defineProperty(version$1, "__esModule", { + value: true +}); +version$1.default = void 0; + +var _validate = _interopRequireDefault(validate$1); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +function version(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + return parseInt(uuid.slice(14, 15), 16); +} + +var _default = version; +version$1.default = _default; + +(function (exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + Object.defineProperty(exports, "NIL", { + enumerable: true, + get: function get() { + return _nil.default; + } + }); + Object.defineProperty(exports, "parse", { + enumerable: true, + get: function get() { + return _parse.default; + } + }); + Object.defineProperty(exports, "stringify", { + enumerable: true, + get: function get() { + return _stringify.default; + } + }); + Object.defineProperty(exports, "v1", { + enumerable: true, + get: function get() { + return _v.default; + } + }); + Object.defineProperty(exports, "v3", { + enumerable: true, + get: function get() { + return _v2.default; + } + }); + Object.defineProperty(exports, "v4", { + enumerable: true, + get: function get() { + return _v3.default; + } + }); + Object.defineProperty(exports, "v5", { + enumerable: true, + get: function get() { + return _v4.default; + } + }); + Object.defineProperty(exports, "validate", { + enumerable: true, + get: function get() { + return _validate.default; + } + }); + Object.defineProperty(exports, "version", { + enumerable: true, + get: function get() { + return _version.default; + } + }); + + var _v = _interopRequireDefault(v1$1); + + var _v2 = _interopRequireDefault(v3$1); + + var _v3 = _interopRequireDefault(v4$1); + + var _v4 = _interopRequireDefault(v5$1); + + var _nil = _interopRequireDefault(nil); + + var _version = _interopRequireDefault(version$1); + + var _validate = _interopRequireDefault(validate$1); + + var _stringify = _interopRequireDefault(stringify$1); + + var _parse = _interopRequireDefault(parse$1); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; + } +})(commonjsBrowser); + +var utils = {}; + +utils.isDetectionTooLarge = function (detections, largestAllowed) { + if (detections.w >= largestAllowed) { + return true; + } + + return false; +}; + +var isInsideArea = function isInsideArea(area, point) { + var xMin = area.x - area.w / 2; + var xMax = area.x + area.w / 2; + var yMin = area.y - area.h / 2; + var yMax = area.y + area.h / 2; + + if (point.x >= xMin && point.x <= xMax && point.y >= yMin && point.y <= yMax) { + return true; + } + + return false; +}; + +utils.isInsideArea = isInsideArea; + +utils.isInsideSomeAreas = function (areas, point) { + var isInside = areas.some(function (area) { + return isInsideArea(area, point); + }); + return isInside; +}; + +utils.ignoreObjectsNotToDetect = function (detections, objectsToDetect) { + return detections.filter(function (detection) { + return objectsToDetect.indexOf(detection.name) > -1; + }); +}; + +var getRectangleEdges = function getRectangleEdges(item) { + return { + x0: item.x - item.w / 2, + y0: item.y - item.h / 2, + x1: item.x + item.w / 2, + y1: item.y + item.h / 2 + }; +}; + +utils.getRectangleEdges = getRectangleEdges; + +utils.iouAreas = function (item1, item2) { + var rect1 = getRectangleEdges(item1); + var rect2 = getRectangleEdges(item2); // Get overlap rectangle + + var overlap_x0 = Math.max(rect1.x0, rect2.x0); + var overlap_y0 = Math.max(rect1.y0, rect2.y0); + var overlap_x1 = Math.min(rect1.x1, rect2.x1); + var overlap_y1 = Math.min(rect1.y1, rect2.y1); // if there an overlap + + if (overlap_x1 - overlap_x0 <= 0 || overlap_y1 - overlap_y0 <= 0) { + // no overlap + return 0; + } + + var area_rect1 = item1.w * item1.h; + var area_rect2 = item2.w * item2.h; + var area_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0); + var area_union = area_rect1 + area_rect2 - area_intersection; + return area_intersection / area_union; +}; + +utils.computeVelocityVector = function (item1, item2, nbFrame) { + return { + dx: (item2.x - item1.x) / nbFrame, + dy: (item2.y - item1.y) / nbFrame + }; +}; +/* + + computeBearingIn360 + + dY + + ^ XX + | XXX + | XX + | XX + | XX + | XXX + | XX + | XX + | XX bearing = this angle in degree + | XX + |XX ++----------------------XX-----------------------> dX + | + | + | + | + | + | + | + | + | + | + | + + + +*/ + + +utils.computeBearingIn360 = function (dx, dy) { + var angle = Math.atan(dx / dy) / (Math.PI / 180); + + if (angle > 0) { + if (dy > 0) { + return angle; + } + + return 180 + angle; + } + + if (dx > 0) { + return 180 + angle; + } + + return 360 + angle; +}; + +(function (exports) { + var uuidv4 = commonjsBrowser.v4; + var computeBearingIn360 = utils.computeBearingIn360; + var computeVelocityVector = utils.computeVelocityVector; // Properties example + // { + // "x": 1021, + // "y": 65, + // "w": 34, + // "h": 27, + // "confidence": 26, + // "name": "car" + // } + + /** The maximum length of the item history. */ + + exports.ITEM_HISTORY_MAX_LENGTH = 15; // Use a simple incremental unique id for the display + + var idDisplay = 0; + + exports.ItemTracked = function (properties, frameNb, unMatchedFramesTolerance, fastDelete) { + var DEFAULT_UNMATCHEDFRAMES_TOLERANCE = unMatchedFramesTolerance; + var itemTracked = {}; // ==== Private ===== + // Am I available to be matched? + + itemTracked.available = true; // Should I be deleted? + + itemTracked["delete"] = false; + itemTracked.fastDelete = fastDelete; // How many unmatched frame should I survive? + + itemTracked.frameUnmatchedLeftBeforeDying = unMatchedFramesTolerance; + itemTracked.isZombie = false; + itemTracked.appearFrame = frameNb; + itemTracked.disappearFrame = null; + itemTracked.disappearArea = {}; // Keep track of the most counted class + + itemTracked.nameCount = {}; + itemTracked.nameCount[properties.name] = 1; // ==== Public ===== + + itemTracked.x = properties.x; + itemTracked.y = properties.y; + itemTracked.w = properties.w; + itemTracked.h = properties.h; + itemTracked.name = properties.name; + itemTracked.confidence = properties.confidence; + itemTracked.itemHistory = []; + itemTracked.itemHistory.push({ + x: properties.x, + y: properties.y, + w: properties.w, + h: properties.h, + confidence: properties.confidence + }); + + if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { + itemTracked.itemHistory.shift(); + } + + itemTracked.velocity = { + dx: 0, + dy: 0 + }; + itemTracked.nbTimeMatched = 1; // Assign an unique id to each Item tracked + + itemTracked.id = uuidv4(); // Use an simple id for the display and debugging + + itemTracked.idDisplay = idDisplay; + idDisplay++; // Give me a new location / size + + itemTracked.update = function (properties, frameNb) { + // if it was zombie and disappear frame was set, reset it to null + if (this.disappearFrame) { + this.disappearFrame = null; + this.disappearArea = {}; + } + + this.isZombie = false; + this.nbTimeMatched += 1; + this.x = properties.x; + this.y = properties.y; + this.w = properties.w; + this.h = properties.h; + this.confidence = properties.confidence; + this.itemHistory.push({ + x: this.x, + y: this.y, + w: this.w, + h: this.h, + confidence: this.confidence + }); + + if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { + itemTracked.itemHistory.shift(); + } + + this.name = properties.name; + + if (this.nameCount[properties.name]) { + this.nameCount[properties.name]++; + } else { + this.nameCount[properties.name] = 1; + } // Reset dying counter + + + this.frameUnmatchedLeftBeforeDying = DEFAULT_UNMATCHEDFRAMES_TOLERANCE; // Compute new velocityVector based on last positions history + + this.velocity = this.updateVelocityVector(); + }; + + itemTracked.makeAvailable = function () { + this.available = true; + return this; + }; + + itemTracked.makeUnavailable = function () { + this.available = false; + return this; + }; + + itemTracked.countDown = function (frameNb) { + // Set frame disappear number + if (this.disappearFrame === null) { + this.disappearFrame = frameNb; + this.disappearArea = { + x: this.x, + y: this.y, + w: this.w, + h: this.h + }; + } + + this.frameUnmatchedLeftBeforeDying--; + this.isZombie = true; // If it was matched less than 1 time, it should die quick + + if (this.fastDelete && this.nbTimeMatched <= 1) { + this.frameUnmatchedLeftBeforeDying = -1; + } + }; + + itemTracked.updateTheoricalPositionAndSize = function () { + this.itemHistory.push({ + x: this.x, + y: this.y, + w: this.w, + h: this.h, + confidence: this.confidence + }); + + if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { + itemTracked.itemHistory.shift(); + } + + this.x += this.velocity.dx; + this.y += this.velocity.dy; + }; + + itemTracked.predictNextPosition = function () { + return { + x: this.x + this.velocity.dx, + y: this.y + this.velocity.dy, + w: this.w, + h: this.h + }; + }; + + itemTracked.isDead = function () { + return this.frameUnmatchedLeftBeforeDying < 0; + }; // Velocity vector based on the last 15 frames + + + itemTracked.updateVelocityVector = function () { + if (exports.ITEM_HISTORY_MAX_LENGTH <= 2) { + return { + dx: undefined, + dy: undefined + }; + } + + if (this.itemHistory.length <= exports.ITEM_HISTORY_MAX_LENGTH) { + var _start = this.itemHistory[0]; + var _end = this.itemHistory[this.itemHistory.length - 1]; + return computeVelocityVector(_start, _end, this.itemHistory.length); + } + + var start = this.itemHistory[this.itemHistory.length - exports.ITEM_HISTORY_MAX_LENGTH]; + var end = this.itemHistory[this.itemHistory.length - 1]; + return computeVelocityVector(start, end, exports.ITEM_HISTORY_MAX_LENGTH); + }; + + itemTracked.getMostlyMatchedName = function () { + var _this = this; + + var nameMostlyMatchedOccurences = 0; + var nameMostlyMatched = ''; + Object.keys(this.nameCount).map(function (name) { + if (_this.nameCount[name] > nameMostlyMatchedOccurences) { + nameMostlyMatched = name; + nameMostlyMatchedOccurences = _this.nameCount[name]; + } + }); + return nameMostlyMatched; + }; + + itemTracked.toJSONDebug = function () { + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return { + id: this.id, + idDisplay: this.idDisplay, + x: roundInt ? parseInt(this.x, 10) : this.x, + y: roundInt ? parseInt(this.y, 10) : this.y, + w: roundInt ? parseInt(this.w, 10) : this.w, + h: roundInt ? parseInt(this.h, 10) : this.h, + confidence: Math.round(this.confidence * 100) / 100, + // Here we negate dy to be in "normal" carthesian coordinates + bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy)), + name: this.getMostlyMatchedName(), + isZombie: this.isZombie, + appearFrame: this.appearFrame, + disappearFrame: this.disappearFrame + }; + }; + + itemTracked.toJSON = function () { + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return { + id: this.idDisplay, + x: roundInt ? parseInt(this.x, 10) : this.x, + y: roundInt ? parseInt(this.y, 10) : this.y, + w: roundInt ? parseInt(this.w, 10) : this.w, + h: roundInt ? parseInt(this.h, 10) : this.h, + confidence: Math.round(this.confidence * 100) / 100, + // Here we negate dy to be in "normal" carthesian coordinates + bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy), 10), + name: this.getMostlyMatchedName(), + isZombie: this.isZombie + }; + }; + + itemTracked.toMOT = function (frameIndex) { + return "".concat(frameIndex, ",").concat(this.idDisplay, ",").concat(this.x - this.w / 2, ",").concat(this.y - this.h / 2, ",").concat(this.w, ",").concat(this.h, ",").concat(this.confidence / 100, ",-1,-1,-1"); + }; + + itemTracked.toJSONGenericInfo = function () { + return { + id: this.id, + idDisplay: this.idDisplay, + appearFrame: this.appearFrame, + disappearFrame: this.disappearFrame, + disappearArea: this.disappearArea, + nbActiveFrame: this.disappearFrame - this.appearFrame, + name: this.getMostlyMatchedName() + }; + }; + + return itemTracked; + }; + + exports.reset = function () { + idDisplay = 0; + }; +})(ItemTracked$1); + +var kdTreeMin = {}; + +/** + * k-d Tree JavaScript - V 1.01 + * + * https://github.com/ubilabs/kd-tree-javascript + * + * @author Mircea Pricop , 2012 + * @author Martin Kleppe , 2012 + * @author Ubilabs http://ubilabs.net, 2012 + * @license MIT License + */ + +(function (exports) { + !function (t, n) { + n(exports ); + }(commonjsGlobal, function (t) { + function n(t, n, o) { + this.obj = t, this.left = null, this.right = null, this.parent = o, this.dimension = n; + } + + function o(t) { + this.content = [], this.scoreFunction = t; + } + + o.prototype = { + push: function (t) { + this.content.push(t), this.bubbleUp(this.content.length - 1); + }, + pop: function () { + var t = this.content[0], + n = this.content.pop(); + return this.content.length > 0 && (this.content[0] = n, this.sinkDown(0)), t; + }, + peek: function () { + return this.content[0]; + }, + remove: function (t) { + for (var n = this.content.length, o = 0; o < n; o++) if (this.content[o] == t) { + var i = this.content.pop(); + return void (o != n - 1 && (this.content[o] = i, this.scoreFunction(i) < this.scoreFunction(t) ? this.bubbleUp(o) : this.sinkDown(o))); + } + + throw new Error("Node not found."); + }, + size: function () { + return this.content.length; + }, + bubbleUp: function (t) { + for (var n = this.content[t]; t > 0;) { + var o = Math.floor((t + 1) / 2) - 1, + i = this.content[o]; + if (!(this.scoreFunction(n) < this.scoreFunction(i))) break; + this.content[o] = n, this.content[t] = i, t = o; + } + }, + sinkDown: function (t) { + for (var n = this.content.length, o = this.content[t], i = this.scoreFunction(o);;) { + var e = 2 * (t + 1), + r = e - 1, + l = null; + + if (r < n) { + var u = this.content[r], + h = this.scoreFunction(u); + h < i && (l = r); + } + + if (e < n) { + var s = this.content[e]; + this.scoreFunction(s) < (null == l ? i : h) && (l = e); + } + + if (null == l) break; + this.content[t] = this.content[l], this.content[l] = o, t = l; + } + } + }, t.kdTree = function (t, i, e) { + function r(t, o, i) { + var l, + u, + h = o % e.length; + return 0 === t.length ? null : 1 === t.length ? new n(t[0], h, i) : (t.sort(function (t, n) { + return t[e[h]] - n[e[h]]; + }), l = Math.floor(t.length / 2), u = new n(t[l], h, i), u.left = r(t.slice(0, l), o + 1, u), u.right = r(t.slice(l + 1), o + 1, u), u); + } + + var l = this; + Array.isArray(t) ? this.root = r(t, 0, null) : function (t) { + function n(t) { + t.left && (t.left.parent = t, n(t.left)), t.right && (t.right.parent = t, n(t.right)); + } + + l.root = t, n(l.root); + }(t), this.toJSON = function (t) { + t || (t = this.root); + var o = new n(t.obj, t.dimension, null); + return t.left && (o.left = l.toJSON(t.left)), t.right && (o.right = l.toJSON(t.right)), o; + }, this.insert = function (t) { + function o(n, i) { + if (null === n) return i; + var r = e[n.dimension]; + return t[r] < n.obj[r] ? o(n.left, n) : o(n.right, n); + } + + var i, + r, + l = o(this.root, null); + null !== l ? (i = new n(t, (l.dimension + 1) % e.length, l), r = e[l.dimension], t[r] < l.obj[r] ? l.left = i : l.right = i) : this.root = new n(t, 0, null); + }, this.remove = function (t) { + function n(o) { + if (null === o) return null; + if (o.obj === t) return o; + var i = e[o.dimension]; + return t[i] < o.obj[i] ? n(o.left) : n(o.right); + } + + function o(t) { + function n(t, o) { + var i, r, l, u, h; + return null === t ? null : (i = e[o], t.dimension === o ? null !== t.left ? n(t.left, o) : t : (r = t.obj[i], l = n(t.left, o), u = n(t.right, o), h = t, null !== l && l.obj[i] < r && (h = l), null !== u && u.obj[i] < h.obj[i] && (h = u), h)); + } + + var i, r, u; + if (null === t.left && null === t.right) return null === t.parent ? void (l.root = null) : (u = e[t.parent.dimension], void (t.obj[u] < t.parent.obj[u] ? t.parent.left = null : t.parent.right = null)); + null !== t.right ? (r = (i = n(t.right, t.dimension)).obj, o(i), t.obj = r) : (r = (i = n(t.left, t.dimension)).obj, o(i), t.right = t.left, t.left = null, t.obj = r); + } + + var i; + null !== (i = n(l.root)) && o(i); + }, this.nearest = function (t, n, r) { + function u(o) { + function r(t, o) { + f.push([t, o]), f.size() > n && f.pop(); + } + + var l, + h, + s, + c, + a = e[o.dimension], + g = i(t, o.obj), + p = {}; + + for (c = 0; c < e.length; c += 1) c === o.dimension ? p[e[c]] = t[e[c]] : p[e[c]] = o.obj[e[c]]; + + h = i(p, o.obj), null !== o.right || null !== o.left ? (u(l = null === o.right ? o.left : null === o.left ? o.right : t[a] < o.obj[a] ? o.left : o.right), (f.size() < n || g < f.peek()[1]) && r(o, g), (f.size() < n || Math.abs(h) < f.peek()[1]) && null !== (s = l === o.left ? o.right : o.left) && u(s)) : (f.size() < n || g < f.peek()[1]) && r(o, g); + } + + var h, s, f; + if (f = new o(function (t) { + return -t[1]; + }), r) for (h = 0; h < n; h += 1) f.push([null, r]); + + for (l.root && u(l.root), s = [], h = 0; h < Math.min(n, f.content.length); h += 1) f.content[h][0] && s.push([f.content[h][0].obj, f.content[h][1]]); + + return s; + }, this.balanceFactor = function () { + function t(n) { + return null === n ? 0 : Math.max(t(n.left), t(n.right)) + 1; + } + + function n(t) { + return null === t ? 0 : n(t.left) + n(t.right) + 1; + } + + return t(l.root) / (Math.log(n(l.root)) / Math.log(2)); + }; + }, t.BinaryHeap = o; + }); +})(kdTreeMin); + +var lodash_isequal = {exports: {}}; + +/** + * Lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright JS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +(function (module, exports) { + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + /** Used to stand-in for `undefined` hash values. */ + + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + /** Used to compose bitmasks for value comparisons. */ + + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + /** Used as references for various `Number` constants. */ + + var MAX_SAFE_INTEGER = 9007199254740991; + /** `Object#toString` result references. */ + + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]'; + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + /** Used to detect host constructors (Safari). */ + + var reIsHostCtor = /^\[object .+?Constructor\]$/; + /** Used to detect unsigned integer values. */ + + var reIsUint = /^(?:0|[1-9]\d*)$/; + /** Used to identify `toStringTag` values of typed arrays. */ + + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + /** Detect free variable `global` from Node.js. */ + + var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + /** Detect free variable `self`. */ + + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + /** Used as a reference to the global object. */ + + var root = freeGlobal || freeSelf || Function('return this')(); + /** Detect free variable `exports`. */ + + var freeExports = exports && !exports.nodeType && exports; + /** Detect free variable `module`. */ + + var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; + /** Detect the popular CommonJS extension `module.exports`. */ + + var moduleExports = freeModule && freeModule.exports === freeExports; + /** Detect free variable `process` from Node.js. */ + + var freeProcess = moduleExports && freeGlobal.process; + /** Used to access faster Node.js helpers. */ + + var nodeUtil = function () { + try { + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + }(); + /* Node.js helper references. */ + + + var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + + return result; + } + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + + + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + + return array; + } + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + + + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + + return false; + } + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + + + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + + return result; + } + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + + + function baseUnary(func) { + return function (value) { + return func(value); + }; + } + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function cacheHas(cache, key) { + return cache.has(key); + } + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + + + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + + + function mapToArray(map) { + var index = -1, + result = Array(map.size); + map.forEach(function (value, key) { + result[++index] = [key, value]; + }); + return result; + } + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + + + function overArg(func, transform) { + return function (arg) { + return func(transform(arg)); + }; + } + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + + + function setToArray(set) { + var index = -1, + result = Array(set.size); + set.forEach(function (value) { + result[++index] = value; + }); + return result; + } + /** Used for built-in method references. */ + + + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + /** Used to detect overreaching core-js shims. */ + + var coreJsData = root['__core-js_shared__']; + /** Used to resolve the decompiled source of functions. */ + + var funcToString = funcProto.toString; + /** Used to check objects for own properties. */ + + var hasOwnProperty = objectProto.hasOwnProperty; + /** Used to detect methods masquerading as native. */ + + var maskSrcKey = function () { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? 'Symbol(src)_1.' + uid : ''; + }(); + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + + + var nativeObjectToString = objectProto.toString; + /** Used to detect if a method is native. */ + + var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); + /** Built-in value references. */ + + var Buffer = moduleExports ? root.Buffer : undefined, + Symbol = root.Symbol, + Uint8Array = root.Uint8Array, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + /* Built-in method references for those with the same name as other `lodash` methods. */ + + var nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeKeys = overArg(Object.keys, Object); + /* Built-in method references that are verified to be native. */ + + var DataView = getNative(root, 'DataView'), + Map = getNative(root, 'Map'), + Promise = getNative(root, 'Promise'), + Set = getNative(root, 'Set'), + WeakMap = getNative(root, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + /** Used to detect maps, sets, and weakmaps. */ + + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + /** Used to convert symbols to primitives and strings. */ + + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + this.clear(); + + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + + + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function hashGet(key) { + var data = this.__data__; + + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); + } + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + + + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value; + return this; + } // Add methods to `Hash`. + + + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + this.clear(); + + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + + + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + + var lastIndex = data.length - 1; + + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + + --this.size; + return true; + } + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + return index < 0 ? undefined : data[index][1]; + } + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + + + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + + return this; + } // Add methods to `ListCache`. + + + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + this.clear(); + + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + + + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash(), + 'map': new (Map || ListCache)(), + 'string': new Hash() + }; + } + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + + + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } // Add methods to `MapCache`. + + + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + this.__data__ = new MapCache(); + + while (++index < length) { + this.add(values[index]); + } + } + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + + + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + + return this; + } + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + + + function setCacheHas(value) { + return this.__data__.has(value); + } // Add methods to `SetCache`. + + + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + + + function stackClear() { + this.__data__ = new ListCache(); + this.size = 0; + } + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + this.size = data.size; + return result; + } + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function stackGet(key) { + return this.__data__.get(key); + } + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function stackHas(key) { + return this.__data__.has(key); + } + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + + + function stackSet(key, value) { + var data = this.__data__; + + if (data instanceof ListCache) { + var pairs = data.__data__; + + if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + + data = this.__data__ = new MapCache(pairs); + } + + data.set(key, value); + this.size = data.size; + return this; + } // Add methods to `Stack`. + + + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. + isBuff && (key == 'offset' || key == 'parent') || // PhantomJS 2 has enumerable non-index properties on typed arrays. + isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || // Skip index properties. + isIndex(key, length)))) { + result.push(key); + } + } + + return result; + } + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + + + function assocIndexOf(array, key) { + var length = array.length; + + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + + return -1; + } + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + + + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + + + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + + return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); + } + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + + + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + + + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + + if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) { + return value !== value && other !== other; + } + + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + + + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + + objIsArr = true; + objIsObj = false; + } + + if (isSameTag && !objIsObj) { + stack || (stack = new Stack()); + return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + stack || (stack = new Stack()); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + + if (!isSameTag) { + return false; + } + + stack || (stack = new Stack()); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + + + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + + + function baseIsTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + + + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + + var result = []; + + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + + return result; + } + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + + + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } // Assume cyclic values are equal. + + + var stacked = stack.get(array); + + if (stacked && stack.get(other)) { + return stacked == other; + } + + var index = -1, + result = true, + seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined; + stack.set(array, other); + stack.set(other, array); // Ignore non-index properties. + + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); + } + + if (compared !== undefined) { + if (compared) { + continue; + } + + result = false; + break; + } // Recursively compare arrays (susceptible to call stack limits). + + + if (seen) { + if (!arraySome(other, function (othValue, othIndex) { + if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + result = false; + break; + } + } + + stack['delete'](array); + stack['delete'](other); + return result; + } + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + + + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { + return false; + } + + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == other + ''; + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } // Assume cyclic values are equal. + + + var stacked = stack.get(object); + + if (stacked) { + return stacked == other; + } + + bitmask |= COMPARE_UNORDERED_FLAG; // Recursively compare objects (susceptible to call stack limits). + + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + + } + + return false; + } + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + + + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + + var index = objLength; + + while (index--) { + var key = objProps[index]; + + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } // Assume cyclic values are equal. + + + var stacked = stack.get(object); + + if (stacked && stack.get(other)) { + return stacked == other; + } + + var result = true; + stack.set(object, other); + stack.set(other, object); + var skipCtor = isPartial; + + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); + } // Recursively compare objects (susceptible to call stack limits). + + + if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { + result = false; + break; + } + + skipCtor || (skipCtor = key == 'constructor'); + } + + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. + + if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + + stack['delete'](object); + stack['delete'](other); + return result; + } + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + + + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + + + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; + } + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + + + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + + + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + + return result; + } + /** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + + + var getSymbols = !nativeGetSymbols ? stubArray : function (object) { + if (object == null) { + return []; + } + + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function (symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + + var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + + if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) { + getTag = function (value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag; + + case mapCtorString: + return mapTag; + + case promiseCtorString: + return promiseTag; + + case setCtorString: + return setTag; + + case weakMapCtorString: + return weakMapTag; + } + } + + return result; + }; + } + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + + + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length; + } + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + + + function isKeyable(value) { + var type = typeof value; + return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null; + } + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + + + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + + + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = typeof Ctor == 'function' && Ctor.prototype || objectProto; + return value === proto; + } + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + + + function objectToString(value) { + return nativeObjectToString.call(value); + } + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + + + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + + try { + return func + ''; + } catch (e) {} + } + + return ''; + } + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + + + function eq(value, other) { + return value === other || value !== value && other !== other; + } + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + + + var isArguments = baseIsArguments(function () { + return arguments; + }()) ? baseIsArguments : function (value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); + }; + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + + var isArray = Array.isArray; + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + + + var isBuffer = nativeIsBuffer || stubFalse; + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + + function isEqual(value, other) { + return baseIsEqual(value, other); + } + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + + + function isFunction(value) { + if (!isObject(value)) { + return false; + } // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + + + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + + + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + + + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + + + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + + + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + /** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ + + + function stubArray() { + return []; + } + /** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ + + + function stubFalse() { + return false; + } + + module.exports = isEqual; +})(lodash_isequal, lodash_isequal.exports); + +var munkres$1 = {exports: {}}; + +/** + * Introduction + * ============ + * + * The Munkres module provides an implementation of the Munkres algorithm + * (also called the Hungarian algorithm or the Kuhn-Munkres algorithm), + * useful for solving the Assignment Problem. + * + * Assignment Problem + * ================== + * + * Let C be an n×n-matrix representing the costs of each of n workers + * to perform any of n jobs. The assignment problem is to assign jobs to + * workers in a way that minimizes the total cost. Since each worker can perform + * only one job and each job can be assigned to only one worker the assignments + * represent an independent set of the matrix C. + * + * One way to generate the optimal set is to create all permutations of + * the indices necessary to traverse the matrix so that no row and column + * are used more than once. For instance, given this matrix (expressed in + * Python) + * + * matrix = [[5, 9, 1], + * [10, 3, 2], + * [8, 7, 4]] + * + * You could use this code to generate the traversal indices:: + * + * def permute(a, results): + * if len(a) == 1: + * results.insert(len(results), a) + * + * else: + * for i in range(0, len(a)): + * element = a[i] + * a_copy = [a[j] for j in range(0, len(a)) if j != i] + * subresults = [] + * permute(a_copy, subresults) + * for subresult in subresults: + * result = [element] + subresult + * results.insert(len(results), result) + * + * results = [] + * permute(range(len(matrix)), results) # [0, 1, 2] for a 3x3 matrix + * + * After the call to permute(), the results matrix would look like this:: + * + * [[0, 1, 2], + * [0, 2, 1], + * [1, 0, 2], + * [1, 2, 0], + * [2, 0, 1], + * [2, 1, 0]] + * + * You could then use that index matrix to loop over the original cost matrix + * and calculate the smallest cost of the combinations + * + * n = len(matrix) + * minval = sys.maxsize + * for row in range(n): + * cost = 0 + * for col in range(n): + * cost += matrix[row][col] + * minval = min(cost, minval) + * + * print minval + * + * While this approach works fine for small matrices, it does not scale. It + * executes in O(n!) time: Calculating the permutations for an n×x-matrix + * requires n! operations. For a 12×12 matrix, that’s 479,001,600 + * traversals. Even if you could manage to perform each traversal in just one + * millisecond, it would still take more than 133 hours to perform the entire + * traversal. A 20×20 matrix would take 2,432,902,008,176,640,000 operations. At + * an optimistic millisecond per operation, that’s more than 77 million years. + * + * The Munkres algorithm runs in O(n³) time, rather than O(n!). This + * package provides an implementation of that algorithm. + * + * This version is based on + * http://csclab.murraystate.edu/~bob.pilgrim/445/munkres.html + * + * This version was originally written for Python by Brian Clapper from the + * algorithm at the above web site (The ``Algorithm::Munkres`` Perl version, + * in CPAN, was clearly adapted from the same web site.) and ported to + * JavaScript by Anna Henningsen (addaleax). + * + * Usage + * ===== + * + * Construct a Munkres object + * + * var m = new Munkres(); + * + * Then use it to compute the lowest cost assignment from a cost matrix. Here’s + * a sample program + * + * var matrix = [[5, 9, 1], + * [10, 3, 2], + * [8, 7, 4]]; + * var m = new Munkres(); + * var indices = m.compute(matrix); + * console.log(format_matrix(matrix), 'Lowest cost through this matrix:'); + * var total = 0; + * for (var i = 0; i < indices.length; ++i) { + * var row = indices[l][0], col = indices[l][1]; + * var value = matrix[row][col]; + * total += value; + * + * console.log('(' + rol + ', ' + col + ') -> ' + value); + * } + * + * console.log('total cost:', total); + * + * Running that program produces:: + * + * Lowest cost through this matrix: + * [5, 9, 1] + * [10, 3, 2] + * [8, 7, 4] + * (0, 0) -> 5 + * (1, 1) -> 3 + * (2, 2) -> 4 + * total cost: 12 + * + * The instantiated Munkres object can be used multiple times on different + * matrices. + * + * Non-square Cost Matrices + * ======================== + * + * The Munkres algorithm assumes that the cost matrix is square. However, it's + * possible to use a rectangular matrix if you first pad it with 0 values to make + * it square. This module automatically pads rectangular cost matrices to make + * them square. + * + * Notes: + * + * - The module operates on a *copy* of the caller's matrix, so any padding will + * not be seen by the caller. + * - The cost matrix must be rectangular or square. An irregular matrix will + * *not* work. + * + * Calculating Profit, Rather than Cost + * ==================================== + * + * The cost matrix is just that: A cost matrix. The Munkres algorithm finds + * the combination of elements (one from each row and column) that results in + * the smallest cost. It’s also possible to use the algorithm to maximize + * profit. To do that, however, you have to convert your profit matrix to a + * cost matrix. The simplest way to do that is to subtract all elements from a + * large value. + * + * The ``munkres`` module provides a convenience method for creating a cost + * matrix from a profit matrix, i.e. make_cost_matrix. + * + * References + * ========== + * + * 1. http://www.public.iastate.edu/~ddoty/HungarianAlgorithm.html + * + * 2. Harold W. Kuhn. The Hungarian Method for the assignment problem. + * *Naval Research Logistics Quarterly*, 2:83-97, 1955. + * + * 3. Harold W. Kuhn. Variants of the Hungarian method for assignment + * problems. *Naval Research Logistics Quarterly*, 3: 253-258, 1956. + * + * 4. Munkres, J. Algorithms for the Assignment and Transportation Problems. + * *Journal of the Society of Industrial and Applied Mathematics*, + * 5(1):32-38, March, 1957. + * + * 5. https://en.wikipedia.org/wiki/Hungarian_algorithm + * + * Copyright and License + * ===================== + * + * Copyright 2008-2016 Brian M. Clapper + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function (module) { + /** + * A very large numerical value which can be used like an integer + * (i. e., adding integers of similar size does not result in overflow). + */ + var MAX_SIZE = parseInt(Number.MAX_SAFE_INTEGER / 2) || (1 << 26) * (1 << 26); + /** + * A default value to pad the cost matrix with if it is not quadratic. + */ + + var DEFAULT_PAD_VALUE = 0; // --------------------------------------------------------------------------- + // Classes + // --------------------------------------------------------------------------- + + /** + * Calculate the Munkres solution to the classical assignment problem. + * See the module documentation for usage. + * @constructor + */ + + function Munkres() { + this.C = null; + this.row_covered = []; + this.col_covered = []; + this.n = 0; + this.Z0_r = 0; + this.Z0_c = 0; + this.marked = null; + this.path = null; + } + /** + * Pad a possibly non-square matrix to make it square. + * + * @param {Array} matrix An array of arrays containing the matrix cells + * @param {Number} [pad_value] The value used to pad a rectangular matrix + * + * @return {Array} An array of arrays representing the padded matrix + */ + + + Munkres.prototype.pad_matrix = function (matrix, pad_value) { + pad_value = pad_value || DEFAULT_PAD_VALUE; + var max_columns = 0; + var total_rows = matrix.length; + var i; + + for (i = 0; i < total_rows; ++i) if (matrix[i].length > max_columns) max_columns = matrix[i].length; + + total_rows = max_columns > total_rows ? max_columns : total_rows; + var new_matrix = []; + + for (i = 0; i < total_rows; ++i) { + var row = matrix[i] || []; + var new_row = row.slice(); // If this row is too short, pad it + + while (total_rows > new_row.length) new_row.push(pad_value); + + new_matrix.push(new_row); + } + + return new_matrix; + }; + /** + * Compute the indices for the lowest-cost pairings between rows and columns + * in the database. Returns a list of (row, column) tuples that can be used + * to traverse the matrix. + * + * **WARNING**: This code handles square and rectangular matrices. + * It does *not* handle irregular matrices. + * + * @param {Array} cost_matrix The cost matrix. If this cost matrix is not square, + * it will be padded with DEFAULT_PAD_VALUE. Optionally, + * the pad value can be specified via options.padValue. + * This method does *not* modify the caller's matrix. + * It operates on a copy of the matrix. + * @param {Object} [options] Additional options to pass in + * @param {Number} [options.padValue] The value to use to pad a rectangular cost_matrix + * + * @return {Array} An array of ``(row, column)`` arrays that describe the lowest + * cost path through the matrix + */ + + + Munkres.prototype.compute = function (cost_matrix, options) { + options = options || {}; + options.padValue = options.padValue || DEFAULT_PAD_VALUE; + this.C = this.pad_matrix(cost_matrix, options.padValue); + this.n = this.C.length; + this.original_length = cost_matrix.length; + this.original_width = cost_matrix[0].length; + var nfalseArray = []; + /* array of n false values */ + + while (nfalseArray.length < this.n) nfalseArray.push(false); + + this.row_covered = nfalseArray.slice(); + this.col_covered = nfalseArray.slice(); + this.Z0_r = 0; + this.Z0_c = 0; + this.path = this.__make_matrix(this.n * 2, 0); + this.marked = this.__make_matrix(this.n, 0); + var step = 1; + var steps = { + 1: this.__step1, + 2: this.__step2, + 3: this.__step3, + 4: this.__step4, + 5: this.__step5, + 6: this.__step6 + }; + + while (true) { + var func = steps[step]; + if (!func) // done + break; + step = func.apply(this); + } + + var results = []; + + for (var i = 0; i < this.original_length; ++i) for (var j = 0; j < this.original_width; ++j) if (this.marked[i][j] == 1) results.push([i, j]); + + return results; + }; + /** + * Create an n×n matrix, populating it with the specific value. + * + * @param {Number} n Matrix dimensions + * @param {Number} val Value to populate the matrix with + * + * @return {Array} An array of arrays representing the newly created matrix + */ + + + Munkres.prototype.__make_matrix = function (n, val) { + var matrix = []; + + for (var i = 0; i < n; ++i) { + matrix[i] = []; + + for (var j = 0; j < n; ++j) matrix[i][j] = val; + } + + return matrix; + }; + /** + * For each row of the matrix, find the smallest element and + * subtract it from every element in its row. Go to Step 2. + */ + + + Munkres.prototype.__step1 = function () { + for (var i = 0; i < this.n; ++i) { + // Find the minimum value for this row and subtract that minimum + // from every element in the row. + var minval = Math.min.apply(Math, this.C[i]); + + for (var j = 0; j < this.n; ++j) this.C[i][j] -= minval; + } + + return 2; + }; + /** + * Find a zero (Z) in the resulting matrix. If there is no starred + * zero in its row or column, star Z. Repeat for each element in the + * matrix. Go to Step 3. + */ + + + Munkres.prototype.__step2 = function () { + for (var i = 0; i < this.n; ++i) { + for (var j = 0; j < this.n; ++j) { + if (this.C[i][j] === 0 && !this.col_covered[j] && !this.row_covered[i]) { + this.marked[i][j] = 1; + this.col_covered[j] = true; + this.row_covered[i] = true; + break; + } + } + } + + this.__clear_covers(); + + return 3; + }; + /** + * Cover each column containing a starred zero. If K columns are + * covered, the starred zeros describe a complete set of unique + * assignments. In this case, Go to DONE, otherwise, Go to Step 4. + */ + + + Munkres.prototype.__step3 = function () { + var count = 0; + + for (var i = 0; i < this.n; ++i) { + for (var j = 0; j < this.n; ++j) { + if (this.marked[i][j] == 1 && this.col_covered[j] == false) { + this.col_covered[j] = true; + ++count; + } + } + } + + return count >= this.n ? 7 : 4; + }; + /** + * Find a noncovered zero and prime it. If there is no starred zero + * in the row containing this primed zero, Go to Step 5. Otherwise, + * cover this row and uncover the column containing the starred + * zero. Continue in this manner until there are no uncovered zeros + * left. Save the smallest uncovered value and Go to Step 6. + */ + + + Munkres.prototype.__step4 = function () { + var done = false; + var row = -1, + col = -1, + star_col = -1; + + while (!done) { + var z = this.__find_a_zero(); + + row = z[0]; + col = z[1]; + if (row < 0) return 6; + this.marked[row][col] = 2; + star_col = this.__find_star_in_row(row); + + if (star_col >= 0) { + col = star_col; + this.row_covered[row] = true; + this.col_covered[col] = false; + } else { + this.Z0_r = row; + this.Z0_c = col; + return 5; + } + } + }; + /** + * Construct a series of alternating primed and starred zeros as + * follows. Let Z0 represent the uncovered primed zero found in Step 4. + * Let Z1 denote the starred zero in the column of Z0 (if any). + * Let Z2 denote the primed zero in the row of Z1 (there will always + * be one). Continue until the series terminates at a primed zero + * that has no starred zero in its column. Unstar each starred zero + * of the series, star each primed zero of the series, erase all + * primes and uncover every line in the matrix. Return to Step 3 + */ + + + Munkres.prototype.__step5 = function () { + var count = 0; + this.path[count][0] = this.Z0_r; + this.path[count][1] = this.Z0_c; + var done = false; + + while (!done) { + var row = this.__find_star_in_col(this.path[count][1]); + + if (row >= 0) { + count++; + this.path[count][0] = row; + this.path[count][1] = this.path[count - 1][1]; + } else { + done = true; + } + + if (!done) { + var col = this.__find_prime_in_row(this.path[count][0]); + + count++; + this.path[count][0] = this.path[count - 1][0]; + this.path[count][1] = col; + } + } + + this.__convert_path(this.path, count); + + this.__clear_covers(); + + this.__erase_primes(); + + return 3; + }; + /** + * Add the value found in Step 4 to every element of each covered + * row, and subtract it from every element of each uncovered column. + * Return to Step 4 without altering any stars, primes, or covered + * lines. + */ + + + Munkres.prototype.__step6 = function () { + var minval = this.__find_smallest(); + + for (var i = 0; i < this.n; ++i) { + for (var j = 0; j < this.n; ++j) { + if (this.row_covered[i]) this.C[i][j] += minval; + if (!this.col_covered[j]) this.C[i][j] -= minval; + } + } + + return 4; + }; + /** + * Find the smallest uncovered value in the matrix. + * + * @return {Number} The smallest uncovered value, or MAX_SIZE if no value was found + */ + + + Munkres.prototype.__find_smallest = function () { + var minval = MAX_SIZE; + + for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (!this.row_covered[i] && !this.col_covered[j]) if (minval > this.C[i][j]) minval = this.C[i][j]; + + return minval; + }; + /** + * Find the first uncovered element with value 0. + * + * @return {Array} The indices of the found element or [-1, -1] if not found + */ + + + Munkres.prototype.__find_a_zero = function () { + for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.C[i][j] === 0 && !this.row_covered[i] && !this.col_covered[j]) return [i, j]; + + return [-1, -1]; + }; + /** + * Find the first starred element in the specified row. Returns + * the column index, or -1 if no starred element was found. + * + * @param {Number} row The index of the row to search + * @return {Number} + */ + + + Munkres.prototype.__find_star_in_row = function (row) { + for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 1) return j; + + return -1; + }; + /** + * Find the first starred element in the specified column. + * + * @return {Number} The row index, or -1 if no starred element was found + */ + + + Munkres.prototype.__find_star_in_col = function (col) { + for (var i = 0; i < this.n; ++i) if (this.marked[i][col] == 1) return i; + + return -1; + }; + /** + * Find the first prime element in the specified row. + * + * @return {Number} The column index, or -1 if no prime element was found + */ + + + Munkres.prototype.__find_prime_in_row = function (row) { + for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 2) return j; + + return -1; + }; + + Munkres.prototype.__convert_path = function (path, count) { + for (var i = 0; i <= count; ++i) this.marked[path[i][0]][path[i][1]] = this.marked[path[i][0]][path[i][1]] == 1 ? 0 : 1; + }; + /** Clear all covered matrix cells */ + + + Munkres.prototype.__clear_covers = function () { + for (var i = 0; i < this.n; ++i) { + this.row_covered[i] = false; + this.col_covered[i] = false; + } + }; + /** Erase all prime markings */ + + + Munkres.prototype.__erase_primes = function () { + for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.marked[i][j] == 2) this.marked[i][j] = 0; + }; // --------------------------------------------------------------------------- + // Functions + // --------------------------------------------------------------------------- + + /** + * Create a cost matrix from a profit matrix by calling + * 'inversion_function' to invert each value. The inversion + * function must take one numeric argument (of any type) and return + * another numeric argument which is presumed to be the cost inverse + * of the original profit. + * + * This is a static method. Call it like this: + * + * cost_matrix = make_cost_matrix(matrix[, inversion_func]); + * + * For example: + * + * cost_matrix = make_cost_matrix(matrix, function(x) { return MAXIMUM - x; }); + * + * @param {Array} profit_matrix An array of arrays representing the matrix + * to convert from a profit to a cost matrix + * @param {Function} [inversion_function] The function to use to invert each + * entry in the profit matrix + * + * @return {Array} The converted matrix + */ + + + function make_cost_matrix(profit_matrix, inversion_function) { + var i, j; + + if (!inversion_function) { + var maximum = -1.0 / 0.0; + + for (i = 0; i < profit_matrix.length; ++i) for (j = 0; j < profit_matrix[i].length; ++j) if (profit_matrix[i][j] > maximum) maximum = profit_matrix[i][j]; + + inversion_function = function (x) { + return maximum - x; + }; + } + + var cost_matrix = []; + + for (i = 0; i < profit_matrix.length; ++i) { + var row = profit_matrix[i]; + cost_matrix[i] = []; + + for (j = 0; j < row.length; ++j) cost_matrix[i][j] = inversion_function(profit_matrix[i][j]); + } + + return cost_matrix; + } + /** + * Convenience function: Converts the contents of a matrix of integers + * to a printable string. + * + * @param {Array} matrix The matrix to print + * + * @return {String} The formatted matrix + */ + + + function format_matrix(matrix) { + var columnWidths = []; + var i, j; + + for (i = 0; i < matrix.length; ++i) { + for (j = 0; j < matrix[i].length; ++j) { + var entryWidth = String(matrix[i][j]).length; + if (!columnWidths[j] || entryWidth >= columnWidths[j]) columnWidths[j] = entryWidth; + } + } + + var formatted = ''; + + for (i = 0; i < matrix.length; ++i) { + for (j = 0; j < matrix[i].length; ++j) { + var s = String(matrix[i][j]); // pad at front with spaces + + while (s.length < columnWidths[j]) s = ' ' + s; + + formatted += s; // separate columns + + if (j != matrix[i].length - 1) formatted += ' '; + } + + if (i != matrix[i].length - 1) formatted += '\n'; + } + + return formatted; + } // --------------------------------------------------------------------------- + // Exports + // --------------------------------------------------------------------------- + + + function computeMunkres(cost_matrix, options) { + var m = new Munkres(); + return m.compute(cost_matrix, options); + } + + computeMunkres.version = "1.2.2"; + computeMunkres.format_matrix = format_matrix; + computeMunkres.make_cost_matrix = make_cost_matrix; + computeMunkres.Munkres = Munkres; // backwards compatibility + + if (module.exports) { + module.exports = computeMunkres; + } +})(munkres$1); + +var itemTrackedModule = ItemTracked$1; +var ItemTracked = itemTrackedModule.ItemTracked; +var kdTree = kdTreeMin.kdTree; +var munkres = munkres$1.exports; +var iouAreas = utils.iouAreas; + +var iouDistance = function iouDistance(item1, item2) { + // IOU distance, between 0 and 1 + // The smaller the less overlap + var iou = iouAreas(item1, item2); // Invert this as the KDTREESEARCH is looking for the smaller value + + var distance = 1 - iou; // If the overlap is iou < 0.95, exclude value + + if (distance > 1 - params.iouLimit) { + distance = params.distanceLimit + 1; + } + + return distance; +}; + +var params = { + // DEFAULT_UNMATCHEDFRAMES_TOLERANCE + // This the number of frame we wait when an object isn't matched before considering it gone + unMatchedFramesTolerance: 5, + // DEFAULT_IOU_LIMIT, exclude things from beeing matched if their IOU is lower than this + // 1 means total overlap whereas 0 means no overlap + iouLimit: 0.05, + // Remove new objects fast if they could not be matched in the next frames. + // Setting this to false ensures the object will stick around at least + // unMatchedFramesTolerance frames, even if they could neven be matched in + // subsequent frames. + fastDelete: true, + // The function to use to determine the distance between to detected objects + distanceFunc: iouDistance, + // The distance limit for matching. If values need to be excluded from + // matching set their distance to something greater than the distance limit + distanceLimit: 10000, + // The algorithm used to match tracks with new detections. Can be either + // 'kdTree' or 'munkres'. + matchingAlgorithm: 'munkres' // matchingAlgorithm: 'kdTree', + +}; // A dictionary of itemTracked currently tracked +// key: uuid +// value: ItemTracked object + +var mapOfItemsTracked = new Map(); // A dictionnary keeping memory of all tracked object (even after they disappear) +// Useful to ouput the file of all items tracked + +var mapOfAllItemsTracked = new Map(); // By default, we do not keep all the history in memory + +var keepAllHistoryInMemory = false; +var computeDistance = tracker.computeDistance = iouDistance; + +var updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameNb) { + // A kd-tree containing all the itemtracked + // Need to rebuild on each frame, because itemTracked positions have changed + var treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ['x', 'y', 'w', 'h']); // Contruct a kd tree for the detections of this frame + + var treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ['x', 'y', 'w', 'h']); // SCENARIO 1: itemsTracked map is empty + + if (mapOfItemsTracked.size === 0) { + // Just add every detected item as item Tracked + detectionsOfThisFrame.forEach(function (itemDetected) { + var newItemTracked = new ItemTracked(itemDetected, frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map + + mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree + + treeItemsTracked.insert(newItemTracked); + }); + } // SCENARIO 2: We already have itemsTracked in the map + else { + var matchedList = new Array(detectionsOfThisFrame.length); + matchedList.fill(false); // Match existing Tracked items with the items detected in the new frame + // For each look in the new detection to find the closest match + + if (detectionsOfThisFrame.length > 0) { + if (params.matchingAlgorithm === 'munkres') { + var trackedItemIds = Array.from(mapOfItemsTracked.keys()); + var costMatrix = Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { + var predictedPosition = itemTracked.predictNextPosition(); + return detectionsOfThisFrame.map(function (detection) { + return params.distanceFunc(predictedPosition, detection); + }); + }); + mapOfItemsTracked.forEach(function (itemTracked) { + itemTracked.makeAvailable(); + }); + munkres(costMatrix).filter(function (m) { + return costMatrix[m[0]][m[1]] <= params.distanceLimit; + }).forEach(function (m) { + var itemTracked = mapOfItemsTracked.get(trackedItemIds[m[0]]); + var updatedTrackedItemProperties = detectionsOfThisFrame[m[1]]; + matchedList[m[1]] = { + idDisplay: itemTracked.idDisplay + }; + itemTracked.makeUnavailable().update(updatedTrackedItemProperties, frameNb); + }); + matchedList.forEach(function (matched, index) { + if (!matched) { + if (Math.min.apply(Math, _toConsumableArray(costMatrix.map(function (m) { + return m[index]; + }))) > params.distanceLimit) { + var newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); + mapOfItemsTracked.set(newItemTracked.id, newItemTracked); + newItemTracked.makeUnavailable(); + costMatrix.push(detectionsOfThisFrame.map(function (detection) { + return params.distanceFunc(newItemTracked, detection); + })); + } + } + }); + } else if (params.matchingAlgorithm === 'kdTree') { + mapOfItemsTracked.forEach(function (itemTracked) { + // First predict the new position of the itemTracked + var predictedPosition = itemTracked.predictNextPosition(); // Make available for matching + + itemTracked.makeAvailable(); // Search for a detection that matches + + var treeSearchResult = treeDetectionsOfThisFrame.nearest(predictedPosition, 1, params.distanceLimit)[0]; // Only for debug assessments of predictions + + treeDetectionsOfThisFrame.nearest(itemTracked, 1, params.distanceLimit)[0]; // Only if we enable the extra refinement + + treeDetectionsOfThisFrame.nearest(predictedPosition, 2, params.distanceLimit); // If we have found something + + if (treeSearchResult) { + + var indexClosestNewDetectedItem = detectionsOfThisFrame.indexOf(treeSearchResult[0]); // If this detections was not already matched to a tracked item + // (otherwise it would be matched to two tracked items...) + + if (!matchedList[indexClosestNewDetectedItem]) { + matchedList[indexClosestNewDetectedItem] = { + idDisplay: itemTracked.idDisplay + }; // Update properties of tracked object + + var updatedTrackedItemProperties = detectionsOfThisFrame[indexClosestNewDetectedItem]; + mapOfItemsTracked.get(itemTracked.id).makeUnavailable().update(updatedTrackedItemProperties, frameNb); + } + } + }); + } else { + throw "Unknown matching algorithm \"".concat(params.matchingAlgorithm, "\""); + } + } else { + + + mapOfItemsTracked.forEach(function (itemTracked) { + itemTracked.makeAvailable(); + }); + } + + if (params.matchingAlgorithm === 'kdTree') { + // Add any unmatched items as new trackedItem only if those new items are not too similar + // to existing trackedItems this avoids adding some double match of YOLO and bring down drasticly reassignments + if (mapOfItemsTracked.size > 0) { + // Safety check to see if we still have object tracked (could have been deleted previously) + // Rebuild tracked item tree to take in account the new positions + treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ['x', 'y', 'w', 'h']); // console.log(`Nb new items Unmatched : ${matchedList.filter((isMatched) => isMatched === false).length}`) + + matchedList.forEach(function (matched, index) { + // Iterate through unmatched new detections + if (!matched) { + // Do not add as new tracked item if it is to similar to an existing one + var treeSearchResult = treeItemsTracked.nearest(detectionsOfThisFrame[index], 1, params.distanceLimit)[0]; + + if (!treeSearchResult) { + var newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map + + mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree + + treeItemsTracked.insert(newItemTracked); // Make unvailable + + newItemTracked.makeUnavailable(); + } + } + }); + } + } // Start killing the itemTracked (and predicting next position) + // that are tracked but haven't been matched this frame + + + mapOfItemsTracked.forEach(function (itemTracked) { + if (itemTracked.available) { + itemTracked.countDown(frameNb); + itemTracked.updateTheoricalPositionAndSize(); + + if (itemTracked.isDead()) { + mapOfItemsTracked["delete"](itemTracked.id); + treeItemsTracked.remove(itemTracked); + + if (keepAllHistoryInMemory) { + mapOfAllItemsTracked.set(itemTracked.id, itemTracked); + } + } + } + }); + } +}; + +var reset = tracker.reset = function () { + mapOfItemsTracked = new Map(); + mapOfAllItemsTracked = new Map(); + itemTrackedModule.reset(); +}; + +var setParams = tracker.setParams = function (newParams) { + Object.keys(newParams).forEach(function (key) { + params[key] = newParams[key]; + }); +}; + +var enableKeepInMemory = tracker.enableKeepInMemory = function () { + keepAllHistoryInMemory = true; +}; + +var disableKeepInMemory = tracker.disableKeepInMemory = function () { + keepAllHistoryInMemory = false; +}; + +var getJSONOfTrackedItems = tracker.getJSONOfTrackedItems = function () { + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { + return itemTracked.toJSON(roundInt); + }); +}; + +var getJSONDebugOfTrackedItems = tracker.getJSONDebugOfTrackedItems = function () { + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { + return itemTracked.toJSONDebug(roundInt); + }); +}; + +var getTrackedItemsInMOTFormat = tracker.getTrackedItemsInMOTFormat = function (frameNb) { + return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { + return itemTracked.toMOT(frameNb); + }); +}; // Work only if keepInMemory is enabled + + +var getAllTrackedItems = tracker.getAllTrackedItems = function () { + return mapOfAllItemsTracked; +}; // Work only if keepInMemory is enabled + + +var getJSONOfAllTrackedItems = tracker.getJSONOfAllTrackedItems = function () { + return Array.from(mapOfAllItemsTracked.values()).map(function (itemTracked) { + return itemTracked.toJSONGenericInfo(); + }); +}; + +export { computeDistance, tracker as default, disableKeepInMemory, enableKeepInMemory, getAllTrackedItems, getJSONDebugOfTrackedItems, getJSONOfAllTrackedItems, getJSONOfTrackedItems, getTrackedItemsInMOTFormat, reset, setParams, updateTrackedItemsWithNewFrame }; diff --git a/package-lock.json b/package-lock.json index 72ad4b2..99c138c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,77 +12,81 @@ "crypto": "^1.0.1", "kd-tree-javascript": "^1.0.3", "lodash.isequal": "^4.5.0", - "minimist": "^1.2.0", + "minimist": "^1.2.6", "munkres-js": "^1.2.2", - "uuid": "^3.2.1" + "uuid": "^9.0.0" }, "bin": { "node-moving-things-tracker": "bundle.cjs.js" }, "devDependencies": { - "@babel/core": "^7.17.8", - "@babel/preset-env": "^7.16.11", + "@babel/core": "^7.19.3", + "@babel/preset-env": "^7.19.3", "@rollup/plugin-babel": "^5.3.1", - "@rollup/plugin-commonjs": "^21.0.3", - "@rollup/plugin-node-resolve": "^13.1.3", - "jasmine": "^3.6.1", - "rollup": "^2.70.1", + "@rollup/plugin-commonjs": "^22.0.2", + "@rollup/plugin-node-resolve": "^14.1.0", + "eslint": "^8.24.0", + "eslint-config-airbnb-base": "^15.0.0", + "eslint-plugin-import": "^2.26.0", + "jasmine": "^4.4.0", + "rollup": "^2.79.1", "rollup-plugin-sizes": "^1.0.4" } }, "node_modules/@ampproject/remapping": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz", - "integrity": "sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==", + "version": "2.2.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@ampproject/remapping/-/remapping-2.2.0.tgz", + "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", "dev": true, "dependencies": { - "@jridgewell/trace-mapping": "^0.3.0" + "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/trace-mapping": "^0.3.9" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", "dev": true, "dependencies": { - "@babel/highlight": "^7.16.7" + "@babel/highlight": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.7.tgz", - "integrity": "sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ==", + "version": "7.19.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/compat-data/-/compat-data-7.19.3.tgz", + "integrity": "sha512-prBHMK4JYYK+wDjJF1q99KK4JLL+egWS4nmNqdlMUgCExMZ+iZW0hGhyC3VEbsPjvaN0TBhW//VIFwBrk8sEiw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.8.tgz", - "integrity": "sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ==", + "version": "7.19.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/core/-/core-7.19.3.tgz", + "integrity": "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.7", - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-module-transforms": "^7.17.7", - "@babel/helpers": "^7.17.8", - "@babel/parser": "^7.17.8", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.3", + "@babel/helper-compilation-targets": "^7.19.3", + "@babel/helper-module-transforms": "^7.19.0", + "@babel/helpers": "^7.19.0", + "@babel/parser": "^7.19.3", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.3", + "@babel/types": "^7.19.3", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", + "json5": "^2.2.1", "semver": "^6.3.0" }, "engines": { @@ -94,53 +98,67 @@ } }, "node_modules/@babel/generator": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", - "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", + "version": "7.19.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/generator/-/generator-7.19.3.tgz", + "integrity": "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==", "dev": true, "dependencies": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" + "@babel/types": "^7.19.3", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", - "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", + "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", "dev": true, "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.7.tgz", - "integrity": "sha512-C6FdbRaxYjwVu/geKW4ZeQ0Q31AftgRcdSnZ5/jsH6BzCJbtvXvhpfkbkThYSuutZA7nCXpPR6AD9zd1dprMkA==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz", + "integrity": "sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw==", "dev": true, "dependencies": { - "@babel/helper-explode-assignable-expression": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/helper-explode-assignable-expression": "^7.18.6", + "@babel/types": "^7.18.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.7.tgz", - "integrity": "sha512-UFzlz2jjd8kroj0hmCFV5zr+tQPi1dpC2cRsDV/3IEW8bJfCPrPpmcSN6ZS8RqIq4LXcmpipCQFPddyFA5Yc7w==", + "version": "7.19.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz", + "integrity": "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.17.7", - "@babel/helper-validator-option": "^7.16.7", - "browserslist": "^4.17.5", + "@babel/compat-data": "^7.19.3", + "@babel/helper-validator-option": "^7.18.6", + "browserslist": "^4.21.3", "semver": "^6.3.0" }, "engines": { @@ -151,18 +169,18 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.17.6", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.6.tgz", - "integrity": "sha512-SogLLSxXm2OkBbSsHZMM4tUi8fUzjs63AT/d0YQIzr6GSd8Hxsbk2KYDX0k0DweAzGMj/YWeiCsorIdtdcW8Eg==", + "version": "7.19.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.19.0.tgz", + "integrity": "sha512-NRz8DwF4jT3UfrmUoZjd0Uph9HQnP30t7Ash+weACcyNkiYTywpIjDBgReJMKgr+n86sn2nPVVmJ28Dm053Kqw==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-member-expression-to-functions": "^7.16.7", - "@babel/helper-optimise-call-expression": "^7.16.7", - "@babel/helper-replace-supers": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7" + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-member-expression-to-functions": "^7.18.9", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.9", + "@babel/helper-split-export-declaration": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -172,13 +190,13 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.17.0.tgz", - "integrity": "sha512-awO2So99wG6KnlE+TPs6rn83gCz5WlEePJDTnLEqbchMVrBeAujURVphRdigsk094VhvZehFoNOihSlcBjwsXA==", + "version": "7.19.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.19.0.tgz", + "integrity": "sha512-htnV+mHX32DF81amCDrwIDr8nrp1PTm+3wfBN9/v8QJOLEioOCOG7qNyq0nHeFiWbT3Eb7gsPwEmV64UCQ1jzw==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "regexpu-core": "^5.0.1" + "@babel/helper-annotate-as-pure": "^7.18.6", + "regexpu-core": "^5.1.0" }, "engines": { "node": ">=6.9.0" @@ -188,15 +206,13 @@ } }, "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz", - "integrity": "sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA==", + "version": "0.3.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz", + "integrity": "sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==", "dev": true, "dependencies": { - "@babel/helper-compilation-targets": "^7.13.0", - "@babel/helper-module-imports": "^7.12.13", - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/traverse": "^7.13.0", + "@babel/helper-compilation-targets": "^7.17.7", + "@babel/helper-plugin-utils": "^7.16.7", "debug": "^4.1.1", "lodash.debounce": "^4.0.8", "resolve": "^1.14.2", @@ -207,251 +223,248 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", - "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", + "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", "dev": true, - "dependencies": { - "@babel/types": "^7.16.7" - }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-explode-assignable-expression": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.7.tgz", - "integrity": "sha512-KyUenhWMC8VrxzkGP0Jizjo4/Zx+1nNZhgocs+gLzyZyB8SHidhoq9KK/8Ato4anhwsivfkBLftky7gvzbZMtQ==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz", + "integrity": "sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg==", "dev": true, "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", - "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", - "dev": true, - "dependencies": { - "@babel/helper-get-function-arity": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/types": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-get-function-arity": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", - "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", + "version": "7.19.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", + "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", "dev": true, "dependencies": { - "@babel/types": "^7.16.7" + "@babel/template": "^7.18.10", + "@babel/types": "^7.19.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", - "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", + "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", "dev": true, "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.17.7.tgz", - "integrity": "sha512-thxXgnQ8qQ11W2wVUObIqDL4p148VMxkt5T/qpN5k2fboRyzFGFmKsTGViquyM5QHKUy48OZoca8kw4ajaDPyw==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz", + "integrity": "sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg==", "dev": true, "dependencies": { - "@babel/types": "^7.17.0" + "@babel/types": "^7.18.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", - "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", + "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", "dev": true, "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz", - "integrity": "sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw==", + "version": "7.19.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", + "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-module-imports": "^7.16.7", - "@babel/helper-simple-access": "^7.17.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/helper-validator-identifier": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0" + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-simple-access": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.18.6", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz", - "integrity": "sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", + "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==", "dev": true, "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz", - "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==", + "version": "7.19.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", + "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.8.tgz", - "integrity": "sha512-fm0gH7Flb8H51LqJHy3HJ3wnE1+qtYR2A99K06ahwrawLdOFsCEWjZOrYricXJHoPSudNKxrMBUPEIPxiIIvBw==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz", + "integrity": "sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-wrap-function": "^7.16.8", - "@babel/types": "^7.16.8" + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-wrap-function": "^7.18.9", + "@babel/types": "^7.18.9" }, "engines": { "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz", - "integrity": "sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw==", + "version": "7.19.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-replace-supers/-/helper-replace-supers-7.19.1.tgz", + "integrity": "sha512-T7ahH7wV0Hfs46SFh5Jz3s0B6+o8g3c+7TMxu7xKfmHikg7EAZ3I2Qk9LFhjxXq8sL7UkP5JflezNwoZa8WvWw==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-member-expression-to-functions": "^7.16.7", - "@babel/helper-optimise-call-expression": "^7.16.7", - "@babel/traverse": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-member-expression-to-functions": "^7.18.9", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/traverse": "^7.19.1", + "@babel/types": "^7.19.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-simple-access": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.17.7.tgz", - "integrity": "sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", + "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", "dev": true, "dependencies": { - "@babel/types": "^7.17.0" + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz", - "integrity": "sha512-+il1gTy0oHwUsBQZyJvukbB4vPMdcYBrFHa0Uc4AizLxbq6BOYC51Rv4tWocX9BLBDLZ4kc6qUFpQ6HRgL+3zw==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.9.tgz", + "integrity": "sha512-imytd2gHi3cJPsybLRbmFrF7u5BIEuI2cNheyKi3/iOBC63kNn3q8Crn2xVuESli0aM4KYsyEqKyS7lFL8YVtw==", "dev": true, "dependencies": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.18.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", - "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", + "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", "dev": true, "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/helper-string-parser": { + "version": "7.18.10", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", + "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "version": "7.19.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", - "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", + "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-wrap-function": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.16.8.tgz", - "integrity": "sha512-8RpyRVIAW1RcDDGTA+GpPAwV22wXCfKOoM9bet6TLkGIFTkRQSkH1nMQ5Yet4MpoXe1ZwHPVtNasc2w0uZMqnw==", + "version": "7.19.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-wrap-function/-/helper-wrap-function-7.19.0.tgz", + "integrity": "sha512-txX8aN8CZyYGTwcLhlk87KRqncAzhh5TpQamZUa0/u3an36NtDpUP6bQgBCBcLeBs09R/OwQu3OjK0k/HwfNDg==", "dev": true, "dependencies": { - "@babel/helper-function-name": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.16.8", - "@babel/types": "^7.16.8" + "@babel/helper-function-name": "^7.19.0", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.8.tgz", - "integrity": "sha512-QcL86FGxpfSJwGtAvv4iG93UL6bmqBdmoVY0CMCU2g+oD2ezQse3PT5Pa+jiD6LJndBQi0EDlpzOWNlLuhz5gw==", + "version": "7.19.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helpers/-/helpers-7.19.0.tgz", + "integrity": "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==", "dev": true, "dependencies": { - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0" + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.16.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", - "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", + "@babel/helper-validator-identifier": "^7.18.6", "chalk": "^2.0.0", "js-tokens": "^4.0.0" }, @@ -460,9 +473,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.8.tgz", - "integrity": "sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==", + "version": "7.19.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/parser/-/parser-7.19.3.tgz", + "integrity": "sha512-pJ9xOlNWHiy9+FuFP09DEAFbAn4JskgRsVcc169w2xRBC3FRGuQEwjeIMMND9L2zc0iEhO/tGv4Zq+km+hxNpQ==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -472,12 +485,12 @@ } }, "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.16.7.tgz", - "integrity": "sha512-anv/DObl7waiGEnC24O9zqL0pSuI9hljihqiDuFHC8d7/bjr/4RLGPWuc8rYOff/QPzbEPSkzG8wGG9aDuhHRg==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz", + "integrity": "sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -487,14 +500,14 @@ } }, "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.16.7.tgz", - "integrity": "sha512-di8vUHRdf+4aJ7ltXhaDbPoszdkh59AQtJM5soLsuHpQJdFQZOA4uGj0V2u/CZ8bJ/u8ULDL5yq6FO/bCXnKHw==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.9.tgz", + "integrity": "sha512-AHrP9jadvH7qlOj6PINbgSuphjQUAK7AOT7DPjBo9EHoLhQTnnK5u45e1Hd4DbSQEO9nqPWtQ89r+XEOWFScKg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", - "@babel/plugin-proposal-optional-chaining": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9", + "@babel/plugin-proposal-optional-chaining": "^7.18.9" }, "engines": { "node": ">=6.9.0" @@ -504,13 +517,14 @@ } }, "node_modules/@babel/plugin-proposal-async-generator-functions": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.8.tgz", - "integrity": "sha512-71YHIvMuiuqWJQkebWJtdhQTfd4Q4mF76q2IX37uZPkG9+olBxsX+rH1vkhFto4UeJZ9dPY2s+mDvhDm1u2BGQ==", + "version": "7.19.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.19.1.tgz", + "integrity": "sha512-0yu8vNATgLy4ivqMNBIwb1HebCelqN7YX8SL3FDXORv/RqT0zEEWUCH4GH44JsSrvCu6GqnAdR5EBFAPeNBB4Q==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-remap-async-to-generator": "^7.16.8", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-remap-async-to-generator": "^7.18.9", "@babel/plugin-syntax-async-generators": "^7.8.4" }, "engines": { @@ -521,13 +535,13 @@ } }, "node_modules/@babel/plugin-proposal-class-properties": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.7.tgz", - "integrity": "sha512-IobU0Xme31ewjYOShSIqd/ZGM/r/cuOz2z0MDbNrhF5FW+ZVgi0f2lyeoj9KFPDOAqsYxmLWZte1WOwlvY9aww==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", + "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -537,13 +551,13 @@ } }, "node_modules/@babel/plugin-proposal-class-static-block": { - "version": "7.17.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.17.6.tgz", - "integrity": "sha512-X/tididvL2zbs7jZCeeRJ8167U/+Ac135AM6jCAx6gYXDUviZV5Ku9UDvWS2NCuWlFjIRXklYhwo6HhAC7ETnA==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.6.tgz", + "integrity": "sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.17.6", - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-class-static-block": "^7.14.5" }, "engines": { @@ -554,12 +568,12 @@ } }, "node_modules/@babel/plugin-proposal-dynamic-import": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.7.tgz", - "integrity": "sha512-I8SW9Ho3/8DRSdmDdH3gORdyUuYnk1m4cMxUAdu5oy4n3OfN8flDEH+d60iG7dUfi0KkYwSvoalHzzdRzpWHTg==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz", + "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-dynamic-import": "^7.8.3" }, "engines": { @@ -570,12 +584,12 @@ } }, "node_modules/@babel/plugin-proposal-export-namespace-from": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.16.7.tgz", - "integrity": "sha512-ZxdtqDXLRGBL64ocZcs7ovt71L3jhC1RGSyR996svrCi3PYqHNkb3SwPJCs8RIzD86s+WPpt2S73+EHCGO+NUA==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz", + "integrity": "sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-plugin-utils": "^7.18.9", "@babel/plugin-syntax-export-namespace-from": "^7.8.3" }, "engines": { @@ -586,12 +600,12 @@ } }, "node_modules/@babel/plugin-proposal-json-strings": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.7.tgz", - "integrity": "sha512-lNZ3EEggsGY78JavgbHsK9u5P3pQaW7k4axlgFLYkMd7UBsiNahCITShLjNQschPyjtO6dADrL24757IdhBrsQ==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz", + "integrity": "sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-json-strings": "^7.8.3" }, "engines": { @@ -602,12 +616,12 @@ } }, "node_modules/@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.16.7.tgz", - "integrity": "sha512-K3XzyZJGQCr00+EtYtrDjmwX7o7PLK6U9bi1nCwkQioRFVUv6dJoxbQjtWVtP+bCPy82bONBKG8NPyQ4+i6yjg==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.9.tgz", + "integrity": "sha512-128YbMpjCrP35IOExw2Fq+x55LMP42DzhOhX2aNNIdI9avSWl2PI0yuBWarr3RYpZBSPtabfadkH2yeRiMD61Q==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-plugin-utils": "^7.18.9", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" }, "engines": { @@ -618,12 +632,12 @@ } }, "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.16.7.tgz", - "integrity": "sha512-aUOrYU3EVtjf62jQrCj63pYZ7k6vns2h/DQvHPWGmsJRYzWXZ6/AsfgpiRy6XiuIDADhJzP2Q9MwSMKauBQ+UQ==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", + "integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" }, "engines": { @@ -634,12 +648,12 @@ } }, "node_modules/@babel/plugin-proposal-numeric-separator": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.7.tgz", - "integrity": "sha512-vQgPMknOIgiuVqbokToyXbkY/OmmjAzr/0lhSIbG/KmnzXPGwW/AdhdKpi+O4X/VkWiWjnkKOBiqJrTaC98VKw==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", + "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-numeric-separator": "^7.10.4" }, "engines": { @@ -650,16 +664,16 @@ } }, "node_modules/@babel/plugin-proposal-object-rest-spread": { - "version": "7.17.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.17.3.tgz", - "integrity": "sha512-yuL5iQA/TbZn+RGAfxQXfi7CNLmKi1f8zInn4IgobuCWcAb7i+zj4TYzQ9l8cEzVyJ89PDGuqxK1xZpUDISesw==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.9.tgz", + "integrity": "sha512-kDDHQ5rflIeY5xl69CEqGEZ0KY369ehsCIEbTGb4siHG5BE9sga/T0r0OUwyZNLMmZE79E1kbsqAjwFCW4ds6Q==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.17.0", - "@babel/helper-compilation-targets": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/compat-data": "^7.18.8", + "@babel/helper-compilation-targets": "^7.18.9", + "@babel/helper-plugin-utils": "^7.18.9", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.16.7" + "@babel/plugin-transform-parameters": "^7.18.8" }, "engines": { "node": ">=6.9.0" @@ -669,12 +683,12 @@ } }, "node_modules/@babel/plugin-proposal-optional-catch-binding": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.7.tgz", - "integrity": "sha512-eMOH/L4OvWSZAE1VkHbr1vckLG1WUcHGJSLqqQwl2GaUqG6QjddvrOaTUMNYiv77H5IKPMZ9U9P7EaHwvAShfA==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz", + "integrity": "sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" }, "engines": { @@ -685,13 +699,13 @@ } }, "node_modules/@babel/plugin-proposal-optional-chaining": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.7.tgz", - "integrity": "sha512-eC3xy+ZrUcBtP7x+sq62Q/HYd674pPTb/77XZMb5wbDPGWIdUbSr4Agr052+zaUPSb+gGRnjxXfKFvx5iMJ+DA==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.9.tgz", + "integrity": "sha512-v5nwt4IqBXihxGsW2QmCWMDS3B3bzGIk/EQVZz2ei7f3NJl8NzAJVvUmpDW5q1CRNY+Beb/k58UAH1Km1N411w==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9", "@babel/plugin-syntax-optional-chaining": "^7.8.3" }, "engines": { @@ -702,13 +716,13 @@ } }, "node_modules/@babel/plugin-proposal-private-methods": { - "version": "7.16.11", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.11.tgz", - "integrity": "sha512-F/2uAkPlXDr8+BHpZvo19w3hLFKge+k75XUprE6jaqKxjGkSYcK+4c+bup5PdW/7W/Rpjwql7FTVEDW+fRAQsw==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", + "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.16.10", - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -718,14 +732,14 @@ } }, "node_modules/@babel/plugin-proposal-private-property-in-object": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.16.7.tgz", - "integrity": "sha512-rMQkjcOFbm+ufe3bTZLyOfsOUOxyvLXZJCTARhJr+8UMSoZmqTe1K1BgkFcrW37rAchWg57yI69ORxiWvUINuQ==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.18.6.tgz", + "integrity": "sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-create-class-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-private-property-in-object": "^7.14.5" }, "engines": { @@ -736,13 +750,13 @@ } }, "node_modules/@babel/plugin-proposal-unicode-property-regex": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.7.tgz", - "integrity": "sha512-QRK0YI/40VLhNVGIjRNAAQkEHws0cswSdFFjpFyt943YmJIU1da9uW63Iu6NFV6CxTZW5eTDCrwZUstBWgp/Rg==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", + "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=4" @@ -753,7 +767,7 @@ }, "node_modules/@babel/plugin-syntax-async-generators": { "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, "dependencies": { @@ -765,7 +779,7 @@ }, "node_modules/@babel/plugin-syntax-class-properties": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "dev": true, "dependencies": { @@ -777,7 +791,7 @@ }, "node_modules/@babel/plugin-syntax-class-static-block": { "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", "dev": true, "dependencies": { @@ -792,7 +806,7 @@ }, "node_modules/@babel/plugin-syntax-dynamic-import": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", "dev": true, "dependencies": { @@ -804,7 +818,7 @@ }, "node_modules/@babel/plugin-syntax-export-namespace-from": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", "dev": true, "dependencies": { @@ -814,9 +828,24 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-import-assertions": { + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.18.6.tgz", + "integrity": "sha512-/DU3RXad9+bZwrgWJQKbr39gYbJpLJHezqEzRzi/BHRlJ9zsQb4CK2CA/5apllXNomwA1qHwzvHl+AdEmC5krQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-json-strings": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", "dev": true, "dependencies": { @@ -828,7 +857,7 @@ }, "node_modules/@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", "dev": true, "dependencies": { @@ -840,7 +869,7 @@ }, "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", "dev": true, "dependencies": { @@ -852,7 +881,7 @@ }, "node_modules/@babel/plugin-syntax-numeric-separator": { "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", "dev": true, "dependencies": { @@ -864,7 +893,7 @@ }, "node_modules/@babel/plugin-syntax-object-rest-spread": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dev": true, "dependencies": { @@ -876,7 +905,7 @@ }, "node_modules/@babel/plugin-syntax-optional-catch-binding": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "dev": true, "dependencies": { @@ -888,7 +917,7 @@ }, "node_modules/@babel/plugin-syntax-optional-chaining": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", "dev": true, "dependencies": { @@ -900,7 +929,7 @@ }, "node_modules/@babel/plugin-syntax-private-property-in-object": { "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", "dev": true, "dependencies": { @@ -915,7 +944,7 @@ }, "node_modules/@babel/plugin-syntax-top-level-await": { "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", "dev": true, "dependencies": { @@ -929,12 +958,12 @@ } }, "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.7.tgz", - "integrity": "sha512-9ffkFFMbvzTvv+7dTp/66xvZAWASuPD5Tl9LK3Z9vhOmANo6j94rik+5YMBt4CwHVMWLWpMsriIc2zsa3WW3xQ==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.18.6.tgz", + "integrity": "sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -944,14 +973,14 @@ } }, "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.8.tgz", - "integrity": "sha512-MtmUmTJQHCnyJVrScNzNlofQJ3dLFuobYn3mwOTKHnSCMtbNsqvF71GQmJfFjdrXSsAA7iysFmYWw4bXZ20hOg==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.18.6.tgz", + "integrity": "sha512-ARE5wZLKnTgPW7/1ftQmSi1CmkqqHo2DNmtztFhvgtOWSDfq0Cq9/9L+KnZNYSNrydBekhW3rwShduf59RoXag==", "dev": true, "dependencies": { - "@babel/helper-module-imports": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-remap-async-to-generator": "^7.16.8" + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-remap-async-to-generator": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -961,12 +990,12 @@ } }, "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.7.tgz", - "integrity": "sha512-JUuzlzmF40Z9cXyytcbZEZKckgrQzChbQJw/5PuEHYeqzCsvebDx0K0jWnIIVcmmDOAVctCgnYs0pMcrYj2zJg==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz", + "integrity": "sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -976,12 +1005,12 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.7.tgz", - "integrity": "sha512-ObZev2nxVAYA4bhyusELdo9hb3H+A56bxH3FZMbEImZFiEDYVHXQSJ1hQKFlDnlt8G9bBrCZ5ZpURZUrV4G5qQ==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.18.9.tgz", + "integrity": "sha512-5sDIJRV1KtQVEbt/EIBwGy4T01uYIo4KRB3VUqzkhrAIOGx7AoctL9+Ux88btY0zXdDyPJ9mW+bg+v+XEkGmtw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.9" }, "engines": { "node": ">=6.9.0" @@ -991,18 +1020,19 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.7.tgz", - "integrity": "sha512-WY7og38SFAGYRe64BrjKf8OrE6ulEHtr5jEYaZMwox9KebgqPi67Zqz8K53EKk1fFEJgm96r32rkKZ3qA2nCWQ==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-optimise-call-expression": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-replace-supers": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", + "version": "7.19.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-classes/-/plugin-transform-classes-7.19.0.tgz", + "integrity": "sha512-YfeEE9kCjqTS9IitkgfJuxjcEtLUHMqa8yUJ6zdz8vR7hKuo6mOy2C05P0F1tdMmDCeuyidKnlrw/iTppHcr2A==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-compilation-targets": "^7.19.0", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-replace-supers": "^7.18.9", + "@babel/helper-split-export-declaration": "^7.18.6", "globals": "^11.1.0" }, "engines": { @@ -1013,12 +1043,12 @@ } }, "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.7.tgz", - "integrity": "sha512-gN72G9bcmenVILj//sv1zLNaPyYcOzUho2lIJBMh/iakJ9ygCo/hEF9cpGb61SCMEDxbbyBoVQxrt+bWKu5KGw==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.9.tgz", + "integrity": "sha512-+i0ZU1bCDymKakLxn5srGHrsAPRELC2WIbzwjLhHW9SIE1cPYkLCL0NlnXMZaM1vhfgA2+M7hySk42VBvrkBRw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.9" }, "engines": { "node": ">=6.9.0" @@ -1028,12 +1058,12 @@ } }, "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.17.7.tgz", - "integrity": "sha512-XVh0r5yq9sLR4vZ6eVZe8FKfIcSgaTBxVBRSYokRj2qksf6QerYnTxz9/GTuKTH/n/HwLP7t6gtlybHetJ/6hQ==", + "version": "7.18.13", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.13.tgz", + "integrity": "sha512-TodpQ29XekIsex2A+YJPj5ax2plkGa8YYY6mFjCohk/IG9IY42Rtuj1FuDeemfg2ipxIFLzPeA83SIBnlhSIow==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.9" }, "engines": { "node": ">=6.9.0" @@ -1043,13 +1073,13 @@ } }, "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.7.tgz", - "integrity": "sha512-Lyttaao2SjZF6Pf4vk1dVKv8YypMpomAbygW+mU5cYP3S5cWTfCJjG8xV6CFdzGFlfWK81IjL9viiTvpb6G7gQ==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz", + "integrity": "sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -1059,12 +1089,12 @@ } }, "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.7.tgz", - "integrity": "sha512-03DvpbRfvWIXyK0/6QiR1KMTWeT6OcQ7tbhjrXyFS02kjuX/mu5Bvnh5SDSWHxyawit2g5aWhKwI86EE7GUnTw==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz", + "integrity": "sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.9" }, "engines": { "node": ">=6.9.0" @@ -1074,13 +1104,13 @@ } }, "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.7.tgz", - "integrity": "sha512-8UYLSlyLgRixQvlYH3J2ekXFHDFLQutdy7FfFAMm3CPZ6q9wHCwnUyiXpQCe3gVVnQlHc5nsuiEVziteRNTXEA==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz", + "integrity": "sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw==", "dev": true, "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -1090,12 +1120,12 @@ } }, "node_modules/@babel/plugin-transform-for-of": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.7.tgz", - "integrity": "sha512-/QZm9W92Ptpw7sjI9Nx1mbcsWz33+l8kuMIQnDwgQBG5s3fAfQvkRjQ7NqXhtNcKOnPkdICmUHyCaWW06HCsqg==", + "version": "7.18.8", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz", + "integrity": "sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -1105,14 +1135,14 @@ } }, "node_modules/@babel/plugin-transform-function-name": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.7.tgz", - "integrity": "sha512-SU/C68YVwTRxqWj5kgsbKINakGag0KTgq9f2iZEXdStoAbOzLHEBRYzImmA6yFo8YZhJVflvXmIHUO7GWHmxxA==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz", + "integrity": "sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ==", "dev": true, "dependencies": { - "@babel/helper-compilation-targets": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-compilation-targets": "^7.18.9", + "@babel/helper-function-name": "^7.18.9", + "@babel/helper-plugin-utils": "^7.18.9" }, "engines": { "node": ">=6.9.0" @@ -1122,12 +1152,12 @@ } }, "node_modules/@babel/plugin-transform-literals": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.7.tgz", - "integrity": "sha512-6tH8RTpTWI0s2sV6uq3e/C9wPo4PTqqZps4uF0kzQ9/xPLFQtipynvmT1g/dOfEJ+0EQsHhkQ/zyRId8J2b8zQ==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz", + "integrity": "sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.9" }, "engines": { "node": ">=6.9.0" @@ -1137,12 +1167,12 @@ } }, "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.7.tgz", - "integrity": "sha512-mBruRMbktKQwbxaJof32LT9KLy2f3gH+27a5XSuXo6h7R3vqltl0PgZ80C8ZMKw98Bf8bqt6BEVi3svOh2PzMw==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz", + "integrity": "sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -1152,13 +1182,13 @@ } }, "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.7.tgz", - "integrity": "sha512-KaaEtgBL7FKYwjJ/teH63oAmE3lP34N3kshz8mm4VMAw7U3PxjVwwUmxEFksbgsNUaO3wId9R2AVQYSEGRa2+g==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.18.6.tgz", + "integrity": "sha512-Pra5aXsmTsOnjM3IajS8rTaLCy++nGM4v3YR4esk5PCsyg9z8NA5oQLwxzMUtDBd8F+UmVza3VxoAaWCbzH1rg==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", "babel-plugin-dynamic-import-node": "^2.3.3" }, "engines": { @@ -1169,14 +1199,14 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.17.7.tgz", - "integrity": "sha512-ITPmR2V7MqioMJyrxUo2onHNC3e+MvfFiFIR0RP21d3PtlVb6sfzoxNKiphSZUOM9hEIdzCcZe83ieX3yoqjUA==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz", + "integrity": "sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.17.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-simple-access": "^7.17.7", + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-simple-access": "^7.18.6", "babel-plugin-dynamic-import-node": "^2.3.3" }, "engines": { @@ -1187,15 +1217,15 @@ } }, "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.17.8.tgz", - "integrity": "sha512-39reIkMTUVagzgA5x88zDYXPCMT6lcaRKs1+S9K6NKBPErbgO/w/kP8GlNQTC87b412ZTlmNgr3k2JrWgHH+Bw==", + "version": "7.19.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.19.0.tgz", + "integrity": "sha512-x9aiR0WXAWmOWsqcsnrzGR+ieaTMVyGyffPVA7F8cXAGt/UxefYv6uSHZLkAFChN5M5Iy1+wjE+xJuPt22H39A==", "dev": true, "dependencies": { - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-module-transforms": "^7.17.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-validator-identifier": "^7.16.7", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-module-transforms": "^7.19.0", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-validator-identifier": "^7.18.6", "babel-plugin-dynamic-import-node": "^2.3.3" }, "engines": { @@ -1206,13 +1236,13 @@ } }, "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.7.tgz", - "integrity": "sha512-EMh7uolsC8O4xhudF2F6wedbSHm1HHZ0C6aJ7K67zcDNidMzVcxWdGr+htW9n21klm+bOn+Rx4CBsAntZd3rEQ==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz", + "integrity": "sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -1222,12 +1252,13 @@ } }, "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.8.tgz", - "integrity": "sha512-j3Jw+n5PvpmhRR+mrgIh04puSANCk/T/UA3m3P1MjJkhlK906+ApHhDIqBQDdOgL/r1UYpz4GNclTXxyZrYGSw==", + "version": "7.19.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.19.1.tgz", + "integrity": "sha512-oWk9l9WItWBQYS4FgXD4Uyy5kq898lvkXpXQxoJEY1RnvPk4R/Dvu2ebXU9q8lP+rlMwUQTFf2Ok6d78ODa0kw==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.16.7" + "@babel/helper-create-regexp-features-plugin": "^7.19.0", + "@babel/helper-plugin-utils": "^7.19.0" }, "engines": { "node": ">=6.9.0" @@ -1237,12 +1268,12 @@ } }, "node_modules/@babel/plugin-transform-new-target": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.7.tgz", - "integrity": "sha512-xiLDzWNMfKoGOpc6t3U+etCE2yRnn3SM09BXqWPIZOBpL2gvVrBWUKnsJx0K/ADi5F5YC5f8APFfWrz25TdlGg==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz", + "integrity": "sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -1252,13 +1283,13 @@ } }, "node_modules/@babel/plugin-transform-object-super": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.7.tgz", - "integrity": "sha512-14J1feiQVWaGvRxj2WjyMuXS2jsBkgB3MdSN5HuC2G5nRspa5RK9COcs82Pwy5BuGcjb+fYaUj94mYcOj7rCvw==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz", + "integrity": "sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-replace-supers": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -1268,12 +1299,12 @@ } }, "node_modules/@babel/plugin-transform-parameters": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.7.tgz", - "integrity": "sha512-AT3MufQ7zZEhU2hwOA11axBnExW0Lszu4RL/tAlUJBuNoRak+wehQW8h6KcXOcgjY42fHtDxswuMhMjFEuv/aw==", + "version": "7.18.8", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.8.tgz", + "integrity": "sha512-ivfbE3X2Ss+Fj8nnXvKJS6sjRG4gzwPMsP+taZC+ZzEGjAYlvENixmt1sZ5Ca6tWls+BlKSGKPJ6OOXvXCbkFg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -1283,12 +1314,12 @@ } }, "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.7.tgz", - "integrity": "sha512-z4FGr9NMGdoIl1RqavCqGG+ZuYjfZ/hkCIeuH6Do7tXmSm0ls11nYVSJqFEUOSJbDab5wC6lRE/w6YjVcr6Hqw==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz", + "integrity": "sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -1298,12 +1329,13 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.7.tgz", - "integrity": "sha512-mF7jOgGYCkSJagJ6XCujSQg+6xC1M77/03K2oBmVJWoFGNUtnVJO4WHKJk3dnPC8HCcj4xBQP1Egm8DWh3Pb3Q==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz", + "integrity": "sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ==", "dev": true, "dependencies": { - "regenerator-transform": "^0.14.2" + "@babel/helper-plugin-utils": "^7.18.6", + "regenerator-transform": "^0.15.0" }, "engines": { "node": ">=6.9.0" @@ -1313,12 +1345,12 @@ } }, "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.16.7.tgz", - "integrity": "sha512-KQzzDnZ9hWQBjwi5lpY5v9shmm6IVG0U9pB18zvMu2i4H90xpT4gmqwPYsn8rObiadYe2M0gmgsiOIF5A/2rtg==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz", + "integrity": "sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -1328,12 +1360,12 @@ } }, "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.7.tgz", - "integrity": "sha512-hah2+FEnoRoATdIb05IOXf+4GzXYTq75TVhIn1PewihbpyrNWUt2JbudKQOETWw6QpLe+AIUpJ5MVLYTQbeeUg==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz", + "integrity": "sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -1343,13 +1375,13 @@ } }, "node_modules/@babel/plugin-transform-spread": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.7.tgz", - "integrity": "sha512-+pjJpgAngb53L0iaA5gU/1MLXJIfXcYepLgXB3esVRf4fqmj8f2cxM3/FKaHsZms08hFQJkFccEWuIpm429TXg==", + "version": "7.19.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-spread/-/plugin-transform-spread-7.19.0.tgz", + "integrity": "sha512-RsuMk7j6n+r752EtzyScnWkQyuJdli6LdO5Klv8Yx0OfPVTcQkIUfS8clx5e9yHXzlnhOZF3CbQ8C2uP5j074w==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0" + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9" }, "engines": { "node": ">=6.9.0" @@ -1359,12 +1391,12 @@ } }, "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.7.tgz", - "integrity": "sha512-NJa0Bd/87QV5NZZzTuZG5BPJjLYadeSZ9fO6oOUoL4iQx+9EEuw/eEM92SrsT19Yc2jgB1u1hsjqDtH02c3Drw==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz", + "integrity": "sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -1374,12 +1406,12 @@ } }, "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.7.tgz", - "integrity": "sha512-VwbkDDUeenlIjmfNeDX/V0aWrQH2QiVyJtwymVQSzItFDTpxfyJh3EVaQiS0rIN/CqbLGr0VcGmuwyTdZtdIsA==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz", + "integrity": "sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.9" }, "engines": { "node": ">=6.9.0" @@ -1389,12 +1421,12 @@ } }, "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.7.tgz", - "integrity": "sha512-p2rOixCKRJzpg9JB4gjnG4gjWkWa89ZoYUnl9snJ1cWIcTH/hvxZqfO+WjG6T8DRBpctEol5jw1O5rA8gkCokQ==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz", + "integrity": "sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.9" }, "engines": { "node": ">=6.9.0" @@ -1404,12 +1436,12 @@ } }, "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.7.tgz", - "integrity": "sha512-TAV5IGahIz3yZ9/Hfv35TV2xEm+kaBDaZQCn2S/hG9/CZ0DktxJv9eKfPc7yYCvOYR4JGx1h8C+jcSOvgaaI/Q==", + "version": "7.18.10", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz", + "integrity": "sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.9" }, "engines": { "node": ">=6.9.0" @@ -1419,13 +1451,13 @@ } }, "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.7.tgz", - "integrity": "sha512-oC5tYYKw56HO75KZVLQ+R/Nl3Hro9kf8iG0hXoaHP7tjAyCpvqBiSNe6vGrZni1Z6MggmUOC6A7VP7AVmw225Q==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz", + "integrity": "sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -1435,37 +1467,38 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.16.11", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.16.11.tgz", - "integrity": "sha512-qcmWG8R7ZW6WBRPZK//y+E3Cli151B20W1Rv7ln27vuPaXU/8TKms6jFdiJtF7UDTxcrb7mZd88tAeK9LjdT8g==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.16.8", - "@babel/helper-compilation-targets": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-validator-option": "^7.16.7", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.16.7", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.16.7", - "@babel/plugin-proposal-async-generator-functions": "^7.16.8", - "@babel/plugin-proposal-class-properties": "^7.16.7", - "@babel/plugin-proposal-class-static-block": "^7.16.7", - "@babel/plugin-proposal-dynamic-import": "^7.16.7", - "@babel/plugin-proposal-export-namespace-from": "^7.16.7", - "@babel/plugin-proposal-json-strings": "^7.16.7", - "@babel/plugin-proposal-logical-assignment-operators": "^7.16.7", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7", - "@babel/plugin-proposal-numeric-separator": "^7.16.7", - "@babel/plugin-proposal-object-rest-spread": "^7.16.7", - "@babel/plugin-proposal-optional-catch-binding": "^7.16.7", - "@babel/plugin-proposal-optional-chaining": "^7.16.7", - "@babel/plugin-proposal-private-methods": "^7.16.11", - "@babel/plugin-proposal-private-property-in-object": "^7.16.7", - "@babel/plugin-proposal-unicode-property-regex": "^7.16.7", + "version": "7.19.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/preset-env/-/preset-env-7.19.3.tgz", + "integrity": "sha512-ziye1OTc9dGFOAXSWKUqQblYHNlBOaDl8wzqf2iKXJAltYiR3hKHUKmkt+S9PppW7RQpq4fFCrwwpIDj/f5P4w==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.19.3", + "@babel/helper-compilation-targets": "^7.19.3", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-validator-option": "^7.18.6", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.9", + "@babel/plugin-proposal-async-generator-functions": "^7.19.1", + "@babel/plugin-proposal-class-properties": "^7.18.6", + "@babel/plugin-proposal-class-static-block": "^7.18.6", + "@babel/plugin-proposal-dynamic-import": "^7.18.6", + "@babel/plugin-proposal-export-namespace-from": "^7.18.9", + "@babel/plugin-proposal-json-strings": "^7.18.6", + "@babel/plugin-proposal-logical-assignment-operators": "^7.18.9", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", + "@babel/plugin-proposal-numeric-separator": "^7.18.6", + "@babel/plugin-proposal-object-rest-spread": "^7.18.9", + "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", + "@babel/plugin-proposal-optional-chaining": "^7.18.9", + "@babel/plugin-proposal-private-methods": "^7.18.6", + "@babel/plugin-proposal-private-property-in-object": "^7.18.6", + "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-class-properties": "^7.12.13", "@babel/plugin-syntax-class-static-block": "^7.14.5", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-import-assertions": "^7.18.6", "@babel/plugin-syntax-json-strings": "^7.8.3", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", @@ -1475,44 +1508,44 @@ "@babel/plugin-syntax-optional-chaining": "^7.8.3", "@babel/plugin-syntax-private-property-in-object": "^7.14.5", "@babel/plugin-syntax-top-level-await": "^7.14.5", - "@babel/plugin-transform-arrow-functions": "^7.16.7", - "@babel/plugin-transform-async-to-generator": "^7.16.8", - "@babel/plugin-transform-block-scoped-functions": "^7.16.7", - "@babel/plugin-transform-block-scoping": "^7.16.7", - "@babel/plugin-transform-classes": "^7.16.7", - "@babel/plugin-transform-computed-properties": "^7.16.7", - "@babel/plugin-transform-destructuring": "^7.16.7", - "@babel/plugin-transform-dotall-regex": "^7.16.7", - "@babel/plugin-transform-duplicate-keys": "^7.16.7", - "@babel/plugin-transform-exponentiation-operator": "^7.16.7", - "@babel/plugin-transform-for-of": "^7.16.7", - "@babel/plugin-transform-function-name": "^7.16.7", - "@babel/plugin-transform-literals": "^7.16.7", - "@babel/plugin-transform-member-expression-literals": "^7.16.7", - "@babel/plugin-transform-modules-amd": "^7.16.7", - "@babel/plugin-transform-modules-commonjs": "^7.16.8", - "@babel/plugin-transform-modules-systemjs": "^7.16.7", - "@babel/plugin-transform-modules-umd": "^7.16.7", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.16.8", - "@babel/plugin-transform-new-target": "^7.16.7", - "@babel/plugin-transform-object-super": "^7.16.7", - "@babel/plugin-transform-parameters": "^7.16.7", - "@babel/plugin-transform-property-literals": "^7.16.7", - "@babel/plugin-transform-regenerator": "^7.16.7", - "@babel/plugin-transform-reserved-words": "^7.16.7", - "@babel/plugin-transform-shorthand-properties": "^7.16.7", - "@babel/plugin-transform-spread": "^7.16.7", - "@babel/plugin-transform-sticky-regex": "^7.16.7", - "@babel/plugin-transform-template-literals": "^7.16.7", - "@babel/plugin-transform-typeof-symbol": "^7.16.7", - "@babel/plugin-transform-unicode-escapes": "^7.16.7", - "@babel/plugin-transform-unicode-regex": "^7.16.7", + "@babel/plugin-transform-arrow-functions": "^7.18.6", + "@babel/plugin-transform-async-to-generator": "^7.18.6", + "@babel/plugin-transform-block-scoped-functions": "^7.18.6", + "@babel/plugin-transform-block-scoping": "^7.18.9", + "@babel/plugin-transform-classes": "^7.19.0", + "@babel/plugin-transform-computed-properties": "^7.18.9", + "@babel/plugin-transform-destructuring": "^7.18.13", + "@babel/plugin-transform-dotall-regex": "^7.18.6", + "@babel/plugin-transform-duplicate-keys": "^7.18.9", + "@babel/plugin-transform-exponentiation-operator": "^7.18.6", + "@babel/plugin-transform-for-of": "^7.18.8", + "@babel/plugin-transform-function-name": "^7.18.9", + "@babel/plugin-transform-literals": "^7.18.9", + "@babel/plugin-transform-member-expression-literals": "^7.18.6", + "@babel/plugin-transform-modules-amd": "^7.18.6", + "@babel/plugin-transform-modules-commonjs": "^7.18.6", + "@babel/plugin-transform-modules-systemjs": "^7.19.0", + "@babel/plugin-transform-modules-umd": "^7.18.6", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.19.1", + "@babel/plugin-transform-new-target": "^7.18.6", + "@babel/plugin-transform-object-super": "^7.18.6", + "@babel/plugin-transform-parameters": "^7.18.8", + "@babel/plugin-transform-property-literals": "^7.18.6", + "@babel/plugin-transform-regenerator": "^7.18.6", + "@babel/plugin-transform-reserved-words": "^7.18.6", + "@babel/plugin-transform-shorthand-properties": "^7.18.6", + "@babel/plugin-transform-spread": "^7.19.0", + "@babel/plugin-transform-sticky-regex": "^7.18.6", + "@babel/plugin-transform-template-literals": "^7.18.9", + "@babel/plugin-transform-typeof-symbol": "^7.18.9", + "@babel/plugin-transform-unicode-escapes": "^7.18.10", + "@babel/plugin-transform-unicode-regex": "^7.18.6", "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.16.8", - "babel-plugin-polyfill-corejs2": "^0.3.0", - "babel-plugin-polyfill-corejs3": "^0.5.0", - "babel-plugin-polyfill-regenerator": "^0.3.0", - "core-js-compat": "^3.20.2", + "@babel/types": "^7.19.3", + "babel-plugin-polyfill-corejs2": "^0.3.3", + "babel-plugin-polyfill-corejs3": "^0.6.0", + "babel-plugin-polyfill-regenerator": "^0.4.1", + "core-js-compat": "^3.25.1", "semver": "^6.3.0" }, "engines": { @@ -1524,7 +1557,7 @@ }, "node_modules/@babel/preset-modules": { "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/preset-modules/-/preset-modules-0.1.5.tgz", "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", "dev": true, "dependencies": { @@ -1539,9 +1572,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.8.tgz", - "integrity": "sha512-dQpEpK0O9o6lj6oPu0gRDbbnk+4LeHlNcBpspf6Olzt3GIX4P1lWF1gS+pHLDFlaJvbR6q7jCfQ08zA4QJBnmA==", + "version": "7.19.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/runtime/-/runtime-7.19.0.tgz", + "integrity": "sha512-eR8Lo9hnDS7tqkO7NsV+mKvCmv5boaXFSZ70DnfhcgiEne8hv9oCEd36Klw74EtizEqLsy4YnW8UWwpBVolHZA==", "dev": true, "dependencies": { "regenerator-runtime": "^0.13.4" @@ -1551,33 +1584,33 @@ } }, "node_modules/@babel/template": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", - "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "version": "7.18.10", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/template/-/template-7.18.10.tgz", + "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.10", + "@babel/types": "^7.18.10" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.17.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz", - "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", + "version": "7.19.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/traverse/-/traverse-7.19.3.tgz", + "integrity": "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.3", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.19.3", + "@babel/types": "^7.19.3", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -1586,46 +1619,185 @@ } }, "node_modules/@babel/types": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", - "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", + "version": "7.19.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/types/-/types-7.19.3.tgz", + "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", + "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-validator-identifier": "^7.19.1", "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@eslint/eslintrc": { + "version": "1.3.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@eslint/eslintrc/-/eslintrc-1.3.2.tgz", + "integrity": "sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.4.0", + "globals": "^13.15.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "13.17.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/globals/-/globals-13.17.0.tgz", + "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.10.7", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@humanwhocodes/config-array/-/config-array-0.10.7.tgz", + "integrity": "sha512-MDl6D6sBsaV452/QSdX+4CXIjZhIcI0PELsxUjk4U828yd58vk3bTIvk/6w5FY+4hIy9sLW0sfrV7K7Kc++j/w==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/gitignore-to-minimatch": { + "version": "1.0.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", + "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.1.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", + "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz", - "integrity": "sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==", + "version": "3.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz", - "integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==", + "version": "1.4.14", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.4.tgz", - "integrity": "sha512-vFv9ttIedivx0ux3QSjhgtCVjPZd5l46ZOMDSCwnH1yUO2e964gO8LZGyv2QkqcgR6TnBU1v+1IFqmeoG+0UJQ==", + "version": "0.3.15", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", + "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@rollup/plugin-babel": { "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", "integrity": "sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==", "dev": true, "dependencies": { @@ -1647,9 +1819,9 @@ } }, "node_modules/@rollup/plugin-commonjs": { - "version": "21.0.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.0.3.tgz", - "integrity": "sha512-ThGfwyvcLc6cfP/MWxA5ACF+LZCvsuhUq7V5134Az1oQWsiC7lNpLT4mJI86WQunK7BYmpUiHmMk2Op6OAHs0g==", + "version": "22.0.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@rollup/plugin-commonjs/-/plugin-commonjs-22.0.2.tgz", + "integrity": "sha512-//NdP6iIwPbMTcazYsiBMbJW7gfmpHom33u1beiIoHDEM0Q9clvtQB1T0efvMqHeKsGohiHo97BCPCkBXdscwg==", "dev": true, "dependencies": { "@rollup/pluginutils": "^3.1.0", @@ -1661,28 +1833,22 @@ "resolve": "^1.17.0" }, "engines": { - "node": ">= 8.0.0" + "node": ">= 12.0.0" }, "peerDependencies": { - "rollup": "^2.38.3" + "rollup": "^2.68.0" } }, - "node_modules/@rollup/plugin-commonjs/node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true - }, "node_modules/@rollup/plugin-node-resolve": { - "version": "13.1.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.3.tgz", - "integrity": "sha512-BdxNk+LtmElRo5d06MGY4zoepyrXX1tkzX2hrnPEZ53k78GuOMWLqmJDGIIOPwVRIFZrLQOo+Yr6KtCuLIA0AQ==", + "version": "14.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@rollup/plugin-node-resolve/-/plugin-node-resolve-14.1.0.tgz", + "integrity": "sha512-5G2niJroNCz/1zqwXtk0t9+twOSDlG00k1Wfd7bkbbXmwg8H8dvgHdIWAun53Ps/rckfvOC7scDBjuGFg5OaWw==", "dev": true, "dependencies": { "@rollup/pluginutils": "^3.1.0", "@types/resolve": "1.17.1", - "builtin-modules": "^3.1.0", "deepmerge": "^4.2.2", + "is-builtin-module": "^3.1.0", "is-module": "^1.0.0", "resolve": "^1.19.0" }, @@ -1690,12 +1856,12 @@ "node": ">= 10.0.0" }, "peerDependencies": { - "rollup": "^2.42.0" + "rollup": "^2.78.0" } }, "node_modules/@rollup/pluginutils": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", "dev": true, "dependencies": { @@ -1710,30 +1876,88 @@ "rollup": "^1.20.0||^2.0.0" } }, + "node_modules/@rollup/pluginutils/node_modules/estree-walker": { + "version": "1.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true + }, "node_modules/@types/estree": { "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@types/estree/-/estree-0.0.39.tgz", "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", "dev": true }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "dev": true + }, "node_modules/@types/node": { - "version": "17.0.23", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz", - "integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==", + "version": "16.11.63", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@types/node/-/node-16.11.63.tgz", + "integrity": "sha512-3OxnrEQLBz8EIIaHpg3CibmTAEGkDBcHY4fL5cnBwg2vd2yvHrUDGWxK+MlYPeXWWIoJJW79dGtU+oeBr6166Q==", "dev": true }, "node_modules/@types/resolve": { "version": "1.17.1", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@types/resolve/-/resolve-1.17.1.tgz", "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", "dev": true, "dependencies": { "@types/node": "*" } }, + "node_modules/acorn": { + "version": "8.8.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/ansi-styles": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "dependencies": { @@ -1743,9 +1967,61 @@ "node": ">=4" } }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/array-includes": { + "version": "3.1.5", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/array-includes/-/array-includes-3.1.5.tgz", + "integrity": "sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5", + "get-intrinsic": "^1.1.1", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz", + "integrity": "sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.2", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/babel-plugin-dynamic-import-node": { "version": "2.3.3", - "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", "dev": true, "dependencies": { @@ -1753,13 +2029,13 @@ } }, "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz", - "integrity": "sha512-v7/T6EQcNfVLfcN2X8Lulb7DjprieyLWJK/zOWH5DUYcAgex9sP3h25Q+DLsX9TloXe3y1O8l2q2Jv9q8UVB9w==", + "version": "0.3.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz", + "integrity": "sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.13.11", - "@babel/helper-define-polyfill-provider": "^0.3.1", + "@babel/compat-data": "^7.17.7", + "@babel/helper-define-polyfill-provider": "^0.3.3", "semver": "^6.1.1" }, "peerDependencies": { @@ -1767,25 +2043,25 @@ } }, "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz", - "integrity": "sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ==", + "version": "0.6.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz", + "integrity": "sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA==", "dev": true, "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.3.1", - "core-js-compat": "^3.21.0" + "@babel/helper-define-polyfill-provider": "^0.3.3", + "core-js-compat": "^3.25.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.1.tgz", - "integrity": "sha512-Y2B06tvgHYt1x0yz17jGkGeeMr5FeKUu+ASJ+N6nB5lQ8Dapfg42i0OVrf8PNGJ3zKL4A23snMi1IRwrqqND7A==", + "version": "0.4.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz", + "integrity": "sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw==", "dev": true, "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.3.1" + "@babel/helper-define-polyfill-provider": "^0.3.3" }, "peerDependencies": { "@babel/core": "^7.0.0-0" @@ -1793,13 +2069,13 @@ }, "node_modules/balanced-match": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, "node_modules/brace-expansion": { "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { @@ -1807,10 +2083,22 @@ "concat-map": "0.0.1" } }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/browserslist": { - "version": "4.20.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.2.tgz", - "integrity": "sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA==", + "version": "4.21.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/browserslist/-/browserslist-4.21.4.tgz", + "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", "dev": true, "funding": [ { @@ -1823,11 +2111,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001317", - "electron-to-chromium": "^1.4.84", - "escalade": "^3.1.1", - "node-releases": "^2.0.2", - "picocolors": "^1.0.0" + "caniuse-lite": "^1.0.30001400", + "electron-to-chromium": "^1.4.251", + "node-releases": "^2.0.6", + "update-browserslist-db": "^1.0.9" }, "bin": { "browserslist": "cli.js" @@ -1837,9 +2124,9 @@ } }, "node_modules/builtin-modules": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", - "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==", + "version": "3.3.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", "dev": true, "engines": { "node": ">=6" @@ -1850,7 +2137,7 @@ }, "node_modules/call-bind": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/call-bind/-/call-bind-1.0.2.tgz", "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "dev": true, "dependencies": { @@ -1861,10 +2148,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/caniuse-lite": { - "version": "1.0.30001324", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001324.tgz", - "integrity": "sha512-/eYp1J6zYh1alySQB4uzYFkLmxxI8tk0kxldbNHXp8+v+rdMKdUBNjRLz7T7fz6Iox+1lIdYpc7rq6ZcXfTukg==", + "version": "1.0.30001414", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/caniuse-lite/-/caniuse-lite-1.0.30001414.tgz", + "integrity": "sha512-t55jfSaWjCdocnFdKQoO+d2ct9C59UZg4dY3OnUlSZ447r8pUtIKdp0hpAzrGFultmTC+Us+KpKi4GZl/LXlFg==", "dev": true, "funding": [ { @@ -1879,7 +2175,7 @@ }, "node_modules/chalk": { "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "dependencies": { @@ -1893,7 +2189,7 @@ }, "node_modules/color-convert": { "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "dependencies": { @@ -1902,25 +2198,31 @@ }, "node_modules/color-name": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, "node_modules/commondir": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/commondir/-/commondir-1.0.1.tgz", "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", "dev": true }, "node_modules/concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "node_modules/confusing-browser-globals": { + "version": "1.0.11", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", + "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==", + "dev": true + }, "node_modules/convert-source-map": { "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/convert-source-map/-/convert-source-map-1.8.0.tgz", "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", "dev": true, "dependencies": { @@ -1928,37 +2230,41 @@ } }, "node_modules/core-js-compat": { - "version": "3.21.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.21.1.tgz", - "integrity": "sha512-gbgX5AUvMb8gwxC7FLVWYT7Kkgu/y7+h/h1X43yJkNqhlK2fuYyQimqvKGNZFAY6CKii/GFKJ2cp/1/42TN36g==", + "version": "3.25.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/core-js-compat/-/core-js-compat-3.25.4.tgz", + "integrity": "sha512-gCEcIEEqCR6230WroNunK/653CWKhqyCKJ9b+uESqOt/WFJA8B4lTnnQFdpYY5vmBcwJAA90Bo5vXs+CVsf6iA==", "dev": true, "dependencies": { - "browserslist": "^4.19.1", - "semver": "7.0.0" + "browserslist": "^4.21.4" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/core-js" } }, - "node_modules/core-js-compat/node_modules/semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, - "bin": { - "semver": "bin/semver.js" + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" } }, "node_modules/crypto": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/crypto/-/crypto-1.0.1.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/crypto/-/crypto-1.0.1.tgz", "integrity": "sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig==", "deprecated": "This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in." }, "node_modules/debug": { "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { @@ -1973,9 +2279,15 @@ } } }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, "node_modules/deepmerge": { "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/deepmerge/-/deepmerge-4.2.2.tgz", "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", "dev": true, "engines": { @@ -1983,94 +2295,694 @@ } }, "node_modules/define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "version": "1.1.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", "dev": true, "dependencies": { - "object-keys": "^1.0.12" + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/electron-to-chromium": { - "version": "1.4.103", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.103.tgz", - "integrity": "sha512-c/uKWR1Z/W30Wy/sx3dkZoj4BijbXX85QKWu9jJfjho3LBAXNEGAEW3oWiGb+dotA6C6BzCTxL2/aLes7jlUeg==", - "dev": true - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, "engines": { - "node": ">=0.8.0" + "node": ">=6.0.0" } }, - "node_modules/estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "node_modules/electron-to-chromium": { + "version": "1.4.270", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/electron-to-chromium/-/electron-to-chromium-1.4.270.tgz", + "integrity": "sha512-KNhIzgLiJmDDC444dj9vEOpZEgsV96ult9Iff98Vanumn+ShJHd5se8aX6KeVxdc0YQeqdrezBZv89rleDbvSg==", "dev": true }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "node_modules/es-abstract": { + "version": "1.20.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/es-abstract/-/es-abstract-1.20.3.tgz", + "integrity": "sha512-AyrnaKVpMzljIdwjzrj+LxGmj8ik2LckwXacHqrJJ/jxz6dDDBcZ7I7nlHM0FvEW8MfbWJwOd+yT2XzYW49Frw==", "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.1.3", + "get-symbol-description": "^1.0.0", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.6", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.2", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "safe-regex-test": "^1.0.0", + "string.prototype.trimend": "^1.0.5", + "string.prototype.trimstart": "^1.0.5", + "unbox-primitive": "^1.0.2" + }, "engines": { - "node": ">=0.10.0" - } - }, + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint": { + "version": "8.24.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/eslint/-/eslint-8.24.0.tgz", + "integrity": "sha512-dWFaPhGhTAiPcCgm3f6LI2MBWbogMnTJzFBbhXVRQDJPkr9pGZvVjlVfXd+vyDcWPA2Ic9L2AXPIQM0+vk/cSQ==", + "dev": true, + "dependencies": { + "@eslint/eslintrc": "^1.3.2", + "@humanwhocodes/config-array": "^0.10.5", + "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", + "@humanwhocodes/module-importer": "^1.0.1", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.4.0", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.1", + "globals": "^13.15.0", + "globby": "^11.1.0", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-sdsl": "^4.1.4", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-airbnb-base": { + "version": "15.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", + "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", + "dev": true, + "dependencies": { + "confusing-browser-globals": "^1.0.10", + "object.assign": "^4.1.2", + "object.entries": "^1.1.5", + "semver": "^6.3.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "peerDependencies": { + "eslint": "^7.32.0 || ^8.2.0", + "eslint-plugin-import": "^2.25.2" + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", + "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", + "dev": true, + "dependencies": { + "debug": "^3.2.7", + "resolve": "^1.20.0" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.7.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz", + "integrity": "sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==", + "dev": true, + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.26.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz", + "integrity": "sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.4", + "array.prototype.flat": "^1.2.5", + "debug": "^2.6.9", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.6", + "eslint-module-utils": "^2.7.3", + "has": "^1.0.3", + "is-core-module": "^2.8.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.values": "^1.1.5", + "resolve": "^1.22.0", + "tsconfig-paths": "^3.14.1" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/eslint-scope": { + "version": "7.1.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/eslint/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/eslint/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/globals": { + "version": "13.17.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/globals/-/globals-13.17.0.tgz", + "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/espree": { + "version": "9.4.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/espree/-/espree-9.4.0.tgz", + "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", + "dev": true, + "dependencies": { + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.4.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.2.12", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "node_modules/fastq": { + "version": "1.13.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, "node_modules/filesize": { "version": "6.4.0", - "resolved": "https://registry.npmjs.org/filesize/-/filesize-6.4.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/filesize/-/filesize-6.4.0.tgz", "integrity": "sha512-mjFIpOHC4jbfcTfoh4rkWpI31mF7viw9ikj/JyLoKzqlwG/YsefKfvYlYhdYdg/9mtK2z1AzgN/0LvVQ3zdlSQ==", "dev": true, "engines": { "node": ">= 0.4.0" } }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.7", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true + }, "node_modules/fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, "node_modules/fsevents": { "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/fsevents/-/fsevents-2.3.2.tgz", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dev": true, "hasInstallScript": true, "optional": true, - "os": [ - "darwin" - ], "engines": { "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/function.prototype.name": { + "version": "1.1.5", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/gensync": { "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true, "engines": { @@ -2078,29 +2990,45 @@ } }, "node_modules/get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "version": "1.1.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", "dev": true, "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1" + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "7.2.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, @@ -2111,18 +3039,56 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/globals": { "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true, "engines": { "node": ">=4" } }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "node_modules/has": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "dependencies": { @@ -2132,18 +3098,39 @@ "node": ">= 0.4.0" } }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-flag": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true, "engines": { "node": ">=4" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-symbols": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true, "engines": { @@ -2153,9 +3140,58 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/ignore": { + "version": "5.2.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, "node_modules/inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "dependencies": { @@ -2165,14 +3201,83 @@ }, "node_modules/inherits": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "node_modules/internal-slot": { + "version": "1.0.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-builtin-module": { + "version": "3.2.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-builtin-module/-/is-builtin-module-3.2.0.tgz", + "integrity": "sha512-phDA4oSGt7vl1n5tJvTWooWWAsXLY+2xCnxNqvKhGEzujg+A43wPlPOyDg3C8XQHN+6k/JTQWJ/j0dQh/qr+Hw==", + "dev": true, + "dependencies": { + "builtin-modules": "^3.3.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-core-module": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", - "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", + "version": "2.10.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-core-module/-/is-core-module-2.10.0.tgz", + "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", "dev": true, "dependencies": { "has": "^1.0.3" @@ -2181,49 +3286,215 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-module": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-module/-/is-module-1.0.0.tgz", "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", "dev": true }, + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-reference": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-reference/-/is-reference-1.2.1.tgz", "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", "dev": true, "dependencies": { "@types/estree": "*" } }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, "node_modules/jasmine": { - "version": "3.99.0", - "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-3.99.0.tgz", - "integrity": "sha512-YIThBuHzaIIcjxeuLmPD40SjxkEcc8i//sGMDKCgkRMVgIwRJf5qyExtlJpQeh7pkeoBSOe6lQEdg+/9uKg9mw==", + "version": "4.4.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/jasmine/-/jasmine-4.4.0.tgz", + "integrity": "sha512-xrbOyYkkCvgduNw7CKktDtNb+BwwBv/zvQeHpTkbxqQ37AJL5V4sY3jHoMIJPP/hTc3QxLVwOyxc87AqA+kw5g==", "dev": true, "dependencies": { "glob": "^7.1.6", - "jasmine-core": "~3.99.0" + "jasmine-core": "^4.4.0" }, "bin": { "jasmine": "bin/jasmine.js" } }, "node_modules/jasmine-core": { - "version": "3.99.1", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.99.1.tgz", - "integrity": "sha512-Hu1dmuoGcZ7AfyynN3LsfruwMbxMALMka+YtZeGoLuDEySVmVAPaonkNoBRIw/ectu8b9tVQCJNgp4a4knp+tg==", + "version": "4.4.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/jasmine-core/-/jasmine-core-4.4.0.tgz", + "integrity": "sha512-+l482uImx5BVd6brJYlaHe2UwfKoZBqQfNp20ZmdNfsjGFTemGfqHLsXjKEW23w9R/m8WYeFc9JmIgjj6dUtAA==", + "dev": true + }, + "node_modules/js-sdsl": { + "version": "4.1.5", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/js-sdsl/-/js-sdsl-4.1.5.tgz", + "integrity": "sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==", "dev": true }, "node_modules/js-tokens": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/jsesc": { "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true, "bin": { @@ -2233,9 +3504,21 @@ "node": ">=4" } }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, "node_modules/json5": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/json5/-/json5-2.2.1.tgz", "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", "dev": true, "bin": { @@ -2247,32 +3530,88 @@ }, "node_modules/kd-tree-javascript": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/kd-tree-javascript/-/kd-tree-javascript-1.0.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/kd-tree-javascript/-/kd-tree-javascript-1.0.3.tgz", "integrity": "sha512-7oSugmaxTCJFqey11rlTSEQD3hGDnRgROMj9MEREvDGV8SlIFwN7x3jJRyFoi+mjO0+4wuSuaDLS1reNQHP7uA==" }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/lodash.debounce": { "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", "dev": true }, "node_modules/lodash.isequal": { "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/lodash.isequal/-/lodash.isequal-4.5.0.tgz", "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, "node_modules/magic-string": { "version": "0.25.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/magic-string/-/magic-string-0.25.9.tgz", "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", "dev": true, "dependencies": { "sourcemap-codec": "^1.4.8" } }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/minimatch": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { @@ -2284,35 +3623,50 @@ }, "node_modules/minimist": { "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/minimist/-/minimist-1.2.6.tgz", "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" }, "node_modules/module-details-from-path": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/module-details-from-path/-/module-details-from-path-1.0.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/module-details-from-path/-/module-details-from-path-1.0.3.tgz", "integrity": "sha1-EUyUlnPiqKNenTV4hSeqN7Z52is=", "dev": true }, "node_modules/ms": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, "node_modules/munkres-js": { "version": "1.2.2", - "resolved": "https://registry.npmjs.org/munkres-js/-/munkres-js-1.2.2.tgz", - "integrity": "sha1-4D2YBo1F1YexX1Y+uGDrZ6qFKLc=" + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/munkres-js/-/munkres-js-1.2.2.tgz", + "integrity": "sha512-0oF4tBDvzx20CYzQ44tTJMfwTBJWXe7cE73Sa/u7Mz7X8jRtyOXOGE9kJBhCfX7Akku3Iy/WHa0sRgqLRq2xaQ==" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true }, "node_modules/node-releases": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.2.tgz", - "integrity": "sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==", + "version": "2.0.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/node-releases/-/node-releases-2.0.6.tgz", + "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", "dev": true }, + "node_modules/object-inspect": { + "version": "1.12.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/object-inspect/-/object-inspect-1.12.2.tgz", + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/object-keys": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true, "engines": { @@ -2320,14 +3674,14 @@ } }, "node_modules/object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "version": "4.1.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, "engines": { @@ -2337,39 +3691,156 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object.entries": { + "version": "1.1.5", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/object.entries/-/object.entries-1.1.5.tgz", + "integrity": "sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.values": { + "version": "1.1.5", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/object.values/-/object.values-1.1.5.tgz", + "integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "dependencies": { "wrappy": "1" } }, + "node_modules/optionator": { + "version": "0.9.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true, "engines": { "node": ">=0.10.0" } }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/path-parse": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/picocolors": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/picocolors/-/picocolors-1.0.0.tgz", "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", "dev": true }, "node_modules/picomatch": { "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, "engines": { @@ -2379,16 +3850,54 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/regenerate": { "version": "1.4.2", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/regenerate/-/regenerate-1.4.2.tgz", "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", "dev": true }, "node_modules/regenerate-unicode-properties": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz", - "integrity": "sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw==", + "version": "10.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz", + "integrity": "sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ==", "dev": true, "dependencies": { "regenerate": "^1.4.2" @@ -2399,29 +3908,58 @@ }, "node_modules/regenerator-runtime": { "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", "dev": true }, "node_modules/regenerator-transform": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", - "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", + "version": "0.15.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/regenerator-transform/-/regenerator-transform-0.15.0.tgz", + "integrity": "sha512-LsrGtPmbYg19bcPHwdtmXwbW+TqNvtY4riE3P83foeHRroMbH6/2ddFBfab3t7kbzc7v7p4wbkIecHImqt0QNg==", "dev": true, "dependencies": { "@babel/runtime": "^7.8.4" } }, + "node_modules/regexp.prototype.flags": { + "version": "1.4.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/regexpp": { + "version": "3.2.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, "node_modules/regexpu-core": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.0.1.tgz", - "integrity": "sha512-CriEZlrKK9VJw/xQGJpQM5rY88BtuL8DM+AEwvcThHilbxiTAy8vq4iJnd2tqq8wLmjbGZzP7ZcKFjbGkmEFrw==", + "version": "5.2.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/regexpu-core/-/regexpu-core-5.2.1.tgz", + "integrity": "sha512-HrnlNtpvqP1Xkb28tMhBUO2EbyUHdQlsnlAhzWcwHy8WJR53UWr7/MAvqrsQKMbV4qdpv03oTMG8iIhfsPFktQ==", "dev": true, "dependencies": { "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^10.0.1", - "regjsgen": "^0.6.0", - "regjsparser": "^0.8.2", + "regenerate-unicode-properties": "^10.1.0", + "regjsgen": "^0.7.1", + "regjsparser": "^0.9.1", "unicode-match-property-ecmascript": "^2.0.0", "unicode-match-property-value-ecmascript": "^2.0.0" }, @@ -2430,15 +3968,15 @@ } }, "node_modules/regjsgen": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.6.0.tgz", - "integrity": "sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA==", + "version": "0.7.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/regjsgen/-/regjsgen-0.7.1.tgz", + "integrity": "sha512-RAt+8H2ZEzHeYWxZ3H2z6tF18zyyOnlcdaafLrm21Bguj7uZy6ULibiAFdXEtKQY4Sy7wDTwDiOazasMLc4KPA==", "dev": true }, "node_modules/regjsparser": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.8.4.tgz", - "integrity": "sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA==", + "version": "0.9.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/regjsparser/-/regjsparser-0.9.1.tgz", + "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", "dev": true, "dependencies": { "jsesc": "~0.5.0" @@ -2449,91 +3987,258 @@ }, "node_modules/regjsparser/node_modules/jsesc": { "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/jsesc/-/jsesc-0.5.0.tgz", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "dev": true, "bin": { "jsesc": "bin/jsesc" } }, - "node_modules/resolve": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", - "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", + "node_modules/resolve": { + "version": "1.22.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rollup": { + "version": "2.79.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/rollup/-/rollup-2.79.1.tgz", + "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=10.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/rollup-plugin-sizes": { + "version": "1.0.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/rollup-plugin-sizes/-/rollup-plugin-sizes-1.0.4.tgz", + "integrity": "sha512-sZtFW+X/d4qytqFG6aKxhUj5aJadxOpMZbDrB9j9GpMKrXy2jt4RD/xbfnagbSbH+0q1kBcNd8L9tuoETjOu6g==", + "dev": true, + "dependencies": { + "filesize": "^6.0.1", + "module-details-from-path": "^1.0.3" + }, + "peerDependencies": { + "rollup": "^2.0.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/semver": { + "version": "6.3.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "dev": true + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.5", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", + "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", "dev": true, "dependencies": { - "is-core-module": "^2.8.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/rollup": { - "version": "2.70.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.70.1.tgz", - "integrity": "sha512-CRYsI5EuzLbXdxC6RnYhOuRdtz4bhejPMSWjsFLfVM/7w/85n2szZv6yExqUXsBdz5KT8eoubeyDUDjhLHEslA==", + "node_modules/string.prototype.trimstart": { + "version": "1.0.5", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", + "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", "dev": true, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=10.0.0" + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" }, - "optionalDependencies": { - "fsevents": "~2.3.2" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/rollup-plugin-sizes": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/rollup-plugin-sizes/-/rollup-plugin-sizes-1.0.4.tgz", - "integrity": "sha512-sZtFW+X/d4qytqFG6aKxhUj5aJadxOpMZbDrB9j9GpMKrXy2jt4RD/xbfnagbSbH+0q1kBcNd8L9tuoETjOu6g==", + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { - "filesize": "^6.0.1", - "module-details-from-path": "^1.0.3" + "ansi-regex": "^5.0.1" }, - "peerDependencies": { - "rollup": "^2.0.0" + "engines": { + "node": ">=8" } }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true, - "bin": { - "semver": "bin/semver.js" + "engines": { + "node": ">=4" } }, - "node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "dev": true - }, "node_modules/supports-color": { "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "dependencies": { @@ -2545,7 +4250,7 @@ }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true, "engines": { @@ -2555,18 +4260,99 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, "node_modules/to-fast-properties": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true, "engines": { "node": ">=4" } }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tsconfig-paths": { + "version": "3.14.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", + "integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==", + "dev": true, + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tsconfig-paths/node_modules/json5": { + "version": "1.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", "dev": true, "engines": { @@ -2575,7 +4361,7 @@ }, "node_modules/unicode-match-property-ecmascript": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", "dev": true, "dependencies": { @@ -2588,7 +4374,7 @@ }, "node_modules/unicode-match-property-value-ecmascript": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", "dev": true, "engines": { @@ -2596,155 +4382,253 @@ } }, "node_modules/unicode-property-aliases-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", - "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", + "version": "2.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", + "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", "dev": true, "engines": { "node": ">=4" } }, + "node_modules/update-browserslist-db": { + "version": "1.0.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz", + "integrity": "sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "browserslist-lint": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, "node_modules/uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "version": "9.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", "bin": { - "uuid": "bin/uuid" + "uuid": "dist/bin/uuid" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" } }, "node_modules/wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } }, "dependencies": { "@ampproject/remapping": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz", - "integrity": "sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==", + "version": "2.2.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@ampproject/remapping/-/remapping-2.2.0.tgz", + "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", "dev": true, "requires": { - "@jridgewell/trace-mapping": "^0.3.0" + "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/trace-mapping": "^0.3.9" } }, "@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", "dev": true, "requires": { - "@babel/highlight": "^7.16.7" + "@babel/highlight": "^7.18.6" } }, "@babel/compat-data": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.7.tgz", - "integrity": "sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ==", + "version": "7.19.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/compat-data/-/compat-data-7.19.3.tgz", + "integrity": "sha512-prBHMK4JYYK+wDjJF1q99KK4JLL+egWS4nmNqdlMUgCExMZ+iZW0hGhyC3VEbsPjvaN0TBhW//VIFwBrk8sEiw==", "dev": true }, "@babel/core": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.8.tgz", - "integrity": "sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ==", + "version": "7.19.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/core/-/core-7.19.3.tgz", + "integrity": "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==", "dev": true, "requires": { "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.7", - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-module-transforms": "^7.17.7", - "@babel/helpers": "^7.17.8", - "@babel/parser": "^7.17.8", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.3", + "@babel/helper-compilation-targets": "^7.19.3", + "@babel/helper-module-transforms": "^7.19.0", + "@babel/helpers": "^7.19.0", + "@babel/parser": "^7.19.3", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.3", + "@babel/types": "^7.19.3", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", + "json5": "^2.2.1", "semver": "^6.3.0" } }, "@babel/generator": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", - "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", - "dev": true, - "requires": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" + "version": "7.19.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/generator/-/generator-7.19.3.tgz", + "integrity": "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==", + "dev": true, + "requires": { + "@babel/types": "^7.19.3", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + }, + "dependencies": { + "@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + } } }, "@babel/helper-annotate-as-pure": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", - "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", + "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", "dev": true, "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" } }, "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.7.tgz", - "integrity": "sha512-C6FdbRaxYjwVu/geKW4ZeQ0Q31AftgRcdSnZ5/jsH6BzCJbtvXvhpfkbkThYSuutZA7nCXpPR6AD9zd1dprMkA==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz", + "integrity": "sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw==", "dev": true, "requires": { - "@babel/helper-explode-assignable-expression": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/helper-explode-assignable-expression": "^7.18.6", + "@babel/types": "^7.18.9" } }, "@babel/helper-compilation-targets": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.7.tgz", - "integrity": "sha512-UFzlz2jjd8kroj0hmCFV5zr+tQPi1dpC2cRsDV/3IEW8bJfCPrPpmcSN6ZS8RqIq4LXcmpipCQFPddyFA5Yc7w==", + "version": "7.19.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz", + "integrity": "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==", "dev": true, "requires": { - "@babel/compat-data": "^7.17.7", - "@babel/helper-validator-option": "^7.16.7", - "browserslist": "^4.17.5", + "@babel/compat-data": "^7.19.3", + "@babel/helper-validator-option": "^7.18.6", + "browserslist": "^4.21.3", "semver": "^6.3.0" } }, "@babel/helper-create-class-features-plugin": { - "version": "7.17.6", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.6.tgz", - "integrity": "sha512-SogLLSxXm2OkBbSsHZMM4tUi8fUzjs63AT/d0YQIzr6GSd8Hxsbk2KYDX0k0DweAzGMj/YWeiCsorIdtdcW8Eg==", + "version": "7.19.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.19.0.tgz", + "integrity": "sha512-NRz8DwF4jT3UfrmUoZjd0Uph9HQnP30t7Ash+weACcyNkiYTywpIjDBgReJMKgr+n86sn2nPVVmJ28Dm053Kqw==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-member-expression-to-functions": "^7.16.7", - "@babel/helper-optimise-call-expression": "^7.16.7", - "@babel/helper-replace-supers": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7" + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-member-expression-to-functions": "^7.18.9", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.9", + "@babel/helper-split-export-declaration": "^7.18.6" } }, "@babel/helper-create-regexp-features-plugin": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.17.0.tgz", - "integrity": "sha512-awO2So99wG6KnlE+TPs6rn83gCz5WlEePJDTnLEqbchMVrBeAujURVphRdigsk094VhvZehFoNOihSlcBjwsXA==", + "version": "7.19.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.19.0.tgz", + "integrity": "sha512-htnV+mHX32DF81amCDrwIDr8nrp1PTm+3wfBN9/v8QJOLEioOCOG7qNyq0nHeFiWbT3Eb7gsPwEmV64UCQ1jzw==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "regexpu-core": "^5.0.1" + "@babel/helper-annotate-as-pure": "^7.18.6", + "regexpu-core": "^5.1.0" } }, "@babel/helper-define-polyfill-provider": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz", - "integrity": "sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA==", + "version": "0.3.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz", + "integrity": "sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==", "dev": true, "requires": { - "@babel/helper-compilation-targets": "^7.13.0", - "@babel/helper-module-imports": "^7.12.13", - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/traverse": "^7.13.0", + "@babel/helper-compilation-targets": "^7.17.7", + "@babel/helper-plugin-utils": "^7.16.7", "debug": "^4.1.1", "lodash.debounce": "^4.0.8", "resolve": "^1.14.2", @@ -2752,385 +4636,380 @@ } }, "@babel/helper-environment-visitor": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", - "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", - "dev": true, - "requires": { - "@babel/types": "^7.16.7" - } + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", + "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "dev": true }, "@babel/helper-explode-assignable-expression": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.7.tgz", - "integrity": "sha512-KyUenhWMC8VrxzkGP0Jizjo4/Zx+1nNZhgocs+gLzyZyB8SHidhoq9KK/8Ato4anhwsivfkBLftky7gvzbZMtQ==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz", + "integrity": "sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg==", "dev": true, "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" } }, "@babel/helper-function-name": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", - "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", - "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", + "version": "7.19.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", + "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", "dev": true, "requires": { - "@babel/types": "^7.16.7" + "@babel/template": "^7.18.10", + "@babel/types": "^7.19.0" } }, "@babel/helper-hoist-variables": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", - "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", + "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", "dev": true, "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.17.7.tgz", - "integrity": "sha512-thxXgnQ8qQ11W2wVUObIqDL4p148VMxkt5T/qpN5k2fboRyzFGFmKsTGViquyM5QHKUy48OZoca8kw4ajaDPyw==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz", + "integrity": "sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg==", "dev": true, "requires": { - "@babel/types": "^7.17.0" + "@babel/types": "^7.18.9" } }, "@babel/helper-module-imports": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", - "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", + "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", "dev": true, "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" } }, "@babel/helper-module-transforms": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz", - "integrity": "sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw==", + "version": "7.19.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", + "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", "dev": true, "requires": { - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-module-imports": "^7.16.7", - "@babel/helper-simple-access": "^7.17.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/helper-validator-identifier": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0" + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-simple-access": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.18.6", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" } }, "@babel/helper-optimise-call-expression": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz", - "integrity": "sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", + "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==", "dev": true, "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" } }, "@babel/helper-plugin-utils": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz", - "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==", + "version": "7.19.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", + "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", "dev": true }, "@babel/helper-remap-async-to-generator": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.8.tgz", - "integrity": "sha512-fm0gH7Flb8H51LqJHy3HJ3wnE1+qtYR2A99K06ahwrawLdOFsCEWjZOrYricXJHoPSudNKxrMBUPEIPxiIIvBw==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz", + "integrity": "sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-wrap-function": "^7.16.8", - "@babel/types": "^7.16.8" + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-wrap-function": "^7.18.9", + "@babel/types": "^7.18.9" } }, "@babel/helper-replace-supers": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz", - "integrity": "sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw==", + "version": "7.19.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-replace-supers/-/helper-replace-supers-7.19.1.tgz", + "integrity": "sha512-T7ahH7wV0Hfs46SFh5Jz3s0B6+o8g3c+7TMxu7xKfmHikg7EAZ3I2Qk9LFhjxXq8sL7UkP5JflezNwoZa8WvWw==", "dev": true, "requires": { - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-member-expression-to-functions": "^7.16.7", - "@babel/helper-optimise-call-expression": "^7.16.7", - "@babel/traverse": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-member-expression-to-functions": "^7.18.9", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/traverse": "^7.19.1", + "@babel/types": "^7.19.0" } }, "@babel/helper-simple-access": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.17.7.tgz", - "integrity": "sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", + "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", "dev": true, "requires": { - "@babel/types": "^7.17.0" + "@babel/types": "^7.18.6" } }, "@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz", - "integrity": "sha512-+il1gTy0oHwUsBQZyJvukbB4vPMdcYBrFHa0Uc4AizLxbq6BOYC51Rv4tWocX9BLBDLZ4kc6qUFpQ6HRgL+3zw==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.9.tgz", + "integrity": "sha512-imytd2gHi3cJPsybLRbmFrF7u5BIEuI2cNheyKi3/iOBC63kNn3q8Crn2xVuESli0aM4KYsyEqKyS7lFL8YVtw==", "dev": true, "requires": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.18.9" } }, "@babel/helper-split-export-declaration": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", - "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", + "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", "dev": true, "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" } }, + "@babel/helper-string-parser": { + "version": "7.18.10", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", + "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==", + "dev": true + }, "@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "version": "7.19.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", "dev": true }, "@babel/helper-validator-option": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", - "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", + "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", "dev": true }, "@babel/helper-wrap-function": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.16.8.tgz", - "integrity": "sha512-8RpyRVIAW1RcDDGTA+GpPAwV22wXCfKOoM9bet6TLkGIFTkRQSkH1nMQ5Yet4MpoXe1ZwHPVtNasc2w0uZMqnw==", + "version": "7.19.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helper-wrap-function/-/helper-wrap-function-7.19.0.tgz", + "integrity": "sha512-txX8aN8CZyYGTwcLhlk87KRqncAzhh5TpQamZUa0/u3an36NtDpUP6bQgBCBcLeBs09R/OwQu3OjK0k/HwfNDg==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.16.8", - "@babel/types": "^7.16.8" + "@babel/helper-function-name": "^7.19.0", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" } }, "@babel/helpers": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.8.tgz", - "integrity": "sha512-QcL86FGxpfSJwGtAvv4iG93UL6bmqBdmoVY0CMCU2g+oD2ezQse3PT5Pa+jiD6LJndBQi0EDlpzOWNlLuhz5gw==", + "version": "7.19.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/helpers/-/helpers-7.19.0.tgz", + "integrity": "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==", "dev": true, "requires": { - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0" + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" } }, "@babel/highlight": { - "version": "7.16.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", - "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.16.7", + "@babel/helper-validator-identifier": "^7.18.6", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.8.tgz", - "integrity": "sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==", + "version": "7.19.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/parser/-/parser-7.19.3.tgz", + "integrity": "sha512-pJ9xOlNWHiy9+FuFP09DEAFbAn4JskgRsVcc169w2xRBC3FRGuQEwjeIMMND9L2zc0iEhO/tGv4Zq+km+hxNpQ==", "dev": true }, "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.16.7.tgz", - "integrity": "sha512-anv/DObl7waiGEnC24O9zqL0pSuI9hljihqiDuFHC8d7/bjr/4RLGPWuc8rYOff/QPzbEPSkzG8wGG9aDuhHRg==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz", + "integrity": "sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.16.7.tgz", - "integrity": "sha512-di8vUHRdf+4aJ7ltXhaDbPoszdkh59AQtJM5soLsuHpQJdFQZOA4uGj0V2u/CZ8bJ/u8ULDL5yq6FO/bCXnKHw==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.9.tgz", + "integrity": "sha512-AHrP9jadvH7qlOj6PINbgSuphjQUAK7AOT7DPjBo9EHoLhQTnnK5u45e1Hd4DbSQEO9nqPWtQ89r+XEOWFScKg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", - "@babel/plugin-proposal-optional-chaining": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9", + "@babel/plugin-proposal-optional-chaining": "^7.18.9" } }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.8.tgz", - "integrity": "sha512-71YHIvMuiuqWJQkebWJtdhQTfd4Q4mF76q2IX37uZPkG9+olBxsX+rH1vkhFto4UeJZ9dPY2s+mDvhDm1u2BGQ==", + "version": "7.19.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.19.1.tgz", + "integrity": "sha512-0yu8vNATgLy4ivqMNBIwb1HebCelqN7YX8SL3FDXORv/RqT0zEEWUCH4GH44JsSrvCu6GqnAdR5EBFAPeNBB4Q==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-remap-async-to-generator": "^7.16.8", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-remap-async-to-generator": "^7.18.9", "@babel/plugin-syntax-async-generators": "^7.8.4" } }, "@babel/plugin-proposal-class-properties": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.7.tgz", - "integrity": "sha512-IobU0Xme31ewjYOShSIqd/ZGM/r/cuOz2z0MDbNrhF5FW+ZVgi0f2lyeoj9KFPDOAqsYxmLWZte1WOwlvY9aww==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", + "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-proposal-class-static-block": { - "version": "7.17.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.17.6.tgz", - "integrity": "sha512-X/tididvL2zbs7jZCeeRJ8167U/+Ac135AM6jCAx6gYXDUviZV5Ku9UDvWS2NCuWlFjIRXklYhwo6HhAC7ETnA==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.6.tgz", + "integrity": "sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.17.6", - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-class-static-block": "^7.14.5" } }, "@babel/plugin-proposal-dynamic-import": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.7.tgz", - "integrity": "sha512-I8SW9Ho3/8DRSdmDdH3gORdyUuYnk1m4cMxUAdu5oy4n3OfN8flDEH+d60iG7dUfi0KkYwSvoalHzzdRzpWHTg==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz", + "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-dynamic-import": "^7.8.3" } }, "@babel/plugin-proposal-export-namespace-from": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.16.7.tgz", - "integrity": "sha512-ZxdtqDXLRGBL64ocZcs7ovt71L3jhC1RGSyR996svrCi3PYqHNkb3SwPJCs8RIzD86s+WPpt2S73+EHCGO+NUA==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz", + "integrity": "sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-plugin-utils": "^7.18.9", "@babel/plugin-syntax-export-namespace-from": "^7.8.3" } }, "@babel/plugin-proposal-json-strings": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.7.tgz", - "integrity": "sha512-lNZ3EEggsGY78JavgbHsK9u5P3pQaW7k4axlgFLYkMd7UBsiNahCITShLjNQschPyjtO6dADrL24757IdhBrsQ==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz", + "integrity": "sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-json-strings": "^7.8.3" } }, "@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.16.7.tgz", - "integrity": "sha512-K3XzyZJGQCr00+EtYtrDjmwX7o7PLK6U9bi1nCwkQioRFVUv6dJoxbQjtWVtP+bCPy82bONBKG8NPyQ4+i6yjg==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.9.tgz", + "integrity": "sha512-128YbMpjCrP35IOExw2Fq+x55LMP42DzhOhX2aNNIdI9avSWl2PI0yuBWarr3RYpZBSPtabfadkH2yeRiMD61Q==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-plugin-utils": "^7.18.9", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" } }, "@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.16.7.tgz", - "integrity": "sha512-aUOrYU3EVtjf62jQrCj63pYZ7k6vns2h/DQvHPWGmsJRYzWXZ6/AsfgpiRy6XiuIDADhJzP2Q9MwSMKauBQ+UQ==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", + "integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" } }, "@babel/plugin-proposal-numeric-separator": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.7.tgz", - "integrity": "sha512-vQgPMknOIgiuVqbokToyXbkY/OmmjAzr/0lhSIbG/KmnzXPGwW/AdhdKpi+O4X/VkWiWjnkKOBiqJrTaC98VKw==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", + "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-numeric-separator": "^7.10.4" } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.17.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.17.3.tgz", - "integrity": "sha512-yuL5iQA/TbZn+RGAfxQXfi7CNLmKi1f8zInn4IgobuCWcAb7i+zj4TYzQ9l8cEzVyJ89PDGuqxK1xZpUDISesw==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.9.tgz", + "integrity": "sha512-kDDHQ5rflIeY5xl69CEqGEZ0KY369ehsCIEbTGb4siHG5BE9sga/T0r0OUwyZNLMmZE79E1kbsqAjwFCW4ds6Q==", "dev": true, "requires": { - "@babel/compat-data": "^7.17.0", - "@babel/helper-compilation-targets": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/compat-data": "^7.18.8", + "@babel/helper-compilation-targets": "^7.18.9", + "@babel/helper-plugin-utils": "^7.18.9", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.16.7" + "@babel/plugin-transform-parameters": "^7.18.8" } }, "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.7.tgz", - "integrity": "sha512-eMOH/L4OvWSZAE1VkHbr1vckLG1WUcHGJSLqqQwl2GaUqG6QjddvrOaTUMNYiv77H5IKPMZ9U9P7EaHwvAShfA==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz", + "integrity": "sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" } }, "@babel/plugin-proposal-optional-chaining": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.7.tgz", - "integrity": "sha512-eC3xy+ZrUcBtP7x+sq62Q/HYd674pPTb/77XZMb5wbDPGWIdUbSr4Agr052+zaUPSb+gGRnjxXfKFvx5iMJ+DA==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.9.tgz", + "integrity": "sha512-v5nwt4IqBXihxGsW2QmCWMDS3B3bzGIk/EQVZz2ei7f3NJl8NzAJVvUmpDW5q1CRNY+Beb/k58UAH1Km1N411w==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9", "@babel/plugin-syntax-optional-chaining": "^7.8.3" } }, "@babel/plugin-proposal-private-methods": { - "version": "7.16.11", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.11.tgz", - "integrity": "sha512-F/2uAkPlXDr8+BHpZvo19w3hLFKge+k75XUprE6jaqKxjGkSYcK+4c+bup5PdW/7W/Rpjwql7FTVEDW+fRAQsw==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", + "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.16.10", - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-proposal-private-property-in-object": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.16.7.tgz", - "integrity": "sha512-rMQkjcOFbm+ufe3bTZLyOfsOUOxyvLXZJCTARhJr+8UMSoZmqTe1K1BgkFcrW37rAchWg57yI69ORxiWvUINuQ==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.18.6.tgz", + "integrity": "sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-create-class-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-private-property-in-object": "^7.14.5" } }, "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.7.tgz", - "integrity": "sha512-QRK0YI/40VLhNVGIjRNAAQkEHws0cswSdFFjpFyt943YmJIU1da9uW63Iu6NFV6CxTZW5eTDCrwZUstBWgp/Rg==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", + "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-syntax-async-generators": { "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, "requires": { @@ -3139,7 +5018,7 @@ }, "@babel/plugin-syntax-class-properties": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "dev": true, "requires": { @@ -3148,7 +5027,7 @@ }, "@babel/plugin-syntax-class-static-block": { "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", "dev": true, "requires": { @@ -3157,7 +5036,7 @@ }, "@babel/plugin-syntax-dynamic-import": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", "dev": true, "requires": { @@ -3166,16 +5045,25 @@ }, "@babel/plugin-syntax-export-namespace-from": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.3" } }, + "@babel/plugin-syntax-import-assertions": { + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.18.6.tgz", + "integrity": "sha512-/DU3RXad9+bZwrgWJQKbr39gYbJpLJHezqEzRzi/BHRlJ9zsQb4CK2CA/5apllXNomwA1qHwzvHl+AdEmC5krQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, "@babel/plugin-syntax-json-strings": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", "dev": true, "requires": { @@ -3184,7 +5072,7 @@ }, "@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", "dev": true, "requires": { @@ -3193,7 +5081,7 @@ }, "@babel/plugin-syntax-nullish-coalescing-operator": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", "dev": true, "requires": { @@ -3202,7 +5090,7 @@ }, "@babel/plugin-syntax-numeric-separator": { "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", "dev": true, "requires": { @@ -3211,7 +5099,7 @@ }, "@babel/plugin-syntax-object-rest-spread": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dev": true, "requires": { @@ -3220,7 +5108,7 @@ }, "@babel/plugin-syntax-optional-catch-binding": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "dev": true, "requires": { @@ -3229,7 +5117,7 @@ }, "@babel/plugin-syntax-optional-chaining": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", "dev": true, "requires": { @@ -3238,7 +5126,7 @@ }, "@babel/plugin-syntax-private-property-in-object": { "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", "dev": true, "requires": { @@ -3247,7 +5135,7 @@ }, "@babel/plugin-syntax-top-level-await": { "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", "dev": true, "requires": { @@ -3255,351 +5143,355 @@ } }, "@babel/plugin-transform-arrow-functions": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.7.tgz", - "integrity": "sha512-9ffkFFMbvzTvv+7dTp/66xvZAWASuPD5Tl9LK3Z9vhOmANo6j94rik+5YMBt4CwHVMWLWpMsriIc2zsa3WW3xQ==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.18.6.tgz", + "integrity": "sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-async-to-generator": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.8.tgz", - "integrity": "sha512-MtmUmTJQHCnyJVrScNzNlofQJ3dLFuobYn3mwOTKHnSCMtbNsqvF71GQmJfFjdrXSsAA7iysFmYWw4bXZ20hOg==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.18.6.tgz", + "integrity": "sha512-ARE5wZLKnTgPW7/1ftQmSi1CmkqqHo2DNmtztFhvgtOWSDfq0Cq9/9L+KnZNYSNrydBekhW3rwShduf59RoXag==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-remap-async-to-generator": "^7.16.8" + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-remap-async-to-generator": "^7.18.6" } }, "@babel/plugin-transform-block-scoped-functions": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.7.tgz", - "integrity": "sha512-JUuzlzmF40Z9cXyytcbZEZKckgrQzChbQJw/5PuEHYeqzCsvebDx0K0jWnIIVcmmDOAVctCgnYs0pMcrYj2zJg==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz", + "integrity": "sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-block-scoping": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.7.tgz", - "integrity": "sha512-ObZev2nxVAYA4bhyusELdo9hb3H+A56bxH3FZMbEImZFiEDYVHXQSJ1hQKFlDnlt8G9bBrCZ5ZpURZUrV4G5qQ==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.18.9.tgz", + "integrity": "sha512-5sDIJRV1KtQVEbt/EIBwGy4T01uYIo4KRB3VUqzkhrAIOGx7AoctL9+Ux88btY0zXdDyPJ9mW+bg+v+XEkGmtw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.9" } }, "@babel/plugin-transform-classes": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.7.tgz", - "integrity": "sha512-WY7og38SFAGYRe64BrjKf8OrE6ulEHtr5jEYaZMwox9KebgqPi67Zqz8K53EKk1fFEJgm96r32rkKZ3qA2nCWQ==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-optimise-call-expression": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-replace-supers": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", + "version": "7.19.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-classes/-/plugin-transform-classes-7.19.0.tgz", + "integrity": "sha512-YfeEE9kCjqTS9IitkgfJuxjcEtLUHMqa8yUJ6zdz8vR7hKuo6mOy2C05P0F1tdMmDCeuyidKnlrw/iTppHcr2A==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-compilation-targets": "^7.19.0", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-replace-supers": "^7.18.9", + "@babel/helper-split-export-declaration": "^7.18.6", "globals": "^11.1.0" } }, "@babel/plugin-transform-computed-properties": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.7.tgz", - "integrity": "sha512-gN72G9bcmenVILj//sv1zLNaPyYcOzUho2lIJBMh/iakJ9ygCo/hEF9cpGb61SCMEDxbbyBoVQxrt+bWKu5KGw==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.9.tgz", + "integrity": "sha512-+i0ZU1bCDymKakLxn5srGHrsAPRELC2WIbzwjLhHW9SIE1cPYkLCL0NlnXMZaM1vhfgA2+M7hySk42VBvrkBRw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.9" } }, "@babel/plugin-transform-destructuring": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.17.7.tgz", - "integrity": "sha512-XVh0r5yq9sLR4vZ6eVZe8FKfIcSgaTBxVBRSYokRj2qksf6QerYnTxz9/GTuKTH/n/HwLP7t6gtlybHetJ/6hQ==", + "version": "7.18.13", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.13.tgz", + "integrity": "sha512-TodpQ29XekIsex2A+YJPj5ax2plkGa8YYY6mFjCohk/IG9IY42Rtuj1FuDeemfg2ipxIFLzPeA83SIBnlhSIow==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.9" } }, "@babel/plugin-transform-dotall-regex": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.7.tgz", - "integrity": "sha512-Lyttaao2SjZF6Pf4vk1dVKv8YypMpomAbygW+mU5cYP3S5cWTfCJjG8xV6CFdzGFlfWK81IjL9viiTvpb6G7gQ==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz", + "integrity": "sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-duplicate-keys": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.7.tgz", - "integrity": "sha512-03DvpbRfvWIXyK0/6QiR1KMTWeT6OcQ7tbhjrXyFS02kjuX/mu5Bvnh5SDSWHxyawit2g5aWhKwI86EE7GUnTw==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz", + "integrity": "sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.9" } }, "@babel/plugin-transform-exponentiation-operator": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.7.tgz", - "integrity": "sha512-8UYLSlyLgRixQvlYH3J2ekXFHDFLQutdy7FfFAMm3CPZ6q9wHCwnUyiXpQCe3gVVnQlHc5nsuiEVziteRNTXEA==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz", + "integrity": "sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw==", "dev": true, "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-for-of": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.7.tgz", - "integrity": "sha512-/QZm9W92Ptpw7sjI9Nx1mbcsWz33+l8kuMIQnDwgQBG5s3fAfQvkRjQ7NqXhtNcKOnPkdICmUHyCaWW06HCsqg==", + "version": "7.18.8", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz", + "integrity": "sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-function-name": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.7.tgz", - "integrity": "sha512-SU/C68YVwTRxqWj5kgsbKINakGag0KTgq9f2iZEXdStoAbOzLHEBRYzImmA6yFo8YZhJVflvXmIHUO7GWHmxxA==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz", + "integrity": "sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ==", "dev": true, "requires": { - "@babel/helper-compilation-targets": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-compilation-targets": "^7.18.9", + "@babel/helper-function-name": "^7.18.9", + "@babel/helper-plugin-utils": "^7.18.9" } }, "@babel/plugin-transform-literals": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.7.tgz", - "integrity": "sha512-6tH8RTpTWI0s2sV6uq3e/C9wPo4PTqqZps4uF0kzQ9/xPLFQtipynvmT1g/dOfEJ+0EQsHhkQ/zyRId8J2b8zQ==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz", + "integrity": "sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.9" } }, "@babel/plugin-transform-member-expression-literals": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.7.tgz", - "integrity": "sha512-mBruRMbktKQwbxaJof32LT9KLy2f3gH+27a5XSuXo6h7R3vqltl0PgZ80C8ZMKw98Bf8bqt6BEVi3svOh2PzMw==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz", + "integrity": "sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-modules-amd": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.7.tgz", - "integrity": "sha512-KaaEtgBL7FKYwjJ/teH63oAmE3lP34N3kshz8mm4VMAw7U3PxjVwwUmxEFksbgsNUaO3wId9R2AVQYSEGRa2+g==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.18.6.tgz", + "integrity": "sha512-Pra5aXsmTsOnjM3IajS8rTaLCy++nGM4v3YR4esk5PCsyg9z8NA5oQLwxzMUtDBd8F+UmVza3VxoAaWCbzH1rg==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.17.7.tgz", - "integrity": "sha512-ITPmR2V7MqioMJyrxUo2onHNC3e+MvfFiFIR0RP21d3PtlVb6sfzoxNKiphSZUOM9hEIdzCcZe83ieX3yoqjUA==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz", + "integrity": "sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.17.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-simple-access": "^7.17.7", + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-simple-access": "^7.18.6", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.17.8.tgz", - "integrity": "sha512-39reIkMTUVagzgA5x88zDYXPCMT6lcaRKs1+S9K6NKBPErbgO/w/kP8GlNQTC87b412ZTlmNgr3k2JrWgHH+Bw==", + "version": "7.19.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.19.0.tgz", + "integrity": "sha512-x9aiR0WXAWmOWsqcsnrzGR+ieaTMVyGyffPVA7F8cXAGt/UxefYv6uSHZLkAFChN5M5Iy1+wjE+xJuPt22H39A==", "dev": true, "requires": { - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-module-transforms": "^7.17.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-validator-identifier": "^7.16.7", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-module-transforms": "^7.19.0", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-validator-identifier": "^7.18.6", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-umd": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.7.tgz", - "integrity": "sha512-EMh7uolsC8O4xhudF2F6wedbSHm1HHZ0C6aJ7K67zcDNidMzVcxWdGr+htW9n21klm+bOn+Rx4CBsAntZd3rEQ==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz", + "integrity": "sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.8.tgz", - "integrity": "sha512-j3Jw+n5PvpmhRR+mrgIh04puSANCk/T/UA3m3P1MjJkhlK906+ApHhDIqBQDdOgL/r1UYpz4GNclTXxyZrYGSw==", + "version": "7.19.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.19.1.tgz", + "integrity": "sha512-oWk9l9WItWBQYS4FgXD4Uyy5kq898lvkXpXQxoJEY1RnvPk4R/Dvu2ebXU9q8lP+rlMwUQTFf2Ok6d78ODa0kw==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.16.7" + "@babel/helper-create-regexp-features-plugin": "^7.19.0", + "@babel/helper-plugin-utils": "^7.19.0" } }, "@babel/plugin-transform-new-target": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.7.tgz", - "integrity": "sha512-xiLDzWNMfKoGOpc6t3U+etCE2yRnn3SM09BXqWPIZOBpL2gvVrBWUKnsJx0K/ADi5F5YC5f8APFfWrz25TdlGg==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz", + "integrity": "sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-object-super": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.7.tgz", - "integrity": "sha512-14J1feiQVWaGvRxj2WjyMuXS2jsBkgB3MdSN5HuC2G5nRspa5RK9COcs82Pwy5BuGcjb+fYaUj94mYcOj7rCvw==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz", + "integrity": "sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-replace-supers": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.6" } }, "@babel/plugin-transform-parameters": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.7.tgz", - "integrity": "sha512-AT3MufQ7zZEhU2hwOA11axBnExW0Lszu4RL/tAlUJBuNoRak+wehQW8h6KcXOcgjY42fHtDxswuMhMjFEuv/aw==", + "version": "7.18.8", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.8.tgz", + "integrity": "sha512-ivfbE3X2Ss+Fj8nnXvKJS6sjRG4gzwPMsP+taZC+ZzEGjAYlvENixmt1sZ5Ca6tWls+BlKSGKPJ6OOXvXCbkFg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-property-literals": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.7.tgz", - "integrity": "sha512-z4FGr9NMGdoIl1RqavCqGG+ZuYjfZ/hkCIeuH6Do7tXmSm0ls11nYVSJqFEUOSJbDab5wC6lRE/w6YjVcr6Hqw==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz", + "integrity": "sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-regenerator": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.7.tgz", - "integrity": "sha512-mF7jOgGYCkSJagJ6XCujSQg+6xC1M77/03K2oBmVJWoFGNUtnVJO4WHKJk3dnPC8HCcj4xBQP1Egm8DWh3Pb3Q==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz", + "integrity": "sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ==", "dev": true, "requires": { - "regenerator-transform": "^0.14.2" + "@babel/helper-plugin-utils": "^7.18.6", + "regenerator-transform": "^0.15.0" } }, "@babel/plugin-transform-reserved-words": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.16.7.tgz", - "integrity": "sha512-KQzzDnZ9hWQBjwi5lpY5v9shmm6IVG0U9pB18zvMu2i4H90xpT4gmqwPYsn8rObiadYe2M0gmgsiOIF5A/2rtg==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz", + "integrity": "sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-shorthand-properties": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.7.tgz", - "integrity": "sha512-hah2+FEnoRoATdIb05IOXf+4GzXYTq75TVhIn1PewihbpyrNWUt2JbudKQOETWw6QpLe+AIUpJ5MVLYTQbeeUg==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz", + "integrity": "sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-spread": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.7.tgz", - "integrity": "sha512-+pjJpgAngb53L0iaA5gU/1MLXJIfXcYepLgXB3esVRf4fqmj8f2cxM3/FKaHsZms08hFQJkFccEWuIpm429TXg==", + "version": "7.19.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-spread/-/plugin-transform-spread-7.19.0.tgz", + "integrity": "sha512-RsuMk7j6n+r752EtzyScnWkQyuJdli6LdO5Klv8Yx0OfPVTcQkIUfS8clx5e9yHXzlnhOZF3CbQ8C2uP5j074w==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0" + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9" } }, "@babel/plugin-transform-sticky-regex": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.7.tgz", - "integrity": "sha512-NJa0Bd/87QV5NZZzTuZG5BPJjLYadeSZ9fO6oOUoL4iQx+9EEuw/eEM92SrsT19Yc2jgB1u1hsjqDtH02c3Drw==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz", + "integrity": "sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-template-literals": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.7.tgz", - "integrity": "sha512-VwbkDDUeenlIjmfNeDX/V0aWrQH2QiVyJtwymVQSzItFDTpxfyJh3EVaQiS0rIN/CqbLGr0VcGmuwyTdZtdIsA==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz", + "integrity": "sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.9" } }, "@babel/plugin-transform-typeof-symbol": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.7.tgz", - "integrity": "sha512-p2rOixCKRJzpg9JB4gjnG4gjWkWa89ZoYUnl9snJ1cWIcTH/hvxZqfO+WjG6T8DRBpctEol5jw1O5rA8gkCokQ==", + "version": "7.18.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz", + "integrity": "sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.9" } }, "@babel/plugin-transform-unicode-escapes": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.7.tgz", - "integrity": "sha512-TAV5IGahIz3yZ9/Hfv35TV2xEm+kaBDaZQCn2S/hG9/CZ0DktxJv9eKfPc7yYCvOYR4JGx1h8C+jcSOvgaaI/Q==", + "version": "7.18.10", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz", + "integrity": "sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.9" } }, "@babel/plugin-transform-unicode-regex": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.7.tgz", - "integrity": "sha512-oC5tYYKw56HO75KZVLQ+R/Nl3Hro9kf8iG0hXoaHP7tjAyCpvqBiSNe6vGrZni1Z6MggmUOC6A7VP7AVmw225Q==", + "version": "7.18.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz", + "integrity": "sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/preset-env": { - "version": "7.16.11", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.16.11.tgz", - "integrity": "sha512-qcmWG8R7ZW6WBRPZK//y+E3Cli151B20W1Rv7ln27vuPaXU/8TKms6jFdiJtF7UDTxcrb7mZd88tAeK9LjdT8g==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.16.8", - "@babel/helper-compilation-targets": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-validator-option": "^7.16.7", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.16.7", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.16.7", - "@babel/plugin-proposal-async-generator-functions": "^7.16.8", - "@babel/plugin-proposal-class-properties": "^7.16.7", - "@babel/plugin-proposal-class-static-block": "^7.16.7", - "@babel/plugin-proposal-dynamic-import": "^7.16.7", - "@babel/plugin-proposal-export-namespace-from": "^7.16.7", - "@babel/plugin-proposal-json-strings": "^7.16.7", - "@babel/plugin-proposal-logical-assignment-operators": "^7.16.7", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7", - "@babel/plugin-proposal-numeric-separator": "^7.16.7", - "@babel/plugin-proposal-object-rest-spread": "^7.16.7", - "@babel/plugin-proposal-optional-catch-binding": "^7.16.7", - "@babel/plugin-proposal-optional-chaining": "^7.16.7", - "@babel/plugin-proposal-private-methods": "^7.16.11", - "@babel/plugin-proposal-private-property-in-object": "^7.16.7", - "@babel/plugin-proposal-unicode-property-regex": "^7.16.7", + "version": "7.19.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/preset-env/-/preset-env-7.19.3.tgz", + "integrity": "sha512-ziye1OTc9dGFOAXSWKUqQblYHNlBOaDl8wzqf2iKXJAltYiR3hKHUKmkt+S9PppW7RQpq4fFCrwwpIDj/f5P4w==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.19.3", + "@babel/helper-compilation-targets": "^7.19.3", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-validator-option": "^7.18.6", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.9", + "@babel/plugin-proposal-async-generator-functions": "^7.19.1", + "@babel/plugin-proposal-class-properties": "^7.18.6", + "@babel/plugin-proposal-class-static-block": "^7.18.6", + "@babel/plugin-proposal-dynamic-import": "^7.18.6", + "@babel/plugin-proposal-export-namespace-from": "^7.18.9", + "@babel/plugin-proposal-json-strings": "^7.18.6", + "@babel/plugin-proposal-logical-assignment-operators": "^7.18.9", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", + "@babel/plugin-proposal-numeric-separator": "^7.18.6", + "@babel/plugin-proposal-object-rest-spread": "^7.18.9", + "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", + "@babel/plugin-proposal-optional-chaining": "^7.18.9", + "@babel/plugin-proposal-private-methods": "^7.18.6", + "@babel/plugin-proposal-private-property-in-object": "^7.18.6", + "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-class-properties": "^7.12.13", "@babel/plugin-syntax-class-static-block": "^7.14.5", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-import-assertions": "^7.18.6", "@babel/plugin-syntax-json-strings": "^7.8.3", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", @@ -3609,50 +5501,50 @@ "@babel/plugin-syntax-optional-chaining": "^7.8.3", "@babel/plugin-syntax-private-property-in-object": "^7.14.5", "@babel/plugin-syntax-top-level-await": "^7.14.5", - "@babel/plugin-transform-arrow-functions": "^7.16.7", - "@babel/plugin-transform-async-to-generator": "^7.16.8", - "@babel/plugin-transform-block-scoped-functions": "^7.16.7", - "@babel/plugin-transform-block-scoping": "^7.16.7", - "@babel/plugin-transform-classes": "^7.16.7", - "@babel/plugin-transform-computed-properties": "^7.16.7", - "@babel/plugin-transform-destructuring": "^7.16.7", - "@babel/plugin-transform-dotall-regex": "^7.16.7", - "@babel/plugin-transform-duplicate-keys": "^7.16.7", - "@babel/plugin-transform-exponentiation-operator": "^7.16.7", - "@babel/plugin-transform-for-of": "^7.16.7", - "@babel/plugin-transform-function-name": "^7.16.7", - "@babel/plugin-transform-literals": "^7.16.7", - "@babel/plugin-transform-member-expression-literals": "^7.16.7", - "@babel/plugin-transform-modules-amd": "^7.16.7", - "@babel/plugin-transform-modules-commonjs": "^7.16.8", - "@babel/plugin-transform-modules-systemjs": "^7.16.7", - "@babel/plugin-transform-modules-umd": "^7.16.7", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.16.8", - "@babel/plugin-transform-new-target": "^7.16.7", - "@babel/plugin-transform-object-super": "^7.16.7", - "@babel/plugin-transform-parameters": "^7.16.7", - "@babel/plugin-transform-property-literals": "^7.16.7", - "@babel/plugin-transform-regenerator": "^7.16.7", - "@babel/plugin-transform-reserved-words": "^7.16.7", - "@babel/plugin-transform-shorthand-properties": "^7.16.7", - "@babel/plugin-transform-spread": "^7.16.7", - "@babel/plugin-transform-sticky-regex": "^7.16.7", - "@babel/plugin-transform-template-literals": "^7.16.7", - "@babel/plugin-transform-typeof-symbol": "^7.16.7", - "@babel/plugin-transform-unicode-escapes": "^7.16.7", - "@babel/plugin-transform-unicode-regex": "^7.16.7", + "@babel/plugin-transform-arrow-functions": "^7.18.6", + "@babel/plugin-transform-async-to-generator": "^7.18.6", + "@babel/plugin-transform-block-scoped-functions": "^7.18.6", + "@babel/plugin-transform-block-scoping": "^7.18.9", + "@babel/plugin-transform-classes": "^7.19.0", + "@babel/plugin-transform-computed-properties": "^7.18.9", + "@babel/plugin-transform-destructuring": "^7.18.13", + "@babel/plugin-transform-dotall-regex": "^7.18.6", + "@babel/plugin-transform-duplicate-keys": "^7.18.9", + "@babel/plugin-transform-exponentiation-operator": "^7.18.6", + "@babel/plugin-transform-for-of": "^7.18.8", + "@babel/plugin-transform-function-name": "^7.18.9", + "@babel/plugin-transform-literals": "^7.18.9", + "@babel/plugin-transform-member-expression-literals": "^7.18.6", + "@babel/plugin-transform-modules-amd": "^7.18.6", + "@babel/plugin-transform-modules-commonjs": "^7.18.6", + "@babel/plugin-transform-modules-systemjs": "^7.19.0", + "@babel/plugin-transform-modules-umd": "^7.18.6", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.19.1", + "@babel/plugin-transform-new-target": "^7.18.6", + "@babel/plugin-transform-object-super": "^7.18.6", + "@babel/plugin-transform-parameters": "^7.18.8", + "@babel/plugin-transform-property-literals": "^7.18.6", + "@babel/plugin-transform-regenerator": "^7.18.6", + "@babel/plugin-transform-reserved-words": "^7.18.6", + "@babel/plugin-transform-shorthand-properties": "^7.18.6", + "@babel/plugin-transform-spread": "^7.19.0", + "@babel/plugin-transform-sticky-regex": "^7.18.6", + "@babel/plugin-transform-template-literals": "^7.18.9", + "@babel/plugin-transform-typeof-symbol": "^7.18.9", + "@babel/plugin-transform-unicode-escapes": "^7.18.10", + "@babel/plugin-transform-unicode-regex": "^7.18.6", "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.16.8", - "babel-plugin-polyfill-corejs2": "^0.3.0", - "babel-plugin-polyfill-corejs3": "^0.5.0", - "babel-plugin-polyfill-regenerator": "^0.3.0", - "core-js-compat": "^3.20.2", + "@babel/types": "^7.19.3", + "babel-plugin-polyfill-corejs2": "^0.3.3", + "babel-plugin-polyfill-corejs3": "^0.6.0", + "babel-plugin-polyfill-regenerator": "^0.4.1", + "core-js-compat": "^3.25.1", "semver": "^6.3.0" } }, "@babel/preset-modules": { "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/preset-modules/-/preset-modules-0.1.5.tgz", "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", "dev": true, "requires": { @@ -3664,78 +5556,178 @@ } }, "@babel/runtime": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.8.tgz", - "integrity": "sha512-dQpEpK0O9o6lj6oPu0gRDbbnk+4LeHlNcBpspf6Olzt3GIX4P1lWF1gS+pHLDFlaJvbR6q7jCfQ08zA4QJBnmA==", + "version": "7.19.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/runtime/-/runtime-7.19.0.tgz", + "integrity": "sha512-eR8Lo9hnDS7tqkO7NsV+mKvCmv5boaXFSZ70DnfhcgiEne8hv9oCEd36Klw74EtizEqLsy4YnW8UWwpBVolHZA==", "dev": true, "requires": { "regenerator-runtime": "^0.13.4" } }, "@babel/template": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", - "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "version": "7.18.10", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/template/-/template-7.18.10.tgz", + "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", "dev": true, "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.10", + "@babel/types": "^7.18.10" } }, "@babel/traverse": { - "version": "7.17.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz", - "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", + "version": "7.19.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/traverse/-/traverse-7.19.3.tgz", + "integrity": "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.3", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.19.3", + "@babel/types": "^7.19.3", "debug": "^4.1.0", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", - "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", + "version": "7.19.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@babel/types/-/types-7.19.3.tgz", + "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.16.7", + "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-validator-identifier": "^7.19.1", "to-fast-properties": "^2.0.0" } }, + "@eslint/eslintrc": { + "version": "1.3.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@eslint/eslintrc/-/eslintrc-1.3.2.tgz", + "integrity": "sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.4.0", + "globals": "^13.15.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "globals": { + "version": "13.17.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/globals/-/globals-13.17.0.tgz", + "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + } + } + }, + "@humanwhocodes/config-array": { + "version": "0.10.7", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@humanwhocodes/config-array/-/config-array-0.10.7.tgz", + "integrity": "sha512-MDl6D6sBsaV452/QSdX+4CXIjZhIcI0PELsxUjk4U828yd58vk3bTIvk/6w5FY+4hIy9sLW0sfrV7K7Kc++j/w==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + } + }, + "@humanwhocodes/gitignore-to-minimatch": { + "version": "1.0.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", + "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", + "dev": true + }, + "@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true + }, + "@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, + "@jridgewell/gen-mapping": { + "version": "0.1.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", + "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "@jridgewell/resolve-uri": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz", - "integrity": "sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==", + "version": "3.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true + }, + "@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", "dev": true }, "@jridgewell/sourcemap-codec": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz", - "integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==", + "version": "1.4.14", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", "dev": true }, "@jridgewell/trace-mapping": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.4.tgz", - "integrity": "sha512-vFv9ttIedivx0ux3QSjhgtCVjPZd5l46ZOMDSCwnH1yUO2e964gO8LZGyv2QkqcgR6TnBU1v+1IFqmeoG+0UJQ==", + "version": "0.3.15", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", + "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", "dev": true, "requires": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, "@rollup/plugin-babel": { "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", "integrity": "sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==", "dev": true, "requires": { @@ -3744,9 +5736,9 @@ } }, "@rollup/plugin-commonjs": { - "version": "21.0.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.0.3.tgz", - "integrity": "sha512-ThGfwyvcLc6cfP/MWxA5ACF+LZCvsuhUq7V5134Az1oQWsiC7lNpLT4mJI86WQunK7BYmpUiHmMk2Op6OAHs0g==", + "version": "22.0.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@rollup/plugin-commonjs/-/plugin-commonjs-22.0.2.tgz", + "integrity": "sha512-//NdP6iIwPbMTcazYsiBMbJW7gfmpHom33u1beiIoHDEM0Q9clvtQB1T0efvMqHeKsGohiHo97BCPCkBXdscwg==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", @@ -3756,74 +5748,148 @@ "is-reference": "^1.2.1", "magic-string": "^0.25.7", "resolve": "^1.17.0" - }, - "dependencies": { - "estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true - } } }, "@rollup/plugin-node-resolve": { - "version": "13.1.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.3.tgz", - "integrity": "sha512-BdxNk+LtmElRo5d06MGY4zoepyrXX1tkzX2hrnPEZ53k78GuOMWLqmJDGIIOPwVRIFZrLQOo+Yr6KtCuLIA0AQ==", + "version": "14.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@rollup/plugin-node-resolve/-/plugin-node-resolve-14.1.0.tgz", + "integrity": "sha512-5G2niJroNCz/1zqwXtk0t9+twOSDlG00k1Wfd7bkbbXmwg8H8dvgHdIWAun53Ps/rckfvOC7scDBjuGFg5OaWw==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", "@types/resolve": "1.17.1", - "builtin-modules": "^3.1.0", "deepmerge": "^4.2.2", + "is-builtin-module": "^3.1.0", "is-module": "^1.0.0", "resolve": "^1.19.0" } }, "@rollup/pluginutils": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", "dev": true, "requires": { "@types/estree": "0.0.39", "estree-walker": "^1.0.1", "picomatch": "^2.2.2" + }, + "dependencies": { + "estree-walker": { + "version": "1.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true + } } }, "@types/estree": { "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@types/estree/-/estree-0.0.39.tgz", "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", "dev": true }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "dev": true + }, "@types/node": { - "version": "17.0.23", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz", - "integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==", + "version": "16.11.63", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@types/node/-/node-16.11.63.tgz", + "integrity": "sha512-3OxnrEQLBz8EIIaHpg3CibmTAEGkDBcHY4fL5cnBwg2vd2yvHrUDGWxK+MlYPeXWWIoJJW79dGtU+oeBr6166Q==", "dev": true }, "@types/resolve": { "version": "1.17.1", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/@types/resolve/-/resolve-1.17.1.tgz", "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", "dev": true, "requires": { - "@types/node": "*" + "@types/node": "*" + } + }, + "acorn": { + "version": "8.8.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "dev": true + }, + "acorn-jsx": { + "version": "5.3.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "requires": {} + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" } }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, "ansi-styles": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" } }, + "argparse": { + "version": "2.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "array-includes": { + "version": "3.1.5", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/array-includes/-/array-includes-3.1.5.tgz", + "integrity": "sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5", + "get-intrinsic": "^1.1.1", + "is-string": "^1.0.7" + } + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "array.prototype.flat": { + "version": "1.3.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz", + "integrity": "sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.2", + "es-shim-unscopables": "^1.0.0" + } + }, "babel-plugin-dynamic-import-node": { "version": "2.3.3", - "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", "dev": true, "requires": { @@ -3831,44 +5897,44 @@ } }, "babel-plugin-polyfill-corejs2": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz", - "integrity": "sha512-v7/T6EQcNfVLfcN2X8Lulb7DjprieyLWJK/zOWH5DUYcAgex9sP3h25Q+DLsX9TloXe3y1O8l2q2Jv9q8UVB9w==", + "version": "0.3.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz", + "integrity": "sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==", "dev": true, "requires": { - "@babel/compat-data": "^7.13.11", - "@babel/helper-define-polyfill-provider": "^0.3.1", + "@babel/compat-data": "^7.17.7", + "@babel/helper-define-polyfill-provider": "^0.3.3", "semver": "^6.1.1" } }, "babel-plugin-polyfill-corejs3": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz", - "integrity": "sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ==", + "version": "0.6.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz", + "integrity": "sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA==", "dev": true, "requires": { - "@babel/helper-define-polyfill-provider": "^0.3.1", - "core-js-compat": "^3.21.0" + "@babel/helper-define-polyfill-provider": "^0.3.3", + "core-js-compat": "^3.25.1" } }, "babel-plugin-polyfill-regenerator": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.1.tgz", - "integrity": "sha512-Y2B06tvgHYt1x0yz17jGkGeeMr5FeKUu+ASJ+N6nB5lQ8Dapfg42i0OVrf8PNGJ3zKL4A23snMi1IRwrqqND7A==", + "version": "0.4.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz", + "integrity": "sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw==", "dev": true, "requires": { - "@babel/helper-define-polyfill-provider": "^0.3.1" + "@babel/helper-define-polyfill-provider": "^0.3.3" } }, "balanced-match": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, "brace-expansion": { "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { @@ -3876,28 +5942,36 @@ "concat-map": "0.0.1" } }, + "braces": { + "version": "3.0.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, "browserslist": { - "version": "4.20.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.2.tgz", - "integrity": "sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA==", + "version": "4.21.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/browserslist/-/browserslist-4.21.4.tgz", + "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001317", - "electron-to-chromium": "^1.4.84", - "escalade": "^3.1.1", - "node-releases": "^2.0.2", - "picocolors": "^1.0.0" + "caniuse-lite": "^1.0.30001400", + "electron-to-chromium": "^1.4.251", + "node-releases": "^2.0.6", + "update-browserslist-db": "^1.0.9" } }, "builtin-modules": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", - "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==", + "version": "3.3.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", "dev": true }, "call-bind": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/call-bind/-/call-bind-1.0.2.tgz", "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "dev": true, "requires": { @@ -3905,15 +5979,21 @@ "get-intrinsic": "^1.0.2" } }, + "callsites": { + "version": "3.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, "caniuse-lite": { - "version": "1.0.30001324", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001324.tgz", - "integrity": "sha512-/eYp1J6zYh1alySQB4uzYFkLmxxI8tk0kxldbNHXp8+v+rdMKdUBNjRLz7T7fz6Iox+1lIdYpc7rq6ZcXfTukg==", + "version": "1.0.30001414", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/caniuse-lite/-/caniuse-lite-1.0.30001414.tgz", + "integrity": "sha512-t55jfSaWjCdocnFdKQoO+d2ct9C59UZg4dY3OnUlSZ447r8pUtIKdp0hpAzrGFultmTC+Us+KpKi4GZl/LXlFg==", "dev": true }, "chalk": { "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { @@ -3924,7 +6004,7 @@ }, "color-convert": { "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "requires": { @@ -3933,25 +6013,31 @@ }, "color-name": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, "commondir": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/commondir/-/commondir-1.0.1.tgz", "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", "dev": true }, "concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "confusing-browser-globals": { + "version": "1.0.11", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", + "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==", + "dev": true + }, "convert-source-map": { "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/convert-source-map/-/convert-source-map-1.8.0.tgz", "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", "dev": true, "requires": { @@ -3959,267 +6045,1035 @@ } }, "core-js-compat": { - "version": "3.21.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.21.1.tgz", - "integrity": "sha512-gbgX5AUvMb8gwxC7FLVWYT7Kkgu/y7+h/h1X43yJkNqhlK2fuYyQimqvKGNZFAY6CKii/GFKJ2cp/1/42TN36g==", + "version": "3.25.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/core-js-compat/-/core-js-compat-3.25.4.tgz", + "integrity": "sha512-gCEcIEEqCR6230WroNunK/653CWKhqyCKJ9b+uESqOt/WFJA8B4lTnnQFdpYY5vmBcwJAA90Bo5vXs+CVsf6iA==", "dev": true, "requires": { - "browserslist": "^4.19.1", - "semver": "7.0.0" - }, - "dependencies": { - "semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", - "dev": true - } + "browserslist": "^4.21.4" + } + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" } }, "crypto": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/crypto/-/crypto-1.0.1.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/crypto/-/crypto-1.0.1.tgz", "integrity": "sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig==" }, "debug": { "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" } }, + "deep-is": { + "version": "0.1.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, "deepmerge": { "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/deepmerge/-/deepmerge-4.2.2.tgz", "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", "dev": true }, "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "version": "1.1.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "dev": true, + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, "requires": { - "object-keys": "^1.0.12" + "esutils": "^2.0.2" } }, "electron-to-chromium": { - "version": "1.4.103", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.103.tgz", - "integrity": "sha512-c/uKWR1Z/W30Wy/sx3dkZoj4BijbXX85QKWu9jJfjho3LBAXNEGAEW3oWiGb+dotA6C6BzCTxL2/aLes7jlUeg==", + "version": "1.4.270", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/electron-to-chromium/-/electron-to-chromium-1.4.270.tgz", + "integrity": "sha512-KNhIzgLiJmDDC444dj9vEOpZEgsV96ult9Iff98Vanumn+ShJHd5se8aX6KeVxdc0YQeqdrezBZv89rleDbvSg==", "dev": true }, + "es-abstract": { + "version": "1.20.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/es-abstract/-/es-abstract-1.20.3.tgz", + "integrity": "sha512-AyrnaKVpMzljIdwjzrj+LxGmj8ik2LckwXacHqrJJ/jxz6dDDBcZ7I7nlHM0FvEW8MfbWJwOd+yT2XzYW49Frw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.1.3", + "get-symbol-description": "^1.0.0", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.6", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.2", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "safe-regex-test": "^1.0.0", + "string.prototype.trimend": "^1.0.5", + "string.prototype.trimstart": "^1.0.5", + "unbox-primitive": "^1.0.2" + } + }, + "es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, "escalade": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true }, "escape-string-regexp": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, + "eslint": { + "version": "8.24.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/eslint/-/eslint-8.24.0.tgz", + "integrity": "sha512-dWFaPhGhTAiPcCgm3f6LI2MBWbogMnTJzFBbhXVRQDJPkr9pGZvVjlVfXd+vyDcWPA2Ic9L2AXPIQM0+vk/cSQ==", + "dev": true, + "requires": { + "@eslint/eslintrc": "^1.3.2", + "@humanwhocodes/config-array": "^0.10.5", + "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", + "@humanwhocodes/module-importer": "^1.0.1", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.4.0", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.1", + "globals": "^13.15.0", + "globby": "^11.1.0", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-sdsl": "^4.1.4", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "globals": { + "version": "13.17.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/globals/-/globals-13.17.0.tgz", + "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "eslint-config-airbnb-base": { + "version": "15.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", + "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", + "dev": true, + "requires": { + "confusing-browser-globals": "^1.0.10", + "object.assign": "^4.1.2", + "object.entries": "^1.1.5", + "semver": "^6.3.0" + } + }, + "eslint-import-resolver-node": { + "version": "0.3.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", + "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", + "dev": true, + "requires": { + "debug": "^3.2.7", + "resolve": "^1.20.0" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "eslint-module-utils": { + "version": "2.7.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz", + "integrity": "sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==", + "dev": true, + "requires": { + "debug": "^3.2.7" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "eslint-plugin-import": { + "version": "2.26.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz", + "integrity": "sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==", + "dev": true, + "requires": { + "array-includes": "^3.1.4", + "array.prototype.flat": "^1.2.5", + "debug": "^2.6.9", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.6", + "eslint-module-utils": "^2.7.3", + "has": "^1.0.3", + "is-core-module": "^2.8.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.values": "^1.1.5", + "resolve": "^1.22.0", + "tsconfig-paths": "^3.14.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "eslint-scope": { + "version": "7.1.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "eslint-utils": { + "version": "3.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^2.0.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + } + } + }, + "eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true + }, + "espree": { + "version": "9.4.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/espree/-/espree-9.4.0.tgz", + "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", + "dev": true, + "requires": { + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.3.0" + } + }, + "esquery": { + "version": "1.4.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + } + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + }, "estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "version": "2.0.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", "dev": true }, "esutils": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-glob": { + "version": "3.2.12", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "fastq": { + "version": "1.13.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, "filesize": { "version": "6.4.0", - "resolved": "https://registry.npmjs.org/filesize/-/filesize-6.4.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/filesize/-/filesize-6.4.0.tgz", "integrity": "sha512-mjFIpOHC4jbfcTfoh4rkWpI31mF7viw9ikj/JyLoKzqlwG/YsefKfvYlYhdYdg/9mtK2z1AzgN/0LvVQ3zdlSQ==", "dev": true }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.2.7", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true + }, "fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, "fsevents": { "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/fsevents/-/fsevents-2.3.2.tgz", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dev": true, "optional": true }, "function-bind": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, + "function.prototype.name": { + "version": "1.1.5", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + } + }, + "functions-have-names": { + "version": "1.2.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true + }, "gensync": { "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true }, "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "version": "1.1.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", "dev": true, "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1" + "has-symbols": "^1.0.3" + } + }, + "get-symbol-description": { + "version": "1.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" } }, "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "7.2.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "requires": { + "is-glob": "^4.0.3" + } + }, "globals": { "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, + "globby": { + "version": "11.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + } + }, + "grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "has": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "requires": { "function-bind": "^1.1.1" } }, + "has-bigints": { + "version": "1.0.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true + }, "has-flag": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, + "has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.1" + } + }, "has-symbols": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, + "ignore": { + "version": "5.2.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "dev": true + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "internal-slot": { + "version": "1.0.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + } + }, + "is-bigint": { + "version": "1.0.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "requires": { + "has-bigints": "^1.0.1" + } + }, + "is-boolean-object": { + "version": "1.1.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-builtin-module": { + "version": "3.2.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-builtin-module/-/is-builtin-module-3.2.0.tgz", + "integrity": "sha512-phDA4oSGt7vl1n5tJvTWooWWAsXLY+2xCnxNqvKhGEzujg+A43wPlPOyDg3C8XQHN+6k/JTQWJ/j0dQh/qr+Hw==", "dev": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "builtin-modules": "^3.3.0" } }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "is-callable": { + "version": "1.2.7", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true }, "is-core-module": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", - "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", + "version": "2.10.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-core-module/-/is-core-module-2.10.0.tgz", + "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", "dev": true, "requires": { "has": "^1.0.3" } }, + "is-date-object": { + "version": "1.0.5", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, "is-module": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-module/-/is-module-1.0.0.tgz", "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", "dev": true }, + "is-negative-zero": { + "version": "2.0.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-number-object": { + "version": "1.0.7", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-reference": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-reference/-/is-reference-1.2.1.tgz", "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", "dev": true, "requires": { "@types/estree": "*" } }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, + "is-string": { + "version": "1.0.7", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-symbol": { + "version": "1.0.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, + "is-weakref": { + "version": "1.0.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, "jasmine": { - "version": "3.99.0", - "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-3.99.0.tgz", - "integrity": "sha512-YIThBuHzaIIcjxeuLmPD40SjxkEcc8i//sGMDKCgkRMVgIwRJf5qyExtlJpQeh7pkeoBSOe6lQEdg+/9uKg9mw==", + "version": "4.4.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/jasmine/-/jasmine-4.4.0.tgz", + "integrity": "sha512-xrbOyYkkCvgduNw7CKktDtNb+BwwBv/zvQeHpTkbxqQ37AJL5V4sY3jHoMIJPP/hTc3QxLVwOyxc87AqA+kw5g==", "dev": true, "requires": { "glob": "^7.1.6", - "jasmine-core": "~3.99.0" + "jasmine-core": "^4.4.0" } }, "jasmine-core": { - "version": "3.99.1", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.99.1.tgz", - "integrity": "sha512-Hu1dmuoGcZ7AfyynN3LsfruwMbxMALMka+YtZeGoLuDEySVmVAPaonkNoBRIw/ectu8b9tVQCJNgp4a4knp+tg==", + "version": "4.4.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/jasmine-core/-/jasmine-core-4.4.0.tgz", + "integrity": "sha512-+l482uImx5BVd6brJYlaHe2UwfKoZBqQfNp20ZmdNfsjGFTemGfqHLsXjKEW23w9R/m8WYeFc9JmIgjj6dUtAA==", + "dev": true + }, + "js-sdsl": { + "version": "4.1.5", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/js-sdsl/-/js-sdsl-4.1.5.tgz", + "integrity": "sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==", "dev": true }, "js-tokens": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, "jsesc": { "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, "json5": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/json5/-/json5-2.2.1.tgz", "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", "dev": true }, "kd-tree-javascript": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/kd-tree-javascript/-/kd-tree-javascript-1.0.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/kd-tree-javascript/-/kd-tree-javascript-1.0.3.tgz", "integrity": "sha512-7oSugmaxTCJFqey11rlTSEQD3hGDnRgROMj9MEREvDGV8SlIFwN7x3jJRyFoi+mjO0+4wuSuaDLS1reNQHP7uA==" }, + "levn": { + "version": "0.4.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, "lodash.debounce": { "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", "dev": true }, "lodash.isequal": { "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/lodash.isequal/-/lodash.isequal-4.5.0.tgz", "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, "magic-string": { "version": "0.25.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/magic-string/-/magic-string-0.25.9.tgz", "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", "dev": true, "requires": { "sourcemap-codec": "^1.4.8" } }, + "merge2": { + "version": "1.4.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, "minimatch": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { @@ -4228,93 +7082,204 @@ }, "minimist": { "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/minimist/-/minimist-1.2.6.tgz", "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" }, "module-details-from-path": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/module-details-from-path/-/module-details-from-path-1.0.3.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/module-details-from-path/-/module-details-from-path-1.0.3.tgz", "integrity": "sha1-EUyUlnPiqKNenTV4hSeqN7Z52is=", "dev": true }, "ms": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, "munkres-js": { "version": "1.2.2", - "resolved": "https://registry.npmjs.org/munkres-js/-/munkres-js-1.2.2.tgz", - "integrity": "sha1-4D2YBo1F1YexX1Y+uGDrZ6qFKLc=" + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/munkres-js/-/munkres-js-1.2.2.tgz", + "integrity": "sha512-0oF4tBDvzx20CYzQ44tTJMfwTBJWXe7cE73Sa/u7Mz7X8jRtyOXOGE9kJBhCfX7Akku3Iy/WHa0sRgqLRq2xaQ==" + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true }, "node-releases": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.2.tgz", - "integrity": "sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==", + "version": "2.0.6", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/node-releases/-/node-releases-2.0.6.tgz", + "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", + "dev": true + }, + "object-inspect": { + "version": "1.12.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/object-inspect/-/object-inspect-1.12.2.tgz", + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", "dev": true }, "object-keys": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true }, "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "version": "4.1.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", "dev": true, "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", "object-keys": "^1.1.1" } }, + "object.entries": { + "version": "1.1.5", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/object.entries/-/object.entries-1.1.5.tgz", + "integrity": "sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" + } + }, + "object.values": { + "version": "1.1.5", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/object.values/-/object.values-1.1.5.tgz", + "integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" + } + }, "once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { "wrappy": "1" } }, + "optionator": { + "version": "0.9.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, + "path-key": { + "version": "3.1.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, "path-parse": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "path-type": { + "version": "4.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, "picocolors": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/picocolors/-/picocolors-1.0.0.tgz", "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", "dev": true }, "picomatch": { "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, "regenerate": { "version": "1.4.2", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/regenerate/-/regenerate-1.4.2.tgz", "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", "dev": true }, "regenerate-unicode-properties": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz", - "integrity": "sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw==", + "version": "10.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz", + "integrity": "sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ==", "dev": true, "requires": { "regenerate": "^1.4.2" @@ -4322,43 +7287,60 @@ }, "regenerator-runtime": { "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", "dev": true }, "regenerator-transform": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", - "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", + "version": "0.15.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/regenerator-transform/-/regenerator-transform-0.15.0.tgz", + "integrity": "sha512-LsrGtPmbYg19bcPHwdtmXwbW+TqNvtY4riE3P83foeHRroMbH6/2ddFBfab3t7kbzc7v7p4wbkIecHImqt0QNg==", "dev": true, "requires": { "@babel/runtime": "^7.8.4" } }, + "regexp.prototype.flags": { + "version": "1.4.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" + } + }, + "regexpp": { + "version": "3.2.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true + }, "regexpu-core": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.0.1.tgz", - "integrity": "sha512-CriEZlrKK9VJw/xQGJpQM5rY88BtuL8DM+AEwvcThHilbxiTAy8vq4iJnd2tqq8wLmjbGZzP7ZcKFjbGkmEFrw==", + "version": "5.2.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/regexpu-core/-/regexpu-core-5.2.1.tgz", + "integrity": "sha512-HrnlNtpvqP1Xkb28tMhBUO2EbyUHdQlsnlAhzWcwHy8WJR53UWr7/MAvqrsQKMbV4qdpv03oTMG8iIhfsPFktQ==", "dev": true, "requires": { "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^10.0.1", - "regjsgen": "^0.6.0", - "regjsparser": "^0.8.2", + "regenerate-unicode-properties": "^10.1.0", + "regjsgen": "^0.7.1", + "regjsparser": "^0.9.1", "unicode-match-property-ecmascript": "^2.0.0", "unicode-match-property-value-ecmascript": "^2.0.0" } }, "regjsgen": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.6.0.tgz", - "integrity": "sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA==", + "version": "0.7.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/regjsgen/-/regjsgen-0.7.1.tgz", + "integrity": "sha512-RAt+8H2ZEzHeYWxZ3H2z6tF18zyyOnlcdaafLrm21Bguj7uZy6ULibiAFdXEtKQY4Sy7wDTwDiOazasMLc4KPA==", "dev": true }, "regjsparser": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.8.4.tgz", - "integrity": "sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA==", + "version": "0.9.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/regjsparser/-/regjsparser-0.9.1.tgz", + "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", "dev": true, "requires": { "jsesc": "~0.5.0" @@ -4366,27 +7348,48 @@ "dependencies": { "jsesc": { "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/jsesc/-/jsesc-0.5.0.tgz", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "dev": true } } }, "resolve": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", - "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", + "version": "1.22.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", "dev": true, "requires": { - "is-core-module": "^2.8.1", + "is-core-module": "^2.9.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" } }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, "rollup": { - "version": "2.70.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.70.1.tgz", - "integrity": "sha512-CRYsI5EuzLbXdxC6RnYhOuRdtz4bhejPMSWjsFLfVM/7w/85n2szZv6yExqUXsBdz5KT8eoubeyDUDjhLHEslA==", + "version": "2.79.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/rollup/-/rollup-2.79.1.tgz", + "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", "dev": true, "requires": { "fsevents": "~2.3.2" @@ -4394,7 +7397,7 @@ }, "rollup-plugin-sizes": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/rollup-plugin-sizes/-/rollup-plugin-sizes-1.0.4.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/rollup-plugin-sizes/-/rollup-plugin-sizes-1.0.4.tgz", "integrity": "sha512-sZtFW+X/d4qytqFG6aKxhUj5aJadxOpMZbDrB9j9GpMKrXy2jt4RD/xbfnagbSbH+0q1kBcNd8L9tuoETjOu6g==", "dev": true, "requires": { @@ -4402,33 +7405,122 @@ "module-details-from-path": "^1.0.3" } }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, + "safe-regex-test": { + "version": "1.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + } + }, "semver": { "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/semver/-/semver-6.3.0.tgz", "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "shebang-command": { + "version": "2.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "slash": { + "version": "3.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true }, "sourcemap-codec": { "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", "dev": true }, + "string.prototype.trimend": { + "version": "1.0.5", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", + "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" + } + }, + "string.prototype.trimstart": { + "version": "1.0.5", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", + "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, "supports-color": { "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { @@ -4437,25 +7529,90 @@ }, "supports-preserve-symlinks-flag": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true }, + "text-table": { + "version": "0.2.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, "to-fast-properties": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "tsconfig-paths": { + "version": "3.14.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", + "integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==", + "dev": true, + "requires": { + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "json5": { + "version": "1.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + } + } + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + }, + "unbox-primitive": { + "version": "1.0.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + } + }, "unicode-canonical-property-names-ecmascript": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", "dev": true }, "unicode-match-property-ecmascript": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", "dev": true, "requires": { @@ -4465,26 +7622,79 @@ }, "unicode-match-property-value-ecmascript": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", "dev": true }, "unicode-property-aliases-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", - "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", + "version": "2.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", + "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", "dev": true }, + "update-browserslist-db": { + "version": "1.0.9", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz", + "integrity": "sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg==", + "dev": true, + "requires": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + } + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, "uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" + "version": "9.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==" + }, + "which": { + "version": "2.0.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true }, "wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true } } } diff --git a/package.json b/package.json index 130800d..cb99d81 100644 --- a/package.json +++ b/package.json @@ -9,31 +9,38 @@ }, "scripts": { "test": "jasmine", - "build": "rollup -c" + "build-bundle:cjs": "rollup -c rollup.cjs.config", + "build-bundle:esm": "rollup -c rollup.esm.config", + "eslint": "./node_modules/.bin/eslint .", + "eslint:fix": "./node_modules/.bin/eslint --fix ." }, "author": "@tdurand", "contributors": [ "Benedikt Groß (http://benedikt-gross.de/)", "Valentin Sawadski (https://github.com/vsaw/)", - "Adrian Kretz (https://github.com/akretz)" + "Adrian Kretz (https://github.com/akretz)", + "Dmytro Kushnir (https://github.com/dmytro-kushnir)" ], "license": "MIT", "dependencies": { "crypto": "^1.0.1", "kd-tree-javascript": "^1.0.3", "lodash.isequal": "^4.5.0", - "minimist": "^1.2.0", + "minimist": "^1.2.6", "munkres-js": "^1.2.2", - "uuid": "^3.2.1" + "uuid": "^9.0.0" }, "devDependencies": { - "@babel/core": "^7.17.8", - "@babel/preset-env": "^7.16.11", + "@babel/core": "^7.19.3", + "@babel/preset-env": "^7.19.3", "@rollup/plugin-babel": "^5.3.1", - "@rollup/plugin-commonjs": "^21.0.3", - "@rollup/plugin-node-resolve": "^13.1.3", - "jasmine": "^3.6.1", - "rollup": "^2.70.1", + "@rollup/plugin-commonjs": "^22.0.2", + "@rollup/plugin-node-resolve": "^14.1.0", + "eslint": "^8.24.0", + "eslint-config-airbnb-base": "^15.0.0", + "eslint-plugin-import": "^2.26.0", + "jasmine": "^4.4.0", + "rollup": "^2.79.1", "rollup-plugin-sizes": "^1.0.4" } } diff --git a/rollup.cjs.config.js b/rollup.cjs.config.js new file mode 100644 index 0000000..a552856 --- /dev/null +++ b/rollup.cjs.config.js @@ -0,0 +1,20 @@ +import resolve from '@rollup/plugin-node-resolve'; +import { babel } from '@rollup/plugin-babel'; +import sizes from 'rollup-plugin-sizes'; +import commonjs from '@rollup/plugin-commonjs'; + +const config = { + input: 'tracker.js', + output: { + file: 'bundle.cjs.js', + format: 'cjs', + }, + plugins: [ + resolve({ browser: true, preferBuiltins: false }), + commonjs({ transformMixedEsModules: true }), + babel({ babelHelpers: 'bundled' }), + sizes(), + ], +}; + +export default config; diff --git a/rollup.config.js b/rollup.config.js deleted file mode 100644 index 459c6db..0000000 --- a/rollup.config.js +++ /dev/null @@ -1,20 +0,0 @@ -import resolve from "@rollup/plugin-node-resolve"; -import { babel } from "@rollup/plugin-babel"; -import sizes from "rollup-plugin-sizes"; -import commonjs from '@rollup/plugin-commonjs'; - -const config = { - input: 'tracker.js', - output: { - file: 'bundle.cjs.js', - format: 'cjs' - }, - plugins: [ - resolve({ browser: true, preferBuiltins: false }), - commonjs({ transformMixedEsModules: true }), - babel({ babelHelpers: 'bundled' }), - sizes() - ] -}; - -export default config; \ No newline at end of file diff --git a/rollup.esm.config.js b/rollup.esm.config.js new file mode 100644 index 0000000..98128c4 --- /dev/null +++ b/rollup.esm.config.js @@ -0,0 +1,20 @@ +import babel from '@rollup/plugin-babel'; +import resolve from "@rollup/plugin-node-resolve"; +import commonjs from "@rollup/plugin-commonjs"; +import sizes from "rollup-plugin-sizes"; + +export default [ + { + input: 'tracker.js', + output: { + file: 'bundle.esm.js', + format: 'esm', + }, + plugins: [ + resolve({ browser: true, preferBuiltins: false }), + commonjs({ transformMixedEsModules: true }), + babel({ babelHelpers: 'bundled' }), + sizes(), + ], + }, +]; diff --git a/spec/ItemTracked.spec.js b/spec/ItemTracked.spec.js index 3ad628a..2296a8e 100644 --- a/spec/ItemTracked.spec.js +++ b/spec/ItemTracked.spec.js @@ -1,28 +1,28 @@ const ItemTracked = require('../ItemTracked'); -describe("ItemTracked", function () { +describe('ItemTracked', () => { const properties = { x: null, y: null, w: null, h: null, - name: "dummy", - confidence: null + name: 'dummy', + confidence: null, }; - describe("idDisplay", function () { + describe('idDisplay', () => { const item1 = ItemTracked.ItemTracked(properties); const item2 = ItemTracked.ItemTracked(properties); - it('starts at 0', function () { + it('starts at 0', () => { expect(item1.idDisplay).toBe(0); }); - it('icrements IDs', function () { + it('icrements IDs', () => { expect(item1.idDisplay).toBeLessThan(item2.idDisplay); }); - it('resets IDs', function () { + it('resets IDs', () => { ItemTracked.reset(); const item3 = ItemTracked.ItemTracked(properties); expect(item3.idDisplay).toBe(0); @@ -32,7 +32,7 @@ describe("ItemTracked", function () { describe('itemHistory', () => { it('stops at max length', () => { const item1 = ItemTracked.ItemTracked(properties); - for (var i = 0; i < ItemTracked.ITEM_HISTORY_MAX_LENGTH + 2; i++) { + for (let i = 0; i < ItemTracked.ITEM_HISTORY_MAX_LENGTH + 2; i++) { item1.update(properties, i); expect(item1.itemHistory.length).toBeLessThanOrEqual(ItemTracked.ITEM_HISTORY_MAX_LENGTH); } @@ -43,7 +43,7 @@ describe("ItemTracked", function () { ItemTracked.ITEM_HISTORY_MAX_LENGTH = 0; const item1 = ItemTracked.ItemTracked(properties); - for (var i = 0; i < ItemTracked.ITEM_HISTORY_MAX_LENGTH + 2; i++) { + for (let i = 0; i < ItemTracked.ITEM_HISTORY_MAX_LENGTH + 2; i++) { item1.update(properties, i); expect(item1.itemHistory.length).toBe(ItemTracked.ITEM_HISTORY_MAX_LENGTH); } diff --git a/spec/Tracker.spec.js b/spec/Tracker.spec.js index e2cd6ef..ae0eca2 100644 --- a/spec/Tracker.spec.js +++ b/spec/Tracker.spec.js @@ -8,8 +8,8 @@ const detections = [ w: 0.026031, h: 0.048941, confidence: 16.5444, - name: 'object' - } + name: 'object', + }, ], [], // This empty frame ensure that the object will be removed if fastDelete is enabled. [ @@ -19,8 +19,8 @@ const detections = [ w: 0.028142, h: 0.050919, confidence: 25.7651, - name: 'object' - } + name: 'object', + }, ], [ { @@ -29,8 +29,8 @@ const detections = [ w: 0.027887, h: 0.054398, confidence: 34.285399999999996, - name: 'object' - } + name: 'object', + }, ], [ { @@ -39,18 +39,18 @@ const detections = [ w: 0.026603, h: 0.058, confidence: 18.104300000000002, - name: 'object' - } - ] + name: 'object', + }, + ], ]; -describe('Tracker', function () { - beforeEach(function () { +describe('Tracker', () => { + beforeEach(() => { Tracker.reset(); Tracker.setParams({ fastDelete: true, unMatchedFramesTolerance: 5, - iouLimit: 0.05 + iouLimit: 0.05, }); detections.forEach((frame, frameNb) => { @@ -58,8 +58,8 @@ describe('Tracker', function () { }); }); - describe('reset', function () { - it('resets ItemTracker idDisplay', function () { + describe('reset', () => { + it('resets ItemTracker idDisplay', () => { Tracker.reset(); Tracker.updateTrackedItemsWithNewFrame(detections[0], 0); @@ -68,12 +68,12 @@ describe('Tracker', function () { }); }); - describe('fast delete', function () { - it('removes items with fast delete', function () { + describe('fast delete', () => { + it('removes items with fast delete', () => { expect(Tracker.getJSONOfTrackedItems()[0].id).toBeGreaterThan(0); }); - it('keeps the item if fastDelete is disabled', function () { + it('keeps the item if fastDelete is disabled', () => { Tracker.setParams({ fastDelete: false }); Tracker.reset(); @@ -85,9 +85,9 @@ describe('Tracker', function () { }); }); - describe('custom distance function', function() { - var distanceSpy; - beforeEach(function() { + describe('custom distance function', () => { + let distanceSpy; + beforeEach(() => { distanceSpy = jasmine.createSpy('distance spy', Tracker.iouDistance); Tracker.reset(); @@ -97,30 +97,30 @@ describe('Tracker', function () { }); }); - it('called the custom distance', function() { + it('called the custom distance', () => { expect(distanceSpy).toHaveBeenCalled(); }); }); - describe('distance limit', function() { + describe('distance limit', () => { const d1 = detections[0][0]; const d2 = detections[2][0]; const params = { distanceLimit: 20000 }; - beforeAll(function() { + beforeAll(() => { Tracker.setParams(params); }); - it('is under limit if match successful', function() { + it('is under limit if match successful', () => { expect(Tracker.computeDistance(d1, d2)).toBeLessThanOrEqual(params.distanceLimit); }); - it('is above distance limit if match fails', function() { + it('is above distance limit if match fails', () => { Tracker.setParams({ distanceLimit: params.distanceLimit, - iouLimit: 0.99 + iouLimit: 0.99, }); expect(Tracker.computeDistance(d1, d2)).toBeGreaterThan(params.distanceLimit); - }) + }); }); }); diff --git a/tracker.js b/tracker.js index cfb56ea..dd81f1e 100644 --- a/tracker.js +++ b/tracker.js @@ -1,14 +1,15 @@ const itemTrackedModule = require('./ItemTracked'); -const ItemTracked = itemTrackedModule.ItemTracked; -const kdTree = require('kd-tree-javascript').kdTree; -const isEqual = require('lodash.isequal') -const iouAreas = require('./utils').iouAreas + +const { ItemTracked } = itemTrackedModule; +const { kdTree } = require('kd-tree-javascript'); +const isEqual = require('lodash.isequal'); const munkres = require('munkres-js'); +const { iouAreas } = require('./utils'); const DEBUG_MODE = false; // Distance function -const iouDistance = function(item1, item2) { +const iouDistance = function (item1, item2) { // IOU distance, between 0 and 1 // The smaller the less overlap const iou = iouAreas(item1, item2); @@ -17,12 +18,12 @@ const iouDistance = function(item1, item2) { let distance = 1 - iou; // If the overlap is iou < 0.95, exclude value - if(distance > (1 - params.iouLimit)) { + if (distance > (1 - params.iouLimit)) { distance = params.distanceLimit + 1; } return distance; -} +}; const params = { // DEFAULT_UNMATCHEDFRAMES_TOLERANCE @@ -45,7 +46,7 @@ const params = { // 'kdTree' or 'munkres'. matchingAlgorithm: 'munkres', // matchingAlgorithm: 'kdTree', -} +}; // A dictionary of itemTracked currently tracked // key: uuid @@ -59,25 +60,23 @@ let mapOfAllItemsTracked = new Map(); // By default, we do not keep all the history in memory let keepAllHistoryInMemory = false; - exports.computeDistance = iouDistance; -exports.updateTrackedItemsWithNewFrame = function(detectionsOfThisFrame, frameNb) { - +exports.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameNb) { // A kd-tree containing all the itemtracked // Need to rebuild on each frame, because itemTracked positions have changed - let treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ["x", "y", "w", "h"]); + let treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ['x', 'y', 'w', 'h']); // Contruct a kd tree for the detections of this frame - const treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ["x", "y", "w", "h"]); + const treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ['x', 'y', 'w', 'h']); // SCENARIO 1: itemsTracked map is empty - if(mapOfItemsTracked.size === 0) { + if (mapOfItemsTracked.size === 0) { // Just add every detected item as item Tracked - detectionsOfThisFrame.forEach(function(itemDetected) { - const newItemTracked = new ItemTracked(itemDetected, frameNb, params.unMatchedFramesTolerance, params.fastDelete) + detectionsOfThisFrame.forEach((itemDetected) => { + const newItemTracked = new ItemTracked(itemDetected, frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map - mapOfItemsTracked.set(newItemTracked.id, newItemTracked) + mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree treeItemsTracked.insert(newItemTracked); }); @@ -88,49 +87,49 @@ exports.updateTrackedItemsWithNewFrame = function(detectionsOfThisFrame, frameNb matchedList.fill(false); // Match existing Tracked items with the items detected in the new frame // For each look in the new detection to find the closest match - if(detectionsOfThisFrame.length > 0) { + if (detectionsOfThisFrame.length > 0) { if (params.matchingAlgorithm === 'munkres') { const trackedItemIds = Array.from(mapOfItemsTracked.keys()); - const costMatrix = Array.from(mapOfItemsTracked.values()). - map(itemTracked => { + const costMatrix = Array.from(mapOfItemsTracked.values()) + .map((itemTracked) => { const predictedPosition = itemTracked.predictNextPosition(); return detectionsOfThisFrame.map( - detection => params.distanceFunc(predictedPosition, detection)); + (detection) => params.distanceFunc(predictedPosition, detection), + ); }); - mapOfItemsTracked.forEach(function(itemTracked) { + mapOfItemsTracked.forEach((itemTracked) => { itemTracked.makeAvailable(); }); - munkres(costMatrix). - filter(m => costMatrix[m[0]][m[1]] <= params.distanceLimit). - forEach(m => { + munkres(costMatrix) + .filter((m) => costMatrix[m[0]][m[1]] <= params.distanceLimit) + .forEach((m) => { const itemTracked = mapOfItemsTracked.get(trackedItemIds[m[0]]); const updatedTrackedItemProperties = detectionsOfThisFrame[m[1]]; matchedList[m[1]] = { idDisplay: itemTracked.idDisplay }; - itemTracked. - makeUnavailable(). - update(updatedTrackedItemProperties, frameNb); + itemTracked + .makeUnavailable() + .update(updatedTrackedItemProperties, frameNb); }); - matchedList.forEach(function(matched, index) { + matchedList.forEach((matched, index) => { if (!matched) { - if (Math.min(...costMatrix.map(m => m[index])) > params.distanceLimit) { - const newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete) - mapOfItemsTracked.set(newItemTracked.id, newItemTracked) + if (Math.min(...costMatrix.map((m) => m[index])) > params.distanceLimit) { + const newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); + mapOfItemsTracked.set(newItemTracked.id, newItemTracked); newItemTracked.makeUnavailable(); costMatrix.push(detectionsOfThisFrame.map( - detection => params.distanceFunc(newItemTracked, detection))); + (detection) => params.distanceFunc(newItemTracked, detection), + )); } } }); - } - else if (params.matchingAlgorithm === 'kdTree') { - mapOfItemsTracked.forEach(function(itemTracked) { - + } else if (params.matchingAlgorithm === 'kdTree') { + mapOfItemsTracked.forEach((itemTracked) => { // First predict the new position of the itemTracked - const predictedPosition = itemTracked.predictNextPosition() + const predictedPosition = itemTracked.predictNextPosition(); // Make available for matching itemTracked.makeAvailable(); @@ -144,8 +143,7 @@ exports.updateTrackedItemsWithNewFrame = function(detectionsOfThisFrame, frameNb const treeSearchMultipleResults = treeDetectionsOfThisFrame.nearest(predictedPosition, 2, params.distanceLimit); // If we have found something - if(treeSearchResult) { - + if (treeSearchResult) { // This is an extra refinement that happens in 0.001% of tracked items matching // If IOU overlap is super similar for two potential match, add an extra check // if(treeSearchMultipleResults.length === 2) { @@ -191,26 +189,26 @@ exports.updateTrackedItemsWithNewFrame = function(detectionsOfThisFrame, frameNb // } // } - if(DEBUG_MODE) { - // Assess different results between predition or not - if(!isEqual(treeSearchResult[0], treeSearchResultWithoutPrediction && treeSearchResultWithoutPrediction[0])) { + if (DEBUG_MODE) { + // Assess different results between predition or not + if (!isEqual(treeSearchResult[0], treeSearchResultWithoutPrediction && treeSearchResultWithoutPrediction[0])) { console.log('Making the pre-prediction led to a difference result:'); - console.log('For frame ' + frameNb + ' itemNb ' + itemTracked.idDisplay) + console.log(`For frame ${frameNb} itemNb ${itemTracked.idDisplay}`); } } const indexClosestNewDetectedItem = detectionsOfThisFrame.indexOf(treeSearchResult[0]); // If this detections was not already matched to a tracked item // (otherwise it would be matched to two tracked items...) - if(!matchedList[indexClosestNewDetectedItem]) { + if (!matchedList[indexClosestNewDetectedItem]) { matchedList[indexClosestNewDetectedItem] = { - idDisplay: itemTracked.idDisplay - } + idDisplay: itemTracked.idDisplay, + }; // Update properties of tracked object - const updatedTrackedItemProperties = detectionsOfThisFrame[indexClosestNewDetectedItem] + const updatedTrackedItemProperties = detectionsOfThisFrame[indexClosestNewDetectedItem]; mapOfItemsTracked.get(itemTracked.id) - .makeUnavailable() - .update(updatedTrackedItemProperties, frameNb) + .makeUnavailable() + .update(updatedTrackedItemProperties, frameNb); } else { // Means two already tracked item are concurrent to get assigned a new detections // Rule is to priorize the oldest one to avoid id-reassignment @@ -221,11 +219,11 @@ exports.updateTrackedItemsWithNewFrame = function(detectionsOfThisFrame, frameNb throw `Unknown matching algorithm "${params.matchingAlgorithm}"`; } } else { - if(DEBUG_MODE) { - console.log('[Tracker] Nothing detected for frame nº' + frameNb) + if (DEBUG_MODE) { + console.log(`[Tracker] Nothing detected for frame nº${frameNb}`); } // Make existing tracked item available for deletion (to avoid ghost) - mapOfItemsTracked.forEach(function(itemTracked) { + mapOfItemsTracked.forEach((itemTracked) => { itemTracked.makeAvailable(); }); } @@ -233,20 +231,20 @@ exports.updateTrackedItemsWithNewFrame = function(detectionsOfThisFrame, frameNb if (params.matchingAlgorithm === 'kdTree') { // Add any unmatched items as new trackedItem only if those new items are not too similar // to existing trackedItems this avoids adding some double match of YOLO and bring down drasticly reassignments - if(mapOfItemsTracked.size > 0) { // Safety check to see if we still have object tracked (could have been deleted previously) + if (mapOfItemsTracked.size > 0) { // Safety check to see if we still have object tracked (could have been deleted previously) // Rebuild tracked item tree to take in account the new positions - treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ["x", "y", "w", "h"]); + treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ['x', 'y', 'w', 'h']); // console.log(`Nb new items Unmatched : ${matchedList.filter((isMatched) => isMatched === false).length}`) - matchedList.forEach(function(matched, index) { + matchedList.forEach((matched, index) => { // Iterate through unmatched new detections - if(!matched) { + if (!matched) { // Do not add as new tracked item if it is to similar to an existing one const treeSearchResult = treeItemsTracked.nearest(detectionsOfThisFrame[index], 1, params.distanceLimit)[0]; - if(!treeSearchResult) { - const newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete) + if (!treeSearchResult) { + const newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map - mapOfItemsTracked.set(newItemTracked.id, newItemTracked) + mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree treeItemsTracked.insert(newItemTracked); // Make unvailable @@ -261,69 +259,60 @@ exports.updateTrackedItemsWithNewFrame = function(detectionsOfThisFrame, frameNb // Start killing the itemTracked (and predicting next position) // that are tracked but haven't been matched this frame - mapOfItemsTracked.forEach(function(itemTracked) { - if(itemTracked.available) { + mapOfItemsTracked.forEach((itemTracked) => { + if (itemTracked.available) { itemTracked.countDown(frameNb); itemTracked.updateTheoricalPositionAndSize(); - if(itemTracked.isDead()) { + if (itemTracked.isDead()) { mapOfItemsTracked.delete(itemTracked.id); treeItemsTracked.remove(itemTracked); - if(keepAllHistoryInMemory) { + if (keepAllHistoryInMemory) { mapOfAllItemsTracked.set(itemTracked.id, itemTracked); } } } }); - } -} +}; -exports.reset = function() { +exports.reset = function () { mapOfItemsTracked = new Map(); mapOfAllItemsTracked = new Map(); itemTrackedModule.reset(); -} +}; -exports.setParams = function(newParams) { +exports.setParams = function (newParams) { Object.keys(newParams).forEach((key) => { params[key] = newParams[key]; }); -} +}; -exports.enableKeepInMemory = function() { +exports.enableKeepInMemory = function () { keepAllHistoryInMemory = true; -} +}; -exports.disableKeepInMemory = function() { +exports.disableKeepInMemory = function () { keepAllHistoryInMemory = false; -} +}; -exports.getJSONOfTrackedItems = function(roundInt = true) { - return Array.from(mapOfItemsTracked.values()).map(function(itemTracked) { - return itemTracked.toJSON(roundInt); - }); +exports.getJSONOfTrackedItems = function (roundInt = true) { + return Array.from(mapOfItemsTracked.values()).map((itemTracked) => itemTracked.toJSON(roundInt)); }; -exports.getJSONDebugOfTrackedItems = function(roundInt = true) { - return Array.from(mapOfItemsTracked.values()).map(function(itemTracked) { - return itemTracked.toJSONDebug(roundInt); - }); +exports.getJSONDebugOfTrackedItems = function (roundInt = true) { + return Array.from(mapOfItemsTracked.values()).map((itemTracked) => itemTracked.toJSONDebug(roundInt)); }; -exports.getTrackedItemsInMOTFormat = function(frameNb) { - return Array.from(mapOfItemsTracked.values()).map(function(itemTracked) { - return itemTracked.toMOT(frameNb); - }); +exports.getTrackedItemsInMOTFormat = function (frameNb) { + return Array.from(mapOfItemsTracked.values()).map((itemTracked) => itemTracked.toMOT(frameNb)); }; // Work only if keepInMemory is enabled -exports.getAllTrackedItems = function() { +exports.getAllTrackedItems = function () { return mapOfAllItemsTracked; }; // Work only if keepInMemory is enabled -exports.getJSONOfAllTrackedItems = function() { - return Array.from(mapOfAllItemsTracked.values()).map(function(itemTracked) { - return itemTracked.toJSONGenericInfo(); - }); +exports.getJSONOfAllTrackedItems = function () { + return Array.from(mapOfAllItemsTracked.values()).map((itemTracked) => itemTracked.toJSONGenericInfo()); }; diff --git a/utils.js b/utils.js index fd166a1..e2630fa 100644 --- a/utils.js +++ b/utils.js @@ -1,125 +1,109 @@ -exports.isDetectionTooLarge = (detections, largestAllowed) => { - if(detections.w >= largestAllowed) { - return true; - } else { - return false; - } -} - -const isInsideArea = (area, point) => { - const xMin = area.x - area.w / 2; - const xMax = area.x + area.w / 2; - const yMin = area.y - area.h / 2; - const yMax = area.y + area.h / 2; - - if(point.x >= xMin && - point.x <= xMax && - point.y >= yMin && - point.y <= yMax) { - return true; - } else { - return false; - } -} - -exports.isInsideArea = isInsideArea; - -exports.isInsideSomeAreas = (areas, point) => { - const isInside = areas.some((area) => isInsideArea(area, point)); - return isInside; -} - -exports.ignoreObjectsNotToDetect = (detections, objectsToDetect) => { - return detections.filter((detection) => objectsToDetect.indexOf(detection.name) > -1) -} - -const getRectangleEdges = (item) => { - return { - x0: item.x - item.w / 2, - y0: item.y - item.h / 2, - x1: item.x + item.w / 2, - y1: item.y + item.h / 2, - } -} - -exports.getRectangleEdges = getRectangleEdges; - -exports.iouAreas = (item1, item2) => { - - const rect1 = getRectangleEdges(item1); - const rect2 = getRectangleEdges(item2); - - // Get overlap rectangle - const overlap_x0 = Math.max(rect1.x0, rect2.x0) - const overlap_y0 = Math.max(rect1.y0, rect2.y0) - const overlap_x1 = Math.min(rect1.x1, rect2.x1) - const overlap_y1 = Math.min(rect1.y1, rect2.y1) - - // if there an overlap - if((overlap_x1 - overlap_x0) <= 0 || (overlap_y1 - overlap_y0) <= 0) { - // no overlap - return 0 - } else { - const area_rect1 = item1.w * item1.h - const area_rect2 = item2.w * item2.h - const area_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0) - const area_union = area_rect1 + area_rect2 - area_intersection - return area_intersection / area_union - } -} - - -exports.computeVelocityVector = (item1, item2, nbFrame) => { - return { - dx: (item2.x - item1.x) / nbFrame, - dy: (item2.y - item1.y) / nbFrame, - } -} - -/* - - computeBearingIn360 - - dY - - ^ XX - | XXX - | XX - | XX - | XX - | XXX - | XX - | XX - | XX bearing = this angle in degree - | XX - |XX -+----------------------XX-----------------------> dX - | - | - | - | - | - | - | - | - | - | - | - + - -*/ - -exports.computeBearingIn360 = function(dx,dy) { - const angle = Math.atan(dx/dy)/(Math.PI/180) - if ( angle > 0 ) { - if (dy > 0) - return angle; - else - return 180 + angle; - } else { - if (dx > 0) - return 180 + angle; - else - return 360 + angle; - } -} +exports.isDetectionTooLarge = (detections, largestAllowed) => { + if (detections.w >= largestAllowed) { + return true; + } + return false; +}; + +const isInsideArea = (area, point) => { + const xMin = area.x - area.w / 2; + const xMax = area.x + area.w / 2; + const yMin = area.y - area.h / 2; + const yMax = area.y + area.h / 2; + + if (point.x >= xMin + && point.x <= xMax + && point.y >= yMin + && point.y <= yMax) { + return true; + } + return false; +}; + +exports.isInsideArea = isInsideArea; + +exports.isInsideSomeAreas = (areas, point) => { + const isInside = areas.some((area) => isInsideArea(area, point)); + return isInside; +}; + +exports.ignoreObjectsNotToDetect = (detections, objectsToDetect) => detections.filter((detection) => objectsToDetect.indexOf(detection.name) > -1); + +const getRectangleEdges = (item) => ({ + x0: item.x - item.w / 2, + y0: item.y - item.h / 2, + x1: item.x + item.w / 2, + y1: item.y + item.h / 2, +}); + +exports.getRectangleEdges = getRectangleEdges; + +exports.iouAreas = (item1, item2) => { + const rect1 = getRectangleEdges(item1); + const rect2 = getRectangleEdges(item2); + + // Get overlap rectangle + const overlap_x0 = Math.max(rect1.x0, rect2.x0); + const overlap_y0 = Math.max(rect1.y0, rect2.y0); + const overlap_x1 = Math.min(rect1.x1, rect2.x1); + const overlap_y1 = Math.min(rect1.y1, rect2.y1); + + // if there an overlap + if ((overlap_x1 - overlap_x0) <= 0 || (overlap_y1 - overlap_y0) <= 0) { + // no overlap + return 0; + } + const area_rect1 = item1.w * item1.h; + const area_rect2 = item2.w * item2.h; + const area_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0); + const area_union = area_rect1 + area_rect2 - area_intersection; + return area_intersection / area_union; +}; + +exports.computeVelocityVector = (item1, item2, nbFrame) => ({ + dx: (item2.x - item1.x) / nbFrame, + dy: (item2.y - item1.y) / nbFrame, +}); + +/* + + computeBearingIn360 + + dY + + ^ XX + | XXX + | XX + | XX + | XX + | XXX + | XX + | XX + | XX bearing = this angle in degree + | XX + |XX ++----------------------XX-----------------------> dX + | + | + | + | + | + | + | + | + | + | + | + + + +*/ + +exports.computeBearingIn360 = function (dx, dy) { + const angle = Math.atan(dx / dy) / (Math.PI / 180); + if (angle > 0) { + if (dy > 0) { return angle; } + return 180 + angle; + } + if (dx > 0) { return 180 + angle; } + return 360 + angle; +}; From bd96eeb6f0b673cf559330355dd585496a0a80b0 Mon Sep 17 00:00:00 2001 From: Dmytro Kushnir Date: Mon, 3 Oct 2022 19:22:20 +0300 Subject: [PATCH 08/11] Add support for IIFE bundle, revert uuid to get polyfill Co-authored-by: Dmytro Kushnir --- ItemTracked.js | 2 +- bundle.cjs.js | 1357 +++++++++------- bundle.iife.js | 3569 +++++++++++++++++++++++++++++++++++++++++ package-lock.json | 16 +- package.json | 7 +- rollup.iife.config.js | 21 + 6 files changed, 4360 insertions(+), 612 deletions(-) create mode 100644 bundle.iife.js create mode 100644 rollup.iife.config.js diff --git a/ItemTracked.js b/ItemTracked.js index 5de224c..03d0d1e 100644 --- a/ItemTracked.js +++ b/ItemTracked.js @@ -1,4 +1,4 @@ -const { v4: uuidv4 } = require('uuid'); +var uuidv4 = require('uuid/v4'); const { computeBearingIn360 } = require('./utils'); const { computeVelocityVector } = require('./utils'); diff --git a/bundle.cjs.js b/bundle.cjs.js index 2d8d518..95f175e 100644 --- a/bundle.cjs.js +++ b/bundle.cjs.js @@ -1,3 +1,5 @@ +'use strict'; + Object.defineProperty(exports, '__esModule', { value: true }); function _toConsumableArray(arr) { @@ -9,16 +11,16 @@ function _arrayWithoutHoles(arr) { } function _iterableToArray(iter) { - if (typeof Symbol !== 'undefined' && iter[Symbol.iterator] != null || iter['@@iterator'] != null) return Array.from(iter); + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; - if (typeof o === 'string') return _arrayLikeToArray(o, minLen); - let n = Object.prototype.toString.call(o).slice(8, -1); - if (n === 'Object' && o.constructor) n = o.constructor.name; - if (n === 'Map' || n === 'Set') return Array.from(o); - if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { @@ -30,29 +32,30 @@ function _arrayLikeToArray(arr, len) { } function _nonIterableSpread() { - throw new TypeError('Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'); + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -const commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; +var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; -const tracker = {}; +var tracker = {}; -const ItemTracked$1 = {}; +var ItemTracked$1 = {}; -const commonjsBrowser = {}; +var commonjsBrowser = {}; -const v1$1 = {}; +var v1$1 = {}; -const rng$1 = {}; +var rng$1 = {}; -Object.defineProperty(rng$1, '__esModule', { - value: true, +Object.defineProperty(rng$1, "__esModule", { + value: true }); rng$1.default = rng; // Unique ID creation requires a high quality random # generator. In the browser we therefore // require the crypto API and do not support built-in fallback to lower quality random number // generators (like Math.random()). + let getRandomValues; const rnds8 = new Uint8Array(16); @@ -70,29 +73,29 @@ function rng() { return getRandomValues(rnds8); } -const stringify$1 = {}; +var stringify$1 = {}; -const validate$1 = {}; +var validate$1 = {}; -const regex = {}; +var regex = {}; -Object.defineProperty(regex, '__esModule', { - value: true, +Object.defineProperty(regex, "__esModule", { + value: true }); regex.default = void 0; -const _default$c = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; +var _default$c = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; regex.default = _default$c; -Object.defineProperty(validate$1, '__esModule', { - value: true, +Object.defineProperty(validate$1, "__esModule", { + value: true }); validate$1.default = void 0; -const _regex = _interopRequireDefault$8(regex); +var _regex = _interopRequireDefault$8(regex); function _interopRequireDefault$8(obj) { return obj && obj.__esModule ? obj : { - default: obj, + default: obj }; } @@ -100,20 +103,20 @@ function validate(uuid) { return typeof uuid === 'string' && _regex.default.test(uuid); } -const _default$b = validate; +var _default$b = validate; validate$1.default = _default$b; -Object.defineProperty(stringify$1, '__esModule', { - value: true, +Object.defineProperty(stringify$1, "__esModule", { + value: true }); stringify$1.default = void 0; stringify$1.unsafeStringify = unsafeStringify; -const _validate$2 = _interopRequireDefault$7(validate$1); +var _validate$2 = _interopRequireDefault$7(validate$1); function _interopRequireDefault$7(obj) { return obj && obj.__esModule ? obj : { - default: obj, + default: obj }; } /** @@ -121,6 +124,7 @@ function _interopRequireDefault$7(obj) { * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX */ + const byteToHex = []; for (let i = 0; i < 256; ++i) { @@ -130,7 +134,7 @@ for (let i = 0; i < 256; ++i) { function unsafeStringify(arr, offset = 0) { // Note: Be careful editing this code! It's been tuned for performance // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - return (`${byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]]}-${byteToHex[arr[offset + 4]]}${byteToHex[arr[offset + 5]]}-${byteToHex[arr[offset + 6]]}${byteToHex[arr[offset + 7]]}-${byteToHex[arr[offset + 8]]}${byteToHex[arr[offset + 9]]}-${byteToHex[arr[offset + 10]]}${byteToHex[arr[offset + 11]]}${byteToHex[arr[offset + 12]]}${byteToHex[arr[offset + 13]]}${byteToHex[arr[offset + 14]]}${byteToHex[arr[offset + 15]]}`).toLowerCase(); + return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); } function stringify(arr, offset = 0) { @@ -147,31 +151,33 @@ function stringify(arr, offset = 0) { return uuid; } -const _default$a = stringify; +var _default$a = stringify; stringify$1.default = _default$a; -Object.defineProperty(v1$1, '__esModule', { - value: true, +Object.defineProperty(v1$1, "__esModule", { + value: true }); v1$1.default = void 0; -const _rng$1 = _interopRequireDefault$6(rng$1); +var _rng$1 = _interopRequireDefault$6(rng$1); -const _stringify$2 = stringify$1; +var _stringify$2 = stringify$1; function _interopRequireDefault$6(obj) { return obj && obj.__esModule ? obj : { - default: obj, + default: obj }; } // **`v1()` - Generate time-based UUID** // // Inspired by https://github.com/LiosK/UUID.js // and http://docs.python.org/library/uuid.html + let _nodeId; let _clockseq; // Previous uuid creation time + let _lastMSecs = 0; let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details @@ -201,6 +207,7 @@ function v1(options, buf, offset) { // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock // cycle to simulate higher resolution clock @@ -213,10 +220,12 @@ function v1(options, buf, offset) { } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new // time interval + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { nsecs = 0; } // Per 4.2.1.2 Throw error if too many uuids are requested + if (nsecs >= 10000) { throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); } @@ -252,25 +261,25 @@ function v1(options, buf, offset) { return buf || (0, _stringify$2.unsafeStringify)(b); } -const _default$9 = v1; +var _default$9 = v1; v1$1.default = _default$9; -const v3$1 = {}; +var v3$1 = {}; -const v35$1 = {}; +var v35$1 = {}; -const parse$1 = {}; +var parse$1 = {}; -Object.defineProperty(parse$1, '__esModule', { - value: true, +Object.defineProperty(parse$1, "__esModule", { + value: true }); parse$1.default = void 0; -const _validate$1 = _interopRequireDefault$5(validate$1); +var _validate$1 = _interopRequireDefault$5(validate$1); function _interopRequireDefault$5(obj) { return obj && obj.__esModule ? obj : { - default: obj, + default: obj }; } @@ -306,23 +315,23 @@ function parse(uuid) { return arr; } -const _default$8 = parse; +var _default$8 = parse; parse$1.default = _default$8; -Object.defineProperty(v35$1, '__esModule', { - value: true, +Object.defineProperty(v35$1, "__esModule", { + value: true }); v35$1.URL = v35$1.DNS = void 0; v35$1.default = v35; -const _stringify$1 = stringify$1; +var _stringify$1 = stringify$1; -const _parse = _interopRequireDefault$4(parse$1); +var _parse = _interopRequireDefault$4(parse$1); function _interopRequireDefault$4(obj) { return obj && obj.__esModule ? obj : { - default: obj, + default: obj }; } @@ -345,7 +354,7 @@ v35$1.URL = URL; function v35(name, version, hashfunc) { function generateUUID(value, namespace, buf, offset) { - let _namespace; + var _namespace; if (typeof value === 'string') { value = stringToBytes(value); @@ -361,6 +370,7 @@ function v35(name, version, hashfunc) { // Future: Use spread syntax when supported on all platforms, e.g. `bytes = // hashfunc([...namespace, ... value])` + let bytes = new Uint8Array(16 + value.length); bytes.set(namespace); bytes.set(value, namespace.length); @@ -381,19 +391,21 @@ function v35(name, version, hashfunc) { return (0, _stringify$1.unsafeStringify)(bytes); } // Function#name is not settable on some platforms (#270) + try { generateUUID.name = name; // eslint-disable-next-line no-empty } catch (err) {} // For CommonJS default export support + generateUUID.DNS = DNS; generateUUID.URL = URL; return generateUUID; } -const md5$1 = {}; +var md5$1 = {}; -Object.defineProperty(md5$1, '__esModule', { - value: true, +Object.defineProperty(md5$1, "__esModule", { + value: true }); md5$1.default = void 0; /* @@ -434,6 +446,7 @@ function md5(bytes) { * Convert an array of little-endian words to an array of bytes */ + function md5ToHexEncodedArray(input) { const output = []; const length32 = input.length * 32; @@ -451,6 +464,7 @@ function md5ToHexEncodedArray(input) { * Calculate output length with padding and bit length */ + function getOutputLength(inputLength8) { return (inputLength8 + 64 >>> 9 << 4) + 14 + 1; } @@ -458,6 +472,7 @@ function getOutputLength(inputLength8) { * Calculate the MD5 of an array of little-endian words, and a bit length. */ + function wordsToMd5(x, len) { /* append padding */ x[len >> 5] |= 0x80 << len % 32; @@ -549,6 +564,7 @@ function wordsToMd5(x, len) { * Characters >255 have their high-byte silently ignored. */ + function bytesToWords(input) { if (input.length === 0) { return []; @@ -568,6 +584,7 @@ function bytesToWords(input) { * to work around bugs in some JS interpreters. */ + function safeAdd(x, y) { const lsw = (x & 0xffff) + (y & 0xffff); const msw = (x >> 16) + (y >> 16) + (lsw >> 16); @@ -577,6 +594,7 @@ function safeAdd(x, y) { * Bitwise rotate a 32-bit number to the left. */ + function bitRotateLeft(num, cnt) { return num << cnt | num >>> 32 - cnt; } @@ -584,6 +602,7 @@ function bitRotateLeft(num, cnt) { * These functions implement the four basic operations the algorithm uses. */ + function md5cmn(q, a, b, x, s, t) { return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); } @@ -604,56 +623,56 @@ function md5ii(a, b, c, d, x, s, t) { return md5cmn(c ^ (b | ~d), a, b, x, s, t); } -const _default$7 = md5; +var _default$7 = md5; md5$1.default = _default$7; -Object.defineProperty(v3$1, '__esModule', { - value: true, +Object.defineProperty(v3$1, "__esModule", { + value: true }); v3$1.default = void 0; -const _v$1 = _interopRequireDefault$3(v35$1); +var _v$1 = _interopRequireDefault$3(v35$1); -const _md = _interopRequireDefault$3(md5$1); +var _md = _interopRequireDefault$3(md5$1); function _interopRequireDefault$3(obj) { return obj && obj.__esModule ? obj : { - default: obj, + default: obj }; } const v3 = (0, _v$1.default)('v3', 0x30, _md.default); -const _default$6 = v3; +var _default$6 = v3; v3$1.default = _default$6; -const v4$1 = {}; +var v4$1 = {}; -const native = {}; +var native = {}; -Object.defineProperty(native, '__esModule', { - value: true, +Object.defineProperty(native, "__esModule", { + value: true }); native.default = void 0; const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto); -const _default$5 = { - randomUUID, +var _default$5 = { + randomUUID }; native.default = _default$5; -Object.defineProperty(v4$1, '__esModule', { - value: true, +Object.defineProperty(v4$1, "__esModule", { + value: true }); v4$1.default = void 0; -const _native = _interopRequireDefault$2(native); +var _native = _interopRequireDefault$2(native); -const _rng = _interopRequireDefault$2(rng$1); +var _rng = _interopRequireDefault$2(rng$1); -const _stringify = stringify$1; +var _stringify = stringify$1; function _interopRequireDefault$2(obj) { return obj && obj.__esModule ? obj : { - default: obj, + default: obj }; } @@ -666,6 +685,7 @@ function v4(options, buf, offset) { const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = rnds[6] & 0x0f | 0x40; rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided @@ -682,15 +702,15 @@ function v4(options, buf, offset) { return (0, _stringify.unsafeStringify)(rnds); } -const _default$4 = v4; +var _default$4 = v4; v4$1.default = _default$4; -const v5$1 = {}; +var v5$1 = {}; -const sha1$1 = {}; +var sha1$1 = {}; -Object.defineProperty(sha1$1, '__esModule', { - value: true, +Object.defineProperty(sha1$1, "__esModule", { + value: true }); sha1$1.default = void 0; // Adapted from Chris Veness' SHA1 code at // http://www.movable-type.co.uk/scripts/sha1.html @@ -747,7 +767,7 @@ function sha1(bytes) { M[i] = arr; } - M[N - 1][14] = (bytes.length - 1) * 8 / 2 ** 32; + M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32); M[N - 1][14] = Math.floor(M[N - 1][14]); M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff; @@ -788,49 +808,49 @@ function sha1(bytes) { return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff]; } -const _default$3 = sha1; +var _default$3 = sha1; sha1$1.default = _default$3; -Object.defineProperty(v5$1, '__esModule', { - value: true, +Object.defineProperty(v5$1, "__esModule", { + value: true }); v5$1.default = void 0; -const _v = _interopRequireDefault$1(v35$1); +var _v = _interopRequireDefault$1(v35$1); -const _sha = _interopRequireDefault$1(sha1$1); +var _sha = _interopRequireDefault$1(sha1$1); function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { - default: obj, + default: obj }; } const v5 = (0, _v.default)('v5', 0x50, _sha.default); -const _default$2 = v5; +var _default$2 = v5; v5$1.default = _default$2; -const nil = {}; +var nil = {}; -Object.defineProperty(nil, '__esModule', { - value: true, +Object.defineProperty(nil, "__esModule", { + value: true }); nil.default = void 0; -const _default$1 = '00000000-0000-0000-0000-000000000000'; +var _default$1 = '00000000-0000-0000-0000-000000000000'; nil.default = _default$1; -const version$1 = {}; +var version$1 = {}; -Object.defineProperty(version$1, '__esModule', { - value: true, +Object.defineProperty(version$1, "__esModule", { + value: true }); version$1.default = void 0; -const _validate = _interopRequireDefault(validate$1); +var _validate = _interopRequireDefault(validate$1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { - default: obj, + default: obj }; } @@ -842,66 +862,67 @@ function version(uuid) { return parseInt(uuid.slice(14, 15), 16); } -const _default = version; +var _default = version; version$1.default = _default; (function (exports) { - Object.defineProperty(exports, '__esModule', { - value: true, + + Object.defineProperty(exports, "__esModule", { + value: true }); - Object.defineProperty(exports, 'NIL', { + Object.defineProperty(exports, "NIL", { enumerable: true, get: function get() { return _nil.default; - }, + } }); - Object.defineProperty(exports, 'parse', { + Object.defineProperty(exports, "parse", { enumerable: true, get: function get() { return _parse.default; - }, + } }); - Object.defineProperty(exports, 'stringify', { + Object.defineProperty(exports, "stringify", { enumerable: true, get: function get() { return _stringify.default; - }, + } }); - Object.defineProperty(exports, 'v1', { + Object.defineProperty(exports, "v1", { enumerable: true, get: function get() { return _v.default; - }, + } }); - Object.defineProperty(exports, 'v3', { + Object.defineProperty(exports, "v3", { enumerable: true, get: function get() { return _v2.default; - }, + } }); - Object.defineProperty(exports, 'v4', { + Object.defineProperty(exports, "v4", { enumerable: true, get: function get() { return _v3.default; - }, + } }); - Object.defineProperty(exports, 'v5', { + Object.defineProperty(exports, "v5", { enumerable: true, get: function get() { return _v4.default; - }, + } }); - Object.defineProperty(exports, 'validate', { + Object.defineProperty(exports, "validate", { enumerable: true, get: function get() { return _validate.default; - }, + } }); - Object.defineProperty(exports, 'version', { + Object.defineProperty(exports, "version", { enumerable: true, get: function get() { return _version.default; - }, + } }); var _v = _interopRequireDefault(v1$1); @@ -924,78 +945,85 @@ version$1.default = _default; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { - default: obj, + default: obj }; } -}(commonjsBrowser)); +})(commonjsBrowser); -const utils = {}; +var utils = {}; utils.isDetectionTooLarge = function (detections, largestAllowed) { if (detections.w >= largestAllowed) { return true; } + return false; }; -const isInsideArea = function isInsideArea(area, point) { - const xMin = area.x - area.w / 2; - const xMax = area.x + area.w / 2; - const yMin = area.y - area.h / 2; - const yMax = area.y + area.h / 2; +var isInsideArea = function isInsideArea(area, point) { + var xMin = area.x - area.w / 2; + var xMax = area.x + area.w / 2; + var yMin = area.y - area.h / 2; + var yMax = area.y + area.h / 2; if (point.x >= xMin && point.x <= xMax && point.y >= yMin && point.y <= yMax) { return true; } + return false; }; utils.isInsideArea = isInsideArea; utils.isInsideSomeAreas = function (areas, point) { - const isInside = areas.some((area) => isInsideArea(area, point)); + var isInside = areas.some(function (area) { + return isInsideArea(area, point); + }); return isInside; }; utils.ignoreObjectsNotToDetect = function (detections, objectsToDetect) { - return detections.filter((detection) => objectsToDetect.indexOf(detection.name) > -1); + return detections.filter(function (detection) { + return objectsToDetect.indexOf(detection.name) > -1; + }); }; -const getRectangleEdges = function getRectangleEdges(item) { +var getRectangleEdges = function getRectangleEdges(item) { return { x0: item.x - item.w / 2, y0: item.y - item.h / 2, x1: item.x + item.w / 2, - y1: item.y + item.h / 2, + y1: item.y + item.h / 2 }; }; utils.getRectangleEdges = getRectangleEdges; utils.iouAreas = function (item1, item2) { - const rect1 = getRectangleEdges(item1); - const rect2 = getRectangleEdges(item2); // Get overlap rectangle + var rect1 = getRectangleEdges(item1); + var rect2 = getRectangleEdges(item2); // Get overlap rectangle - const overlap_x0 = Math.max(rect1.x0, rect2.x0); - const overlap_y0 = Math.max(rect1.y0, rect2.y0); - const overlap_x1 = Math.min(rect1.x1, rect2.x1); - const overlap_y1 = Math.min(rect1.y1, rect2.y1); // if there an overlap + var overlap_x0 = Math.max(rect1.x0, rect2.x0); + var overlap_y0 = Math.max(rect1.y0, rect2.y0); + var overlap_x1 = Math.min(rect1.x1, rect2.x1); + var overlap_y1 = Math.min(rect1.y1, rect2.y1); // if there an overlap if (overlap_x1 - overlap_x0 <= 0 || overlap_y1 - overlap_y0 <= 0) { // no overlap return 0; } - const area_rect1 = item1.w * item1.h; - const area_rect2 = item2.w * item2.h; - const area_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0); - const area_union = area_rect1 + area_rect2 - area_intersection; + + var area_rect1 = item1.w * item1.h; + var area_rect2 = item2.w * item2.h; + var area_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0); + var area_union = area_rect1 + area_rect2 - area_intersection; return area_intersection / area_union; }; utils.computeVelocityVector = function (item1, item2, nbFrame) { return { dx: (item2.x - item1.x) / nbFrame, - dy: (item2.y - item1.y) / nbFrame, + dy: (item2.y - item1.y) / nbFrame }; }; /* @@ -1031,19 +1059,29 @@ utils.computeVelocityVector = function (item1, item2, nbFrame) { */ + utils.computeBearingIn360 = function (dx, dy) { - const angle = Math.atan(dx / dy) / (Math.PI / 180); + var angle = Math.atan(dx / dy) / (Math.PI / 180); if (angle > 0) { - if (dy > 0) return angle; return 180 + angle; + if (dy > 0) { + return angle; + } + + return 180 + angle; } - if (dx > 0) return 180 + angle; return 360 + angle; + + if (dx > 0) { + return 180 + angle; + } + + return 360 + angle; }; (function (exports) { - const uuidv4 = commonjsBrowser.v4; - const { computeBearingIn360 } = utils; - const { computeVelocityVector } = utils; // Properties example + var uuidv4 = commonjsBrowser.v4; + var computeBearingIn360 = utils.computeBearingIn360; + var computeVelocityVector = utils.computeVelocityVector; // Properties example // { // "x": 1021, // "y": 65, @@ -1057,16 +1095,16 @@ utils.computeBearingIn360 = function (dx, dy) { exports.ITEM_HISTORY_MAX_LENGTH = 15; // Use a simple incremental unique id for the display - let idDisplay = 0; + var idDisplay = 0; exports.ItemTracked = function (properties, frameNb, unMatchedFramesTolerance, fastDelete) { - const DEFAULT_UNMATCHEDFRAMES_TOLERANCE = unMatchedFramesTolerance; - const itemTracked = {}; // ==== Private ===== + var DEFAULT_UNMATCHEDFRAMES_TOLERANCE = unMatchedFramesTolerance; + var itemTracked = {}; // ==== Private ===== // Am I available to be matched? itemTracked.available = true; // Should I be deleted? - itemTracked.delete = false; + itemTracked["delete"] = false; itemTracked.fastDelete = fastDelete; // How many unmatched frame should I survive? itemTracked.frameUnmatchedLeftBeforeDying = unMatchedFramesTolerance; @@ -1090,7 +1128,7 @@ utils.computeBearingIn360 = function (dx, dy) { y: properties.y, w: properties.w, h: properties.h, - confidence: properties.confidence, + confidence: properties.confidence }); if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { @@ -1099,7 +1137,7 @@ utils.computeBearingIn360 = function (dx, dy) { itemTracked.velocity = { dx: 0, - dy: 0, + dy: 0 }; itemTracked.nbTimeMatched = 1; // Assign an unique id to each Item tracked @@ -1127,7 +1165,7 @@ utils.computeBearingIn360 = function (dx, dy) { y: this.y, w: this.w, h: this.h, - confidence: this.confidence, + confidence: this.confidence }); if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { @@ -1142,6 +1180,7 @@ utils.computeBearingIn360 = function (dx, dy) { this.nameCount[properties.name] = 1; } // Reset dying counter + this.frameUnmatchedLeftBeforeDying = DEFAULT_UNMATCHEDFRAMES_TOLERANCE; // Compute new velocityVector based on last positions history this.velocity = this.updateVelocityVector(); @@ -1165,7 +1204,7 @@ utils.computeBearingIn360 = function (dx, dy) { x: this.x, y: this.y, w: this.w, - h: this.h, + h: this.h }; } @@ -1183,7 +1222,7 @@ utils.computeBearingIn360 = function (dx, dy) { y: this.y, w: this.w, h: this.h, - confidence: this.confidence, + confidence: this.confidence }); if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { @@ -1199,7 +1238,7 @@ utils.computeBearingIn360 = function (dx, dy) { x: this.x + this.velocity.dx, y: this.y + this.velocity.dy, w: this.w, - h: this.h, + h: this.h }; }; @@ -1207,30 +1246,32 @@ utils.computeBearingIn360 = function (dx, dy) { return this.frameUnmatchedLeftBeforeDying < 0; }; // Velocity vector based on the last 15 frames + itemTracked.updateVelocityVector = function () { if (exports.ITEM_HISTORY_MAX_LENGTH <= 2) { return { dx: undefined, - dy: undefined, + dy: undefined }; } if (this.itemHistory.length <= exports.ITEM_HISTORY_MAX_LENGTH) { - const start = this.itemHistory[0]; - const end = this.itemHistory[this.itemHistory.length - 1]; - return computeVelocityVector(start, end, this.itemHistory.length); + var _start = this.itemHistory[0]; + var _end = this.itemHistory[this.itemHistory.length - 1]; + return computeVelocityVector(_start, _end, this.itemHistory.length); } - const _start = this.itemHistory[this.itemHistory.length - exports.ITEM_HISTORY_MAX_LENGTH]; - const _end = this.itemHistory[this.itemHistory.length - 1]; - return computeVelocityVector(_start, _end, exports.ITEM_HISTORY_MAX_LENGTH); + + var start = this.itemHistory[this.itemHistory.length - exports.ITEM_HISTORY_MAX_LENGTH]; + var end = this.itemHistory[this.itemHistory.length - 1]; + return computeVelocityVector(start, end, exports.ITEM_HISTORY_MAX_LENGTH); }; itemTracked.getMostlyMatchedName = function () { - const _this = this; + var _this = this; - let nameMostlyMatchedOccurences = 0; - let nameMostlyMatched = ''; - Object.keys(this.nameCount).map((name) => { + var nameMostlyMatchedOccurences = 0; + var nameMostlyMatched = ''; + Object.keys(this.nameCount).map(function (name) { if (_this.nameCount[name] > nameMostlyMatchedOccurences) { nameMostlyMatched = name; nameMostlyMatchedOccurences = _this.nameCount[name]; @@ -1240,7 +1281,7 @@ utils.computeBearingIn360 = function (dx, dy) { }; itemTracked.toJSONDebug = function () { - const roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; return { id: this.id, idDisplay: this.idDisplay, @@ -1254,12 +1295,12 @@ utils.computeBearingIn360 = function (dx, dy) { name: this.getMostlyMatchedName(), isZombie: this.isZombie, appearFrame: this.appearFrame, - disappearFrame: this.disappearFrame, + disappearFrame: this.disappearFrame }; }; itemTracked.toJSON = function () { - const roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; return { id: this.idDisplay, x: roundInt ? parseInt(this.x, 10) : this.x, @@ -1270,15 +1311,12 @@ utils.computeBearingIn360 = function (dx, dy) { // Here we negate dy to be in "normal" carthesian coordinates bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy), 10), name: this.getMostlyMatchedName(), - isZombie: this.isZombie, + isZombie: this.isZombie }; }; itemTracked.toMOT = function (frameIndex) { - return ''.concat(frameIndex, ',').concat(this.idDisplay, ',').concat(this.x - this.w / 2, ',').concat(this.y - this.h / 2, ',') - .concat(this.w, ',') - .concat(this.h, ',') - .concat(this.confidence / 100, ',-1,-1,-1'); + return "".concat(frameIndex, ",").concat(this.idDisplay, ",").concat(this.x - this.w / 2, ",").concat(this.y - this.h / 2, ",").concat(this.w, ",").concat(this.h, ",").concat(this.confidence / 100, ",-1,-1,-1"); }; itemTracked.toJSONGenericInfo = function () { @@ -1289,7 +1327,7 @@ utils.computeBearingIn360 = function (dx, dy) { disappearFrame: this.disappearFrame, disappearArea: this.disappearArea, nbActiveFrame: this.disappearFrame - this.appearFrame, - name: this.getMostlyMatchedName(), + name: this.getMostlyMatchedName() }; }; @@ -1299,9 +1337,9 @@ utils.computeBearingIn360 = function (dx, dy) { exports.reset = function () { idDisplay = 0; }; -}(ItemTracked$1)); +})(ItemTracked$1); -const kdTreeMin = {}; +var kdTreeMin = {}; /** * k-d Tree JavaScript - V 1.01 @@ -1315,9 +1353,9 @@ const kdTreeMin = {}; */ (function (exports) { - !(function (t, n) { - n(exports); - }(commonjsGlobal, (t) => { + !function (t, n) { + n(exports ); + }(commonjsGlobal, function (t) { function n(t, n, o) { this.obj = t, this.left = null, this.right = null, this.parent = o, this.dimension = n; } @@ -1327,154 +1365,153 @@ const kdTreeMin = {}; } o.prototype = { - push(t) { + push: function (t) { this.content.push(t), this.bubbleUp(this.content.length - 1); }, - pop() { - const t = this.content[0]; - const n = this.content.pop(); + pop: function () { + var t = this.content[0], + n = this.content.pop(); return this.content.length > 0 && (this.content[0] = n, this.sinkDown(0)), t; }, - peek() { + peek: function () { return this.content[0]; }, - remove(t) { - for (let n = this.content.length, o = 0; o < n; o++) { - if (this.content[o] == t) { - const i = this.content.pop(); - return void (o != n - 1 && (this.content[o] = i, this.scoreFunction(i) < this.scoreFunction(t) ? this.bubbleUp(o) : this.sinkDown(o))); - } + remove: function (t) { + for (var n = this.content.length, o = 0; o < n; o++) if (this.content[o] == t) { + var i = this.content.pop(); + return void (o != n - 1 && (this.content[o] = i, this.scoreFunction(i) < this.scoreFunction(t) ? this.bubbleUp(o) : this.sinkDown(o))); } - throw new Error('Node not found.'); + throw new Error("Node not found."); }, - size() { + size: function () { return this.content.length; }, - bubbleUp(t) { - for (let n = this.content[t]; t > 0;) { - const o = Math.floor((t + 1) / 2) - 1; - const i = this.content[o]; + bubbleUp: function (t) { + for (var n = this.content[t]; t > 0;) { + var o = Math.floor((t + 1) / 2) - 1, + i = this.content[o]; if (!(this.scoreFunction(n) < this.scoreFunction(i))) break; this.content[o] = n, this.content[t] = i, t = o; } }, - sinkDown(t) { - for (let n = this.content.length, o = this.content[t], i = this.scoreFunction(o); ;) { - const e = 2 * (t + 1); - const r = e - 1; - let l = null; + sinkDown: function (t) { + for (var n = this.content.length, o = this.content[t], i = this.scoreFunction(o);;) { + var e = 2 * (t + 1), + r = e - 1, + l = null; if (r < n) { - const u = this.content[r]; - var h = this.scoreFunction(u); + var u = this.content[r], + h = this.scoreFunction(u); h < i && (l = r); } if (e < n) { - const s = this.content[e]; - this.scoreFunction(s) < (l == null ? i : h) && (l = e); + var s = this.content[e]; + this.scoreFunction(s) < (null == l ? i : h) && (l = e); } - if (l == null) break; + if (null == l) break; this.content[t] = this.content[l], this.content[l] = o, t = l; } - }, + } }, t.kdTree = function (t, i, e) { function r(t, o, i) { - let l; - let u; - const h = o % e.length; - return t.length === 0 ? null : t.length === 1 ? new n(t[0], h, i) : (t.sort((t, n) => t[e[h]] - n[e[h]]), l = Math.floor(t.length / 2), u = new n(t[l], h, i), u.left = r(t.slice(0, l), o + 1, u), u.right = r(t.slice(l + 1), o + 1, u), u); + var l, + u, + h = o % e.length; + return 0 === t.length ? null : 1 === t.length ? new n(t[0], h, i) : (t.sort(function (t, n) { + return t[e[h]] - n[e[h]]; + }), l = Math.floor(t.length / 2), u = new n(t[l], h, i), u.left = r(t.slice(0, l), o + 1, u), u.right = r(t.slice(l + 1), o + 1, u), u); } - const l = this; - Array.isArray(t) ? this.root = r(t, 0, null) : (function (t) { + var l = this; + Array.isArray(t) ? this.root = r(t, 0, null) : function (t) { function n(t) { t.left && (t.left.parent = t, n(t.left)), t.right && (t.right.parent = t, n(t.right)); } l.root = t, n(l.root); - }(t)), this.toJSON = function (t) { + }(t), this.toJSON = function (t) { t || (t = this.root); - const o = new n(t.obj, t.dimension, null); + var o = new n(t.obj, t.dimension, null); return t.left && (o.left = l.toJSON(t.left)), t.right && (o.right = l.toJSON(t.right)), o; }, this.insert = function (t) { function o(n, i) { - if (n === null) return i; - const r = e[n.dimension]; + if (null === n) return i; + var r = e[n.dimension]; return t[r] < n.obj[r] ? o(n.left, n) : o(n.right, n); } - let i; - let r; - const l = o(this.root, null); - l !== null ? (i = new n(t, (l.dimension + 1) % e.length, l), r = e[l.dimension], t[r] < l.obj[r] ? l.left = i : l.right = i) : this.root = new n(t, 0, null); + var i, + r, + l = o(this.root, null); + null !== l ? (i = new n(t, (l.dimension + 1) % e.length, l), r = e[l.dimension], t[r] < l.obj[r] ? l.left = i : l.right = i) : this.root = new n(t, 0, null); }, this.remove = function (t) { function n(o) { - if (o === null) return null; + if (null === o) return null; if (o.obj === t) return o; - const i = e[o.dimension]; + var i = e[o.dimension]; return t[i] < o.obj[i] ? n(o.left) : n(o.right); } function o(t) { function n(t, o) { - let i; let r; let l; let u; let - h; - return t === null ? null : (i = e[o], t.dimension === o ? t.left !== null ? n(t.left, o) : t : (r = t.obj[i], l = n(t.left, o), u = n(t.right, o), h = t, l !== null && l.obj[i] < r && (h = l), u !== null && u.obj[i] < h.obj[i] && (h = u), h)); + var i, r, l, u, h; + return null === t ? null : (i = e[o], t.dimension === o ? null !== t.left ? n(t.left, o) : t : (r = t.obj[i], l = n(t.left, o), u = n(t.right, o), h = t, null !== l && l.obj[i] < r && (h = l), null !== u && u.obj[i] < h.obj[i] && (h = u), h)); } - let i; let r; let - u; - if (t.left === null && t.right === null) return t.parent === null ? void (l.root = null) : (u = e[t.parent.dimension], void (t.obj[u] < t.parent.obj[u] ? t.parent.left = null : t.parent.right = null)); - t.right !== null ? (r = (i = n(t.right, t.dimension)).obj, o(i), t.obj = r) : (r = (i = n(t.left, t.dimension)).obj, o(i), t.right = t.left, t.left = null, t.obj = r); + var i, r, u; + if (null === t.left && null === t.right) return null === t.parent ? void (l.root = null) : (u = e[t.parent.dimension], void (t.obj[u] < t.parent.obj[u] ? t.parent.left = null : t.parent.right = null)); + null !== t.right ? (r = (i = n(t.right, t.dimension)).obj, o(i), t.obj = r) : (r = (i = n(t.left, t.dimension)).obj, o(i), t.right = t.left, t.left = null, t.obj = r); } - let i; - (i = n(l.root)) !== null && o(i); + var i; + null !== (i = n(l.root)) && o(i); }, this.nearest = function (t, n, r) { function u(o) { function r(t, o) { f.push([t, o]), f.size() > n && f.pop(); } - let l; - let h; - let s; - let c; - const a = e[o.dimension]; - const g = i(t, o.obj); - const p = {}; + var l, + h, + s, + c, + a = e[o.dimension], + g = i(t, o.obj), + p = {}; for (c = 0; c < e.length; c += 1) c === o.dimension ? p[e[c]] = t[e[c]] : p[e[c]] = o.obj[e[c]]; - h = i(p, o.obj), o.right !== null || o.left !== null ? (u(l = o.right === null ? o.left : o.left === null ? o.right : t[a] < o.obj[a] ? o.left : o.right), (f.size() < n || g < f.peek()[1]) && r(o, g), (f.size() < n || Math.abs(h) < f.peek()[1]) && (s = l === o.left ? o.right : o.left) !== null && u(s)) : (f.size() < n || g < f.peek()[1]) && r(o, g); + h = i(p, o.obj), null !== o.right || null !== o.left ? (u(l = null === o.right ? o.left : null === o.left ? o.right : t[a] < o.obj[a] ? o.left : o.right), (f.size() < n || g < f.peek()[1]) && r(o, g), (f.size() < n || Math.abs(h) < f.peek()[1]) && null !== (s = l === o.left ? o.right : o.left) && u(s)) : (f.size() < n || g < f.peek()[1]) && r(o, g); } - let h; let s; let - f; - if (f = new o((t) => -t[1]), r) for (h = 0; h < n; h += 1) f.push([null, r]); + var h, s, f; + if (f = new o(function (t) { + return -t[1]; + }), r) for (h = 0; h < n; h += 1) f.push([null, r]); for (l.root && u(l.root), s = [], h = 0; h < Math.min(n, f.content.length); h += 1) f.content[h][0] && s.push([f.content[h][0].obj, f.content[h][1]]); return s; }, this.balanceFactor = function () { function t(n) { - return n === null ? 0 : Math.max(t(n.left), t(n.right)) + 1; + return null === n ? 0 : Math.max(t(n.left), t(n.right)) + 1; } function n(t) { - return t === null ? 0 : n(t.left) + n(t.right) + 1; + return null === t ? 0 : n(t.left) + n(t.right) + 1; } return t(l.root) / (Math.log(n(l.root)) / Math.log(2)); }; }, t.BinaryHeap = o; - })); -}(kdTreeMin)); + }); +})(kdTreeMin); -const lodash_isequal = { exports: {} }; +var lodash_isequal = {exports: {}}; /** * Lodash (Custom Build) @@ -1487,98 +1524,99 @@ const lodash_isequal = { exports: {} }; (function (module, exports) { /** Used as the size to enable large array optimizations. */ - const LARGE_ARRAY_SIZE = 200; + var LARGE_ARRAY_SIZE = 200; /** Used to stand-in for `undefined` hash values. */ - const HASH_UNDEFINED = '__lodash_hash_undefined__'; + var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** Used to compose bitmasks for value comparisons. */ - const COMPARE_PARTIAL_FLAG = 1; - const COMPARE_UNORDERED_FLAG = 2; + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; /** Used as references for various `Number` constants. */ - const MAX_SAFE_INTEGER = 9007199254740991; + var MAX_SAFE_INTEGER = 9007199254740991; /** `Object#toString` result references. */ - const argsTag = '[object Arguments]'; - const arrayTag = '[object Array]'; - const asyncTag = '[object AsyncFunction]'; - const boolTag = '[object Boolean]'; - const dateTag = '[object Date]'; - const errorTag = '[object Error]'; - const funcTag = '[object Function]'; - const genTag = '[object GeneratorFunction]'; - const mapTag = '[object Map]'; - const numberTag = '[object Number]'; - const nullTag = '[object Null]'; - const objectTag = '[object Object]'; - const promiseTag = '[object Promise]'; - const proxyTag = '[object Proxy]'; - const regexpTag = '[object RegExp]'; - const setTag = '[object Set]'; - const stringTag = '[object String]'; - const symbolTag = '[object Symbol]'; - const undefinedTag = '[object Undefined]'; - const weakMapTag = '[object WeakMap]'; - const arrayBufferTag = '[object ArrayBuffer]'; - const dataViewTag = '[object DataView]'; - const float32Tag = '[object Float32Array]'; - const float64Tag = '[object Float64Array]'; - const int8Tag = '[object Int8Array]'; - const int16Tag = '[object Int16Array]'; - const int32Tag = '[object Int32Array]'; - const uint8Tag = '[object Uint8Array]'; - const uint8ClampedTag = '[object Uint8ClampedArray]'; - const uint16Tag = '[object Uint16Array]'; - const uint32Tag = '[object Uint32Array]'; + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]'; + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ - const reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; /** Used to detect host constructors (Safari). */ - const reIsHostCtor = /^\[object .+?Constructor\]$/; + var reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used to detect unsigned integer values. */ - const reIsUint = /^(?:0|[1-9]\d*)$/; + var reIsUint = /^(?:0|[1-9]\d*)$/; /** Used to identify `toStringTag` values of typed arrays. */ - const typedArrayTags = {}; + var typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; /** Detect free variable `global` from Node.js. */ - const freeGlobal = typeof commonjsGlobal === 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; /** Detect free variable `self`. */ - const freeSelf = typeof self === 'object' && self && self.Object === Object && self; + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ - const root = freeGlobal || freeSelf || Function('return this')(); + var root = freeGlobal || freeSelf || Function('return this')(); /** Detect free variable `exports`. */ - const freeExports = exports && !exports.nodeType && exports; + var freeExports = exports && !exports.nodeType && exports; /** Detect free variable `module`. */ - const freeModule = freeExports && 'object' === 'object' && module && !module.nodeType && module; + var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ - const moduleExports = freeModule && freeModule.exports === freeExports; + var moduleExports = freeModule && freeModule.exports === freeExports; /** Detect free variable `process` from Node.js. */ - const freeProcess = moduleExports && freeGlobal.process; + var freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ - const nodeUtil = (function () { + var nodeUtil = function () { try { return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} - }()); + }(); /* Node.js helper references. */ - const nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + + var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** * A specialized version of `_.filter` for arrays without support for * iteratee shorthands. @@ -1590,13 +1628,13 @@ const lodash_isequal = { exports: {} }; */ function arrayFilter(array, predicate) { - let index = -1; - const length = array == null ? 0 : array.length; - let resIndex = 0; - const result = []; + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; while (++index < length) { - const value = array[index]; + var value = array[index]; if (predicate(value, index, array)) { result[resIndex++] = value; @@ -1614,10 +1652,11 @@ const lodash_isequal = { exports: {} }; * @returns {Array} Returns `array`. */ + function arrayPush(array, values) { - let index = -1; - const { length } = values; - const offset = array.length; + var index = -1, + length = values.length, + offset = array.length; while (++index < length) { array[offset + index] = values[index]; @@ -1636,9 +1675,10 @@ const lodash_isequal = { exports: {} }; * else `false`. */ + function arraySome(array, predicate) { - let index = -1; - const length = array == null ? 0 : array.length; + var index = -1, + length = array == null ? 0 : array.length; while (++index < length) { if (predicate(array[index], index, array)) { @@ -1658,9 +1698,10 @@ const lodash_isequal = { exports: {} }; * @returns {Array} Returns the array of results. */ + function baseTimes(n, iteratee) { - let index = -1; - const result = Array(n); + var index = -1, + result = Array(n); while (++index < n) { result[index] = iteratee(index); @@ -1676,6 +1717,7 @@ const lodash_isequal = { exports: {} }; * @returns {Function} Returns the new capped function. */ + function baseUnary(func) { return function (value) { return func(value); @@ -1690,6 +1732,7 @@ const lodash_isequal = { exports: {} }; * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ + function cacheHas(cache, key) { return cache.has(key); } @@ -1702,6 +1745,7 @@ const lodash_isequal = { exports: {} }; * @returns {*} Returns the property value. */ + function getValue(object, key) { return object == null ? undefined : object[key]; } @@ -1713,10 +1757,11 @@ const lodash_isequal = { exports: {} }; * @returns {Array} Returns the key-value pairs. */ + function mapToArray(map) { - let index = -1; - const result = Array(map.size); - map.forEach((value, key) => { + var index = -1, + result = Array(map.size); + map.forEach(function (value, key) { result[++index] = [key, value]; }); return result; @@ -1730,6 +1775,7 @@ const lodash_isequal = { exports: {} }; * @returns {Function} Returns the new function. */ + function overArg(func, transform) { return function (arg) { return func(transform(arg)); @@ -1743,76 +1789,79 @@ const lodash_isequal = { exports: {} }; * @returns {Array} Returns the values. */ + function setToArray(set) { - let index = -1; - const result = Array(set.size); - set.forEach((value) => { + var index = -1, + result = Array(set.size); + set.forEach(function (value) { result[++index] = value; }); return result; } /** Used for built-in method references. */ - const arrayProto = Array.prototype; - const funcProto = Function.prototype; - const objectProto = Object.prototype; + + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; /** Used to detect overreaching core-js shims. */ - const coreJsData = root['__core-js_shared__']; + var coreJsData = root['__core-js_shared__']; /** Used to resolve the decompiled source of functions. */ - const funcToString = funcProto.toString; + var funcToString = funcProto.toString; /** Used to check objects for own properties. */ - const { hasOwnProperty } = objectProto; + var hasOwnProperty = objectProto.hasOwnProperty; /** Used to detect methods masquerading as native. */ - const maskSrcKey = (function () { - const uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? `Symbol(src)_1.${uid}` : ''; - }()); + var maskSrcKey = function () { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? 'Symbol(src)_1.' + uid : ''; + }(); /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ - const nativeObjectToString = objectProto.toString; + + var nativeObjectToString = objectProto.toString; /** Used to detect if a method is native. */ - const reIsNative = RegExp(`^${funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?')}$`); + var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); /** Built-in value references. */ - const Buffer = moduleExports ? root.Buffer : undefined; - const { Symbol } = root; - const { Uint8Array } = root; - const { propertyIsEnumerable } = objectProto; - const { splice } = arrayProto; - const symToStringTag = Symbol ? Symbol.toStringTag : undefined; + var Buffer = moduleExports ? root.Buffer : undefined, + Symbol = root.Symbol, + Uint8Array = root.Uint8Array, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ - const nativeGetSymbols = Object.getOwnPropertySymbols; - const nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; - const nativeKeys = overArg(Object.keys, Object); + var nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeKeys = overArg(Object.keys, Object); /* Built-in method references that are verified to be native. */ - const DataView = getNative(root, 'DataView'); - const Map = getNative(root, 'Map'); - const Promise = getNative(root, 'Promise'); - const Set = getNative(root, 'Set'); - const WeakMap = getNative(root, 'WeakMap'); - const nativeCreate = getNative(Object, 'create'); + var DataView = getNative(root, 'DataView'), + Map = getNative(root, 'Map'), + Promise = getNative(root, 'Promise'), + Set = getNative(root, 'Set'), + WeakMap = getNative(root, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); /** Used to detect maps, sets, and weakmaps. */ - const dataViewCtorString = toSource(DataView); - const mapCtorString = toSource(Map); - const promiseCtorString = toSource(Promise); - const setCtorString = toSource(Set); - const weakMapCtorString = toSource(WeakMap); + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); /** Used to convert symbols to primitives and strings. */ - const symbolProto = Symbol ? Symbol.prototype : undefined; - const symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * Creates a hash object. * @@ -1822,12 +1871,12 @@ const lodash_isequal = { exports: {} }; */ function Hash(entries) { - let index = -1; - const length = entries == null ? 0 : entries.length; + var index = -1, + length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { - const entry = entries[index]; + var entry = entries[index]; this.set(entry[0], entry[1]); } } @@ -1839,6 +1888,7 @@ const lodash_isequal = { exports: {} }; * @memberOf Hash */ + function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; this.size = 0; @@ -1854,8 +1904,9 @@ const lodash_isequal = { exports: {} }; * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ + function hashDelete(key) { - const result = this.has(key) && delete this.__data__[key]; + var result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; } @@ -1869,11 +1920,12 @@ const lodash_isequal = { exports: {} }; * @returns {*} Returns the entry value. */ + function hashGet(key) { - const data = this.__data__; + var data = this.__data__; if (nativeCreate) { - const result = data[key]; + var result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } @@ -1889,8 +1941,9 @@ const lodash_isequal = { exports: {} }; * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ + function hashHas(key) { - const data = this.__data__; + var data = this.__data__; return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); } /** @@ -1904,15 +1957,17 @@ const lodash_isequal = { exports: {} }; * @returns {Object} Returns the hash instance. */ + function hashSet(key, value) { - const data = this.__data__; + var data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value; return this; } // Add methods to `Hash`. + Hash.prototype.clear = hashClear; - Hash.prototype.delete = hashDelete; + Hash.prototype['delete'] = hashDelete; Hash.prototype.get = hashGet; Hash.prototype.has = hashHas; Hash.prototype.set = hashSet; @@ -1925,12 +1980,12 @@ const lodash_isequal = { exports: {} }; */ function ListCache(entries) { - let index = -1; - const length = entries == null ? 0 : entries.length; + var index = -1, + length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { - const entry = entries[index]; + var entry = entries[index]; this.set(entry[0], entry[1]); } } @@ -1942,6 +1997,7 @@ const lodash_isequal = { exports: {} }; * @memberOf ListCache */ + function listCacheClear() { this.__data__ = []; this.size = 0; @@ -1956,15 +2012,16 @@ const lodash_isequal = { exports: {} }; * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ + function listCacheDelete(key) { - const data = this.__data__; - const index = assocIndexOf(data, key); + var data = this.__data__, + index = assocIndexOf(data, key); if (index < 0) { return false; } - const lastIndex = data.length - 1; + var lastIndex = data.length - 1; if (index == lastIndex) { data.pop(); @@ -1985,9 +2042,10 @@ const lodash_isequal = { exports: {} }; * @returns {*} Returns the entry value. */ + function listCacheGet(key) { - const data = this.__data__; - const index = assocIndexOf(data, key); + var data = this.__data__, + index = assocIndexOf(data, key); return index < 0 ? undefined : data[index][1]; } /** @@ -2000,6 +2058,7 @@ const lodash_isequal = { exports: {} }; * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ + function listCacheHas(key) { return assocIndexOf(this.__data__, key) > -1; } @@ -2014,9 +2073,10 @@ const lodash_isequal = { exports: {} }; * @returns {Object} Returns the list cache instance. */ + function listCacheSet(key, value) { - const data = this.__data__; - const index = assocIndexOf(data, key); + var data = this.__data__, + index = assocIndexOf(data, key); if (index < 0) { ++this.size; @@ -2028,8 +2088,9 @@ const lodash_isequal = { exports: {} }; return this; } // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; - ListCache.prototype.delete = listCacheDelete; + ListCache.prototype['delete'] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; @@ -2042,12 +2103,12 @@ const lodash_isequal = { exports: {} }; */ function MapCache(entries) { - let index = -1; - const length = entries == null ? 0 : entries.length; + var index = -1, + length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { - const entry = entries[index]; + var entry = entries[index]; this.set(entry[0], entry[1]); } } @@ -2059,12 +2120,13 @@ const lodash_isequal = { exports: {} }; * @memberOf MapCache */ + function mapCacheClear() { this.size = 0; this.__data__ = { - hash: new Hash(), - map: new (Map || ListCache)(), - string: new Hash(), + 'hash': new Hash(), + 'map': new (Map || ListCache)(), + 'string': new Hash() }; } /** @@ -2077,8 +2139,9 @@ const lodash_isequal = { exports: {} }; * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ + function mapCacheDelete(key) { - const result = getMapData(this, key).delete(key); + var result = getMapData(this, key)['delete'](key); this.size -= result ? 1 : 0; return result; } @@ -2092,6 +2155,7 @@ const lodash_isequal = { exports: {} }; * @returns {*} Returns the entry value. */ + function mapCacheGet(key) { return getMapData(this, key).get(key); } @@ -2105,6 +2169,7 @@ const lodash_isequal = { exports: {} }; * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ + function mapCacheHas(key) { return getMapData(this, key).has(key); } @@ -2119,16 +2184,18 @@ const lodash_isequal = { exports: {} }; * @returns {Object} Returns the map cache instance. */ + function mapCacheSet(key, value) { - const data = getMapData(this, key); - const { size } = data; + var data = getMapData(this, key), + size = data.size; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; } // Add methods to `MapCache`. + MapCache.prototype.clear = mapCacheClear; - MapCache.prototype.delete = mapCacheDelete; + MapCache.prototype['delete'] = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; @@ -2142,8 +2209,8 @@ const lodash_isequal = { exports: {} }; */ function SetCache(values) { - let index = -1; - const length = values == null ? 0 : values.length; + var index = -1, + length = values == null ? 0 : values.length; this.__data__ = new MapCache(); while (++index < length) { @@ -2161,6 +2228,7 @@ const lodash_isequal = { exports: {} }; * @returns {Object} Returns the cache instance. */ + function setCacheAdd(value) { this.__data__.set(value, HASH_UNDEFINED); @@ -2176,10 +2244,12 @@ const lodash_isequal = { exports: {} }; * @returns {number} Returns `true` if `value` is found, else `false`. */ + function setCacheHas(value) { return this.__data__.has(value); } // Add methods to `SetCache`. + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; SetCache.prototype.has = setCacheHas; /** @@ -2191,7 +2261,7 @@ const lodash_isequal = { exports: {} }; */ function Stack(entries) { - const data = this.__data__ = new ListCache(entries); + var data = this.__data__ = new ListCache(entries); this.size = data.size; } /** @@ -2202,6 +2272,7 @@ const lodash_isequal = { exports: {} }; * @memberOf Stack */ + function stackClear() { this.__data__ = new ListCache(); this.size = 0; @@ -2216,9 +2287,10 @@ const lodash_isequal = { exports: {} }; * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ + function stackDelete(key) { - const data = this.__data__; - const result = data.delete(key); + var data = this.__data__, + result = data['delete'](key); this.size = data.size; return result; } @@ -2232,6 +2304,7 @@ const lodash_isequal = { exports: {} }; * @returns {*} Returns the entry value. */ + function stackGet(key) { return this.__data__.get(key); } @@ -2245,6 +2318,7 @@ const lodash_isequal = { exports: {} }; * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ + function stackHas(key) { return this.__data__.has(key); } @@ -2259,11 +2333,12 @@ const lodash_isequal = { exports: {} }; * @returns {Object} Returns the stack cache instance. */ + function stackSet(key, value) { - let data = this.__data__; + var data = this.__data__; if (data instanceof ListCache) { - const pairs = data.__data__; + var pairs = data.__data__; if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) { pairs.push([key, value]); @@ -2279,8 +2354,9 @@ const lodash_isequal = { exports: {} }; return this; } // Add methods to `Stack`. + Stack.prototype.clear = stackClear; - Stack.prototype.delete = stackDelete; + Stack.prototype['delete'] = stackDelete; Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; @@ -2294,20 +2370,20 @@ const lodash_isequal = { exports: {} }; */ function arrayLikeKeys(value, inherited) { - const isArr = isArray(value); - const isArg = !isArr && isArguments(value); - const isBuff = !isArr && !isArg && isBuffer(value); - const isType = !isArr && !isArg && !isBuff && isTypedArray(value); - const skipIndexes = isArr || isArg || isBuff || isType; - const result = skipIndexes ? baseTimes(value.length, String) : []; - const { length } = result; - - for (const key in value) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. - key == 'length' // Node.js 0.10 has enumerable non-index properties on buffers. - || isBuff && (key == 'offset' || key == 'parent') // PhantomJS 2 has enumerable non-index properties on typed arrays. - || isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') // Skip index properties. - || isIndex(key, length)))) { + key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. + isBuff && (key == 'offset' || key == 'parent') || // PhantomJS 2 has enumerable non-index properties on typed arrays. + isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || // Skip index properties. + isIndex(key, length)))) { result.push(key); } } @@ -2323,8 +2399,9 @@ const lodash_isequal = { exports: {} }; * @returns {number} Returns the index of the matched value, else `-1`. */ + function assocIndexOf(array, key) { - let { length } = array; + var length = array.length; while (length--) { if (eq(array[length][0], key)) { @@ -2346,8 +2423,9 @@ const lodash_isequal = { exports: {} }; * @returns {Array} Returns the array of property names and symbols. */ + function baseGetAllKeys(object, keysFunc, symbolsFunc) { - const result = keysFunc(object); + var result = keysFunc(object); return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } /** @@ -2358,6 +2436,7 @@ const lodash_isequal = { exports: {} }; * @returns {string} Returns the `toStringTag`. */ + function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; @@ -2373,6 +2452,7 @@ const lodash_isequal = { exports: {} }; * @returns {boolean} Returns `true` if `value` is an `arguments` object, */ + function baseIsArguments(value) { return isObjectLike(value) && baseGetTag(value) == argsTag; } @@ -2391,6 +2471,7 @@ const lodash_isequal = { exports: {} }; * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ + function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; @@ -2417,16 +2498,17 @@ const lodash_isequal = { exports: {} }; * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - let objIsArr = isArray(object); - const othIsArr = isArray(other); - let objTag = objIsArr ? arrayTag : getTag(object); - let othTag = othIsArr ? arrayTag : getTag(other); + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); objTag = objTag == argsTag ? objectTag : objTag; othTag = othTag == argsTag ? objectTag : othTag; - let objIsObj = objTag == objectTag; - const othIsObj = othTag == objectTag; - const isSameTag = objTag == othTag; + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; if (isSameTag && isBuffer(object)) { if (!isBuffer(other)) { @@ -2443,12 +2525,12 @@ const lodash_isequal = { exports: {} }; } if (!(bitmask & COMPARE_PARTIAL_FLAG)) { - const objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'); - const othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { - const objUnwrapped = objIsWrapped ? object.value() : object; - const othUnwrapped = othIsWrapped ? other.value() : other; + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new Stack()); return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } @@ -2470,12 +2552,13 @@ const lodash_isequal = { exports: {} }; * else `false`. */ + function baseIsNative(value) { if (!isObject(value) || isMasked(value)) { return false; } - const pattern = isFunction(value) ? reIsNative : reIsHostCtor; + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } /** @@ -2486,6 +2569,7 @@ const lodash_isequal = { exports: {} }; * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ + function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } @@ -2497,14 +2581,15 @@ const lodash_isequal = { exports: {} }; * @returns {Array} Returns the array of property names. */ + function baseKeys(object) { if (!isPrototype(object)) { return nativeKeys(object); } - const result = []; + var result = []; - for (const key in Object(object)) { + for (var key in Object(object)) { if (hasOwnProperty.call(object, key) && key != 'constructor') { result.push(key); } @@ -2526,30 +2611,32 @@ const lodash_isequal = { exports: {} }; * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - const isPartial = bitmask & COMPARE_PARTIAL_FLAG; - const arrLength = array.length; - const othLength = other.length; + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } // Assume cyclic values are equal. - const stacked = stack.get(array); + + var stacked = stack.get(array); if (stacked && stack.get(other)) { return stacked == other; } - let index = -1; - let result = true; - const seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined; + var index = -1, + result = true, + seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined; stack.set(array, other); stack.set(other, array); // Ignore non-index properties. while (++index < arrLength) { - var arrValue = array[index]; - const othValue = other[index]; + var arrValue = array[index], + othValue = other[index]; if (customizer) { var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); @@ -2564,8 +2651,9 @@ const lodash_isequal = { exports: {} }; break; } // Recursively compare arrays (susceptible to call stack limits). + if (seen) { - if (!arraySome(other, (othValue, othIndex) => { + if (!arraySome(other, function (othValue, othIndex) { if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { return seen.push(othIndex); } @@ -2579,8 +2667,8 @@ const lodash_isequal = { exports: {} }; } } - stack.delete(array); - stack.delete(other); + stack['delete'](array); + stack['delete'](other); return result; } /** @@ -2601,6 +2689,7 @@ const lodash_isequal = { exports: {} }; * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { switch (tag) { case dataViewTag: @@ -2633,7 +2722,7 @@ const lodash_isequal = { exports: {} }; // Coerce regexes to strings and treat strings, primitives and objects, // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring // for more details. - return object == `${other}`; + return object == other + ''; case mapTag: var convert = mapToArray; @@ -2646,6 +2735,7 @@ const lodash_isequal = { exports: {} }; return false; } // Assume cyclic values are equal. + var stacked = stack.get(object); if (stacked) { @@ -2656,13 +2746,14 @@ const lodash_isequal = { exports: {} }; stack.set(object, other); var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack.delete(object); + stack['delete'](object); return result; case symbolTag: if (symbolValueOf) { return symbolValueOf.call(object) == symbolValueOf.call(other); } + } return false; @@ -2681,18 +2772,19 @@ const lodash_isequal = { exports: {} }; * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - const isPartial = bitmask & COMPARE_PARTIAL_FLAG; - const objProps = getAllKeys(object); - const objLength = objProps.length; - const othProps = getAllKeys(other); - const othLength = othProps.length; + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; if (objLength != othLength && !isPartial) { return false; } - let index = objLength; + var index = objLength; while (index--) { var key = objProps[index]; @@ -2702,26 +2794,28 @@ const lodash_isequal = { exports: {} }; } } // Assume cyclic values are equal. - const stacked = stack.get(object); + + var stacked = stack.get(object); if (stacked && stack.get(other)) { return stacked == other; } - let result = true; + var result = true; stack.set(object, other); stack.set(other, object); - let skipCtor = isPartial; + var skipCtor = isPartial; while (++index < objLength) { key = objProps[index]; - const objValue = object[key]; - const othValue = other[key]; + var objValue = object[key], + othValue = other[key]; if (customizer) { var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); } // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { result = false; break; @@ -2731,16 +2825,16 @@ const lodash_isequal = { exports: {} }; } if (result && !skipCtor) { - const objCtor = object.constructor; - const othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. + var objCtor = object.constructor, + othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor === 'function' && objCtor instanceof objCtor && typeof othCtor === 'function' && othCtor instanceof othCtor)) { + if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { result = false; } } - stack.delete(object); - stack.delete(other); + stack['delete'](object); + stack['delete'](other); return result; } /** @@ -2751,6 +2845,7 @@ const lodash_isequal = { exports: {} }; * @returns {Array} Returns the array of property names and symbols. */ + function getAllKeys(object) { return baseGetAllKeys(object, keys, getSymbols); } @@ -2763,9 +2858,10 @@ const lodash_isequal = { exports: {} }; * @returns {*} Returns the map data. */ + function getMapData(map, key) { - const data = map.__data__; - return isKeyable(key) ? data[typeof key === 'string' ? 'string' : 'hash'] : data.map; + var data = map.__data__; + return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } /** * Gets the native function at `key` of `object`. @@ -2776,8 +2872,9 @@ const lodash_isequal = { exports: {} }; * @returns {*} Returns the function if it's native, else `undefined`. */ + function getNative(object, key) { - const value = getValue(object, key); + var value = getValue(object, key); return baseIsNative(value) ? value : undefined; } /** @@ -2788,16 +2885,17 @@ const lodash_isequal = { exports: {} }; * @returns {string} Returns the raw `toStringTag`. */ + function getRawTag(value) { - const isOwn = hasOwnProperty.call(value, symToStringTag); - const tag = value[symToStringTag]; + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; try { value[symToStringTag] = undefined; var unmasked = true; } catch (e) {} - const result = nativeObjectToString.call(value); + var result = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { @@ -2817,13 +2915,16 @@ const lodash_isequal = { exports: {} }; * @returns {Array} Returns the array of symbols. */ + var getSymbols = !nativeGetSymbols ? stubArray : function (object) { if (object == null) { return []; } object = Object(object); - return arrayFilter(nativeGetSymbols(object), (symbol) => propertyIsEnumerable.call(object, symbol)); + return arrayFilter(nativeGetSymbols(object), function (symbol) { + return propertyIsEnumerable.call(object, symbol); + }); }; /** * Gets the `toStringTag` of `value`. @@ -2837,9 +2938,9 @@ const lodash_isequal = { exports: {} }; if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) { getTag = function (value) { - const result = baseGetTag(value); - const Ctor = result == objectTag ? value.constructor : undefined; - const ctorString = Ctor ? toSource(Ctor) : ''; + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { @@ -2872,9 +2973,10 @@ const lodash_isequal = { exports: {} }; * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ + function isIndex(value, length) { length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && (typeof value === 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length; + return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length; } /** * Checks if `value` is suitable for use as unique object key. @@ -2884,8 +2986,9 @@ const lodash_isequal = { exports: {} }; * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ + function isKeyable(value) { - const type = typeof value; + var type = typeof value; return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null; } /** @@ -2896,6 +2999,7 @@ const lodash_isequal = { exports: {} }; * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ + function isMasked(func) { return !!maskSrcKey && maskSrcKey in func; } @@ -2907,9 +3011,10 @@ const lodash_isequal = { exports: {} }; * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ + function isPrototype(value) { - const Ctor = value && value.constructor; - const proto = typeof Ctor === 'function' && Ctor.prototype || objectProto; + var Ctor = value && value.constructor, + proto = typeof Ctor == 'function' && Ctor.prototype || objectProto; return value === proto; } /** @@ -2920,6 +3025,7 @@ const lodash_isequal = { exports: {} }; * @returns {string} Returns the converted string. */ + function objectToString(value) { return nativeObjectToString.call(value); } @@ -2931,6 +3037,7 @@ const lodash_isequal = { exports: {} }; * @returns {string} Returns the source code. */ + function toSource(func) { if (func != null) { try { @@ -2938,7 +3045,7 @@ const lodash_isequal = { exports: {} }; } catch (e) {} try { - return `${func}`; + return func + ''; } catch (e) {} } @@ -2977,6 +3084,7 @@ const lodash_isequal = { exports: {} }; * // => true */ + function eq(value, other) { return value === other || value !== value && other !== other; } @@ -2999,11 +3107,12 @@ const lodash_isequal = { exports: {} }; * // => false */ + var isArguments = baseIsArguments(function () { return arguments; }()) ? baseIsArguments : function (value) { - return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); - }; + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); + }; /** * Checks if `value` is classified as an `Array` object. * @@ -3028,7 +3137,7 @@ const lodash_isequal = { exports: {} }; * // => false */ - var { isArray } = Array; + var isArray = Array.isArray; /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or @@ -3076,6 +3185,7 @@ const lodash_isequal = { exports: {} }; * // => false */ + var isBuffer = nativeIsBuffer || stubFalse; /** * Performs a deep comparison between two values to determine if they are @@ -3127,13 +3237,15 @@ const lodash_isequal = { exports: {} }; * // => false */ + function isFunction(value) { if (!isObject(value)) { return false; } // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 9 which returns 'object' for typed arrays and other constructors. - const tag = baseGetTag(value); + + var tag = baseGetTag(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } /** @@ -3163,8 +3275,9 @@ const lodash_isequal = { exports: {} }; * // => false */ + function isLength(value) { - return typeof value === 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } /** * Checks if `value` is the @@ -3192,8 +3305,9 @@ const lodash_isequal = { exports: {} }; * // => false */ + function isObject(value) { - const type = typeof value; + var type = typeof value; return value != null && (type == 'object' || type == 'function'); } /** @@ -3221,8 +3335,9 @@ const lodash_isequal = { exports: {} }; * // => false */ + function isObjectLike(value) { - return value != null && typeof value === 'object'; + return value != null && typeof value == 'object'; } /** * Checks if `value` is classified as a typed array. @@ -3242,6 +3357,7 @@ const lodash_isequal = { exports: {} }; * // => false */ + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; /** * Creates an array of the own enumerable property names of `object`. @@ -3294,6 +3410,7 @@ const lodash_isequal = { exports: {} }; * // => false */ + function stubArray() { return []; } @@ -3311,14 +3428,15 @@ const lodash_isequal = { exports: {} }; * // => [false, false] */ + function stubFalse() { return false; } module.exports = isEqual; -}(lodash_isequal, lodash_isequal.exports)); +})(lodash_isequal, lodash_isequal.exports); -const munkres$1 = { exports: {} }; +var munkres$1 = {exports: {}}; /** * Introduction @@ -3494,9 +3612,9 @@ const munkres$1 = { exports: {} }; * * Copyright and License * ===================== - * + * * Copyright 2008-2016 Brian M. Clapper - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -3515,12 +3633,12 @@ const munkres$1 = { exports: {} }; * A very large numerical value which can be used like an integer * (i. e., adding integers of similar size does not result in overflow). */ - const MAX_SIZE = parseInt(Number.MAX_SAFE_INTEGER / 2) || (1 << 26) * (1 << 26); + var MAX_SIZE = parseInt(Number.MAX_SAFE_INTEGER / 2) || (1 << 26) * (1 << 26); /** * A default value to pad the cost matrix with if it is not quadratic. */ - const DEFAULT_PAD_VALUE = 0; // --------------------------------------------------------------------------- + var DEFAULT_PAD_VALUE = 0; // --------------------------------------------------------------------------- // Classes // --------------------------------------------------------------------------- @@ -3549,20 +3667,21 @@ const munkres$1 = { exports: {} }; * @return {Array} An array of arrays representing the padded matrix */ + Munkres.prototype.pad_matrix = function (matrix, pad_value) { pad_value = pad_value || DEFAULT_PAD_VALUE; - let max_columns = 0; - let total_rows = matrix.length; - let i; + var max_columns = 0; + var total_rows = matrix.length; + var i; for (i = 0; i < total_rows; ++i) if (matrix[i].length > max_columns) max_columns = matrix[i].length; total_rows = max_columns > total_rows ? max_columns : total_rows; - const new_matrix = []; + var new_matrix = []; for (i = 0; i < total_rows; ++i) { - const row = matrix[i] || []; - const new_row = row.slice(); // If this row is too short, pad it + var row = matrix[i] || []; + var new_row = row.slice(); // If this row is too short, pad it while (total_rows > new_row.length) new_row.push(pad_value); @@ -3591,6 +3710,7 @@ const munkres$1 = { exports: {} }; * cost path through the matrix */ + Munkres.prototype.compute = function (cost_matrix, options) { options = options || {}; options.padValue = options.padValue || DEFAULT_PAD_VALUE; @@ -3598,7 +3718,7 @@ const munkres$1 = { exports: {} }; this.n = this.C.length; this.original_length = cost_matrix.length; this.original_width = cost_matrix[0].length; - const nfalseArray = []; + var nfalseArray = []; /* array of n false values */ while (nfalseArray.length < this.n) nfalseArray.push(false); @@ -3609,26 +3729,26 @@ const munkres$1 = { exports: {} }; this.Z0_c = 0; this.path = this.__make_matrix(this.n * 2, 0); this.marked = this.__make_matrix(this.n, 0); - let step = 1; - const steps = { + var step = 1; + var steps = { 1: this.__step1, 2: this.__step2, 3: this.__step3, 4: this.__step4, 5: this.__step5, - 6: this.__step6, + 6: this.__step6 }; while (true) { - const func = steps[step]; + var func = steps[step]; if (!func) // done - { break; } + break; step = func.apply(this); } - const results = []; + var results = []; - for (let i = 0; i < this.original_length; ++i) for (let j = 0; j < this.original_width; ++j) if (this.marked[i][j] == 1) results.push([i, j]); + for (var i = 0; i < this.original_length; ++i) for (var j = 0; j < this.original_width; ++j) if (this.marked[i][j] == 1) results.push([i, j]); return results; }; @@ -3641,13 +3761,14 @@ const munkres$1 = { exports: {} }; * @return {Array} An array of arrays representing the newly created matrix */ + Munkres.prototype.__make_matrix = function (n, val) { - const matrix = []; + var matrix = []; - for (let i = 0; i < n; ++i) { + for (var i = 0; i < n; ++i) { matrix[i] = []; - for (let j = 0; j < n; ++j) matrix[i][j] = val; + for (var j = 0; j < n; ++j) matrix[i][j] = val; } return matrix; @@ -3657,13 +3778,14 @@ const munkres$1 = { exports: {} }; * subtract it from every element in its row. Go to Step 2. */ + Munkres.prototype.__step1 = function () { - for (let i = 0; i < this.n; ++i) { + for (var i = 0; i < this.n; ++i) { // Find the minimum value for this row and subtract that minimum // from every element in the row. - const minval = Math.min.apply(Math, this.C[i]); + var minval = Math.min.apply(Math, this.C[i]); - for (let j = 0; j < this.n; ++j) this.C[i][j] -= minval; + for (var j = 0; j < this.n; ++j) this.C[i][j] -= minval; } return 2; @@ -3674,9 +3796,10 @@ const munkres$1 = { exports: {} }; * matrix. Go to Step 3. */ + Munkres.prototype.__step2 = function () { - for (let i = 0; i < this.n; ++i) { - for (let j = 0; j < this.n; ++j) { + for (var i = 0; i < this.n; ++i) { + for (var j = 0; j < this.n; ++j) { if (this.C[i][j] === 0 && !this.col_covered[j] && !this.row_covered[i]) { this.marked[i][j] = 1; this.col_covered[j] = true; @@ -3696,11 +3819,12 @@ const munkres$1 = { exports: {} }; * assignments. In this case, Go to DONE, otherwise, Go to Step 4. */ + Munkres.prototype.__step3 = function () { - let count = 0; + var count = 0; - for (let i = 0; i < this.n; ++i) { - for (let j = 0; j < this.n; ++j) { + for (var i = 0; i < this.n; ++i) { + for (var j = 0; j < this.n; ++j) { if (this.marked[i][j] == 1 && this.col_covered[j] == false) { this.col_covered[j] = true; ++count; @@ -3718,14 +3842,15 @@ const munkres$1 = { exports: {} }; * left. Save the smallest uncovered value and Go to Step 6. */ + Munkres.prototype.__step4 = function () { - const done = false; - let row = -1; - let col = -1; - let star_col = -1; + var done = false; + var row = -1, + col = -1, + star_col = -1; while (!done) { - const z = this.__find_a_zero(); + var z = this.__find_a_zero(); row = z[0]; col = z[1]; @@ -3755,14 +3880,15 @@ const munkres$1 = { exports: {} }; * primes and uncover every line in the matrix. Return to Step 3 */ + Munkres.prototype.__step5 = function () { - let count = 0; + var count = 0; this.path[count][0] = this.Z0_r; this.path[count][1] = this.Z0_c; - let done = false; + var done = false; while (!done) { - const row = this.__find_star_in_col(this.path[count][1]); + var row = this.__find_star_in_col(this.path[count][1]); if (row >= 0) { count++; @@ -3773,7 +3899,7 @@ const munkres$1 = { exports: {} }; } if (!done) { - const col = this.__find_prime_in_row(this.path[count][0]); + var col = this.__find_prime_in_row(this.path[count][0]); count++; this.path[count][0] = this.path[count - 1][0]; @@ -3796,11 +3922,12 @@ const munkres$1 = { exports: {} }; * lines. */ + Munkres.prototype.__step6 = function () { - const minval = this.__find_smallest(); + var minval = this.__find_smallest(); - for (let i = 0; i < this.n; ++i) { - for (let j = 0; j < this.n; ++j) { + for (var i = 0; i < this.n; ++i) { + for (var j = 0; j < this.n; ++j) { if (this.row_covered[i]) this.C[i][j] += minval; if (!this.col_covered[j]) this.C[i][j] -= minval; } @@ -3814,10 +3941,11 @@ const munkres$1 = { exports: {} }; * @return {Number} The smallest uncovered value, or MAX_SIZE if no value was found */ + Munkres.prototype.__find_smallest = function () { - let minval = MAX_SIZE; + var minval = MAX_SIZE; - for (let i = 0; i < this.n; ++i) for (let j = 0; j < this.n; ++j) if (!this.row_covered[i] && !this.col_covered[j]) if (minval > this.C[i][j]) minval = this.C[i][j]; + for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (!this.row_covered[i] && !this.col_covered[j]) if (minval > this.C[i][j]) minval = this.C[i][j]; return minval; }; @@ -3827,8 +3955,9 @@ const munkres$1 = { exports: {} }; * @return {Array} The indices of the found element or [-1, -1] if not found */ + Munkres.prototype.__find_a_zero = function () { - for (let i = 0; i < this.n; ++i) for (let j = 0; j < this.n; ++j) if (this.C[i][j] === 0 && !this.row_covered[i] && !this.col_covered[j]) return [i, j]; + for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.C[i][j] === 0 && !this.row_covered[i] && !this.col_covered[j]) return [i, j]; return [-1, -1]; }; @@ -3840,8 +3969,9 @@ const munkres$1 = { exports: {} }; * @return {Number} */ + Munkres.prototype.__find_star_in_row = function (row) { - for (let j = 0; j < this.n; ++j) if (this.marked[row][j] == 1) return j; + for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 1) return j; return -1; }; @@ -3851,8 +3981,9 @@ const munkres$1 = { exports: {} }; * @return {Number} The row index, or -1 if no starred element was found */ + Munkres.prototype.__find_star_in_col = function (col) { - for (let i = 0; i < this.n; ++i) if (this.marked[i][col] == 1) return i; + for (var i = 0; i < this.n; ++i) if (this.marked[i][col] == 1) return i; return -1; }; @@ -3862,27 +3993,30 @@ const munkres$1 = { exports: {} }; * @return {Number} The column index, or -1 if no prime element was found */ + Munkres.prototype.__find_prime_in_row = function (row) { - for (let j = 0; j < this.n; ++j) if (this.marked[row][j] == 2) return j; + for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 2) return j; return -1; }; Munkres.prototype.__convert_path = function (path, count) { - for (let i = 0; i <= count; ++i) this.marked[path[i][0]][path[i][1]] = this.marked[path[i][0]][path[i][1]] == 1 ? 0 : 1; + for (var i = 0; i <= count; ++i) this.marked[path[i][0]][path[i][1]] = this.marked[path[i][0]][path[i][1]] == 1 ? 0 : 1; }; /** Clear all covered matrix cells */ + Munkres.prototype.__clear_covers = function () { - for (let i = 0; i < this.n; ++i) { + for (var i = 0; i < this.n; ++i) { this.row_covered[i] = false; this.col_covered[i] = false; } }; /** Erase all prime markings */ + Munkres.prototype.__erase_primes = function () { - for (let i = 0; i < this.n; ++i) for (let j = 0; j < this.n; ++j) if (this.marked[i][j] == 2) this.marked[i][j] = 0; + for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.marked[i][j] == 2) this.marked[i][j] = 0; }; // --------------------------------------------------------------------------- // Functions // --------------------------------------------------------------------------- @@ -3910,12 +4044,12 @@ const munkres$1 = { exports: {} }; * @return {Array} The converted matrix */ + function make_cost_matrix(profit_matrix, inversion_function) { - let i; let - j; + var i, j; if (!inversion_function) { - let maximum = -1.0 / 0.0; + var maximum = -1.0 / 0.0; for (i = 0; i < profit_matrix.length; ++i) for (j = 0; j < profit_matrix[i].length; ++j) if (profit_matrix[i][j] > maximum) maximum = profit_matrix[i][j]; @@ -3924,10 +4058,10 @@ const munkres$1 = { exports: {} }; }; } - const cost_matrix = []; + var cost_matrix = []; for (i = 0; i < profit_matrix.length; ++i) { - const row = profit_matrix[i]; + var row = profit_matrix[i]; cost_matrix[i] = []; for (j = 0; j < row.length; ++j) cost_matrix[i][j] = inversion_function(profit_matrix[i][j]); @@ -3944,25 +4078,25 @@ const munkres$1 = { exports: {} }; * @return {String} The formatted matrix */ + function format_matrix(matrix) { - const columnWidths = []; - let i; let - j; + var columnWidths = []; + var i, j; for (i = 0; i < matrix.length; ++i) { for (j = 0; j < matrix[i].length; ++j) { - const entryWidth = String(matrix[i][j]).length; + var entryWidth = String(matrix[i][j]).length; if (!columnWidths[j] || entryWidth >= columnWidths[j]) columnWidths[j] = entryWidth; } } - let formatted = ''; + var formatted = ''; for (i = 0; i < matrix.length; ++i) { for (j = 0; j < matrix[i].length; ++j) { - let s = String(matrix[i][j]); // pad at front with spaces + var s = String(matrix[i][j]); // pad at front with spaces - while (s.length < columnWidths[j]) s = ` ${s}`; + while (s.length < columnWidths[j]) s = ' ' + s; formatted += s; // separate columns @@ -3977,12 +4111,13 @@ const munkres$1 = { exports: {} }; // Exports // --------------------------------------------------------------------------- + function computeMunkres(cost_matrix, options) { - const m = new Munkres(); + var m = new Munkres(); return m.compute(cost_matrix, options); } - computeMunkres.version = '1.2.2'; + computeMunkres.version = "1.2.2"; computeMunkres.format_matrix = format_matrix; computeMunkres.make_cost_matrix = make_cost_matrix; computeMunkres.Munkres = Munkres; // backwards compatibility @@ -3990,20 +4125,20 @@ const munkres$1 = { exports: {} }; if (module.exports) { module.exports = computeMunkres; } -}(munkres$1)); +})(munkres$1); -const itemTrackedModule = ItemTracked$1; -const { ItemTracked } = itemTrackedModule; -const { kdTree } = kdTreeMin; -const { iouAreas } = utils; -const munkres = munkres$1.exports; +var itemTrackedModule = ItemTracked$1; +var ItemTracked = itemTrackedModule.ItemTracked; +var kdTree = kdTreeMin.kdTree; +var munkres = munkres$1.exports; +var iouAreas = utils.iouAreas; -const iouDistance = function iouDistance(item1, item2) { +var iouDistance = function iouDistance(item1, item2) { // IOU distance, between 0 and 1 // The smaller the less overlap - const iou = iouAreas(item1, item2); // Invert this as the KDTREESEARCH is looking for the smaller value + var iou = iouAreas(item1, item2); // Invert this as the KDTREESEARCH is looking for the smaller value - let distance = 1 - iou; // If the overlap is iou < 0.95, exclude value + var distance = 1 - iou; // If the overlap is iou < 0.95, exclude value if (distance > 1 - params.iouLimit) { distance = params.distanceLimit + 1; @@ -4031,31 +4166,31 @@ var params = { distanceLimit: 10000, // The algorithm used to match tracks with new detections. Can be either // 'kdTree' or 'munkres'. - matchingAlgorithm: 'munkres', // matchingAlgorithm: 'kdTree', + matchingAlgorithm: 'munkres' // matchingAlgorithm: 'kdTree', }; // A dictionary of itemTracked currently tracked // key: uuid // value: ItemTracked object -let mapOfItemsTracked = new Map(); // A dictionnary keeping memory of all tracked object (even after they disappear) +var mapOfItemsTracked = new Map(); // A dictionnary keeping memory of all tracked object (even after they disappear) // Useful to ouput the file of all items tracked -let mapOfAllItemsTracked = new Map(); // By default, we do not keep all the history in memory +var mapOfAllItemsTracked = new Map(); // By default, we do not keep all the history in memory -let keepAllHistoryInMemory = false; -const computeDistance = tracker.computeDistance = iouDistance; +var keepAllHistoryInMemory = false; +var computeDistance = tracker.computeDistance = iouDistance; -const updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameNb) { +var updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameNb) { // A kd-tree containing all the itemtracked // Need to rebuild on each frame, because itemTracked positions have changed - let treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ['x', 'y', 'w', 'h']); // Contruct a kd tree for the detections of this frame + var treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ['x', 'y', 'w', 'h']); // Contruct a kd tree for the detections of this frame - const treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ['x', 'y', 'w', 'h']); // SCENARIO 1: itemsTracked map is empty + var treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ['x', 'y', 'w', 'h']); // SCENARIO 1: itemsTracked map is empty if (mapOfItemsTracked.size === 0) { // Just add every detected item as item Tracked - detectionsOfThisFrame.forEach((itemDetected) => { - const newItemTracked = new ItemTracked(itemDetected, frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map + detectionsOfThisFrame.forEach(function (itemDetected) { + var newItemTracked = new ItemTracked(itemDetected, frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree @@ -4063,70 +4198,81 @@ const updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = }); } // SCENARIO 2: We already have itemsTracked in the map else { - const matchedList = new Array(detectionsOfThisFrame.length); + var matchedList = new Array(detectionsOfThisFrame.length); matchedList.fill(false); // Match existing Tracked items with the items detected in the new frame // For each look in the new detection to find the closest match if (detectionsOfThisFrame.length > 0) { if (params.matchingAlgorithm === 'munkres') { - const trackedItemIds = Array.from(mapOfItemsTracked.keys()); - const costMatrix = Array.from(mapOfItemsTracked.values()).map((itemTracked) => { - const predictedPosition = itemTracked.predictNextPosition(); - return detectionsOfThisFrame.map((detection) => params.distanceFunc(predictedPosition, detection)); + var trackedItemIds = Array.from(mapOfItemsTracked.keys()); + var costMatrix = Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { + var predictedPosition = itemTracked.predictNextPosition(); + return detectionsOfThisFrame.map(function (detection) { + return params.distanceFunc(predictedPosition, detection); + }); }); - mapOfItemsTracked.forEach((itemTracked) => { + mapOfItemsTracked.forEach(function (itemTracked) { itemTracked.makeAvailable(); }); - munkres(costMatrix).filter((m) => costMatrix[m[0]][m[1]] <= params.distanceLimit).forEach((m) => { - const itemTracked = mapOfItemsTracked.get(trackedItemIds[m[0]]); - const updatedTrackedItemProperties = detectionsOfThisFrame[m[1]]; + munkres(costMatrix).filter(function (m) { + return costMatrix[m[0]][m[1]] <= params.distanceLimit; + }).forEach(function (m) { + var itemTracked = mapOfItemsTracked.get(trackedItemIds[m[0]]); + var updatedTrackedItemProperties = detectionsOfThisFrame[m[1]]; matchedList[m[1]] = { - idDisplay: itemTracked.idDisplay, + idDisplay: itemTracked.idDisplay }; itemTracked.makeUnavailable().update(updatedTrackedItemProperties, frameNb); }); - matchedList.forEach((matched, index) => { + matchedList.forEach(function (matched, index) { if (!matched) { - if (Math.min.apply(Math, _toConsumableArray(costMatrix.map((m) => m[index]))) > params.distanceLimit) { - const newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); + if (Math.min.apply(Math, _toConsumableArray(costMatrix.map(function (m) { + return m[index]; + }))) > params.distanceLimit) { + var newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); mapOfItemsTracked.set(newItemTracked.id, newItemTracked); newItemTracked.makeUnavailable(); - costMatrix.push(detectionsOfThisFrame.map((detection) => params.distanceFunc(newItemTracked, detection))); + costMatrix.push(detectionsOfThisFrame.map(function (detection) { + return params.distanceFunc(newItemTracked, detection); + })); } } }); } else if (params.matchingAlgorithm === 'kdTree') { - mapOfItemsTracked.forEach((itemTracked) => { + mapOfItemsTracked.forEach(function (itemTracked) { // First predict the new position of the itemTracked - const predictedPosition = itemTracked.predictNextPosition(); // Make available for matching + var predictedPosition = itemTracked.predictNextPosition(); // Make available for matching itemTracked.makeAvailable(); // Search for a detection that matches - const treeSearchResult = treeDetectionsOfThisFrame.nearest(predictedPosition, 1, params.distanceLimit)[0]; // Only for debug assessments of predictions + var treeSearchResult = treeDetectionsOfThisFrame.nearest(predictedPosition, 1, params.distanceLimit)[0]; // Only for debug assessments of predictions treeDetectionsOfThisFrame.nearest(itemTracked, 1, params.distanceLimit)[0]; // Only if we enable the extra refinement treeDetectionsOfThisFrame.nearest(predictedPosition, 2, params.distanceLimit); // If we have found something if (treeSearchResult) { - const indexClosestNewDetectedItem = detectionsOfThisFrame.indexOf(treeSearchResult[0]); // If this detections was not already matched to a tracked item + + var indexClosestNewDetectedItem = detectionsOfThisFrame.indexOf(treeSearchResult[0]); // If this detections was not already matched to a tracked item // (otherwise it would be matched to two tracked items...) if (!matchedList[indexClosestNewDetectedItem]) { matchedList[indexClosestNewDetectedItem] = { - idDisplay: itemTracked.idDisplay, + idDisplay: itemTracked.idDisplay }; // Update properties of tracked object - const updatedTrackedItemProperties = detectionsOfThisFrame[indexClosestNewDetectedItem]; + var updatedTrackedItemProperties = detectionsOfThisFrame[indexClosestNewDetectedItem]; mapOfItemsTracked.get(itemTracked.id).makeUnavailable().update(updatedTrackedItemProperties, frameNb); } } }); } else { - throw 'Unknown matching algorithm "'.concat(params.matchingAlgorithm, '"'); + throw "Unknown matching algorithm \"".concat(params.matchingAlgorithm, "\""); } } else { - mapOfItemsTracked.forEach((itemTracked) => { + + + mapOfItemsTracked.forEach(function (itemTracked) { itemTracked.makeAvailable(); }); } @@ -4139,14 +4285,14 @@ const updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = // Rebuild tracked item tree to take in account the new positions treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ['x', 'y', 'w', 'h']); // console.log(`Nb new items Unmatched : ${matchedList.filter((isMatched) => isMatched === false).length}`) - matchedList.forEach((matched, index) => { + matchedList.forEach(function (matched, index) { // Iterate through unmatched new detections if (!matched) { // Do not add as new tracked item if it is to similar to an existing one - const treeSearchResult = treeItemsTracked.nearest(detectionsOfThisFrame[index], 1, params.distanceLimit)[0]; + var treeSearchResult = treeItemsTracked.nearest(detectionsOfThisFrame[index], 1, params.distanceLimit)[0]; if (!treeSearchResult) { - const newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map + var newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree @@ -4160,13 +4306,14 @@ const updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = } // Start killing the itemTracked (and predicting next position) // that are tracked but haven't been matched this frame - mapOfItemsTracked.forEach((itemTracked) => { + + mapOfItemsTracked.forEach(function (itemTracked) { if (itemTracked.available) { itemTracked.countDown(frameNb); itemTracked.updateTheoricalPositionAndSize(); if (itemTracked.isDead()) { - mapOfItemsTracked.delete(itemTracked.id); + mapOfItemsTracked["delete"](itemTracked.id); treeItemsTracked.remove(itemTracked); if (keepAllHistoryInMemory) { @@ -4178,50 +4325,60 @@ const updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = } }; -const reset = tracker.reset = function () { +var reset = tracker.reset = function () { mapOfItemsTracked = new Map(); mapOfAllItemsTracked = new Map(); itemTrackedModule.reset(); }; -const setParams = tracker.setParams = function (newParams) { - Object.keys(newParams).forEach((key) => { +var setParams = tracker.setParams = function (newParams) { + Object.keys(newParams).forEach(function (key) { params[key] = newParams[key]; }); }; -const enableKeepInMemory = tracker.enableKeepInMemory = function () { +var enableKeepInMemory = tracker.enableKeepInMemory = function () { keepAllHistoryInMemory = true; }; -const disableKeepInMemory = tracker.disableKeepInMemory = function () { +var disableKeepInMemory = tracker.disableKeepInMemory = function () { keepAllHistoryInMemory = false; }; -const getJSONOfTrackedItems = tracker.getJSONOfTrackedItems = function () { - const roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - return Array.from(mapOfItemsTracked.values()).map((itemTracked) => itemTracked.toJSON(roundInt)); +var getJSONOfTrackedItems = tracker.getJSONOfTrackedItems = function () { + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { + return itemTracked.toJSON(roundInt); + }); }; -const getJSONDebugOfTrackedItems = tracker.getJSONDebugOfTrackedItems = function () { - const roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - return Array.from(mapOfItemsTracked.values()).map((itemTracked) => itemTracked.toJSONDebug(roundInt)); +var getJSONDebugOfTrackedItems = tracker.getJSONDebugOfTrackedItems = function () { + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { + return itemTracked.toJSONDebug(roundInt); + }); }; -const getTrackedItemsInMOTFormat = tracker.getTrackedItemsInMOTFormat = function (frameNb) { - return Array.from(mapOfItemsTracked.values()).map((itemTracked) => itemTracked.toMOT(frameNb)); +var getTrackedItemsInMOTFormat = tracker.getTrackedItemsInMOTFormat = function (frameNb) { + return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { + return itemTracked.toMOT(frameNb); + }); }; // Work only if keepInMemory is enabled -const getAllTrackedItems = tracker.getAllTrackedItems = function () { + +var getAllTrackedItems = tracker.getAllTrackedItems = function () { return mapOfAllItemsTracked; }; // Work only if keepInMemory is enabled -const getJSONOfAllTrackedItems = tracker.getJSONOfAllTrackedItems = function () { - return Array.from(mapOfAllItemsTracked.values()).map((itemTracked) => itemTracked.toJSONGenericInfo()); + +var getJSONOfAllTrackedItems = tracker.getJSONOfAllTrackedItems = function () { + return Array.from(mapOfAllItemsTracked.values()).map(function (itemTracked) { + return itemTracked.toJSONGenericInfo(); + }); }; exports.computeDistance = computeDistance; -exports.default = tracker; +exports["default"] = tracker; exports.disableKeepInMemory = disableKeepInMemory; exports.enableKeepInMemory = enableKeepInMemory; exports.getAllTrackedItems = getAllTrackedItems; diff --git a/bundle.iife.js b/bundle.iife.js new file mode 100644 index 0000000..378df47 --- /dev/null +++ b/bundle.iife.js @@ -0,0 +1,3569 @@ +var Tracker = (function (exports) { + 'use strict'; + + function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); + } + + function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); + } + + function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); + } + + function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } + + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + + return arr2; + } + + function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + + var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + var tracker = {}; + + var ItemTracked$1 = {}; + + var rngBrowser = {exports: {}}; + + // browser this is a little complicated due to unknown quality of Math.random() + // and inconsistent support for the `crypto` API. We do the best we can via + // feature-detection + // getRandomValues needs to be invoked in a context where "this" is a Crypto + // implementation. Also, find the complete implementation of crypto on IE11. + + var getRandomValues = typeof crypto != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto); + + if (getRandomValues) { + // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto + var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef + + rngBrowser.exports = function whatwgRNG() { + getRandomValues(rnds8); + return rnds8; + }; + } else { + // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). It's fast, but is of unspecified + // quality. + var rnds = new Array(16); + + rngBrowser.exports = function mathRNG() { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) r = Math.random() * 0x100000000; + rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return rnds; + }; + } + + /** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ + var byteToHex = []; + + for (var i = 0; i < 256; ++i) { + byteToHex[i] = (i + 0x100).toString(16).substr(1); + } + + function bytesToUuid$1(buf, offset) { + var i = offset || 0; + var bth = byteToHex; // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 + + return [bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]]].join(''); + } + + var bytesToUuid_1 = bytesToUuid$1; + + var rng = rngBrowser.exports; + var bytesToUuid = bytesToUuid_1; + + function v4(options, buf, offset) { + var i = buf && offset || 0; + + if (typeof options == 'string') { + buf = options === 'binary' ? new Array(16) : null; + options = null; + } + + options = options || {}; + var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || bytesToUuid(rnds); + } + + var v4_1 = v4; + + var utils = {}; + + utils.isDetectionTooLarge = function (detections, largestAllowed) { + if (detections.w >= largestAllowed) { + return true; + } + + return false; + }; + + var isInsideArea = function isInsideArea(area, point) { + var xMin = area.x - area.w / 2; + var xMax = area.x + area.w / 2; + var yMin = area.y - area.h / 2; + var yMax = area.y + area.h / 2; + + if (point.x >= xMin && point.x <= xMax && point.y >= yMin && point.y <= yMax) { + return true; + } + + return false; + }; + + utils.isInsideArea = isInsideArea; + + utils.isInsideSomeAreas = function (areas, point) { + var isInside = areas.some(function (area) { + return isInsideArea(area, point); + }); + return isInside; + }; + + utils.ignoreObjectsNotToDetect = function (detections, objectsToDetect) { + return detections.filter(function (detection) { + return objectsToDetect.indexOf(detection.name) > -1; + }); + }; + + var getRectangleEdges = function getRectangleEdges(item) { + return { + x0: item.x - item.w / 2, + y0: item.y - item.h / 2, + x1: item.x + item.w / 2, + y1: item.y + item.h / 2 + }; + }; + + utils.getRectangleEdges = getRectangleEdges; + + utils.iouAreas = function (item1, item2) { + var rect1 = getRectangleEdges(item1); + var rect2 = getRectangleEdges(item2); // Get overlap rectangle + + var overlap_x0 = Math.max(rect1.x0, rect2.x0); + var overlap_y0 = Math.max(rect1.y0, rect2.y0); + var overlap_x1 = Math.min(rect1.x1, rect2.x1); + var overlap_y1 = Math.min(rect1.y1, rect2.y1); // if there an overlap + + if (overlap_x1 - overlap_x0 <= 0 || overlap_y1 - overlap_y0 <= 0) { + // no overlap + return 0; + } + + var area_rect1 = item1.w * item1.h; + var area_rect2 = item2.w * item2.h; + var area_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0); + var area_union = area_rect1 + area_rect2 - area_intersection; + return area_intersection / area_union; + }; + + utils.computeVelocityVector = function (item1, item2, nbFrame) { + return { + dx: (item2.x - item1.x) / nbFrame, + dy: (item2.y - item1.y) / nbFrame + }; + }; + /* + + computeBearingIn360 + + dY + + ^ XX + | XXX + | XX + | XX + | XX + | XXX + | XX + | XX + | XX bearing = this angle in degree + | XX + |XX + +----------------------XX-----------------------> dX + | + | + | + | + | + | + | + | + | + | + | + + + + */ + + + utils.computeBearingIn360 = function (dx, dy) { + var angle = Math.atan(dx / dy) / (Math.PI / 180); + + if (angle > 0) { + if (dy > 0) { + return angle; + } + + return 180 + angle; + } + + if (dx > 0) { + return 180 + angle; + } + + return 360 + angle; + }; + + (function (exports) { + var uuidv4 = v4_1; + var computeBearingIn360 = utils.computeBearingIn360; + var computeVelocityVector = utils.computeVelocityVector; // Properties example + // { + // "x": 1021, + // "y": 65, + // "w": 34, + // "h": 27, + // "confidence": 26, + // "name": "car" + // } + + /** The maximum length of the item history. */ + + exports.ITEM_HISTORY_MAX_LENGTH = 15; // Use a simple incremental unique id for the display + + var idDisplay = 0; + + exports.ItemTracked = function (properties, frameNb, unMatchedFramesTolerance, fastDelete) { + var DEFAULT_UNMATCHEDFRAMES_TOLERANCE = unMatchedFramesTolerance; + var itemTracked = {}; // ==== Private ===== + // Am I available to be matched? + + itemTracked.available = true; // Should I be deleted? + + itemTracked["delete"] = false; + itemTracked.fastDelete = fastDelete; // How many unmatched frame should I survive? + + itemTracked.frameUnmatchedLeftBeforeDying = unMatchedFramesTolerance; + itemTracked.isZombie = false; + itemTracked.appearFrame = frameNb; + itemTracked.disappearFrame = null; + itemTracked.disappearArea = {}; // Keep track of the most counted class + + itemTracked.nameCount = {}; + itemTracked.nameCount[properties.name] = 1; // ==== Public ===== + + itemTracked.x = properties.x; + itemTracked.y = properties.y; + itemTracked.w = properties.w; + itemTracked.h = properties.h; + itemTracked.name = properties.name; + itemTracked.confidence = properties.confidence; + itemTracked.itemHistory = []; + itemTracked.itemHistory.push({ + x: properties.x, + y: properties.y, + w: properties.w, + h: properties.h, + confidence: properties.confidence + }); + + if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { + itemTracked.itemHistory.shift(); + } + + itemTracked.velocity = { + dx: 0, + dy: 0 + }; + itemTracked.nbTimeMatched = 1; // Assign an unique id to each Item tracked + + itemTracked.id = uuidv4(); // Use an simple id for the display and debugging + + itemTracked.idDisplay = idDisplay; + idDisplay++; // Give me a new location / size + + itemTracked.update = function (properties, frameNb) { + // if it was zombie and disappear frame was set, reset it to null + if (this.disappearFrame) { + this.disappearFrame = null; + this.disappearArea = {}; + } + + this.isZombie = false; + this.nbTimeMatched += 1; + this.x = properties.x; + this.y = properties.y; + this.w = properties.w; + this.h = properties.h; + this.confidence = properties.confidence; + this.itemHistory.push({ + x: this.x, + y: this.y, + w: this.w, + h: this.h, + confidence: this.confidence + }); + + if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { + itemTracked.itemHistory.shift(); + } + + this.name = properties.name; + + if (this.nameCount[properties.name]) { + this.nameCount[properties.name]++; + } else { + this.nameCount[properties.name] = 1; + } // Reset dying counter + + + this.frameUnmatchedLeftBeforeDying = DEFAULT_UNMATCHEDFRAMES_TOLERANCE; // Compute new velocityVector based on last positions history + + this.velocity = this.updateVelocityVector(); + }; + + itemTracked.makeAvailable = function () { + this.available = true; + return this; + }; + + itemTracked.makeUnavailable = function () { + this.available = false; + return this; + }; + + itemTracked.countDown = function (frameNb) { + // Set frame disappear number + if (this.disappearFrame === null) { + this.disappearFrame = frameNb; + this.disappearArea = { + x: this.x, + y: this.y, + w: this.w, + h: this.h + }; + } + + this.frameUnmatchedLeftBeforeDying--; + this.isZombie = true; // If it was matched less than 1 time, it should die quick + + if (this.fastDelete && this.nbTimeMatched <= 1) { + this.frameUnmatchedLeftBeforeDying = -1; + } + }; + + itemTracked.updateTheoricalPositionAndSize = function () { + this.itemHistory.push({ + x: this.x, + y: this.y, + w: this.w, + h: this.h, + confidence: this.confidence + }); + + if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { + itemTracked.itemHistory.shift(); + } + + this.x += this.velocity.dx; + this.y += this.velocity.dy; + }; + + itemTracked.predictNextPosition = function () { + return { + x: this.x + this.velocity.dx, + y: this.y + this.velocity.dy, + w: this.w, + h: this.h + }; + }; + + itemTracked.isDead = function () { + return this.frameUnmatchedLeftBeforeDying < 0; + }; // Velocity vector based on the last 15 frames + + + itemTracked.updateVelocityVector = function () { + if (exports.ITEM_HISTORY_MAX_LENGTH <= 2) { + return { + dx: undefined, + dy: undefined + }; + } + + if (this.itemHistory.length <= exports.ITEM_HISTORY_MAX_LENGTH) { + var _start = this.itemHistory[0]; + var _end = this.itemHistory[this.itemHistory.length - 1]; + return computeVelocityVector(_start, _end, this.itemHistory.length); + } + + var start = this.itemHistory[this.itemHistory.length - exports.ITEM_HISTORY_MAX_LENGTH]; + var end = this.itemHistory[this.itemHistory.length - 1]; + return computeVelocityVector(start, end, exports.ITEM_HISTORY_MAX_LENGTH); + }; + + itemTracked.getMostlyMatchedName = function () { + var _this = this; + + var nameMostlyMatchedOccurences = 0; + var nameMostlyMatched = ''; + Object.keys(this.nameCount).map(function (name) { + if (_this.nameCount[name] > nameMostlyMatchedOccurences) { + nameMostlyMatched = name; + nameMostlyMatchedOccurences = _this.nameCount[name]; + } + }); + return nameMostlyMatched; + }; + + itemTracked.toJSONDebug = function () { + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return { + id: this.id, + idDisplay: this.idDisplay, + x: roundInt ? parseInt(this.x, 10) : this.x, + y: roundInt ? parseInt(this.y, 10) : this.y, + w: roundInt ? parseInt(this.w, 10) : this.w, + h: roundInt ? parseInt(this.h, 10) : this.h, + confidence: Math.round(this.confidence * 100) / 100, + // Here we negate dy to be in "normal" carthesian coordinates + bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy)), + name: this.getMostlyMatchedName(), + isZombie: this.isZombie, + appearFrame: this.appearFrame, + disappearFrame: this.disappearFrame + }; + }; + + itemTracked.toJSON = function () { + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return { + id: this.idDisplay, + x: roundInt ? parseInt(this.x, 10) : this.x, + y: roundInt ? parseInt(this.y, 10) : this.y, + w: roundInt ? parseInt(this.w, 10) : this.w, + h: roundInt ? parseInt(this.h, 10) : this.h, + confidence: Math.round(this.confidence * 100) / 100, + // Here we negate dy to be in "normal" carthesian coordinates + bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy), 10), + name: this.getMostlyMatchedName(), + isZombie: this.isZombie + }; + }; + + itemTracked.toMOT = function (frameIndex) { + return "".concat(frameIndex, ",").concat(this.idDisplay, ",").concat(this.x - this.w / 2, ",").concat(this.y - this.h / 2, ",").concat(this.w, ",").concat(this.h, ",").concat(this.confidence / 100, ",-1,-1,-1"); + }; + + itemTracked.toJSONGenericInfo = function () { + return { + id: this.id, + idDisplay: this.idDisplay, + appearFrame: this.appearFrame, + disappearFrame: this.disappearFrame, + disappearArea: this.disappearArea, + nbActiveFrame: this.disappearFrame - this.appearFrame, + name: this.getMostlyMatchedName() + }; + }; + + return itemTracked; + }; + + exports.reset = function () { + idDisplay = 0; + }; + })(ItemTracked$1); + + var kdTreeMin = {}; + + /** + * k-d Tree JavaScript - V 1.01 + * + * https://github.com/ubilabs/kd-tree-javascript + * + * @author Mircea Pricop , 2012 + * @author Martin Kleppe , 2012 + * @author Ubilabs http://ubilabs.net, 2012 + * @license MIT License + */ + + (function (exports) { + !function (t, n) { + n(exports ); + }(commonjsGlobal, function (t) { + function n(t, n, o) { + this.obj = t, this.left = null, this.right = null, this.parent = o, this.dimension = n; + } + + function o(t) { + this.content = [], this.scoreFunction = t; + } + + o.prototype = { + push: function (t) { + this.content.push(t), this.bubbleUp(this.content.length - 1); + }, + pop: function () { + var t = this.content[0], + n = this.content.pop(); + return this.content.length > 0 && (this.content[0] = n, this.sinkDown(0)), t; + }, + peek: function () { + return this.content[0]; + }, + remove: function (t) { + for (var n = this.content.length, o = 0; o < n; o++) if (this.content[o] == t) { + var i = this.content.pop(); + return void (o != n - 1 && (this.content[o] = i, this.scoreFunction(i) < this.scoreFunction(t) ? this.bubbleUp(o) : this.sinkDown(o))); + } + + throw new Error("Node not found."); + }, + size: function () { + return this.content.length; + }, + bubbleUp: function (t) { + for (var n = this.content[t]; t > 0;) { + var o = Math.floor((t + 1) / 2) - 1, + i = this.content[o]; + if (!(this.scoreFunction(n) < this.scoreFunction(i))) break; + this.content[o] = n, this.content[t] = i, t = o; + } + }, + sinkDown: function (t) { + for (var n = this.content.length, o = this.content[t], i = this.scoreFunction(o);;) { + var e = 2 * (t + 1), + r = e - 1, + l = null; + + if (r < n) { + var u = this.content[r], + h = this.scoreFunction(u); + h < i && (l = r); + } + + if (e < n) { + var s = this.content[e]; + this.scoreFunction(s) < (null == l ? i : h) && (l = e); + } + + if (null == l) break; + this.content[t] = this.content[l], this.content[l] = o, t = l; + } + } + }, t.kdTree = function (t, i, e) { + function r(t, o, i) { + var l, + u, + h = o % e.length; + return 0 === t.length ? null : 1 === t.length ? new n(t[0], h, i) : (t.sort(function (t, n) { + return t[e[h]] - n[e[h]]; + }), l = Math.floor(t.length / 2), u = new n(t[l], h, i), u.left = r(t.slice(0, l), o + 1, u), u.right = r(t.slice(l + 1), o + 1, u), u); + } + + var l = this; + Array.isArray(t) ? this.root = r(t, 0, null) : function (t) { + function n(t) { + t.left && (t.left.parent = t, n(t.left)), t.right && (t.right.parent = t, n(t.right)); + } + + l.root = t, n(l.root); + }(t), this.toJSON = function (t) { + t || (t = this.root); + var o = new n(t.obj, t.dimension, null); + return t.left && (o.left = l.toJSON(t.left)), t.right && (o.right = l.toJSON(t.right)), o; + }, this.insert = function (t) { + function o(n, i) { + if (null === n) return i; + var r = e[n.dimension]; + return t[r] < n.obj[r] ? o(n.left, n) : o(n.right, n); + } + + var i, + r, + l = o(this.root, null); + null !== l ? (i = new n(t, (l.dimension + 1) % e.length, l), r = e[l.dimension], t[r] < l.obj[r] ? l.left = i : l.right = i) : this.root = new n(t, 0, null); + }, this.remove = function (t) { + function n(o) { + if (null === o) return null; + if (o.obj === t) return o; + var i = e[o.dimension]; + return t[i] < o.obj[i] ? n(o.left) : n(o.right); + } + + function o(t) { + function n(t, o) { + var i, r, l, u, h; + return null === t ? null : (i = e[o], t.dimension === o ? null !== t.left ? n(t.left, o) : t : (r = t.obj[i], l = n(t.left, o), u = n(t.right, o), h = t, null !== l && l.obj[i] < r && (h = l), null !== u && u.obj[i] < h.obj[i] && (h = u), h)); + } + + var i, r, u; + if (null === t.left && null === t.right) return null === t.parent ? void (l.root = null) : (u = e[t.parent.dimension], void (t.obj[u] < t.parent.obj[u] ? t.parent.left = null : t.parent.right = null)); + null !== t.right ? (r = (i = n(t.right, t.dimension)).obj, o(i), t.obj = r) : (r = (i = n(t.left, t.dimension)).obj, o(i), t.right = t.left, t.left = null, t.obj = r); + } + + var i; + null !== (i = n(l.root)) && o(i); + }, this.nearest = function (t, n, r) { + function u(o) { + function r(t, o) { + f.push([t, o]), f.size() > n && f.pop(); + } + + var l, + h, + s, + c, + a = e[o.dimension], + g = i(t, o.obj), + p = {}; + + for (c = 0; c < e.length; c += 1) c === o.dimension ? p[e[c]] = t[e[c]] : p[e[c]] = o.obj[e[c]]; + + h = i(p, o.obj), null !== o.right || null !== o.left ? (u(l = null === o.right ? o.left : null === o.left ? o.right : t[a] < o.obj[a] ? o.left : o.right), (f.size() < n || g < f.peek()[1]) && r(o, g), (f.size() < n || Math.abs(h) < f.peek()[1]) && null !== (s = l === o.left ? o.right : o.left) && u(s)) : (f.size() < n || g < f.peek()[1]) && r(o, g); + } + + var h, s, f; + if (f = new o(function (t) { + return -t[1]; + }), r) for (h = 0; h < n; h += 1) f.push([null, r]); + + for (l.root && u(l.root), s = [], h = 0; h < Math.min(n, f.content.length); h += 1) f.content[h][0] && s.push([f.content[h][0].obj, f.content[h][1]]); + + return s; + }, this.balanceFactor = function () { + function t(n) { + return null === n ? 0 : Math.max(t(n.left), t(n.right)) + 1; + } + + function n(t) { + return null === t ? 0 : n(t.left) + n(t.right) + 1; + } + + return t(l.root) / (Math.log(n(l.root)) / Math.log(2)); + }; + }, t.BinaryHeap = o; + }); + })(kdTreeMin); + + var lodash_isequal = {exports: {}}; + + /** + * Lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright JS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + + (function (module, exports) { + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + /** Used to stand-in for `undefined` hash values. */ + + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + /** Used to compose bitmasks for value comparisons. */ + + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + /** Used as references for various `Number` constants. */ + + var MAX_SAFE_INTEGER = 9007199254740991; + /** `Object#toString` result references. */ + + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]'; + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + /** Used to detect host constructors (Safari). */ + + var reIsHostCtor = /^\[object .+?Constructor\]$/; + /** Used to detect unsigned integer values. */ + + var reIsUint = /^(?:0|[1-9]\d*)$/; + /** Used to identify `toStringTag` values of typed arrays. */ + + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + /** Detect free variable `global` from Node.js. */ + + var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + /** Detect free variable `self`. */ + + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + /** Used as a reference to the global object. */ + + var root = freeGlobal || freeSelf || Function('return this')(); + /** Detect free variable `exports`. */ + + var freeExports = exports && !exports.nodeType && exports; + /** Detect free variable `module`. */ + + var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; + /** Detect the popular CommonJS extension `module.exports`. */ + + var moduleExports = freeModule && freeModule.exports === freeExports; + /** Detect free variable `process` from Node.js. */ + + var freeProcess = moduleExports && freeGlobal.process; + /** Used to access faster Node.js helpers. */ + + var nodeUtil = function () { + try { + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + }(); + /* Node.js helper references. */ + + + var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + + return result; + } + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + + + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + + return array; + } + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + + + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + + return false; + } + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + + + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + + return result; + } + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + + + function baseUnary(func) { + return function (value) { + return func(value); + }; + } + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function cacheHas(cache, key) { + return cache.has(key); + } + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + + + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + + + function mapToArray(map) { + var index = -1, + result = Array(map.size); + map.forEach(function (value, key) { + result[++index] = [key, value]; + }); + return result; + } + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + + + function overArg(func, transform) { + return function (arg) { + return func(transform(arg)); + }; + } + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + + + function setToArray(set) { + var index = -1, + result = Array(set.size); + set.forEach(function (value) { + result[++index] = value; + }); + return result; + } + /** Used for built-in method references. */ + + + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + /** Used to detect overreaching core-js shims. */ + + var coreJsData = root['__core-js_shared__']; + /** Used to resolve the decompiled source of functions. */ + + var funcToString = funcProto.toString; + /** Used to check objects for own properties. */ + + var hasOwnProperty = objectProto.hasOwnProperty; + /** Used to detect methods masquerading as native. */ + + var maskSrcKey = function () { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? 'Symbol(src)_1.' + uid : ''; + }(); + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + + + var nativeObjectToString = objectProto.toString; + /** Used to detect if a method is native. */ + + var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); + /** Built-in value references. */ + + var Buffer = moduleExports ? root.Buffer : undefined, + Symbol = root.Symbol, + Uint8Array = root.Uint8Array, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + /* Built-in method references for those with the same name as other `lodash` methods. */ + + var nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeKeys = overArg(Object.keys, Object); + /* Built-in method references that are verified to be native. */ + + var DataView = getNative(root, 'DataView'), + Map = getNative(root, 'Map'), + Promise = getNative(root, 'Promise'), + Set = getNative(root, 'Set'), + WeakMap = getNative(root, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + /** Used to detect maps, sets, and weakmaps. */ + + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + /** Used to convert symbols to primitives and strings. */ + + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + this.clear(); + + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + + + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function hashGet(key) { + var data = this.__data__; + + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); + } + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + + + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value; + return this; + } // Add methods to `Hash`. + + + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + this.clear(); + + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + + + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + + var lastIndex = data.length - 1; + + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + + --this.size; + return true; + } + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + return index < 0 ? undefined : data[index][1]; + } + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + + + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + + return this; + } // Add methods to `ListCache`. + + + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + this.clear(); + + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + + + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash(), + 'map': new (Map || ListCache)(), + 'string': new Hash() + }; + } + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + + + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } // Add methods to `MapCache`. + + + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + this.__data__ = new MapCache(); + + while (++index < length) { + this.add(values[index]); + } + } + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + + + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + + return this; + } + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + + + function setCacheHas(value) { + return this.__data__.has(value); + } // Add methods to `SetCache`. + + + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + + + function stackClear() { + this.__data__ = new ListCache(); + this.size = 0; + } + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + this.size = data.size; + return result; + } + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function stackGet(key) { + return this.__data__.get(key); + } + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function stackHas(key) { + return this.__data__.has(key); + } + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + + + function stackSet(key, value) { + var data = this.__data__; + + if (data instanceof ListCache) { + var pairs = data.__data__; + + if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + + data = this.__data__ = new MapCache(pairs); + } + + data.set(key, value); + this.size = data.size; + return this; + } // Add methods to `Stack`. + + + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. + isBuff && (key == 'offset' || key == 'parent') || // PhantomJS 2 has enumerable non-index properties on typed arrays. + isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || // Skip index properties. + isIndex(key, length)))) { + result.push(key); + } + } + + return result; + } + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + + + function assocIndexOf(array, key) { + var length = array.length; + + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + + return -1; + } + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + + + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + + + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + + return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); + } + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + + + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + + + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + + if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) { + return value !== value && other !== other; + } + + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + + + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + + objIsArr = true; + objIsObj = false; + } + + if (isSameTag && !objIsObj) { + stack || (stack = new Stack()); + return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + stack || (stack = new Stack()); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + + if (!isSameTag) { + return false; + } + + stack || (stack = new Stack()); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + + + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + + + function baseIsTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + + + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + + var result = []; + + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + + return result; + } + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + + + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } // Assume cyclic values are equal. + + + var stacked = stack.get(array); + + if (stacked && stack.get(other)) { + return stacked == other; + } + + var index = -1, + result = true, + seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined; + stack.set(array, other); + stack.set(other, array); // Ignore non-index properties. + + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); + } + + if (compared !== undefined) { + if (compared) { + continue; + } + + result = false; + break; + } // Recursively compare arrays (susceptible to call stack limits). + + + if (seen) { + if (!arraySome(other, function (othValue, othIndex) { + if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + result = false; + break; + } + } + + stack['delete'](array); + stack['delete'](other); + return result; + } + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + + + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { + return false; + } + + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == other + ''; + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } // Assume cyclic values are equal. + + + var stacked = stack.get(object); + + if (stacked) { + return stacked == other; + } + + bitmask |= COMPARE_UNORDERED_FLAG; // Recursively compare objects (susceptible to call stack limits). + + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + + } + + return false; + } + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + + + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + + var index = objLength; + + while (index--) { + var key = objProps[index]; + + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } // Assume cyclic values are equal. + + + var stacked = stack.get(object); + + if (stacked && stack.get(other)) { + return stacked == other; + } + + var result = true; + stack.set(object, other); + stack.set(other, object); + var skipCtor = isPartial; + + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); + } // Recursively compare objects (susceptible to call stack limits). + + + if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { + result = false; + break; + } + + skipCtor || (skipCtor = key == 'constructor'); + } + + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. + + if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + + stack['delete'](object); + stack['delete'](other); + return result; + } + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + + + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + + + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; + } + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + + + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + + + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + + return result; + } + /** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + + + var getSymbols = !nativeGetSymbols ? stubArray : function (object) { + if (object == null) { + return []; + } + + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function (symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + + var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + + if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) { + getTag = function (value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag; + + case mapCtorString: + return mapTag; + + case promiseCtorString: + return promiseTag; + + case setCtorString: + return setTag; + + case weakMapCtorString: + return weakMapTag; + } + } + + return result; + }; + } + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + + + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length; + } + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + + + function isKeyable(value) { + var type = typeof value; + return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null; + } + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + + + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + + + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = typeof Ctor == 'function' && Ctor.prototype || objectProto; + return value === proto; + } + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + + + function objectToString(value) { + return nativeObjectToString.call(value); + } + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + + + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + + try { + return func + ''; + } catch (e) {} + } + + return ''; + } + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + + + function eq(value, other) { + return value === other || value !== value && other !== other; + } + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + + + var isArguments = baseIsArguments(function () { + return arguments; + }()) ? baseIsArguments : function (value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); + }; + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + + var isArray = Array.isArray; + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + + + var isBuffer = nativeIsBuffer || stubFalse; + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + + function isEqual(value, other) { + return baseIsEqual(value, other); + } + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + + + function isFunction(value) { + if (!isObject(value)) { + return false; + } // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + + + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + + + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + + + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + + + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + + + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + /** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ + + + function stubArray() { + return []; + } + /** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ + + + function stubFalse() { + return false; + } + + module.exports = isEqual; + })(lodash_isequal, lodash_isequal.exports); + + var munkres$1 = {exports: {}}; + + /** + * Introduction + * ============ + * + * The Munkres module provides an implementation of the Munkres algorithm + * (also called the Hungarian algorithm or the Kuhn-Munkres algorithm), + * useful for solving the Assignment Problem. + * + * Assignment Problem + * ================== + * + * Let C be an n×n-matrix representing the costs of each of n workers + * to perform any of n jobs. The assignment problem is to assign jobs to + * workers in a way that minimizes the total cost. Since each worker can perform + * only one job and each job can be assigned to only one worker the assignments + * represent an independent set of the matrix C. + * + * One way to generate the optimal set is to create all permutations of + * the indices necessary to traverse the matrix so that no row and column + * are used more than once. For instance, given this matrix (expressed in + * Python) + * + * matrix = [[5, 9, 1], + * [10, 3, 2], + * [8, 7, 4]] + * + * You could use this code to generate the traversal indices:: + * + * def permute(a, results): + * if len(a) == 1: + * results.insert(len(results), a) + * + * else: + * for i in range(0, len(a)): + * element = a[i] + * a_copy = [a[j] for j in range(0, len(a)) if j != i] + * subresults = [] + * permute(a_copy, subresults) + * for subresult in subresults: + * result = [element] + subresult + * results.insert(len(results), result) + * + * results = [] + * permute(range(len(matrix)), results) # [0, 1, 2] for a 3x3 matrix + * + * After the call to permute(), the results matrix would look like this:: + * + * [[0, 1, 2], + * [0, 2, 1], + * [1, 0, 2], + * [1, 2, 0], + * [2, 0, 1], + * [2, 1, 0]] + * + * You could then use that index matrix to loop over the original cost matrix + * and calculate the smallest cost of the combinations + * + * n = len(matrix) + * minval = sys.maxsize + * for row in range(n): + * cost = 0 + * for col in range(n): + * cost += matrix[row][col] + * minval = min(cost, minval) + * + * print minval + * + * While this approach works fine for small matrices, it does not scale. It + * executes in O(n!) time: Calculating the permutations for an n×x-matrix + * requires n! operations. For a 12×12 matrix, that’s 479,001,600 + * traversals. Even if you could manage to perform each traversal in just one + * millisecond, it would still take more than 133 hours to perform the entire + * traversal. A 20×20 matrix would take 2,432,902,008,176,640,000 operations. At + * an optimistic millisecond per operation, that’s more than 77 million years. + * + * The Munkres algorithm runs in O(n³) time, rather than O(n!). This + * package provides an implementation of that algorithm. + * + * This version is based on + * http://csclab.murraystate.edu/~bob.pilgrim/445/munkres.html + * + * This version was originally written for Python by Brian Clapper from the + * algorithm at the above web site (The ``Algorithm::Munkres`` Perl version, + * in CPAN, was clearly adapted from the same web site.) and ported to + * JavaScript by Anna Henningsen (addaleax). + * + * Usage + * ===== + * + * Construct a Munkres object + * + * var m = new Munkres(); + * + * Then use it to compute the lowest cost assignment from a cost matrix. Here’s + * a sample program + * + * var matrix = [[5, 9, 1], + * [10, 3, 2], + * [8, 7, 4]]; + * var m = new Munkres(); + * var indices = m.compute(matrix); + * console.log(format_matrix(matrix), 'Lowest cost through this matrix:'); + * var total = 0; + * for (var i = 0; i < indices.length; ++i) { + * var row = indices[l][0], col = indices[l][1]; + * var value = matrix[row][col]; + * total += value; + * + * console.log('(' + rol + ', ' + col + ') -> ' + value); + * } + * + * console.log('total cost:', total); + * + * Running that program produces:: + * + * Lowest cost through this matrix: + * [5, 9, 1] + * [10, 3, 2] + * [8, 7, 4] + * (0, 0) -> 5 + * (1, 1) -> 3 + * (2, 2) -> 4 + * total cost: 12 + * + * The instantiated Munkres object can be used multiple times on different + * matrices. + * + * Non-square Cost Matrices + * ======================== + * + * The Munkres algorithm assumes that the cost matrix is square. However, it's + * possible to use a rectangular matrix if you first pad it with 0 values to make + * it square. This module automatically pads rectangular cost matrices to make + * them square. + * + * Notes: + * + * - The module operates on a *copy* of the caller's matrix, so any padding will + * not be seen by the caller. + * - The cost matrix must be rectangular or square. An irregular matrix will + * *not* work. + * + * Calculating Profit, Rather than Cost + * ==================================== + * + * The cost matrix is just that: A cost matrix. The Munkres algorithm finds + * the combination of elements (one from each row and column) that results in + * the smallest cost. It’s also possible to use the algorithm to maximize + * profit. To do that, however, you have to convert your profit matrix to a + * cost matrix. The simplest way to do that is to subtract all elements from a + * large value. + * + * The ``munkres`` module provides a convenience method for creating a cost + * matrix from a profit matrix, i.e. make_cost_matrix. + * + * References + * ========== + * + * 1. http://www.public.iastate.edu/~ddoty/HungarianAlgorithm.html + * + * 2. Harold W. Kuhn. The Hungarian Method for the assignment problem. + * *Naval Research Logistics Quarterly*, 2:83-97, 1955. + * + * 3. Harold W. Kuhn. Variants of the Hungarian method for assignment + * problems. *Naval Research Logistics Quarterly*, 3: 253-258, 1956. + * + * 4. Munkres, J. Algorithms for the Assignment and Transportation Problems. + * *Journal of the Society of Industrial and Applied Mathematics*, + * 5(1):32-38, March, 1957. + * + * 5. https://en.wikipedia.org/wiki/Hungarian_algorithm + * + * Copyright and License + * ===================== + * + * Copyright 2008-2016 Brian M. Clapper + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + (function (module) { + /** + * A very large numerical value which can be used like an integer + * (i. e., adding integers of similar size does not result in overflow). + */ + var MAX_SIZE = parseInt(Number.MAX_SAFE_INTEGER / 2) || (1 << 26) * (1 << 26); + /** + * A default value to pad the cost matrix with if it is not quadratic. + */ + + var DEFAULT_PAD_VALUE = 0; // --------------------------------------------------------------------------- + // Classes + // --------------------------------------------------------------------------- + + /** + * Calculate the Munkres solution to the classical assignment problem. + * See the module documentation for usage. + * @constructor + */ + + function Munkres() { + this.C = null; + this.row_covered = []; + this.col_covered = []; + this.n = 0; + this.Z0_r = 0; + this.Z0_c = 0; + this.marked = null; + this.path = null; + } + /** + * Pad a possibly non-square matrix to make it square. + * + * @param {Array} matrix An array of arrays containing the matrix cells + * @param {Number} [pad_value] The value used to pad a rectangular matrix + * + * @return {Array} An array of arrays representing the padded matrix + */ + + + Munkres.prototype.pad_matrix = function (matrix, pad_value) { + pad_value = pad_value || DEFAULT_PAD_VALUE; + var max_columns = 0; + var total_rows = matrix.length; + var i; + + for (i = 0; i < total_rows; ++i) if (matrix[i].length > max_columns) max_columns = matrix[i].length; + + total_rows = max_columns > total_rows ? max_columns : total_rows; + var new_matrix = []; + + for (i = 0; i < total_rows; ++i) { + var row = matrix[i] || []; + var new_row = row.slice(); // If this row is too short, pad it + + while (total_rows > new_row.length) new_row.push(pad_value); + + new_matrix.push(new_row); + } + + return new_matrix; + }; + /** + * Compute the indices for the lowest-cost pairings between rows and columns + * in the database. Returns a list of (row, column) tuples that can be used + * to traverse the matrix. + * + * **WARNING**: This code handles square and rectangular matrices. + * It does *not* handle irregular matrices. + * + * @param {Array} cost_matrix The cost matrix. If this cost matrix is not square, + * it will be padded with DEFAULT_PAD_VALUE. Optionally, + * the pad value can be specified via options.padValue. + * This method does *not* modify the caller's matrix. + * It operates on a copy of the matrix. + * @param {Object} [options] Additional options to pass in + * @param {Number} [options.padValue] The value to use to pad a rectangular cost_matrix + * + * @return {Array} An array of ``(row, column)`` arrays that describe the lowest + * cost path through the matrix + */ + + + Munkres.prototype.compute = function (cost_matrix, options) { + options = options || {}; + options.padValue = options.padValue || DEFAULT_PAD_VALUE; + this.C = this.pad_matrix(cost_matrix, options.padValue); + this.n = this.C.length; + this.original_length = cost_matrix.length; + this.original_width = cost_matrix[0].length; + var nfalseArray = []; + /* array of n false values */ + + while (nfalseArray.length < this.n) nfalseArray.push(false); + + this.row_covered = nfalseArray.slice(); + this.col_covered = nfalseArray.slice(); + this.Z0_r = 0; + this.Z0_c = 0; + this.path = this.__make_matrix(this.n * 2, 0); + this.marked = this.__make_matrix(this.n, 0); + var step = 1; + var steps = { + 1: this.__step1, + 2: this.__step2, + 3: this.__step3, + 4: this.__step4, + 5: this.__step5, + 6: this.__step6 + }; + + while (true) { + var func = steps[step]; + if (!func) // done + break; + step = func.apply(this); + } + + var results = []; + + for (var i = 0; i < this.original_length; ++i) for (var j = 0; j < this.original_width; ++j) if (this.marked[i][j] == 1) results.push([i, j]); + + return results; + }; + /** + * Create an n×n matrix, populating it with the specific value. + * + * @param {Number} n Matrix dimensions + * @param {Number} val Value to populate the matrix with + * + * @return {Array} An array of arrays representing the newly created matrix + */ + + + Munkres.prototype.__make_matrix = function (n, val) { + var matrix = []; + + for (var i = 0; i < n; ++i) { + matrix[i] = []; + + for (var j = 0; j < n; ++j) matrix[i][j] = val; + } + + return matrix; + }; + /** + * For each row of the matrix, find the smallest element and + * subtract it from every element in its row. Go to Step 2. + */ + + + Munkres.prototype.__step1 = function () { + for (var i = 0; i < this.n; ++i) { + // Find the minimum value for this row and subtract that minimum + // from every element in the row. + var minval = Math.min.apply(Math, this.C[i]); + + for (var j = 0; j < this.n; ++j) this.C[i][j] -= minval; + } + + return 2; + }; + /** + * Find a zero (Z) in the resulting matrix. If there is no starred + * zero in its row or column, star Z. Repeat for each element in the + * matrix. Go to Step 3. + */ + + + Munkres.prototype.__step2 = function () { + for (var i = 0; i < this.n; ++i) { + for (var j = 0; j < this.n; ++j) { + if (this.C[i][j] === 0 && !this.col_covered[j] && !this.row_covered[i]) { + this.marked[i][j] = 1; + this.col_covered[j] = true; + this.row_covered[i] = true; + break; + } + } + } + + this.__clear_covers(); + + return 3; + }; + /** + * Cover each column containing a starred zero. If K columns are + * covered, the starred zeros describe a complete set of unique + * assignments. In this case, Go to DONE, otherwise, Go to Step 4. + */ + + + Munkres.prototype.__step3 = function () { + var count = 0; + + for (var i = 0; i < this.n; ++i) { + for (var j = 0; j < this.n; ++j) { + if (this.marked[i][j] == 1 && this.col_covered[j] == false) { + this.col_covered[j] = true; + ++count; + } + } + } + + return count >= this.n ? 7 : 4; + }; + /** + * Find a noncovered zero and prime it. If there is no starred zero + * in the row containing this primed zero, Go to Step 5. Otherwise, + * cover this row and uncover the column containing the starred + * zero. Continue in this manner until there are no uncovered zeros + * left. Save the smallest uncovered value and Go to Step 6. + */ + + + Munkres.prototype.__step4 = function () { + var done = false; + var row = -1, + col = -1, + star_col = -1; + + while (!done) { + var z = this.__find_a_zero(); + + row = z[0]; + col = z[1]; + if (row < 0) return 6; + this.marked[row][col] = 2; + star_col = this.__find_star_in_row(row); + + if (star_col >= 0) { + col = star_col; + this.row_covered[row] = true; + this.col_covered[col] = false; + } else { + this.Z0_r = row; + this.Z0_c = col; + return 5; + } + } + }; + /** + * Construct a series of alternating primed and starred zeros as + * follows. Let Z0 represent the uncovered primed zero found in Step 4. + * Let Z1 denote the starred zero in the column of Z0 (if any). + * Let Z2 denote the primed zero in the row of Z1 (there will always + * be one). Continue until the series terminates at a primed zero + * that has no starred zero in its column. Unstar each starred zero + * of the series, star each primed zero of the series, erase all + * primes and uncover every line in the matrix. Return to Step 3 + */ + + + Munkres.prototype.__step5 = function () { + var count = 0; + this.path[count][0] = this.Z0_r; + this.path[count][1] = this.Z0_c; + var done = false; + + while (!done) { + var row = this.__find_star_in_col(this.path[count][1]); + + if (row >= 0) { + count++; + this.path[count][0] = row; + this.path[count][1] = this.path[count - 1][1]; + } else { + done = true; + } + + if (!done) { + var col = this.__find_prime_in_row(this.path[count][0]); + + count++; + this.path[count][0] = this.path[count - 1][0]; + this.path[count][1] = col; + } + } + + this.__convert_path(this.path, count); + + this.__clear_covers(); + + this.__erase_primes(); + + return 3; + }; + /** + * Add the value found in Step 4 to every element of each covered + * row, and subtract it from every element of each uncovered column. + * Return to Step 4 without altering any stars, primes, or covered + * lines. + */ + + + Munkres.prototype.__step6 = function () { + var minval = this.__find_smallest(); + + for (var i = 0; i < this.n; ++i) { + for (var j = 0; j < this.n; ++j) { + if (this.row_covered[i]) this.C[i][j] += minval; + if (!this.col_covered[j]) this.C[i][j] -= minval; + } + } + + return 4; + }; + /** + * Find the smallest uncovered value in the matrix. + * + * @return {Number} The smallest uncovered value, or MAX_SIZE if no value was found + */ + + + Munkres.prototype.__find_smallest = function () { + var minval = MAX_SIZE; + + for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (!this.row_covered[i] && !this.col_covered[j]) if (minval > this.C[i][j]) minval = this.C[i][j]; + + return minval; + }; + /** + * Find the first uncovered element with value 0. + * + * @return {Array} The indices of the found element or [-1, -1] if not found + */ + + + Munkres.prototype.__find_a_zero = function () { + for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.C[i][j] === 0 && !this.row_covered[i] && !this.col_covered[j]) return [i, j]; + + return [-1, -1]; + }; + /** + * Find the first starred element in the specified row. Returns + * the column index, or -1 if no starred element was found. + * + * @param {Number} row The index of the row to search + * @return {Number} + */ + + + Munkres.prototype.__find_star_in_row = function (row) { + for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 1) return j; + + return -1; + }; + /** + * Find the first starred element in the specified column. + * + * @return {Number} The row index, or -1 if no starred element was found + */ + + + Munkres.prototype.__find_star_in_col = function (col) { + for (var i = 0; i < this.n; ++i) if (this.marked[i][col] == 1) return i; + + return -1; + }; + /** + * Find the first prime element in the specified row. + * + * @return {Number} The column index, or -1 if no prime element was found + */ + + + Munkres.prototype.__find_prime_in_row = function (row) { + for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 2) return j; + + return -1; + }; + + Munkres.prototype.__convert_path = function (path, count) { + for (var i = 0; i <= count; ++i) this.marked[path[i][0]][path[i][1]] = this.marked[path[i][0]][path[i][1]] == 1 ? 0 : 1; + }; + /** Clear all covered matrix cells */ + + + Munkres.prototype.__clear_covers = function () { + for (var i = 0; i < this.n; ++i) { + this.row_covered[i] = false; + this.col_covered[i] = false; + } + }; + /** Erase all prime markings */ + + + Munkres.prototype.__erase_primes = function () { + for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.marked[i][j] == 2) this.marked[i][j] = 0; + }; // --------------------------------------------------------------------------- + // Functions + // --------------------------------------------------------------------------- + + /** + * Create a cost matrix from a profit matrix by calling + * 'inversion_function' to invert each value. The inversion + * function must take one numeric argument (of any type) and return + * another numeric argument which is presumed to be the cost inverse + * of the original profit. + * + * This is a static method. Call it like this: + * + * cost_matrix = make_cost_matrix(matrix[, inversion_func]); + * + * For example: + * + * cost_matrix = make_cost_matrix(matrix, function(x) { return MAXIMUM - x; }); + * + * @param {Array} profit_matrix An array of arrays representing the matrix + * to convert from a profit to a cost matrix + * @param {Function} [inversion_function] The function to use to invert each + * entry in the profit matrix + * + * @return {Array} The converted matrix + */ + + + function make_cost_matrix(profit_matrix, inversion_function) { + var i, j; + + if (!inversion_function) { + var maximum = -1.0 / 0.0; + + for (i = 0; i < profit_matrix.length; ++i) for (j = 0; j < profit_matrix[i].length; ++j) if (profit_matrix[i][j] > maximum) maximum = profit_matrix[i][j]; + + inversion_function = function (x) { + return maximum - x; + }; + } + + var cost_matrix = []; + + for (i = 0; i < profit_matrix.length; ++i) { + var row = profit_matrix[i]; + cost_matrix[i] = []; + + for (j = 0; j < row.length; ++j) cost_matrix[i][j] = inversion_function(profit_matrix[i][j]); + } + + return cost_matrix; + } + /** + * Convenience function: Converts the contents of a matrix of integers + * to a printable string. + * + * @param {Array} matrix The matrix to print + * + * @return {String} The formatted matrix + */ + + + function format_matrix(matrix) { + var columnWidths = []; + var i, j; + + for (i = 0; i < matrix.length; ++i) { + for (j = 0; j < matrix[i].length; ++j) { + var entryWidth = String(matrix[i][j]).length; + if (!columnWidths[j] || entryWidth >= columnWidths[j]) columnWidths[j] = entryWidth; + } + } + + var formatted = ''; + + for (i = 0; i < matrix.length; ++i) { + for (j = 0; j < matrix[i].length; ++j) { + var s = String(matrix[i][j]); // pad at front with spaces + + while (s.length < columnWidths[j]) s = ' ' + s; + + formatted += s; // separate columns + + if (j != matrix[i].length - 1) formatted += ' '; + } + + if (i != matrix[i].length - 1) formatted += '\n'; + } + + return formatted; + } // --------------------------------------------------------------------------- + // Exports + // --------------------------------------------------------------------------- + + + function computeMunkres(cost_matrix, options) { + var m = new Munkres(); + return m.compute(cost_matrix, options); + } + + computeMunkres.version = "1.2.2"; + computeMunkres.format_matrix = format_matrix; + computeMunkres.make_cost_matrix = make_cost_matrix; + computeMunkres.Munkres = Munkres; // backwards compatibility + + if (module.exports) { + module.exports = computeMunkres; + } + })(munkres$1); + + var itemTrackedModule = ItemTracked$1; + var ItemTracked = itemTrackedModule.ItemTracked; + var kdTree = kdTreeMin.kdTree; + var munkres = munkres$1.exports; + var iouAreas = utils.iouAreas; + + var iouDistance = function iouDistance(item1, item2) { + // IOU distance, between 0 and 1 + // The smaller the less overlap + var iou = iouAreas(item1, item2); // Invert this as the KDTREESEARCH is looking for the smaller value + + var distance = 1 - iou; // If the overlap is iou < 0.95, exclude value + + if (distance > 1 - params.iouLimit) { + distance = params.distanceLimit + 1; + } + + return distance; + }; + + var params = { + // DEFAULT_UNMATCHEDFRAMES_TOLERANCE + // This the number of frame we wait when an object isn't matched before considering it gone + unMatchedFramesTolerance: 5, + // DEFAULT_IOU_LIMIT, exclude things from beeing matched if their IOU is lower than this + // 1 means total overlap whereas 0 means no overlap + iouLimit: 0.05, + // Remove new objects fast if they could not be matched in the next frames. + // Setting this to false ensures the object will stick around at least + // unMatchedFramesTolerance frames, even if they could neven be matched in + // subsequent frames. + fastDelete: true, + // The function to use to determine the distance between to detected objects + distanceFunc: iouDistance, + // The distance limit for matching. If values need to be excluded from + // matching set their distance to something greater than the distance limit + distanceLimit: 10000, + // The algorithm used to match tracks with new detections. Can be either + // 'kdTree' or 'munkres'. + matchingAlgorithm: 'munkres' // matchingAlgorithm: 'kdTree', + + }; // A dictionary of itemTracked currently tracked + // key: uuid + // value: ItemTracked object + + var mapOfItemsTracked = new Map(); // A dictionnary keeping memory of all tracked object (even after they disappear) + // Useful to ouput the file of all items tracked + + var mapOfAllItemsTracked = new Map(); // By default, we do not keep all the history in memory + + var keepAllHistoryInMemory = false; + var computeDistance = tracker.computeDistance = iouDistance; + + var updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameNb) { + // A kd-tree containing all the itemtracked + // Need to rebuild on each frame, because itemTracked positions have changed + var treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ['x', 'y', 'w', 'h']); // Contruct a kd tree for the detections of this frame + + var treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ['x', 'y', 'w', 'h']); // SCENARIO 1: itemsTracked map is empty + + if (mapOfItemsTracked.size === 0) { + // Just add every detected item as item Tracked + detectionsOfThisFrame.forEach(function (itemDetected) { + var newItemTracked = new ItemTracked(itemDetected, frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map + + mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree + + treeItemsTracked.insert(newItemTracked); + }); + } // SCENARIO 2: We already have itemsTracked in the map + else { + var matchedList = new Array(detectionsOfThisFrame.length); + matchedList.fill(false); // Match existing Tracked items with the items detected in the new frame + // For each look in the new detection to find the closest match + + if (detectionsOfThisFrame.length > 0) { + if (params.matchingAlgorithm === 'munkres') { + var trackedItemIds = Array.from(mapOfItemsTracked.keys()); + var costMatrix = Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { + var predictedPosition = itemTracked.predictNextPosition(); + return detectionsOfThisFrame.map(function (detection) { + return params.distanceFunc(predictedPosition, detection); + }); + }); + mapOfItemsTracked.forEach(function (itemTracked) { + itemTracked.makeAvailable(); + }); + munkres(costMatrix).filter(function (m) { + return costMatrix[m[0]][m[1]] <= params.distanceLimit; + }).forEach(function (m) { + var itemTracked = mapOfItemsTracked.get(trackedItemIds[m[0]]); + var updatedTrackedItemProperties = detectionsOfThisFrame[m[1]]; + matchedList[m[1]] = { + idDisplay: itemTracked.idDisplay + }; + itemTracked.makeUnavailable().update(updatedTrackedItemProperties, frameNb); + }); + matchedList.forEach(function (matched, index) { + if (!matched) { + if (Math.min.apply(Math, _toConsumableArray(costMatrix.map(function (m) { + return m[index]; + }))) > params.distanceLimit) { + var newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); + mapOfItemsTracked.set(newItemTracked.id, newItemTracked); + newItemTracked.makeUnavailable(); + costMatrix.push(detectionsOfThisFrame.map(function (detection) { + return params.distanceFunc(newItemTracked, detection); + })); + } + } + }); + } else if (params.matchingAlgorithm === 'kdTree') { + mapOfItemsTracked.forEach(function (itemTracked) { + // First predict the new position of the itemTracked + var predictedPosition = itemTracked.predictNextPosition(); // Make available for matching + + itemTracked.makeAvailable(); // Search for a detection that matches + + var treeSearchResult = treeDetectionsOfThisFrame.nearest(predictedPosition, 1, params.distanceLimit)[0]; // Only for debug assessments of predictions + + treeDetectionsOfThisFrame.nearest(itemTracked, 1, params.distanceLimit)[0]; // Only if we enable the extra refinement + + treeDetectionsOfThisFrame.nearest(predictedPosition, 2, params.distanceLimit); // If we have found something + + if (treeSearchResult) { + + var indexClosestNewDetectedItem = detectionsOfThisFrame.indexOf(treeSearchResult[0]); // If this detections was not already matched to a tracked item + // (otherwise it would be matched to two tracked items...) + + if (!matchedList[indexClosestNewDetectedItem]) { + matchedList[indexClosestNewDetectedItem] = { + idDisplay: itemTracked.idDisplay + }; // Update properties of tracked object + + var updatedTrackedItemProperties = detectionsOfThisFrame[indexClosestNewDetectedItem]; + mapOfItemsTracked.get(itemTracked.id).makeUnavailable().update(updatedTrackedItemProperties, frameNb); + } + } + }); + } else { + throw "Unknown matching algorithm \"".concat(params.matchingAlgorithm, "\""); + } + } else { + + + mapOfItemsTracked.forEach(function (itemTracked) { + itemTracked.makeAvailable(); + }); + } + + if (params.matchingAlgorithm === 'kdTree') { + // Add any unmatched items as new trackedItem only if those new items are not too similar + // to existing trackedItems this avoids adding some double match of YOLO and bring down drasticly reassignments + if (mapOfItemsTracked.size > 0) { + // Safety check to see if we still have object tracked (could have been deleted previously) + // Rebuild tracked item tree to take in account the new positions + treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ['x', 'y', 'w', 'h']); // console.log(`Nb new items Unmatched : ${matchedList.filter((isMatched) => isMatched === false).length}`) + + matchedList.forEach(function (matched, index) { + // Iterate through unmatched new detections + if (!matched) { + // Do not add as new tracked item if it is to similar to an existing one + var treeSearchResult = treeItemsTracked.nearest(detectionsOfThisFrame[index], 1, params.distanceLimit)[0]; + + if (!treeSearchResult) { + var newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map + + mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree + + treeItemsTracked.insert(newItemTracked); // Make unvailable + + newItemTracked.makeUnavailable(); + } + } + }); + } + } // Start killing the itemTracked (and predicting next position) + // that are tracked but haven't been matched this frame + + + mapOfItemsTracked.forEach(function (itemTracked) { + if (itemTracked.available) { + itemTracked.countDown(frameNb); + itemTracked.updateTheoricalPositionAndSize(); + + if (itemTracked.isDead()) { + mapOfItemsTracked["delete"](itemTracked.id); + treeItemsTracked.remove(itemTracked); + + if (keepAllHistoryInMemory) { + mapOfAllItemsTracked.set(itemTracked.id, itemTracked); + } + } + } + }); + } + }; + + var reset = tracker.reset = function () { + mapOfItemsTracked = new Map(); + mapOfAllItemsTracked = new Map(); + itemTrackedModule.reset(); + }; + + var setParams = tracker.setParams = function (newParams) { + Object.keys(newParams).forEach(function (key) { + params[key] = newParams[key]; + }); + }; + + var enableKeepInMemory = tracker.enableKeepInMemory = function () { + keepAllHistoryInMemory = true; + }; + + var disableKeepInMemory = tracker.disableKeepInMemory = function () { + keepAllHistoryInMemory = false; + }; + + var getJSONOfTrackedItems = tracker.getJSONOfTrackedItems = function () { + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { + return itemTracked.toJSON(roundInt); + }); + }; + + var getJSONDebugOfTrackedItems = tracker.getJSONDebugOfTrackedItems = function () { + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { + return itemTracked.toJSONDebug(roundInt); + }); + }; + + var getTrackedItemsInMOTFormat = tracker.getTrackedItemsInMOTFormat = function (frameNb) { + return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { + return itemTracked.toMOT(frameNb); + }); + }; // Work only if keepInMemory is enabled + + + var getAllTrackedItems = tracker.getAllTrackedItems = function () { + return mapOfAllItemsTracked; + }; // Work only if keepInMemory is enabled + + + var getJSONOfAllTrackedItems = tracker.getJSONOfAllTrackedItems = function () { + return Array.from(mapOfAllItemsTracked.values()).map(function (itemTracked) { + return itemTracked.toJSONGenericInfo(); + }); + }; + + exports.computeDistance = computeDistance; + exports["default"] = tracker; + exports.disableKeepInMemory = disableKeepInMemory; + exports.enableKeepInMemory = enableKeepInMemory; + exports.getAllTrackedItems = getAllTrackedItems; + exports.getJSONDebugOfTrackedItems = getJSONDebugOfTrackedItems; + exports.getJSONOfAllTrackedItems = getJSONOfAllTrackedItems; + exports.getJSONOfTrackedItems = getJSONOfTrackedItems; + exports.getTrackedItemsInMOTFormat = getTrackedItemsInMOTFormat; + exports.reset = reset; + exports.setParams = setParams; + exports.updateTrackedItemsWithNewFrame = updateTrackedItemsWithNewFrame; + + Object.defineProperty(exports, '__esModule', { value: true }); + + return exports; + +})({}); diff --git a/package-lock.json b/package-lock.json index 99c138c..63c2f5f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "lodash.isequal": "^4.5.0", "minimist": "^1.2.6", "munkres-js": "^1.2.2", - "uuid": "^9.0.0" + "uuid": "^3.2.1" }, "bin": { "node-moving-things-tracker": "bundle.cjs.js" @@ -4426,11 +4426,11 @@ } }, "node_modules/uuid": { - "version": "9.0.0", - "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/uuid/-/uuid-9.0.0.tgz", - "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", + "version": "3.4.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "bin": { - "uuid": "dist/bin/uuid" + "uuid": "bin/uuid" } }, "node_modules/which": { @@ -7652,9 +7652,9 @@ } }, "uuid": { - "version": "9.0.0", - "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/uuid/-/uuid-9.0.0.tgz", - "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==" + "version": "3.4.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" }, "which": { "version": "2.0.2", diff --git a/package.json b/package.json index cb99d81..1fba5bc 100644 --- a/package.json +++ b/package.json @@ -3,14 +3,15 @@ "version": "0.9.1", "description": "Tracker by detections in javascript for node.js / browsers", "url": "https://github.com/opendatacam/node-moving-things-tracker", - "main": "bundle.cjs.js", + "main": "bundle.iife.js", "bin": { - "node-moving-things-tracker": "bundle.cjs.js" + "node-moving-things-tracker": "bundle.iife.js" }, "scripts": { "test": "jasmine", "build-bundle:cjs": "rollup -c rollup.cjs.config", "build-bundle:esm": "rollup -c rollup.esm.config", + "build-bundle:iife": "rollup -c rollup.iife.config", "eslint": "./node_modules/.bin/eslint .", "eslint:fix": "./node_modules/.bin/eslint --fix ." }, @@ -28,7 +29,7 @@ "lodash.isequal": "^4.5.0", "minimist": "^1.2.6", "munkres-js": "^1.2.2", - "uuid": "^9.0.0" + "uuid": "^3.2.1" }, "devDependencies": { "@babel/core": "^7.19.3", diff --git a/rollup.iife.config.js b/rollup.iife.config.js new file mode 100644 index 0000000..4e2d808 --- /dev/null +++ b/rollup.iife.config.js @@ -0,0 +1,21 @@ +import resolve from '@rollup/plugin-node-resolve'; +import { babel } from '@rollup/plugin-babel'; +import sizes from 'rollup-plugin-sizes'; +import commonjs from '@rollup/plugin-commonjs'; + +const config = { + input: 'tracker.js', + output: { + file: 'bundle.iife.js', + format: 'iife', + name: 'Tracker' + }, + plugins: [ + resolve({ browser: true, preferBuiltins: false }), + commonjs({ transformMixedEsModules: true }), + babel({ babelHelpers: 'bundled' }), + sizes(), + ], +}; + +export default config; From a4adc41e06047840cbb7c15c2856bec57d6d8ae3 Mon Sep 17 00:00:00 2001 From: Dmytro Kushnir Date: Mon, 3 Oct 2022 22:09:49 +0300 Subject: [PATCH 09/11] Add nodemon, project refactoring Co-authored-by: Dmytro Kushnir --- bundle.cjs.js | 1336 +++++----- bundle.esm.js | 1336 +++++----- bundle.iife.js | 2302 +++++++++--------- package-lock.json | 376 ++- package.json | 2 + rollup.cjs.config.js | 2 +- rollup.esm.config.js | 8 +- rollup.iife.config.js | 4 +- spec/ItemTracked.spec.js | 2 +- spec/Tracker.spec.js | 2 +- main.js => src/main.js | 10 +- src/start.js | 60 + ItemTracked.js => src/tracker/ItemTracked.js | 2 +- tracker.js => src/tracker/index.js | 189 +- utils.js => src/tracker/utils.js | 25 +- 15 files changed, 2898 insertions(+), 2758 deletions(-) rename main.js => src/main.js (96%) create mode 100644 src/start.js rename ItemTracked.js => src/tracker/ItemTracked.js (99%) rename tracker.js => src/tracker/index.js (71%) rename utils.js => src/tracker/utils.js (85%) diff --git a/bundle.cjs.js b/bundle.cjs.js index 95f175e..7e4ea71 100644 --- a/bundle.cjs.js +++ b/bundle.cjs.js @@ -1,5 +1,3 @@ -'use strict'; - Object.defineProperty(exports, '__esModule', { value: true }); function _toConsumableArray(arr) { @@ -11,16 +9,16 @@ function _arrayWithoutHoles(arr) { } function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); + if (typeof Symbol !== 'undefined' && iter[Symbol.iterator] != null || iter['@@iterator'] != null) return Array.from(iter); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + if (typeof o === 'string') return _arrayLikeToArray(o, minLen); + let n = Object.prototype.toString.call(o).slice(8, -1); + if (n === 'Object' && o.constructor) n = o.constructor.name; + if (n === 'Map' || n === 'Set') return Array.from(o); + if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { @@ -32,30 +30,29 @@ function _arrayLikeToArray(arr, len) { } function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + throw new TypeError('Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'); } -var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; +const commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; -var tracker = {}; +const tracker = {}; -var ItemTracked$1 = {}; +const ItemTracked$1 = {}; -var commonjsBrowser = {}; +const commonjsBrowser = {}; -var v1$1 = {}; +const v1$1 = {}; -var rng$1 = {}; +const rng$1 = {}; -Object.defineProperty(rng$1, "__esModule", { - value: true +Object.defineProperty(rng$1, '__esModule', { + value: true, }); rng$1.default = rng; // Unique ID creation requires a high quality random # generator. In the browser we therefore // require the crypto API and do not support built-in fallback to lower quality random number // generators (like Math.random()). - let getRandomValues; const rnds8 = new Uint8Array(16); @@ -73,29 +70,29 @@ function rng() { return getRandomValues(rnds8); } -var stringify$1 = {}; +const stringify$1 = {}; -var validate$1 = {}; +const validate$1 = {}; -var regex = {}; +const regex = {}; -Object.defineProperty(regex, "__esModule", { - value: true +Object.defineProperty(regex, '__esModule', { + value: true, }); regex.default = void 0; -var _default$c = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; +const _default$c = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; regex.default = _default$c; -Object.defineProperty(validate$1, "__esModule", { - value: true +Object.defineProperty(validate$1, '__esModule', { + value: true, }); validate$1.default = void 0; -var _regex = _interopRequireDefault$8(regex); +const _regex = _interopRequireDefault$8(regex); function _interopRequireDefault$8(obj) { return obj && obj.__esModule ? obj : { - default: obj + default: obj, }; } @@ -103,20 +100,20 @@ function validate(uuid) { return typeof uuid === 'string' && _regex.default.test(uuid); } -var _default$b = validate; +const _default$b = validate; validate$1.default = _default$b; -Object.defineProperty(stringify$1, "__esModule", { - value: true +Object.defineProperty(stringify$1, '__esModule', { + value: true, }); stringify$1.default = void 0; stringify$1.unsafeStringify = unsafeStringify; -var _validate$2 = _interopRequireDefault$7(validate$1); +const _validate$2 = _interopRequireDefault$7(validate$1); function _interopRequireDefault$7(obj) { return obj && obj.__esModule ? obj : { - default: obj + default: obj, }; } /** @@ -124,7 +121,6 @@ function _interopRequireDefault$7(obj) { * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX */ - const byteToHex = []; for (let i = 0; i < 256; ++i) { @@ -134,7 +130,7 @@ for (let i = 0; i < 256; ++i) { function unsafeStringify(arr, offset = 0) { // Note: Be careful editing this code! It's been tuned for performance // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); + return (`${byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]]}-${byteToHex[arr[offset + 4]]}${byteToHex[arr[offset + 5]]}-${byteToHex[arr[offset + 6]]}${byteToHex[arr[offset + 7]]}-${byteToHex[arr[offset + 8]]}${byteToHex[arr[offset + 9]]}-${byteToHex[arr[offset + 10]]}${byteToHex[arr[offset + 11]]}${byteToHex[arr[offset + 12]]}${byteToHex[arr[offset + 13]]}${byteToHex[arr[offset + 14]]}${byteToHex[arr[offset + 15]]}`).toLowerCase(); } function stringify(arr, offset = 0) { @@ -151,33 +147,31 @@ function stringify(arr, offset = 0) { return uuid; } -var _default$a = stringify; +const _default$a = stringify; stringify$1.default = _default$a; -Object.defineProperty(v1$1, "__esModule", { - value: true +Object.defineProperty(v1$1, '__esModule', { + value: true, }); v1$1.default = void 0; -var _rng$1 = _interopRequireDefault$6(rng$1); +const _rng$1 = _interopRequireDefault$6(rng$1); -var _stringify$2 = stringify$1; +const _stringify$2 = stringify$1; function _interopRequireDefault$6(obj) { return obj && obj.__esModule ? obj : { - default: obj + default: obj, }; } // **`v1()` - Generate time-based UUID** // // Inspired by https://github.com/LiosK/UUID.js // and http://docs.python.org/library/uuid.html - let _nodeId; let _clockseq; // Previous uuid creation time - let _lastMSecs = 0; let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details @@ -207,7 +201,6 @@ function v1(options, buf, offset) { // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock // cycle to simulate higher resolution clock @@ -220,12 +213,10 @@ function v1(options, buf, offset) { } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new // time interval - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { nsecs = 0; } // Per 4.2.1.2 Throw error if too many uuids are requested - if (nsecs >= 10000) { throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); } @@ -261,25 +252,25 @@ function v1(options, buf, offset) { return buf || (0, _stringify$2.unsafeStringify)(b); } -var _default$9 = v1; +const _default$9 = v1; v1$1.default = _default$9; -var v3$1 = {}; +const v3$1 = {}; -var v35$1 = {}; +const v35$1 = {}; -var parse$1 = {}; +const parse$1 = {}; -Object.defineProperty(parse$1, "__esModule", { - value: true +Object.defineProperty(parse$1, '__esModule', { + value: true, }); parse$1.default = void 0; -var _validate$1 = _interopRequireDefault$5(validate$1); +const _validate$1 = _interopRequireDefault$5(validate$1); function _interopRequireDefault$5(obj) { return obj && obj.__esModule ? obj : { - default: obj + default: obj, }; } @@ -315,23 +306,23 @@ function parse(uuid) { return arr; } -var _default$8 = parse; +const _default$8 = parse; parse$1.default = _default$8; -Object.defineProperty(v35$1, "__esModule", { - value: true +Object.defineProperty(v35$1, '__esModule', { + value: true, }); v35$1.URL = v35$1.DNS = void 0; v35$1.default = v35; -var _stringify$1 = stringify$1; +const _stringify$1 = stringify$1; -var _parse = _interopRequireDefault$4(parse$1); +const _parse = _interopRequireDefault$4(parse$1); function _interopRequireDefault$4(obj) { return obj && obj.__esModule ? obj : { - default: obj + default: obj, }; } @@ -354,7 +345,7 @@ v35$1.URL = URL; function v35(name, version, hashfunc) { function generateUUID(value, namespace, buf, offset) { - var _namespace; + let _namespace; if (typeof value === 'string') { value = stringToBytes(value); @@ -370,7 +361,6 @@ function v35(name, version, hashfunc) { // Future: Use spread syntax when supported on all platforms, e.g. `bytes = // hashfunc([...namespace, ... value])` - let bytes = new Uint8Array(16 + value.length); bytes.set(namespace); bytes.set(value, namespace.length); @@ -391,21 +381,19 @@ function v35(name, version, hashfunc) { return (0, _stringify$1.unsafeStringify)(bytes); } // Function#name is not settable on some platforms (#270) - try { generateUUID.name = name; // eslint-disable-next-line no-empty } catch (err) {} // For CommonJS default export support - generateUUID.DNS = DNS; generateUUID.URL = URL; return generateUUID; } -var md5$1 = {}; +const md5$1 = {}; -Object.defineProperty(md5$1, "__esModule", { - value: true +Object.defineProperty(md5$1, '__esModule', { + value: true, }); md5$1.default = void 0; /* @@ -446,7 +434,6 @@ function md5(bytes) { * Convert an array of little-endian words to an array of bytes */ - function md5ToHexEncodedArray(input) { const output = []; const length32 = input.length * 32; @@ -464,7 +451,6 @@ function md5ToHexEncodedArray(input) { * Calculate output length with padding and bit length */ - function getOutputLength(inputLength8) { return (inputLength8 + 64 >>> 9 << 4) + 14 + 1; } @@ -472,7 +458,6 @@ function getOutputLength(inputLength8) { * Calculate the MD5 of an array of little-endian words, and a bit length. */ - function wordsToMd5(x, len) { /* append padding */ x[len >> 5] |= 0x80 << len % 32; @@ -564,7 +549,6 @@ function wordsToMd5(x, len) { * Characters >255 have their high-byte silently ignored. */ - function bytesToWords(input) { if (input.length === 0) { return []; @@ -584,7 +568,6 @@ function bytesToWords(input) { * to work around bugs in some JS interpreters. */ - function safeAdd(x, y) { const lsw = (x & 0xffff) + (y & 0xffff); const msw = (x >> 16) + (y >> 16) + (lsw >> 16); @@ -594,7 +577,6 @@ function safeAdd(x, y) { * Bitwise rotate a 32-bit number to the left. */ - function bitRotateLeft(num, cnt) { return num << cnt | num >>> 32 - cnt; } @@ -602,7 +584,6 @@ function bitRotateLeft(num, cnt) { * These functions implement the four basic operations the algorithm uses. */ - function md5cmn(q, a, b, x, s, t) { return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); } @@ -623,56 +604,56 @@ function md5ii(a, b, c, d, x, s, t) { return md5cmn(c ^ (b | ~d), a, b, x, s, t); } -var _default$7 = md5; +const _default$7 = md5; md5$1.default = _default$7; -Object.defineProperty(v3$1, "__esModule", { - value: true +Object.defineProperty(v3$1, '__esModule', { + value: true, }); v3$1.default = void 0; -var _v$1 = _interopRequireDefault$3(v35$1); +const _v$1 = _interopRequireDefault$3(v35$1); -var _md = _interopRequireDefault$3(md5$1); +const _md = _interopRequireDefault$3(md5$1); function _interopRequireDefault$3(obj) { return obj && obj.__esModule ? obj : { - default: obj + default: obj, }; } const v3 = (0, _v$1.default)('v3', 0x30, _md.default); -var _default$6 = v3; +const _default$6 = v3; v3$1.default = _default$6; -var v4$1 = {}; +const v4$1 = {}; -var native = {}; +const native = {}; -Object.defineProperty(native, "__esModule", { - value: true +Object.defineProperty(native, '__esModule', { + value: true, }); native.default = void 0; const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto); -var _default$5 = { - randomUUID +const _default$5 = { + randomUUID, }; native.default = _default$5; -Object.defineProperty(v4$1, "__esModule", { - value: true +Object.defineProperty(v4$1, '__esModule', { + value: true, }); v4$1.default = void 0; -var _native = _interopRequireDefault$2(native); +const _native = _interopRequireDefault$2(native); -var _rng = _interopRequireDefault$2(rng$1); +const _rng = _interopRequireDefault$2(rng$1); -var _stringify = stringify$1; +const _stringify = stringify$1; function _interopRequireDefault$2(obj) { return obj && obj.__esModule ? obj : { - default: obj + default: obj, }; } @@ -685,7 +666,6 @@ function v4(options, buf, offset) { const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - rnds[6] = rnds[6] & 0x0f | 0x40; rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided @@ -702,15 +682,15 @@ function v4(options, buf, offset) { return (0, _stringify.unsafeStringify)(rnds); } -var _default$4 = v4; +const _default$4 = v4; v4$1.default = _default$4; -var v5$1 = {}; +const v5$1 = {}; -var sha1$1 = {}; +const sha1$1 = {}; -Object.defineProperty(sha1$1, "__esModule", { - value: true +Object.defineProperty(sha1$1, '__esModule', { + value: true, }); sha1$1.default = void 0; // Adapted from Chris Veness' SHA1 code at // http://www.movable-type.co.uk/scripts/sha1.html @@ -767,7 +747,7 @@ function sha1(bytes) { M[i] = arr; } - M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32); + M[N - 1][14] = (bytes.length - 1) * 8 / 2 ** 32; M[N - 1][14] = Math.floor(M[N - 1][14]); M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff; @@ -808,49 +788,49 @@ function sha1(bytes) { return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff]; } -var _default$3 = sha1; +const _default$3 = sha1; sha1$1.default = _default$3; -Object.defineProperty(v5$1, "__esModule", { - value: true +Object.defineProperty(v5$1, '__esModule', { + value: true, }); v5$1.default = void 0; -var _v = _interopRequireDefault$1(v35$1); +const _v = _interopRequireDefault$1(v35$1); -var _sha = _interopRequireDefault$1(sha1$1); +const _sha = _interopRequireDefault$1(sha1$1); function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { - default: obj + default: obj, }; } const v5 = (0, _v.default)('v5', 0x50, _sha.default); -var _default$2 = v5; +const _default$2 = v5; v5$1.default = _default$2; -var nil = {}; +const nil = {}; -Object.defineProperty(nil, "__esModule", { - value: true +Object.defineProperty(nil, '__esModule', { + value: true, }); nil.default = void 0; -var _default$1 = '00000000-0000-0000-0000-000000000000'; +const _default$1 = '00000000-0000-0000-0000-000000000000'; nil.default = _default$1; -var version$1 = {}; +const version$1 = {}; -Object.defineProperty(version$1, "__esModule", { - value: true +Object.defineProperty(version$1, '__esModule', { + value: true, }); version$1.default = void 0; -var _validate = _interopRequireDefault(validate$1); +const _validate = _interopRequireDefault(validate$1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { - default: obj + default: obj, }; } @@ -862,67 +842,66 @@ function version(uuid) { return parseInt(uuid.slice(14, 15), 16); } -var _default = version; +const _default = version; version$1.default = _default; (function (exports) { - - Object.defineProperty(exports, "__esModule", { - value: true + Object.defineProperty(exports, '__esModule', { + value: true, }); - Object.defineProperty(exports, "NIL", { + Object.defineProperty(exports, 'NIL', { enumerable: true, get: function get() { return _nil.default; - } + }, }); - Object.defineProperty(exports, "parse", { + Object.defineProperty(exports, 'parse', { enumerable: true, get: function get() { return _parse.default; - } + }, }); - Object.defineProperty(exports, "stringify", { + Object.defineProperty(exports, 'stringify', { enumerable: true, get: function get() { return _stringify.default; - } + }, }); - Object.defineProperty(exports, "v1", { + Object.defineProperty(exports, 'v1', { enumerable: true, get: function get() { return _v.default; - } + }, }); - Object.defineProperty(exports, "v3", { + Object.defineProperty(exports, 'v3', { enumerable: true, get: function get() { return _v2.default; - } + }, }); - Object.defineProperty(exports, "v4", { + Object.defineProperty(exports, 'v4', { enumerable: true, get: function get() { return _v3.default; - } + }, }); - Object.defineProperty(exports, "v5", { + Object.defineProperty(exports, 'v5', { enumerable: true, get: function get() { return _v4.default; - } + }, }); - Object.defineProperty(exports, "validate", { + Object.defineProperty(exports, 'validate', { enumerable: true, get: function get() { return _validate.default; - } + }, }); - Object.defineProperty(exports, "version", { + Object.defineProperty(exports, 'version', { enumerable: true, get: function get() { return _version.default; - } + }, }); var _v = _interopRequireDefault(v1$1); @@ -945,12 +924,12 @@ version$1.default = _default; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { - default: obj + default: obj, }; } -})(commonjsBrowser); +}(commonjsBrowser)); -var utils = {}; +const utils = {}; utils.isDetectionTooLarge = function (detections, largestAllowed) { if (detections.w >= largestAllowed) { @@ -960,11 +939,11 @@ utils.isDetectionTooLarge = function (detections, largestAllowed) { return false; }; -var isInsideArea = function isInsideArea(area, point) { - var xMin = area.x - area.w / 2; - var xMax = area.x + area.w / 2; - var yMin = area.y - area.h / 2; - var yMax = area.y + area.h / 2; +const isInsideArea = function isInsideArea(area, point) { + const xMin = area.x - area.w / 2; + const xMax = area.x + area.w / 2; + const yMin = area.y - area.h / 2; + const yMax = area.y + area.h / 2; if (point.x >= xMin && point.x <= xMax && point.y >= yMin && point.y <= yMax) { return true; @@ -976,54 +955,50 @@ var isInsideArea = function isInsideArea(area, point) { utils.isInsideArea = isInsideArea; utils.isInsideSomeAreas = function (areas, point) { - var isInside = areas.some(function (area) { - return isInsideArea(area, point); - }); + const isInside = areas.some((area) => isInsideArea(area, point)); return isInside; }; utils.ignoreObjectsNotToDetect = function (detections, objectsToDetect) { - return detections.filter(function (detection) { - return objectsToDetect.indexOf(detection.name) > -1; - }); + return detections.filter((detection) => objectsToDetect.indexOf(detection.name) > -1); }; -var getRectangleEdges = function getRectangleEdges(item) { +const getRectangleEdges = function getRectangleEdges(item) { return { x0: item.x - item.w / 2, y0: item.y - item.h / 2, x1: item.x + item.w / 2, - y1: item.y + item.h / 2 + y1: item.y + item.h / 2, }; }; utils.getRectangleEdges = getRectangleEdges; utils.iouAreas = function (item1, item2) { - var rect1 = getRectangleEdges(item1); - var rect2 = getRectangleEdges(item2); // Get overlap rectangle + const rect1 = getRectangleEdges(item1); + const rect2 = getRectangleEdges(item2); // Get overlap rectangle - var overlap_x0 = Math.max(rect1.x0, rect2.x0); - var overlap_y0 = Math.max(rect1.y0, rect2.y0); - var overlap_x1 = Math.min(rect1.x1, rect2.x1); - var overlap_y1 = Math.min(rect1.y1, rect2.y1); // if there an overlap + const overlap_x0 = Math.max(rect1.x0, rect2.x0); + const overlap_y0 = Math.max(rect1.y0, rect2.y0); + const overlap_x1 = Math.min(rect1.x1, rect2.x1); + const overlap_y1 = Math.min(rect1.y1, rect2.y1); // if there an overlap if (overlap_x1 - overlap_x0 <= 0 || overlap_y1 - overlap_y0 <= 0) { // no overlap return 0; } - var area_rect1 = item1.w * item1.h; - var area_rect2 = item2.w * item2.h; - var area_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0); - var area_union = area_rect1 + area_rect2 - area_intersection; + const area_rect1 = item1.w * item1.h; + const area_rect2 = item2.w * item2.h; + const area_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0); + const area_union = area_rect1 + area_rect2 - area_intersection; return area_intersection / area_union; }; utils.computeVelocityVector = function (item1, item2, nbFrame) { return { dx: (item2.x - item1.x) / nbFrame, - dy: (item2.y - item1.y) / nbFrame + dy: (item2.y - item1.y) / nbFrame, }; }; /* @@ -1059,9 +1034,8 @@ utils.computeVelocityVector = function (item1, item2, nbFrame) { */ - utils.computeBearingIn360 = function (dx, dy) { - var angle = Math.atan(dx / dy) / (Math.PI / 180); + const angle = Math.atan(dx / dy) / (Math.PI / 180); if (angle > 0) { if (dy > 0) { @@ -1079,9 +1053,9 @@ utils.computeBearingIn360 = function (dx, dy) { }; (function (exports) { - var uuidv4 = commonjsBrowser.v4; - var computeBearingIn360 = utils.computeBearingIn360; - var computeVelocityVector = utils.computeVelocityVector; // Properties example + const uuidv4 = commonjsBrowser.v4; + const { computeBearingIn360 } = utils; + const { computeVelocityVector } = utils; // Properties example // { // "x": 1021, // "y": 65, @@ -1095,16 +1069,16 @@ utils.computeBearingIn360 = function (dx, dy) { exports.ITEM_HISTORY_MAX_LENGTH = 15; // Use a simple incremental unique id for the display - var idDisplay = 0; + let idDisplay = 0; exports.ItemTracked = function (properties, frameNb, unMatchedFramesTolerance, fastDelete) { - var DEFAULT_UNMATCHEDFRAMES_TOLERANCE = unMatchedFramesTolerance; - var itemTracked = {}; // ==== Private ===== + const DEFAULT_UNMATCHEDFRAMES_TOLERANCE = unMatchedFramesTolerance; + const itemTracked = {}; // ==== Private ===== // Am I available to be matched? itemTracked.available = true; // Should I be deleted? - itemTracked["delete"] = false; + itemTracked.delete = false; itemTracked.fastDelete = fastDelete; // How many unmatched frame should I survive? itemTracked.frameUnmatchedLeftBeforeDying = unMatchedFramesTolerance; @@ -1128,7 +1102,7 @@ utils.computeBearingIn360 = function (dx, dy) { y: properties.y, w: properties.w, h: properties.h, - confidence: properties.confidence + confidence: properties.confidence, }); if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { @@ -1137,7 +1111,7 @@ utils.computeBearingIn360 = function (dx, dy) { itemTracked.velocity = { dx: 0, - dy: 0 + dy: 0, }; itemTracked.nbTimeMatched = 1; // Assign an unique id to each Item tracked @@ -1165,7 +1139,7 @@ utils.computeBearingIn360 = function (dx, dy) { y: this.y, w: this.w, h: this.h, - confidence: this.confidence + confidence: this.confidence, }); if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { @@ -1180,7 +1154,6 @@ utils.computeBearingIn360 = function (dx, dy) { this.nameCount[properties.name] = 1; } // Reset dying counter - this.frameUnmatchedLeftBeforeDying = DEFAULT_UNMATCHEDFRAMES_TOLERANCE; // Compute new velocityVector based on last positions history this.velocity = this.updateVelocityVector(); @@ -1204,7 +1177,7 @@ utils.computeBearingIn360 = function (dx, dy) { x: this.x, y: this.y, w: this.w, - h: this.h + h: this.h, }; } @@ -1222,7 +1195,7 @@ utils.computeBearingIn360 = function (dx, dy) { y: this.y, w: this.w, h: this.h, - confidence: this.confidence + confidence: this.confidence, }); if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { @@ -1238,7 +1211,7 @@ utils.computeBearingIn360 = function (dx, dy) { x: this.x + this.velocity.dx, y: this.y + this.velocity.dy, w: this.w, - h: this.h + h: this.h, }; }; @@ -1246,32 +1219,31 @@ utils.computeBearingIn360 = function (dx, dy) { return this.frameUnmatchedLeftBeforeDying < 0; }; // Velocity vector based on the last 15 frames - itemTracked.updateVelocityVector = function () { if (exports.ITEM_HISTORY_MAX_LENGTH <= 2) { return { dx: undefined, - dy: undefined + dy: undefined, }; } if (this.itemHistory.length <= exports.ITEM_HISTORY_MAX_LENGTH) { - var _start = this.itemHistory[0]; - var _end = this.itemHistory[this.itemHistory.length - 1]; + const _start = this.itemHistory[0]; + const _end = this.itemHistory[this.itemHistory.length - 1]; return computeVelocityVector(_start, _end, this.itemHistory.length); } - var start = this.itemHistory[this.itemHistory.length - exports.ITEM_HISTORY_MAX_LENGTH]; - var end = this.itemHistory[this.itemHistory.length - 1]; + const start = this.itemHistory[this.itemHistory.length - exports.ITEM_HISTORY_MAX_LENGTH]; + const end = this.itemHistory[this.itemHistory.length - 1]; return computeVelocityVector(start, end, exports.ITEM_HISTORY_MAX_LENGTH); }; itemTracked.getMostlyMatchedName = function () { - var _this = this; + const _this = this; - var nameMostlyMatchedOccurences = 0; - var nameMostlyMatched = ''; - Object.keys(this.nameCount).map(function (name) { + let nameMostlyMatchedOccurences = 0; + let nameMostlyMatched = ''; + Object.keys(this.nameCount).map((name) => { if (_this.nameCount[name] > nameMostlyMatchedOccurences) { nameMostlyMatched = name; nameMostlyMatchedOccurences = _this.nameCount[name]; @@ -1281,7 +1253,7 @@ utils.computeBearingIn360 = function (dx, dy) { }; itemTracked.toJSONDebug = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + const roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; return { id: this.id, idDisplay: this.idDisplay, @@ -1295,12 +1267,12 @@ utils.computeBearingIn360 = function (dx, dy) { name: this.getMostlyMatchedName(), isZombie: this.isZombie, appearFrame: this.appearFrame, - disappearFrame: this.disappearFrame + disappearFrame: this.disappearFrame, }; }; itemTracked.toJSON = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + const roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; return { id: this.idDisplay, x: roundInt ? parseInt(this.x, 10) : this.x, @@ -1311,12 +1283,15 @@ utils.computeBearingIn360 = function (dx, dy) { // Here we negate dy to be in "normal" carthesian coordinates bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy), 10), name: this.getMostlyMatchedName(), - isZombie: this.isZombie + isZombie: this.isZombie, }; }; itemTracked.toMOT = function (frameIndex) { - return "".concat(frameIndex, ",").concat(this.idDisplay, ",").concat(this.x - this.w / 2, ",").concat(this.y - this.h / 2, ",").concat(this.w, ",").concat(this.h, ",").concat(this.confidence / 100, ",-1,-1,-1"); + return ''.concat(frameIndex, ',').concat(this.idDisplay, ',').concat(this.x - this.w / 2, ',').concat(this.y - this.h / 2, ',') + .concat(this.w, ',') + .concat(this.h, ',') + .concat(this.confidence / 100, ',-1,-1,-1'); }; itemTracked.toJSONGenericInfo = function () { @@ -1327,7 +1302,7 @@ utils.computeBearingIn360 = function (dx, dy) { disappearFrame: this.disappearFrame, disappearArea: this.disappearArea, nbActiveFrame: this.disappearFrame - this.appearFrame, - name: this.getMostlyMatchedName() + name: this.getMostlyMatchedName(), }; }; @@ -1337,9 +1312,9 @@ utils.computeBearingIn360 = function (dx, dy) { exports.reset = function () { idDisplay = 0; }; -})(ItemTracked$1); +}(ItemTracked$1)); -var kdTreeMin = {}; +const kdTreeMin = {}; /** * k-d Tree JavaScript - V 1.01 @@ -1353,9 +1328,9 @@ var kdTreeMin = {}; */ (function (exports) { - !function (t, n) { - n(exports ); - }(commonjsGlobal, function (t) { + !(function (t, n) { + n(exports); + }(commonjsGlobal, (t) => { function n(t, n, o) { this.obj = t, this.left = null, this.right = null, this.parent = o, this.dimension = n; } @@ -1365,153 +1340,154 @@ var kdTreeMin = {}; } o.prototype = { - push: function (t) { + push(t) { this.content.push(t), this.bubbleUp(this.content.length - 1); }, - pop: function () { - var t = this.content[0], - n = this.content.pop(); + pop() { + const t = this.content[0]; + const n = this.content.pop(); return this.content.length > 0 && (this.content[0] = n, this.sinkDown(0)), t; }, - peek: function () { + peek() { return this.content[0]; }, - remove: function (t) { - for (var n = this.content.length, o = 0; o < n; o++) if (this.content[o] == t) { - var i = this.content.pop(); - return void (o != n - 1 && (this.content[o] = i, this.scoreFunction(i) < this.scoreFunction(t) ? this.bubbleUp(o) : this.sinkDown(o))); + remove(t) { + for (let n = this.content.length, o = 0; o < n; o++) { + if (this.content[o] == t) { + const i = this.content.pop(); + return void (o != n - 1 && (this.content[o] = i, this.scoreFunction(i) < this.scoreFunction(t) ? this.bubbleUp(o) : this.sinkDown(o))); + } } - throw new Error("Node not found."); + throw new Error('Node not found.'); }, - size: function () { + size() { return this.content.length; }, - bubbleUp: function (t) { - for (var n = this.content[t]; t > 0;) { - var o = Math.floor((t + 1) / 2) - 1, - i = this.content[o]; + bubbleUp(t) { + for (let n = this.content[t]; t > 0;) { + const o = Math.floor((t + 1) / 2) - 1; + const i = this.content[o]; if (!(this.scoreFunction(n) < this.scoreFunction(i))) break; this.content[o] = n, this.content[t] = i, t = o; } }, - sinkDown: function (t) { - for (var n = this.content.length, o = this.content[t], i = this.scoreFunction(o);;) { - var e = 2 * (t + 1), - r = e - 1, - l = null; + sinkDown(t) { + for (let n = this.content.length, o = this.content[t], i = this.scoreFunction(o); ;) { + const e = 2 * (t + 1); + const r = e - 1; + let l = null; if (r < n) { - var u = this.content[r], - h = this.scoreFunction(u); + const u = this.content[r]; + var h = this.scoreFunction(u); h < i && (l = r); } if (e < n) { - var s = this.content[e]; - this.scoreFunction(s) < (null == l ? i : h) && (l = e); + const s = this.content[e]; + this.scoreFunction(s) < (l == null ? i : h) && (l = e); } - if (null == l) break; + if (l == null) break; this.content[t] = this.content[l], this.content[l] = o, t = l; } - } + }, }, t.kdTree = function (t, i, e) { function r(t, o, i) { - var l, - u, - h = o % e.length; - return 0 === t.length ? null : 1 === t.length ? new n(t[0], h, i) : (t.sort(function (t, n) { - return t[e[h]] - n[e[h]]; - }), l = Math.floor(t.length / 2), u = new n(t[l], h, i), u.left = r(t.slice(0, l), o + 1, u), u.right = r(t.slice(l + 1), o + 1, u), u); + let l; + let u; + const h = o % e.length; + return t.length === 0 ? null : t.length === 1 ? new n(t[0], h, i) : (t.sort((t, n) => t[e[h]] - n[e[h]]), l = Math.floor(t.length / 2), u = new n(t[l], h, i), u.left = r(t.slice(0, l), o + 1, u), u.right = r(t.slice(l + 1), o + 1, u), u); } - var l = this; - Array.isArray(t) ? this.root = r(t, 0, null) : function (t) { + const l = this; + Array.isArray(t) ? this.root = r(t, 0, null) : (function (t) { function n(t) { t.left && (t.left.parent = t, n(t.left)), t.right && (t.right.parent = t, n(t.right)); } l.root = t, n(l.root); - }(t), this.toJSON = function (t) { + }(t)), this.toJSON = function (t) { t || (t = this.root); - var o = new n(t.obj, t.dimension, null); + const o = new n(t.obj, t.dimension, null); return t.left && (o.left = l.toJSON(t.left)), t.right && (o.right = l.toJSON(t.right)), o; }, this.insert = function (t) { function o(n, i) { - if (null === n) return i; - var r = e[n.dimension]; + if (n === null) return i; + const r = e[n.dimension]; return t[r] < n.obj[r] ? o(n.left, n) : o(n.right, n); } - var i, - r, - l = o(this.root, null); - null !== l ? (i = new n(t, (l.dimension + 1) % e.length, l), r = e[l.dimension], t[r] < l.obj[r] ? l.left = i : l.right = i) : this.root = new n(t, 0, null); + let i; + let r; + const l = o(this.root, null); + l !== null ? (i = new n(t, (l.dimension + 1) % e.length, l), r = e[l.dimension], t[r] < l.obj[r] ? l.left = i : l.right = i) : this.root = new n(t, 0, null); }, this.remove = function (t) { function n(o) { - if (null === o) return null; + if (o === null) return null; if (o.obj === t) return o; - var i = e[o.dimension]; + const i = e[o.dimension]; return t[i] < o.obj[i] ? n(o.left) : n(o.right); } function o(t) { function n(t, o) { - var i, r, l, u, h; - return null === t ? null : (i = e[o], t.dimension === o ? null !== t.left ? n(t.left, o) : t : (r = t.obj[i], l = n(t.left, o), u = n(t.right, o), h = t, null !== l && l.obj[i] < r && (h = l), null !== u && u.obj[i] < h.obj[i] && (h = u), h)); + let i; let r; let l; let u; let + h; + return t === null ? null : (i = e[o], t.dimension === o ? t.left !== null ? n(t.left, o) : t : (r = t.obj[i], l = n(t.left, o), u = n(t.right, o), h = t, l !== null && l.obj[i] < r && (h = l), u !== null && u.obj[i] < h.obj[i] && (h = u), h)); } - var i, r, u; - if (null === t.left && null === t.right) return null === t.parent ? void (l.root = null) : (u = e[t.parent.dimension], void (t.obj[u] < t.parent.obj[u] ? t.parent.left = null : t.parent.right = null)); - null !== t.right ? (r = (i = n(t.right, t.dimension)).obj, o(i), t.obj = r) : (r = (i = n(t.left, t.dimension)).obj, o(i), t.right = t.left, t.left = null, t.obj = r); + let i; let r; let + u; + if (t.left === null && t.right === null) return t.parent === null ? void (l.root = null) : (u = e[t.parent.dimension], void (t.obj[u] < t.parent.obj[u] ? t.parent.left = null : t.parent.right = null)); + t.right !== null ? (r = (i = n(t.right, t.dimension)).obj, o(i), t.obj = r) : (r = (i = n(t.left, t.dimension)).obj, o(i), t.right = t.left, t.left = null, t.obj = r); } - var i; - null !== (i = n(l.root)) && o(i); + let i; + (i = n(l.root)) !== null && o(i); }, this.nearest = function (t, n, r) { function u(o) { function r(t, o) { f.push([t, o]), f.size() > n && f.pop(); } - var l, - h, - s, - c, - a = e[o.dimension], - g = i(t, o.obj), - p = {}; + let l; + let h; + let s; + let c; + const a = e[o.dimension]; + const g = i(t, o.obj); + const p = {}; for (c = 0; c < e.length; c += 1) c === o.dimension ? p[e[c]] = t[e[c]] : p[e[c]] = o.obj[e[c]]; - h = i(p, o.obj), null !== o.right || null !== o.left ? (u(l = null === o.right ? o.left : null === o.left ? o.right : t[a] < o.obj[a] ? o.left : o.right), (f.size() < n || g < f.peek()[1]) && r(o, g), (f.size() < n || Math.abs(h) < f.peek()[1]) && null !== (s = l === o.left ? o.right : o.left) && u(s)) : (f.size() < n || g < f.peek()[1]) && r(o, g); + h = i(p, o.obj), o.right !== null || o.left !== null ? (u(l = o.right === null ? o.left : o.left === null ? o.right : t[a] < o.obj[a] ? o.left : o.right), (f.size() < n || g < f.peek()[1]) && r(o, g), (f.size() < n || Math.abs(h) < f.peek()[1]) && (s = l === o.left ? o.right : o.left) !== null && u(s)) : (f.size() < n || g < f.peek()[1]) && r(o, g); } - var h, s, f; - if (f = new o(function (t) { - return -t[1]; - }), r) for (h = 0; h < n; h += 1) f.push([null, r]); + let h; let s; let + f; + if (f = new o((t) => -t[1]), r) for (h = 0; h < n; h += 1) f.push([null, r]); for (l.root && u(l.root), s = [], h = 0; h < Math.min(n, f.content.length); h += 1) f.content[h][0] && s.push([f.content[h][0].obj, f.content[h][1]]); return s; }, this.balanceFactor = function () { function t(n) { - return null === n ? 0 : Math.max(t(n.left), t(n.right)) + 1; + return n === null ? 0 : Math.max(t(n.left), t(n.right)) + 1; } function n(t) { - return null === t ? 0 : n(t.left) + n(t.right) + 1; + return t === null ? 0 : n(t.left) + n(t.right) + 1; } return t(l.root) / (Math.log(n(l.root)) / Math.log(2)); }; }, t.BinaryHeap = o; - }); -})(kdTreeMin); + })); +}(kdTreeMin)); -var lodash_isequal = {exports: {}}; +const lodash_isequal = { exports: {} }; /** * Lodash (Custom Build) @@ -1524,99 +1500,98 @@ var lodash_isequal = {exports: {}}; (function (module, exports) { /** Used as the size to enable large array optimizations. */ - var LARGE_ARRAY_SIZE = 200; + const LARGE_ARRAY_SIZE = 200; /** Used to stand-in for `undefined` hash values. */ - var HASH_UNDEFINED = '__lodash_hash_undefined__'; + const HASH_UNDEFINED = '__lodash_hash_undefined__'; /** Used to compose bitmasks for value comparisons. */ - var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; + const COMPARE_PARTIAL_FLAG = 1; + const COMPARE_UNORDERED_FLAG = 2; /** Used as references for various `Number` constants. */ - var MAX_SAFE_INTEGER = 9007199254740991; + const MAX_SAFE_INTEGER = 9007199254740991; /** `Object#toString` result references. */ - var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - asyncTag = '[object AsyncFunction]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - mapTag = '[object Map]', - numberTag = '[object Number]', - nullTag = '[object Null]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - proxyTag = '[object Proxy]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]', - undefinedTag = '[object Undefined]', - weakMapTag = '[object WeakMap]'; - var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; + const argsTag = '[object Arguments]'; + const arrayTag = '[object Array]'; + const asyncTag = '[object AsyncFunction]'; + const boolTag = '[object Boolean]'; + const dateTag = '[object Date]'; + const errorTag = '[object Error]'; + const funcTag = '[object Function]'; + const genTag = '[object GeneratorFunction]'; + const mapTag = '[object Map]'; + const numberTag = '[object Number]'; + const nullTag = '[object Null]'; + const objectTag = '[object Object]'; + const promiseTag = '[object Promise]'; + const proxyTag = '[object Proxy]'; + const regexpTag = '[object RegExp]'; + const setTag = '[object Set]'; + const stringTag = '[object String]'; + const symbolTag = '[object Symbol]'; + const undefinedTag = '[object Undefined]'; + const weakMapTag = '[object WeakMap]'; + const arrayBufferTag = '[object ArrayBuffer]'; + const dataViewTag = '[object DataView]'; + const float32Tag = '[object Float32Array]'; + const float64Tag = '[object Float64Array]'; + const int8Tag = '[object Int8Array]'; + const int16Tag = '[object Int16Array]'; + const int32Tag = '[object Int32Array]'; + const uint8Tag = '[object Uint8Array]'; + const uint8ClampedTag = '[object Uint8ClampedArray]'; + const uint16Tag = '[object Uint16Array]'; + const uint32Tag = '[object Uint32Array]'; /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ - var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + const reRegExpChar = /[\\^$.*+?()[\]{}|]/g; /** Used to detect host constructors (Safari). */ - var reIsHostCtor = /^\[object .+?Constructor\]$/; + const reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used to detect unsigned integer values. */ - var reIsUint = /^(?:0|[1-9]\d*)$/; + const reIsUint = /^(?:0|[1-9]\d*)$/; /** Used to identify `toStringTag` values of typed arrays. */ - var typedArrayTags = {}; + const typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; /** Detect free variable `global` from Node.js. */ - var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + const freeGlobal = typeof commonjsGlobal === 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; /** Detect free variable `self`. */ - var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + const freeSelf = typeof self === 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ - var root = freeGlobal || freeSelf || Function('return this')(); + const root = freeGlobal || freeSelf || Function('return this')(); /** Detect free variable `exports`. */ - var freeExports = exports && !exports.nodeType && exports; + const freeExports = exports && !exports.nodeType && exports; /** Detect free variable `module`. */ - var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; + const freeModule = freeExports && 'object' === 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ - var moduleExports = freeModule && freeModule.exports === freeExports; + const moduleExports = freeModule && freeModule.exports === freeExports; /** Detect free variable `process` from Node.js. */ - var freeProcess = moduleExports && freeGlobal.process; + const freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ - var nodeUtil = function () { + const nodeUtil = (function () { try { return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} - }(); + }()); /* Node.js helper references. */ - - var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + const nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** * A specialized version of `_.filter` for arrays without support for * iteratee shorthands. @@ -1628,13 +1603,13 @@ var lodash_isequal = {exports: {}}; */ function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; + let index = -1; + const length = array == null ? 0 : array.length; + let resIndex = 0; + const result = []; while (++index < length) { - var value = array[index]; + const value = array[index]; if (predicate(value, index, array)) { result[resIndex++] = value; @@ -1652,11 +1627,10 @@ var lodash_isequal = {exports: {}}; * @returns {Array} Returns `array`. */ - function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; + let index = -1; + const { length } = values; + const offset = array.length; while (++index < length) { array[offset + index] = values[index]; @@ -1675,10 +1649,9 @@ var lodash_isequal = {exports: {}}; * else `false`. */ - function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; + let index = -1; + const length = array == null ? 0 : array.length; while (++index < length) { if (predicate(array[index], index, array)) { @@ -1698,10 +1671,9 @@ var lodash_isequal = {exports: {}}; * @returns {Array} Returns the array of results. */ - function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); + let index = -1; + const result = Array(n); while (++index < n) { result[index] = iteratee(index); @@ -1717,7 +1689,6 @@ var lodash_isequal = {exports: {}}; * @returns {Function} Returns the new capped function. */ - function baseUnary(func) { return function (value) { return func(value); @@ -1732,7 +1703,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function cacheHas(cache, key) { return cache.has(key); } @@ -1745,7 +1715,6 @@ var lodash_isequal = {exports: {}}; * @returns {*} Returns the property value. */ - function getValue(object, key) { return object == null ? undefined : object[key]; } @@ -1757,11 +1726,10 @@ var lodash_isequal = {exports: {}}; * @returns {Array} Returns the key-value pairs. */ - function mapToArray(map) { - var index = -1, - result = Array(map.size); - map.forEach(function (value, key) { + let index = -1; + const result = Array(map.size); + map.forEach((value, key) => { result[++index] = [key, value]; }); return result; @@ -1775,7 +1743,6 @@ var lodash_isequal = {exports: {}}; * @returns {Function} Returns the new function. */ - function overArg(func, transform) { return function (arg) { return func(transform(arg)); @@ -1789,79 +1756,76 @@ var lodash_isequal = {exports: {}}; * @returns {Array} Returns the values. */ - function setToArray(set) { - var index = -1, - result = Array(set.size); - set.forEach(function (value) { + let index = -1; + const result = Array(set.size); + set.forEach((value) => { result[++index] = value; }); return result; } /** Used for built-in method references. */ - - var arrayProto = Array.prototype, - funcProto = Function.prototype, - objectProto = Object.prototype; + const arrayProto = Array.prototype; + const funcProto = Function.prototype; + const objectProto = Object.prototype; /** Used to detect overreaching core-js shims. */ - var coreJsData = root['__core-js_shared__']; + const coreJsData = root['__core-js_shared__']; /** Used to resolve the decompiled source of functions. */ - var funcToString = funcProto.toString; + const funcToString = funcProto.toString; /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; + const { hasOwnProperty } = objectProto; /** Used to detect methods masquerading as native. */ - var maskSrcKey = function () { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? 'Symbol(src)_1.' + uid : ''; - }(); + const maskSrcKey = (function () { + const uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? `Symbol(src)_1.${uid}` : ''; + }()); /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ - - var nativeObjectToString = objectProto.toString; + const nativeObjectToString = objectProto.toString; /** Used to detect if a method is native. */ - var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); + const reIsNative = RegExp(`^${funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?')}$`); /** Built-in value references. */ - var Buffer = moduleExports ? root.Buffer : undefined, - Symbol = root.Symbol, - Uint8Array = root.Uint8Array, - propertyIsEnumerable = objectProto.propertyIsEnumerable, - splice = arrayProto.splice, - symToStringTag = Symbol ? Symbol.toStringTag : undefined; + const Buffer = moduleExports ? root.Buffer : undefined; + const { Symbol } = root; + const { Uint8Array } = root; + const { propertyIsEnumerable } = objectProto; + const { splice } = arrayProto; + const symToStringTag = Symbol ? Symbol.toStringTag : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ - var nativeGetSymbols = Object.getOwnPropertySymbols, - nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, - nativeKeys = overArg(Object.keys, Object); + const nativeGetSymbols = Object.getOwnPropertySymbols; + const nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + const nativeKeys = overArg(Object.keys, Object); /* Built-in method references that are verified to be native. */ - var DataView = getNative(root, 'DataView'), - Map = getNative(root, 'Map'), - Promise = getNative(root, 'Promise'), - Set = getNative(root, 'Set'), - WeakMap = getNative(root, 'WeakMap'), - nativeCreate = getNative(Object, 'create'); + const DataView = getNative(root, 'DataView'); + const Map = getNative(root, 'Map'); + const Promise = getNative(root, 'Promise'); + const Set = getNative(root, 'Set'); + const WeakMap = getNative(root, 'WeakMap'); + const nativeCreate = getNative(Object, 'create'); /** Used to detect maps, sets, and weakmaps. */ - var dataViewCtorString = toSource(DataView), - mapCtorString = toSource(Map), - promiseCtorString = toSource(Promise), - setCtorString = toSource(Set), - weakMapCtorString = toSource(WeakMap); + const dataViewCtorString = toSource(DataView); + const mapCtorString = toSource(Map); + const promiseCtorString = toSource(Promise); + const setCtorString = toSource(Set); + const weakMapCtorString = toSource(WeakMap); /** Used to convert symbols to primitives and strings. */ - var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + const symbolProto = Symbol ? Symbol.prototype : undefined; + const symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * Creates a hash object. * @@ -1871,12 +1835,12 @@ var lodash_isequal = {exports: {}}; */ function Hash(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; + let index = -1; + const length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { - var entry = entries[index]; + const entry = entries[index]; this.set(entry[0], entry[1]); } } @@ -1888,7 +1852,6 @@ var lodash_isequal = {exports: {}}; * @memberOf Hash */ - function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; this.size = 0; @@ -1904,9 +1867,8 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - function hashDelete(key) { - var result = this.has(key) && delete this.__data__[key]; + const result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; } @@ -1920,12 +1882,11 @@ var lodash_isequal = {exports: {}}; * @returns {*} Returns the entry value. */ - function hashGet(key) { - var data = this.__data__; + const data = this.__data__; if (nativeCreate) { - var result = data[key]; + const result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } @@ -1941,9 +1902,8 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function hashHas(key) { - var data = this.__data__; + const data = this.__data__; return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); } /** @@ -1957,17 +1917,15 @@ var lodash_isequal = {exports: {}}; * @returns {Object} Returns the hash instance. */ - function hashSet(key, value) { - var data = this.__data__; + const data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value; return this; } // Add methods to `Hash`. - Hash.prototype.clear = hashClear; - Hash.prototype['delete'] = hashDelete; + Hash.prototype.delete = hashDelete; Hash.prototype.get = hashGet; Hash.prototype.has = hashHas; Hash.prototype.set = hashSet; @@ -1980,12 +1938,12 @@ var lodash_isequal = {exports: {}}; */ function ListCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; + let index = -1; + const length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { - var entry = entries[index]; + const entry = entries[index]; this.set(entry[0], entry[1]); } } @@ -1997,7 +1955,6 @@ var lodash_isequal = {exports: {}}; * @memberOf ListCache */ - function listCacheClear() { this.__data__ = []; this.size = 0; @@ -2012,16 +1969,15 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); + const data = this.__data__; + const index = assocIndexOf(data, key); if (index < 0) { return false; } - var lastIndex = data.length - 1; + const lastIndex = data.length - 1; if (index == lastIndex) { data.pop(); @@ -2042,10 +1998,9 @@ var lodash_isequal = {exports: {}}; * @returns {*} Returns the entry value. */ - function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); + const data = this.__data__; + const index = assocIndexOf(data, key); return index < 0 ? undefined : data[index][1]; } /** @@ -2058,7 +2013,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function listCacheHas(key) { return assocIndexOf(this.__data__, key) > -1; } @@ -2073,10 +2027,9 @@ var lodash_isequal = {exports: {}}; * @returns {Object} Returns the list cache instance. */ - function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); + const data = this.__data__; + const index = assocIndexOf(data, key); if (index < 0) { ++this.size; @@ -2088,9 +2041,8 @@ var lodash_isequal = {exports: {}}; return this; } // Add methods to `ListCache`. - ListCache.prototype.clear = listCacheClear; - ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.delete = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; @@ -2103,12 +2055,12 @@ var lodash_isequal = {exports: {}}; */ function MapCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; + let index = -1; + const length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { - var entry = entries[index]; + const entry = entries[index]; this.set(entry[0], entry[1]); } } @@ -2120,13 +2072,12 @@ var lodash_isequal = {exports: {}}; * @memberOf MapCache */ - function mapCacheClear() { this.size = 0; this.__data__ = { - 'hash': new Hash(), - 'map': new (Map || ListCache)(), - 'string': new Hash() + hash: new Hash(), + map: new (Map || ListCache)(), + string: new Hash(), }; } /** @@ -2139,9 +2090,8 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - function mapCacheDelete(key) { - var result = getMapData(this, key)['delete'](key); + const result = getMapData(this, key).delete(key); this.size -= result ? 1 : 0; return result; } @@ -2155,7 +2105,6 @@ var lodash_isequal = {exports: {}}; * @returns {*} Returns the entry value. */ - function mapCacheGet(key) { return getMapData(this, key).get(key); } @@ -2169,7 +2118,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function mapCacheHas(key) { return getMapData(this, key).has(key); } @@ -2184,18 +2132,16 @@ var lodash_isequal = {exports: {}}; * @returns {Object} Returns the map cache instance. */ - function mapCacheSet(key, value) { - var data = getMapData(this, key), - size = data.size; + const data = getMapData(this, key); + const { size } = data; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; } // Add methods to `MapCache`. - MapCache.prototype.clear = mapCacheClear; - MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.delete = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; @@ -2209,8 +2155,8 @@ var lodash_isequal = {exports: {}}; */ function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; + let index = -1; + const length = values == null ? 0 : values.length; this.__data__ = new MapCache(); while (++index < length) { @@ -2228,7 +2174,6 @@ var lodash_isequal = {exports: {}}; * @returns {Object} Returns the cache instance. */ - function setCacheAdd(value) { this.__data__.set(value, HASH_UNDEFINED); @@ -2244,12 +2189,10 @@ var lodash_isequal = {exports: {}}; * @returns {number} Returns `true` if `value` is found, else `false`. */ - function setCacheHas(value) { return this.__data__.has(value); } // Add methods to `SetCache`. - SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; SetCache.prototype.has = setCacheHas; /** @@ -2261,7 +2204,7 @@ var lodash_isequal = {exports: {}}; */ function Stack(entries) { - var data = this.__data__ = new ListCache(entries); + const data = this.__data__ = new ListCache(entries); this.size = data.size; } /** @@ -2272,7 +2215,6 @@ var lodash_isequal = {exports: {}}; * @memberOf Stack */ - function stackClear() { this.__data__ = new ListCache(); this.size = 0; @@ -2287,10 +2229,9 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - function stackDelete(key) { - var data = this.__data__, - result = data['delete'](key); + const data = this.__data__; + const result = data.delete(key); this.size = data.size; return result; } @@ -2304,7 +2245,6 @@ var lodash_isequal = {exports: {}}; * @returns {*} Returns the entry value. */ - function stackGet(key) { return this.__data__.get(key); } @@ -2318,7 +2258,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function stackHas(key) { return this.__data__.has(key); } @@ -2333,12 +2272,11 @@ var lodash_isequal = {exports: {}}; * @returns {Object} Returns the stack cache instance. */ - function stackSet(key, value) { - var data = this.__data__; + let data = this.__data__; if (data instanceof ListCache) { - var pairs = data.__data__; + const pairs = data.__data__; if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) { pairs.push([key, value]); @@ -2354,9 +2292,8 @@ var lodash_isequal = {exports: {}}; return this; } // Add methods to `Stack`. - Stack.prototype.clear = stackClear; - Stack.prototype['delete'] = stackDelete; + Stack.prototype.delete = stackDelete; Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; @@ -2370,20 +2307,20 @@ var lodash_isequal = {exports: {}}; */ function arrayLikeKeys(value, inherited) { - var isArr = isArray(value), - isArg = !isArr && isArguments(value), - isBuff = !isArr && !isArg && isBuffer(value), - isType = !isArr && !isArg && !isBuff && isTypedArray(value), - skipIndexes = isArr || isArg || isBuff || isType, - result = skipIndexes ? baseTimes(value.length, String) : [], - length = result.length; - - for (var key in value) { + const isArr = isArray(value); + const isArg = !isArr && isArguments(value); + const isBuff = !isArr && !isArg && isBuffer(value); + const isType = !isArr && !isArg && !isBuff && isTypedArray(value); + const skipIndexes = isArr || isArg || isBuff || isType; + const result = skipIndexes ? baseTimes(value.length, String) : []; + const { length } = result; + + for (const key in value) { if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. - key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. - isBuff && (key == 'offset' || key == 'parent') || // PhantomJS 2 has enumerable non-index properties on typed arrays. - isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || // Skip index properties. - isIndex(key, length)))) { + key == 'length' // Node.js 0.10 has enumerable non-index properties on buffers. + || isBuff && (key == 'offset' || key == 'parent') // PhantomJS 2 has enumerable non-index properties on typed arrays. + || isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') // Skip index properties. + || isIndex(key, length)))) { result.push(key); } } @@ -2399,9 +2336,8 @@ var lodash_isequal = {exports: {}}; * @returns {number} Returns the index of the matched value, else `-1`. */ - function assocIndexOf(array, key) { - var length = array.length; + let { length } = array; while (length--) { if (eq(array[length][0], key)) { @@ -2423,9 +2359,8 @@ var lodash_isequal = {exports: {}}; * @returns {Array} Returns the array of property names and symbols. */ - function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); + const result = keysFunc(object); return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } /** @@ -2436,7 +2371,6 @@ var lodash_isequal = {exports: {}}; * @returns {string} Returns the `toStringTag`. */ - function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; @@ -2452,7 +2386,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if `value` is an `arguments` object, */ - function baseIsArguments(value) { return isObjectLike(value) && baseGetTag(value) == argsTag; } @@ -2471,7 +2404,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ - function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; @@ -2498,17 +2430,16 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ - function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = objIsArr ? arrayTag : getTag(object), - othTag = othIsArr ? arrayTag : getTag(other); + let objIsArr = isArray(object); + const othIsArr = isArray(other); + let objTag = objIsArr ? arrayTag : getTag(object); + let othTag = othIsArr ? arrayTag : getTag(other); objTag = objTag == argsTag ? objectTag : objTag; othTag = othTag == argsTag ? objectTag : othTag; - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; + let objIsObj = objTag == objectTag; + const othIsObj = othTag == objectTag; + const isSameTag = objTag == othTag; if (isSameTag && isBuffer(object)) { if (!isBuffer(other)) { @@ -2525,12 +2456,12 @@ var lodash_isequal = {exports: {}}; } if (!(bitmask & COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + const objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'); + const othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; + const objUnwrapped = objIsWrapped ? object.value() : object; + const othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new Stack()); return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } @@ -2552,13 +2483,12 @@ var lodash_isequal = {exports: {}}; * else `false`. */ - function baseIsNative(value) { if (!isObject(value) || isMasked(value)) { return false; } - var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + const pattern = isFunction(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } /** @@ -2569,7 +2499,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ - function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } @@ -2581,15 +2510,14 @@ var lodash_isequal = {exports: {}}; * @returns {Array} Returns the array of property names. */ - function baseKeys(object) { if (!isPrototype(object)) { return nativeKeys(object); } - var result = []; + const result = []; - for (var key in Object(object)) { + for (const key in Object(object)) { if (hasOwnProperty.call(object, key) && key != 'constructor') { result.push(key); } @@ -2611,32 +2539,30 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ - function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; + const isPartial = bitmask & COMPARE_PARTIAL_FLAG; + const arrLength = array.length; + const othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } // Assume cyclic values are equal. - - var stacked = stack.get(array); + const stacked = stack.get(array); if (stacked && stack.get(other)) { return stacked == other; } - var index = -1, - result = true, - seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined; + let index = -1; + let result = true; + const seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined; stack.set(array, other); stack.set(other, array); // Ignore non-index properties. while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; + var arrValue = array[index]; + const othValue = other[index]; if (customizer) { var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); @@ -2651,9 +2577,8 @@ var lodash_isequal = {exports: {}}; break; } // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!arraySome(other, function (othValue, othIndex) { + if (!arraySome(other, (othValue, othIndex) => { if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { return seen.push(othIndex); } @@ -2667,8 +2592,8 @@ var lodash_isequal = {exports: {}}; } } - stack['delete'](array); - stack['delete'](other); + stack.delete(array); + stack.delete(other); return result; } /** @@ -2689,7 +2614,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ - function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { switch (tag) { case dataViewTag: @@ -2722,7 +2646,7 @@ var lodash_isequal = {exports: {}}; // Coerce regexes to strings and treat strings, primitives and objects, // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring // for more details. - return object == other + ''; + return object == `${other}`; case mapTag: var convert = mapToArray; @@ -2735,7 +2659,6 @@ var lodash_isequal = {exports: {}}; return false; } // Assume cyclic values are equal. - var stacked = stack.get(object); if (stacked) { @@ -2746,14 +2669,13 @@ var lodash_isequal = {exports: {}}; stack.set(object, other); var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); + stack.delete(object); return result; case symbolTag: if (symbolValueOf) { return symbolValueOf.call(object) == symbolValueOf.call(other); } - } return false; @@ -2772,19 +2694,18 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ - function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - objProps = getAllKeys(object), - objLength = objProps.length, - othProps = getAllKeys(other), - othLength = othProps.length; + const isPartial = bitmask & COMPARE_PARTIAL_FLAG; + const objProps = getAllKeys(object); + const objLength = objProps.length; + const othProps = getAllKeys(other); + const othLength = othProps.length; if (objLength != othLength && !isPartial) { return false; } - var index = objLength; + let index = objLength; while (index--) { var key = objProps[index]; @@ -2794,28 +2715,26 @@ var lodash_isequal = {exports: {}}; } } // Assume cyclic values are equal. - - var stacked = stack.get(object); + const stacked = stack.get(object); if (stacked && stack.get(other)) { return stacked == other; } - var result = true; + let result = true; stack.set(object, other); stack.set(other, object); - var skipCtor = isPartial; + let skipCtor = isPartial; while (++index < objLength) { key = objProps[index]; - var objValue = object[key], - othValue = other[key]; + const objValue = object[key]; + const othValue = other[key]; if (customizer) { var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); } // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { result = false; break; @@ -2825,16 +2744,16 @@ var lodash_isequal = {exports: {}}; } if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. + const objCtor = object.constructor; + const othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { + if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor === 'function' && objCtor instanceof objCtor && typeof othCtor === 'function' && othCtor instanceof othCtor)) { result = false; } } - stack['delete'](object); - stack['delete'](other); + stack.delete(object); + stack.delete(other); return result; } /** @@ -2845,7 +2764,6 @@ var lodash_isequal = {exports: {}}; * @returns {Array} Returns the array of property names and symbols. */ - function getAllKeys(object) { return baseGetAllKeys(object, keys, getSymbols); } @@ -2858,10 +2776,9 @@ var lodash_isequal = {exports: {}}; * @returns {*} Returns the map data. */ - function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; + const data = map.__data__; + return isKeyable(key) ? data[typeof key === 'string' ? 'string' : 'hash'] : data.map; } /** * Gets the native function at `key` of `object`. @@ -2872,9 +2789,8 @@ var lodash_isequal = {exports: {}}; * @returns {*} Returns the function if it's native, else `undefined`. */ - function getNative(object, key) { - var value = getValue(object, key); + const value = getValue(object, key); return baseIsNative(value) ? value : undefined; } /** @@ -2885,17 +2801,16 @@ var lodash_isequal = {exports: {}}; * @returns {string} Returns the raw `toStringTag`. */ - function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; + const isOwn = hasOwnProperty.call(value, symToStringTag); + const tag = value[symToStringTag]; try { value[symToStringTag] = undefined; var unmasked = true; } catch (e) {} - var result = nativeObjectToString.call(value); + const result = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { @@ -2915,16 +2830,13 @@ var lodash_isequal = {exports: {}}; * @returns {Array} Returns the array of symbols. */ - var getSymbols = !nativeGetSymbols ? stubArray : function (object) { if (object == null) { return []; } object = Object(object); - return arrayFilter(nativeGetSymbols(object), function (symbol) { - return propertyIsEnumerable.call(object, symbol); - }); + return arrayFilter(nativeGetSymbols(object), (symbol) => propertyIsEnumerable.call(object, symbol)); }; /** * Gets the `toStringTag` of `value`. @@ -2938,9 +2850,9 @@ var lodash_isequal = {exports: {}}; if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) { getTag = function (value) { - var result = baseGetTag(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : ''; + const result = baseGetTag(value); + const Ctor = result == objectTag ? value.constructor : undefined; + const ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { @@ -2973,10 +2885,9 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ - function isIndex(value, length) { length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length; + return !!length && (typeof value === 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length; } /** * Checks if `value` is suitable for use as unique object key. @@ -2986,9 +2897,8 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ - function isKeyable(value) { - var type = typeof value; + const type = typeof value; return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null; } /** @@ -2999,7 +2909,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ - function isMasked(func) { return !!maskSrcKey && maskSrcKey in func; } @@ -3011,10 +2920,9 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ - function isPrototype(value) { - var Ctor = value && value.constructor, - proto = typeof Ctor == 'function' && Ctor.prototype || objectProto; + const Ctor = value && value.constructor; + const proto = typeof Ctor === 'function' && Ctor.prototype || objectProto; return value === proto; } /** @@ -3025,7 +2933,6 @@ var lodash_isequal = {exports: {}}; * @returns {string} Returns the converted string. */ - function objectToString(value) { return nativeObjectToString.call(value); } @@ -3037,7 +2944,6 @@ var lodash_isequal = {exports: {}}; * @returns {string} Returns the source code. */ - function toSource(func) { if (func != null) { try { @@ -3045,7 +2951,7 @@ var lodash_isequal = {exports: {}}; } catch (e) {} try { - return func + ''; + return `${func}`; } catch (e) {} } @@ -3084,7 +2990,6 @@ var lodash_isequal = {exports: {}}; * // => true */ - function eq(value, other) { return value === other || value !== value && other !== other; } @@ -3107,12 +3012,11 @@ var lodash_isequal = {exports: {}}; * // => false */ - var isArguments = baseIsArguments(function () { return arguments; }()) ? baseIsArguments : function (value) { - return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); - }; + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); + }; /** * Checks if `value` is classified as an `Array` object. * @@ -3137,7 +3041,7 @@ var lodash_isequal = {exports: {}}; * // => false */ - var isArray = Array.isArray; + var { isArray } = Array; /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or @@ -3185,7 +3089,6 @@ var lodash_isequal = {exports: {}}; * // => false */ - var isBuffer = nativeIsBuffer || stubFalse; /** * Performs a deep comparison between two values to determine if they are @@ -3237,15 +3140,13 @@ var lodash_isequal = {exports: {}}; * // => false */ - function isFunction(value) { if (!isObject(value)) { return false; } // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 9 which returns 'object' for typed arrays and other constructors. - - var tag = baseGetTag(value); + const tag = baseGetTag(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } /** @@ -3275,9 +3176,8 @@ var lodash_isequal = {exports: {}}; * // => false */ - function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + return typeof value === 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } /** * Checks if `value` is the @@ -3305,9 +3205,8 @@ var lodash_isequal = {exports: {}}; * // => false */ - function isObject(value) { - var type = typeof value; + const type = typeof value; return value != null && (type == 'object' || type == 'function'); } /** @@ -3335,9 +3234,8 @@ var lodash_isequal = {exports: {}}; * // => false */ - function isObjectLike(value) { - return value != null && typeof value == 'object'; + return value != null && typeof value === 'object'; } /** * Checks if `value` is classified as a typed array. @@ -3357,7 +3255,6 @@ var lodash_isequal = {exports: {}}; * // => false */ - var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; /** * Creates an array of the own enumerable property names of `object`. @@ -3410,7 +3307,6 @@ var lodash_isequal = {exports: {}}; * // => false */ - function stubArray() { return []; } @@ -3428,15 +3324,14 @@ var lodash_isequal = {exports: {}}; * // => [false, false] */ - function stubFalse() { return false; } module.exports = isEqual; -})(lodash_isequal, lodash_isequal.exports); +}(lodash_isequal, lodash_isequal.exports)); -var munkres$1 = {exports: {}}; +const munkres$1 = { exports: {} }; /** * Introduction @@ -3612,9 +3507,9 @@ var munkres$1 = {exports: {}}; * * Copyright and License * ===================== - * + * * Copyright 2008-2016 Brian M. Clapper - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -3633,12 +3528,12 @@ var munkres$1 = {exports: {}}; * A very large numerical value which can be used like an integer * (i. e., adding integers of similar size does not result in overflow). */ - var MAX_SIZE = parseInt(Number.MAX_SAFE_INTEGER / 2) || (1 << 26) * (1 << 26); + const MAX_SIZE = parseInt(Number.MAX_SAFE_INTEGER / 2) || (1 << 26) * (1 << 26); /** * A default value to pad the cost matrix with if it is not quadratic. */ - var DEFAULT_PAD_VALUE = 0; // --------------------------------------------------------------------------- + const DEFAULT_PAD_VALUE = 0; // --------------------------------------------------------------------------- // Classes // --------------------------------------------------------------------------- @@ -3667,21 +3562,20 @@ var munkres$1 = {exports: {}}; * @return {Array} An array of arrays representing the padded matrix */ - Munkres.prototype.pad_matrix = function (matrix, pad_value) { pad_value = pad_value || DEFAULT_PAD_VALUE; - var max_columns = 0; - var total_rows = matrix.length; - var i; + let max_columns = 0; + let total_rows = matrix.length; + let i; for (i = 0; i < total_rows; ++i) if (matrix[i].length > max_columns) max_columns = matrix[i].length; total_rows = max_columns > total_rows ? max_columns : total_rows; - var new_matrix = []; + const new_matrix = []; for (i = 0; i < total_rows; ++i) { - var row = matrix[i] || []; - var new_row = row.slice(); // If this row is too short, pad it + const row = matrix[i] || []; + const new_row = row.slice(); // If this row is too short, pad it while (total_rows > new_row.length) new_row.push(pad_value); @@ -3710,7 +3604,6 @@ var munkres$1 = {exports: {}}; * cost path through the matrix */ - Munkres.prototype.compute = function (cost_matrix, options) { options = options || {}; options.padValue = options.padValue || DEFAULT_PAD_VALUE; @@ -3718,7 +3611,7 @@ var munkres$1 = {exports: {}}; this.n = this.C.length; this.original_length = cost_matrix.length; this.original_width = cost_matrix[0].length; - var nfalseArray = []; + const nfalseArray = []; /* array of n false values */ while (nfalseArray.length < this.n) nfalseArray.push(false); @@ -3729,26 +3622,26 @@ var munkres$1 = {exports: {}}; this.Z0_c = 0; this.path = this.__make_matrix(this.n * 2, 0); this.marked = this.__make_matrix(this.n, 0); - var step = 1; - var steps = { + let step = 1; + const steps = { 1: this.__step1, 2: this.__step2, 3: this.__step3, 4: this.__step4, 5: this.__step5, - 6: this.__step6 + 6: this.__step6, }; while (true) { - var func = steps[step]; + const func = steps[step]; if (!func) // done - break; + { break; } step = func.apply(this); } - var results = []; + const results = []; - for (var i = 0; i < this.original_length; ++i) for (var j = 0; j < this.original_width; ++j) if (this.marked[i][j] == 1) results.push([i, j]); + for (let i = 0; i < this.original_length; ++i) for (let j = 0; j < this.original_width; ++j) if (this.marked[i][j] == 1) results.push([i, j]); return results; }; @@ -3761,14 +3654,13 @@ var munkres$1 = {exports: {}}; * @return {Array} An array of arrays representing the newly created matrix */ - Munkres.prototype.__make_matrix = function (n, val) { - var matrix = []; + const matrix = []; - for (var i = 0; i < n; ++i) { + for (let i = 0; i < n; ++i) { matrix[i] = []; - for (var j = 0; j < n; ++j) matrix[i][j] = val; + for (let j = 0; j < n; ++j) matrix[i][j] = val; } return matrix; @@ -3778,14 +3670,13 @@ var munkres$1 = {exports: {}}; * subtract it from every element in its row. Go to Step 2. */ - Munkres.prototype.__step1 = function () { - for (var i = 0; i < this.n; ++i) { + for (let i = 0; i < this.n; ++i) { // Find the minimum value for this row and subtract that minimum // from every element in the row. - var minval = Math.min.apply(Math, this.C[i]); + const minval = Math.min.apply(Math, this.C[i]); - for (var j = 0; j < this.n; ++j) this.C[i][j] -= minval; + for (let j = 0; j < this.n; ++j) this.C[i][j] -= minval; } return 2; @@ -3796,10 +3687,9 @@ var munkres$1 = {exports: {}}; * matrix. Go to Step 3. */ - Munkres.prototype.__step2 = function () { - for (var i = 0; i < this.n; ++i) { - for (var j = 0; j < this.n; ++j) { + for (let i = 0; i < this.n; ++i) { + for (let j = 0; j < this.n; ++j) { if (this.C[i][j] === 0 && !this.col_covered[j] && !this.row_covered[i]) { this.marked[i][j] = 1; this.col_covered[j] = true; @@ -3819,12 +3709,11 @@ var munkres$1 = {exports: {}}; * assignments. In this case, Go to DONE, otherwise, Go to Step 4. */ - Munkres.prototype.__step3 = function () { - var count = 0; + let count = 0; - for (var i = 0; i < this.n; ++i) { - for (var j = 0; j < this.n; ++j) { + for (let i = 0; i < this.n; ++i) { + for (let j = 0; j < this.n; ++j) { if (this.marked[i][j] == 1 && this.col_covered[j] == false) { this.col_covered[j] = true; ++count; @@ -3842,15 +3731,14 @@ var munkres$1 = {exports: {}}; * left. Save the smallest uncovered value and Go to Step 6. */ - Munkres.prototype.__step4 = function () { - var done = false; - var row = -1, - col = -1, - star_col = -1; + const done = false; + let row = -1; + let col = -1; + let star_col = -1; while (!done) { - var z = this.__find_a_zero(); + const z = this.__find_a_zero(); row = z[0]; col = z[1]; @@ -3880,15 +3768,14 @@ var munkres$1 = {exports: {}}; * primes and uncover every line in the matrix. Return to Step 3 */ - Munkres.prototype.__step5 = function () { - var count = 0; + let count = 0; this.path[count][0] = this.Z0_r; this.path[count][1] = this.Z0_c; - var done = false; + let done = false; while (!done) { - var row = this.__find_star_in_col(this.path[count][1]); + const row = this.__find_star_in_col(this.path[count][1]); if (row >= 0) { count++; @@ -3899,7 +3786,7 @@ var munkres$1 = {exports: {}}; } if (!done) { - var col = this.__find_prime_in_row(this.path[count][0]); + const col = this.__find_prime_in_row(this.path[count][0]); count++; this.path[count][0] = this.path[count - 1][0]; @@ -3922,12 +3809,11 @@ var munkres$1 = {exports: {}}; * lines. */ - Munkres.prototype.__step6 = function () { - var minval = this.__find_smallest(); + const minval = this.__find_smallest(); - for (var i = 0; i < this.n; ++i) { - for (var j = 0; j < this.n; ++j) { + for (let i = 0; i < this.n; ++i) { + for (let j = 0; j < this.n; ++j) { if (this.row_covered[i]) this.C[i][j] += minval; if (!this.col_covered[j]) this.C[i][j] -= minval; } @@ -3941,11 +3827,10 @@ var munkres$1 = {exports: {}}; * @return {Number} The smallest uncovered value, or MAX_SIZE if no value was found */ - Munkres.prototype.__find_smallest = function () { - var minval = MAX_SIZE; + let minval = MAX_SIZE; - for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (!this.row_covered[i] && !this.col_covered[j]) if (minval > this.C[i][j]) minval = this.C[i][j]; + for (let i = 0; i < this.n; ++i) for (let j = 0; j < this.n; ++j) if (!this.row_covered[i] && !this.col_covered[j]) if (minval > this.C[i][j]) minval = this.C[i][j]; return minval; }; @@ -3955,9 +3840,8 @@ var munkres$1 = {exports: {}}; * @return {Array} The indices of the found element or [-1, -1] if not found */ - Munkres.prototype.__find_a_zero = function () { - for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.C[i][j] === 0 && !this.row_covered[i] && !this.col_covered[j]) return [i, j]; + for (let i = 0; i < this.n; ++i) for (let j = 0; j < this.n; ++j) if (this.C[i][j] === 0 && !this.row_covered[i] && !this.col_covered[j]) return [i, j]; return [-1, -1]; }; @@ -3969,9 +3853,8 @@ var munkres$1 = {exports: {}}; * @return {Number} */ - Munkres.prototype.__find_star_in_row = function (row) { - for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 1) return j; + for (let j = 0; j < this.n; ++j) if (this.marked[row][j] == 1) return j; return -1; }; @@ -3981,9 +3864,8 @@ var munkres$1 = {exports: {}}; * @return {Number} The row index, or -1 if no starred element was found */ - Munkres.prototype.__find_star_in_col = function (col) { - for (var i = 0; i < this.n; ++i) if (this.marked[i][col] == 1) return i; + for (let i = 0; i < this.n; ++i) if (this.marked[i][col] == 1) return i; return -1; }; @@ -3993,30 +3875,27 @@ var munkres$1 = {exports: {}}; * @return {Number} The column index, or -1 if no prime element was found */ - Munkres.prototype.__find_prime_in_row = function (row) { - for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 2) return j; + for (let j = 0; j < this.n; ++j) if (this.marked[row][j] == 2) return j; return -1; }; Munkres.prototype.__convert_path = function (path, count) { - for (var i = 0; i <= count; ++i) this.marked[path[i][0]][path[i][1]] = this.marked[path[i][0]][path[i][1]] == 1 ? 0 : 1; + for (let i = 0; i <= count; ++i) this.marked[path[i][0]][path[i][1]] = this.marked[path[i][0]][path[i][1]] == 1 ? 0 : 1; }; /** Clear all covered matrix cells */ - Munkres.prototype.__clear_covers = function () { - for (var i = 0; i < this.n; ++i) { + for (let i = 0; i < this.n; ++i) { this.row_covered[i] = false; this.col_covered[i] = false; } }; /** Erase all prime markings */ - Munkres.prototype.__erase_primes = function () { - for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.marked[i][j] == 2) this.marked[i][j] = 0; + for (let i = 0; i < this.n; ++i) for (let j = 0; j < this.n; ++j) if (this.marked[i][j] == 2) this.marked[i][j] = 0; }; // --------------------------------------------------------------------------- // Functions // --------------------------------------------------------------------------- @@ -4044,12 +3923,12 @@ var munkres$1 = {exports: {}}; * @return {Array} The converted matrix */ - function make_cost_matrix(profit_matrix, inversion_function) { - var i, j; + let i; let + j; if (!inversion_function) { - var maximum = -1.0 / 0.0; + let maximum = -1.0 / 0.0; for (i = 0; i < profit_matrix.length; ++i) for (j = 0; j < profit_matrix[i].length; ++j) if (profit_matrix[i][j] > maximum) maximum = profit_matrix[i][j]; @@ -4058,10 +3937,10 @@ var munkres$1 = {exports: {}}; }; } - var cost_matrix = []; + const cost_matrix = []; for (i = 0; i < profit_matrix.length; ++i) { - var row = profit_matrix[i]; + const row = profit_matrix[i]; cost_matrix[i] = []; for (j = 0; j < row.length; ++j) cost_matrix[i][j] = inversion_function(profit_matrix[i][j]); @@ -4078,25 +3957,25 @@ var munkres$1 = {exports: {}}; * @return {String} The formatted matrix */ - function format_matrix(matrix) { - var columnWidths = []; - var i, j; + const columnWidths = []; + let i; let + j; for (i = 0; i < matrix.length; ++i) { for (j = 0; j < matrix[i].length; ++j) { - var entryWidth = String(matrix[i][j]).length; + const entryWidth = String(matrix[i][j]).length; if (!columnWidths[j] || entryWidth >= columnWidths[j]) columnWidths[j] = entryWidth; } } - var formatted = ''; + let formatted = ''; for (i = 0; i < matrix.length; ++i) { for (j = 0; j < matrix[i].length; ++j) { - var s = String(matrix[i][j]); // pad at front with spaces + let s = String(matrix[i][j]); // pad at front with spaces - while (s.length < columnWidths[j]) s = ' ' + s; + while (s.length < columnWidths[j]) s = ` ${s}`; formatted += s; // separate columns @@ -4111,13 +3990,12 @@ var munkres$1 = {exports: {}}; // Exports // --------------------------------------------------------------------------- - function computeMunkres(cost_matrix, options) { - var m = new Munkres(); + const m = new Munkres(); return m.compute(cost_matrix, options); } - computeMunkres.version = "1.2.2"; + computeMunkres.version = '1.2.2'; computeMunkres.format_matrix = format_matrix; computeMunkres.make_cost_matrix = make_cost_matrix; computeMunkres.Munkres = Munkres; // backwards compatibility @@ -4125,20 +4003,20 @@ var munkres$1 = {exports: {}}; if (module.exports) { module.exports = computeMunkres; } -})(munkres$1); +}(munkres$1)); -var itemTrackedModule = ItemTracked$1; -var ItemTracked = itemTrackedModule.ItemTracked; -var kdTree = kdTreeMin.kdTree; -var munkres = munkres$1.exports; -var iouAreas = utils.iouAreas; +const itemTrackedModule = ItemTracked$1; +const { ItemTracked } = itemTrackedModule; +const { kdTree } = kdTreeMin; +const munkres = munkres$1.exports; +const { iouAreas } = utils; -var iouDistance = function iouDistance(item1, item2) { +const iouDistance = function iouDistance(item1, item2) { // IOU distance, between 0 and 1 // The smaller the less overlap - var iou = iouAreas(item1, item2); // Invert this as the KDTREESEARCH is looking for the smaller value + const iou = iouAreas(item1, item2); // Invert this as the KDTREESEARCH is looking for the smaller value - var distance = 1 - iou; // If the overlap is iou < 0.95, exclude value + let distance = 1 - iou; // If the overlap is iou < 0.95, exclude value if (distance > 1 - params.iouLimit) { distance = params.distanceLimit + 1; @@ -4166,31 +4044,31 @@ var params = { distanceLimit: 10000, // The algorithm used to match tracks with new detections. Can be either // 'kdTree' or 'munkres'. - matchingAlgorithm: 'munkres' // matchingAlgorithm: 'kdTree', + matchingAlgorithm: 'munkres', // matchingAlgorithm: 'kdTree', }; // A dictionary of itemTracked currently tracked // key: uuid // value: ItemTracked object -var mapOfItemsTracked = new Map(); // A dictionnary keeping memory of all tracked object (even after they disappear) +let mapOfItemsTracked = new Map(); // A dictionnary keeping memory of all tracked object (even after they disappear) // Useful to ouput the file of all items tracked -var mapOfAllItemsTracked = new Map(); // By default, we do not keep all the history in memory +let mapOfAllItemsTracked = new Map(); // By default, we do not keep all the history in memory -var keepAllHistoryInMemory = false; -var computeDistance = tracker.computeDistance = iouDistance; +let keepAllHistoryInMemory = false; +const computeDistance = tracker.computeDistance = iouDistance; -var updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameNb) { +const updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameNb) { // A kd-tree containing all the itemtracked // Need to rebuild on each frame, because itemTracked positions have changed - var treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ['x', 'y', 'w', 'h']); // Contruct a kd tree for the detections of this frame + let treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ['x', 'y', 'w', 'h']); // Contruct a kd tree for the detections of this frame - var treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ['x', 'y', 'w', 'h']); // SCENARIO 1: itemsTracked map is empty + const treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ['x', 'y', 'w', 'h']); // SCENARIO 1: itemsTracked map is empty if (mapOfItemsTracked.size === 0) { // Just add every detected item as item Tracked - detectionsOfThisFrame.forEach(function (itemDetected) { - var newItemTracked = new ItemTracked(itemDetected, frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map + detectionsOfThisFrame.forEach((itemDetected) => { + const newItemTracked = new ItemTracked(itemDetected, frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree @@ -4198,81 +4076,70 @@ var updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = fu }); } // SCENARIO 2: We already have itemsTracked in the map else { - var matchedList = new Array(detectionsOfThisFrame.length); + const matchedList = new Array(detectionsOfThisFrame.length); matchedList.fill(false); // Match existing Tracked items with the items detected in the new frame // For each look in the new detection to find the closest match if (detectionsOfThisFrame.length > 0) { if (params.matchingAlgorithm === 'munkres') { - var trackedItemIds = Array.from(mapOfItemsTracked.keys()); - var costMatrix = Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { - var predictedPosition = itemTracked.predictNextPosition(); - return detectionsOfThisFrame.map(function (detection) { - return params.distanceFunc(predictedPosition, detection); - }); + const trackedItemIds = Array.from(mapOfItemsTracked.keys()); + const costMatrix = Array.from(mapOfItemsTracked.values()).map((itemTracked) => { + const predictedPosition = itemTracked.predictNextPosition(); + return detectionsOfThisFrame.map((detection) => params.distanceFunc(predictedPosition, detection)); }); - mapOfItemsTracked.forEach(function (itemTracked) { + mapOfItemsTracked.forEach((itemTracked) => { itemTracked.makeAvailable(); }); - munkres(costMatrix).filter(function (m) { - return costMatrix[m[0]][m[1]] <= params.distanceLimit; - }).forEach(function (m) { - var itemTracked = mapOfItemsTracked.get(trackedItemIds[m[0]]); - var updatedTrackedItemProperties = detectionsOfThisFrame[m[1]]; + munkres(costMatrix).filter((m) => costMatrix[m[0]][m[1]] <= params.distanceLimit).forEach((m) => { + const itemTracked = mapOfItemsTracked.get(trackedItemIds[m[0]]); + const updatedTrackedItemProperties = detectionsOfThisFrame[m[1]]; matchedList[m[1]] = { - idDisplay: itemTracked.idDisplay + idDisplay: itemTracked.idDisplay, }; itemTracked.makeUnavailable().update(updatedTrackedItemProperties, frameNb); }); - matchedList.forEach(function (matched, index) { + matchedList.forEach((matched, index) => { if (!matched) { - if (Math.min.apply(Math, _toConsumableArray(costMatrix.map(function (m) { - return m[index]; - }))) > params.distanceLimit) { - var newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); + if (Math.min.apply(Math, _toConsumableArray(costMatrix.map((m) => m[index]))) > params.distanceLimit) { + const newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); mapOfItemsTracked.set(newItemTracked.id, newItemTracked); newItemTracked.makeUnavailable(); - costMatrix.push(detectionsOfThisFrame.map(function (detection) { - return params.distanceFunc(newItemTracked, detection); - })); + costMatrix.push(detectionsOfThisFrame.map((detection) => params.distanceFunc(newItemTracked, detection))); } } }); } else if (params.matchingAlgorithm === 'kdTree') { - mapOfItemsTracked.forEach(function (itemTracked) { + mapOfItemsTracked.forEach((itemTracked) => { // First predict the new position of the itemTracked - var predictedPosition = itemTracked.predictNextPosition(); // Make available for matching + const predictedPosition = itemTracked.predictNextPosition(); // Make available for matching itemTracked.makeAvailable(); // Search for a detection that matches - var treeSearchResult = treeDetectionsOfThisFrame.nearest(predictedPosition, 1, params.distanceLimit)[0]; // Only for debug assessments of predictions + const treeSearchResult = treeDetectionsOfThisFrame.nearest(predictedPosition, 1, params.distanceLimit)[0]; // Only for debug assessments of predictions treeDetectionsOfThisFrame.nearest(itemTracked, 1, params.distanceLimit)[0]; // Only if we enable the extra refinement treeDetectionsOfThisFrame.nearest(predictedPosition, 2, params.distanceLimit); // If we have found something if (treeSearchResult) { - - var indexClosestNewDetectedItem = detectionsOfThisFrame.indexOf(treeSearchResult[0]); // If this detections was not already matched to a tracked item + const indexClosestNewDetectedItem = detectionsOfThisFrame.indexOf(treeSearchResult[0]); // If this detections was not already matched to a tracked item // (otherwise it would be matched to two tracked items...) if (!matchedList[indexClosestNewDetectedItem]) { matchedList[indexClosestNewDetectedItem] = { - idDisplay: itemTracked.idDisplay + idDisplay: itemTracked.idDisplay, }; // Update properties of tracked object - var updatedTrackedItemProperties = detectionsOfThisFrame[indexClosestNewDetectedItem]; + const updatedTrackedItemProperties = detectionsOfThisFrame[indexClosestNewDetectedItem]; mapOfItemsTracked.get(itemTracked.id).makeUnavailable().update(updatedTrackedItemProperties, frameNb); } } }); } else { - throw "Unknown matching algorithm \"".concat(params.matchingAlgorithm, "\""); + throw 'Unknown matching algorithm "'.concat(params.matchingAlgorithm, '"'); } } else { - - - mapOfItemsTracked.forEach(function (itemTracked) { + mapOfItemsTracked.forEach((itemTracked) => { itemTracked.makeAvailable(); }); } @@ -4285,14 +4152,14 @@ var updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = fu // Rebuild tracked item tree to take in account the new positions treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ['x', 'y', 'w', 'h']); // console.log(`Nb new items Unmatched : ${matchedList.filter((isMatched) => isMatched === false).length}`) - matchedList.forEach(function (matched, index) { + matchedList.forEach((matched, index) => { // Iterate through unmatched new detections if (!matched) { // Do not add as new tracked item if it is to similar to an existing one - var treeSearchResult = treeItemsTracked.nearest(detectionsOfThisFrame[index], 1, params.distanceLimit)[0]; + const treeSearchResult = treeItemsTracked.nearest(detectionsOfThisFrame[index], 1, params.distanceLimit)[0]; if (!treeSearchResult) { - var newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map + const newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree @@ -4306,14 +4173,13 @@ var updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = fu } // Start killing the itemTracked (and predicting next position) // that are tracked but haven't been matched this frame - - mapOfItemsTracked.forEach(function (itemTracked) { + mapOfItemsTracked.forEach((itemTracked) => { if (itemTracked.available) { itemTracked.countDown(frameNb); itemTracked.updateTheoricalPositionAndSize(); if (itemTracked.isDead()) { - mapOfItemsTracked["delete"](itemTracked.id); + mapOfItemsTracked.delete(itemTracked.id); treeItemsTracked.remove(itemTracked); if (keepAllHistoryInMemory) { @@ -4325,60 +4191,50 @@ var updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = fu } }; -var reset = tracker.reset = function () { +const reset = tracker.reset = function () { mapOfItemsTracked = new Map(); mapOfAllItemsTracked = new Map(); itemTrackedModule.reset(); }; -var setParams = tracker.setParams = function (newParams) { - Object.keys(newParams).forEach(function (key) { +const setParams = tracker.setParams = function (newParams) { + Object.keys(newParams).forEach((key) => { params[key] = newParams[key]; }); }; -var enableKeepInMemory = tracker.enableKeepInMemory = function () { +const enableKeepInMemory = tracker.enableKeepInMemory = function () { keepAllHistoryInMemory = true; }; -var disableKeepInMemory = tracker.disableKeepInMemory = function () { +const disableKeepInMemory = tracker.disableKeepInMemory = function () { keepAllHistoryInMemory = false; }; -var getJSONOfTrackedItems = tracker.getJSONOfTrackedItems = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { - return itemTracked.toJSON(roundInt); - }); +const getJSONOfTrackedItems = tracker.getJSONOfTrackedItems = function () { + const roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return Array.from(mapOfItemsTracked.values()).map((itemTracked) => itemTracked.toJSON(roundInt)); }; -var getJSONDebugOfTrackedItems = tracker.getJSONDebugOfTrackedItems = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { - return itemTracked.toJSONDebug(roundInt); - }); +const getJSONDebugOfTrackedItems = tracker.getJSONDebugOfTrackedItems = function () { + const roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return Array.from(mapOfItemsTracked.values()).map((itemTracked) => itemTracked.toJSONDebug(roundInt)); }; -var getTrackedItemsInMOTFormat = tracker.getTrackedItemsInMOTFormat = function (frameNb) { - return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { - return itemTracked.toMOT(frameNb); - }); +const getTrackedItemsInMOTFormat = tracker.getTrackedItemsInMOTFormat = function (frameNb) { + return Array.from(mapOfItemsTracked.values()).map((itemTracked) => itemTracked.toMOT(frameNb)); }; // Work only if keepInMemory is enabled - -var getAllTrackedItems = tracker.getAllTrackedItems = function () { +const getAllTrackedItems = tracker.getAllTrackedItems = function () { return mapOfAllItemsTracked; }; // Work only if keepInMemory is enabled - -var getJSONOfAllTrackedItems = tracker.getJSONOfAllTrackedItems = function () { - return Array.from(mapOfAllItemsTracked.values()).map(function (itemTracked) { - return itemTracked.toJSONGenericInfo(); - }); +const getJSONOfAllTrackedItems = tracker.getJSONOfAllTrackedItems = function () { + return Array.from(mapOfAllItemsTracked.values()).map((itemTracked) => itemTracked.toJSONGenericInfo()); }; exports.computeDistance = computeDistance; -exports["default"] = tracker; +exports.default = tracker; exports.disableKeepInMemory = disableKeepInMemory; exports.enableKeepInMemory = enableKeepInMemory; exports.getAllTrackedItems = getAllTrackedItems; diff --git a/bundle.esm.js b/bundle.esm.js index 84a3f1b..e4060b4 100644 --- a/bundle.esm.js +++ b/bundle.esm.js @@ -7,16 +7,16 @@ function _arrayWithoutHoles(arr) { } function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); + if (typeof Symbol !== 'undefined' && iter[Symbol.iterator] != null || iter['@@iterator'] != null) return Array.from(iter); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + if (typeof o === 'string') return _arrayLikeToArray(o, minLen); + let n = Object.prototype.toString.call(o).slice(8, -1); + if (n === 'Object' && o.constructor) n = o.constructor.name; + if (n === 'Map' || n === 'Set') return Array.from(o); + if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { @@ -28,30 +28,29 @@ function _arrayLikeToArray(arr, len) { } function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + throw new TypeError('Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'); } -var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; +const commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; -var tracker = {}; +const tracker = {}; -var ItemTracked$1 = {}; +const ItemTracked$1 = {}; -var commonjsBrowser = {}; +const commonjsBrowser = {}; -var v1$1 = {}; +const v1$1 = {}; -var rng$1 = {}; +const rng$1 = {}; -Object.defineProperty(rng$1, "__esModule", { - value: true +Object.defineProperty(rng$1, '__esModule', { + value: true, }); rng$1.default = rng; // Unique ID creation requires a high quality random # generator. In the browser we therefore // require the crypto API and do not support built-in fallback to lower quality random number // generators (like Math.random()). - let getRandomValues; const rnds8 = new Uint8Array(16); @@ -69,29 +68,29 @@ function rng() { return getRandomValues(rnds8); } -var stringify$1 = {}; +const stringify$1 = {}; -var validate$1 = {}; +const validate$1 = {}; -var regex = {}; +const regex = {}; -Object.defineProperty(regex, "__esModule", { - value: true +Object.defineProperty(regex, '__esModule', { + value: true, }); regex.default = void 0; -var _default$c = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; +const _default$c = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; regex.default = _default$c; -Object.defineProperty(validate$1, "__esModule", { - value: true +Object.defineProperty(validate$1, '__esModule', { + value: true, }); validate$1.default = void 0; -var _regex = _interopRequireDefault$8(regex); +const _regex = _interopRequireDefault$8(regex); function _interopRequireDefault$8(obj) { return obj && obj.__esModule ? obj : { - default: obj + default: obj, }; } @@ -99,20 +98,20 @@ function validate(uuid) { return typeof uuid === 'string' && _regex.default.test(uuid); } -var _default$b = validate; +const _default$b = validate; validate$1.default = _default$b; -Object.defineProperty(stringify$1, "__esModule", { - value: true +Object.defineProperty(stringify$1, '__esModule', { + value: true, }); stringify$1.default = void 0; stringify$1.unsafeStringify = unsafeStringify; -var _validate$2 = _interopRequireDefault$7(validate$1); +const _validate$2 = _interopRequireDefault$7(validate$1); function _interopRequireDefault$7(obj) { return obj && obj.__esModule ? obj : { - default: obj + default: obj, }; } /** @@ -120,7 +119,6 @@ function _interopRequireDefault$7(obj) { * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX */ - const byteToHex = []; for (let i = 0; i < 256; ++i) { @@ -130,7 +128,7 @@ for (let i = 0; i < 256; ++i) { function unsafeStringify(arr, offset = 0) { // Note: Be careful editing this code! It's been tuned for performance // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); + return (`${byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]]}-${byteToHex[arr[offset + 4]]}${byteToHex[arr[offset + 5]]}-${byteToHex[arr[offset + 6]]}${byteToHex[arr[offset + 7]]}-${byteToHex[arr[offset + 8]]}${byteToHex[arr[offset + 9]]}-${byteToHex[arr[offset + 10]]}${byteToHex[arr[offset + 11]]}${byteToHex[arr[offset + 12]]}${byteToHex[arr[offset + 13]]}${byteToHex[arr[offset + 14]]}${byteToHex[arr[offset + 15]]}`).toLowerCase(); } function stringify(arr, offset = 0) { @@ -147,33 +145,31 @@ function stringify(arr, offset = 0) { return uuid; } -var _default$a = stringify; +const _default$a = stringify; stringify$1.default = _default$a; -Object.defineProperty(v1$1, "__esModule", { - value: true +Object.defineProperty(v1$1, '__esModule', { + value: true, }); v1$1.default = void 0; -var _rng$1 = _interopRequireDefault$6(rng$1); +const _rng$1 = _interopRequireDefault$6(rng$1); -var _stringify$2 = stringify$1; +const _stringify$2 = stringify$1; function _interopRequireDefault$6(obj) { return obj && obj.__esModule ? obj : { - default: obj + default: obj, }; } // **`v1()` - Generate time-based UUID** // // Inspired by https://github.com/LiosK/UUID.js // and http://docs.python.org/library/uuid.html - let _nodeId; let _clockseq; // Previous uuid creation time - let _lastMSecs = 0; let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details @@ -203,7 +199,6 @@ function v1(options, buf, offset) { // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock // cycle to simulate higher resolution clock @@ -216,12 +211,10 @@ function v1(options, buf, offset) { } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new // time interval - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { nsecs = 0; } // Per 4.2.1.2 Throw error if too many uuids are requested - if (nsecs >= 10000) { throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); } @@ -257,25 +250,25 @@ function v1(options, buf, offset) { return buf || (0, _stringify$2.unsafeStringify)(b); } -var _default$9 = v1; +const _default$9 = v1; v1$1.default = _default$9; -var v3$1 = {}; +const v3$1 = {}; -var v35$1 = {}; +const v35$1 = {}; -var parse$1 = {}; +const parse$1 = {}; -Object.defineProperty(parse$1, "__esModule", { - value: true +Object.defineProperty(parse$1, '__esModule', { + value: true, }); parse$1.default = void 0; -var _validate$1 = _interopRequireDefault$5(validate$1); +const _validate$1 = _interopRequireDefault$5(validate$1); function _interopRequireDefault$5(obj) { return obj && obj.__esModule ? obj : { - default: obj + default: obj, }; } @@ -311,23 +304,23 @@ function parse(uuid) { return arr; } -var _default$8 = parse; +const _default$8 = parse; parse$1.default = _default$8; -Object.defineProperty(v35$1, "__esModule", { - value: true +Object.defineProperty(v35$1, '__esModule', { + value: true, }); v35$1.URL = v35$1.DNS = void 0; v35$1.default = v35; -var _stringify$1 = stringify$1; +const _stringify$1 = stringify$1; -var _parse = _interopRequireDefault$4(parse$1); +const _parse = _interopRequireDefault$4(parse$1); function _interopRequireDefault$4(obj) { return obj && obj.__esModule ? obj : { - default: obj + default: obj, }; } @@ -350,7 +343,7 @@ v35$1.URL = URL; function v35(name, version, hashfunc) { function generateUUID(value, namespace, buf, offset) { - var _namespace; + let _namespace; if (typeof value === 'string') { value = stringToBytes(value); @@ -366,7 +359,6 @@ function v35(name, version, hashfunc) { // Future: Use spread syntax when supported on all platforms, e.g. `bytes = // hashfunc([...namespace, ... value])` - let bytes = new Uint8Array(16 + value.length); bytes.set(namespace); bytes.set(value, namespace.length); @@ -387,21 +379,19 @@ function v35(name, version, hashfunc) { return (0, _stringify$1.unsafeStringify)(bytes); } // Function#name is not settable on some platforms (#270) - try { generateUUID.name = name; // eslint-disable-next-line no-empty } catch (err) {} // For CommonJS default export support - generateUUID.DNS = DNS; generateUUID.URL = URL; return generateUUID; } -var md5$1 = {}; +const md5$1 = {}; -Object.defineProperty(md5$1, "__esModule", { - value: true +Object.defineProperty(md5$1, '__esModule', { + value: true, }); md5$1.default = void 0; /* @@ -442,7 +432,6 @@ function md5(bytes) { * Convert an array of little-endian words to an array of bytes */ - function md5ToHexEncodedArray(input) { const output = []; const length32 = input.length * 32; @@ -460,7 +449,6 @@ function md5ToHexEncodedArray(input) { * Calculate output length with padding and bit length */ - function getOutputLength(inputLength8) { return (inputLength8 + 64 >>> 9 << 4) + 14 + 1; } @@ -468,7 +456,6 @@ function getOutputLength(inputLength8) { * Calculate the MD5 of an array of little-endian words, and a bit length. */ - function wordsToMd5(x, len) { /* append padding */ x[len >> 5] |= 0x80 << len % 32; @@ -560,7 +547,6 @@ function wordsToMd5(x, len) { * Characters >255 have their high-byte silently ignored. */ - function bytesToWords(input) { if (input.length === 0) { return []; @@ -580,7 +566,6 @@ function bytesToWords(input) { * to work around bugs in some JS interpreters. */ - function safeAdd(x, y) { const lsw = (x & 0xffff) + (y & 0xffff); const msw = (x >> 16) + (y >> 16) + (lsw >> 16); @@ -590,7 +575,6 @@ function safeAdd(x, y) { * Bitwise rotate a 32-bit number to the left. */ - function bitRotateLeft(num, cnt) { return num << cnt | num >>> 32 - cnt; } @@ -598,7 +582,6 @@ function bitRotateLeft(num, cnt) { * These functions implement the four basic operations the algorithm uses. */ - function md5cmn(q, a, b, x, s, t) { return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); } @@ -619,56 +602,56 @@ function md5ii(a, b, c, d, x, s, t) { return md5cmn(c ^ (b | ~d), a, b, x, s, t); } -var _default$7 = md5; +const _default$7 = md5; md5$1.default = _default$7; -Object.defineProperty(v3$1, "__esModule", { - value: true +Object.defineProperty(v3$1, '__esModule', { + value: true, }); v3$1.default = void 0; -var _v$1 = _interopRequireDefault$3(v35$1); +const _v$1 = _interopRequireDefault$3(v35$1); -var _md = _interopRequireDefault$3(md5$1); +const _md = _interopRequireDefault$3(md5$1); function _interopRequireDefault$3(obj) { return obj && obj.__esModule ? obj : { - default: obj + default: obj, }; } const v3 = (0, _v$1.default)('v3', 0x30, _md.default); -var _default$6 = v3; +const _default$6 = v3; v3$1.default = _default$6; -var v4$1 = {}; +const v4$1 = {}; -var native = {}; +const native = {}; -Object.defineProperty(native, "__esModule", { - value: true +Object.defineProperty(native, '__esModule', { + value: true, }); native.default = void 0; const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto); -var _default$5 = { - randomUUID +const _default$5 = { + randomUUID, }; native.default = _default$5; -Object.defineProperty(v4$1, "__esModule", { - value: true +Object.defineProperty(v4$1, '__esModule', { + value: true, }); v4$1.default = void 0; -var _native = _interopRequireDefault$2(native); +const _native = _interopRequireDefault$2(native); -var _rng = _interopRequireDefault$2(rng$1); +const _rng = _interopRequireDefault$2(rng$1); -var _stringify = stringify$1; +const _stringify = stringify$1; function _interopRequireDefault$2(obj) { return obj && obj.__esModule ? obj : { - default: obj + default: obj, }; } @@ -681,7 +664,6 @@ function v4(options, buf, offset) { const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - rnds[6] = rnds[6] & 0x0f | 0x40; rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided @@ -698,15 +680,15 @@ function v4(options, buf, offset) { return (0, _stringify.unsafeStringify)(rnds); } -var _default$4 = v4; +const _default$4 = v4; v4$1.default = _default$4; -var v5$1 = {}; +const v5$1 = {}; -var sha1$1 = {}; +const sha1$1 = {}; -Object.defineProperty(sha1$1, "__esModule", { - value: true +Object.defineProperty(sha1$1, '__esModule', { + value: true, }); sha1$1.default = void 0; // Adapted from Chris Veness' SHA1 code at // http://www.movable-type.co.uk/scripts/sha1.html @@ -763,7 +745,7 @@ function sha1(bytes) { M[i] = arr; } - M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32); + M[N - 1][14] = (bytes.length - 1) * 8 / 2 ** 32; M[N - 1][14] = Math.floor(M[N - 1][14]); M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff; @@ -804,49 +786,49 @@ function sha1(bytes) { return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff]; } -var _default$3 = sha1; +const _default$3 = sha1; sha1$1.default = _default$3; -Object.defineProperty(v5$1, "__esModule", { - value: true +Object.defineProperty(v5$1, '__esModule', { + value: true, }); v5$1.default = void 0; -var _v = _interopRequireDefault$1(v35$1); +const _v = _interopRequireDefault$1(v35$1); -var _sha = _interopRequireDefault$1(sha1$1); +const _sha = _interopRequireDefault$1(sha1$1); function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { - default: obj + default: obj, }; } const v5 = (0, _v.default)('v5', 0x50, _sha.default); -var _default$2 = v5; +const _default$2 = v5; v5$1.default = _default$2; -var nil = {}; +const nil = {}; -Object.defineProperty(nil, "__esModule", { - value: true +Object.defineProperty(nil, '__esModule', { + value: true, }); nil.default = void 0; -var _default$1 = '00000000-0000-0000-0000-000000000000'; +const _default$1 = '00000000-0000-0000-0000-000000000000'; nil.default = _default$1; -var version$1 = {}; +const version$1 = {}; -Object.defineProperty(version$1, "__esModule", { - value: true +Object.defineProperty(version$1, '__esModule', { + value: true, }); version$1.default = void 0; -var _validate = _interopRequireDefault(validate$1); +const _validate = _interopRequireDefault(validate$1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { - default: obj + default: obj, }; } @@ -858,67 +840,66 @@ function version(uuid) { return parseInt(uuid.slice(14, 15), 16); } -var _default = version; +const _default = version; version$1.default = _default; (function (exports) { - - Object.defineProperty(exports, "__esModule", { - value: true + Object.defineProperty(exports, '__esModule', { + value: true, }); - Object.defineProperty(exports, "NIL", { + Object.defineProperty(exports, 'NIL', { enumerable: true, get: function get() { return _nil.default; - } + }, }); - Object.defineProperty(exports, "parse", { + Object.defineProperty(exports, 'parse', { enumerable: true, get: function get() { return _parse.default; - } + }, }); - Object.defineProperty(exports, "stringify", { + Object.defineProperty(exports, 'stringify', { enumerable: true, get: function get() { return _stringify.default; - } + }, }); - Object.defineProperty(exports, "v1", { + Object.defineProperty(exports, 'v1', { enumerable: true, get: function get() { return _v.default; - } + }, }); - Object.defineProperty(exports, "v3", { + Object.defineProperty(exports, 'v3', { enumerable: true, get: function get() { return _v2.default; - } + }, }); - Object.defineProperty(exports, "v4", { + Object.defineProperty(exports, 'v4', { enumerable: true, get: function get() { return _v3.default; - } + }, }); - Object.defineProperty(exports, "v5", { + Object.defineProperty(exports, 'v5', { enumerable: true, get: function get() { return _v4.default; - } + }, }); - Object.defineProperty(exports, "validate", { + Object.defineProperty(exports, 'validate', { enumerable: true, get: function get() { return _validate.default; - } + }, }); - Object.defineProperty(exports, "version", { + Object.defineProperty(exports, 'version', { enumerable: true, get: function get() { return _version.default; - } + }, }); var _v = _interopRequireDefault(v1$1); @@ -941,12 +922,12 @@ version$1.default = _default; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { - default: obj + default: obj, }; } -})(commonjsBrowser); +}(commonjsBrowser)); -var utils = {}; +const utils = {}; utils.isDetectionTooLarge = function (detections, largestAllowed) { if (detections.w >= largestAllowed) { @@ -956,11 +937,11 @@ utils.isDetectionTooLarge = function (detections, largestAllowed) { return false; }; -var isInsideArea = function isInsideArea(area, point) { - var xMin = area.x - area.w / 2; - var xMax = area.x + area.w / 2; - var yMin = area.y - area.h / 2; - var yMax = area.y + area.h / 2; +const isInsideArea = function isInsideArea(area, point) { + const xMin = area.x - area.w / 2; + const xMax = area.x + area.w / 2; + const yMin = area.y - area.h / 2; + const yMax = area.y + area.h / 2; if (point.x >= xMin && point.x <= xMax && point.y >= yMin && point.y <= yMax) { return true; @@ -972,54 +953,50 @@ var isInsideArea = function isInsideArea(area, point) { utils.isInsideArea = isInsideArea; utils.isInsideSomeAreas = function (areas, point) { - var isInside = areas.some(function (area) { - return isInsideArea(area, point); - }); + const isInside = areas.some((area) => isInsideArea(area, point)); return isInside; }; utils.ignoreObjectsNotToDetect = function (detections, objectsToDetect) { - return detections.filter(function (detection) { - return objectsToDetect.indexOf(detection.name) > -1; - }); + return detections.filter((detection) => objectsToDetect.indexOf(detection.name) > -1); }; -var getRectangleEdges = function getRectangleEdges(item) { +const getRectangleEdges = function getRectangleEdges(item) { return { x0: item.x - item.w / 2, y0: item.y - item.h / 2, x1: item.x + item.w / 2, - y1: item.y + item.h / 2 + y1: item.y + item.h / 2, }; }; utils.getRectangleEdges = getRectangleEdges; utils.iouAreas = function (item1, item2) { - var rect1 = getRectangleEdges(item1); - var rect2 = getRectangleEdges(item2); // Get overlap rectangle + const rect1 = getRectangleEdges(item1); + const rect2 = getRectangleEdges(item2); // Get overlap rectangle - var overlap_x0 = Math.max(rect1.x0, rect2.x0); - var overlap_y0 = Math.max(rect1.y0, rect2.y0); - var overlap_x1 = Math.min(rect1.x1, rect2.x1); - var overlap_y1 = Math.min(rect1.y1, rect2.y1); // if there an overlap + const overlap_x0 = Math.max(rect1.x0, rect2.x0); + const overlap_y0 = Math.max(rect1.y0, rect2.y0); + const overlap_x1 = Math.min(rect1.x1, rect2.x1); + const overlap_y1 = Math.min(rect1.y1, rect2.y1); // if there an overlap if (overlap_x1 - overlap_x0 <= 0 || overlap_y1 - overlap_y0 <= 0) { // no overlap return 0; } - var area_rect1 = item1.w * item1.h; - var area_rect2 = item2.w * item2.h; - var area_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0); - var area_union = area_rect1 + area_rect2 - area_intersection; + const area_rect1 = item1.w * item1.h; + const area_rect2 = item2.w * item2.h; + const area_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0); + const area_union = area_rect1 + area_rect2 - area_intersection; return area_intersection / area_union; }; utils.computeVelocityVector = function (item1, item2, nbFrame) { return { dx: (item2.x - item1.x) / nbFrame, - dy: (item2.y - item1.y) / nbFrame + dy: (item2.y - item1.y) / nbFrame, }; }; /* @@ -1055,9 +1032,8 @@ utils.computeVelocityVector = function (item1, item2, nbFrame) { */ - utils.computeBearingIn360 = function (dx, dy) { - var angle = Math.atan(dx / dy) / (Math.PI / 180); + const angle = Math.atan(dx / dy) / (Math.PI / 180); if (angle > 0) { if (dy > 0) { @@ -1075,9 +1051,9 @@ utils.computeBearingIn360 = function (dx, dy) { }; (function (exports) { - var uuidv4 = commonjsBrowser.v4; - var computeBearingIn360 = utils.computeBearingIn360; - var computeVelocityVector = utils.computeVelocityVector; // Properties example + const uuidv4 = commonjsBrowser.v4; + const { computeBearingIn360 } = utils; + const { computeVelocityVector } = utils; // Properties example // { // "x": 1021, // "y": 65, @@ -1091,16 +1067,16 @@ utils.computeBearingIn360 = function (dx, dy) { exports.ITEM_HISTORY_MAX_LENGTH = 15; // Use a simple incremental unique id for the display - var idDisplay = 0; + let idDisplay = 0; exports.ItemTracked = function (properties, frameNb, unMatchedFramesTolerance, fastDelete) { - var DEFAULT_UNMATCHEDFRAMES_TOLERANCE = unMatchedFramesTolerance; - var itemTracked = {}; // ==== Private ===== + const DEFAULT_UNMATCHEDFRAMES_TOLERANCE = unMatchedFramesTolerance; + const itemTracked = {}; // ==== Private ===== // Am I available to be matched? itemTracked.available = true; // Should I be deleted? - itemTracked["delete"] = false; + itemTracked.delete = false; itemTracked.fastDelete = fastDelete; // How many unmatched frame should I survive? itemTracked.frameUnmatchedLeftBeforeDying = unMatchedFramesTolerance; @@ -1124,7 +1100,7 @@ utils.computeBearingIn360 = function (dx, dy) { y: properties.y, w: properties.w, h: properties.h, - confidence: properties.confidence + confidence: properties.confidence, }); if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { @@ -1133,7 +1109,7 @@ utils.computeBearingIn360 = function (dx, dy) { itemTracked.velocity = { dx: 0, - dy: 0 + dy: 0, }; itemTracked.nbTimeMatched = 1; // Assign an unique id to each Item tracked @@ -1161,7 +1137,7 @@ utils.computeBearingIn360 = function (dx, dy) { y: this.y, w: this.w, h: this.h, - confidence: this.confidence + confidence: this.confidence, }); if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { @@ -1176,7 +1152,6 @@ utils.computeBearingIn360 = function (dx, dy) { this.nameCount[properties.name] = 1; } // Reset dying counter - this.frameUnmatchedLeftBeforeDying = DEFAULT_UNMATCHEDFRAMES_TOLERANCE; // Compute new velocityVector based on last positions history this.velocity = this.updateVelocityVector(); @@ -1200,7 +1175,7 @@ utils.computeBearingIn360 = function (dx, dy) { x: this.x, y: this.y, w: this.w, - h: this.h + h: this.h, }; } @@ -1218,7 +1193,7 @@ utils.computeBearingIn360 = function (dx, dy) { y: this.y, w: this.w, h: this.h, - confidence: this.confidence + confidence: this.confidence, }); if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { @@ -1234,7 +1209,7 @@ utils.computeBearingIn360 = function (dx, dy) { x: this.x + this.velocity.dx, y: this.y + this.velocity.dy, w: this.w, - h: this.h + h: this.h, }; }; @@ -1242,32 +1217,31 @@ utils.computeBearingIn360 = function (dx, dy) { return this.frameUnmatchedLeftBeforeDying < 0; }; // Velocity vector based on the last 15 frames - itemTracked.updateVelocityVector = function () { if (exports.ITEM_HISTORY_MAX_LENGTH <= 2) { return { dx: undefined, - dy: undefined + dy: undefined, }; } if (this.itemHistory.length <= exports.ITEM_HISTORY_MAX_LENGTH) { - var _start = this.itemHistory[0]; - var _end = this.itemHistory[this.itemHistory.length - 1]; + const _start = this.itemHistory[0]; + const _end = this.itemHistory[this.itemHistory.length - 1]; return computeVelocityVector(_start, _end, this.itemHistory.length); } - var start = this.itemHistory[this.itemHistory.length - exports.ITEM_HISTORY_MAX_LENGTH]; - var end = this.itemHistory[this.itemHistory.length - 1]; + const start = this.itemHistory[this.itemHistory.length - exports.ITEM_HISTORY_MAX_LENGTH]; + const end = this.itemHistory[this.itemHistory.length - 1]; return computeVelocityVector(start, end, exports.ITEM_HISTORY_MAX_LENGTH); }; itemTracked.getMostlyMatchedName = function () { - var _this = this; + const _this = this; - var nameMostlyMatchedOccurences = 0; - var nameMostlyMatched = ''; - Object.keys(this.nameCount).map(function (name) { + let nameMostlyMatchedOccurences = 0; + let nameMostlyMatched = ''; + Object.keys(this.nameCount).map((name) => { if (_this.nameCount[name] > nameMostlyMatchedOccurences) { nameMostlyMatched = name; nameMostlyMatchedOccurences = _this.nameCount[name]; @@ -1277,7 +1251,7 @@ utils.computeBearingIn360 = function (dx, dy) { }; itemTracked.toJSONDebug = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + const roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; return { id: this.id, idDisplay: this.idDisplay, @@ -1291,12 +1265,12 @@ utils.computeBearingIn360 = function (dx, dy) { name: this.getMostlyMatchedName(), isZombie: this.isZombie, appearFrame: this.appearFrame, - disappearFrame: this.disappearFrame + disappearFrame: this.disappearFrame, }; }; itemTracked.toJSON = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + const roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; return { id: this.idDisplay, x: roundInt ? parseInt(this.x, 10) : this.x, @@ -1307,12 +1281,15 @@ utils.computeBearingIn360 = function (dx, dy) { // Here we negate dy to be in "normal" carthesian coordinates bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy), 10), name: this.getMostlyMatchedName(), - isZombie: this.isZombie + isZombie: this.isZombie, }; }; itemTracked.toMOT = function (frameIndex) { - return "".concat(frameIndex, ",").concat(this.idDisplay, ",").concat(this.x - this.w / 2, ",").concat(this.y - this.h / 2, ",").concat(this.w, ",").concat(this.h, ",").concat(this.confidence / 100, ",-1,-1,-1"); + return ''.concat(frameIndex, ',').concat(this.idDisplay, ',').concat(this.x - this.w / 2, ',').concat(this.y - this.h / 2, ',') + .concat(this.w, ',') + .concat(this.h, ',') + .concat(this.confidence / 100, ',-1,-1,-1'); }; itemTracked.toJSONGenericInfo = function () { @@ -1323,7 +1300,7 @@ utils.computeBearingIn360 = function (dx, dy) { disappearFrame: this.disappearFrame, disappearArea: this.disappearArea, nbActiveFrame: this.disappearFrame - this.appearFrame, - name: this.getMostlyMatchedName() + name: this.getMostlyMatchedName(), }; }; @@ -1333,9 +1310,9 @@ utils.computeBearingIn360 = function (dx, dy) { exports.reset = function () { idDisplay = 0; }; -})(ItemTracked$1); +}(ItemTracked$1)); -var kdTreeMin = {}; +const kdTreeMin = {}; /** * k-d Tree JavaScript - V 1.01 @@ -1349,9 +1326,9 @@ var kdTreeMin = {}; */ (function (exports) { - !function (t, n) { - n(exports ); - }(commonjsGlobal, function (t) { + !(function (t, n) { + n(exports); + }(commonjsGlobal, (t) => { function n(t, n, o) { this.obj = t, this.left = null, this.right = null, this.parent = o, this.dimension = n; } @@ -1361,153 +1338,154 @@ var kdTreeMin = {}; } o.prototype = { - push: function (t) { + push(t) { this.content.push(t), this.bubbleUp(this.content.length - 1); }, - pop: function () { - var t = this.content[0], - n = this.content.pop(); + pop() { + const t = this.content[0]; + const n = this.content.pop(); return this.content.length > 0 && (this.content[0] = n, this.sinkDown(0)), t; }, - peek: function () { + peek() { return this.content[0]; }, - remove: function (t) { - for (var n = this.content.length, o = 0; o < n; o++) if (this.content[o] == t) { - var i = this.content.pop(); - return void (o != n - 1 && (this.content[o] = i, this.scoreFunction(i) < this.scoreFunction(t) ? this.bubbleUp(o) : this.sinkDown(o))); + remove(t) { + for (let n = this.content.length, o = 0; o < n; o++) { + if (this.content[o] == t) { + const i = this.content.pop(); + return void (o != n - 1 && (this.content[o] = i, this.scoreFunction(i) < this.scoreFunction(t) ? this.bubbleUp(o) : this.sinkDown(o))); + } } - throw new Error("Node not found."); + throw new Error('Node not found.'); }, - size: function () { + size() { return this.content.length; }, - bubbleUp: function (t) { - for (var n = this.content[t]; t > 0;) { - var o = Math.floor((t + 1) / 2) - 1, - i = this.content[o]; + bubbleUp(t) { + for (let n = this.content[t]; t > 0;) { + const o = Math.floor((t + 1) / 2) - 1; + const i = this.content[o]; if (!(this.scoreFunction(n) < this.scoreFunction(i))) break; this.content[o] = n, this.content[t] = i, t = o; } }, - sinkDown: function (t) { - for (var n = this.content.length, o = this.content[t], i = this.scoreFunction(o);;) { - var e = 2 * (t + 1), - r = e - 1, - l = null; + sinkDown(t) { + for (let n = this.content.length, o = this.content[t], i = this.scoreFunction(o); ;) { + const e = 2 * (t + 1); + const r = e - 1; + let l = null; if (r < n) { - var u = this.content[r], - h = this.scoreFunction(u); + const u = this.content[r]; + var h = this.scoreFunction(u); h < i && (l = r); } if (e < n) { - var s = this.content[e]; - this.scoreFunction(s) < (null == l ? i : h) && (l = e); + const s = this.content[e]; + this.scoreFunction(s) < (l == null ? i : h) && (l = e); } - if (null == l) break; + if (l == null) break; this.content[t] = this.content[l], this.content[l] = o, t = l; } - } + }, }, t.kdTree = function (t, i, e) { function r(t, o, i) { - var l, - u, - h = o % e.length; - return 0 === t.length ? null : 1 === t.length ? new n(t[0], h, i) : (t.sort(function (t, n) { - return t[e[h]] - n[e[h]]; - }), l = Math.floor(t.length / 2), u = new n(t[l], h, i), u.left = r(t.slice(0, l), o + 1, u), u.right = r(t.slice(l + 1), o + 1, u), u); + let l; + let u; + const h = o % e.length; + return t.length === 0 ? null : t.length === 1 ? new n(t[0], h, i) : (t.sort((t, n) => t[e[h]] - n[e[h]]), l = Math.floor(t.length / 2), u = new n(t[l], h, i), u.left = r(t.slice(0, l), o + 1, u), u.right = r(t.slice(l + 1), o + 1, u), u); } - var l = this; - Array.isArray(t) ? this.root = r(t, 0, null) : function (t) { + const l = this; + Array.isArray(t) ? this.root = r(t, 0, null) : (function (t) { function n(t) { t.left && (t.left.parent = t, n(t.left)), t.right && (t.right.parent = t, n(t.right)); } l.root = t, n(l.root); - }(t), this.toJSON = function (t) { + }(t)), this.toJSON = function (t) { t || (t = this.root); - var o = new n(t.obj, t.dimension, null); + const o = new n(t.obj, t.dimension, null); return t.left && (o.left = l.toJSON(t.left)), t.right && (o.right = l.toJSON(t.right)), o; }, this.insert = function (t) { function o(n, i) { - if (null === n) return i; - var r = e[n.dimension]; + if (n === null) return i; + const r = e[n.dimension]; return t[r] < n.obj[r] ? o(n.left, n) : o(n.right, n); } - var i, - r, - l = o(this.root, null); - null !== l ? (i = new n(t, (l.dimension + 1) % e.length, l), r = e[l.dimension], t[r] < l.obj[r] ? l.left = i : l.right = i) : this.root = new n(t, 0, null); + let i; + let r; + const l = o(this.root, null); + l !== null ? (i = new n(t, (l.dimension + 1) % e.length, l), r = e[l.dimension], t[r] < l.obj[r] ? l.left = i : l.right = i) : this.root = new n(t, 0, null); }, this.remove = function (t) { function n(o) { - if (null === o) return null; + if (o === null) return null; if (o.obj === t) return o; - var i = e[o.dimension]; + const i = e[o.dimension]; return t[i] < o.obj[i] ? n(o.left) : n(o.right); } function o(t) { function n(t, o) { - var i, r, l, u, h; - return null === t ? null : (i = e[o], t.dimension === o ? null !== t.left ? n(t.left, o) : t : (r = t.obj[i], l = n(t.left, o), u = n(t.right, o), h = t, null !== l && l.obj[i] < r && (h = l), null !== u && u.obj[i] < h.obj[i] && (h = u), h)); + let i; let r; let l; let u; let + h; + return t === null ? null : (i = e[o], t.dimension === o ? t.left !== null ? n(t.left, o) : t : (r = t.obj[i], l = n(t.left, o), u = n(t.right, o), h = t, l !== null && l.obj[i] < r && (h = l), u !== null && u.obj[i] < h.obj[i] && (h = u), h)); } - var i, r, u; - if (null === t.left && null === t.right) return null === t.parent ? void (l.root = null) : (u = e[t.parent.dimension], void (t.obj[u] < t.parent.obj[u] ? t.parent.left = null : t.parent.right = null)); - null !== t.right ? (r = (i = n(t.right, t.dimension)).obj, o(i), t.obj = r) : (r = (i = n(t.left, t.dimension)).obj, o(i), t.right = t.left, t.left = null, t.obj = r); + let i; let r; let + u; + if (t.left === null && t.right === null) return t.parent === null ? void (l.root = null) : (u = e[t.parent.dimension], void (t.obj[u] < t.parent.obj[u] ? t.parent.left = null : t.parent.right = null)); + t.right !== null ? (r = (i = n(t.right, t.dimension)).obj, o(i), t.obj = r) : (r = (i = n(t.left, t.dimension)).obj, o(i), t.right = t.left, t.left = null, t.obj = r); } - var i; - null !== (i = n(l.root)) && o(i); + let i; + (i = n(l.root)) !== null && o(i); }, this.nearest = function (t, n, r) { function u(o) { function r(t, o) { f.push([t, o]), f.size() > n && f.pop(); } - var l, - h, - s, - c, - a = e[o.dimension], - g = i(t, o.obj), - p = {}; + let l; + let h; + let s; + let c; + const a = e[o.dimension]; + const g = i(t, o.obj); + const p = {}; for (c = 0; c < e.length; c += 1) c === o.dimension ? p[e[c]] = t[e[c]] : p[e[c]] = o.obj[e[c]]; - h = i(p, o.obj), null !== o.right || null !== o.left ? (u(l = null === o.right ? o.left : null === o.left ? o.right : t[a] < o.obj[a] ? o.left : o.right), (f.size() < n || g < f.peek()[1]) && r(o, g), (f.size() < n || Math.abs(h) < f.peek()[1]) && null !== (s = l === o.left ? o.right : o.left) && u(s)) : (f.size() < n || g < f.peek()[1]) && r(o, g); + h = i(p, o.obj), o.right !== null || o.left !== null ? (u(l = o.right === null ? o.left : o.left === null ? o.right : t[a] < o.obj[a] ? o.left : o.right), (f.size() < n || g < f.peek()[1]) && r(o, g), (f.size() < n || Math.abs(h) < f.peek()[1]) && (s = l === o.left ? o.right : o.left) !== null && u(s)) : (f.size() < n || g < f.peek()[1]) && r(o, g); } - var h, s, f; - if (f = new o(function (t) { - return -t[1]; - }), r) for (h = 0; h < n; h += 1) f.push([null, r]); + let h; let s; let + f; + if (f = new o((t) => -t[1]), r) for (h = 0; h < n; h += 1) f.push([null, r]); for (l.root && u(l.root), s = [], h = 0; h < Math.min(n, f.content.length); h += 1) f.content[h][0] && s.push([f.content[h][0].obj, f.content[h][1]]); return s; }, this.balanceFactor = function () { function t(n) { - return null === n ? 0 : Math.max(t(n.left), t(n.right)) + 1; + return n === null ? 0 : Math.max(t(n.left), t(n.right)) + 1; } function n(t) { - return null === t ? 0 : n(t.left) + n(t.right) + 1; + return t === null ? 0 : n(t.left) + n(t.right) + 1; } return t(l.root) / (Math.log(n(l.root)) / Math.log(2)); }; }, t.BinaryHeap = o; - }); -})(kdTreeMin); + })); +}(kdTreeMin)); -var lodash_isequal = {exports: {}}; +const lodash_isequal = { exports: {} }; /** * Lodash (Custom Build) @@ -1520,99 +1498,98 @@ var lodash_isequal = {exports: {}}; (function (module, exports) { /** Used as the size to enable large array optimizations. */ - var LARGE_ARRAY_SIZE = 200; + const LARGE_ARRAY_SIZE = 200; /** Used to stand-in for `undefined` hash values. */ - var HASH_UNDEFINED = '__lodash_hash_undefined__'; + const HASH_UNDEFINED = '__lodash_hash_undefined__'; /** Used to compose bitmasks for value comparisons. */ - var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; + const COMPARE_PARTIAL_FLAG = 1; + const COMPARE_UNORDERED_FLAG = 2; /** Used as references for various `Number` constants. */ - var MAX_SAFE_INTEGER = 9007199254740991; + const MAX_SAFE_INTEGER = 9007199254740991; /** `Object#toString` result references. */ - var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - asyncTag = '[object AsyncFunction]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - mapTag = '[object Map]', - numberTag = '[object Number]', - nullTag = '[object Null]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - proxyTag = '[object Proxy]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]', - undefinedTag = '[object Undefined]', - weakMapTag = '[object WeakMap]'; - var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; + const argsTag = '[object Arguments]'; + const arrayTag = '[object Array]'; + const asyncTag = '[object AsyncFunction]'; + const boolTag = '[object Boolean]'; + const dateTag = '[object Date]'; + const errorTag = '[object Error]'; + const funcTag = '[object Function]'; + const genTag = '[object GeneratorFunction]'; + const mapTag = '[object Map]'; + const numberTag = '[object Number]'; + const nullTag = '[object Null]'; + const objectTag = '[object Object]'; + const promiseTag = '[object Promise]'; + const proxyTag = '[object Proxy]'; + const regexpTag = '[object RegExp]'; + const setTag = '[object Set]'; + const stringTag = '[object String]'; + const symbolTag = '[object Symbol]'; + const undefinedTag = '[object Undefined]'; + const weakMapTag = '[object WeakMap]'; + const arrayBufferTag = '[object ArrayBuffer]'; + const dataViewTag = '[object DataView]'; + const float32Tag = '[object Float32Array]'; + const float64Tag = '[object Float64Array]'; + const int8Tag = '[object Int8Array]'; + const int16Tag = '[object Int16Array]'; + const int32Tag = '[object Int32Array]'; + const uint8Tag = '[object Uint8Array]'; + const uint8ClampedTag = '[object Uint8ClampedArray]'; + const uint16Tag = '[object Uint16Array]'; + const uint32Tag = '[object Uint32Array]'; /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ - var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + const reRegExpChar = /[\\^$.*+?()[\]{}|]/g; /** Used to detect host constructors (Safari). */ - var reIsHostCtor = /^\[object .+?Constructor\]$/; + const reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used to detect unsigned integer values. */ - var reIsUint = /^(?:0|[1-9]\d*)$/; + const reIsUint = /^(?:0|[1-9]\d*)$/; /** Used to identify `toStringTag` values of typed arrays. */ - var typedArrayTags = {}; + const typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; /** Detect free variable `global` from Node.js. */ - var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + const freeGlobal = typeof commonjsGlobal === 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; /** Detect free variable `self`. */ - var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + const freeSelf = typeof self === 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ - var root = freeGlobal || freeSelf || Function('return this')(); + const root = freeGlobal || freeSelf || Function('return this')(); /** Detect free variable `exports`. */ - var freeExports = exports && !exports.nodeType && exports; + const freeExports = exports && !exports.nodeType && exports; /** Detect free variable `module`. */ - var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; + const freeModule = freeExports && 'object' === 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ - var moduleExports = freeModule && freeModule.exports === freeExports; + const moduleExports = freeModule && freeModule.exports === freeExports; /** Detect free variable `process` from Node.js. */ - var freeProcess = moduleExports && freeGlobal.process; + const freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ - var nodeUtil = function () { + const nodeUtil = (function () { try { return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} - }(); + }()); /* Node.js helper references. */ - - var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + const nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** * A specialized version of `_.filter` for arrays without support for * iteratee shorthands. @@ -1624,13 +1601,13 @@ var lodash_isequal = {exports: {}}; */ function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; + let index = -1; + const length = array == null ? 0 : array.length; + let resIndex = 0; + const result = []; while (++index < length) { - var value = array[index]; + const value = array[index]; if (predicate(value, index, array)) { result[resIndex++] = value; @@ -1648,11 +1625,10 @@ var lodash_isequal = {exports: {}}; * @returns {Array} Returns `array`. */ - function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; + let index = -1; + const { length } = values; + const offset = array.length; while (++index < length) { array[offset + index] = values[index]; @@ -1671,10 +1647,9 @@ var lodash_isequal = {exports: {}}; * else `false`. */ - function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; + let index = -1; + const length = array == null ? 0 : array.length; while (++index < length) { if (predicate(array[index], index, array)) { @@ -1694,10 +1669,9 @@ var lodash_isequal = {exports: {}}; * @returns {Array} Returns the array of results. */ - function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); + let index = -1; + const result = Array(n); while (++index < n) { result[index] = iteratee(index); @@ -1713,7 +1687,6 @@ var lodash_isequal = {exports: {}}; * @returns {Function} Returns the new capped function. */ - function baseUnary(func) { return function (value) { return func(value); @@ -1728,7 +1701,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function cacheHas(cache, key) { return cache.has(key); } @@ -1741,7 +1713,6 @@ var lodash_isequal = {exports: {}}; * @returns {*} Returns the property value. */ - function getValue(object, key) { return object == null ? undefined : object[key]; } @@ -1753,11 +1724,10 @@ var lodash_isequal = {exports: {}}; * @returns {Array} Returns the key-value pairs. */ - function mapToArray(map) { - var index = -1, - result = Array(map.size); - map.forEach(function (value, key) { + let index = -1; + const result = Array(map.size); + map.forEach((value, key) => { result[++index] = [key, value]; }); return result; @@ -1771,7 +1741,6 @@ var lodash_isequal = {exports: {}}; * @returns {Function} Returns the new function. */ - function overArg(func, transform) { return function (arg) { return func(transform(arg)); @@ -1785,79 +1754,76 @@ var lodash_isequal = {exports: {}}; * @returns {Array} Returns the values. */ - function setToArray(set) { - var index = -1, - result = Array(set.size); - set.forEach(function (value) { + let index = -1; + const result = Array(set.size); + set.forEach((value) => { result[++index] = value; }); return result; } /** Used for built-in method references. */ - - var arrayProto = Array.prototype, - funcProto = Function.prototype, - objectProto = Object.prototype; + const arrayProto = Array.prototype; + const funcProto = Function.prototype; + const objectProto = Object.prototype; /** Used to detect overreaching core-js shims. */ - var coreJsData = root['__core-js_shared__']; + const coreJsData = root['__core-js_shared__']; /** Used to resolve the decompiled source of functions. */ - var funcToString = funcProto.toString; + const funcToString = funcProto.toString; /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; + const { hasOwnProperty } = objectProto; /** Used to detect methods masquerading as native. */ - var maskSrcKey = function () { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? 'Symbol(src)_1.' + uid : ''; - }(); + const maskSrcKey = (function () { + const uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? `Symbol(src)_1.${uid}` : ''; + }()); /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ - - var nativeObjectToString = objectProto.toString; + const nativeObjectToString = objectProto.toString; /** Used to detect if a method is native. */ - var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); + const reIsNative = RegExp(`^${funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?')}$`); /** Built-in value references. */ - var Buffer = moduleExports ? root.Buffer : undefined, - Symbol = root.Symbol, - Uint8Array = root.Uint8Array, - propertyIsEnumerable = objectProto.propertyIsEnumerable, - splice = arrayProto.splice, - symToStringTag = Symbol ? Symbol.toStringTag : undefined; + const Buffer = moduleExports ? root.Buffer : undefined; + const { Symbol } = root; + const { Uint8Array } = root; + const { propertyIsEnumerable } = objectProto; + const { splice } = arrayProto; + const symToStringTag = Symbol ? Symbol.toStringTag : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ - var nativeGetSymbols = Object.getOwnPropertySymbols, - nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, - nativeKeys = overArg(Object.keys, Object); + const nativeGetSymbols = Object.getOwnPropertySymbols; + const nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + const nativeKeys = overArg(Object.keys, Object); /* Built-in method references that are verified to be native. */ - var DataView = getNative(root, 'DataView'), - Map = getNative(root, 'Map'), - Promise = getNative(root, 'Promise'), - Set = getNative(root, 'Set'), - WeakMap = getNative(root, 'WeakMap'), - nativeCreate = getNative(Object, 'create'); + const DataView = getNative(root, 'DataView'); + const Map = getNative(root, 'Map'); + const Promise = getNative(root, 'Promise'); + const Set = getNative(root, 'Set'); + const WeakMap = getNative(root, 'WeakMap'); + const nativeCreate = getNative(Object, 'create'); /** Used to detect maps, sets, and weakmaps. */ - var dataViewCtorString = toSource(DataView), - mapCtorString = toSource(Map), - promiseCtorString = toSource(Promise), - setCtorString = toSource(Set), - weakMapCtorString = toSource(WeakMap); + const dataViewCtorString = toSource(DataView); + const mapCtorString = toSource(Map); + const promiseCtorString = toSource(Promise); + const setCtorString = toSource(Set); + const weakMapCtorString = toSource(WeakMap); /** Used to convert symbols to primitives and strings. */ - var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + const symbolProto = Symbol ? Symbol.prototype : undefined; + const symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * Creates a hash object. * @@ -1867,12 +1833,12 @@ var lodash_isequal = {exports: {}}; */ function Hash(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; + let index = -1; + const length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { - var entry = entries[index]; + const entry = entries[index]; this.set(entry[0], entry[1]); } } @@ -1884,7 +1850,6 @@ var lodash_isequal = {exports: {}}; * @memberOf Hash */ - function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; this.size = 0; @@ -1900,9 +1865,8 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - function hashDelete(key) { - var result = this.has(key) && delete this.__data__[key]; + const result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; } @@ -1916,12 +1880,11 @@ var lodash_isequal = {exports: {}}; * @returns {*} Returns the entry value. */ - function hashGet(key) { - var data = this.__data__; + const data = this.__data__; if (nativeCreate) { - var result = data[key]; + const result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } @@ -1937,9 +1900,8 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function hashHas(key) { - var data = this.__data__; + const data = this.__data__; return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); } /** @@ -1953,17 +1915,15 @@ var lodash_isequal = {exports: {}}; * @returns {Object} Returns the hash instance. */ - function hashSet(key, value) { - var data = this.__data__; + const data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value; return this; } // Add methods to `Hash`. - Hash.prototype.clear = hashClear; - Hash.prototype['delete'] = hashDelete; + Hash.prototype.delete = hashDelete; Hash.prototype.get = hashGet; Hash.prototype.has = hashHas; Hash.prototype.set = hashSet; @@ -1976,12 +1936,12 @@ var lodash_isequal = {exports: {}}; */ function ListCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; + let index = -1; + const length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { - var entry = entries[index]; + const entry = entries[index]; this.set(entry[0], entry[1]); } } @@ -1993,7 +1953,6 @@ var lodash_isequal = {exports: {}}; * @memberOf ListCache */ - function listCacheClear() { this.__data__ = []; this.size = 0; @@ -2008,16 +1967,15 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); + const data = this.__data__; + const index = assocIndexOf(data, key); if (index < 0) { return false; } - var lastIndex = data.length - 1; + const lastIndex = data.length - 1; if (index == lastIndex) { data.pop(); @@ -2038,10 +1996,9 @@ var lodash_isequal = {exports: {}}; * @returns {*} Returns the entry value. */ - function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); + const data = this.__data__; + const index = assocIndexOf(data, key); return index < 0 ? undefined : data[index][1]; } /** @@ -2054,7 +2011,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function listCacheHas(key) { return assocIndexOf(this.__data__, key) > -1; } @@ -2069,10 +2025,9 @@ var lodash_isequal = {exports: {}}; * @returns {Object} Returns the list cache instance. */ - function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); + const data = this.__data__; + const index = assocIndexOf(data, key); if (index < 0) { ++this.size; @@ -2084,9 +2039,8 @@ var lodash_isequal = {exports: {}}; return this; } // Add methods to `ListCache`. - ListCache.prototype.clear = listCacheClear; - ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.delete = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; @@ -2099,12 +2053,12 @@ var lodash_isequal = {exports: {}}; */ function MapCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; + let index = -1; + const length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { - var entry = entries[index]; + const entry = entries[index]; this.set(entry[0], entry[1]); } } @@ -2116,13 +2070,12 @@ var lodash_isequal = {exports: {}}; * @memberOf MapCache */ - function mapCacheClear() { this.size = 0; this.__data__ = { - 'hash': new Hash(), - 'map': new (Map || ListCache)(), - 'string': new Hash() + hash: new Hash(), + map: new (Map || ListCache)(), + string: new Hash(), }; } /** @@ -2135,9 +2088,8 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - function mapCacheDelete(key) { - var result = getMapData(this, key)['delete'](key); + const result = getMapData(this, key).delete(key); this.size -= result ? 1 : 0; return result; } @@ -2151,7 +2103,6 @@ var lodash_isequal = {exports: {}}; * @returns {*} Returns the entry value. */ - function mapCacheGet(key) { return getMapData(this, key).get(key); } @@ -2165,7 +2116,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function mapCacheHas(key) { return getMapData(this, key).has(key); } @@ -2180,18 +2130,16 @@ var lodash_isequal = {exports: {}}; * @returns {Object} Returns the map cache instance. */ - function mapCacheSet(key, value) { - var data = getMapData(this, key), - size = data.size; + const data = getMapData(this, key); + const { size } = data; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; } // Add methods to `MapCache`. - MapCache.prototype.clear = mapCacheClear; - MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.delete = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; @@ -2205,8 +2153,8 @@ var lodash_isequal = {exports: {}}; */ function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; + let index = -1; + const length = values == null ? 0 : values.length; this.__data__ = new MapCache(); while (++index < length) { @@ -2224,7 +2172,6 @@ var lodash_isequal = {exports: {}}; * @returns {Object} Returns the cache instance. */ - function setCacheAdd(value) { this.__data__.set(value, HASH_UNDEFINED); @@ -2240,12 +2187,10 @@ var lodash_isequal = {exports: {}}; * @returns {number} Returns `true` if `value` is found, else `false`. */ - function setCacheHas(value) { return this.__data__.has(value); } // Add methods to `SetCache`. - SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; SetCache.prototype.has = setCacheHas; /** @@ -2257,7 +2202,7 @@ var lodash_isequal = {exports: {}}; */ function Stack(entries) { - var data = this.__data__ = new ListCache(entries); + const data = this.__data__ = new ListCache(entries); this.size = data.size; } /** @@ -2268,7 +2213,6 @@ var lodash_isequal = {exports: {}}; * @memberOf Stack */ - function stackClear() { this.__data__ = new ListCache(); this.size = 0; @@ -2283,10 +2227,9 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - function stackDelete(key) { - var data = this.__data__, - result = data['delete'](key); + const data = this.__data__; + const result = data.delete(key); this.size = data.size; return result; } @@ -2300,7 +2243,6 @@ var lodash_isequal = {exports: {}}; * @returns {*} Returns the entry value. */ - function stackGet(key) { return this.__data__.get(key); } @@ -2314,7 +2256,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function stackHas(key) { return this.__data__.has(key); } @@ -2329,12 +2270,11 @@ var lodash_isequal = {exports: {}}; * @returns {Object} Returns the stack cache instance. */ - function stackSet(key, value) { - var data = this.__data__; + let data = this.__data__; if (data instanceof ListCache) { - var pairs = data.__data__; + const pairs = data.__data__; if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) { pairs.push([key, value]); @@ -2350,9 +2290,8 @@ var lodash_isequal = {exports: {}}; return this; } // Add methods to `Stack`. - Stack.prototype.clear = stackClear; - Stack.prototype['delete'] = stackDelete; + Stack.prototype.delete = stackDelete; Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; @@ -2366,20 +2305,20 @@ var lodash_isequal = {exports: {}}; */ function arrayLikeKeys(value, inherited) { - var isArr = isArray(value), - isArg = !isArr && isArguments(value), - isBuff = !isArr && !isArg && isBuffer(value), - isType = !isArr && !isArg && !isBuff && isTypedArray(value), - skipIndexes = isArr || isArg || isBuff || isType, - result = skipIndexes ? baseTimes(value.length, String) : [], - length = result.length; - - for (var key in value) { + const isArr = isArray(value); + const isArg = !isArr && isArguments(value); + const isBuff = !isArr && !isArg && isBuffer(value); + const isType = !isArr && !isArg && !isBuff && isTypedArray(value); + const skipIndexes = isArr || isArg || isBuff || isType; + const result = skipIndexes ? baseTimes(value.length, String) : []; + const { length } = result; + + for (const key in value) { if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. - key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. - isBuff && (key == 'offset' || key == 'parent') || // PhantomJS 2 has enumerable non-index properties on typed arrays. - isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || // Skip index properties. - isIndex(key, length)))) { + key == 'length' // Node.js 0.10 has enumerable non-index properties on buffers. + || isBuff && (key == 'offset' || key == 'parent') // PhantomJS 2 has enumerable non-index properties on typed arrays. + || isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') // Skip index properties. + || isIndex(key, length)))) { result.push(key); } } @@ -2395,9 +2334,8 @@ var lodash_isequal = {exports: {}}; * @returns {number} Returns the index of the matched value, else `-1`. */ - function assocIndexOf(array, key) { - var length = array.length; + let { length } = array; while (length--) { if (eq(array[length][0], key)) { @@ -2419,9 +2357,8 @@ var lodash_isequal = {exports: {}}; * @returns {Array} Returns the array of property names and symbols. */ - function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); + const result = keysFunc(object); return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } /** @@ -2432,7 +2369,6 @@ var lodash_isequal = {exports: {}}; * @returns {string} Returns the `toStringTag`. */ - function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; @@ -2448,7 +2384,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if `value` is an `arguments` object, */ - function baseIsArguments(value) { return isObjectLike(value) && baseGetTag(value) == argsTag; } @@ -2467,7 +2402,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ - function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; @@ -2494,17 +2428,16 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ - function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = objIsArr ? arrayTag : getTag(object), - othTag = othIsArr ? arrayTag : getTag(other); + let objIsArr = isArray(object); + const othIsArr = isArray(other); + let objTag = objIsArr ? arrayTag : getTag(object); + let othTag = othIsArr ? arrayTag : getTag(other); objTag = objTag == argsTag ? objectTag : objTag; othTag = othTag == argsTag ? objectTag : othTag; - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; + let objIsObj = objTag == objectTag; + const othIsObj = othTag == objectTag; + const isSameTag = objTag == othTag; if (isSameTag && isBuffer(object)) { if (!isBuffer(other)) { @@ -2521,12 +2454,12 @@ var lodash_isequal = {exports: {}}; } if (!(bitmask & COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + const objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'); + const othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; + const objUnwrapped = objIsWrapped ? object.value() : object; + const othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new Stack()); return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } @@ -2548,13 +2481,12 @@ var lodash_isequal = {exports: {}}; * else `false`. */ - function baseIsNative(value) { if (!isObject(value) || isMasked(value)) { return false; } - var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + const pattern = isFunction(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } /** @@ -2565,7 +2497,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ - function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } @@ -2577,15 +2508,14 @@ var lodash_isequal = {exports: {}}; * @returns {Array} Returns the array of property names. */ - function baseKeys(object) { if (!isPrototype(object)) { return nativeKeys(object); } - var result = []; + const result = []; - for (var key in Object(object)) { + for (const key in Object(object)) { if (hasOwnProperty.call(object, key) && key != 'constructor') { result.push(key); } @@ -2607,32 +2537,30 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ - function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; + const isPartial = bitmask & COMPARE_PARTIAL_FLAG; + const arrLength = array.length; + const othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } // Assume cyclic values are equal. - - var stacked = stack.get(array); + const stacked = stack.get(array); if (stacked && stack.get(other)) { return stacked == other; } - var index = -1, - result = true, - seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined; + let index = -1; + let result = true; + const seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined; stack.set(array, other); stack.set(other, array); // Ignore non-index properties. while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; + var arrValue = array[index]; + const othValue = other[index]; if (customizer) { var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); @@ -2647,9 +2575,8 @@ var lodash_isequal = {exports: {}}; break; } // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!arraySome(other, function (othValue, othIndex) { + if (!arraySome(other, (othValue, othIndex) => { if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { return seen.push(othIndex); } @@ -2663,8 +2590,8 @@ var lodash_isequal = {exports: {}}; } } - stack['delete'](array); - stack['delete'](other); + stack.delete(array); + stack.delete(other); return result; } /** @@ -2685,7 +2612,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ - function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { switch (tag) { case dataViewTag: @@ -2718,7 +2644,7 @@ var lodash_isequal = {exports: {}}; // Coerce regexes to strings and treat strings, primitives and objects, // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring // for more details. - return object == other + ''; + return object == `${other}`; case mapTag: var convert = mapToArray; @@ -2731,7 +2657,6 @@ var lodash_isequal = {exports: {}}; return false; } // Assume cyclic values are equal. - var stacked = stack.get(object); if (stacked) { @@ -2742,14 +2667,13 @@ var lodash_isequal = {exports: {}}; stack.set(object, other); var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); + stack.delete(object); return result; case symbolTag: if (symbolValueOf) { return symbolValueOf.call(object) == symbolValueOf.call(other); } - } return false; @@ -2768,19 +2692,18 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ - function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - objProps = getAllKeys(object), - objLength = objProps.length, - othProps = getAllKeys(other), - othLength = othProps.length; + const isPartial = bitmask & COMPARE_PARTIAL_FLAG; + const objProps = getAllKeys(object); + const objLength = objProps.length; + const othProps = getAllKeys(other); + const othLength = othProps.length; if (objLength != othLength && !isPartial) { return false; } - var index = objLength; + let index = objLength; while (index--) { var key = objProps[index]; @@ -2790,28 +2713,26 @@ var lodash_isequal = {exports: {}}; } } // Assume cyclic values are equal. - - var stacked = stack.get(object); + const stacked = stack.get(object); if (stacked && stack.get(other)) { return stacked == other; } - var result = true; + let result = true; stack.set(object, other); stack.set(other, object); - var skipCtor = isPartial; + let skipCtor = isPartial; while (++index < objLength) { key = objProps[index]; - var objValue = object[key], - othValue = other[key]; + const objValue = object[key]; + const othValue = other[key]; if (customizer) { var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); } // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { result = false; break; @@ -2821,16 +2742,16 @@ var lodash_isequal = {exports: {}}; } if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. + const objCtor = object.constructor; + const othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { + if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor === 'function' && objCtor instanceof objCtor && typeof othCtor === 'function' && othCtor instanceof othCtor)) { result = false; } } - stack['delete'](object); - stack['delete'](other); + stack.delete(object); + stack.delete(other); return result; } /** @@ -2841,7 +2762,6 @@ var lodash_isequal = {exports: {}}; * @returns {Array} Returns the array of property names and symbols. */ - function getAllKeys(object) { return baseGetAllKeys(object, keys, getSymbols); } @@ -2854,10 +2774,9 @@ var lodash_isequal = {exports: {}}; * @returns {*} Returns the map data. */ - function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; + const data = map.__data__; + return isKeyable(key) ? data[typeof key === 'string' ? 'string' : 'hash'] : data.map; } /** * Gets the native function at `key` of `object`. @@ -2868,9 +2787,8 @@ var lodash_isequal = {exports: {}}; * @returns {*} Returns the function if it's native, else `undefined`. */ - function getNative(object, key) { - var value = getValue(object, key); + const value = getValue(object, key); return baseIsNative(value) ? value : undefined; } /** @@ -2881,17 +2799,16 @@ var lodash_isequal = {exports: {}}; * @returns {string} Returns the raw `toStringTag`. */ - function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; + const isOwn = hasOwnProperty.call(value, symToStringTag); + const tag = value[symToStringTag]; try { value[symToStringTag] = undefined; var unmasked = true; } catch (e) {} - var result = nativeObjectToString.call(value); + const result = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { @@ -2911,16 +2828,13 @@ var lodash_isequal = {exports: {}}; * @returns {Array} Returns the array of symbols. */ - var getSymbols = !nativeGetSymbols ? stubArray : function (object) { if (object == null) { return []; } object = Object(object); - return arrayFilter(nativeGetSymbols(object), function (symbol) { - return propertyIsEnumerable.call(object, symbol); - }); + return arrayFilter(nativeGetSymbols(object), (symbol) => propertyIsEnumerable.call(object, symbol)); }; /** * Gets the `toStringTag` of `value`. @@ -2934,9 +2848,9 @@ var lodash_isequal = {exports: {}}; if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) { getTag = function (value) { - var result = baseGetTag(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : ''; + const result = baseGetTag(value); + const Ctor = result == objectTag ? value.constructor : undefined; + const ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { @@ -2969,10 +2883,9 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ - function isIndex(value, length) { length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length; + return !!length && (typeof value === 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length; } /** * Checks if `value` is suitable for use as unique object key. @@ -2982,9 +2895,8 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ - function isKeyable(value) { - var type = typeof value; + const type = typeof value; return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null; } /** @@ -2995,7 +2907,6 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ - function isMasked(func) { return !!maskSrcKey && maskSrcKey in func; } @@ -3007,10 +2918,9 @@ var lodash_isequal = {exports: {}}; * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ - function isPrototype(value) { - var Ctor = value && value.constructor, - proto = typeof Ctor == 'function' && Ctor.prototype || objectProto; + const Ctor = value && value.constructor; + const proto = typeof Ctor === 'function' && Ctor.prototype || objectProto; return value === proto; } /** @@ -3021,7 +2931,6 @@ var lodash_isequal = {exports: {}}; * @returns {string} Returns the converted string. */ - function objectToString(value) { return nativeObjectToString.call(value); } @@ -3033,7 +2942,6 @@ var lodash_isequal = {exports: {}}; * @returns {string} Returns the source code. */ - function toSource(func) { if (func != null) { try { @@ -3041,7 +2949,7 @@ var lodash_isequal = {exports: {}}; } catch (e) {} try { - return func + ''; + return `${func}`; } catch (e) {} } @@ -3080,7 +2988,6 @@ var lodash_isequal = {exports: {}}; * // => true */ - function eq(value, other) { return value === other || value !== value && other !== other; } @@ -3103,12 +3010,11 @@ var lodash_isequal = {exports: {}}; * // => false */ - var isArguments = baseIsArguments(function () { return arguments; }()) ? baseIsArguments : function (value) { - return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); - }; + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); + }; /** * Checks if `value` is classified as an `Array` object. * @@ -3133,7 +3039,7 @@ var lodash_isequal = {exports: {}}; * // => false */ - var isArray = Array.isArray; + var { isArray } = Array; /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or @@ -3181,7 +3087,6 @@ var lodash_isequal = {exports: {}}; * // => false */ - var isBuffer = nativeIsBuffer || stubFalse; /** * Performs a deep comparison between two values to determine if they are @@ -3233,15 +3138,13 @@ var lodash_isequal = {exports: {}}; * // => false */ - function isFunction(value) { if (!isObject(value)) { return false; } // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 9 which returns 'object' for typed arrays and other constructors. - - var tag = baseGetTag(value); + const tag = baseGetTag(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } /** @@ -3271,9 +3174,8 @@ var lodash_isequal = {exports: {}}; * // => false */ - function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + return typeof value === 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } /** * Checks if `value` is the @@ -3301,9 +3203,8 @@ var lodash_isequal = {exports: {}}; * // => false */ - function isObject(value) { - var type = typeof value; + const type = typeof value; return value != null && (type == 'object' || type == 'function'); } /** @@ -3331,9 +3232,8 @@ var lodash_isequal = {exports: {}}; * // => false */ - function isObjectLike(value) { - return value != null && typeof value == 'object'; + return value != null && typeof value === 'object'; } /** * Checks if `value` is classified as a typed array. @@ -3353,7 +3253,6 @@ var lodash_isequal = {exports: {}}; * // => false */ - var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; /** * Creates an array of the own enumerable property names of `object`. @@ -3406,7 +3305,6 @@ var lodash_isequal = {exports: {}}; * // => false */ - function stubArray() { return []; } @@ -3424,15 +3322,14 @@ var lodash_isequal = {exports: {}}; * // => [false, false] */ - function stubFalse() { return false; } module.exports = isEqual; -})(lodash_isequal, lodash_isequal.exports); +}(lodash_isequal, lodash_isequal.exports)); -var munkres$1 = {exports: {}}; +const munkres$1 = { exports: {} }; /** * Introduction @@ -3608,9 +3505,9 @@ var munkres$1 = {exports: {}}; * * Copyright and License * ===================== - * + * * Copyright 2008-2016 Brian M. Clapper - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -3629,12 +3526,12 @@ var munkres$1 = {exports: {}}; * A very large numerical value which can be used like an integer * (i. e., adding integers of similar size does not result in overflow). */ - var MAX_SIZE = parseInt(Number.MAX_SAFE_INTEGER / 2) || (1 << 26) * (1 << 26); + const MAX_SIZE = parseInt(Number.MAX_SAFE_INTEGER / 2) || (1 << 26) * (1 << 26); /** * A default value to pad the cost matrix with if it is not quadratic. */ - var DEFAULT_PAD_VALUE = 0; // --------------------------------------------------------------------------- + const DEFAULT_PAD_VALUE = 0; // --------------------------------------------------------------------------- // Classes // --------------------------------------------------------------------------- @@ -3663,21 +3560,20 @@ var munkres$1 = {exports: {}}; * @return {Array} An array of arrays representing the padded matrix */ - Munkres.prototype.pad_matrix = function (matrix, pad_value) { pad_value = pad_value || DEFAULT_PAD_VALUE; - var max_columns = 0; - var total_rows = matrix.length; - var i; + let max_columns = 0; + let total_rows = matrix.length; + let i; for (i = 0; i < total_rows; ++i) if (matrix[i].length > max_columns) max_columns = matrix[i].length; total_rows = max_columns > total_rows ? max_columns : total_rows; - var new_matrix = []; + const new_matrix = []; for (i = 0; i < total_rows; ++i) { - var row = matrix[i] || []; - var new_row = row.slice(); // If this row is too short, pad it + const row = matrix[i] || []; + const new_row = row.slice(); // If this row is too short, pad it while (total_rows > new_row.length) new_row.push(pad_value); @@ -3706,7 +3602,6 @@ var munkres$1 = {exports: {}}; * cost path through the matrix */ - Munkres.prototype.compute = function (cost_matrix, options) { options = options || {}; options.padValue = options.padValue || DEFAULT_PAD_VALUE; @@ -3714,7 +3609,7 @@ var munkres$1 = {exports: {}}; this.n = this.C.length; this.original_length = cost_matrix.length; this.original_width = cost_matrix[0].length; - var nfalseArray = []; + const nfalseArray = []; /* array of n false values */ while (nfalseArray.length < this.n) nfalseArray.push(false); @@ -3725,26 +3620,26 @@ var munkres$1 = {exports: {}}; this.Z0_c = 0; this.path = this.__make_matrix(this.n * 2, 0); this.marked = this.__make_matrix(this.n, 0); - var step = 1; - var steps = { + let step = 1; + const steps = { 1: this.__step1, 2: this.__step2, 3: this.__step3, 4: this.__step4, 5: this.__step5, - 6: this.__step6 + 6: this.__step6, }; while (true) { - var func = steps[step]; + const func = steps[step]; if (!func) // done - break; + { break; } step = func.apply(this); } - var results = []; + const results = []; - for (var i = 0; i < this.original_length; ++i) for (var j = 0; j < this.original_width; ++j) if (this.marked[i][j] == 1) results.push([i, j]); + for (let i = 0; i < this.original_length; ++i) for (let j = 0; j < this.original_width; ++j) if (this.marked[i][j] == 1) results.push([i, j]); return results; }; @@ -3757,14 +3652,13 @@ var munkres$1 = {exports: {}}; * @return {Array} An array of arrays representing the newly created matrix */ - Munkres.prototype.__make_matrix = function (n, val) { - var matrix = []; + const matrix = []; - for (var i = 0; i < n; ++i) { + for (let i = 0; i < n; ++i) { matrix[i] = []; - for (var j = 0; j < n; ++j) matrix[i][j] = val; + for (let j = 0; j < n; ++j) matrix[i][j] = val; } return matrix; @@ -3774,14 +3668,13 @@ var munkres$1 = {exports: {}}; * subtract it from every element in its row. Go to Step 2. */ - Munkres.prototype.__step1 = function () { - for (var i = 0; i < this.n; ++i) { + for (let i = 0; i < this.n; ++i) { // Find the minimum value for this row and subtract that minimum // from every element in the row. - var minval = Math.min.apply(Math, this.C[i]); + const minval = Math.min.apply(Math, this.C[i]); - for (var j = 0; j < this.n; ++j) this.C[i][j] -= minval; + for (let j = 0; j < this.n; ++j) this.C[i][j] -= minval; } return 2; @@ -3792,10 +3685,9 @@ var munkres$1 = {exports: {}}; * matrix. Go to Step 3. */ - Munkres.prototype.__step2 = function () { - for (var i = 0; i < this.n; ++i) { - for (var j = 0; j < this.n; ++j) { + for (let i = 0; i < this.n; ++i) { + for (let j = 0; j < this.n; ++j) { if (this.C[i][j] === 0 && !this.col_covered[j] && !this.row_covered[i]) { this.marked[i][j] = 1; this.col_covered[j] = true; @@ -3815,12 +3707,11 @@ var munkres$1 = {exports: {}}; * assignments. In this case, Go to DONE, otherwise, Go to Step 4. */ - Munkres.prototype.__step3 = function () { - var count = 0; + let count = 0; - for (var i = 0; i < this.n; ++i) { - for (var j = 0; j < this.n; ++j) { + for (let i = 0; i < this.n; ++i) { + for (let j = 0; j < this.n; ++j) { if (this.marked[i][j] == 1 && this.col_covered[j] == false) { this.col_covered[j] = true; ++count; @@ -3838,15 +3729,14 @@ var munkres$1 = {exports: {}}; * left. Save the smallest uncovered value and Go to Step 6. */ - Munkres.prototype.__step4 = function () { - var done = false; - var row = -1, - col = -1, - star_col = -1; + const done = false; + let row = -1; + let col = -1; + let star_col = -1; while (!done) { - var z = this.__find_a_zero(); + const z = this.__find_a_zero(); row = z[0]; col = z[1]; @@ -3876,15 +3766,14 @@ var munkres$1 = {exports: {}}; * primes and uncover every line in the matrix. Return to Step 3 */ - Munkres.prototype.__step5 = function () { - var count = 0; + let count = 0; this.path[count][0] = this.Z0_r; this.path[count][1] = this.Z0_c; - var done = false; + let done = false; while (!done) { - var row = this.__find_star_in_col(this.path[count][1]); + const row = this.__find_star_in_col(this.path[count][1]); if (row >= 0) { count++; @@ -3895,7 +3784,7 @@ var munkres$1 = {exports: {}}; } if (!done) { - var col = this.__find_prime_in_row(this.path[count][0]); + const col = this.__find_prime_in_row(this.path[count][0]); count++; this.path[count][0] = this.path[count - 1][0]; @@ -3918,12 +3807,11 @@ var munkres$1 = {exports: {}}; * lines. */ - Munkres.prototype.__step6 = function () { - var minval = this.__find_smallest(); + const minval = this.__find_smallest(); - for (var i = 0; i < this.n; ++i) { - for (var j = 0; j < this.n; ++j) { + for (let i = 0; i < this.n; ++i) { + for (let j = 0; j < this.n; ++j) { if (this.row_covered[i]) this.C[i][j] += minval; if (!this.col_covered[j]) this.C[i][j] -= minval; } @@ -3937,11 +3825,10 @@ var munkres$1 = {exports: {}}; * @return {Number} The smallest uncovered value, or MAX_SIZE if no value was found */ - Munkres.prototype.__find_smallest = function () { - var minval = MAX_SIZE; + let minval = MAX_SIZE; - for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (!this.row_covered[i] && !this.col_covered[j]) if (minval > this.C[i][j]) minval = this.C[i][j]; + for (let i = 0; i < this.n; ++i) for (let j = 0; j < this.n; ++j) if (!this.row_covered[i] && !this.col_covered[j]) if (minval > this.C[i][j]) minval = this.C[i][j]; return minval; }; @@ -3951,9 +3838,8 @@ var munkres$1 = {exports: {}}; * @return {Array} The indices of the found element or [-1, -1] if not found */ - Munkres.prototype.__find_a_zero = function () { - for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.C[i][j] === 0 && !this.row_covered[i] && !this.col_covered[j]) return [i, j]; + for (let i = 0; i < this.n; ++i) for (let j = 0; j < this.n; ++j) if (this.C[i][j] === 0 && !this.row_covered[i] && !this.col_covered[j]) return [i, j]; return [-1, -1]; }; @@ -3965,9 +3851,8 @@ var munkres$1 = {exports: {}}; * @return {Number} */ - Munkres.prototype.__find_star_in_row = function (row) { - for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 1) return j; + for (let j = 0; j < this.n; ++j) if (this.marked[row][j] == 1) return j; return -1; }; @@ -3977,9 +3862,8 @@ var munkres$1 = {exports: {}}; * @return {Number} The row index, or -1 if no starred element was found */ - Munkres.prototype.__find_star_in_col = function (col) { - for (var i = 0; i < this.n; ++i) if (this.marked[i][col] == 1) return i; + for (let i = 0; i < this.n; ++i) if (this.marked[i][col] == 1) return i; return -1; }; @@ -3989,30 +3873,27 @@ var munkres$1 = {exports: {}}; * @return {Number} The column index, or -1 if no prime element was found */ - Munkres.prototype.__find_prime_in_row = function (row) { - for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 2) return j; + for (let j = 0; j < this.n; ++j) if (this.marked[row][j] == 2) return j; return -1; }; Munkres.prototype.__convert_path = function (path, count) { - for (var i = 0; i <= count; ++i) this.marked[path[i][0]][path[i][1]] = this.marked[path[i][0]][path[i][1]] == 1 ? 0 : 1; + for (let i = 0; i <= count; ++i) this.marked[path[i][0]][path[i][1]] = this.marked[path[i][0]][path[i][1]] == 1 ? 0 : 1; }; /** Clear all covered matrix cells */ - Munkres.prototype.__clear_covers = function () { - for (var i = 0; i < this.n; ++i) { + for (let i = 0; i < this.n; ++i) { this.row_covered[i] = false; this.col_covered[i] = false; } }; /** Erase all prime markings */ - Munkres.prototype.__erase_primes = function () { - for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.marked[i][j] == 2) this.marked[i][j] = 0; + for (let i = 0; i < this.n; ++i) for (let j = 0; j < this.n; ++j) if (this.marked[i][j] == 2) this.marked[i][j] = 0; }; // --------------------------------------------------------------------------- // Functions // --------------------------------------------------------------------------- @@ -4040,12 +3921,12 @@ var munkres$1 = {exports: {}}; * @return {Array} The converted matrix */ - function make_cost_matrix(profit_matrix, inversion_function) { - var i, j; + let i; let + j; if (!inversion_function) { - var maximum = -1.0 / 0.0; + let maximum = -1.0 / 0.0; for (i = 0; i < profit_matrix.length; ++i) for (j = 0; j < profit_matrix[i].length; ++j) if (profit_matrix[i][j] > maximum) maximum = profit_matrix[i][j]; @@ -4054,10 +3935,10 @@ var munkres$1 = {exports: {}}; }; } - var cost_matrix = []; + const cost_matrix = []; for (i = 0; i < profit_matrix.length; ++i) { - var row = profit_matrix[i]; + const row = profit_matrix[i]; cost_matrix[i] = []; for (j = 0; j < row.length; ++j) cost_matrix[i][j] = inversion_function(profit_matrix[i][j]); @@ -4074,25 +3955,25 @@ var munkres$1 = {exports: {}}; * @return {String} The formatted matrix */ - function format_matrix(matrix) { - var columnWidths = []; - var i, j; + const columnWidths = []; + let i; let + j; for (i = 0; i < matrix.length; ++i) { for (j = 0; j < matrix[i].length; ++j) { - var entryWidth = String(matrix[i][j]).length; + const entryWidth = String(matrix[i][j]).length; if (!columnWidths[j] || entryWidth >= columnWidths[j]) columnWidths[j] = entryWidth; } } - var formatted = ''; + let formatted = ''; for (i = 0; i < matrix.length; ++i) { for (j = 0; j < matrix[i].length; ++j) { - var s = String(matrix[i][j]); // pad at front with spaces + let s = String(matrix[i][j]); // pad at front with spaces - while (s.length < columnWidths[j]) s = ' ' + s; + while (s.length < columnWidths[j]) s = ` ${s}`; formatted += s; // separate columns @@ -4107,13 +3988,12 @@ var munkres$1 = {exports: {}}; // Exports // --------------------------------------------------------------------------- - function computeMunkres(cost_matrix, options) { - var m = new Munkres(); + const m = new Munkres(); return m.compute(cost_matrix, options); } - computeMunkres.version = "1.2.2"; + computeMunkres.version = '1.2.2'; computeMunkres.format_matrix = format_matrix; computeMunkres.make_cost_matrix = make_cost_matrix; computeMunkres.Munkres = Munkres; // backwards compatibility @@ -4121,20 +4001,20 @@ var munkres$1 = {exports: {}}; if (module.exports) { module.exports = computeMunkres; } -})(munkres$1); +}(munkres$1)); -var itemTrackedModule = ItemTracked$1; -var ItemTracked = itemTrackedModule.ItemTracked; -var kdTree = kdTreeMin.kdTree; -var munkres = munkres$1.exports; -var iouAreas = utils.iouAreas; +const itemTrackedModule = ItemTracked$1; +const { ItemTracked } = itemTrackedModule; +const { kdTree } = kdTreeMin; +const munkres = munkres$1.exports; +const { iouAreas } = utils; -var iouDistance = function iouDistance(item1, item2) { +const iouDistance = function iouDistance(item1, item2) { // IOU distance, between 0 and 1 // The smaller the less overlap - var iou = iouAreas(item1, item2); // Invert this as the KDTREESEARCH is looking for the smaller value + const iou = iouAreas(item1, item2); // Invert this as the KDTREESEARCH is looking for the smaller value - var distance = 1 - iou; // If the overlap is iou < 0.95, exclude value + let distance = 1 - iou; // If the overlap is iou < 0.95, exclude value if (distance > 1 - params.iouLimit) { distance = params.distanceLimit + 1; @@ -4162,31 +4042,31 @@ var params = { distanceLimit: 10000, // The algorithm used to match tracks with new detections. Can be either // 'kdTree' or 'munkres'. - matchingAlgorithm: 'munkres' // matchingAlgorithm: 'kdTree', + matchingAlgorithm: 'munkres', // matchingAlgorithm: 'kdTree', }; // A dictionary of itemTracked currently tracked // key: uuid // value: ItemTracked object -var mapOfItemsTracked = new Map(); // A dictionnary keeping memory of all tracked object (even after they disappear) +let mapOfItemsTracked = new Map(); // A dictionnary keeping memory of all tracked object (even after they disappear) // Useful to ouput the file of all items tracked -var mapOfAllItemsTracked = new Map(); // By default, we do not keep all the history in memory +let mapOfAllItemsTracked = new Map(); // By default, we do not keep all the history in memory -var keepAllHistoryInMemory = false; -var computeDistance = tracker.computeDistance = iouDistance; +let keepAllHistoryInMemory = false; +const computeDistance = tracker.computeDistance = iouDistance; -var updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameNb) { +const updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameNb) { // A kd-tree containing all the itemtracked // Need to rebuild on each frame, because itemTracked positions have changed - var treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ['x', 'y', 'w', 'h']); // Contruct a kd tree for the detections of this frame + let treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ['x', 'y', 'w', 'h']); // Contruct a kd tree for the detections of this frame - var treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ['x', 'y', 'w', 'h']); // SCENARIO 1: itemsTracked map is empty + const treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ['x', 'y', 'w', 'h']); // SCENARIO 1: itemsTracked map is empty if (mapOfItemsTracked.size === 0) { // Just add every detected item as item Tracked - detectionsOfThisFrame.forEach(function (itemDetected) { - var newItemTracked = new ItemTracked(itemDetected, frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map + detectionsOfThisFrame.forEach((itemDetected) => { + const newItemTracked = new ItemTracked(itemDetected, frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree @@ -4194,81 +4074,70 @@ var updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = fu }); } // SCENARIO 2: We already have itemsTracked in the map else { - var matchedList = new Array(detectionsOfThisFrame.length); + const matchedList = new Array(detectionsOfThisFrame.length); matchedList.fill(false); // Match existing Tracked items with the items detected in the new frame // For each look in the new detection to find the closest match if (detectionsOfThisFrame.length > 0) { if (params.matchingAlgorithm === 'munkres') { - var trackedItemIds = Array.from(mapOfItemsTracked.keys()); - var costMatrix = Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { - var predictedPosition = itemTracked.predictNextPosition(); - return detectionsOfThisFrame.map(function (detection) { - return params.distanceFunc(predictedPosition, detection); - }); + const trackedItemIds = Array.from(mapOfItemsTracked.keys()); + const costMatrix = Array.from(mapOfItemsTracked.values()).map((itemTracked) => { + const predictedPosition = itemTracked.predictNextPosition(); + return detectionsOfThisFrame.map((detection) => params.distanceFunc(predictedPosition, detection)); }); - mapOfItemsTracked.forEach(function (itemTracked) { + mapOfItemsTracked.forEach((itemTracked) => { itemTracked.makeAvailable(); }); - munkres(costMatrix).filter(function (m) { - return costMatrix[m[0]][m[1]] <= params.distanceLimit; - }).forEach(function (m) { - var itemTracked = mapOfItemsTracked.get(trackedItemIds[m[0]]); - var updatedTrackedItemProperties = detectionsOfThisFrame[m[1]]; + munkres(costMatrix).filter((m) => costMatrix[m[0]][m[1]] <= params.distanceLimit).forEach((m) => { + const itemTracked = mapOfItemsTracked.get(trackedItemIds[m[0]]); + const updatedTrackedItemProperties = detectionsOfThisFrame[m[1]]; matchedList[m[1]] = { - idDisplay: itemTracked.idDisplay + idDisplay: itemTracked.idDisplay, }; itemTracked.makeUnavailable().update(updatedTrackedItemProperties, frameNb); }); - matchedList.forEach(function (matched, index) { + matchedList.forEach((matched, index) => { if (!matched) { - if (Math.min.apply(Math, _toConsumableArray(costMatrix.map(function (m) { - return m[index]; - }))) > params.distanceLimit) { - var newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); + if (Math.min.apply(Math, _toConsumableArray(costMatrix.map((m) => m[index]))) > params.distanceLimit) { + const newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); mapOfItemsTracked.set(newItemTracked.id, newItemTracked); newItemTracked.makeUnavailable(); - costMatrix.push(detectionsOfThisFrame.map(function (detection) { - return params.distanceFunc(newItemTracked, detection); - })); + costMatrix.push(detectionsOfThisFrame.map((detection) => params.distanceFunc(newItemTracked, detection))); } } }); } else if (params.matchingAlgorithm === 'kdTree') { - mapOfItemsTracked.forEach(function (itemTracked) { + mapOfItemsTracked.forEach((itemTracked) => { // First predict the new position of the itemTracked - var predictedPosition = itemTracked.predictNextPosition(); // Make available for matching + const predictedPosition = itemTracked.predictNextPosition(); // Make available for matching itemTracked.makeAvailable(); // Search for a detection that matches - var treeSearchResult = treeDetectionsOfThisFrame.nearest(predictedPosition, 1, params.distanceLimit)[0]; // Only for debug assessments of predictions + const treeSearchResult = treeDetectionsOfThisFrame.nearest(predictedPosition, 1, params.distanceLimit)[0]; // Only for debug assessments of predictions treeDetectionsOfThisFrame.nearest(itemTracked, 1, params.distanceLimit)[0]; // Only if we enable the extra refinement treeDetectionsOfThisFrame.nearest(predictedPosition, 2, params.distanceLimit); // If we have found something if (treeSearchResult) { - - var indexClosestNewDetectedItem = detectionsOfThisFrame.indexOf(treeSearchResult[0]); // If this detections was not already matched to a tracked item + const indexClosestNewDetectedItem = detectionsOfThisFrame.indexOf(treeSearchResult[0]); // If this detections was not already matched to a tracked item // (otherwise it would be matched to two tracked items...) if (!matchedList[indexClosestNewDetectedItem]) { matchedList[indexClosestNewDetectedItem] = { - idDisplay: itemTracked.idDisplay + idDisplay: itemTracked.idDisplay, }; // Update properties of tracked object - var updatedTrackedItemProperties = detectionsOfThisFrame[indexClosestNewDetectedItem]; + const updatedTrackedItemProperties = detectionsOfThisFrame[indexClosestNewDetectedItem]; mapOfItemsTracked.get(itemTracked.id).makeUnavailable().update(updatedTrackedItemProperties, frameNb); } } }); } else { - throw "Unknown matching algorithm \"".concat(params.matchingAlgorithm, "\""); + throw 'Unknown matching algorithm "'.concat(params.matchingAlgorithm, '"'); } } else { - - - mapOfItemsTracked.forEach(function (itemTracked) { + mapOfItemsTracked.forEach((itemTracked) => { itemTracked.makeAvailable(); }); } @@ -4281,14 +4150,14 @@ var updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = fu // Rebuild tracked item tree to take in account the new positions treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ['x', 'y', 'w', 'h']); // console.log(`Nb new items Unmatched : ${matchedList.filter((isMatched) => isMatched === false).length}`) - matchedList.forEach(function (matched, index) { + matchedList.forEach((matched, index) => { // Iterate through unmatched new detections if (!matched) { // Do not add as new tracked item if it is to similar to an existing one - var treeSearchResult = treeItemsTracked.nearest(detectionsOfThisFrame[index], 1, params.distanceLimit)[0]; + const treeSearchResult = treeItemsTracked.nearest(detectionsOfThisFrame[index], 1, params.distanceLimit)[0]; if (!treeSearchResult) { - var newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map + const newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree @@ -4302,14 +4171,13 @@ var updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = fu } // Start killing the itemTracked (and predicting next position) // that are tracked but haven't been matched this frame - - mapOfItemsTracked.forEach(function (itemTracked) { + mapOfItemsTracked.forEach((itemTracked) => { if (itemTracked.available) { itemTracked.countDown(frameNb); itemTracked.updateTheoricalPositionAndSize(); if (itemTracked.isDead()) { - mapOfItemsTracked["delete"](itemTracked.id); + mapOfItemsTracked.delete(itemTracked.id); treeItemsTracked.remove(itemTracked); if (keepAllHistoryInMemory) { @@ -4321,56 +4189,48 @@ var updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = fu } }; -var reset = tracker.reset = function () { +const reset = tracker.reset = function () { mapOfItemsTracked = new Map(); mapOfAllItemsTracked = new Map(); itemTrackedModule.reset(); }; -var setParams = tracker.setParams = function (newParams) { - Object.keys(newParams).forEach(function (key) { +const setParams = tracker.setParams = function (newParams) { + Object.keys(newParams).forEach((key) => { params[key] = newParams[key]; }); }; -var enableKeepInMemory = tracker.enableKeepInMemory = function () { +const enableKeepInMemory = tracker.enableKeepInMemory = function () { keepAllHistoryInMemory = true; }; -var disableKeepInMemory = tracker.disableKeepInMemory = function () { +const disableKeepInMemory = tracker.disableKeepInMemory = function () { keepAllHistoryInMemory = false; }; -var getJSONOfTrackedItems = tracker.getJSONOfTrackedItems = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { - return itemTracked.toJSON(roundInt); - }); +const getJSONOfTrackedItems = tracker.getJSONOfTrackedItems = function () { + const roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return Array.from(mapOfItemsTracked.values()).map((itemTracked) => itemTracked.toJSON(roundInt)); }; -var getJSONDebugOfTrackedItems = tracker.getJSONDebugOfTrackedItems = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { - return itemTracked.toJSONDebug(roundInt); - }); +const getJSONDebugOfTrackedItems = tracker.getJSONDebugOfTrackedItems = function () { + const roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return Array.from(mapOfItemsTracked.values()).map((itemTracked) => itemTracked.toJSONDebug(roundInt)); }; -var getTrackedItemsInMOTFormat = tracker.getTrackedItemsInMOTFormat = function (frameNb) { - return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { - return itemTracked.toMOT(frameNb); - }); +const getTrackedItemsInMOTFormat = tracker.getTrackedItemsInMOTFormat = function (frameNb) { + return Array.from(mapOfItemsTracked.values()).map((itemTracked) => itemTracked.toMOT(frameNb)); }; // Work only if keepInMemory is enabled - -var getAllTrackedItems = tracker.getAllTrackedItems = function () { +const getAllTrackedItems = tracker.getAllTrackedItems = function () { return mapOfAllItemsTracked; }; // Work only if keepInMemory is enabled - -var getJSONOfAllTrackedItems = tracker.getJSONOfAllTrackedItems = function () { - return Array.from(mapOfAllItemsTracked.values()).map(function (itemTracked) { - return itemTracked.toJSONGenericInfo(); - }); +const getJSONOfAllTrackedItems = tracker.getJSONOfAllTrackedItems = function () { + return Array.from(mapOfAllItemsTracked.values()).map((itemTracked) => itemTracked.toJSONGenericInfo()); }; -export { computeDistance, tracker as default, disableKeepInMemory, enableKeepInMemory, getAllTrackedItems, getJSONDebugOfTrackedItems, getJSONOfAllTrackedItems, getJSONOfTrackedItems, getTrackedItemsInMOTFormat, reset, setParams, updateTrackedItemsWithNewFrame }; +export { + computeDistance, tracker as default, disableKeepInMemory, enableKeepInMemory, getAllTrackedItems, getJSONDebugOfTrackedItems, getJSONOfAllTrackedItems, getJSONOfTrackedItems, getTrackedItemsInMOTFormat, reset, setParams, updateTrackedItemsWithNewFrame, +}; diff --git a/bundle.iife.js b/bundle.iife.js index 378df47..c47cb5b 100644 --- a/bundle.iife.js +++ b/bundle.iife.js @@ -38,650 +38,868 @@ var Tracker = (function (exports) { var tracker = {}; - var ItemTracked$1 = {}; + var kdTreeMin = {}; - var rngBrowser = {exports: {}}; + /** + * k-d Tree JavaScript - V 1.01 + * + * https://github.com/ubilabs/kd-tree-javascript + * + * @author Mircea Pricop , 2012 + * @author Martin Kleppe , 2012 + * @author Ubilabs http://ubilabs.net, 2012 + * @license MIT License + */ - // browser this is a little complicated due to unknown quality of Math.random() - // and inconsistent support for the `crypto` API. We do the best we can via - // feature-detection - // getRandomValues needs to be invoked in a context where "this" is a Crypto - // implementation. Also, find the complete implementation of crypto on IE11. + (function (exports) { + !function (t, n) { + n(exports ); + }(commonjsGlobal, function (t) { + function n(t, n, o) { + this.obj = t, this.left = null, this.right = null, this.parent = o, this.dimension = n; + } - var getRandomValues = typeof crypto != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto); + function o(t) { + this.content = [], this.scoreFunction = t; + } - if (getRandomValues) { - // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto - var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef + o.prototype = { + push: function (t) { + this.content.push(t), this.bubbleUp(this.content.length - 1); + }, + pop: function () { + var t = this.content[0], + n = this.content.pop(); + return this.content.length > 0 && (this.content[0] = n, this.sinkDown(0)), t; + }, + peek: function () { + return this.content[0]; + }, + remove: function (t) { + for (var n = this.content.length, o = 0; o < n; o++) if (this.content[o] == t) { + var i = this.content.pop(); + return void (o != n - 1 && (this.content[o] = i, this.scoreFunction(i) < this.scoreFunction(t) ? this.bubbleUp(o) : this.sinkDown(o))); + } - rngBrowser.exports = function whatwgRNG() { - getRandomValues(rnds8); - return rnds8; - }; - } else { - // Math.random()-based (RNG) - // - // If all else fails, use Math.random(). It's fast, but is of unspecified - // quality. - var rnds = new Array(16); + throw new Error("Node not found."); + }, + size: function () { + return this.content.length; + }, + bubbleUp: function (t) { + for (var n = this.content[t]; t > 0;) { + var o = Math.floor((t + 1) / 2) - 1, + i = this.content[o]; + if (!(this.scoreFunction(n) < this.scoreFunction(i))) break; + this.content[o] = n, this.content[t] = i, t = o; + } + }, + sinkDown: function (t) { + for (var n = this.content.length, o = this.content[t], i = this.scoreFunction(o);;) { + var e = 2 * (t + 1), + r = e - 1, + l = null; - rngBrowser.exports = function mathRNG() { - for (var i = 0, r; i < 16; i++) { - if ((i & 0x03) === 0) r = Math.random() * 0x100000000; - rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; - } + if (r < n) { + var u = this.content[r], + h = this.scoreFunction(u); + h < i && (l = r); + } - return rnds; - }; - } + if (e < n) { + var s = this.content[e]; + this.scoreFunction(s) < (null == l ? i : h) && (l = e); + } - /** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ - var byteToHex = []; + if (null == l) break; + this.content[t] = this.content[l], this.content[l] = o, t = l; + } + } + }, t.kdTree = function (t, i, e) { + function r(t, o, i) { + var l, + u, + h = o % e.length; + return 0 === t.length ? null : 1 === t.length ? new n(t[0], h, i) : (t.sort(function (t, n) { + return t[e[h]] - n[e[h]]; + }), l = Math.floor(t.length / 2), u = new n(t[l], h, i), u.left = r(t.slice(0, l), o + 1, u), u.right = r(t.slice(l + 1), o + 1, u), u); + } - for (var i = 0; i < 256; ++i) { - byteToHex[i] = (i + 0x100).toString(16).substr(1); - } + var l = this; + Array.isArray(t) ? this.root = r(t, 0, null) : function (t) { + function n(t) { + t.left && (t.left.parent = t, n(t.left)), t.right && (t.right.parent = t, n(t.right)); + } - function bytesToUuid$1(buf, offset) { - var i = offset || 0; - var bth = byteToHex; // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 + l.root = t, n(l.root); + }(t), this.toJSON = function (t) { + t || (t = this.root); + var o = new n(t.obj, t.dimension, null); + return t.left && (o.left = l.toJSON(t.left)), t.right && (o.right = l.toJSON(t.right)), o; + }, this.insert = function (t) { + function o(n, i) { + if (null === n) return i; + var r = e[n.dimension]; + return t[r] < n.obj[r] ? o(n.left, n) : o(n.right, n); + } - return [bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]]].join(''); - } + var i, + r, + l = o(this.root, null); + null !== l ? (i = new n(t, (l.dimension + 1) % e.length, l), r = e[l.dimension], t[r] < l.obj[r] ? l.left = i : l.right = i) : this.root = new n(t, 0, null); + }, this.remove = function (t) { + function n(o) { + if (null === o) return null; + if (o.obj === t) return o; + var i = e[o.dimension]; + return t[i] < o.obj[i] ? n(o.left) : n(o.right); + } - var bytesToUuid_1 = bytesToUuid$1; + function o(t) { + function n(t, o) { + var i, r, l, u, h; + return null === t ? null : (i = e[o], t.dimension === o ? null !== t.left ? n(t.left, o) : t : (r = t.obj[i], l = n(t.left, o), u = n(t.right, o), h = t, null !== l && l.obj[i] < r && (h = l), null !== u && u.obj[i] < h.obj[i] && (h = u), h)); + } - var rng = rngBrowser.exports; - var bytesToUuid = bytesToUuid_1; + var i, r, u; + if (null === t.left && null === t.right) return null === t.parent ? void (l.root = null) : (u = e[t.parent.dimension], void (t.obj[u] < t.parent.obj[u] ? t.parent.left = null : t.parent.right = null)); + null !== t.right ? (r = (i = n(t.right, t.dimension)).obj, o(i), t.obj = r) : (r = (i = n(t.left, t.dimension)).obj, o(i), t.right = t.left, t.left = null, t.obj = r); + } - function v4(options, buf, offset) { - var i = buf && offset || 0; + var i; + null !== (i = n(l.root)) && o(i); + }, this.nearest = function (t, n, r) { + function u(o) { + function r(t, o) { + f.push([t, o]), f.size() > n && f.pop(); + } - if (typeof options == 'string') { - buf = options === 'binary' ? new Array(16) : null; - options = null; - } + var l, + h, + s, + c, + a = e[o.dimension], + g = i(t, o.obj), + p = {}; - options = options || {}; - var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + for (c = 0; c < e.length; c += 1) c === o.dimension ? p[e[c]] = t[e[c]] : p[e[c]] = o.obj[e[c]]; - rnds[6] = rnds[6] & 0x0f | 0x40; - rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + h = i(p, o.obj), null !== o.right || null !== o.left ? (u(l = null === o.right ? o.left : null === o.left ? o.right : t[a] < o.obj[a] ? o.left : o.right), (f.size() < n || g < f.peek()[1]) && r(o, g), (f.size() < n || Math.abs(h) < f.peek()[1]) && null !== (s = l === o.left ? o.right : o.left) && u(s)) : (f.size() < n || g < f.peek()[1]) && r(o, g); + } - if (buf) { - for (var ii = 0; ii < 16; ++ii) { - buf[i + ii] = rnds[ii]; - } - } + var h, s, f; + if (f = new o(function (t) { + return -t[1]; + }), r) for (h = 0; h < n; h += 1) f.push([null, r]); - return buf || bytesToUuid(rnds); - } + for (l.root && u(l.root), s = [], h = 0; h < Math.min(n, f.content.length); h += 1) f.content[h][0] && s.push([f.content[h][0].obj, f.content[h][1]]); - var v4_1 = v4; + return s; + }, this.balanceFactor = function () { + function t(n) { + return null === n ? 0 : Math.max(t(n.left), t(n.right)) + 1; + } - var utils = {}; + function n(t) { + return null === t ? 0 : n(t.left) + n(t.right) + 1; + } - utils.isDetectionTooLarge = function (detections, largestAllowed) { - if (detections.w >= largestAllowed) { - return true; - } + return t(l.root) / (Math.log(n(l.root)) / Math.log(2)); + }; + }, t.BinaryHeap = o; + }); + })(kdTreeMin); - return false; - }; + var munkres$1 = {exports: {}}; - var isInsideArea = function isInsideArea(area, point) { - var xMin = area.x - area.w / 2; - var xMax = area.x + area.w / 2; - var yMin = area.y - area.h / 2; - var yMax = area.y + area.h / 2; + /** + * Introduction + * ============ + * + * The Munkres module provides an implementation of the Munkres algorithm + * (also called the Hungarian algorithm or the Kuhn-Munkres algorithm), + * useful for solving the Assignment Problem. + * + * Assignment Problem + * ================== + * + * Let C be an n×n-matrix representing the costs of each of n workers + * to perform any of n jobs. The assignment problem is to assign jobs to + * workers in a way that minimizes the total cost. Since each worker can perform + * only one job and each job can be assigned to only one worker the assignments + * represent an independent set of the matrix C. + * + * One way to generate the optimal set is to create all permutations of + * the indices necessary to traverse the matrix so that no row and column + * are used more than once. For instance, given this matrix (expressed in + * Python) + * + * matrix = [[5, 9, 1], + * [10, 3, 2], + * [8, 7, 4]] + * + * You could use this code to generate the traversal indices:: + * + * def permute(a, results): + * if len(a) == 1: + * results.insert(len(results), a) + * + * else: + * for i in range(0, len(a)): + * element = a[i] + * a_copy = [a[j] for j in range(0, len(a)) if j != i] + * subresults = [] + * permute(a_copy, subresults) + * for subresult in subresults: + * result = [element] + subresult + * results.insert(len(results), result) + * + * results = [] + * permute(range(len(matrix)), results) # [0, 1, 2] for a 3x3 matrix + * + * After the call to permute(), the results matrix would look like this:: + * + * [[0, 1, 2], + * [0, 2, 1], + * [1, 0, 2], + * [1, 2, 0], + * [2, 0, 1], + * [2, 1, 0]] + * + * You could then use that index matrix to loop over the original cost matrix + * and calculate the smallest cost of the combinations + * + * n = len(matrix) + * minval = sys.maxsize + * for row in range(n): + * cost = 0 + * for col in range(n): + * cost += matrix[row][col] + * minval = min(cost, minval) + * + * print minval + * + * While this approach works fine for small matrices, it does not scale. It + * executes in O(n!) time: Calculating the permutations for an n×x-matrix + * requires n! operations. For a 12×12 matrix, that’s 479,001,600 + * traversals. Even if you could manage to perform each traversal in just one + * millisecond, it would still take more than 133 hours to perform the entire + * traversal. A 20×20 matrix would take 2,432,902,008,176,640,000 operations. At + * an optimistic millisecond per operation, that’s more than 77 million years. + * + * The Munkres algorithm runs in O(n³) time, rather than O(n!). This + * package provides an implementation of that algorithm. + * + * This version is based on + * http://csclab.murraystate.edu/~bob.pilgrim/445/munkres.html + * + * This version was originally written for Python by Brian Clapper from the + * algorithm at the above web site (The ``Algorithm::Munkres`` Perl version, + * in CPAN, was clearly adapted from the same web site.) and ported to + * JavaScript by Anna Henningsen (addaleax). + * + * Usage + * ===== + * + * Construct a Munkres object + * + * var m = new Munkres(); + * + * Then use it to compute the lowest cost assignment from a cost matrix. Here’s + * a sample program + * + * var matrix = [[5, 9, 1], + * [10, 3, 2], + * [8, 7, 4]]; + * var m = new Munkres(); + * var indices = m.compute(matrix); + * console.log(format_matrix(matrix), 'Lowest cost through this matrix:'); + * var total = 0; + * for (var i = 0; i < indices.length; ++i) { + * var row = indices[l][0], col = indices[l][1]; + * var value = matrix[row][col]; + * total += value; + * + * console.log('(' + rol + ', ' + col + ') -> ' + value); + * } + * + * console.log('total cost:', total); + * + * Running that program produces:: + * + * Lowest cost through this matrix: + * [5, 9, 1] + * [10, 3, 2] + * [8, 7, 4] + * (0, 0) -> 5 + * (1, 1) -> 3 + * (2, 2) -> 4 + * total cost: 12 + * + * The instantiated Munkres object can be used multiple times on different + * matrices. + * + * Non-square Cost Matrices + * ======================== + * + * The Munkres algorithm assumes that the cost matrix is square. However, it's + * possible to use a rectangular matrix if you first pad it with 0 values to make + * it square. This module automatically pads rectangular cost matrices to make + * them square. + * + * Notes: + * + * - The module operates on a *copy* of the caller's matrix, so any padding will + * not be seen by the caller. + * - The cost matrix must be rectangular or square. An irregular matrix will + * *not* work. + * + * Calculating Profit, Rather than Cost + * ==================================== + * + * The cost matrix is just that: A cost matrix. The Munkres algorithm finds + * the combination of elements (one from each row and column) that results in + * the smallest cost. It’s also possible to use the algorithm to maximize + * profit. To do that, however, you have to convert your profit matrix to a + * cost matrix. The simplest way to do that is to subtract all elements from a + * large value. + * + * The ``munkres`` module provides a convenience method for creating a cost + * matrix from a profit matrix, i.e. make_cost_matrix. + * + * References + * ========== + * + * 1. http://www.public.iastate.edu/~ddoty/HungarianAlgorithm.html + * + * 2. Harold W. Kuhn. The Hungarian Method for the assignment problem. + * *Naval Research Logistics Quarterly*, 2:83-97, 1955. + * + * 3. Harold W. Kuhn. Variants of the Hungarian method for assignment + * problems. *Naval Research Logistics Quarterly*, 3: 253-258, 1956. + * + * 4. Munkres, J. Algorithms for the Assignment and Transportation Problems. + * *Journal of the Society of Industrial and Applied Mathematics*, + * 5(1):32-38, March, 1957. + * + * 5. https://en.wikipedia.org/wiki/Hungarian_algorithm + * + * Copyright and License + * ===================== + * + * Copyright 2008-2016 Brian M. Clapper + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ - if (point.x >= xMin && point.x <= xMax && point.y >= yMin && point.y <= yMax) { - return true; + (function (module) { + /** + * A very large numerical value which can be used like an integer + * (i. e., adding integers of similar size does not result in overflow). + */ + var MAX_SIZE = parseInt(Number.MAX_SAFE_INTEGER / 2) || (1 << 26) * (1 << 26); + /** + * A default value to pad the cost matrix with if it is not quadratic. + */ + + var DEFAULT_PAD_VALUE = 0; // --------------------------------------------------------------------------- + // Classes + // --------------------------------------------------------------------------- + + /** + * Calculate the Munkres solution to the classical assignment problem. + * See the module documentation for usage. + * @constructor + */ + + function Munkres() { + this.C = null; + this.row_covered = []; + this.col_covered = []; + this.n = 0; + this.Z0_r = 0; + this.Z0_c = 0; + this.marked = null; + this.path = null; } + /** + * Pad a possibly non-square matrix to make it square. + * + * @param {Array} matrix An array of arrays containing the matrix cells + * @param {Number} [pad_value] The value used to pad a rectangular matrix + * + * @return {Array} An array of arrays representing the padded matrix + */ - return false; - }; - utils.isInsideArea = isInsideArea; + Munkres.prototype.pad_matrix = function (matrix, pad_value) { + pad_value = pad_value || DEFAULT_PAD_VALUE; + var max_columns = 0; + var total_rows = matrix.length; + var i; - utils.isInsideSomeAreas = function (areas, point) { - var isInside = areas.some(function (area) { - return isInsideArea(area, point); - }); - return isInside; - }; + for (i = 0; i < total_rows; ++i) if (matrix[i].length > max_columns) max_columns = matrix[i].length; - utils.ignoreObjectsNotToDetect = function (detections, objectsToDetect) { - return detections.filter(function (detection) { - return objectsToDetect.indexOf(detection.name) > -1; - }); - }; + total_rows = max_columns > total_rows ? max_columns : total_rows; + var new_matrix = []; - var getRectangleEdges = function getRectangleEdges(item) { - return { - x0: item.x - item.w / 2, - y0: item.y - item.h / 2, - x1: item.x + item.w / 2, - y1: item.y + item.h / 2 - }; - }; + for (i = 0; i < total_rows; ++i) { + var row = matrix[i] || []; + var new_row = row.slice(); // If this row is too short, pad it - utils.getRectangleEdges = getRectangleEdges; + while (total_rows > new_row.length) new_row.push(pad_value); - utils.iouAreas = function (item1, item2) { - var rect1 = getRectangleEdges(item1); - var rect2 = getRectangleEdges(item2); // Get overlap rectangle + new_matrix.push(new_row); + } - var overlap_x0 = Math.max(rect1.x0, rect2.x0); - var overlap_y0 = Math.max(rect1.y0, rect2.y0); - var overlap_x1 = Math.min(rect1.x1, rect2.x1); - var overlap_y1 = Math.min(rect1.y1, rect2.y1); // if there an overlap + return new_matrix; + }; + /** + * Compute the indices for the lowest-cost pairings between rows and columns + * in the database. Returns a list of (row, column) tuples that can be used + * to traverse the matrix. + * + * **WARNING**: This code handles square and rectangular matrices. + * It does *not* handle irregular matrices. + * + * @param {Array} cost_matrix The cost matrix. If this cost matrix is not square, + * it will be padded with DEFAULT_PAD_VALUE. Optionally, + * the pad value can be specified via options.padValue. + * This method does *not* modify the caller's matrix. + * It operates on a copy of the matrix. + * @param {Object} [options] Additional options to pass in + * @param {Number} [options.padValue] The value to use to pad a rectangular cost_matrix + * + * @return {Array} An array of ``(row, column)`` arrays that describe the lowest + * cost path through the matrix + */ - if (overlap_x1 - overlap_x0 <= 0 || overlap_y1 - overlap_y0 <= 0) { - // no overlap - return 0; - } - var area_rect1 = item1.w * item1.h; - var area_rect2 = item2.w * item2.h; - var area_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0); - var area_union = area_rect1 + area_rect2 - area_intersection; - return area_intersection / area_union; - }; + Munkres.prototype.compute = function (cost_matrix, options) { + options = options || {}; + options.padValue = options.padValue || DEFAULT_PAD_VALUE; + this.C = this.pad_matrix(cost_matrix, options.padValue); + this.n = this.C.length; + this.original_length = cost_matrix.length; + this.original_width = cost_matrix[0].length; + var nfalseArray = []; + /* array of n false values */ - utils.computeVelocityVector = function (item1, item2, nbFrame) { - return { - dx: (item2.x - item1.x) / nbFrame, - dy: (item2.y - item1.y) / nbFrame - }; - }; - /* + while (nfalseArray.length < this.n) nfalseArray.push(false); - computeBearingIn360 + this.row_covered = nfalseArray.slice(); + this.col_covered = nfalseArray.slice(); + this.Z0_r = 0; + this.Z0_c = 0; + this.path = this.__make_matrix(this.n * 2, 0); + this.marked = this.__make_matrix(this.n, 0); + var step = 1; + var steps = { + 1: this.__step1, + 2: this.__step2, + 3: this.__step3, + 4: this.__step4, + 5: this.__step5, + 6: this.__step6 + }; - dY + while (true) { + var func = steps[step]; + if (!func) // done + break; + step = func.apply(this); + } - ^ XX - | XXX - | XX - | XX - | XX - | XXX - | XX - | XX - | XX bearing = this angle in degree - | XX - |XX - +----------------------XX-----------------------> dX - | - | - | - | - | - | - | - | - | - | - | - + + var results = []; - */ + for (var i = 0; i < this.original_length; ++i) for (var j = 0; j < this.original_width; ++j) if (this.marked[i][j] == 1) results.push([i, j]); + return results; + }; + /** + * Create an n×n matrix, populating it with the specific value. + * + * @param {Number} n Matrix dimensions + * @param {Number} val Value to populate the matrix with + * + * @return {Array} An array of arrays representing the newly created matrix + */ - utils.computeBearingIn360 = function (dx, dy) { - var angle = Math.atan(dx / dy) / (Math.PI / 180); - if (angle > 0) { - if (dy > 0) { - return angle; - } + Munkres.prototype.__make_matrix = function (n, val) { + var matrix = []; - return 180 + angle; - } + for (var i = 0; i < n; ++i) { + matrix[i] = []; - if (dx > 0) { - return 180 + angle; - } + for (var j = 0; j < n; ++j) matrix[i][j] = val; + } - return 360 + angle; - }; + return matrix; + }; + /** + * For each row of the matrix, find the smallest element and + * subtract it from every element in its row. Go to Step 2. + */ - (function (exports) { - var uuidv4 = v4_1; - var computeBearingIn360 = utils.computeBearingIn360; - var computeVelocityVector = utils.computeVelocityVector; // Properties example - // { - // "x": 1021, - // "y": 65, - // "w": 34, - // "h": 27, - // "confidence": 26, - // "name": "car" - // } - /** The maximum length of the item history. */ + Munkres.prototype.__step1 = function () { + for (var i = 0; i < this.n; ++i) { + // Find the minimum value for this row and subtract that minimum + // from every element in the row. + var minval = Math.min.apply(Math, this.C[i]); - exports.ITEM_HISTORY_MAX_LENGTH = 15; // Use a simple incremental unique id for the display + for (var j = 0; j < this.n; ++j) this.C[i][j] -= minval; + } - var idDisplay = 0; + return 2; + }; + /** + * Find a zero (Z) in the resulting matrix. If there is no starred + * zero in its row or column, star Z. Repeat for each element in the + * matrix. Go to Step 3. + */ - exports.ItemTracked = function (properties, frameNb, unMatchedFramesTolerance, fastDelete) { - var DEFAULT_UNMATCHEDFRAMES_TOLERANCE = unMatchedFramesTolerance; - var itemTracked = {}; // ==== Private ===== - // Am I available to be matched? - itemTracked.available = true; // Should I be deleted? + Munkres.prototype.__step2 = function () { + for (var i = 0; i < this.n; ++i) { + for (var j = 0; j < this.n; ++j) { + if (this.C[i][j] === 0 && !this.col_covered[j] && !this.row_covered[i]) { + this.marked[i][j] = 1; + this.col_covered[j] = true; + this.row_covered[i] = true; + break; + } + } + } - itemTracked["delete"] = false; - itemTracked.fastDelete = fastDelete; // How many unmatched frame should I survive? + this.__clear_covers(); - itemTracked.frameUnmatchedLeftBeforeDying = unMatchedFramesTolerance; - itemTracked.isZombie = false; - itemTracked.appearFrame = frameNb; - itemTracked.disappearFrame = null; - itemTracked.disappearArea = {}; // Keep track of the most counted class + return 3; + }; + /** + * Cover each column containing a starred zero. If K columns are + * covered, the starred zeros describe a complete set of unique + * assignments. In this case, Go to DONE, otherwise, Go to Step 4. + */ - itemTracked.nameCount = {}; - itemTracked.nameCount[properties.name] = 1; // ==== Public ===== - itemTracked.x = properties.x; - itemTracked.y = properties.y; - itemTracked.w = properties.w; - itemTracked.h = properties.h; - itemTracked.name = properties.name; - itemTracked.confidence = properties.confidence; - itemTracked.itemHistory = []; - itemTracked.itemHistory.push({ - x: properties.x, - y: properties.y, - w: properties.w, - h: properties.h, - confidence: properties.confidence - }); + Munkres.prototype.__step3 = function () { + var count = 0; - if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { - itemTracked.itemHistory.shift(); + for (var i = 0; i < this.n; ++i) { + for (var j = 0; j < this.n; ++j) { + if (this.marked[i][j] == 1 && this.col_covered[j] == false) { + this.col_covered[j] = true; + ++count; + } + } } - itemTracked.velocity = { - dx: 0, - dy: 0 - }; - itemTracked.nbTimeMatched = 1; // Assign an unique id to each Item tracked + return count >= this.n ? 7 : 4; + }; + /** + * Find a noncovered zero and prime it. If there is no starred zero + * in the row containing this primed zero, Go to Step 5. Otherwise, + * cover this row and uncover the column containing the starred + * zero. Continue in this manner until there are no uncovered zeros + * left. Save the smallest uncovered value and Go to Step 6. + */ - itemTracked.id = uuidv4(); // Use an simple id for the display and debugging - itemTracked.idDisplay = idDisplay; - idDisplay++; // Give me a new location / size + Munkres.prototype.__step4 = function () { + var done = false; + var row = -1, + col = -1, + star_col = -1; + + while (!done) { + var z = this.__find_a_zero(); + + row = z[0]; + col = z[1]; + if (row < 0) return 6; + this.marked[row][col] = 2; + star_col = this.__find_star_in_row(row); - itemTracked.update = function (properties, frameNb) { - // if it was zombie and disappear frame was set, reset it to null - if (this.disappearFrame) { - this.disappearFrame = null; - this.disappearArea = {}; + if (star_col >= 0) { + col = star_col; + this.row_covered[row] = true; + this.col_covered[col] = false; + } else { + this.Z0_r = row; + this.Z0_c = col; + return 5; } + } + }; + /** + * Construct a series of alternating primed and starred zeros as + * follows. Let Z0 represent the uncovered primed zero found in Step 4. + * Let Z1 denote the starred zero in the column of Z0 (if any). + * Let Z2 denote the primed zero in the row of Z1 (there will always + * be one). Continue until the series terminates at a primed zero + * that has no starred zero in its column. Unstar each starred zero + * of the series, star each primed zero of the series, erase all + * primes and uncover every line in the matrix. Return to Step 3 + */ - this.isZombie = false; - this.nbTimeMatched += 1; - this.x = properties.x; - this.y = properties.y; - this.w = properties.w; - this.h = properties.h; - this.confidence = properties.confidence; - this.itemHistory.push({ - x: this.x, - y: this.y, - w: this.w, - h: this.h, - confidence: this.confidence - }); - if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { - itemTracked.itemHistory.shift(); - } + Munkres.prototype.__step5 = function () { + var count = 0; + this.path[count][0] = this.Z0_r; + this.path[count][1] = this.Z0_c; + var done = false; - this.name = properties.name; + while (!done) { + var row = this.__find_star_in_col(this.path[count][1]); - if (this.nameCount[properties.name]) { - this.nameCount[properties.name]++; + if (row >= 0) { + count++; + this.path[count][0] = row; + this.path[count][1] = this.path[count - 1][1]; } else { - this.nameCount[properties.name] = 1; - } // Reset dying counter - + done = true; + } - this.frameUnmatchedLeftBeforeDying = DEFAULT_UNMATCHEDFRAMES_TOLERANCE; // Compute new velocityVector based on last positions history + if (!done) { + var col = this.__find_prime_in_row(this.path[count][0]); - this.velocity = this.updateVelocityVector(); - }; + count++; + this.path[count][0] = this.path[count - 1][0]; + this.path[count][1] = col; + } + } - itemTracked.makeAvailable = function () { - this.available = true; - return this; - }; + this.__convert_path(this.path, count); - itemTracked.makeUnavailable = function () { - this.available = false; - return this; - }; + this.__clear_covers(); - itemTracked.countDown = function (frameNb) { - // Set frame disappear number - if (this.disappearFrame === null) { - this.disappearFrame = frameNb; - this.disappearArea = { - x: this.x, - y: this.y, - w: this.w, - h: this.h - }; - } + this.__erase_primes(); - this.frameUnmatchedLeftBeforeDying--; - this.isZombie = true; // If it was matched less than 1 time, it should die quick + return 3; + }; + /** + * Add the value found in Step 4 to every element of each covered + * row, and subtract it from every element of each uncovered column. + * Return to Step 4 without altering any stars, primes, or covered + * lines. + */ - if (this.fastDelete && this.nbTimeMatched <= 1) { - this.frameUnmatchedLeftBeforeDying = -1; - } - }; - itemTracked.updateTheoricalPositionAndSize = function () { - this.itemHistory.push({ - x: this.x, - y: this.y, - w: this.w, - h: this.h, - confidence: this.confidence - }); + Munkres.prototype.__step6 = function () { + var minval = this.__find_smallest(); - if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { - itemTracked.itemHistory.shift(); + for (var i = 0; i < this.n; ++i) { + for (var j = 0; j < this.n; ++j) { + if (this.row_covered[i]) this.C[i][j] += minval; + if (!this.col_covered[j]) this.C[i][j] -= minval; } + } - this.x += this.velocity.dx; - this.y += this.velocity.dy; - }; + return 4; + }; + /** + * Find the smallest uncovered value in the matrix. + * + * @return {Number} The smallest uncovered value, or MAX_SIZE if no value was found + */ - itemTracked.predictNextPosition = function () { - return { - x: this.x + this.velocity.dx, - y: this.y + this.velocity.dy, - w: this.w, - h: this.h - }; - }; - itemTracked.isDead = function () { - return this.frameUnmatchedLeftBeforeDying < 0; - }; // Velocity vector based on the last 15 frames + Munkres.prototype.__find_smallest = function () { + var minval = MAX_SIZE; + for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (!this.row_covered[i] && !this.col_covered[j]) if (minval > this.C[i][j]) minval = this.C[i][j]; - itemTracked.updateVelocityVector = function () { - if (exports.ITEM_HISTORY_MAX_LENGTH <= 2) { - return { - dx: undefined, - dy: undefined - }; - } + return minval; + }; + /** + * Find the first uncovered element with value 0. + * + * @return {Array} The indices of the found element or [-1, -1] if not found + */ - if (this.itemHistory.length <= exports.ITEM_HISTORY_MAX_LENGTH) { - var _start = this.itemHistory[0]; - var _end = this.itemHistory[this.itemHistory.length - 1]; - return computeVelocityVector(_start, _end, this.itemHistory.length); - } - var start = this.itemHistory[this.itemHistory.length - exports.ITEM_HISTORY_MAX_LENGTH]; - var end = this.itemHistory[this.itemHistory.length - 1]; - return computeVelocityVector(start, end, exports.ITEM_HISTORY_MAX_LENGTH); - }; + Munkres.prototype.__find_a_zero = function () { + for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.C[i][j] === 0 && !this.row_covered[i] && !this.col_covered[j]) return [i, j]; - itemTracked.getMostlyMatchedName = function () { - var _this = this; + return [-1, -1]; + }; + /** + * Find the first starred element in the specified row. Returns + * the column index, or -1 if no starred element was found. + * + * @param {Number} row The index of the row to search + * @return {Number} + */ - var nameMostlyMatchedOccurences = 0; - var nameMostlyMatched = ''; - Object.keys(this.nameCount).map(function (name) { - if (_this.nameCount[name] > nameMostlyMatchedOccurences) { - nameMostlyMatched = name; - nameMostlyMatchedOccurences = _this.nameCount[name]; - } - }); - return nameMostlyMatched; - }; - itemTracked.toJSONDebug = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - return { - id: this.id, - idDisplay: this.idDisplay, - x: roundInt ? parseInt(this.x, 10) : this.x, - y: roundInt ? parseInt(this.y, 10) : this.y, - w: roundInt ? parseInt(this.w, 10) : this.w, - h: roundInt ? parseInt(this.h, 10) : this.h, - confidence: Math.round(this.confidence * 100) / 100, - // Here we negate dy to be in "normal" carthesian coordinates - bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy)), - name: this.getMostlyMatchedName(), - isZombie: this.isZombie, - appearFrame: this.appearFrame, - disappearFrame: this.disappearFrame - }; - }; + Munkres.prototype.__find_star_in_row = function (row) { + for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 1) return j; - itemTracked.toJSON = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - return { - id: this.idDisplay, - x: roundInt ? parseInt(this.x, 10) : this.x, - y: roundInt ? parseInt(this.y, 10) : this.y, - w: roundInt ? parseInt(this.w, 10) : this.w, - h: roundInt ? parseInt(this.h, 10) : this.h, - confidence: Math.round(this.confidence * 100) / 100, - // Here we negate dy to be in "normal" carthesian coordinates - bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy), 10), - name: this.getMostlyMatchedName(), - isZombie: this.isZombie - }; - }; + return -1; + }; + /** + * Find the first starred element in the specified column. + * + * @return {Number} The row index, or -1 if no starred element was found + */ - itemTracked.toMOT = function (frameIndex) { - return "".concat(frameIndex, ",").concat(this.idDisplay, ",").concat(this.x - this.w / 2, ",").concat(this.y - this.h / 2, ",").concat(this.w, ",").concat(this.h, ",").concat(this.confidence / 100, ",-1,-1,-1"); - }; - itemTracked.toJSONGenericInfo = function () { - return { - id: this.id, - idDisplay: this.idDisplay, - appearFrame: this.appearFrame, - disappearFrame: this.disappearFrame, - disappearArea: this.disappearArea, - nbActiveFrame: this.disappearFrame - this.appearFrame, - name: this.getMostlyMatchedName() - }; - }; + Munkres.prototype.__find_star_in_col = function (col) { + for (var i = 0; i < this.n; ++i) if (this.marked[i][col] == 1) return i; - return itemTracked; + return -1; }; + /** + * Find the first prime element in the specified row. + * + * @return {Number} The column index, or -1 if no prime element was found + */ - exports.reset = function () { - idDisplay = 0; + + Munkres.prototype.__find_prime_in_row = function (row) { + for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 2) return j; + + return -1; }; - })(ItemTracked$1); - var kdTreeMin = {}; + Munkres.prototype.__convert_path = function (path, count) { + for (var i = 0; i <= count; ++i) this.marked[path[i][0]][path[i][1]] = this.marked[path[i][0]][path[i][1]] == 1 ? 0 : 1; + }; + /** Clear all covered matrix cells */ - /** - * k-d Tree JavaScript - V 1.01 - * - * https://github.com/ubilabs/kd-tree-javascript - * - * @author Mircea Pricop , 2012 - * @author Martin Kleppe , 2012 - * @author Ubilabs http://ubilabs.net, 2012 - * @license MIT License - */ - (function (exports) { - !function (t, n) { - n(exports ); - }(commonjsGlobal, function (t) { - function n(t, n, o) { - this.obj = t, this.left = null, this.right = null, this.parent = o, this.dimension = n; + Munkres.prototype.__clear_covers = function () { + for (var i = 0; i < this.n; ++i) { + this.row_covered[i] = false; + this.col_covered[i] = false; } + }; + /** Erase all prime markings */ - function o(t) { - this.content = [], this.scoreFunction = t; - } - o.prototype = { - push: function (t) { - this.content.push(t), this.bubbleUp(this.content.length - 1); - }, - pop: function () { - var t = this.content[0], - n = this.content.pop(); - return this.content.length > 0 && (this.content[0] = n, this.sinkDown(0)), t; - }, - peek: function () { - return this.content[0]; - }, - remove: function (t) { - for (var n = this.content.length, o = 0; o < n; o++) if (this.content[o] == t) { - var i = this.content.pop(); - return void (o != n - 1 && (this.content[o] = i, this.scoreFunction(i) < this.scoreFunction(t) ? this.bubbleUp(o) : this.sinkDown(o))); - } + Munkres.prototype.__erase_primes = function () { + for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.marked[i][j] == 2) this.marked[i][j] = 0; + }; // --------------------------------------------------------------------------- + // Functions + // --------------------------------------------------------------------------- - throw new Error("Node not found."); - }, - size: function () { - return this.content.length; - }, - bubbleUp: function (t) { - for (var n = this.content[t]; t > 0;) { - var o = Math.floor((t + 1) / 2) - 1, - i = this.content[o]; - if (!(this.scoreFunction(n) < this.scoreFunction(i))) break; - this.content[o] = n, this.content[t] = i, t = o; - } - }, - sinkDown: function (t) { - for (var n = this.content.length, o = this.content[t], i = this.scoreFunction(o);;) { - var e = 2 * (t + 1), - r = e - 1, - l = null; + /** + * Create a cost matrix from a profit matrix by calling + * 'inversion_function' to invert each value. The inversion + * function must take one numeric argument (of any type) and return + * another numeric argument which is presumed to be the cost inverse + * of the original profit. + * + * This is a static method. Call it like this: + * + * cost_matrix = make_cost_matrix(matrix[, inversion_func]); + * + * For example: + * + * cost_matrix = make_cost_matrix(matrix, function(x) { return MAXIMUM - x; }); + * + * @param {Array} profit_matrix An array of arrays representing the matrix + * to convert from a profit to a cost matrix + * @param {Function} [inversion_function] The function to use to invert each + * entry in the profit matrix + * + * @return {Array} The converted matrix + */ - if (r < n) { - var u = this.content[r], - h = this.scoreFunction(u); - h < i && (l = r); - } - if (e < n) { - var s = this.content[e]; - this.scoreFunction(s) < (null == l ? i : h) && (l = e); - } + function make_cost_matrix(profit_matrix, inversion_function) { + var i, j; - if (null == l) break; - this.content[t] = this.content[l], this.content[l] = o, t = l; - } - } - }, t.kdTree = function (t, i, e) { - function r(t, o, i) { - var l, - u, - h = o % e.length; - return 0 === t.length ? null : 1 === t.length ? new n(t[0], h, i) : (t.sort(function (t, n) { - return t[e[h]] - n[e[h]]; - }), l = Math.floor(t.length / 2), u = new n(t[l], h, i), u.left = r(t.slice(0, l), o + 1, u), u.right = r(t.slice(l + 1), o + 1, u), u); - } + if (!inversion_function) { + var maximum = -1.0 / 0.0; - var l = this; - Array.isArray(t) ? this.root = r(t, 0, null) : function (t) { - function n(t) { - t.left && (t.left.parent = t, n(t.left)), t.right && (t.right.parent = t, n(t.right)); - } + for (i = 0; i < profit_matrix.length; ++i) for (j = 0; j < profit_matrix[i].length; ++j) if (profit_matrix[i][j] > maximum) maximum = profit_matrix[i][j]; - l.root = t, n(l.root); - }(t), this.toJSON = function (t) { - t || (t = this.root); - var o = new n(t.obj, t.dimension, null); - return t.left && (o.left = l.toJSON(t.left)), t.right && (o.right = l.toJSON(t.right)), o; - }, this.insert = function (t) { - function o(n, i) { - if (null === n) return i; - var r = e[n.dimension]; - return t[r] < n.obj[r] ? o(n.left, n) : o(n.right, n); - } + inversion_function = function (x) { + return maximum - x; + }; + } - var i, - r, - l = o(this.root, null); - null !== l ? (i = new n(t, (l.dimension + 1) % e.length, l), r = e[l.dimension], t[r] < l.obj[r] ? l.left = i : l.right = i) : this.root = new n(t, 0, null); - }, this.remove = function (t) { - function n(o) { - if (null === o) return null; - if (o.obj === t) return o; - var i = e[o.dimension]; - return t[i] < o.obj[i] ? n(o.left) : n(o.right); - } + var cost_matrix = []; - function o(t) { - function n(t, o) { - var i, r, l, u, h; - return null === t ? null : (i = e[o], t.dimension === o ? null !== t.left ? n(t.left, o) : t : (r = t.obj[i], l = n(t.left, o), u = n(t.right, o), h = t, null !== l && l.obj[i] < r && (h = l), null !== u && u.obj[i] < h.obj[i] && (h = u), h)); - } + for (i = 0; i < profit_matrix.length; ++i) { + var row = profit_matrix[i]; + cost_matrix[i] = []; - var i, r, u; - if (null === t.left && null === t.right) return null === t.parent ? void (l.root = null) : (u = e[t.parent.dimension], void (t.obj[u] < t.parent.obj[u] ? t.parent.left = null : t.parent.right = null)); - null !== t.right ? (r = (i = n(t.right, t.dimension)).obj, o(i), t.obj = r) : (r = (i = n(t.left, t.dimension)).obj, o(i), t.right = t.left, t.left = null, t.obj = r); - } + for (j = 0; j < row.length; ++j) cost_matrix[i][j] = inversion_function(profit_matrix[i][j]); + } - var i; - null !== (i = n(l.root)) && o(i); - }, this.nearest = function (t, n, r) { - function u(o) { - function r(t, o) { - f.push([t, o]), f.size() > n && f.pop(); - } + return cost_matrix; + } + /** + * Convenience function: Converts the contents of a matrix of integers + * to a printable string. + * + * @param {Array} matrix The matrix to print + * + * @return {String} The formatted matrix + */ - var l, - h, - s, - c, - a = e[o.dimension], - g = i(t, o.obj), - p = {}; - for (c = 0; c < e.length; c += 1) c === o.dimension ? p[e[c]] = t[e[c]] : p[e[c]] = o.obj[e[c]]; + function format_matrix(matrix) { + var columnWidths = []; + var i, j; - h = i(p, o.obj), null !== o.right || null !== o.left ? (u(l = null === o.right ? o.left : null === o.left ? o.right : t[a] < o.obj[a] ? o.left : o.right), (f.size() < n || g < f.peek()[1]) && r(o, g), (f.size() < n || Math.abs(h) < f.peek()[1]) && null !== (s = l === o.left ? o.right : o.left) && u(s)) : (f.size() < n || g < f.peek()[1]) && r(o, g); - } + for (i = 0; i < matrix.length; ++i) { + for (j = 0; j < matrix[i].length; ++j) { + var entryWidth = String(matrix[i][j]).length; + if (!columnWidths[j] || entryWidth >= columnWidths[j]) columnWidths[j] = entryWidth; + } + } - var h, s, f; - if (f = new o(function (t) { - return -t[1]; - }), r) for (h = 0; h < n; h += 1) f.push([null, r]); + var formatted = ''; - for (l.root && u(l.root), s = [], h = 0; h < Math.min(n, f.content.length); h += 1) f.content[h][0] && s.push([f.content[h][0].obj, f.content[h][1]]); + for (i = 0; i < matrix.length; ++i) { + for (j = 0; j < matrix[i].length; ++j) { + var s = String(matrix[i][j]); // pad at front with spaces - return s; - }, this.balanceFactor = function () { - function t(n) { - return null === n ? 0 : Math.max(t(n.left), t(n.right)) + 1; - } + while (s.length < columnWidths[j]) s = ' ' + s; - function n(t) { - return null === t ? 0 : n(t.left) + n(t.right) + 1; - } + formatted += s; // separate columns + + if (j != matrix[i].length - 1) formatted += ' '; + } + + if (i != matrix[i].length - 1) formatted += '\n'; + } + + return formatted; + } // --------------------------------------------------------------------------- + // Exports + // --------------------------------------------------------------------------- + + + function computeMunkres(cost_matrix, options) { + var m = new Munkres(); + return m.compute(cost_matrix, options); + } + + computeMunkres.version = "1.2.2"; + computeMunkres.format_matrix = format_matrix; + computeMunkres.make_cost_matrix = make_cost_matrix; + computeMunkres.Munkres = Munkres; // backwards compatibility - return t(l.root) / (Math.log(n(l.root)) / Math.log(2)); - }; - }, t.BinaryHeap = o; - }); - })(kdTreeMin); + if (module.exports) { + module.exports = computeMunkres; + } + })(munkres$1); var lodash_isequal = {exports: {}}; @@ -2573,741 +2791,513 @@ var Tracker = (function (exports) { * @returns {Array} Returns the new empty array. * @example * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ - - - function stubArray() { - return []; - } - /** - * This method returns `false`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `false`. - * @example - * - * _.times(2, _.stubFalse); - * // => [false, false] - */ - - - function stubFalse() { - return false; - } - - module.exports = isEqual; - })(lodash_isequal, lodash_isequal.exports); - - var munkres$1 = {exports: {}}; - - /** - * Introduction - * ============ - * - * The Munkres module provides an implementation of the Munkres algorithm - * (also called the Hungarian algorithm or the Kuhn-Munkres algorithm), - * useful for solving the Assignment Problem. - * - * Assignment Problem - * ================== - * - * Let C be an n×n-matrix representing the costs of each of n workers - * to perform any of n jobs. The assignment problem is to assign jobs to - * workers in a way that minimizes the total cost. Since each worker can perform - * only one job and each job can be assigned to only one worker the assignments - * represent an independent set of the matrix C. - * - * One way to generate the optimal set is to create all permutations of - * the indices necessary to traverse the matrix so that no row and column - * are used more than once. For instance, given this matrix (expressed in - * Python) - * - * matrix = [[5, 9, 1], - * [10, 3, 2], - * [8, 7, 4]] - * - * You could use this code to generate the traversal indices:: - * - * def permute(a, results): - * if len(a) == 1: - * results.insert(len(results), a) - * - * else: - * for i in range(0, len(a)): - * element = a[i] - * a_copy = [a[j] for j in range(0, len(a)) if j != i] - * subresults = [] - * permute(a_copy, subresults) - * for subresult in subresults: - * result = [element] + subresult - * results.insert(len(results), result) - * - * results = [] - * permute(range(len(matrix)), results) # [0, 1, 2] for a 3x3 matrix - * - * After the call to permute(), the results matrix would look like this:: - * - * [[0, 1, 2], - * [0, 2, 1], - * [1, 0, 2], - * [1, 2, 0], - * [2, 0, 1], - * [2, 1, 0]] - * - * You could then use that index matrix to loop over the original cost matrix - * and calculate the smallest cost of the combinations - * - * n = len(matrix) - * minval = sys.maxsize - * for row in range(n): - * cost = 0 - * for col in range(n): - * cost += matrix[row][col] - * minval = min(cost, minval) - * - * print minval - * - * While this approach works fine for small matrices, it does not scale. It - * executes in O(n!) time: Calculating the permutations for an n×x-matrix - * requires n! operations. For a 12×12 matrix, that’s 479,001,600 - * traversals. Even if you could manage to perform each traversal in just one - * millisecond, it would still take more than 133 hours to perform the entire - * traversal. A 20×20 matrix would take 2,432,902,008,176,640,000 operations. At - * an optimistic millisecond per operation, that’s more than 77 million years. - * - * The Munkres algorithm runs in O(n³) time, rather than O(n!). This - * package provides an implementation of that algorithm. - * - * This version is based on - * http://csclab.murraystate.edu/~bob.pilgrim/445/munkres.html - * - * This version was originally written for Python by Brian Clapper from the - * algorithm at the above web site (The ``Algorithm::Munkres`` Perl version, - * in CPAN, was clearly adapted from the same web site.) and ported to - * JavaScript by Anna Henningsen (addaleax). - * - * Usage - * ===== - * - * Construct a Munkres object - * - * var m = new Munkres(); - * - * Then use it to compute the lowest cost assignment from a cost matrix. Here’s - * a sample program - * - * var matrix = [[5, 9, 1], - * [10, 3, 2], - * [8, 7, 4]]; - * var m = new Munkres(); - * var indices = m.compute(matrix); - * console.log(format_matrix(matrix), 'Lowest cost through this matrix:'); - * var total = 0; - * for (var i = 0; i < indices.length; ++i) { - * var row = indices[l][0], col = indices[l][1]; - * var value = matrix[row][col]; - * total += value; - * - * console.log('(' + rol + ', ' + col + ') -> ' + value); - * } - * - * console.log('total cost:', total); - * - * Running that program produces:: - * - * Lowest cost through this matrix: - * [5, 9, 1] - * [10, 3, 2] - * [8, 7, 4] - * (0, 0) -> 5 - * (1, 1) -> 3 - * (2, 2) -> 4 - * total cost: 12 - * - * The instantiated Munkres object can be used multiple times on different - * matrices. - * - * Non-square Cost Matrices - * ======================== - * - * The Munkres algorithm assumes that the cost matrix is square. However, it's - * possible to use a rectangular matrix if you first pad it with 0 values to make - * it square. This module automatically pads rectangular cost matrices to make - * them square. - * - * Notes: - * - * - The module operates on a *copy* of the caller's matrix, so any padding will - * not be seen by the caller. - * - The cost matrix must be rectangular or square. An irregular matrix will - * *not* work. - * - * Calculating Profit, Rather than Cost - * ==================================== - * - * The cost matrix is just that: A cost matrix. The Munkres algorithm finds - * the combination of elements (one from each row and column) that results in - * the smallest cost. It’s also possible to use the algorithm to maximize - * profit. To do that, however, you have to convert your profit matrix to a - * cost matrix. The simplest way to do that is to subtract all elements from a - * large value. - * - * The ``munkres`` module provides a convenience method for creating a cost - * matrix from a profit matrix, i.e. make_cost_matrix. - * - * References - * ========== - * - * 1. http://www.public.iastate.edu/~ddoty/HungarianAlgorithm.html - * - * 2. Harold W. Kuhn. The Hungarian Method for the assignment problem. - * *Naval Research Logistics Quarterly*, 2:83-97, 1955. - * - * 3. Harold W. Kuhn. Variants of the Hungarian method for assignment - * problems. *Naval Research Logistics Quarterly*, 3: 253-258, 1956. - * - * 4. Munkres, J. Algorithms for the Assignment and Transportation Problems. - * *Journal of the Society of Industrial and Applied Mathematics*, - * 5(1):32-38, March, 1957. - * - * 5. https://en.wikipedia.org/wiki/Hungarian_algorithm - * - * Copyright and License - * ===================== - * - * Copyright 2008-2016 Brian M. Clapper - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - (function (module) { - /** - * A very large numerical value which can be used like an integer - * (i. e., adding integers of similar size does not result in overflow). - */ - var MAX_SIZE = parseInt(Number.MAX_SAFE_INTEGER / 2) || (1 << 26) * (1 << 26); - /** - * A default value to pad the cost matrix with if it is not quadratic. - */ - - var DEFAULT_PAD_VALUE = 0; // --------------------------------------------------------------------------- - // Classes - // --------------------------------------------------------------------------- - - /** - * Calculate the Munkres solution to the classical assignment problem. - * See the module documentation for usage. - * @constructor + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false */ - function Munkres() { - this.C = null; - this.row_covered = []; - this.col_covered = []; - this.n = 0; - this.Z0_r = 0; - this.Z0_c = 0; - this.marked = null; - this.path = null; + + function stubArray() { + return []; } /** - * Pad a possibly non-square matrix to make it square. + * This method returns `false`. * - * @param {Array} matrix An array of arrays containing the matrix cells - * @param {Number} [pad_value] The value used to pad a rectangular matrix + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example * - * @return {Array} An array of arrays representing the padded matrix + * _.times(2, _.stubFalse); + * // => [false, false] */ - Munkres.prototype.pad_matrix = function (matrix, pad_value) { - pad_value = pad_value || DEFAULT_PAD_VALUE; - var max_columns = 0; - var total_rows = matrix.length; - var i; + function stubFalse() { + return false; + } - for (i = 0; i < total_rows; ++i) if (matrix[i].length > max_columns) max_columns = matrix[i].length; + module.exports = isEqual; + })(lodash_isequal, lodash_isequal.exports); - total_rows = max_columns > total_rows ? max_columns : total_rows; - var new_matrix = []; + var utils = {}; - for (i = 0; i < total_rows; ++i) { - var row = matrix[i] || []; - var new_row = row.slice(); // If this row is too short, pad it + utils.isDetectionTooLarge = function (detections, largestAllowed) { + return detections.w >= largestAllowed; + }; - while (total_rows > new_row.length) new_row.push(pad_value); + var isInsideArea = function isInsideArea(area, point) { + var xMin = area.x - area.w / 2; + var xMax = area.x + area.w / 2; + var yMin = area.y - area.h / 2; + var yMax = area.y + area.h / 2; + return point.x >= xMin && point.x <= xMax && point.y >= yMin && point.y <= yMax; + }; - new_matrix.push(new_row); - } + utils.isInsideArea = isInsideArea; - return new_matrix; - }; - /** - * Compute the indices for the lowest-cost pairings between rows and columns - * in the database. Returns a list of (row, column) tuples that can be used - * to traverse the matrix. - * - * **WARNING**: This code handles square and rectangular matrices. - * It does *not* handle irregular matrices. - * - * @param {Array} cost_matrix The cost matrix. If this cost matrix is not square, - * it will be padded with DEFAULT_PAD_VALUE. Optionally, - * the pad value can be specified via options.padValue. - * This method does *not* modify the caller's matrix. - * It operates on a copy of the matrix. - * @param {Object} [options] Additional options to pass in - * @param {Number} [options.padValue] The value to use to pad a rectangular cost_matrix - * - * @return {Array} An array of ``(row, column)`` arrays that describe the lowest - * cost path through the matrix - */ + utils.isInsideSomeAreas = function (areas, point) { + return areas.some(function (area) { + return isInsideArea(area, point); + }); + }; + utils.ignoreObjectsNotToDetect = function (detections, objectsToDetect) { + return detections.filter(function (detection) { + return objectsToDetect.indexOf(detection.name) > -1; + }); + }; - Munkres.prototype.compute = function (cost_matrix, options) { - options = options || {}; - options.padValue = options.padValue || DEFAULT_PAD_VALUE; - this.C = this.pad_matrix(cost_matrix, options.padValue); - this.n = this.C.length; - this.original_length = cost_matrix.length; - this.original_width = cost_matrix[0].length; - var nfalseArray = []; - /* array of n false values */ + var getRectangleEdges = function getRectangleEdges(item) { + return { + x0: item.x - item.w / 2, + y0: item.y - item.h / 2, + x1: item.x + item.w / 2, + y1: item.y + item.h / 2 + }; + }; - while (nfalseArray.length < this.n) nfalseArray.push(false); + utils.getRectangleEdges = getRectangleEdges; - this.row_covered = nfalseArray.slice(); - this.col_covered = nfalseArray.slice(); - this.Z0_r = 0; - this.Z0_c = 0; - this.path = this.__make_matrix(this.n * 2, 0); - this.marked = this.__make_matrix(this.n, 0); - var step = 1; - var steps = { - 1: this.__step1, - 2: this.__step2, - 3: this.__step3, - 4: this.__step4, - 5: this.__step5, - 6: this.__step6 - }; + utils.iouAreas = function (item1, item2) { + var rect1 = getRectangleEdges(item1); + var rect2 = getRectangleEdges(item2); // Get overlap rectangle - while (true) { - var func = steps[step]; - if (!func) // done - break; - step = func.apply(this); - } + var overlap_x0 = Math.max(rect1.x0, rect2.x0); + var overlap_y0 = Math.max(rect1.y0, rect2.y0); + var overlap_x1 = Math.min(rect1.x1, rect2.x1); + var overlap_y1 = Math.min(rect1.y1, rect2.y1); // if there are an overlap - var results = []; + if (overlap_x1 - overlap_x0 <= 0 || overlap_y1 - overlap_y0 <= 0) { + // no overlap + return 0; + } - for (var i = 0; i < this.original_length; ++i) for (var j = 0; j < this.original_width; ++j) if (this.marked[i][j] == 1) results.push([i, j]); + var area_rect1 = item1.w * item1.h; + var area_rect2 = item2.w * item2.h; + var area_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0); + var area_union = area_rect1 + area_rect2 - area_intersection; + return area_intersection / area_union; + }; - return results; + utils.computeVelocityVector = function (item1, item2, nbFrame) { + return { + dx: (item2.x - item1.x) / nbFrame, + dy: (item2.y - item1.y) / nbFrame }; - /** - * Create an n×n matrix, populating it with the specific value. - * - * @param {Number} n Matrix dimensions - * @param {Number} val Value to populate the matrix with - * - * @return {Array} An array of arrays representing the newly created matrix - */ - + }; + /* - Munkres.prototype.__make_matrix = function (n, val) { - var matrix = []; + computeBearingIn360 - for (var i = 0; i < n; ++i) { - matrix[i] = []; + dY - for (var j = 0; j < n; ++j) matrix[i][j] = val; - } + ^ XX + | XXX + | XX + | XX + | XX + | XXX + | XX + | XX + | XX bearing = this angle in degree + | XX + |XX + +----------------------XX-----------------------> dX + | + | + | + | + | + | + | + | + | + | + | + + - return matrix; - }; - /** - * For each row of the matrix, find the smallest element and - * subtract it from every element in its row. Go to Step 2. - */ + */ - Munkres.prototype.__step1 = function () { - for (var i = 0; i < this.n; ++i) { - // Find the minimum value for this row and subtract that minimum - // from every element in the row. - var minval = Math.min.apply(Math, this.C[i]); + utils.computeBearingIn360 = function (dx, dy) { + var angle = Math.atan(dx / dy) / (Math.PI / 180); - for (var j = 0; j < this.n; ++j) this.C[i][j] -= minval; + if (angle > 0) { + if (dy > 0) { + return angle; } - return 2; - }; - /** - * Find a zero (Z) in the resulting matrix. If there is no starred - * zero in its row or column, star Z. Repeat for each element in the - * matrix. Go to Step 3. - */ + return 180 + angle; + } + if (dx > 0) { + return 180 + angle; + } - Munkres.prototype.__step2 = function () { - for (var i = 0; i < this.n; ++i) { - for (var j = 0; j < this.n; ++j) { - if (this.C[i][j] === 0 && !this.col_covered[j] && !this.row_covered[i]) { - this.marked[i][j] = 1; - this.col_covered[j] = true; - this.row_covered[i] = true; - break; - } - } - } + return 360 + angle; + }; - this.__clear_covers(); + var ItemTracked$1 = {}; - return 3; - }; - /** - * Cover each column containing a starred zero. If K columns are - * covered, the starred zeros describe a complete set of unique - * assignments. In this case, Go to DONE, otherwise, Go to Step 4. - */ + var rngBrowser = {exports: {}}; + + // browser this is a little complicated due to unknown quality of Math.random() + // and inconsistent support for the `crypto` API. We do the best we can via + // feature-detection + // getRandomValues needs to be invoked in a context where "this" is a Crypto + // implementation. Also, find the complete implementation of crypto on IE11. + var getRandomValues = typeof crypto != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto); - Munkres.prototype.__step3 = function () { - var count = 0; + if (getRandomValues) { + // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto + var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef - for (var i = 0; i < this.n; ++i) { - for (var j = 0; j < this.n; ++j) { - if (this.marked[i][j] == 1 && this.col_covered[j] == false) { - this.col_covered[j] = true; - ++count; - } - } + rngBrowser.exports = function whatwgRNG() { + getRandomValues(rnds8); + return rnds8; + }; + } else { + // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). It's fast, but is of unspecified + // quality. + var rnds = new Array(16); + + rngBrowser.exports = function mathRNG() { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) r = Math.random() * 0x100000000; + rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; } - return count >= this.n ? 7 : 4; + return rnds; }; - /** - * Find a noncovered zero and prime it. If there is no starred zero - * in the row containing this primed zero, Go to Step 5. Otherwise, - * cover this row and uncover the column containing the starred - * zero. Continue in this manner until there are no uncovered zeros - * left. Save the smallest uncovered value and Go to Step 6. - */ + } + /** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ + var byteToHex = []; - Munkres.prototype.__step4 = function () { - var done = false; - var row = -1, - col = -1, - star_col = -1; + for (var i = 0; i < 256; ++i) { + byteToHex[i] = (i + 0x100).toString(16).substr(1); + } - while (!done) { - var z = this.__find_a_zero(); + function bytesToUuid$1(buf, offset) { + var i = offset || 0; + var bth = byteToHex; // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 - row = z[0]; - col = z[1]; - if (row < 0) return 6; - this.marked[row][col] = 2; - star_col = this.__find_star_in_row(row); + return [bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]]].join(''); + } - if (star_col >= 0) { - col = star_col; - this.row_covered[row] = true; - this.col_covered[col] = false; - } else { - this.Z0_r = row; - this.Z0_c = col; - return 5; - } - } - }; - /** - * Construct a series of alternating primed and starred zeros as - * follows. Let Z0 represent the uncovered primed zero found in Step 4. - * Let Z1 denote the starred zero in the column of Z0 (if any). - * Let Z2 denote the primed zero in the row of Z1 (there will always - * be one). Continue until the series terminates at a primed zero - * that has no starred zero in its column. Unstar each starred zero - * of the series, star each primed zero of the series, erase all - * primes and uncover every line in the matrix. Return to Step 3 - */ + var bytesToUuid_1 = bytesToUuid$1; + var rng = rngBrowser.exports; + var bytesToUuid = bytesToUuid_1; - Munkres.prototype.__step5 = function () { - var count = 0; - this.path[count][0] = this.Z0_r; - this.path[count][1] = this.Z0_c; - var done = false; + function v4(options, buf, offset) { + var i = buf && offset || 0; - while (!done) { - var row = this.__find_star_in_col(this.path[count][1]); + if (typeof options == 'string') { + buf = options === 'binary' ? new Array(16) : null; + options = null; + } - if (row >= 0) { - count++; - this.path[count][0] = row; - this.path[count][1] = this.path[count - 1][1]; - } else { - done = true; - } + options = options || {}; + var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - if (!done) { - var col = this.__find_prime_in_row(this.path[count][0]); + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided - count++; - this.path[count][0] = this.path[count - 1][0]; - this.path[count][1] = col; - } + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; } + } - this.__convert_path(this.path, count); - - this.__clear_covers(); - - this.__erase_primes(); + return buf || bytesToUuid(rnds); + } - return 3; - }; - /** - * Add the value found in Step 4 to every element of each covered - * row, and subtract it from every element of each uncovered column. - * Return to Step 4 without altering any stars, primes, or covered - * lines. - */ + var v4_1 = v4; + (function (exports) { + var uuidv4 = v4_1; + var computeBearingIn360 = utils.computeBearingIn360; + var computeVelocityVector = utils.computeVelocityVector; // Properties example + // { + // "x": 1021, + // "y": 65, + // "w": 34, + // "h": 27, + // "confidence": 26, + // "name": "car" + // } - Munkres.prototype.__step6 = function () { - var minval = this.__find_smallest(); + /** The maximum length of the item history. */ - for (var i = 0; i < this.n; ++i) { - for (var j = 0; j < this.n; ++j) { - if (this.row_covered[i]) this.C[i][j] += minval; - if (!this.col_covered[j]) this.C[i][j] -= minval; - } - } + exports.ITEM_HISTORY_MAX_LENGTH = 15; // Use a simple incremental unique id for the display - return 4; - }; - /** - * Find the smallest uncovered value in the matrix. - * - * @return {Number} The smallest uncovered value, or MAX_SIZE if no value was found - */ + var idDisplay = 0; + exports.ItemTracked = function (properties, frameNb, unMatchedFramesTolerance, fastDelete) { + var DEFAULT_UNMATCHEDFRAMES_TOLERANCE = unMatchedFramesTolerance; + var itemTracked = {}; // ==== Private ===== + // Am I available to be matched? - Munkres.prototype.__find_smallest = function () { - var minval = MAX_SIZE; + itemTracked.available = true; // Should I be deleted? - for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (!this.row_covered[i] && !this.col_covered[j]) if (minval > this.C[i][j]) minval = this.C[i][j]; + itemTracked["delete"] = false; + itemTracked.fastDelete = fastDelete; // How many unmatched frame should I survive? - return minval; - }; - /** - * Find the first uncovered element with value 0. - * - * @return {Array} The indices of the found element or [-1, -1] if not found - */ + itemTracked.frameUnmatchedLeftBeforeDying = unMatchedFramesTolerance; + itemTracked.isZombie = false; + itemTracked.appearFrame = frameNb; + itemTracked.disappearFrame = null; + itemTracked.disappearArea = {}; // Keep track of the most counted class + itemTracked.nameCount = {}; + itemTracked.nameCount[properties.name] = 1; // ==== Public ===== - Munkres.prototype.__find_a_zero = function () { - for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.C[i][j] === 0 && !this.row_covered[i] && !this.col_covered[j]) return [i, j]; + itemTracked.x = properties.x; + itemTracked.y = properties.y; + itemTracked.w = properties.w; + itemTracked.h = properties.h; + itemTracked.name = properties.name; + itemTracked.confidence = properties.confidence; + itemTracked.itemHistory = []; + itemTracked.itemHistory.push({ + x: properties.x, + y: properties.y, + w: properties.w, + h: properties.h, + confidence: properties.confidence + }); - return [-1, -1]; - }; - /** - * Find the first starred element in the specified row. Returns - * the column index, or -1 if no starred element was found. - * - * @param {Number} row The index of the row to search - * @return {Number} - */ + if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { + itemTracked.itemHistory.shift(); + } + itemTracked.velocity = { + dx: 0, + dy: 0 + }; + itemTracked.nbTimeMatched = 1; // Assign an unique id to each Item tracked - Munkres.prototype.__find_star_in_row = function (row) { - for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 1) return j; + itemTracked.id = uuidv4(); // Use an simple id for the display and debugging - return -1; - }; - /** - * Find the first starred element in the specified column. - * - * @return {Number} The row index, or -1 if no starred element was found - */ + itemTracked.idDisplay = idDisplay; + idDisplay++; // Give me a new location / size + itemTracked.update = function (properties, frameNb) { + // if it was zombie and disappear frame was set, reset it to null + if (this.disappearFrame) { + this.disappearFrame = null; + this.disappearArea = {}; + } - Munkres.prototype.__find_star_in_col = function (col) { - for (var i = 0; i < this.n; ++i) if (this.marked[i][col] == 1) return i; + this.isZombie = false; + this.nbTimeMatched += 1; + this.x = properties.x; + this.y = properties.y; + this.w = properties.w; + this.h = properties.h; + this.confidence = properties.confidence; + this.itemHistory.push({ + x: this.x, + y: this.y, + w: this.w, + h: this.h, + confidence: this.confidence + }); - return -1; - }; - /** - * Find the first prime element in the specified row. - * - * @return {Number} The column index, or -1 if no prime element was found - */ + if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { + itemTracked.itemHistory.shift(); + } + this.name = properties.name; - Munkres.prototype.__find_prime_in_row = function (row) { - for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 2) return j; + if (this.nameCount[properties.name]) { + this.nameCount[properties.name]++; + } else { + this.nameCount[properties.name] = 1; + } // Reset dying counter - return -1; - }; - Munkres.prototype.__convert_path = function (path, count) { - for (var i = 0; i <= count; ++i) this.marked[path[i][0]][path[i][1]] = this.marked[path[i][0]][path[i][1]] == 1 ? 0 : 1; - }; - /** Clear all covered matrix cells */ + this.frameUnmatchedLeftBeforeDying = DEFAULT_UNMATCHEDFRAMES_TOLERANCE; // Compute new velocityVector based on last positions history + this.velocity = this.updateVelocityVector(); + }; - Munkres.prototype.__clear_covers = function () { - for (var i = 0; i < this.n; ++i) { - this.row_covered[i] = false; - this.col_covered[i] = false; - } - }; - /** Erase all prime markings */ + itemTracked.makeAvailable = function () { + this.available = true; + return this; + }; + itemTracked.makeUnavailable = function () { + this.available = false; + return this; + }; - Munkres.prototype.__erase_primes = function () { - for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.marked[i][j] == 2) this.marked[i][j] = 0; - }; // --------------------------------------------------------------------------- - // Functions - // --------------------------------------------------------------------------- + itemTracked.countDown = function (frameNb) { + // Set frame disappear number + if (this.disappearFrame === null) { + this.disappearFrame = frameNb; + this.disappearArea = { + x: this.x, + y: this.y, + w: this.w, + h: this.h + }; + } - /** - * Create a cost matrix from a profit matrix by calling - * 'inversion_function' to invert each value. The inversion - * function must take one numeric argument (of any type) and return - * another numeric argument which is presumed to be the cost inverse - * of the original profit. - * - * This is a static method. Call it like this: - * - * cost_matrix = make_cost_matrix(matrix[, inversion_func]); - * - * For example: - * - * cost_matrix = make_cost_matrix(matrix, function(x) { return MAXIMUM - x; }); - * - * @param {Array} profit_matrix An array of arrays representing the matrix - * to convert from a profit to a cost matrix - * @param {Function} [inversion_function] The function to use to invert each - * entry in the profit matrix - * - * @return {Array} The converted matrix - */ + this.frameUnmatchedLeftBeforeDying--; + this.isZombie = true; // If it was matched less than 1 time, it should die quick + if (this.fastDelete && this.nbTimeMatched <= 1) { + this.frameUnmatchedLeftBeforeDying = -1; + } + }; - function make_cost_matrix(profit_matrix, inversion_function) { - var i, j; + itemTracked.updateTheoricalPositionAndSize = function () { + this.itemHistory.push({ + x: this.x, + y: this.y, + w: this.w, + h: this.h, + confidence: this.confidence + }); - if (!inversion_function) { - var maximum = -1.0 / 0.0; + if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { + itemTracked.itemHistory.shift(); + } - for (i = 0; i < profit_matrix.length; ++i) for (j = 0; j < profit_matrix[i].length; ++j) if (profit_matrix[i][j] > maximum) maximum = profit_matrix[i][j]; + this.x += this.velocity.dx; + this.y += this.velocity.dy; + }; - inversion_function = function (x) { - return maximum - x; + itemTracked.predictNextPosition = function () { + return { + x: this.x + this.velocity.dx, + y: this.y + this.velocity.dy, + w: this.w, + h: this.h }; - } - - var cost_matrix = []; - - for (i = 0; i < profit_matrix.length; ++i) { - var row = profit_matrix[i]; - cost_matrix[i] = []; - - for (j = 0; j < row.length; ++j) cost_matrix[i][j] = inversion_function(profit_matrix[i][j]); - } - - return cost_matrix; - } - /** - * Convenience function: Converts the contents of a matrix of integers - * to a printable string. - * - * @param {Array} matrix The matrix to print - * - * @return {String} The formatted matrix - */ + }; + itemTracked.isDead = function () { + return this.frameUnmatchedLeftBeforeDying < 0; + }; // Velocity vector based on the last 15 frames - function format_matrix(matrix) { - var columnWidths = []; - var i, j; - for (i = 0; i < matrix.length; ++i) { - for (j = 0; j < matrix[i].length; ++j) { - var entryWidth = String(matrix[i][j]).length; - if (!columnWidths[j] || entryWidth >= columnWidths[j]) columnWidths[j] = entryWidth; + itemTracked.updateVelocityVector = function () { + if (exports.ITEM_HISTORY_MAX_LENGTH <= 2) { + return { + dx: undefined, + dy: undefined + }; } - } - - var formatted = ''; - for (i = 0; i < matrix.length; ++i) { - for (j = 0; j < matrix[i].length; ++j) { - var s = String(matrix[i][j]); // pad at front with spaces + if (this.itemHistory.length <= exports.ITEM_HISTORY_MAX_LENGTH) { + var _start = this.itemHistory[0]; + var _end = this.itemHistory[this.itemHistory.length - 1]; + return computeVelocityVector(_start, _end, this.itemHistory.length); + } - while (s.length < columnWidths[j]) s = ' ' + s; + var start = this.itemHistory[this.itemHistory.length - exports.ITEM_HISTORY_MAX_LENGTH]; + var end = this.itemHistory[this.itemHistory.length - 1]; + return computeVelocityVector(start, end, exports.ITEM_HISTORY_MAX_LENGTH); + }; - formatted += s; // separate columns + itemTracked.getMostlyMatchedName = function () { + var _this = this; - if (j != matrix[i].length - 1) formatted += ' '; - } + var nameMostlyMatchedOccurences = 0; + var nameMostlyMatched = ''; + Object.keys(this.nameCount).map(function (name) { + if (_this.nameCount[name] > nameMostlyMatchedOccurences) { + nameMostlyMatched = name; + nameMostlyMatchedOccurences = _this.nameCount[name]; + } + }); + return nameMostlyMatched; + }; - if (i != matrix[i].length - 1) formatted += '\n'; - } + itemTracked.toJSONDebug = function () { + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return { + id: this.id, + idDisplay: this.idDisplay, + x: roundInt ? parseInt(this.x, 10) : this.x, + y: roundInt ? parseInt(this.y, 10) : this.y, + w: roundInt ? parseInt(this.w, 10) : this.w, + h: roundInt ? parseInt(this.h, 10) : this.h, + confidence: Math.round(this.confidence * 100) / 100, + // Here we negate dy to be in "normal" carthesian coordinates + bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy)), + name: this.getMostlyMatchedName(), + isZombie: this.isZombie, + appearFrame: this.appearFrame, + disappearFrame: this.disappearFrame + }; + }; - return formatted; - } // --------------------------------------------------------------------------- - // Exports - // --------------------------------------------------------------------------- + itemTracked.toJSON = function () { + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return { + id: this.idDisplay, + x: roundInt ? parseInt(this.x, 10) : this.x, + y: roundInt ? parseInt(this.y, 10) : this.y, + w: roundInt ? parseInt(this.w, 10) : this.w, + h: roundInt ? parseInt(this.h, 10) : this.h, + confidence: Math.round(this.confidence * 100) / 100, + // Here we negate dy to be in "normal" carthesian coordinates + bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy), 10), + name: this.getMostlyMatchedName(), + isZombie: this.isZombie + }; + }; + itemTracked.toMOT = function (frameIndex) { + return "".concat(frameIndex, ",").concat(this.idDisplay, ",").concat(this.x - this.w / 2, ",").concat(this.y - this.h / 2, ",").concat(this.w, ",").concat(this.h, ",").concat(this.confidence / 100, ",-1,-1,-1"); + }; - function computeMunkres(cost_matrix, options) { - var m = new Munkres(); - return m.compute(cost_matrix, options); - } + itemTracked.toJSONGenericInfo = function () { + return { + id: this.id, + idDisplay: this.idDisplay, + appearFrame: this.appearFrame, + disappearFrame: this.disappearFrame, + disappearArea: this.disappearArea, + nbActiveFrame: this.disappearFrame - this.appearFrame, + name: this.getMostlyMatchedName() + }; + }; - computeMunkres.version = "1.2.2"; - computeMunkres.format_matrix = format_matrix; - computeMunkres.make_cost_matrix = make_cost_matrix; - computeMunkres.Munkres = Munkres; // backwards compatibility + return itemTracked; + }; - if (module.exports) { - module.exports = computeMunkres; - } - })(munkres$1); + exports.reset = function () { + idDisplay = 0; + }; + })(ItemTracked$1); - var itemTrackedModule = ItemTracked$1; - var ItemTracked = itemTrackedModule.ItemTracked; var kdTree = kdTreeMin.kdTree; var munkres = munkres$1.exports; var iouAreas = utils.iouAreas; + var ItemTracked = ItemTracked$1.ItemTracked, + reset = ItemTracked$1.reset; var iouDistance = function iouDistance(item1, item2) { // IOU distance, between 0 and 1 - // The smaller the less overlap + // The smaller, the less overlap var iou = iouAreas(item1, item2); // Invert this as the KDTREESEARCH is looking for the smaller value var distance = 1 - iou; // If the overlap is iou < 0.95, exclude value @@ -3355,9 +3345,7 @@ var Tracker = (function (exports) { var updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameNb) { // A kd-tree containing all the itemtracked // Need to rebuild on each frame, because itemTracked positions have changed - var treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ['x', 'y', 'w', 'h']); // Contruct a kd tree for the detections of this frame - - var treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ['x', 'y', 'w', 'h']); // SCENARIO 1: itemsTracked map is empty + var treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ["x", "y", "w", "h"]); // SCENARIO 1: itemsTracked map is empty if (mapOfItemsTracked.size === 0) { // Just add every detected item as item Tracked @@ -3411,6 +3399,8 @@ var Tracker = (function (exports) { } }); } else if (params.matchingAlgorithm === 'kdTree') { + // Contruct a kd tree for the detections of this frame + var treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ["x", "y", "w", "h"]); mapOfItemsTracked.forEach(function (itemTracked) { // First predict the new position of the itemTracked var predictedPosition = itemTracked.predictNextPosition(); // Make available for matching @@ -3455,7 +3445,7 @@ var Tracker = (function (exports) { if (mapOfItemsTracked.size > 0) { // Safety check to see if we still have object tracked (could have been deleted previously) // Rebuild tracked item tree to take in account the new positions - treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ['x', 'y', 'w', 'h']); // console.log(`Nb new items Unmatched : ${matchedList.filter((isMatched) => isMatched === false).length}`) + treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ["x", "y", "w", "h"]); // console.log(`Nb new items Unmatched : ${matchedList.filter((isMatched) => isMatched === false).length}`) matchedList.forEach(function (matched, index) { // Iterate through unmatched new detections @@ -3497,10 +3487,10 @@ var Tracker = (function (exports) { } }; - var reset = tracker.reset = function () { + var reset_1 = tracker.reset = function () { mapOfItemsTracked = new Map(); mapOfAllItemsTracked = new Map(); - itemTrackedModule.reset(); + reset(); }; var setParams = tracker.setParams = function (newParams) { @@ -3558,7 +3548,7 @@ var Tracker = (function (exports) { exports.getJSONOfAllTrackedItems = getJSONOfAllTrackedItems; exports.getJSONOfTrackedItems = getJSONOfTrackedItems; exports.getTrackedItemsInMOTFormat = getTrackedItemsInMOTFormat; - exports.reset = reset; + exports.reset = reset_1; exports.setParams = setParams; exports.updateTrackedItemsWithNewFrame = updateTrackedItemsWithNewFrame; diff --git a/package-lock.json b/package-lock.json index 63c2f5f..9fafbaa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "uuid": "^3.2.1" }, "bin": { - "node-moving-things-tracker": "bundle.cjs.js" + "node-moving-things-tracker": "bundle.iife.js" }, "devDependencies": { "@babel/core": "^7.19.3", @@ -29,6 +29,7 @@ "eslint-config-airbnb-base": "^15.0.0", "eslint-plugin-import": "^2.26.0", "jasmine": "^4.4.0", + "nodemon": "^2.0.20", "rollup": "^2.79.1", "rollup-plugin-sizes": "^1.0.4" } @@ -1909,6 +1910,12 @@ "@types/node": "*" } }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, "node_modules/acorn": { "version": "8.8.0", "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/acorn/-/acorn-8.8.0.tgz", @@ -1967,6 +1974,19 @@ "node": ">=4" } }, + "node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/argparse/-/argparse-2.0.1.tgz", @@ -2073,6 +2093,15 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -2187,6 +2216,45 @@ "node": ">=4" } }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/color-convert/-/color-convert-1.9.3.tgz", @@ -3164,6 +3232,12 @@ "node": ">= 4" } }, + "node_modules/ignore-by-default": { + "version": "1.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=", + "dev": true + }, "node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/import-fresh/-/import-fresh-3.3.0.tgz", @@ -3231,6 +3305,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/is-boolean-object": { "version": "1.1.2", "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-boolean-object/-/is-boolean-object-1.1.2.tgz", @@ -3655,6 +3741,76 @@ "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", "dev": true }, + "node_modules/nodemon": { + "version": "2.0.20", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/nodemon/-/nodemon-2.0.20.tgz", + "integrity": "sha512-Km2mWHKKY5GzRg6i1j5OxOHQtuvVsgskLfigG25yTtbyfRGn/GNvIbRyOf1PSCKJ2aT/58TiuUsuOU5UToVViw==", + "dev": true, + "dependencies": { + "chokidar": "^3.5.2", + "debug": "^3.2.7", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.1.2", + "pstree.remy": "^1.1.8", + "semver": "^5.7.1", + "simple-update-notifier": "^1.0.7", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.5" + }, + "bin": { + "nodemon": "bin/nodemon.js" + }, + "engines": { + "node": ">=8.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nodemon" + } + }, + "node_modules/nodemon/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/nodemon/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/nopt": { + "version": "1.0.10", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", + "dev": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/object-inspect": { "version": "1.12.2", "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/object-inspect/-/object-inspect-1.12.2.tgz", @@ -3859,6 +4015,12 @@ "node": ">= 0.8.0" } }, + "node_modules/pstree.remy": { + "version": "1.1.8", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "dev": true + }, "node_modules/punycode": { "version": "2.1.1", "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/punycode/-/punycode-2.1.1.tgz", @@ -3888,6 +4050,18 @@ } ] }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, "node_modules/regenerate": { "version": "1.4.2", "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/regenerate/-/regenerate-1.4.2.tgz", @@ -4160,6 +4334,27 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/simple-update-notifier": { + "version": "1.0.7", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/simple-update-notifier/-/simple-update-notifier-1.0.7.tgz", + "integrity": "sha512-BBKgR84BJQJm6WjWFMHgLVuo61FBDSj1z/xSFUIozqO6wO7ii0JxCqlIud7Enr/+LhlbNI0whErq96P2qHNWew==", + "dev": true, + "dependencies": { + "semver": "~7.0.0" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/simple-update-notifier/node_modules/semver": { + "version": "7.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/slash/-/slash-3.0.0.tgz", @@ -4287,6 +4482,18 @@ "node": ">=8.0" } }, + "node_modules/touch": { + "version": "3.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/touch/-/touch-3.1.0.tgz", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "dev": true, + "dependencies": { + "nopt": "~1.0.10" + }, + "bin": { + "nodetouch": "bin/nodetouch.js" + } + }, "node_modules/tsconfig-paths": { "version": "3.14.1", "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", @@ -4350,6 +4557,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/undefsafe": { + "version": "2.0.5", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "dev": true + }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", @@ -5810,6 +6023,12 @@ "@types/node": "*" } }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, "acorn": { "version": "8.8.0", "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/acorn/-/acorn-8.8.0.tgz", @@ -5850,6 +6069,16 @@ "color-convert": "^1.9.0" } }, + "anymatch": { + "version": "3.1.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, "argparse": { "version": "2.0.1", "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/argparse/-/argparse-2.0.1.tgz", @@ -5932,6 +6161,12 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -6002,6 +6237,33 @@ "supports-color": "^5.3.0" } }, + "chokidar": { + "version": "3.5.3", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } + } + }, "color-convert": { "version": "1.9.3", "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/color-convert/-/color-convert-1.9.3.tgz", @@ -6746,6 +7008,12 @@ "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true }, + "ignore-by-default": { + "version": "1.0.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=", + "dev": true + }, "import-fresh": { "version": "3.3.0", "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/import-fresh/-/import-fresh-3.3.0.tgz", @@ -6798,6 +7066,15 @@ "has-bigints": "^1.0.1" } }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, "is-boolean-object": { "version": "1.1.2", "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/is-boolean-object/-/is-boolean-object-1.1.2.tgz", @@ -7114,6 +7391,56 @@ "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", "dev": true }, + "nodemon": { + "version": "2.0.20", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/nodemon/-/nodemon-2.0.20.tgz", + "integrity": "sha512-Km2mWHKKY5GzRg6i1j5OxOHQtuvVsgskLfigG25yTtbyfRGn/GNvIbRyOf1PSCKJ2aT/58TiuUsuOU5UToVViw==", + "dev": true, + "requires": { + "chokidar": "^3.5.2", + "debug": "^3.2.7", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.1.2", + "pstree.remy": "^1.1.8", + "semver": "^5.7.1", + "simple-update-notifier": "^1.0.7", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.5" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "nopt": { + "version": "1.0.10", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, "object-inspect": { "version": "1.12.2", "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/object-inspect/-/object-inspect-1.12.2.tgz", @@ -7258,6 +7585,12 @@ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, + "pstree.remy": { + "version": "1.1.8", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "dev": true + }, "punycode": { "version": "2.1.1", "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/punycode/-/punycode-2.1.1.tgz", @@ -7270,6 +7603,15 @@ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, "regenerate": { "version": "1.4.2", "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/regenerate/-/regenerate-1.4.2.tgz", @@ -7463,6 +7805,23 @@ "object-inspect": "^1.9.0" } }, + "simple-update-notifier": { + "version": "1.0.7", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/simple-update-notifier/-/simple-update-notifier-1.0.7.tgz", + "integrity": "sha512-BBKgR84BJQJm6WjWFMHgLVuo61FBDSj1z/xSFUIozqO6wO7ii0JxCqlIud7Enr/+LhlbNI0whErq96P2qHNWew==", + "dev": true, + "requires": { + "semver": "~7.0.0" + }, + "dependencies": { + "semver": { + "version": "7.0.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true + } + } + }, "slash": { "version": "3.0.0", "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/slash/-/slash-3.0.0.tgz", @@ -7554,6 +7913,15 @@ "is-number": "^7.0.0" } }, + "touch": { + "version": "3.1.0", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/touch/-/touch-3.1.0.tgz", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "dev": true, + "requires": { + "nopt": "~1.0.10" + } + }, "tsconfig-paths": { "version": "3.14.1", "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", @@ -7604,6 +7972,12 @@ "which-boxed-primitive": "^1.0.2" } }, + "undefsafe": { + "version": "2.0.5", + "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "dev": true + }, "unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "resolved": "https://amcn-cds-548684625844.d.codeartifact.us-east-1.amazonaws.com:443/npm/npm-store/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", diff --git a/package.json b/package.json index 1fba5bc..adbdbfb 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "node-moving-things-tracker": "bundle.iife.js" }, "scripts": { + "start": "nodemon -e js --inspect src/start.js", "test": "jasmine", "build-bundle:cjs": "rollup -c rollup.cjs.config", "build-bundle:esm": "rollup -c rollup.esm.config", @@ -41,6 +42,7 @@ "eslint-config-airbnb-base": "^15.0.0", "eslint-plugin-import": "^2.26.0", "jasmine": "^4.4.0", + "nodemon": "^2.0.20", "rollup": "^2.79.1", "rollup-plugin-sizes": "^1.0.4" } diff --git a/rollup.cjs.config.js b/rollup.cjs.config.js index a552856..92edf28 100644 --- a/rollup.cjs.config.js +++ b/rollup.cjs.config.js @@ -4,7 +4,7 @@ import sizes from 'rollup-plugin-sizes'; import commonjs from '@rollup/plugin-commonjs'; const config = { - input: 'tracker.js', + input: 'src/tracker', output: { file: 'bundle.cjs.js', format: 'cjs', diff --git a/rollup.esm.config.js b/rollup.esm.config.js index 98128c4..bb0a784 100644 --- a/rollup.esm.config.js +++ b/rollup.esm.config.js @@ -1,11 +1,11 @@ import babel from '@rollup/plugin-babel'; -import resolve from "@rollup/plugin-node-resolve"; -import commonjs from "@rollup/plugin-commonjs"; -import sizes from "rollup-plugin-sizes"; +import resolve from '@rollup/plugin-node-resolve'; +import commonjs from '@rollup/plugin-commonjs'; +import sizes from 'rollup-plugin-sizes'; export default [ { - input: 'tracker.js', + input: 'src/tracker', output: { file: 'bundle.esm.js', format: 'esm', diff --git a/rollup.iife.config.js b/rollup.iife.config.js index 4e2d808..cdc7605 100644 --- a/rollup.iife.config.js +++ b/rollup.iife.config.js @@ -4,11 +4,11 @@ import sizes from 'rollup-plugin-sizes'; import commonjs from '@rollup/plugin-commonjs'; const config = { - input: 'tracker.js', + input: 'src/tracker', output: { file: 'bundle.iife.js', format: 'iife', - name: 'Tracker' + name: 'Tracker', }, plugins: [ resolve({ browser: true, preferBuiltins: false }), diff --git a/spec/ItemTracked.spec.js b/spec/ItemTracked.spec.js index 2296a8e..6c8cda9 100644 --- a/spec/ItemTracked.spec.js +++ b/spec/ItemTracked.spec.js @@ -1,4 +1,4 @@ -const ItemTracked = require('../ItemTracked'); +const ItemTracked = require('../src/tracker/ItemTracked'); describe('ItemTracked', () => { const properties = { diff --git a/spec/Tracker.spec.js b/spec/Tracker.spec.js index ae0eca2..124d8ef 100644 --- a/spec/Tracker.spec.js +++ b/spec/Tracker.spec.js @@ -1,4 +1,4 @@ -const Tracker = require('../tracker'); +const Tracker = require('../src/tracker'); const detections = [ [ diff --git a/main.js b/src/main.js similarity index 96% rename from main.js rename to src/main.js index 639608c..864b1c4 100755 --- a/main.js +++ b/src/main.js @@ -3,15 +3,15 @@ var fs = require("fs"); var Tracker = require('./tracker'); var parseArgs = require('minimist') // Utilities for cleaning up detections input -var isInsideSomeAreas = require('./utils').isInsideSomeAreas; -var ignoreObjectsNotToDetect = require('./utils').ignoreObjectsNotToDetect; -var isDetectionTooLarge = require('./utils').isDetectionTooLarge; +var isInsideSomeAreas = require('./tracker/utils').isInsideSomeAreas; +var ignoreObjectsNotToDetect = require('./tracker/utils').ignoreObjectsNotToDetect; +var isDetectionTooLarge = require('./tracker/utils').isDetectionTooLarge; /* NOTE: this file is a big mess with piled up code from different use cases Should be reworked to be much simpler - If you are looking for the tracker, look tracker.js file - this main.js is just giving different way to operate tracker.js + If you are looking for the tracker, look start.js file + this main.js is just giving different way to operate start.js */ // Export Tracker API to use as a node module diff --git a/src/start.js b/src/start.js new file mode 100644 index 0000000..dc6f05d --- /dev/null +++ b/src/start.js @@ -0,0 +1,60 @@ +const Tracker = require('./tracker'); + +const detections = [ + [ + { + x: 0.688212, + y: 0.755398, + w: 0.026031, + h: 0.048941, + confidence: 16.5444, + name: 'object', + }, + ], + [], // This empty frame ensure that the object will be removed if fastDelete is enabled. + [ + { + x: 0.686925, + y: 0.796403, + w: 0.028142, + h: 0.050919, + confidence: 25.7651, + name: 'object', + }, + ], + [ + { + x: 0.686721, + y: 0.837579, + w: 0.027887, + h: 0.054398, + confidence: 34.285399999999996, + name: 'object', + }, + ], + [ + { + x: 0.686436, + y: 0.877328, + w: 0.026603, + h: 0.058, + confidence: 18.104300000000002, + name: 'object', + }, + ], +]; + + +console.log("!! 1.1 getFrames") +var res = Tracker.getJSONOfTrackedItems(); +console.log("!! 1.2 getFrames response ", JSON.stringify(res)) + +console.log("!! 2.1 updateFrames") +detections.forEach((frame, frameNb) => { + Tracker.updateTrackedItemsWithNewFrame(frame, frameNb); +}); +console.log("!! 2.2 updateFrames done") + +console.log("!! 3.1 getFrames") +res = Tracker.getJSONOfTrackedItems(); +console.log("!! 2.2 getFrames response ", JSON.stringify(res)) \ No newline at end of file diff --git a/ItemTracked.js b/src/tracker/ItemTracked.js similarity index 99% rename from ItemTracked.js rename to src/tracker/ItemTracked.js index 03d0d1e..1fb1a66 100644 --- a/ItemTracked.js +++ b/src/tracker/ItemTracked.js @@ -1,4 +1,4 @@ -var uuidv4 = require('uuid/v4'); +const uuidv4 = require('uuid/v4'); const { computeBearingIn360 } = require('./utils'); const { computeVelocityVector } = require('./utils'); diff --git a/tracker.js b/src/tracker/index.js similarity index 71% rename from tracker.js rename to src/tracker/index.js index dd81f1e..0ee65e3 100644 --- a/tracker.js +++ b/src/tracker/index.js @@ -1,29 +1,27 @@ -const itemTrackedModule = require('./ItemTracked'); - -const { ItemTracked } = itemTrackedModule; const { kdTree } = require('kd-tree-javascript'); -const isEqual = require('lodash.isequal'); const munkres = require('munkres-js'); +const isEqual = require('lodash.isequal'); const { iouAreas } = require('./utils'); +const { ItemTracked, reset } = require('./ItemTracked'); const DEBUG_MODE = false; // Distance function -const iouDistance = function (item1, item2) { +const iouDistance = function(item1, item2) { // IOU distance, between 0 and 1 - // The smaller the less overlap + // The smaller, the less overlap const iou = iouAreas(item1, item2); // Invert this as the KDTREESEARCH is looking for the smaller value let distance = 1 - iou; // If the overlap is iou < 0.95, exclude value - if (distance > (1 - params.iouLimit)) { + if(distance > (1 - params.iouLimit)) { distance = params.distanceLimit + 1; } return distance; -}; +} const params = { // DEFAULT_UNMATCHEDFRAMES_TOLERANCE @@ -46,7 +44,7 @@ const params = { // 'kdTree' or 'munkres'. matchingAlgorithm: 'munkres', // matchingAlgorithm: 'kdTree', -}; +} // A dictionary of itemTracked currently tracked // key: uuid @@ -60,23 +58,21 @@ let mapOfAllItemsTracked = new Map(); // By default, we do not keep all the history in memory let keepAllHistoryInMemory = false; + exports.computeDistance = iouDistance; -exports.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameNb) { +exports.updateTrackedItemsWithNewFrame = function(detectionsOfThisFrame, frameNb) { // A kd-tree containing all the itemtracked // Need to rebuild on each frame, because itemTracked positions have changed - let treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ['x', 'y', 'w', 'h']); - - // Contruct a kd tree for the detections of this frame - const treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ['x', 'y', 'w', 'h']); + let treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ["x", "y", "w", "h"]); // SCENARIO 1: itemsTracked map is empty - if (mapOfItemsTracked.size === 0) { + if(mapOfItemsTracked.size === 0) { // Just add every detected item as item Tracked - detectionsOfThisFrame.forEach((itemDetected) => { - const newItemTracked = new ItemTracked(itemDetected, frameNb, params.unMatchedFramesTolerance, params.fastDelete); + detectionsOfThisFrame.forEach(function(itemDetected) { + const newItemTracked = new ItemTracked(itemDetected, frameNb, params.unMatchedFramesTolerance, params.fastDelete) // Add it to the map - mapOfItemsTracked.set(newItemTracked.id, newItemTracked); + mapOfItemsTracked.set(newItemTracked.id, newItemTracked) // Add it to the kd tree treeItemsTracked.insert(newItemTracked); }); @@ -87,49 +83,52 @@ exports.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameN matchedList.fill(false); // Match existing Tracked items with the items detected in the new frame // For each look in the new detection to find the closest match - if (detectionsOfThisFrame.length > 0) { + if(detectionsOfThisFrame.length > 0) { if (params.matchingAlgorithm === 'munkres') { const trackedItemIds = Array.from(mapOfItemsTracked.keys()); - const costMatrix = Array.from(mapOfItemsTracked.values()) - .map((itemTracked) => { - const predictedPosition = itemTracked.predictNextPosition(); - return detectionsOfThisFrame.map( - (detection) => params.distanceFunc(predictedPosition, detection), - ); - }); + const costMatrix = Array.from(mapOfItemsTracked.values()). + map(itemTracked => { + const predictedPosition = itemTracked.predictNextPosition(); + return detectionsOfThisFrame.map( + detection => params.distanceFunc(predictedPosition, detection)); + }); - mapOfItemsTracked.forEach((itemTracked) => { + mapOfItemsTracked.forEach(function(itemTracked) { itemTracked.makeAvailable(); }); - munkres(costMatrix) - .filter((m) => costMatrix[m[0]][m[1]] <= params.distanceLimit) - .forEach((m) => { - const itemTracked = mapOfItemsTracked.get(trackedItemIds[m[0]]); - const updatedTrackedItemProperties = detectionsOfThisFrame[m[1]]; - matchedList[m[1]] = { idDisplay: itemTracked.idDisplay }; - itemTracked - .makeUnavailable() - .update(updatedTrackedItemProperties, frameNb); - }); - - matchedList.forEach((matched, index) => { + munkres(costMatrix). + filter(m => costMatrix[m[0]][m[1]] <= params.distanceLimit). + forEach(m => { + const itemTracked = mapOfItemsTracked.get(trackedItemIds[m[0]]); + const updatedTrackedItemProperties = detectionsOfThisFrame[m[1]]; + matchedList[m[1]] = { idDisplay: itemTracked.idDisplay }; + itemTracked. + makeUnavailable(). + update(updatedTrackedItemProperties, frameNb); + }); + + matchedList.forEach(function(matched, index) { if (!matched) { - if (Math.min(...costMatrix.map((m) => m[index])) > params.distanceLimit) { - const newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); - mapOfItemsTracked.set(newItemTracked.id, newItemTracked); + if (Math.min(...costMatrix.map(m => m[index])) > params.distanceLimit) { + const newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete) + mapOfItemsTracked.set(newItemTracked.id, newItemTracked) newItemTracked.makeUnavailable(); costMatrix.push(detectionsOfThisFrame.map( - (detection) => params.distanceFunc(newItemTracked, detection), - )); + detection => params.distanceFunc(newItemTracked, detection))); } } }); - } else if (params.matchingAlgorithm === 'kdTree') { - mapOfItemsTracked.forEach((itemTracked) => { + } + else if (params.matchingAlgorithm === 'kdTree') { + // Contruct a kd tree for the detections of this frame + const treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ["x", "y", "w", "h"]); + + mapOfItemsTracked.forEach(function(itemTracked) { + // First predict the new position of the itemTracked - const predictedPosition = itemTracked.predictNextPosition(); + const predictedPosition = itemTracked.predictNextPosition() // Make available for matching itemTracked.makeAvailable(); @@ -143,7 +142,8 @@ exports.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameN const treeSearchMultipleResults = treeDetectionsOfThisFrame.nearest(predictedPosition, 2, params.distanceLimit); // If we have found something - if (treeSearchResult) { + if(treeSearchResult) { + // This is an extra refinement that happens in 0.001% of tracked items matching // If IOU overlap is super similar for two potential match, add an extra check // if(treeSearchMultipleResults.length === 2) { @@ -189,26 +189,26 @@ exports.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameN // } // } - if (DEBUG_MODE) { + if(DEBUG_MODE) { // Assess different results between predition or not - if (!isEqual(treeSearchResult[0], treeSearchResultWithoutPrediction && treeSearchResultWithoutPrediction[0])) { + if(!isEqual(treeSearchResult[0], treeSearchResultWithoutPrediction && treeSearchResultWithoutPrediction[0])) { console.log('Making the pre-prediction led to a difference result:'); - console.log(`For frame ${frameNb} itemNb ${itemTracked.idDisplay}`); + console.log('For frame ' + frameNb + ' itemNb ' + itemTracked.idDisplay) } } const indexClosestNewDetectedItem = detectionsOfThisFrame.indexOf(treeSearchResult[0]); // If this detections was not already matched to a tracked item // (otherwise it would be matched to two tracked items...) - if (!matchedList[indexClosestNewDetectedItem]) { + if(!matchedList[indexClosestNewDetectedItem]) { matchedList[indexClosestNewDetectedItem] = { - idDisplay: itemTracked.idDisplay, - }; + idDisplay: itemTracked.idDisplay + } // Update properties of tracked object - const updatedTrackedItemProperties = detectionsOfThisFrame[indexClosestNewDetectedItem]; + const updatedTrackedItemProperties = detectionsOfThisFrame[indexClosestNewDetectedItem] mapOfItemsTracked.get(itemTracked.id) - .makeUnavailable() - .update(updatedTrackedItemProperties, frameNb); + .makeUnavailable() + .update(updatedTrackedItemProperties, frameNb) } else { // Means two already tracked item are concurrent to get assigned a new detections // Rule is to priorize the oldest one to avoid id-reassignment @@ -219,11 +219,11 @@ exports.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameN throw `Unknown matching algorithm "${params.matchingAlgorithm}"`; } } else { - if (DEBUG_MODE) { - console.log(`[Tracker] Nothing detected for frame nº${frameNb}`); + if(DEBUG_MODE) { + console.log('[Tracker] Nothing detected for frame nº' + frameNb) } // Make existing tracked item available for deletion (to avoid ghost) - mapOfItemsTracked.forEach((itemTracked) => { + mapOfItemsTracked.forEach(function(itemTracked) { itemTracked.makeAvailable(); }); } @@ -231,20 +231,20 @@ exports.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameN if (params.matchingAlgorithm === 'kdTree') { // Add any unmatched items as new trackedItem only if those new items are not too similar // to existing trackedItems this avoids adding some double match of YOLO and bring down drasticly reassignments - if (mapOfItemsTracked.size > 0) { // Safety check to see if we still have object tracked (could have been deleted previously) + if(mapOfItemsTracked.size > 0) { // Safety check to see if we still have object tracked (could have been deleted previously) // Rebuild tracked item tree to take in account the new positions - treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ['x', 'y', 'w', 'h']); + treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ["x", "y", "w", "h"]); // console.log(`Nb new items Unmatched : ${matchedList.filter((isMatched) => isMatched === false).length}`) - matchedList.forEach((matched, index) => { + matchedList.forEach(function(matched, index) { // Iterate through unmatched new detections - if (!matched) { + if(!matched) { // Do not add as new tracked item if it is to similar to an existing one const treeSearchResult = treeItemsTracked.nearest(detectionsOfThisFrame[index], 1, params.distanceLimit)[0]; - if (!treeSearchResult) { - const newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); + if(!treeSearchResult) { + const newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete) // Add it to the map - mapOfItemsTracked.set(newItemTracked.id, newItemTracked); + mapOfItemsTracked.set(newItemTracked.id, newItemTracked) // Add it to the kd tree treeItemsTracked.insert(newItemTracked); // Make unvailable @@ -259,60 +259,69 @@ exports.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameN // Start killing the itemTracked (and predicting next position) // that are tracked but haven't been matched this frame - mapOfItemsTracked.forEach((itemTracked) => { - if (itemTracked.available) { + mapOfItemsTracked.forEach(function(itemTracked) { + if(itemTracked.available) { itemTracked.countDown(frameNb); itemTracked.updateTheoricalPositionAndSize(); - if (itemTracked.isDead()) { + if(itemTracked.isDead()) { mapOfItemsTracked.delete(itemTracked.id); treeItemsTracked.remove(itemTracked); - if (keepAllHistoryInMemory) { + if(keepAllHistoryInMemory) { mapOfAllItemsTracked.set(itemTracked.id, itemTracked); } } } }); + } -}; +} -exports.reset = function () { +exports.reset = function() { mapOfItemsTracked = new Map(); mapOfAllItemsTracked = new Map(); - itemTrackedModule.reset(); -}; + reset(); +} -exports.setParams = function (newParams) { +exports.setParams = function(newParams) { Object.keys(newParams).forEach((key) => { params[key] = newParams[key]; }); -}; +} -exports.enableKeepInMemory = function () { +exports.enableKeepInMemory = function() { keepAllHistoryInMemory = true; -}; +} -exports.disableKeepInMemory = function () { +exports.disableKeepInMemory = function() { keepAllHistoryInMemory = false; -}; +} -exports.getJSONOfTrackedItems = function (roundInt = true) { - return Array.from(mapOfItemsTracked.values()).map((itemTracked) => itemTracked.toJSON(roundInt)); +exports.getJSONOfTrackedItems = function(roundInt = true) { + return Array.from(mapOfItemsTracked.values()).map(function(itemTracked) { + return itemTracked.toJSON(roundInt); + }); }; -exports.getJSONDebugOfTrackedItems = function (roundInt = true) { - return Array.from(mapOfItemsTracked.values()).map((itemTracked) => itemTracked.toJSONDebug(roundInt)); +exports.getJSONDebugOfTrackedItems = function(roundInt = true) { + return Array.from(mapOfItemsTracked.values()).map(function(itemTracked) { + return itemTracked.toJSONDebug(roundInt); + }); }; -exports.getTrackedItemsInMOTFormat = function (frameNb) { - return Array.from(mapOfItemsTracked.values()).map((itemTracked) => itemTracked.toMOT(frameNb)); +exports.getTrackedItemsInMOTFormat = function(frameNb) { + return Array.from(mapOfItemsTracked.values()).map(function(itemTracked) { + return itemTracked.toMOT(frameNb); + }); }; // Work only if keepInMemory is enabled -exports.getAllTrackedItems = function () { +exports.getAllTrackedItems = function() { return mapOfAllItemsTracked; }; // Work only if keepInMemory is enabled -exports.getJSONOfAllTrackedItems = function () { - return Array.from(mapOfAllItemsTracked.values()).map((itemTracked) => itemTracked.toJSONGenericInfo()); +exports.getJSONOfAllTrackedItems = function() { + return Array.from(mapOfAllItemsTracked.values()).map(function(itemTracked) { + return itemTracked.toJSONGenericInfo(); + }); }; diff --git a/utils.js b/src/tracker/utils.js similarity index 85% rename from utils.js rename to src/tracker/utils.js index e2630fa..8b2bd85 100644 --- a/utils.js +++ b/src/tracker/utils.js @@ -1,9 +1,4 @@ -exports.isDetectionTooLarge = (detections, largestAllowed) => { - if (detections.w >= largestAllowed) { - return true; - } - return false; -}; +exports.isDetectionTooLarge = (detections, largestAllowed) => detections.w >= largestAllowed; const isInsideArea = (area, point) => { const xMin = area.x - area.w / 2; @@ -11,21 +6,15 @@ const isInsideArea = (area, point) => { const yMin = area.y - area.h / 2; const yMax = area.y + area.h / 2; - if (point.x >= xMin - && point.x <= xMax - && point.y >= yMin - && point.y <= yMax) { - return true; - } - return false; + return point.x >= xMin + && point.x <= xMax + && point.y >= yMin + && point.y <= yMax; }; exports.isInsideArea = isInsideArea; -exports.isInsideSomeAreas = (areas, point) => { - const isInside = areas.some((area) => isInsideArea(area, point)); - return isInside; -}; +exports.isInsideSomeAreas = (areas, point) => areas.some((area) => isInsideArea(area, point)); exports.ignoreObjectsNotToDetect = (detections, objectsToDetect) => detections.filter((detection) => objectsToDetect.indexOf(detection.name) > -1); @@ -48,7 +37,7 @@ exports.iouAreas = (item1, item2) => { const overlap_x1 = Math.min(rect1.x1, rect2.x1); const overlap_y1 = Math.min(rect1.y1, rect2.y1); - // if there an overlap + // if there are an overlap if ((overlap_x1 - overlap_x0) <= 0 || (overlap_y1 - overlap_y0) <= 0) { // no overlap return 0; From 9f4f3dacfa2a292e4c3ab47f8755afc6de9c1bb8 Mon Sep 17 00:00:00 2001 From: Dmytro Kushnir Date: Mon, 19 Dec 2022 14:44:56 +0200 Subject: [PATCH 10/11] Add factory for several matching algorithms, add few test cases Co-authored-by: Dmytro Kushnir --- LICENSE | 21 - __mocks__/detectionsFromYolo.json | 32 + __mocks__/parsedDetections.json | 44 + bundle.iife.js | 7199 ++++++++++++------------ package.json | 2 +- src/start.js | 80 +- src/tracker/ItemTracked.js | 20 +- src/tracker/index.js | 263 +- src/tracker/trackAlgorithms/kdTree.js | 135 + src/tracker/trackAlgorithms/munkres.js | 48 + 10 files changed, 3990 insertions(+), 3854 deletions(-) delete mode 100644 LICENSE create mode 100644 __mocks__/detectionsFromYolo.json create mode 100644 __mocks__/parsedDetections.json create mode 100644 src/tracker/trackAlgorithms/kdTree.js create mode 100644 src/tracker/trackAlgorithms/munkres.js diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 93de2c4..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 Thibault Durand - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/__mocks__/detectionsFromYolo.json b/__mocks__/detectionsFromYolo.json new file mode 100644 index 0000000..59d294d --- /dev/null +++ b/__mocks__/detectionsFromYolo.json @@ -0,0 +1,32 @@ +[ + { + "score": 0.4272794723510742, + "classIndex": 67, + "name": "book", + "rect": [ + [ + 0.00266101211309433, + 0.6224198937416077 + ], + [ + 0.2145547717809677, + 0.11799068003892899 + ] + ] + }, + { + "score": 0.4152381420135498, + "classIndex": 0, + "name": "book", + "rect": [ + [ + 0.019397735595703125, + -0.020037144422531128 + ], + [ + 1.1242153644561768, + 0.6052786111831665 + ] + ] + } +] diff --git a/__mocks__/parsedDetections.json b/__mocks__/parsedDetections.json new file mode 100644 index 0000000..fb9e028 --- /dev/null +++ b/__mocks__/parsedDetections.json @@ -0,0 +1,44 @@ +[ + [ + { + "x": 2.688212, + "y": 2.755398, + "w": 0.026031, + "h": 0.048941, + "confidence": 16.5444, + "name": "object" + } + ], + [], + [ + { + "x": 2.686925, + "y": 0.796403, + "w": 0.028142, + "h": 3.050919, + "confidence": 25.7651, + "name": "object" + } + ], + [ + { + "x": 0.686721, + "y": 0.837579, + "w": 6.027887, + "h": 0.054398, + "confidence": 34.285399999999996, + "name": "object" + } + ], + [ + { + "x": 0.686436, + "y": 23.877328, + "w": 0.026603, + "h": 0.058, + "confidence": 18.104300000000002, + "name": "object" + } + ] +] + diff --git a/bundle.iife.js b/bundle.iife.js index c47cb5b..fc8c7c9 100644 --- a/bundle.iife.js +++ b/bundle.iife.js @@ -1,3559 +1,3646 @@ var Tracker = (function (exports) { - 'use strict'; - - function _toConsumableArray(arr) { - return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); - } - - function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) return _arrayLikeToArray(arr); - } - - function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); - } - - function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); - } - - function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - - return arr2; - } - - function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - - var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - - var tracker = {}; - - var kdTreeMin = {}; - - /** - * k-d Tree JavaScript - V 1.01 - * - * https://github.com/ubilabs/kd-tree-javascript - * - * @author Mircea Pricop , 2012 - * @author Martin Kleppe , 2012 - * @author Ubilabs http://ubilabs.net, 2012 - * @license MIT License - */ - - (function (exports) { - !function (t, n) { - n(exports ); - }(commonjsGlobal, function (t) { - function n(t, n, o) { - this.obj = t, this.left = null, this.right = null, this.parent = o, this.dimension = n; - } - - function o(t) { - this.content = [], this.scoreFunction = t; - } - - o.prototype = { - push: function (t) { - this.content.push(t), this.bubbleUp(this.content.length - 1); - }, - pop: function () { - var t = this.content[0], - n = this.content.pop(); - return this.content.length > 0 && (this.content[0] = n, this.sinkDown(0)), t; - }, - peek: function () { - return this.content[0]; - }, - remove: function (t) { - for (var n = this.content.length, o = 0; o < n; o++) if (this.content[o] == t) { - var i = this.content.pop(); - return void (o != n - 1 && (this.content[o] = i, this.scoreFunction(i) < this.scoreFunction(t) ? this.bubbleUp(o) : this.sinkDown(o))); - } - - throw new Error("Node not found."); - }, - size: function () { - return this.content.length; - }, - bubbleUp: function (t) { - for (var n = this.content[t]; t > 0;) { - var o = Math.floor((t + 1) / 2) - 1, - i = this.content[o]; - if (!(this.scoreFunction(n) < this.scoreFunction(i))) break; - this.content[o] = n, this.content[t] = i, t = o; - } - }, - sinkDown: function (t) { - for (var n = this.content.length, o = this.content[t], i = this.scoreFunction(o);;) { - var e = 2 * (t + 1), - r = e - 1, - l = null; - - if (r < n) { - var u = this.content[r], - h = this.scoreFunction(u); - h < i && (l = r); - } - - if (e < n) { - var s = this.content[e]; - this.scoreFunction(s) < (null == l ? i : h) && (l = e); - } - - if (null == l) break; - this.content[t] = this.content[l], this.content[l] = o, t = l; - } - } - }, t.kdTree = function (t, i, e) { - function r(t, o, i) { - var l, - u, - h = o % e.length; - return 0 === t.length ? null : 1 === t.length ? new n(t[0], h, i) : (t.sort(function (t, n) { - return t[e[h]] - n[e[h]]; - }), l = Math.floor(t.length / 2), u = new n(t[l], h, i), u.left = r(t.slice(0, l), o + 1, u), u.right = r(t.slice(l + 1), o + 1, u), u); - } - - var l = this; - Array.isArray(t) ? this.root = r(t, 0, null) : function (t) { - function n(t) { - t.left && (t.left.parent = t, n(t.left)), t.right && (t.right.parent = t, n(t.right)); - } - - l.root = t, n(l.root); - }(t), this.toJSON = function (t) { - t || (t = this.root); - var o = new n(t.obj, t.dimension, null); - return t.left && (o.left = l.toJSON(t.left)), t.right && (o.right = l.toJSON(t.right)), o; - }, this.insert = function (t) { - function o(n, i) { - if (null === n) return i; - var r = e[n.dimension]; - return t[r] < n.obj[r] ? o(n.left, n) : o(n.right, n); - } - - var i, - r, - l = o(this.root, null); - null !== l ? (i = new n(t, (l.dimension + 1) % e.length, l), r = e[l.dimension], t[r] < l.obj[r] ? l.left = i : l.right = i) : this.root = new n(t, 0, null); - }, this.remove = function (t) { - function n(o) { - if (null === o) return null; - if (o.obj === t) return o; - var i = e[o.dimension]; - return t[i] < o.obj[i] ? n(o.left) : n(o.right); - } - - function o(t) { - function n(t, o) { - var i, r, l, u, h; - return null === t ? null : (i = e[o], t.dimension === o ? null !== t.left ? n(t.left, o) : t : (r = t.obj[i], l = n(t.left, o), u = n(t.right, o), h = t, null !== l && l.obj[i] < r && (h = l), null !== u && u.obj[i] < h.obj[i] && (h = u), h)); - } - - var i, r, u; - if (null === t.left && null === t.right) return null === t.parent ? void (l.root = null) : (u = e[t.parent.dimension], void (t.obj[u] < t.parent.obj[u] ? t.parent.left = null : t.parent.right = null)); - null !== t.right ? (r = (i = n(t.right, t.dimension)).obj, o(i), t.obj = r) : (r = (i = n(t.left, t.dimension)).obj, o(i), t.right = t.left, t.left = null, t.obj = r); - } - - var i; - null !== (i = n(l.root)) && o(i); - }, this.nearest = function (t, n, r) { - function u(o) { - function r(t, o) { - f.push([t, o]), f.size() > n && f.pop(); - } - - var l, - h, - s, - c, - a = e[o.dimension], - g = i(t, o.obj), - p = {}; - - for (c = 0; c < e.length; c += 1) c === o.dimension ? p[e[c]] = t[e[c]] : p[e[c]] = o.obj[e[c]]; - - h = i(p, o.obj), null !== o.right || null !== o.left ? (u(l = null === o.right ? o.left : null === o.left ? o.right : t[a] < o.obj[a] ? o.left : o.right), (f.size() < n || g < f.peek()[1]) && r(o, g), (f.size() < n || Math.abs(h) < f.peek()[1]) && null !== (s = l === o.left ? o.right : o.left) && u(s)) : (f.size() < n || g < f.peek()[1]) && r(o, g); - } - - var h, s, f; - if (f = new o(function (t) { - return -t[1]; - }), r) for (h = 0; h < n; h += 1) f.push([null, r]); - - for (l.root && u(l.root), s = [], h = 0; h < Math.min(n, f.content.length); h += 1) f.content[h][0] && s.push([f.content[h][0].obj, f.content[h][1]]); - - return s; - }, this.balanceFactor = function () { - function t(n) { - return null === n ? 0 : Math.max(t(n.left), t(n.right)) + 1; - } - - function n(t) { - return null === t ? 0 : n(t.left) + n(t.right) + 1; - } - - return t(l.root) / (Math.log(n(l.root)) / Math.log(2)); - }; - }, t.BinaryHeap = o; - }); - })(kdTreeMin); - - var munkres$1 = {exports: {}}; - - /** - * Introduction - * ============ - * - * The Munkres module provides an implementation of the Munkres algorithm - * (also called the Hungarian algorithm or the Kuhn-Munkres algorithm), - * useful for solving the Assignment Problem. - * - * Assignment Problem - * ================== - * - * Let C be an n×n-matrix representing the costs of each of n workers - * to perform any of n jobs. The assignment problem is to assign jobs to - * workers in a way that minimizes the total cost. Since each worker can perform - * only one job and each job can be assigned to only one worker the assignments - * represent an independent set of the matrix C. - * - * One way to generate the optimal set is to create all permutations of - * the indices necessary to traverse the matrix so that no row and column - * are used more than once. For instance, given this matrix (expressed in - * Python) - * - * matrix = [[5, 9, 1], - * [10, 3, 2], - * [8, 7, 4]] - * - * You could use this code to generate the traversal indices:: - * - * def permute(a, results): - * if len(a) == 1: - * results.insert(len(results), a) - * - * else: - * for i in range(0, len(a)): - * element = a[i] - * a_copy = [a[j] for j in range(0, len(a)) if j != i] - * subresults = [] - * permute(a_copy, subresults) - * for subresult in subresults: - * result = [element] + subresult - * results.insert(len(results), result) - * - * results = [] - * permute(range(len(matrix)), results) # [0, 1, 2] for a 3x3 matrix - * - * After the call to permute(), the results matrix would look like this:: - * - * [[0, 1, 2], - * [0, 2, 1], - * [1, 0, 2], - * [1, 2, 0], - * [2, 0, 1], - * [2, 1, 0]] - * - * You could then use that index matrix to loop over the original cost matrix - * and calculate the smallest cost of the combinations - * - * n = len(matrix) - * minval = sys.maxsize - * for row in range(n): - * cost = 0 - * for col in range(n): - * cost += matrix[row][col] - * minval = min(cost, minval) - * - * print minval - * - * While this approach works fine for small matrices, it does not scale. It - * executes in O(n!) time: Calculating the permutations for an n×x-matrix - * requires n! operations. For a 12×12 matrix, that’s 479,001,600 - * traversals. Even if you could manage to perform each traversal in just one - * millisecond, it would still take more than 133 hours to perform the entire - * traversal. A 20×20 matrix would take 2,432,902,008,176,640,000 operations. At - * an optimistic millisecond per operation, that’s more than 77 million years. - * - * The Munkres algorithm runs in O(n³) time, rather than O(n!). This - * package provides an implementation of that algorithm. - * - * This version is based on - * http://csclab.murraystate.edu/~bob.pilgrim/445/munkres.html - * - * This version was originally written for Python by Brian Clapper from the - * algorithm at the above web site (The ``Algorithm::Munkres`` Perl version, - * in CPAN, was clearly adapted from the same web site.) and ported to - * JavaScript by Anna Henningsen (addaleax). - * - * Usage - * ===== - * - * Construct a Munkres object - * - * var m = new Munkres(); - * - * Then use it to compute the lowest cost assignment from a cost matrix. Here’s - * a sample program - * - * var matrix = [[5, 9, 1], - * [10, 3, 2], - * [8, 7, 4]]; - * var m = new Munkres(); - * var indices = m.compute(matrix); - * console.log(format_matrix(matrix), 'Lowest cost through this matrix:'); - * var total = 0; - * for (var i = 0; i < indices.length; ++i) { - * var row = indices[l][0], col = indices[l][1]; - * var value = matrix[row][col]; - * total += value; - * - * console.log('(' + rol + ', ' + col + ') -> ' + value); - * } - * - * console.log('total cost:', total); - * - * Running that program produces:: - * - * Lowest cost through this matrix: - * [5, 9, 1] - * [10, 3, 2] - * [8, 7, 4] - * (0, 0) -> 5 - * (1, 1) -> 3 - * (2, 2) -> 4 - * total cost: 12 - * - * The instantiated Munkres object can be used multiple times on different - * matrices. - * - * Non-square Cost Matrices - * ======================== - * - * The Munkres algorithm assumes that the cost matrix is square. However, it's - * possible to use a rectangular matrix if you first pad it with 0 values to make - * it square. This module automatically pads rectangular cost matrices to make - * them square. - * - * Notes: - * - * - The module operates on a *copy* of the caller's matrix, so any padding will - * not be seen by the caller. - * - The cost matrix must be rectangular or square. An irregular matrix will - * *not* work. - * - * Calculating Profit, Rather than Cost - * ==================================== - * - * The cost matrix is just that: A cost matrix. The Munkres algorithm finds - * the combination of elements (one from each row and column) that results in - * the smallest cost. It’s also possible to use the algorithm to maximize - * profit. To do that, however, you have to convert your profit matrix to a - * cost matrix. The simplest way to do that is to subtract all elements from a - * large value. - * - * The ``munkres`` module provides a convenience method for creating a cost - * matrix from a profit matrix, i.e. make_cost_matrix. - * - * References - * ========== - * - * 1. http://www.public.iastate.edu/~ddoty/HungarianAlgorithm.html - * - * 2. Harold W. Kuhn. The Hungarian Method for the assignment problem. - * *Naval Research Logistics Quarterly*, 2:83-97, 1955. - * - * 3. Harold W. Kuhn. Variants of the Hungarian method for assignment - * problems. *Naval Research Logistics Quarterly*, 3: 253-258, 1956. - * - * 4. Munkres, J. Algorithms for the Assignment and Transportation Problems. - * *Journal of the Society of Industrial and Applied Mathematics*, - * 5(1):32-38, March, 1957. - * - * 5. https://en.wikipedia.org/wiki/Hungarian_algorithm - * - * Copyright and License - * ===================== - * - * Copyright 2008-2016 Brian M. Clapper - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - (function (module) { - /** - * A very large numerical value which can be used like an integer - * (i. e., adding integers of similar size does not result in overflow). - */ - var MAX_SIZE = parseInt(Number.MAX_SAFE_INTEGER / 2) || (1 << 26) * (1 << 26); - /** - * A default value to pad the cost matrix with if it is not quadratic. - */ - - var DEFAULT_PAD_VALUE = 0; // --------------------------------------------------------------------------- - // Classes - // --------------------------------------------------------------------------- - - /** - * Calculate the Munkres solution to the classical assignment problem. - * See the module documentation for usage. - * @constructor - */ - - function Munkres() { - this.C = null; - this.row_covered = []; - this.col_covered = []; - this.n = 0; - this.Z0_r = 0; - this.Z0_c = 0; - this.marked = null; - this.path = null; - } - /** - * Pad a possibly non-square matrix to make it square. - * - * @param {Array} matrix An array of arrays containing the matrix cells - * @param {Number} [pad_value] The value used to pad a rectangular matrix - * - * @return {Array} An array of arrays representing the padded matrix - */ - - - Munkres.prototype.pad_matrix = function (matrix, pad_value) { - pad_value = pad_value || DEFAULT_PAD_VALUE; - var max_columns = 0; - var total_rows = matrix.length; - var i; - - for (i = 0; i < total_rows; ++i) if (matrix[i].length > max_columns) max_columns = matrix[i].length; - - total_rows = max_columns > total_rows ? max_columns : total_rows; - var new_matrix = []; - - for (i = 0; i < total_rows; ++i) { - var row = matrix[i] || []; - var new_row = row.slice(); // If this row is too short, pad it - - while (total_rows > new_row.length) new_row.push(pad_value); - - new_matrix.push(new_row); - } - - return new_matrix; - }; - /** - * Compute the indices for the lowest-cost pairings between rows and columns - * in the database. Returns a list of (row, column) tuples that can be used - * to traverse the matrix. - * - * **WARNING**: This code handles square and rectangular matrices. - * It does *not* handle irregular matrices. - * - * @param {Array} cost_matrix The cost matrix. If this cost matrix is not square, - * it will be padded with DEFAULT_PAD_VALUE. Optionally, - * the pad value can be specified via options.padValue. - * This method does *not* modify the caller's matrix. - * It operates on a copy of the matrix. - * @param {Object} [options] Additional options to pass in - * @param {Number} [options.padValue] The value to use to pad a rectangular cost_matrix - * - * @return {Array} An array of ``(row, column)`` arrays that describe the lowest - * cost path through the matrix - */ - - - Munkres.prototype.compute = function (cost_matrix, options) { - options = options || {}; - options.padValue = options.padValue || DEFAULT_PAD_VALUE; - this.C = this.pad_matrix(cost_matrix, options.padValue); - this.n = this.C.length; - this.original_length = cost_matrix.length; - this.original_width = cost_matrix[0].length; - var nfalseArray = []; - /* array of n false values */ - - while (nfalseArray.length < this.n) nfalseArray.push(false); - - this.row_covered = nfalseArray.slice(); - this.col_covered = nfalseArray.slice(); - this.Z0_r = 0; - this.Z0_c = 0; - this.path = this.__make_matrix(this.n * 2, 0); - this.marked = this.__make_matrix(this.n, 0); - var step = 1; - var steps = { - 1: this.__step1, - 2: this.__step2, - 3: this.__step3, - 4: this.__step4, - 5: this.__step5, - 6: this.__step6 - }; - - while (true) { - var func = steps[step]; - if (!func) // done - break; - step = func.apply(this); - } - - var results = []; - - for (var i = 0; i < this.original_length; ++i) for (var j = 0; j < this.original_width; ++j) if (this.marked[i][j] == 1) results.push([i, j]); - - return results; - }; - /** - * Create an n×n matrix, populating it with the specific value. - * - * @param {Number} n Matrix dimensions - * @param {Number} val Value to populate the matrix with - * - * @return {Array} An array of arrays representing the newly created matrix - */ - - - Munkres.prototype.__make_matrix = function (n, val) { - var matrix = []; - - for (var i = 0; i < n; ++i) { - matrix[i] = []; - - for (var j = 0; j < n; ++j) matrix[i][j] = val; - } - - return matrix; - }; - /** - * For each row of the matrix, find the smallest element and - * subtract it from every element in its row. Go to Step 2. - */ - - - Munkres.prototype.__step1 = function () { - for (var i = 0; i < this.n; ++i) { - // Find the minimum value for this row and subtract that minimum - // from every element in the row. - var minval = Math.min.apply(Math, this.C[i]); - - for (var j = 0; j < this.n; ++j) this.C[i][j] -= minval; - } - - return 2; - }; - /** - * Find a zero (Z) in the resulting matrix. If there is no starred - * zero in its row or column, star Z. Repeat for each element in the - * matrix. Go to Step 3. - */ - - - Munkres.prototype.__step2 = function () { - for (var i = 0; i < this.n; ++i) { - for (var j = 0; j < this.n; ++j) { - if (this.C[i][j] === 0 && !this.col_covered[j] && !this.row_covered[i]) { - this.marked[i][j] = 1; - this.col_covered[j] = true; - this.row_covered[i] = true; - break; - } - } - } - - this.__clear_covers(); - - return 3; - }; - /** - * Cover each column containing a starred zero. If K columns are - * covered, the starred zeros describe a complete set of unique - * assignments. In this case, Go to DONE, otherwise, Go to Step 4. - */ - - - Munkres.prototype.__step3 = function () { - var count = 0; - - for (var i = 0; i < this.n; ++i) { - for (var j = 0; j < this.n; ++j) { - if (this.marked[i][j] == 1 && this.col_covered[j] == false) { - this.col_covered[j] = true; - ++count; - } - } - } - - return count >= this.n ? 7 : 4; - }; - /** - * Find a noncovered zero and prime it. If there is no starred zero - * in the row containing this primed zero, Go to Step 5. Otherwise, - * cover this row and uncover the column containing the starred - * zero. Continue in this manner until there are no uncovered zeros - * left. Save the smallest uncovered value and Go to Step 6. - */ - - - Munkres.prototype.__step4 = function () { - var done = false; - var row = -1, - col = -1, - star_col = -1; - - while (!done) { - var z = this.__find_a_zero(); - - row = z[0]; - col = z[1]; - if (row < 0) return 6; - this.marked[row][col] = 2; - star_col = this.__find_star_in_row(row); - - if (star_col >= 0) { - col = star_col; - this.row_covered[row] = true; - this.col_covered[col] = false; - } else { - this.Z0_r = row; - this.Z0_c = col; - return 5; - } - } - }; - /** - * Construct a series of alternating primed and starred zeros as - * follows. Let Z0 represent the uncovered primed zero found in Step 4. - * Let Z1 denote the starred zero in the column of Z0 (if any). - * Let Z2 denote the primed zero in the row of Z1 (there will always - * be one). Continue until the series terminates at a primed zero - * that has no starred zero in its column. Unstar each starred zero - * of the series, star each primed zero of the series, erase all - * primes and uncover every line in the matrix. Return to Step 3 - */ - - - Munkres.prototype.__step5 = function () { - var count = 0; - this.path[count][0] = this.Z0_r; - this.path[count][1] = this.Z0_c; - var done = false; - - while (!done) { - var row = this.__find_star_in_col(this.path[count][1]); - - if (row >= 0) { - count++; - this.path[count][0] = row; - this.path[count][1] = this.path[count - 1][1]; - } else { - done = true; - } - - if (!done) { - var col = this.__find_prime_in_row(this.path[count][0]); - - count++; - this.path[count][0] = this.path[count - 1][0]; - this.path[count][1] = col; - } - } - - this.__convert_path(this.path, count); - - this.__clear_covers(); - - this.__erase_primes(); - - return 3; - }; - /** - * Add the value found in Step 4 to every element of each covered - * row, and subtract it from every element of each uncovered column. - * Return to Step 4 without altering any stars, primes, or covered - * lines. - */ - - - Munkres.prototype.__step6 = function () { - var minval = this.__find_smallest(); - - for (var i = 0; i < this.n; ++i) { - for (var j = 0; j < this.n; ++j) { - if (this.row_covered[i]) this.C[i][j] += minval; - if (!this.col_covered[j]) this.C[i][j] -= minval; - } - } - - return 4; - }; - /** - * Find the smallest uncovered value in the matrix. - * - * @return {Number} The smallest uncovered value, or MAX_SIZE if no value was found - */ - - - Munkres.prototype.__find_smallest = function () { - var minval = MAX_SIZE; - - for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (!this.row_covered[i] && !this.col_covered[j]) if (minval > this.C[i][j]) minval = this.C[i][j]; - - return minval; - }; - /** - * Find the first uncovered element with value 0. - * - * @return {Array} The indices of the found element or [-1, -1] if not found - */ - - - Munkres.prototype.__find_a_zero = function () { - for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.C[i][j] === 0 && !this.row_covered[i] && !this.col_covered[j]) return [i, j]; - - return [-1, -1]; - }; - /** - * Find the first starred element in the specified row. Returns - * the column index, or -1 if no starred element was found. - * - * @param {Number} row The index of the row to search - * @return {Number} - */ - - - Munkres.prototype.__find_star_in_row = function (row) { - for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 1) return j; - - return -1; - }; - /** - * Find the first starred element in the specified column. - * - * @return {Number} The row index, or -1 if no starred element was found - */ - - - Munkres.prototype.__find_star_in_col = function (col) { - for (var i = 0; i < this.n; ++i) if (this.marked[i][col] == 1) return i; - - return -1; - }; - /** - * Find the first prime element in the specified row. - * - * @return {Number} The column index, or -1 if no prime element was found - */ - - - Munkres.prototype.__find_prime_in_row = function (row) { - for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 2) return j; - - return -1; - }; - - Munkres.prototype.__convert_path = function (path, count) { - for (var i = 0; i <= count; ++i) this.marked[path[i][0]][path[i][1]] = this.marked[path[i][0]][path[i][1]] == 1 ? 0 : 1; - }; - /** Clear all covered matrix cells */ - - - Munkres.prototype.__clear_covers = function () { - for (var i = 0; i < this.n; ++i) { - this.row_covered[i] = false; - this.col_covered[i] = false; - } - }; - /** Erase all prime markings */ - - - Munkres.prototype.__erase_primes = function () { - for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.marked[i][j] == 2) this.marked[i][j] = 0; - }; // --------------------------------------------------------------------------- - // Functions - // --------------------------------------------------------------------------- - - /** - * Create a cost matrix from a profit matrix by calling - * 'inversion_function' to invert each value. The inversion - * function must take one numeric argument (of any type) and return - * another numeric argument which is presumed to be the cost inverse - * of the original profit. - * - * This is a static method. Call it like this: - * - * cost_matrix = make_cost_matrix(matrix[, inversion_func]); - * - * For example: - * - * cost_matrix = make_cost_matrix(matrix, function(x) { return MAXIMUM - x; }); - * - * @param {Array} profit_matrix An array of arrays representing the matrix - * to convert from a profit to a cost matrix - * @param {Function} [inversion_function] The function to use to invert each - * entry in the profit matrix - * - * @return {Array} The converted matrix - */ - - - function make_cost_matrix(profit_matrix, inversion_function) { - var i, j; - - if (!inversion_function) { - var maximum = -1.0 / 0.0; - - for (i = 0; i < profit_matrix.length; ++i) for (j = 0; j < profit_matrix[i].length; ++j) if (profit_matrix[i][j] > maximum) maximum = profit_matrix[i][j]; - - inversion_function = function (x) { - return maximum - x; - }; - } - - var cost_matrix = []; - - for (i = 0; i < profit_matrix.length; ++i) { - var row = profit_matrix[i]; - cost_matrix[i] = []; - - for (j = 0; j < row.length; ++j) cost_matrix[i][j] = inversion_function(profit_matrix[i][j]); - } - - return cost_matrix; - } - /** - * Convenience function: Converts the contents of a matrix of integers - * to a printable string. - * - * @param {Array} matrix The matrix to print - * - * @return {String} The formatted matrix - */ - - - function format_matrix(matrix) { - var columnWidths = []; - var i, j; - - for (i = 0; i < matrix.length; ++i) { - for (j = 0; j < matrix[i].length; ++j) { - var entryWidth = String(matrix[i][j]).length; - if (!columnWidths[j] || entryWidth >= columnWidths[j]) columnWidths[j] = entryWidth; - } - } - - var formatted = ''; - - for (i = 0; i < matrix.length; ++i) { - for (j = 0; j < matrix[i].length; ++j) { - var s = String(matrix[i][j]); // pad at front with spaces - - while (s.length < columnWidths[j]) s = ' ' + s; - - formatted += s; // separate columns - - if (j != matrix[i].length - 1) formatted += ' '; - } - - if (i != matrix[i].length - 1) formatted += '\n'; - } - - return formatted; - } // --------------------------------------------------------------------------- - // Exports - // --------------------------------------------------------------------------- - - - function computeMunkres(cost_matrix, options) { - var m = new Munkres(); - return m.compute(cost_matrix, options); - } - - computeMunkres.version = "1.2.2"; - computeMunkres.format_matrix = format_matrix; - computeMunkres.make_cost_matrix = make_cost_matrix; - computeMunkres.Munkres = Munkres; // backwards compatibility - - if (module.exports) { - module.exports = computeMunkres; - } - })(munkres$1); - - var lodash_isequal = {exports: {}}; - - /** - * Lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright JS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - - (function (module, exports) { - /** Used as the size to enable large array optimizations. */ - var LARGE_ARRAY_SIZE = 200; - /** Used to stand-in for `undefined` hash values. */ - - var HASH_UNDEFINED = '__lodash_hash_undefined__'; - /** Used to compose bitmasks for value comparisons. */ - - var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - /** Used as references for various `Number` constants. */ - - var MAX_SAFE_INTEGER = 9007199254740991; - /** `Object#toString` result references. */ - - var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - asyncTag = '[object AsyncFunction]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - mapTag = '[object Map]', - numberTag = '[object Number]', - nullTag = '[object Null]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - proxyTag = '[object Proxy]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]', - undefinedTag = '[object Undefined]', - weakMapTag = '[object WeakMap]'; - var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - /** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ - - var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - /** Used to detect host constructors (Safari). */ - - var reIsHostCtor = /^\[object .+?Constructor\]$/; - /** Used to detect unsigned integer values. */ - - var reIsUint = /^(?:0|[1-9]\d*)$/; - /** Used to identify `toStringTag` values of typed arrays. */ - - var typedArrayTags = {}; - typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; - typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; - /** Detect free variable `global` from Node.js. */ - - var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; - /** Detect free variable `self`. */ - - var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - /** Used as a reference to the global object. */ - - var root = freeGlobal || freeSelf || Function('return this')(); - /** Detect free variable `exports`. */ - - var freeExports = exports && !exports.nodeType && exports; - /** Detect free variable `module`. */ - - var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; - /** Detect the popular CommonJS extension `module.exports`. */ - - var moduleExports = freeModule && freeModule.exports === freeExports; - /** Detect free variable `process` from Node.js. */ - - var freeProcess = moduleExports && freeGlobal.process; - /** Used to access faster Node.js helpers. */ - - var nodeUtil = function () { - try { - return freeProcess && freeProcess.binding && freeProcess.binding('util'); - } catch (e) {} - }(); - /* Node.js helper references. */ - - - var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; - /** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ - - function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - - if (predicate(value, index, array)) { - result[resIndex++] = value; - } - } - - return result; - } - /** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ - - - function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - - while (++index < length) { - array[offset + index] = values[index]; - } - - return array; - } - /** - * A specialized version of `_.some` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ - - - function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - - return false; - } - /** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ - - - function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - - return result; - } - /** - * The base implementation of `_.unary` without support for storing metadata. - * - * @private - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. - */ - - - function baseUnary(func) { - return function (value) { - return func(value); - }; - } - /** - * Checks if a `cache` value for `key` exists. - * - * @private - * @param {Object} cache The cache to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - - - function cacheHas(cache, key) { - return cache.has(key); - } - /** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ - - - function getValue(object, key) { - return object == null ? undefined : object[key]; - } - /** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. - */ - - - function mapToArray(map) { - var index = -1, - result = Array(map.size); - map.forEach(function (value, key) { - result[++index] = [key, value]; - }); - return result; - } - /** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ - - - function overArg(func, transform) { - return function (arg) { - return func(transform(arg)); - }; - } - /** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ - - - function setToArray(set) { - var index = -1, - result = Array(set.size); - set.forEach(function (value) { - result[++index] = value; - }); - return result; - } - /** Used for built-in method references. */ - - - var arrayProto = Array.prototype, - funcProto = Function.prototype, - objectProto = Object.prototype; - /** Used to detect overreaching core-js shims. */ - - var coreJsData = root['__core-js_shared__']; - /** Used to resolve the decompiled source of functions. */ - - var funcToString = funcProto.toString; - /** Used to check objects for own properties. */ - - var hasOwnProperty = objectProto.hasOwnProperty; - /** Used to detect methods masquerading as native. */ - - var maskSrcKey = function () { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? 'Symbol(src)_1.' + uid : ''; - }(); - /** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ - - - var nativeObjectToString = objectProto.toString; - /** Used to detect if a method is native. */ - - var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); - /** Built-in value references. */ - - var Buffer = moduleExports ? root.Buffer : undefined, - Symbol = root.Symbol, - Uint8Array = root.Uint8Array, - propertyIsEnumerable = objectProto.propertyIsEnumerable, - splice = arrayProto.splice, - symToStringTag = Symbol ? Symbol.toStringTag : undefined; - /* Built-in method references for those with the same name as other `lodash` methods. */ - - var nativeGetSymbols = Object.getOwnPropertySymbols, - nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, - nativeKeys = overArg(Object.keys, Object); - /* Built-in method references that are verified to be native. */ - - var DataView = getNative(root, 'DataView'), - Map = getNative(root, 'Map'), - Promise = getNative(root, 'Promise'), - Set = getNative(root, 'Set'), - WeakMap = getNative(root, 'WeakMap'), - nativeCreate = getNative(Object, 'create'); - /** Used to detect maps, sets, and weakmaps. */ - - var dataViewCtorString = toSource(DataView), - mapCtorString = toSource(Map), - promiseCtorString = toSource(Promise), - setCtorString = toSource(Set), - weakMapCtorString = toSource(WeakMap); - /** Used to convert symbols to primitives and strings. */ - - var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - /** - * Creates a hash object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - - function Hash(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - this.clear(); - - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } - /** - * Removes all key-value entries from the hash. - * - * @private - * @name clear - * @memberOf Hash - */ - - - function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; - this.size = 0; - } - /** - * Removes `key` and its value from the hash. - * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - - - function hashDelete(key) { - var result = this.has(key) && delete this.__data__[key]; - this.size -= result ? 1 : 0; - return result; - } - /** - * Gets the hash value for `key`. - * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - - - function hashGet(key) { - var data = this.__data__; - - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; - } - - return hasOwnProperty.call(data, key) ? data[key] : undefined; - } - /** - * Checks if a hash value for `key` exists. - * - * @private - * @name has - * @memberOf Hash - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - - - function hashHas(key) { - var data = this.__data__; - return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); - } - /** - * Sets the hash `key` to `value`. - * - * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. - */ - - - function hashSet(key, value) { - var data = this.__data__; - this.size += this.has(key) ? 0 : 1; - data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value; - return this; - } // Add methods to `Hash`. - - - Hash.prototype.clear = hashClear; - Hash.prototype['delete'] = hashDelete; - Hash.prototype.get = hashGet; - Hash.prototype.has = hashHas; - Hash.prototype.set = hashSet; - /** - * Creates an list cache object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - - function ListCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - this.clear(); - - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } - /** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ - - - function listCacheClear() { - this.__data__ = []; - this.size = 0; - } - /** - * Removes `key` and its value from the list cache. - * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - - - function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - return false; - } - - var lastIndex = data.length - 1; - - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - - --this.size; - return true; - } - /** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - - - function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - return index < 0 ? undefined : data[index][1]; - } - /** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - - - function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; - } - /** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ - - - function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - ++this.size; - data.push([key, value]); - } else { - data[index][1] = value; - } - - return this; - } // Add methods to `ListCache`. - - - ListCache.prototype.clear = listCacheClear; - ListCache.prototype['delete'] = listCacheDelete; - ListCache.prototype.get = listCacheGet; - ListCache.prototype.has = listCacheHas; - ListCache.prototype.set = listCacheSet; - /** - * Creates a map cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - - function MapCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - this.clear(); - - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } - /** - * Removes all key-value entries from the map. - * - * @private - * @name clear - * @memberOf MapCache - */ - - - function mapCacheClear() { - this.size = 0; - this.__data__ = { - 'hash': new Hash(), - 'map': new (Map || ListCache)(), - 'string': new Hash() - }; - } - /** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - - - function mapCacheDelete(key) { - var result = getMapData(this, key)['delete'](key); - this.size -= result ? 1 : 0; - return result; - } - /** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - - - function mapCacheGet(key) { - return getMapData(this, key).get(key); - } - /** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - - - function mapCacheHas(key) { - return getMapData(this, key).has(key); - } - /** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ - - - function mapCacheSet(key, value) { - var data = getMapData(this, key), - size = data.size; - data.set(key, value); - this.size += data.size == size ? 0 : 1; - return this; - } // Add methods to `MapCache`. - - - MapCache.prototype.clear = mapCacheClear; - MapCache.prototype['delete'] = mapCacheDelete; - MapCache.prototype.get = mapCacheGet; - MapCache.prototype.has = mapCacheHas; - MapCache.prototype.set = mapCacheSet; - /** - * - * Creates an array cache object to store unique values. - * - * @private - * @constructor - * @param {Array} [values] The values to cache. - */ - - function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; - this.__data__ = new MapCache(); - - while (++index < length) { - this.add(values[index]); - } - } - /** - * Adds `value` to the array cache. - * - * @private - * @name add - * @memberOf SetCache - * @alias push - * @param {*} value The value to cache. - * @returns {Object} Returns the cache instance. - */ - - - function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - - return this; - } - /** - * Checks if `value` is in the array cache. - * - * @private - * @name has - * @memberOf SetCache - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. - */ - - - function setCacheHas(value) { - return this.__data__.has(value); - } // Add methods to `SetCache`. - - - SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; - SetCache.prototype.has = setCacheHas; - /** - * Creates a stack cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - - function Stack(entries) { - var data = this.__data__ = new ListCache(entries); - this.size = data.size; - } - /** - * Removes all key-value entries from the stack. - * - * @private - * @name clear - * @memberOf Stack - */ - - - function stackClear() { - this.__data__ = new ListCache(); - this.size = 0; - } - /** - * Removes `key` and its value from the stack. - * - * @private - * @name delete - * @memberOf Stack - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - - - function stackDelete(key) { - var data = this.__data__, - result = data['delete'](key); - this.size = data.size; - return result; - } - /** - * Gets the stack value for `key`. - * - * @private - * @name get - * @memberOf Stack - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - - - function stackGet(key) { - return this.__data__.get(key); - } - /** - * Checks if a stack value for `key` exists. - * - * @private - * @name has - * @memberOf Stack - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - - - function stackHas(key) { - return this.__data__.has(key); - } - /** - * Sets the stack `key` to `value`. - * - * @private - * @name set - * @memberOf Stack - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the stack cache instance. - */ - - - function stackSet(key, value) { - var data = this.__data__; - - if (data instanceof ListCache) { - var pairs = data.__data__; - - if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) { - pairs.push([key, value]); - this.size = ++data.size; - return this; - } - - data = this.__data__ = new MapCache(pairs); - } - - data.set(key, value); - this.size = data.size; - return this; - } // Add methods to `Stack`. - - - Stack.prototype.clear = stackClear; - Stack.prototype['delete'] = stackDelete; - Stack.prototype.get = stackGet; - Stack.prototype.has = stackHas; - Stack.prototype.set = stackSet; - /** - * Creates an array of the enumerable property names of the array-like `value`. - * - * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. - */ - - function arrayLikeKeys(value, inherited) { - var isArr = isArray(value), - isArg = !isArr && isArguments(value), - isBuff = !isArr && !isArg && isBuffer(value), - isType = !isArr && !isArg && !isBuff && isTypedArray(value), - skipIndexes = isArr || isArg || isBuff || isType, - result = skipIndexes ? baseTimes(value.length, String) : [], - length = result.length; - - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. - key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. - isBuff && (key == 'offset' || key == 'parent') || // PhantomJS 2 has enumerable non-index properties on typed arrays. - isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || // Skip index properties. - isIndex(key, length)))) { - result.push(key); - } - } - - return result; - } - /** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - - - function assocIndexOf(array, key) { - var length = array.length; - - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - - return -1; - } - /** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. - */ - - - function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); - } - /** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ - - - function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - - return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); - } - /** - * The base implementation of `_.isArguments`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - */ - - - function baseIsArguments(value) { - return isObjectLike(value) && baseGetTag(value) == argsTag; - } - /** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ - - - function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - - if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) { - return value !== value && other !== other; - } - - return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); - } - /** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - - - function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = objIsArr ? arrayTag : getTag(object), - othTag = othIsArr ? arrayTag : getTag(other); - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - - if (isSameTag && isBuffer(object)) { - if (!isBuffer(other)) { - return false; - } - - objIsArr = true; - objIsObj = false; - } - - if (isSameTag && !objIsObj) { - stack || (stack = new Stack()); - return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); - } - - if (!(bitmask & COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; - stack || (stack = new Stack()); - return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); - } - } - - if (!isSameTag) { - return false; - } - - stack || (stack = new Stack()); - return equalObjects(object, other, bitmask, customizer, equalFunc, stack); - } - /** - * The base implementation of `_.isNative` without bad shim checks. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - */ - - - function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - - var pattern = isFunction(value) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); - } - /** - * The base implementation of `_.isTypedArray` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - */ - - - function baseIsTypedArray(value) { - return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; - } - /** - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ - - - function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); - } - - var result = []; - - for (var key in Object(object)) { - if (hasOwnProperty.call(object, key) && key != 'constructor') { - result.push(key); - } - } - - return result; - } - /** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ - - - function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } // Assume cyclic values are equal. - - - var stacked = stack.get(array); - - if (stacked && stack.get(other)) { - return stacked == other; - } - - var index = -1, - result = true, - seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined; - stack.set(array, other); - stack.set(other, array); // Ignore non-index properties. - - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; - - if (customizer) { - var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); - } - - if (compared !== undefined) { - if (compared) { - continue; - } - - result = false; - break; - } // Recursively compare arrays (susceptible to call stack limits). - - - if (seen) { - if (!arraySome(other, function (othValue, othIndex) { - if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; - } - } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - result = false; - break; - } - } - - stack['delete'](array); - stack['delete'](other); - return result; - } - /** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - - - function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - case dataViewTag: - if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { - return false; - } - - object = object.buffer; - other = other.buffer; - - case arrayBufferTag: - if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { - return false; - } - - return true; - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return eq(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == other + ''; - - case mapTag: - var convert = mapToArray; - - case setTag: - var isPartial = bitmask & COMPARE_PARTIAL_FLAG; - convert || (convert = setToArray); - - if (object.size != other.size && !isPartial) { - return false; - } // Assume cyclic values are equal. - - - var stacked = stack.get(object); - - if (stacked) { - return stacked == other; - } - - bitmask |= COMPARE_UNORDERED_FLAG; // Recursively compare objects (susceptible to call stack limits). - - stack.set(object, other); - var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); - return result; - - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } - - } - - return false; - } - /** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - - - function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - objProps = getAllKeys(object), - objLength = objProps.length, - othProps = getAllKeys(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - - var index = objLength; - - while (index--) { - var key = objProps[index]; - - if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } // Assume cyclic values are equal. - - - var stacked = stack.get(object); - - if (stacked && stack.get(other)) { - return stacked == other; - } - - var result = true; - stack.set(object, other); - stack.set(other, object); - var skipCtor = isPartial; - - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - if (customizer) { - var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); - } // Recursively compare objects (susceptible to call stack limits). - - - if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { - result = false; - break; - } - - skipCtor || (skipCtor = key == 'constructor'); - } - - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. - - if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } - } - - stack['delete'](object); - stack['delete'](other); - return result; - } - /** - * Creates an array of own enumerable property names and symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ - - - function getAllKeys(object) { - return baseGetAllKeys(object, keys, getSymbols); - } - /** - * Gets the data for `map`. - * - * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. - */ - - - function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; - } - /** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ - - - function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; - } - /** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ - - - function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; - - try { - value[symToStringTag] = undefined; - var unmasked = true; - } catch (e) {} - - var result = nativeObjectToString.call(value); - - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; - } - } - - return result; - } - /** - * Creates an array of the own enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ - - - var getSymbols = !nativeGetSymbols ? stubArray : function (object) { - if (object == null) { - return []; - } - - object = Object(object); - return arrayFilter(nativeGetSymbols(object), function (symbol) { - return propertyIsEnumerable.call(object, symbol); - }); - }; - /** - * Gets the `toStringTag` of `value`. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ - - var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. - - if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) { - getTag = function (value) { - var result = baseGetTag(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : ''; - - if (ctorString) { - switch (ctorString) { - case dataViewCtorString: - return dataViewTag; - - case mapCtorString: - return mapTag; - - case promiseCtorString: - return promiseTag; - - case setCtorString: - return setTag; - - case weakMapCtorString: - return weakMapTag; - } - } - - return result; - }; - } - /** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ - - - function isIndex(value, length) { - length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length; - } - /** - * Checks if `value` is suitable for use as unique object key. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. - */ - - - function isKeyable(value) { - var type = typeof value; - return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null; - } - /** - * Checks if `func` has its source masked. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. - */ - - - function isMasked(func) { - return !!maskSrcKey && maskSrcKey in func; - } - /** - * Checks if `value` is likely a prototype object. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. - */ - - - function isPrototype(value) { - var Ctor = value && value.constructor, - proto = typeof Ctor == 'function' && Ctor.prototype || objectProto; - return value === proto; - } - /** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ - - - function objectToString(value) { - return nativeObjectToString.call(value); - } - /** - * Converts `func` to its source code. - * - * @private - * @param {Function} func The function to convert. - * @returns {string} Returns the source code. - */ - - - function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - - try { - return func + ''; - } catch (e) {} - } - - return ''; - } - /** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ - - - function eq(value, other) { - return value === other || value !== value && other !== other; - } - /** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ - - - var isArguments = baseIsArguments(function () { - return arguments; - }()) ? baseIsArguments : function (value) { - return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); - }; - /** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ - - var isArray = Array.isArray; - /** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ - - function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); - } - /** - * Checks if `value` is a buffer. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. - * @example - * - * _.isBuffer(new Buffer(2)); - * // => true - * - * _.isBuffer(new Uint8Array(2)); - * // => false - */ - - - var isBuffer = nativeIsBuffer || stubFalse; - /** - * Performs a deep comparison between two values to determine if they are - * equivalent. - * - * **Note:** This method supports comparing arrays, array buffers, booleans, - * date objects, error objects, maps, numbers, `Object` objects, regexes, - * sets, strings, symbols, and typed arrays. `Object` objects are compared - * by their own, not inherited, enumerable properties. Functions and DOM - * nodes are compared by strict equality, i.e. `===`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.isEqual(object, other); - * // => true - * - * object === other; - * // => false - */ - - function isEqual(value, other) { - return baseIsEqual(value, other); - } - /** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ - - - function isFunction(value) { - if (!isObject(value)) { - return false; - } // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 9 which returns 'object' for typed arrays and other constructors. - - - var tag = baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; - } - /** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ - - - function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; - } - /** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ - - - function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); - } - /** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ - - - function isObjectLike(value) { - return value != null && typeof value == 'object'; - } - /** - * Checks if `value` is classified as a typed array. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - * @example - * - * _.isTypedArray(new Uint8Array); - * // => true - * - * _.isTypedArray([]); - * // => false - */ - - - var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; - /** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ - - function keys(object) { - return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); - } - /** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ - - - function stubArray() { - return []; - } - /** - * This method returns `false`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `false`. - * @example - * - * _.times(2, _.stubFalse); - * // => [false, false] - */ - - - function stubFalse() { - return false; - } - - module.exports = isEqual; - })(lodash_isequal, lodash_isequal.exports); - - var utils = {}; - - utils.isDetectionTooLarge = function (detections, largestAllowed) { - return detections.w >= largestAllowed; - }; - - var isInsideArea = function isInsideArea(area, point) { - var xMin = area.x - area.w / 2; - var xMax = area.x + area.w / 2; - var yMin = area.y - area.h / 2; - var yMax = area.y + area.h / 2; - return point.x >= xMin && point.x <= xMax && point.y >= yMin && point.y <= yMax; - }; - - utils.isInsideArea = isInsideArea; - - utils.isInsideSomeAreas = function (areas, point) { - return areas.some(function (area) { - return isInsideArea(area, point); - }); - }; - - utils.ignoreObjectsNotToDetect = function (detections, objectsToDetect) { - return detections.filter(function (detection) { - return objectsToDetect.indexOf(detection.name) > -1; - }); - }; - - var getRectangleEdges = function getRectangleEdges(item) { - return { - x0: item.x - item.w / 2, - y0: item.y - item.h / 2, - x1: item.x + item.w / 2, - y1: item.y + item.h / 2 - }; - }; - - utils.getRectangleEdges = getRectangleEdges; - - utils.iouAreas = function (item1, item2) { - var rect1 = getRectangleEdges(item1); - var rect2 = getRectangleEdges(item2); // Get overlap rectangle - - var overlap_x0 = Math.max(rect1.x0, rect2.x0); - var overlap_y0 = Math.max(rect1.y0, rect2.y0); - var overlap_x1 = Math.min(rect1.x1, rect2.x1); - var overlap_y1 = Math.min(rect1.y1, rect2.y1); // if there are an overlap - - if (overlap_x1 - overlap_x0 <= 0 || overlap_y1 - overlap_y0 <= 0) { - // no overlap - return 0; - } - - var area_rect1 = item1.w * item1.h; - var area_rect2 = item2.w * item2.h; - var area_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0); - var area_union = area_rect1 + area_rect2 - area_intersection; - return area_intersection / area_union; - }; - - utils.computeVelocityVector = function (item1, item2, nbFrame) { - return { - dx: (item2.x - item1.x) / nbFrame, - dy: (item2.y - item1.y) / nbFrame - }; - }; - /* - - computeBearingIn360 - - dY - - ^ XX - | XXX - | XX - | XX - | XX - | XXX - | XX - | XX - | XX bearing = this angle in degree - | XX - |XX - +----------------------XX-----------------------> dX - | - | - | - | - | - | - | - | - | - | - | - + - - */ - - - utils.computeBearingIn360 = function (dx, dy) { - var angle = Math.atan(dx / dy) / (Math.PI / 180); - - if (angle > 0) { - if (dy > 0) { - return angle; - } - - return 180 + angle; - } - - if (dx > 0) { - return 180 + angle; - } - - return 360 + angle; - }; - - var ItemTracked$1 = {}; - - var rngBrowser = {exports: {}}; - - // browser this is a little complicated due to unknown quality of Math.random() - // and inconsistent support for the `crypto` API. We do the best we can via - // feature-detection - // getRandomValues needs to be invoked in a context where "this" is a Crypto - // implementation. Also, find the complete implementation of crypto on IE11. - - var getRandomValues = typeof crypto != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto); - - if (getRandomValues) { - // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto - var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef - - rngBrowser.exports = function whatwgRNG() { - getRandomValues(rnds8); - return rnds8; - }; - } else { - // Math.random()-based (RNG) - // - // If all else fails, use Math.random(). It's fast, but is of unspecified - // quality. - var rnds = new Array(16); - - rngBrowser.exports = function mathRNG() { - for (var i = 0, r; i < 16; i++) { - if ((i & 0x03) === 0) r = Math.random() * 0x100000000; - rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; - } - - return rnds; - }; - } - - /** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ - var byteToHex = []; - - for (var i = 0; i < 256; ++i) { - byteToHex[i] = (i + 0x100).toString(16).substr(1); - } - - function bytesToUuid$1(buf, offset) { - var i = offset || 0; - var bth = byteToHex; // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 - - return [bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]]].join(''); - } - - var bytesToUuid_1 = bytesToUuid$1; - - var rng = rngBrowser.exports; - var bytesToUuid = bytesToUuid_1; - - function v4(options, buf, offset) { - var i = buf && offset || 0; - - if (typeof options == 'string') { - buf = options === 'binary' ? new Array(16) : null; - options = null; - } - - options = options || {}; - var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - - rnds[6] = rnds[6] & 0x0f | 0x40; - rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided - - if (buf) { - for (var ii = 0; ii < 16; ++ii) { - buf[i + ii] = rnds[ii]; - } - } - - return buf || bytesToUuid(rnds); - } - - var v4_1 = v4; - - (function (exports) { - var uuidv4 = v4_1; - var computeBearingIn360 = utils.computeBearingIn360; - var computeVelocityVector = utils.computeVelocityVector; // Properties example - // { - // "x": 1021, - // "y": 65, - // "w": 34, - // "h": 27, - // "confidence": 26, - // "name": "car" - // } - - /** The maximum length of the item history. */ - - exports.ITEM_HISTORY_MAX_LENGTH = 15; // Use a simple incremental unique id for the display - - var idDisplay = 0; - - exports.ItemTracked = function (properties, frameNb, unMatchedFramesTolerance, fastDelete) { - var DEFAULT_UNMATCHEDFRAMES_TOLERANCE = unMatchedFramesTolerance; - var itemTracked = {}; // ==== Private ===== - // Am I available to be matched? - - itemTracked.available = true; // Should I be deleted? - - itemTracked["delete"] = false; - itemTracked.fastDelete = fastDelete; // How many unmatched frame should I survive? - - itemTracked.frameUnmatchedLeftBeforeDying = unMatchedFramesTolerance; - itemTracked.isZombie = false; - itemTracked.appearFrame = frameNb; - itemTracked.disappearFrame = null; - itemTracked.disappearArea = {}; // Keep track of the most counted class - - itemTracked.nameCount = {}; - itemTracked.nameCount[properties.name] = 1; // ==== Public ===== - - itemTracked.x = properties.x; - itemTracked.y = properties.y; - itemTracked.w = properties.w; - itemTracked.h = properties.h; - itemTracked.name = properties.name; - itemTracked.confidence = properties.confidence; - itemTracked.itemHistory = []; - itemTracked.itemHistory.push({ - x: properties.x, - y: properties.y, - w: properties.w, - h: properties.h, - confidence: properties.confidence - }); - - if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { - itemTracked.itemHistory.shift(); - } - - itemTracked.velocity = { - dx: 0, - dy: 0 - }; - itemTracked.nbTimeMatched = 1; // Assign an unique id to each Item tracked - - itemTracked.id = uuidv4(); // Use an simple id for the display and debugging - - itemTracked.idDisplay = idDisplay; - idDisplay++; // Give me a new location / size - - itemTracked.update = function (properties, frameNb) { - // if it was zombie and disappear frame was set, reset it to null - if (this.disappearFrame) { - this.disappearFrame = null; - this.disappearArea = {}; - } - - this.isZombie = false; - this.nbTimeMatched += 1; - this.x = properties.x; - this.y = properties.y; - this.w = properties.w; - this.h = properties.h; - this.confidence = properties.confidence; - this.itemHistory.push({ - x: this.x, - y: this.y, - w: this.w, - h: this.h, - confidence: this.confidence - }); - - if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { - itemTracked.itemHistory.shift(); - } - - this.name = properties.name; - - if (this.nameCount[properties.name]) { - this.nameCount[properties.name]++; - } else { - this.nameCount[properties.name] = 1; - } // Reset dying counter - - - this.frameUnmatchedLeftBeforeDying = DEFAULT_UNMATCHEDFRAMES_TOLERANCE; // Compute new velocityVector based on last positions history - - this.velocity = this.updateVelocityVector(); - }; - - itemTracked.makeAvailable = function () { - this.available = true; - return this; - }; - - itemTracked.makeUnavailable = function () { - this.available = false; - return this; - }; - - itemTracked.countDown = function (frameNb) { - // Set frame disappear number - if (this.disappearFrame === null) { - this.disappearFrame = frameNb; - this.disappearArea = { - x: this.x, - y: this.y, - w: this.w, - h: this.h - }; - } - - this.frameUnmatchedLeftBeforeDying--; - this.isZombie = true; // If it was matched less than 1 time, it should die quick - - if (this.fastDelete && this.nbTimeMatched <= 1) { - this.frameUnmatchedLeftBeforeDying = -1; - } - }; - - itemTracked.updateTheoricalPositionAndSize = function () { - this.itemHistory.push({ - x: this.x, - y: this.y, - w: this.w, - h: this.h, - confidence: this.confidence - }); - - if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { - itemTracked.itemHistory.shift(); - } - - this.x += this.velocity.dx; - this.y += this.velocity.dy; - }; - - itemTracked.predictNextPosition = function () { - return { - x: this.x + this.velocity.dx, - y: this.y + this.velocity.dy, - w: this.w, - h: this.h - }; - }; - - itemTracked.isDead = function () { - return this.frameUnmatchedLeftBeforeDying < 0; - }; // Velocity vector based on the last 15 frames - - - itemTracked.updateVelocityVector = function () { - if (exports.ITEM_HISTORY_MAX_LENGTH <= 2) { - return { - dx: undefined, - dy: undefined - }; - } - - if (this.itemHistory.length <= exports.ITEM_HISTORY_MAX_LENGTH) { - var _start = this.itemHistory[0]; - var _end = this.itemHistory[this.itemHistory.length - 1]; - return computeVelocityVector(_start, _end, this.itemHistory.length); - } - - var start = this.itemHistory[this.itemHistory.length - exports.ITEM_HISTORY_MAX_LENGTH]; - var end = this.itemHistory[this.itemHistory.length - 1]; - return computeVelocityVector(start, end, exports.ITEM_HISTORY_MAX_LENGTH); - }; - - itemTracked.getMostlyMatchedName = function () { - var _this = this; - - var nameMostlyMatchedOccurences = 0; - var nameMostlyMatched = ''; - Object.keys(this.nameCount).map(function (name) { - if (_this.nameCount[name] > nameMostlyMatchedOccurences) { - nameMostlyMatched = name; - nameMostlyMatchedOccurences = _this.nameCount[name]; - } - }); - return nameMostlyMatched; - }; - - itemTracked.toJSONDebug = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - return { - id: this.id, - idDisplay: this.idDisplay, - x: roundInt ? parseInt(this.x, 10) : this.x, - y: roundInt ? parseInt(this.y, 10) : this.y, - w: roundInt ? parseInt(this.w, 10) : this.w, - h: roundInt ? parseInt(this.h, 10) : this.h, - confidence: Math.round(this.confidence * 100) / 100, - // Here we negate dy to be in "normal" carthesian coordinates - bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy)), - name: this.getMostlyMatchedName(), - isZombie: this.isZombie, - appearFrame: this.appearFrame, - disappearFrame: this.disappearFrame - }; - }; - - itemTracked.toJSON = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - return { - id: this.idDisplay, - x: roundInt ? parseInt(this.x, 10) : this.x, - y: roundInt ? parseInt(this.y, 10) : this.y, - w: roundInt ? parseInt(this.w, 10) : this.w, - h: roundInt ? parseInt(this.h, 10) : this.h, - confidence: Math.round(this.confidence * 100) / 100, - // Here we negate dy to be in "normal" carthesian coordinates - bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy), 10), - name: this.getMostlyMatchedName(), - isZombie: this.isZombie - }; - }; - - itemTracked.toMOT = function (frameIndex) { - return "".concat(frameIndex, ",").concat(this.idDisplay, ",").concat(this.x - this.w / 2, ",").concat(this.y - this.h / 2, ",").concat(this.w, ",").concat(this.h, ",").concat(this.confidence / 100, ",-1,-1,-1"); - }; - - itemTracked.toJSONGenericInfo = function () { - return { - id: this.id, - idDisplay: this.idDisplay, - appearFrame: this.appearFrame, - disappearFrame: this.disappearFrame, - disappearArea: this.disappearArea, - nbActiveFrame: this.disappearFrame - this.appearFrame, - name: this.getMostlyMatchedName() - }; - }; - - return itemTracked; - }; - - exports.reset = function () { - idDisplay = 0; - }; - })(ItemTracked$1); - - var kdTree = kdTreeMin.kdTree; - var munkres = munkres$1.exports; - var iouAreas = utils.iouAreas; - var ItemTracked = ItemTracked$1.ItemTracked, - reset = ItemTracked$1.reset; - - var iouDistance = function iouDistance(item1, item2) { - // IOU distance, between 0 and 1 - // The smaller, the less overlap - var iou = iouAreas(item1, item2); // Invert this as the KDTREESEARCH is looking for the smaller value - - var distance = 1 - iou; // If the overlap is iou < 0.95, exclude value - - if (distance > 1 - params.iouLimit) { - distance = params.distanceLimit + 1; - } - - return distance; - }; - - var params = { - // DEFAULT_UNMATCHEDFRAMES_TOLERANCE - // This the number of frame we wait when an object isn't matched before considering it gone - unMatchedFramesTolerance: 5, - // DEFAULT_IOU_LIMIT, exclude things from beeing matched if their IOU is lower than this - // 1 means total overlap whereas 0 means no overlap - iouLimit: 0.05, - // Remove new objects fast if they could not be matched in the next frames. - // Setting this to false ensures the object will stick around at least - // unMatchedFramesTolerance frames, even if they could neven be matched in - // subsequent frames. - fastDelete: true, - // The function to use to determine the distance between to detected objects - distanceFunc: iouDistance, - // The distance limit for matching. If values need to be excluded from - // matching set their distance to something greater than the distance limit - distanceLimit: 10000, - // The algorithm used to match tracks with new detections. Can be either - // 'kdTree' or 'munkres'. - matchingAlgorithm: 'munkres' // matchingAlgorithm: 'kdTree', - - }; // A dictionary of itemTracked currently tracked - // key: uuid - // value: ItemTracked object - - var mapOfItemsTracked = new Map(); // A dictionnary keeping memory of all tracked object (even after they disappear) - // Useful to ouput the file of all items tracked - - var mapOfAllItemsTracked = new Map(); // By default, we do not keep all the history in memory - - var keepAllHistoryInMemory = false; - var computeDistance = tracker.computeDistance = iouDistance; - - var updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameNb) { - // A kd-tree containing all the itemtracked - // Need to rebuild on each frame, because itemTracked positions have changed - var treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ["x", "y", "w", "h"]); // SCENARIO 1: itemsTracked map is empty - - if (mapOfItemsTracked.size === 0) { - // Just add every detected item as item Tracked - detectionsOfThisFrame.forEach(function (itemDetected) { - var newItemTracked = new ItemTracked(itemDetected, frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map - - mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree - - treeItemsTracked.insert(newItemTracked); - }); - } // SCENARIO 2: We already have itemsTracked in the map - else { - var matchedList = new Array(detectionsOfThisFrame.length); - matchedList.fill(false); // Match existing Tracked items with the items detected in the new frame - // For each look in the new detection to find the closest match - - if (detectionsOfThisFrame.length > 0) { - if (params.matchingAlgorithm === 'munkres') { - var trackedItemIds = Array.from(mapOfItemsTracked.keys()); - var costMatrix = Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { - var predictedPosition = itemTracked.predictNextPosition(); - return detectionsOfThisFrame.map(function (detection) { - return params.distanceFunc(predictedPosition, detection); - }); - }); - mapOfItemsTracked.forEach(function (itemTracked) { - itemTracked.makeAvailable(); - }); - munkres(costMatrix).filter(function (m) { - return costMatrix[m[0]][m[1]] <= params.distanceLimit; - }).forEach(function (m) { - var itemTracked = mapOfItemsTracked.get(trackedItemIds[m[0]]); - var updatedTrackedItemProperties = detectionsOfThisFrame[m[1]]; - matchedList[m[1]] = { - idDisplay: itemTracked.idDisplay - }; - itemTracked.makeUnavailable().update(updatedTrackedItemProperties, frameNb); - }); - matchedList.forEach(function (matched, index) { - if (!matched) { - if (Math.min.apply(Math, _toConsumableArray(costMatrix.map(function (m) { - return m[index]; - }))) > params.distanceLimit) { - var newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); - mapOfItemsTracked.set(newItemTracked.id, newItemTracked); - newItemTracked.makeUnavailable(); - costMatrix.push(detectionsOfThisFrame.map(function (detection) { - return params.distanceFunc(newItemTracked, detection); - })); - } - } - }); - } else if (params.matchingAlgorithm === 'kdTree') { - // Contruct a kd tree for the detections of this frame - var treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ["x", "y", "w", "h"]); - mapOfItemsTracked.forEach(function (itemTracked) { - // First predict the new position of the itemTracked - var predictedPosition = itemTracked.predictNextPosition(); // Make available for matching - - itemTracked.makeAvailable(); // Search for a detection that matches - - var treeSearchResult = treeDetectionsOfThisFrame.nearest(predictedPosition, 1, params.distanceLimit)[0]; // Only for debug assessments of predictions - - treeDetectionsOfThisFrame.nearest(itemTracked, 1, params.distanceLimit)[0]; // Only if we enable the extra refinement - - treeDetectionsOfThisFrame.nearest(predictedPosition, 2, params.distanceLimit); // If we have found something - - if (treeSearchResult) { - - var indexClosestNewDetectedItem = detectionsOfThisFrame.indexOf(treeSearchResult[0]); // If this detections was not already matched to a tracked item - // (otherwise it would be matched to two tracked items...) - - if (!matchedList[indexClosestNewDetectedItem]) { - matchedList[indexClosestNewDetectedItem] = { - idDisplay: itemTracked.idDisplay - }; // Update properties of tracked object - - var updatedTrackedItemProperties = detectionsOfThisFrame[indexClosestNewDetectedItem]; - mapOfItemsTracked.get(itemTracked.id).makeUnavailable().update(updatedTrackedItemProperties, frameNb); - } - } - }); - } else { - throw "Unknown matching algorithm \"".concat(params.matchingAlgorithm, "\""); - } - } else { - - - mapOfItemsTracked.forEach(function (itemTracked) { - itemTracked.makeAvailable(); - }); - } - - if (params.matchingAlgorithm === 'kdTree') { - // Add any unmatched items as new trackedItem only if those new items are not too similar - // to existing trackedItems this avoids adding some double match of YOLO and bring down drasticly reassignments - if (mapOfItemsTracked.size > 0) { - // Safety check to see if we still have object tracked (could have been deleted previously) - // Rebuild tracked item tree to take in account the new positions - treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ["x", "y", "w", "h"]); // console.log(`Nb new items Unmatched : ${matchedList.filter((isMatched) => isMatched === false).length}`) - - matchedList.forEach(function (matched, index) { - // Iterate through unmatched new detections - if (!matched) { - // Do not add as new tracked item if it is to similar to an existing one - var treeSearchResult = treeItemsTracked.nearest(detectionsOfThisFrame[index], 1, params.distanceLimit)[0]; - - if (!treeSearchResult) { - var newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map - - mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree - - treeItemsTracked.insert(newItemTracked); // Make unvailable - - newItemTracked.makeUnavailable(); - } - } - }); - } - } // Start killing the itemTracked (and predicting next position) - // that are tracked but haven't been matched this frame - - - mapOfItemsTracked.forEach(function (itemTracked) { - if (itemTracked.available) { - itemTracked.countDown(frameNb); - itemTracked.updateTheoricalPositionAndSize(); - - if (itemTracked.isDead()) { - mapOfItemsTracked["delete"](itemTracked.id); - treeItemsTracked.remove(itemTracked); - - if (keepAllHistoryInMemory) { - mapOfAllItemsTracked.set(itemTracked.id, itemTracked); - } - } - } - }); - } - }; - - var reset_1 = tracker.reset = function () { - mapOfItemsTracked = new Map(); - mapOfAllItemsTracked = new Map(); - reset(); - }; - - var setParams = tracker.setParams = function (newParams) { - Object.keys(newParams).forEach(function (key) { - params[key] = newParams[key]; - }); - }; - - var enableKeepInMemory = tracker.enableKeepInMemory = function () { - keepAllHistoryInMemory = true; - }; - - var disableKeepInMemory = tracker.disableKeepInMemory = function () { - keepAllHistoryInMemory = false; - }; - - var getJSONOfTrackedItems = tracker.getJSONOfTrackedItems = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { - return itemTracked.toJSON(roundInt); - }); - }; - - var getJSONDebugOfTrackedItems = tracker.getJSONDebugOfTrackedItems = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { - return itemTracked.toJSONDebug(roundInt); - }); - }; - - var getTrackedItemsInMOTFormat = tracker.getTrackedItemsInMOTFormat = function (frameNb) { - return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { - return itemTracked.toMOT(frameNb); - }); - }; // Work only if keepInMemory is enabled - - - var getAllTrackedItems = tracker.getAllTrackedItems = function () { - return mapOfAllItemsTracked; - }; // Work only if keepInMemory is enabled - - - var getJSONOfAllTrackedItems = tracker.getJSONOfAllTrackedItems = function () { - return Array.from(mapOfAllItemsTracked.values()).map(function (itemTracked) { - return itemTracked.toJSONGenericInfo(); - }); - }; - - exports.computeDistance = computeDistance; - exports["default"] = tracker; - exports.disableKeepInMemory = disableKeepInMemory; - exports.enableKeepInMemory = enableKeepInMemory; - exports.getAllTrackedItems = getAllTrackedItems; - exports.getJSONDebugOfTrackedItems = getJSONDebugOfTrackedItems; - exports.getJSONOfAllTrackedItems = getJSONOfAllTrackedItems; - exports.getJSONOfTrackedItems = getJSONOfTrackedItems; - exports.getTrackedItemsInMOTFormat = getTrackedItemsInMOTFormat; - exports.reset = reset_1; - exports.setParams = setParams; - exports.updateTrackedItemsWithNewFrame = updateTrackedItemsWithNewFrame; - - Object.defineProperty(exports, '__esModule', { value: true }); - - return exports; + 'use strict'; + + var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + var tracker = {}; + + var utils = {}; + + utils.isDetectionTooLarge = function (detections, largestAllowed) { + return detections.w >= largestAllowed; + }; + + var isInsideArea = function isInsideArea(area, point) { + var xMin = area.x - area.w / 2; + var xMax = area.x + area.w / 2; + var yMin = area.y - area.h / 2; + var yMax = area.y + area.h / 2; + return point.x >= xMin && point.x <= xMax && point.y >= yMin && point.y <= yMax; + }; + + utils.isInsideArea = isInsideArea; + + utils.isInsideSomeAreas = function (areas, point) { + return areas.some(function (area) { + return isInsideArea(area, point); + }); + }; + + utils.ignoreObjectsNotToDetect = function (detections, objectsToDetect) { + return detections.filter(function (detection) { + return objectsToDetect.indexOf(detection.name) > -1; + }); + }; + + var getRectangleEdges = function getRectangleEdges(item) { + return { + x0: item.x - item.w / 2, + y0: item.y - item.h / 2, + x1: item.x + item.w / 2, + y1: item.y + item.h / 2 + }; + }; + + utils.getRectangleEdges = getRectangleEdges; + + utils.iouAreas = function (item1, item2) { + var rect1 = getRectangleEdges(item1); + var rect2 = getRectangleEdges(item2); // Get overlap rectangle + + var overlap_x0 = Math.max(rect1.x0, rect2.x0); + var overlap_y0 = Math.max(rect1.y0, rect2.y0); + var overlap_x1 = Math.min(rect1.x1, rect2.x1); + var overlap_y1 = Math.min(rect1.y1, rect2.y1); // if there are an overlap + + if (overlap_x1 - overlap_x0 <= 0 || overlap_y1 - overlap_y0 <= 0) { + // no overlap + return 0; + } + + var area_rect1 = item1.w * item1.h; + var area_rect2 = item2.w * item2.h; + var area_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0); + var area_union = area_rect1 + area_rect2 - area_intersection; + return area_intersection / area_union; + }; + + utils.computeVelocityVector = function (item1, item2, nbFrame) { + return { + dx: (item2.x - item1.x) / nbFrame, + dy: (item2.y - item1.y) / nbFrame + }; + }; + /* + + computeBearingIn360 + + dY + + ^ XX + | XXX + | XX + | XX + | XX + | XXX + | XX + | XX + | XX bearing = this angle in degree + | XX + |XX + +----------------------XX-----------------------> dX + | + | + | + | + | + | + | + | + | + | + | + + + + */ + + + utils.computeBearingIn360 = function (dx, dy) { + var angle = Math.atan(dx / dy) / (Math.PI / 180); + + if (angle > 0) { + if (dy > 0) { + return angle; + } + + return 180 + angle; + } + + if (dx > 0) { + return 180 + angle; + } + + return 360 + angle; + }; + + var ItemTracked$3 = {}; + + var rngBrowser = {exports: {}}; + + // browser this is a little complicated due to unknown quality of Math.random() + // and inconsistent support for the `crypto` API. We do the best we can via + // feature-detection + // getRandomValues needs to be invoked in a context where "this" is a Crypto + // implementation. Also, find the complete implementation of crypto on IE11. + + var getRandomValues = typeof crypto != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto); + + if (getRandomValues) { + // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto + var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef + + rngBrowser.exports = function whatwgRNG() { + getRandomValues(rnds8); + return rnds8; + }; + } else { + // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). It's fast, but is of unspecified + // quality. + var rnds = new Array(16); + + rngBrowser.exports = function mathRNG() { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) r = Math.random() * 0x100000000; + rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return rnds; + }; + } + + /** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ + var byteToHex = []; + + for (var i = 0; i < 256; ++i) { + byteToHex[i] = (i + 0x100).toString(16).substr(1); + } + + function bytesToUuid$1(buf, offset) { + var i = offset || 0; + var bth = byteToHex; // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 + + return [bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]]].join(''); + } + + var bytesToUuid_1 = bytesToUuid$1; + + var rng = rngBrowser.exports; + var bytesToUuid = bytesToUuid_1; + + function v4(options, buf, offset) { + var i = buf && offset || 0; + + if (typeof options == 'string') { + buf = options === 'binary' ? new Array(16) : null; + options = null; + } + + options = options || {}; + var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || bytesToUuid(rnds); + } + + var v4_1 = v4; + + (function (exports) { + var uuidv4 = v4_1; + var computeBearingIn360 = utils.computeBearingIn360; + var computeVelocityVector = utils.computeVelocityVector; // Properties example + // { + // "x": 1021, + // "y": 65, + // "w": 34, + // "h": 27, + // "confidence": 26, + // "name": "car" + // } + + /** The maximum length of the item history. */ + + exports.ITEM_HISTORY_MAX_LENGTH = 15; // Use a simple incremental unique id for the display + + var idDisplay = 0; + + exports.ItemTracked = function (properties, frameNb, unMatchedFramesTolerance, fastDelete) { + var DEFAULT_UNMATCHEDFRAMES_TOLERANCE = unMatchedFramesTolerance; + var itemTracked = {}; // ==== Private ===== + // Am I available to be matched? + + itemTracked.available = true; // Should I be deleted? + + itemTracked["delete"] = false; + itemTracked.fastDelete = fastDelete; // How many unmatched frame should I survive? + + itemTracked.frameUnmatchedLeftBeforeDying = unMatchedFramesTolerance; + itemTracked.isZombie = false; + itemTracked.appearFrame = frameNb; + itemTracked.disappearFrame = null; + itemTracked.disappearArea = {}; // Keep track of the most counted class + + itemTracked.nameCount = {}; + itemTracked.nameCount[properties.name] = 1; // ==== Public ===== + + itemTracked.x = properties.x; + itemTracked.y = properties.y; + itemTracked.w = properties.w; + itemTracked.h = properties.h; + itemTracked.name = properties.name; + itemTracked.confidence = properties.confidence; + itemTracked.itemHistory = []; + itemTracked.itemHistory.push({ + x: properties.x, + y: properties.y, + w: properties.w, + h: properties.h, + confidence: properties.confidence + }); + + if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { + itemTracked.itemHistory.shift(); + } + + itemTracked.velocity = { + dx: 0, + dy: 0 + }; + itemTracked.nbTimeMatched = 1; // Assign an unique id to each Item tracked + + itemTracked.id = uuidv4(); // Use an simple id for the display and debugging + + itemTracked.idDisplay = idDisplay; + idDisplay++; // Give me a new location / size + + itemTracked.update = function (properties, frameNb) { + // if it was zombie and disappear frame was set, reset it to null + if (this.disappearFrame) { + this.disappearFrame = null; + this.disappearArea = {}; + } + + this.isZombie = false; + this.nbTimeMatched += 1; + this.x = properties.x; + this.y = properties.y; + this.w = properties.w; + this.h = properties.h; + this.confidence = properties.confidence; + this.itemHistory.push({ + x: this.x, + y: this.y, + w: this.w, + h: this.h, + confidence: this.confidence + }); + + if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { + itemTracked.itemHistory.shift(); + } + + this.name = properties.name; + + if (this.nameCount[properties.name]) { + this.nameCount[properties.name]++; + } else { + this.nameCount[properties.name] = 1; + } // Reset dying counter + + + this.frameUnmatchedLeftBeforeDying = DEFAULT_UNMATCHEDFRAMES_TOLERANCE; // Compute new velocityVector based on last positions history + + this.velocity = this.updateVelocityVector(); + }; + + itemTracked.makeAvailable = function () { + this.available = true; + return this; + }; + + itemTracked.makeUnavailable = function () { + this.available = false; + return this; + }; + + itemTracked.countDown = function (frameNb) { + // Set frame disappear number + if (this.disappearFrame === null) { + this.disappearFrame = frameNb; + this.disappearArea = { + x: this.x, + y: this.y, + w: this.w, + h: this.h + }; + } + + this.frameUnmatchedLeftBeforeDying--; + this.isZombie = true; // If it was matched less than 1 time, it should die quick + + if (this.fastDelete && this.nbTimeMatched <= 1) { + this.frameUnmatchedLeftBeforeDying = -1; + } + }; + + itemTracked.updateTheoricalPositionAndSize = function () { + this.itemHistory.push({ + x: this.x, + y: this.y, + w: this.w, + h: this.h, + confidence: this.confidence + }); + + if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { + itemTracked.itemHistory.shift(); + } + + this.x += this.velocity.dx; + this.y += this.velocity.dy; + }; + + itemTracked.predictNextPosition = function () { + return { + x: this.x + this.velocity.dx, + y: this.y + this.velocity.dy, + w: this.w, + h: this.h + }; + }; + + itemTracked.isDead = function () { + return this.frameUnmatchedLeftBeforeDying < 0; + }; // Velocity vector based on the last 15 frames + + + itemTracked.updateVelocityVector = function () { + if (exports.ITEM_HISTORY_MAX_LENGTH <= 2) { + return { + dx: undefined, + dy: undefined + }; + } + + if (this.itemHistory.length <= exports.ITEM_HISTORY_MAX_LENGTH) { + var _start = this.itemHistory[0]; + var _end = this.itemHistory[this.itemHistory.length - 1]; + return computeVelocityVector(_start, _end, this.itemHistory.length); + } + + var start = this.itemHistory[this.itemHistory.length - exports.ITEM_HISTORY_MAX_LENGTH]; + var end = this.itemHistory[this.itemHistory.length - 1]; + return computeVelocityVector(start, end, exports.ITEM_HISTORY_MAX_LENGTH); + }; + + itemTracked.getMostlyMatchedName = function () { + var _this = this; + + var nameMostlyMatchedOccurences = 0; + var nameMostlyMatched = ''; + Object.keys(this.nameCount).map(function (name) { + if (_this.nameCount[name] > nameMostlyMatchedOccurences) { + nameMostlyMatched = name; + nameMostlyMatchedOccurences = _this.nameCount[name]; + } + }); + return nameMostlyMatched; + }; + + itemTracked.toJSONDebug = function () { + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return { + id: this.id, + idDisplay: this.idDisplay, + x: roundInt ? parseFloat(this.x) : this.x, + y: roundInt ? parseFloat(this.y) : this.y, + w: roundInt ? parseFloat(this.w) : this.w, + h: roundInt ? parseFloat(this.h) : this.h, + confidence: Math.round(this.confidence * 100) / 100, + // Here we negate dy to be in "normal" carthesian coordinates + bearing: parseFloat(computeBearingIn360(this.velocity.dx, -this.velocity.dy)), + name: this.getMostlyMatchedName(), + isZombie: this.isZombie, + appearFrame: this.appearFrame, + disappearFrame: this.disappearFrame + }; + }; + + itemTracked.toJSON = function () { + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return { + id: this.idDisplay, + x: roundInt ? parseFloat(this.x) : this.x, + y: roundInt ? parseFloat(this.y) : this.y, + w: roundInt ? parseFloat(this.w) : this.w, + h: roundInt ? parseFloat(this.h) : this.h, + confidence: Math.round(this.confidence * 100) / 100, + // Here we negate dy to be in "normal" carthesian coordinates + bearing: parseFloat(computeBearingIn360(this.velocity.dx, -this.velocity.dy)), + name: this.getMostlyMatchedName(), + isZombie: this.isZombie + }; + }; + + itemTracked.toMOT = function (frameIndex) { + return "".concat(frameIndex, ",").concat(this.idDisplay, ",").concat(this.x - this.w / 2, ",").concat(this.y - this.h / 2, ",").concat(this.w, ",").concat(this.h, ",").concat(this.confidence / 100, ",-1,-1,-1"); + }; + + itemTracked.toJSONGenericInfo = function () { + return { + id: this.id, + idDisplay: this.idDisplay, + appearFrame: this.appearFrame, + disappearFrame: this.disappearFrame, + disappearArea: this.disappearArea, + nbActiveFrame: this.disappearFrame - this.appearFrame, + name: this.getMostlyMatchedName() + }; + }; + + return itemTracked; + }; + + exports.reset = function () { + idDisplay = 0; + }; + })(ItemTracked$3); + + function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); + } + + function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); + } + + function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); + } + + function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } + + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + + return arr2; + } + + function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + + var munkres$2 = {}; + + var munkres$1 = {exports: {}}; + + /** + * Introduction + * ============ + * + * The Munkres module provides an implementation of the Munkres algorithm + * (also called the Hungarian algorithm or the Kuhn-Munkres algorithm), + * useful for solving the Assignment Problem. + * + * Assignment Problem + * ================== + * + * Let C be an n×n-matrix representing the costs of each of n workers + * to perform any of n jobs. The assignment problem is to assign jobs to + * workers in a way that minimizes the total cost. Since each worker can perform + * only one job and each job can be assigned to only one worker the assignments + * represent an independent set of the matrix C. + * + * One way to generate the optimal set is to create all permutations of + * the indices necessary to traverse the matrix so that no row and column + * are used more than once. For instance, given this matrix (expressed in + * Python) + * + * matrix = [[5, 9, 1], + * [10, 3, 2], + * [8, 7, 4]] + * + * You could use this code to generate the traversal indices:: + * + * def permute(a, results): + * if len(a) == 1: + * results.insert(len(results), a) + * + * else: + * for i in range(0, len(a)): + * element = a[i] + * a_copy = [a[j] for j in range(0, len(a)) if j != i] + * subresults = [] + * permute(a_copy, subresults) + * for subresult in subresults: + * result = [element] + subresult + * results.insert(len(results), result) + * + * results = [] + * permute(range(len(matrix)), results) # [0, 1, 2] for a 3x3 matrix + * + * After the call to permute(), the results matrix would look like this:: + * + * [[0, 1, 2], + * [0, 2, 1], + * [1, 0, 2], + * [1, 2, 0], + * [2, 0, 1], + * [2, 1, 0]] + * + * You could then use that index matrix to loop over the original cost matrix + * and calculate the smallest cost of the combinations + * + * n = len(matrix) + * minval = sys.maxsize + * for row in range(n): + * cost = 0 + * for col in range(n): + * cost += matrix[row][col] + * minval = min(cost, minval) + * + * print minval + * + * While this approach works fine for small matrices, it does not scale. It + * executes in O(n!) time: Calculating the permutations for an n×x-matrix + * requires n! operations. For a 12×12 matrix, that’s 479,001,600 + * traversals. Even if you could manage to perform each traversal in just one + * millisecond, it would still take more than 133 hours to perform the entire + * traversal. A 20×20 matrix would take 2,432,902,008,176,640,000 operations. At + * an optimistic millisecond per operation, that’s more than 77 million years. + * + * The Munkres algorithm runs in O(n³) time, rather than O(n!). This + * package provides an implementation of that algorithm. + * + * This version is based on + * http://csclab.murraystate.edu/~bob.pilgrim/445/munkres.html + * + * This version was originally written for Python by Brian Clapper from the + * algorithm at the above web site (The ``Algorithm::Munkres`` Perl version, + * in CPAN, was clearly adapted from the same web site.) and ported to + * JavaScript by Anna Henningsen (addaleax). + * + * Usage + * ===== + * + * Construct a Munkres object + * + * var m = new Munkres(); + * + * Then use it to compute the lowest cost assignment from a cost matrix. Here’s + * a sample program + * + * var matrix = [[5, 9, 1], + * [10, 3, 2], + * [8, 7, 4]]; + * var m = new Munkres(); + * var indices = m.compute(matrix); + * console.log(format_matrix(matrix), 'Lowest cost through this matrix:'); + * var total = 0; + * for (var i = 0; i < indices.length; ++i) { + * var row = indices[l][0], col = indices[l][1]; + * var value = matrix[row][col]; + * total += value; + * + * console.log('(' + rol + ', ' + col + ') -> ' + value); + * } + * + * console.log('total cost:', total); + * + * Running that program produces:: + * + * Lowest cost through this matrix: + * [5, 9, 1] + * [10, 3, 2] + * [8, 7, 4] + * (0, 0) -> 5 + * (1, 1) -> 3 + * (2, 2) -> 4 + * total cost: 12 + * + * The instantiated Munkres object can be used multiple times on different + * matrices. + * + * Non-square Cost Matrices + * ======================== + * + * The Munkres algorithm assumes that the cost matrix is square. However, it's + * possible to use a rectangular matrix if you first pad it with 0 values to make + * it square. This module automatically pads rectangular cost matrices to make + * them square. + * + * Notes: + * + * - The module operates on a *copy* of the caller's matrix, so any padding will + * not be seen by the caller. + * - The cost matrix must be rectangular or square. An irregular matrix will + * *not* work. + * + * Calculating Profit, Rather than Cost + * ==================================== + * + * The cost matrix is just that: A cost matrix. The Munkres algorithm finds + * the combination of elements (one from each row and column) that results in + * the smallest cost. It’s also possible to use the algorithm to maximize + * profit. To do that, however, you have to convert your profit matrix to a + * cost matrix. The simplest way to do that is to subtract all elements from a + * large value. + * + * The ``munkres`` module provides a convenience method for creating a cost + * matrix from a profit matrix, i.e. make_cost_matrix. + * + * References + * ========== + * + * 1. http://www.public.iastate.edu/~ddoty/HungarianAlgorithm.html + * + * 2. Harold W. Kuhn. The Hungarian Method for the assignment problem. + * *Naval Research Logistics Quarterly*, 2:83-97, 1955. + * + * 3. Harold W. Kuhn. Variants of the Hungarian method for assignment + * problems. *Naval Research Logistics Quarterly*, 3: 253-258, 1956. + * + * 4. Munkres, J. Algorithms for the Assignment and Transportation Problems. + * *Journal of the Society of Industrial and Applied Mathematics*, + * 5(1):32-38, March, 1957. + * + * 5. https://en.wikipedia.org/wiki/Hungarian_algorithm + * + * Copyright and License + * ===================== + * + * Copyright 2008-2016 Brian M. Clapper + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + (function (module) { + /** + * A very large numerical value which can be used like an integer + * (i. e., adding integers of similar size does not result in overflow). + */ + var MAX_SIZE = parseInt(Number.MAX_SAFE_INTEGER / 2) || (1 << 26) * (1 << 26); + /** + * A default value to pad the cost matrix with if it is not quadratic. + */ + + var DEFAULT_PAD_VALUE = 0; // --------------------------------------------------------------------------- + // Classes + // --------------------------------------------------------------------------- + + /** + * Calculate the Munkres solution to the classical assignment problem. + * See the module documentation for usage. + * @constructor + */ + + function Munkres() { + this.C = null; + this.row_covered = []; + this.col_covered = []; + this.n = 0; + this.Z0_r = 0; + this.Z0_c = 0; + this.marked = null; + this.path = null; + } + /** + * Pad a possibly non-square matrix to make it square. + * + * @param {Array} matrix An array of arrays containing the matrix cells + * @param {Number} [pad_value] The value used to pad a rectangular matrix + * + * @return {Array} An array of arrays representing the padded matrix + */ + + + Munkres.prototype.pad_matrix = function (matrix, pad_value) { + pad_value = pad_value || DEFAULT_PAD_VALUE; + var max_columns = 0; + var total_rows = matrix.length; + var i; + + for (i = 0; i < total_rows; ++i) if (matrix[i].length > max_columns) max_columns = matrix[i].length; + + total_rows = max_columns > total_rows ? max_columns : total_rows; + var new_matrix = []; + + for (i = 0; i < total_rows; ++i) { + var row = matrix[i] || []; + var new_row = row.slice(); // If this row is too short, pad it + + while (total_rows > new_row.length) new_row.push(pad_value); + + new_matrix.push(new_row); + } + + return new_matrix; + }; + /** + * Compute the indices for the lowest-cost pairings between rows and columns + * in the database. Returns a list of (row, column) tuples that can be used + * to traverse the matrix. + * + * **WARNING**: This code handles square and rectangular matrices. + * It does *not* handle irregular matrices. + * + * @param {Array} cost_matrix The cost matrix. If this cost matrix is not square, + * it will be padded with DEFAULT_PAD_VALUE. Optionally, + * the pad value can be specified via options.padValue. + * This method does *not* modify the caller's matrix. + * It operates on a copy of the matrix. + * @param {Object} [options] Additional options to pass in + * @param {Number} [options.padValue] The value to use to pad a rectangular cost_matrix + * + * @return {Array} An array of ``(row, column)`` arrays that describe the lowest + * cost path through the matrix + */ + + + Munkres.prototype.compute = function (cost_matrix, options) { + options = options || {}; + options.padValue = options.padValue || DEFAULT_PAD_VALUE; + this.C = this.pad_matrix(cost_matrix, options.padValue); + this.n = this.C.length; + this.original_length = cost_matrix.length; + this.original_width = cost_matrix[0].length; + var nfalseArray = []; + /* array of n false values */ + + while (nfalseArray.length < this.n) nfalseArray.push(false); + + this.row_covered = nfalseArray.slice(); + this.col_covered = nfalseArray.slice(); + this.Z0_r = 0; + this.Z0_c = 0; + this.path = this.__make_matrix(this.n * 2, 0); + this.marked = this.__make_matrix(this.n, 0); + var step = 1; + var steps = { + 1: this.__step1, + 2: this.__step2, + 3: this.__step3, + 4: this.__step4, + 5: this.__step5, + 6: this.__step6 + }; + + while (true) { + var func = steps[step]; + if (!func) // done + break; + step = func.apply(this); + } + + var results = []; + + for (var i = 0; i < this.original_length; ++i) for (var j = 0; j < this.original_width; ++j) if (this.marked[i][j] == 1) results.push([i, j]); + + return results; + }; + /** + * Create an n×n matrix, populating it with the specific value. + * + * @param {Number} n Matrix dimensions + * @param {Number} val Value to populate the matrix with + * + * @return {Array} An array of arrays representing the newly created matrix + */ + + + Munkres.prototype.__make_matrix = function (n, val) { + var matrix = []; + + for (var i = 0; i < n; ++i) { + matrix[i] = []; + + for (var j = 0; j < n; ++j) matrix[i][j] = val; + } + + return matrix; + }; + /** + * For each row of the matrix, find the smallest element and + * subtract it from every element in its row. Go to Step 2. + */ + + + Munkres.prototype.__step1 = function () { + for (var i = 0; i < this.n; ++i) { + // Find the minimum value for this row and subtract that minimum + // from every element in the row. + var minval = Math.min.apply(Math, this.C[i]); + + for (var j = 0; j < this.n; ++j) this.C[i][j] -= minval; + } + + return 2; + }; + /** + * Find a zero (Z) in the resulting matrix. If there is no starred + * zero in its row or column, star Z. Repeat for each element in the + * matrix. Go to Step 3. + */ + + + Munkres.prototype.__step2 = function () { + for (var i = 0; i < this.n; ++i) { + for (var j = 0; j < this.n; ++j) { + if (this.C[i][j] === 0 && !this.col_covered[j] && !this.row_covered[i]) { + this.marked[i][j] = 1; + this.col_covered[j] = true; + this.row_covered[i] = true; + break; + } + } + } + + this.__clear_covers(); + + return 3; + }; + /** + * Cover each column containing a starred zero. If K columns are + * covered, the starred zeros describe a complete set of unique + * assignments. In this case, Go to DONE, otherwise, Go to Step 4. + */ + + + Munkres.prototype.__step3 = function () { + var count = 0; + + for (var i = 0; i < this.n; ++i) { + for (var j = 0; j < this.n; ++j) { + if (this.marked[i][j] == 1 && this.col_covered[j] == false) { + this.col_covered[j] = true; + ++count; + } + } + } + + return count >= this.n ? 7 : 4; + }; + /** + * Find a noncovered zero and prime it. If there is no starred zero + * in the row containing this primed zero, Go to Step 5. Otherwise, + * cover this row and uncover the column containing the starred + * zero. Continue in this manner until there are no uncovered zeros + * left. Save the smallest uncovered value and Go to Step 6. + */ + + + Munkres.prototype.__step4 = function () { + var done = false; + var row = -1, + col = -1, + star_col = -1; + + while (!done) { + var z = this.__find_a_zero(); + + row = z[0]; + col = z[1]; + if (row < 0) return 6; + this.marked[row][col] = 2; + star_col = this.__find_star_in_row(row); + + if (star_col >= 0) { + col = star_col; + this.row_covered[row] = true; + this.col_covered[col] = false; + } else { + this.Z0_r = row; + this.Z0_c = col; + return 5; + } + } + }; + /** + * Construct a series of alternating primed and starred zeros as + * follows. Let Z0 represent the uncovered primed zero found in Step 4. + * Let Z1 denote the starred zero in the column of Z0 (if any). + * Let Z2 denote the primed zero in the row of Z1 (there will always + * be one). Continue until the series terminates at a primed zero + * that has no starred zero in its column. Unstar each starred zero + * of the series, star each primed zero of the series, erase all + * primes and uncover every line in the matrix. Return to Step 3 + */ + + + Munkres.prototype.__step5 = function () { + var count = 0; + this.path[count][0] = this.Z0_r; + this.path[count][1] = this.Z0_c; + var done = false; + + while (!done) { + var row = this.__find_star_in_col(this.path[count][1]); + + if (row >= 0) { + count++; + this.path[count][0] = row; + this.path[count][1] = this.path[count - 1][1]; + } else { + done = true; + } + + if (!done) { + var col = this.__find_prime_in_row(this.path[count][0]); + + count++; + this.path[count][0] = this.path[count - 1][0]; + this.path[count][1] = col; + } + } + + this.__convert_path(this.path, count); + + this.__clear_covers(); + + this.__erase_primes(); + + return 3; + }; + /** + * Add the value found in Step 4 to every element of each covered + * row, and subtract it from every element of each uncovered column. + * Return to Step 4 without altering any stars, primes, or covered + * lines. + */ + + + Munkres.prototype.__step6 = function () { + var minval = this.__find_smallest(); + + for (var i = 0; i < this.n; ++i) { + for (var j = 0; j < this.n; ++j) { + if (this.row_covered[i]) this.C[i][j] += minval; + if (!this.col_covered[j]) this.C[i][j] -= minval; + } + } + + return 4; + }; + /** + * Find the smallest uncovered value in the matrix. + * + * @return {Number} The smallest uncovered value, or MAX_SIZE if no value was found + */ + + + Munkres.prototype.__find_smallest = function () { + var minval = MAX_SIZE; + + for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (!this.row_covered[i] && !this.col_covered[j]) if (minval > this.C[i][j]) minval = this.C[i][j]; + + return minval; + }; + /** + * Find the first uncovered element with value 0. + * + * @return {Array} The indices of the found element or [-1, -1] if not found + */ + + + Munkres.prototype.__find_a_zero = function () { + for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.C[i][j] === 0 && !this.row_covered[i] && !this.col_covered[j]) return [i, j]; + + return [-1, -1]; + }; + /** + * Find the first starred element in the specified row. Returns + * the column index, or -1 if no starred element was found. + * + * @param {Number} row The index of the row to search + * @return {Number} + */ + + + Munkres.prototype.__find_star_in_row = function (row) { + for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 1) return j; + + return -1; + }; + /** + * Find the first starred element in the specified column. + * + * @return {Number} The row index, or -1 if no starred element was found + */ + + + Munkres.prototype.__find_star_in_col = function (col) { + for (var i = 0; i < this.n; ++i) if (this.marked[i][col] == 1) return i; + + return -1; + }; + /** + * Find the first prime element in the specified row. + * + * @return {Number} The column index, or -1 if no prime element was found + */ + + + Munkres.prototype.__find_prime_in_row = function (row) { + for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 2) return j; + + return -1; + }; + + Munkres.prototype.__convert_path = function (path, count) { + for (var i = 0; i <= count; ++i) this.marked[path[i][0]][path[i][1]] = this.marked[path[i][0]][path[i][1]] == 1 ? 0 : 1; + }; + /** Clear all covered matrix cells */ + + + Munkres.prototype.__clear_covers = function () { + for (var i = 0; i < this.n; ++i) { + this.row_covered[i] = false; + this.col_covered[i] = false; + } + }; + /** Erase all prime markings */ + + + Munkres.prototype.__erase_primes = function () { + for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.marked[i][j] == 2) this.marked[i][j] = 0; + }; // --------------------------------------------------------------------------- + // Functions + // --------------------------------------------------------------------------- + + /** + * Create a cost matrix from a profit matrix by calling + * 'inversion_function' to invert each value. The inversion + * function must take one numeric argument (of any type) and return + * another numeric argument which is presumed to be the cost inverse + * of the original profit. + * + * This is a static method. Call it like this: + * + * cost_matrix = make_cost_matrix(matrix[, inversion_func]); + * + * For example: + * + * cost_matrix = make_cost_matrix(matrix, function(x) { return MAXIMUM - x; }); + * + * @param {Array} profit_matrix An array of arrays representing the matrix + * to convert from a profit to a cost matrix + * @param {Function} [inversion_function] The function to use to invert each + * entry in the profit matrix + * + * @return {Array} The converted matrix + */ + + + function make_cost_matrix(profit_matrix, inversion_function) { + var i, j; + + if (!inversion_function) { + var maximum = -1.0 / 0.0; + + for (i = 0; i < profit_matrix.length; ++i) for (j = 0; j < profit_matrix[i].length; ++j) if (profit_matrix[i][j] > maximum) maximum = profit_matrix[i][j]; + + inversion_function = function (x) { + return maximum - x; + }; + } + + var cost_matrix = []; + + for (i = 0; i < profit_matrix.length; ++i) { + var row = profit_matrix[i]; + cost_matrix[i] = []; + + for (j = 0; j < row.length; ++j) cost_matrix[i][j] = inversion_function(profit_matrix[i][j]); + } + + return cost_matrix; + } + /** + * Convenience function: Converts the contents of a matrix of integers + * to a printable string. + * + * @param {Array} matrix The matrix to print + * + * @return {String} The formatted matrix + */ + + + function format_matrix(matrix) { + var columnWidths = []; + var i, j; + + for (i = 0; i < matrix.length; ++i) { + for (j = 0; j < matrix[i].length; ++j) { + var entryWidth = String(matrix[i][j]).length; + if (!columnWidths[j] || entryWidth >= columnWidths[j]) columnWidths[j] = entryWidth; + } + } + + var formatted = ''; + + for (i = 0; i < matrix.length; ++i) { + for (j = 0; j < matrix[i].length; ++j) { + var s = String(matrix[i][j]); // pad at front with spaces + + while (s.length < columnWidths[j]) s = ' ' + s; + + formatted += s; // separate columns + + if (j != matrix[i].length - 1) formatted += ' '; + } + + if (i != matrix[i].length - 1) formatted += '\n'; + } + + return formatted; + } // --------------------------------------------------------------------------- + // Exports + // --------------------------------------------------------------------------- + + + function computeMunkres(cost_matrix, options) { + var m = new Munkres(); + return m.compute(cost_matrix, options); + } + + computeMunkres.version = "1.2.2"; + computeMunkres.format_matrix = format_matrix; + computeMunkres.make_cost_matrix = make_cost_matrix; + computeMunkres.Munkres = Munkres; // backwards compatibility + + if (module.exports) { + module.exports = computeMunkres; + } + })(munkres$1); + + var munkres = munkres$1.exports; + var ItemTracked$2 = ItemTracked$3.ItemTracked; + + var generatedMatchedList$1 = function generatedMatchedList(mapOfItemsTracked, params, detectionsOfThisFrame, matchedList, frameNb) { + var trackedItemIds = Array.from(mapOfItemsTracked.keys()); + var costMatrix = Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { + var predictedPosition = itemTracked.predictNextPosition(); + return detectionsOfThisFrame.map(function (detection) { + return params.distanceFunc(predictedPosition, detection); + }); + }); + mapOfItemsTracked.forEach(function (itemTracked) { + itemTracked.makeAvailable(); + }); + munkres(costMatrix).filter(function (m) { + return costMatrix[m[0]][m[1]] <= params.distanceLimit; + }).forEach(function (m) { + var itemTracked = mapOfItemsTracked.get(trackedItemIds[m[0]]); + var updatedTrackedItemProperties = detectionsOfThisFrame[m[1]]; + matchedList[m[1]] = { + idDisplay: itemTracked.idDisplay + }; + itemTracked.makeUnavailable().update(updatedTrackedItemProperties, frameNb); + }); + matchedList.forEach(function (matched, index) { + if (!matched) { + if (Math.min.apply(Math, _toConsumableArray(costMatrix.map(function (m) { + return m[index]; + }))) > params.distanceLimit) { + var newItemTracked = ItemTracked$2(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); + mapOfItemsTracked.set(newItemTracked.id, newItemTracked); + newItemTracked.makeUnavailable(); + costMatrix.push(detectionsOfThisFrame.map(function (detection) { + return params.distanceFunc(newItemTracked, detection); + })); + } + } + }); + }; + + munkres$2.munkresAlgorithm = function () { + return { + generatedMatchedList: generatedMatchedList$1 + }; + }; + + var kdTree$1 = {}; + + var lodash_isequal = {exports: {}}; + + /** + * Lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright JS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + + (function (module, exports) { + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + /** Used to stand-in for `undefined` hash values. */ + + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + /** Used to compose bitmasks for value comparisons. */ + + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + /** Used as references for various `Number` constants. */ + + var MAX_SAFE_INTEGER = 9007199254740991; + /** `Object#toString` result references. */ + + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]'; + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + /** Used to detect host constructors (Safari). */ + + var reIsHostCtor = /^\[object .+?Constructor\]$/; + /** Used to detect unsigned integer values. */ + + var reIsUint = /^(?:0|[1-9]\d*)$/; + /** Used to identify `toStringTag` values of typed arrays. */ + + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + /** Detect free variable `global` from Node.js. */ + + var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + /** Detect free variable `self`. */ + + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + /** Used as a reference to the global object. */ + + var root = freeGlobal || freeSelf || Function('return this')(); + /** Detect free variable `exports`. */ + + var freeExports = exports && !exports.nodeType && exports; + /** Detect free variable `module`. */ + + var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; + /** Detect the popular CommonJS extension `module.exports`. */ + + var moduleExports = freeModule && freeModule.exports === freeExports; + /** Detect free variable `process` from Node.js. */ + + var freeProcess = moduleExports && freeGlobal.process; + /** Used to access faster Node.js helpers. */ + + var nodeUtil = function () { + try { + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + }(); + /* Node.js helper references. */ + + + var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + + return result; + } + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + + + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + + return array; + } + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + + + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + + return false; + } + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + + + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + + return result; + } + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + + + function baseUnary(func) { + return function (value) { + return func(value); + }; + } + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function cacheHas(cache, key) { + return cache.has(key); + } + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + + + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + + + function mapToArray(map) { + var index = -1, + result = Array(map.size); + map.forEach(function (value, key) { + result[++index] = [key, value]; + }); + return result; + } + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + + + function overArg(func, transform) { + return function (arg) { + return func(transform(arg)); + }; + } + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + + + function setToArray(set) { + var index = -1, + result = Array(set.size); + set.forEach(function (value) { + result[++index] = value; + }); + return result; + } + /** Used for built-in method references. */ + + + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + /** Used to detect overreaching core-js shims. */ + + var coreJsData = root['__core-js_shared__']; + /** Used to resolve the decompiled source of functions. */ + + var funcToString = funcProto.toString; + /** Used to check objects for own properties. */ + + var hasOwnProperty = objectProto.hasOwnProperty; + /** Used to detect methods masquerading as native. */ + + var maskSrcKey = function () { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? 'Symbol(src)_1.' + uid : ''; + }(); + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + + + var nativeObjectToString = objectProto.toString; + /** Used to detect if a method is native. */ + + var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); + /** Built-in value references. */ + + var Buffer = moduleExports ? root.Buffer : undefined, + Symbol = root.Symbol, + Uint8Array = root.Uint8Array, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + /* Built-in method references for those with the same name as other `lodash` methods. */ + + var nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeKeys = overArg(Object.keys, Object); + /* Built-in method references that are verified to be native. */ + + var DataView = getNative(root, 'DataView'), + Map = getNative(root, 'Map'), + Promise = getNative(root, 'Promise'), + Set = getNative(root, 'Set'), + WeakMap = getNative(root, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + /** Used to detect maps, sets, and weakmaps. */ + + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + /** Used to convert symbols to primitives and strings. */ + + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + this.clear(); + + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + + + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function hashGet(key) { + var data = this.__data__; + + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); + } + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + + + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value; + return this; + } // Add methods to `Hash`. + + + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + this.clear(); + + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + + + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + + var lastIndex = data.length - 1; + + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + + --this.size; + return true; + } + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + return index < 0 ? undefined : data[index][1]; + } + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + + + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + + return this; + } // Add methods to `ListCache`. + + + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + this.clear(); + + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + + + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash(), + 'map': new (Map || ListCache)(), + 'string': new Hash() + }; + } + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + + + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } // Add methods to `MapCache`. + + + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + this.__data__ = new MapCache(); + + while (++index < length) { + this.add(values[index]); + } + } + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + + + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + + return this; + } + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + + + function setCacheHas(value) { + return this.__data__.has(value); + } // Add methods to `SetCache`. + + + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + + + function stackClear() { + this.__data__ = new ListCache(); + this.size = 0; + } + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + + + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + this.size = data.size; + return result; + } + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + + + function stackGet(key) { + return this.__data__.get(key); + } + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + + + function stackHas(key) { + return this.__data__.has(key); + } + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + + + function stackSet(key, value) { + var data = this.__data__; + + if (data instanceof ListCache) { + var pairs = data.__data__; + + if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + + data = this.__data__ = new MapCache(pairs); + } + + data.set(key, value); + this.size = data.size; + return this; + } // Add methods to `Stack`. + + + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. + isBuff && (key == 'offset' || key == 'parent') || // PhantomJS 2 has enumerable non-index properties on typed arrays. + isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || // Skip index properties. + isIndex(key, length)))) { + result.push(key); + } + } + + return result; + } + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + + + function assocIndexOf(array, key) { + var length = array.length; + + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + + return -1; + } + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + + + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + + + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + + return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); + } + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + + + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + + + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + + if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) { + return value !== value && other !== other; + } + + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + + + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + + objIsArr = true; + objIsObj = false; + } + + if (isSameTag && !objIsObj) { + stack || (stack = new Stack()); + return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + stack || (stack = new Stack()); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + + if (!isSameTag) { + return false; + } + + stack || (stack = new Stack()); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + + + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + + + function baseIsTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + + + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + + var result = []; + + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + + return result; + } + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + + + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } // Assume cyclic values are equal. + + + var stacked = stack.get(array); + + if (stacked && stack.get(other)) { + return stacked == other; + } + + var index = -1, + result = true, + seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined; + stack.set(array, other); + stack.set(other, array); // Ignore non-index properties. + + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); + } + + if (compared !== undefined) { + if (compared) { + continue; + } + + result = false; + break; + } // Recursively compare arrays (susceptible to call stack limits). + + + if (seen) { + if (!arraySome(other, function (othValue, othIndex) { + if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + result = false; + break; + } + } + + stack['delete'](array); + stack['delete'](other); + return result; + } + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + + + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { + return false; + } + + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == other + ''; + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } // Assume cyclic values are equal. + + + var stacked = stack.get(object); + + if (stacked) { + return stacked == other; + } + + bitmask |= COMPARE_UNORDERED_FLAG; // Recursively compare objects (susceptible to call stack limits). + + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + + } + + return false; + } + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + + + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + + var index = objLength; + + while (index--) { + var key = objProps[index]; + + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } // Assume cyclic values are equal. + + + var stacked = stack.get(object); + + if (stacked && stack.get(other)) { + return stacked == other; + } + + var result = true; + stack.set(object, other); + stack.set(other, object); + var skipCtor = isPartial; + + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); + } // Recursively compare objects (susceptible to call stack limits). + + + if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { + result = false; + break; + } + + skipCtor || (skipCtor = key == 'constructor'); + } + + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. + + if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + + stack['delete'](object); + stack['delete'](other); + return result; + } + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + + + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + + + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; + } + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + + + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + + + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + + return result; + } + /** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + + + var getSymbols = !nativeGetSymbols ? stubArray : function (object) { + if (object == null) { + return []; + } + + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function (symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + + var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + + if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) { + getTag = function (value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag; + + case mapCtorString: + return mapTag; + + case promiseCtorString: + return promiseTag; + + case setCtorString: + return setTag; + + case weakMapCtorString: + return weakMapTag; + } + } + + return result; + }; + } + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + + + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length; + } + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + + + function isKeyable(value) { + var type = typeof value; + return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null; + } + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + + + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + + + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = typeof Ctor == 'function' && Ctor.prototype || objectProto; + return value === proto; + } + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + + + function objectToString(value) { + return nativeObjectToString.call(value); + } + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + + + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + + try { + return func + ''; + } catch (e) {} + } + + return ''; + } + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + + + function eq(value, other) { + return value === other || value !== value && other !== other; + } + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + + + var isArguments = baseIsArguments(function () { + return arguments; + }()) ? baseIsArguments : function (value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); + }; + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + + var isArray = Array.isArray; + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + + + var isBuffer = nativeIsBuffer || stubFalse; + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + + function isEqual(value, other) { + return baseIsEqual(value, other); + } + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + + + function isFunction(value) { + if (!isObject(value)) { + return false; + } // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + + + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + + + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + + + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + + + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + + + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + /** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ + + + function stubArray() { + return []; + } + /** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ + + + function stubFalse() { + return false; + } + + module.exports = isEqual; + })(lodash_isequal, lodash_isequal.exports); + + var kdTreeMin = {}; + + /** + * k-d Tree JavaScript - V 1.01 + * + * https://github.com/ubilabs/kd-tree-javascript + * + * @author Mircea Pricop , 2012 + * @author Martin Kleppe , 2012 + * @author Ubilabs http://ubilabs.net, 2012 + * @license MIT License + */ + + (function (exports) { + !function (t, n) { + n(exports ); + }(commonjsGlobal, function (t) { + function n(t, n, o) { + this.obj = t, this.left = null, this.right = null, this.parent = o, this.dimension = n; + } + + function o(t) { + this.content = [], this.scoreFunction = t; + } + + o.prototype = { + push: function (t) { + this.content.push(t), this.bubbleUp(this.content.length - 1); + }, + pop: function () { + var t = this.content[0], + n = this.content.pop(); + return this.content.length > 0 && (this.content[0] = n, this.sinkDown(0)), t; + }, + peek: function () { + return this.content[0]; + }, + remove: function (t) { + for (var n = this.content.length, o = 0; o < n; o++) if (this.content[o] == t) { + var i = this.content.pop(); + return void (o != n - 1 && (this.content[o] = i, this.scoreFunction(i) < this.scoreFunction(t) ? this.bubbleUp(o) : this.sinkDown(o))); + } + + throw new Error("Node not found."); + }, + size: function () { + return this.content.length; + }, + bubbleUp: function (t) { + for (var n = this.content[t]; t > 0;) { + var o = Math.floor((t + 1) / 2) - 1, + i = this.content[o]; + if (!(this.scoreFunction(n) < this.scoreFunction(i))) break; + this.content[o] = n, this.content[t] = i, t = o; + } + }, + sinkDown: function (t) { + for (var n = this.content.length, o = this.content[t], i = this.scoreFunction(o);;) { + var e = 2 * (t + 1), + r = e - 1, + l = null; + + if (r < n) { + var u = this.content[r], + h = this.scoreFunction(u); + h < i && (l = r); + } + + if (e < n) { + var s = this.content[e]; + this.scoreFunction(s) < (null == l ? i : h) && (l = e); + } + + if (null == l) break; + this.content[t] = this.content[l], this.content[l] = o, t = l; + } + } + }, t.kdTree = function (t, i, e) { + function r(t, o, i) { + var l, + u, + h = o % e.length; + return 0 === t.length ? null : 1 === t.length ? new n(t[0], h, i) : (t.sort(function (t, n) { + return t[e[h]] - n[e[h]]; + }), l = Math.floor(t.length / 2), u = new n(t[l], h, i), u.left = r(t.slice(0, l), o + 1, u), u.right = r(t.slice(l + 1), o + 1, u), u); + } + + var l = this; + Array.isArray(t) ? this.root = r(t, 0, null) : function (t) { + function n(t) { + t.left && (t.left.parent = t, n(t.left)), t.right && (t.right.parent = t, n(t.right)); + } + + l.root = t, n(l.root); + }(t), this.toJSON = function (t) { + t || (t = this.root); + var o = new n(t.obj, t.dimension, null); + return t.left && (o.left = l.toJSON(t.left)), t.right && (o.right = l.toJSON(t.right)), o; + }, this.insert = function (t) { + function o(n, i) { + if (null === n) return i; + var r = e[n.dimension]; + return t[r] < n.obj[r] ? o(n.left, n) : o(n.right, n); + } + + var i, + r, + l = o(this.root, null); + null !== l ? (i = new n(t, (l.dimension + 1) % e.length, l), r = e[l.dimension], t[r] < l.obj[r] ? l.left = i : l.right = i) : this.root = new n(t, 0, null); + }, this.remove = function (t) { + function n(o) { + if (null === o) return null; + if (o.obj === t) return o; + var i = e[o.dimension]; + return t[i] < o.obj[i] ? n(o.left) : n(o.right); + } + + function o(t) { + function n(t, o) { + var i, r, l, u, h; + return null === t ? null : (i = e[o], t.dimension === o ? null !== t.left ? n(t.left, o) : t : (r = t.obj[i], l = n(t.left, o), u = n(t.right, o), h = t, null !== l && l.obj[i] < r && (h = l), null !== u && u.obj[i] < h.obj[i] && (h = u), h)); + } + + var i, r, u; + if (null === t.left && null === t.right) return null === t.parent ? void (l.root = null) : (u = e[t.parent.dimension], void (t.obj[u] < t.parent.obj[u] ? t.parent.left = null : t.parent.right = null)); + null !== t.right ? (r = (i = n(t.right, t.dimension)).obj, o(i), t.obj = r) : (r = (i = n(t.left, t.dimension)).obj, o(i), t.right = t.left, t.left = null, t.obj = r); + } + + var i; + null !== (i = n(l.root)) && o(i); + }, this.nearest = function (t, n, r) { + function u(o) { + function r(t, o) { + f.push([t, o]), f.size() > n && f.pop(); + } + + var l, + h, + s, + c, + a = e[o.dimension], + g = i(t, o.obj), + p = {}; + + for (c = 0; c < e.length; c += 1) c === o.dimension ? p[e[c]] = t[e[c]] : p[e[c]] = o.obj[e[c]]; + + h = i(p, o.obj), null !== o.right || null !== o.left ? (u(l = null === o.right ? o.left : null === o.left ? o.right : t[a] < o.obj[a] ? o.left : o.right), (f.size() < n || g < f.peek()[1]) && r(o, g), (f.size() < n || Math.abs(h) < f.peek()[1]) && null !== (s = l === o.left ? o.right : o.left) && u(s)) : (f.size() < n || g < f.peek()[1]) && r(o, g); + } + + var h, s, f; + if (f = new o(function (t) { + return -t[1]; + }), r) for (h = 0; h < n; h += 1) f.push([null, r]); + + for (l.root && u(l.root), s = [], h = 0; h < Math.min(n, f.content.length); h += 1) f.content[h][0] && s.push([f.content[h][0].obj, f.content[h][1]]); + + return s; + }, this.balanceFactor = function () { + function t(n) { + return null === n ? 0 : Math.max(t(n.left), t(n.right)) + 1; + } + + function n(t) { + return null === t ? 0 : n(t.left) + n(t.right) + 1; + } + + return t(l.root) / (Math.log(n(l.root)) / Math.log(2)); + }; + }, t.BinaryHeap = o; + }); + })(kdTreeMin); + + var isEqual = lodash_isequal.exports; + var kdTree = kdTreeMin.kdTree; + var ItemTracked$1 = ItemTracked$3.ItemTracked; // A kd-tree containing all the itemtracked + // Need to rebuild on each frame, because itemTracked positions have changed + + var rebuildTree = function rebuildTree(mapOfItemsTracked, distanceFunc) { + return new kdTree(Array.from(mapOfItemsTracked.values()), distanceFunc, ['x', 'y', 'w', 'h']); + }; + + var generatedMatchedList = function generatedMatchedList(mapOfItemsTracked, params, detectionsOfThisFrame, matchedList, frameNb) { + var DEBUG_MODE = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false; + // Contruct a kd tree for the detections of this frame + var treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ['x', 'y', 'w', 'h']); + mapOfItemsTracked.forEach(function (itemTracked) { + // First predict the new position of the itemTracked + var predictedPosition = itemTracked.predictNextPosition(); // Make available for matching + + itemTracked.makeAvailable(); // Search for a detection that matches + + var treeSearchResult = treeDetectionsOfThisFrame.nearest(predictedPosition, 1, params.distanceLimit)[0]; // Only for debug assessments of predictions + + var treeSearchResultWithoutPrediction = treeDetectionsOfThisFrame.nearest(itemTracked, 1, params.distanceLimit)[0]; // Only if we enable the extra refinement + + treeDetectionsOfThisFrame.nearest(predictedPosition, 2, params.distanceLimit); // If we have found something + + if (treeSearchResult) { + // This is an extra refinement that happens in 0.001% of tracked items matching + // If IOU overlap is super similar for two potential match, add an extra check + // if(treeSearchMultipleResults.length === 2) { + // const indexFirstChoice = 0; + // if(treeSearchMultipleResults[0][1] > treeSearchMultipleResults[1][1]) { + // indexFirstChoice = 1; + // } + // const detectionFirstChoice = { + // bbox: treeSearchMultipleResults[indexFirstChoice][0], + // distance: treeSearchMultipleResults[indexFirstChoice][1] + // } + // const detectionSecondChoice = { + // bbox: treeSearchMultipleResults[1 - indexFirstChoice][0], + // distance: treeSearchMultipleResults[1 - indexFirstChoice][1] + // } + // const deltaDistance = Math.abs(detectionFirstChoice.distance - detectionSecondChoice.distance); + // if(deltaDistance < 0.05) { + // detectionFirstChoice.area = detectionFirstChoice.bbox.w * detectionFirstChoice.bbox.h; + // detectionSecondChoice.area = detectionSecondChoice.bbox.w * detectionSecondChoice.bbox.h; + // const itemTrackedArea = itemTracked.w * itemTracked.h; + // const deltaAreaFirstChoice = Math.abs(detectionFirstChoice.area - itemTrackedArea) / (detectionFirstChoice.area + itemTrackedArea); + // const deltaAreaSecondChoice = Math.abs(detectionSecondChoice.area - itemTrackedArea) / (detectionSecondChoice.area + itemTrackedArea); + // // Compare the area of each, priorize the detections that as a overal similar area + // // even if it overlaps less + // if(deltaAreaFirstChoice > deltaAreaSecondChoice) { + // if(Math.abs(deltaAreaFirstChoice - deltaAreaSecondChoice) > 0.5) { + // if(DEBUG_MODE) { + // console.log('Switch choice ! wise it seems different for frame: ' + frameNb + ' itemTracked ' + itemTracked.idDisplay) + // console.log(Math.abs(deltaAreaFirstChoice - deltaAreaSecondChoice)); + // } + // // Change tree search result: + // treeSearchResult = treeSearchMultipleResults[1 - indexFirstChoice] + // } + // } + // } + // } + if (DEBUG_MODE) { + // Assess different results between predition or not + if (!isEqual(treeSearchResult[0], treeSearchResultWithoutPrediction && treeSearchResultWithoutPrediction[0])) { + console.log('Making the pre-prediction led to a difference result:'); + console.log("For frame ".concat(frameNb, " itemNb ").concat(itemTracked.idDisplay)); + } + } + + var indexClosestNewDetectedItem = detectionsOfThisFrame.indexOf(treeSearchResult[0]); // If this detections was not already matched to a tracked item + // (otherwise it would be matched to two tracked items...) + + if (!matchedList[indexClosestNewDetectedItem]) { + matchedList[indexClosestNewDetectedItem] = { + idDisplay: itemTracked.idDisplay + }; // Update properties of tracked object + + var updatedTrackedItemProperties = detectionsOfThisFrame[indexClosestNewDetectedItem]; + mapOfItemsTracked.get(itemTracked.id).makeUnavailable().update(updatedTrackedItemProperties, frameNb); + } + } // Add any unmatched items as new trackedItem only if those new items are not too similar + // to existing trackedItems this avoids adding some double match of YOLO and bring down drasticly reassignments + + + if (mapOfItemsTracked.size > 0) { + // Safety check to see if we still have object tracked (could have been deleted previously) + // Rebuild tracked item tree to take in account the new positions + treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ['x', 'y', 'w', 'h']); // console.log(`Nb new items Unmatched : ${matchedList.filter((isMatched) => isMatched === false).length}`) + + matchedList.forEach(function (matched, index) { + // Iterate through unmatched new detections + if (!matched) { + // Do not add as new tracked item if it is to similar to an existing one + var _treeSearchResult = treeItemsTracked.nearest(detectionsOfThisFrame[index], 1, params.distanceLimit)[0]; + + if (!_treeSearchResult) { + var newItemTracked = ItemTracked$1(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map + + mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree + + treeItemsTracked.insert(newItemTracked); // Make unvailable + + newItemTracked.makeUnavailable(); + } + } + }); + } + }); + }; + + kdTree$1.kdTreeAlgorithm = function () { + return { + generatedMatchedList: generatedMatchedList, + rebuildTree: rebuildTree + }; + }; + + var iouAreas = utils.iouAreas; + var ItemTracked = ItemTracked$3.ItemTracked, + reset = ItemTracked$3.reset; + var munkresAlgorithm = munkres$2.munkresAlgorithm; + var kdTreeAlgorithm = kdTree$1.kdTreeAlgorithm; + var DEBUG_MODE = false; // Distance function + + var iouDistance = function iouDistance(item1, item2) { + // IOU distance, between 0 and 1 + // The smaller, the less overlap + var iou = iouAreas(item1, item2); // Invert this as the KDTREESEARCH is looking for the smaller value + + var distance = 1 - iou; // If the overlap is iou < 0.95, exclude value + + if (distance > 1 - params.iouLimit) { + distance = params.distanceLimit + 1; + } + + return distance; + }; + + var params = { + // DEFAULT_UNMATCHEDFRAMES_TOLERANCE + // This the number of frame we wait when an object isn't matched before considering it gone + unMatchedFramesTolerance: 5, + // DEFAULT_IOU_LIMIT, exclude things from beeing matched if their IOU is lower than this + // 1 means total overlap whereas 0 means no overlap + iouLimit: 0.05, + // Remove new objects fast if they could not be matched in the next frames. + // Setting this to false ensures the object will stick around at least + // unMatchedFramesTolerance frames, even if they could neven be matched in + // subsequent frames. + fastDelete: true, + // The function to use to determine the distance between to detected objects + distanceFunc: iouDistance, + // The distance limit for matching. If values need to be excluded from + // matching set their distance to something greater than the distance limit + distanceLimit: 10000, + // The algorithm used to match tracks with new detections. Can be either + // 'kdTree' or 'munkres'. + matchingAlgorithm: 'munkres' // matchingAlgorithm: 'kdTree', + + }; // A dictionary of itemTracked currently tracked + // key: uuid + // value: ItemTracked object + + var mapOfItemsTracked = new Map(); // A dictionary keeping memory of all tracked object (even after they disappear) + // Useful to ouput the file of all items tracked + + var mapOfAllItemsTracked = new Map(); // By default, we do not keep all the history in memory + + var keepAllHistoryInMemory = false; + var computeDistance = tracker.computeDistance = iouDistance; + + var updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameNb) { + var treeItemsTracked = kdTreeAlgorithm().rebuildTree(mapOfItemsTracked, params.distanceFunc); // SCENARIO 1: itemsTracked map is empty + + if (mapOfItemsTracked.size === 0) { + // Just add every detected item as item Tracked + detectionsOfThisFrame.forEach(function (itemDetected) { + var newItemTracked = new ItemTracked(itemDetected, frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map + + mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree + + treeItemsTracked.insert(newItemTracked); + }); + } // SCENARIO 2: We already have itemsTracked in the map + else { + var matchedList = new Array(detectionsOfThisFrame.length); + matchedList.fill(false); // Match existing Tracked items with the items detected in the new frame + // For each look in the new detection to find the closest match + + if (detectionsOfThisFrame.length > 0) { + var matchingAlgorithmFactory = params.matchingAlgorithm === 'munkres' ? munkresAlgorithm : kdTreeAlgorithm; + + switch (params.matchingAlgorithm) { + case 'munkres': + matchingAlgorithmFactory = munkresAlgorithm; + break; + + case 'kdtree': + matchingAlgorithmFactory = kdTreeAlgorithm; + break; + + default: + throw new Error("Unknown matching algorithm ".concat(params.matchingAlgorithm)); + } + + matchingAlgorithmFactory().generatedMatchedList(mapOfItemsTracked, params, detectionsOfThisFrame, matchedList, frameNb, DEBUG_MODE); + } else { + + + mapOfItemsTracked.forEach(function (itemTracked) { + itemTracked.makeAvailable(); + }); + } // Start killing the itemTracked (and predicting next position) + // that are tracked but haven't been matched this frame + + + mapOfItemsTracked.forEach(function (itemTracked) { + if (itemTracked.available) { + itemTracked.countDown(frameNb); + itemTracked.updateTheoricalPositionAndSize(); + + if (itemTracked.isDead()) { + mapOfItemsTracked["delete"](itemTracked.id); + treeItemsTracked.remove(itemTracked); + + if (keepAllHistoryInMemory) { + mapOfAllItemsTracked.set(itemTracked.id, itemTracked); + } + } + } + }); + } + }; + + var reset_1 = tracker.reset = function () { + mapOfItemsTracked = new Map(); + mapOfAllItemsTracked = new Map(); + reset(); + }; + + var setParams = tracker.setParams = function (newParams) { + Object.keys(newParams).forEach(function (key) { + params[key] = newParams[key]; + }); + }; + + var enableKeepInMemory = tracker.enableKeepInMemory = function () { + keepAllHistoryInMemory = true; + }; + + var disableKeepInMemory = tracker.disableKeepInMemory = function () { + keepAllHistoryInMemory = false; + }; + + var getJSONOfTrackedItems = tracker.getJSONOfTrackedItems = function () { + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { + return itemTracked.toJSON(roundInt); + }); + }; + + var getJSONDebugOfTrackedItems = tracker.getJSONDebugOfTrackedItems = function () { + var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { + return itemTracked.toJSONDebug(roundInt); + }); + }; + + var getTrackedItemsInMOTFormat = tracker.getTrackedItemsInMOTFormat = function (frameNb) { + return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { + return itemTracked.toMOT(frameNb); + }); + }; // Work only if keepInMemory is enabled + + + var getAllTrackedItems = tracker.getAllTrackedItems = function () { + return mapOfAllItemsTracked; + }; // Work only if keepInMemory is enabled + + + var getJSONOfAllTrackedItems = tracker.getJSONOfAllTrackedItems = function () { + return Array.from(mapOfAllItemsTracked.values()).map(function (itemTracked) { + return itemTracked.toJSONGenericInfo(); + }); + }; + + exports.computeDistance = computeDistance; + exports["default"] = tracker; + exports.disableKeepInMemory = disableKeepInMemory; + exports.enableKeepInMemory = enableKeepInMemory; + exports.getAllTrackedItems = getAllTrackedItems; + exports.getJSONDebugOfTrackedItems = getJSONDebugOfTrackedItems; + exports.getJSONOfAllTrackedItems = getJSONOfAllTrackedItems; + exports.getJSONOfTrackedItems = getJSONOfTrackedItems; + exports.getTrackedItemsInMOTFormat = getTrackedItemsInMOTFormat; + exports.reset = reset_1; + exports.setParams = setParams; + exports.updateTrackedItemsWithNewFrame = updateTrackedItemsWithNewFrame; + + Object.defineProperty(exports, '__esModule', { value: true }); + + return exports; })({}); diff --git a/package.json b/package.json index adbdbfb..28f9e71 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "eslint": "./node_modules/.bin/eslint .", "eslint:fix": "./node_modules/.bin/eslint --fix ." }, - "author": "@tdurand", + "author": "@dmytro--kushnir", "contributors": [ "Benedikt Groß (http://benedikt-gross.de/)", "Valentin Sawadski (https://github.com/vsaw/)", diff --git a/src/start.js b/src/start.js index dc6f05d..0fe830c 100644 --- a/src/start.js +++ b/src/start.js @@ -1,60 +1,34 @@ const Tracker = require('./tracker'); +let parsedDetections = require('../__mocks__/parsedDetections.json'); +const detectionsFromYolo = require('../__mocks__/detectionsFromYolo.json'); -const detections = [ - [ - { - x: 0.688212, - y: 0.755398, - w: 0.026031, - h: 0.048941, - confidence: 16.5444, - name: 'object', - }, - ], - [], // This empty frame ensure that the object will be removed if fastDelete is enabled. - [ - { - x: 0.686925, - y: 0.796403, - w: 0.028142, - h: 0.050919, - confidence: 25.7651, - name: 'object', - }, - ], - [ - { - x: 0.686721, - y: 0.837579, - w: 0.027887, - h: 0.054398, - confidence: 34.285399999999996, - name: 'object', - }, - ], - [ - { - x: 0.686436, - y: 0.877328, - w: 0.026603, - h: 0.058, - confidence: 18.104300000000002, - name: 'object', - }, - ], -]; +console.log('!! 1.1 getFrames'); +let res = Tracker.getJSONDebugOfTrackedItems(); +console.log('!! 1.2 getFrames response ', JSON.stringify(res)); +console.log('!! 2.1 updateFrames'); -console.log("!! 1.1 getFrames") -var res = Tracker.getJSONOfTrackedItems(); -console.log("!! 1.2 getFrames response ", JSON.stringify(res)) +// Convert from +const convertPredictionsToTrackerFormat = (predictions) => predictions.reduce((acc, { score, name, rect }) => { + acc.push({ + confidence: score, + name, + x: rect[0][0], + y: rect[0][1], + w: rect[1][0], + h: rect[1][1], + }); -console.log("!! 2.1 updateFrames") -detections.forEach((frame, frameNb) => { - Tracker.updateTrackedItemsWithNewFrame(frame, frameNb); + return acc; +}, []); + +parsedDetections = [convertPredictionsToTrackerFormat(detectionsFromYolo)]; + +parsedDetections.forEach((frame, frameNb) => { + Tracker.updateTrackedItemsWithNewFrame(frame, frameNb); }); -console.log("!! 2.2 updateFrames done") -console.log("!! 3.1 getFrames") -res = Tracker.getJSONOfTrackedItems(); -console.log("!! 2.2 getFrames response ", JSON.stringify(res)) \ No newline at end of file +console.log('!! 2.2 updateFrames done'); +console.log('!! 3.1 getFrames'); +res = Tracker.getJSONDebugOfTrackedItems(); +console.log('!! 2.2 getFrames response ', JSON.stringify(res)); diff --git a/src/tracker/ItemTracked.js b/src/tracker/ItemTracked.js index 1fb1a66..ed21eab 100644 --- a/src/tracker/ItemTracked.js +++ b/src/tracker/ItemTracked.js @@ -184,13 +184,13 @@ exports.ItemTracked = function (properties, frameNb, unMatchedFramesTolerance, f return { id: this.id, idDisplay: this.idDisplay, - x: (roundInt ? parseInt(this.x, 10) : this.x), - y: (roundInt ? parseInt(this.y, 10) : this.y), - w: (roundInt ? parseInt(this.w, 10) : this.w), - h: (roundInt ? parseInt(this.h, 10) : this.h), + x: (roundInt ? parseFloat(this.x) : this.x), + y: (roundInt ? parseFloat(this.y) : this.y), + w: (roundInt ? parseFloat(this.w) : this.w), + h: (roundInt ? parseFloat(this.h) : this.h), confidence: Math.round(this.confidence * 100) / 100, // Here we negate dy to be in "normal" carthesian coordinates - bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy)), + bearing: parseFloat(computeBearingIn360(this.velocity.dx, -this.velocity.dy)), name: this.getMostlyMatchedName(), isZombie: this.isZombie, appearFrame: this.appearFrame, @@ -201,13 +201,13 @@ exports.ItemTracked = function (properties, frameNb, unMatchedFramesTolerance, f itemTracked.toJSON = function (roundInt = true) { return { id: this.idDisplay, - x: (roundInt ? parseInt(this.x, 10) : this.x), - y: (roundInt ? parseInt(this.y, 10) : this.y), - w: (roundInt ? parseInt(this.w, 10) : this.w), - h: (roundInt ? parseInt(this.h, 10) : this.h), + x: (roundInt ? parseFloat(this.x) : this.x), + y: (roundInt ? parseFloat(this.y) : this.y), + w: (roundInt ? parseFloat(this.w) : this.w), + h: (roundInt ? parseFloat(this.h) : this.h), confidence: Math.round(this.confidence * 100) / 100, // Here we negate dy to be in "normal" carthesian coordinates - bearing: parseInt(computeBearingIn360(this.velocity.dx, -this.velocity.dy), 10), + bearing: parseFloat(computeBearingIn360(this.velocity.dx, -this.velocity.dy)), name: this.getMostlyMatchedName(), isZombie: this.isZombie, }; diff --git a/src/tracker/index.js b/src/tracker/index.js index 0ee65e3..3beaa42 100644 --- a/src/tracker/index.js +++ b/src/tracker/index.js @@ -1,13 +1,12 @@ -const { kdTree } = require('kd-tree-javascript'); -const munkres = require('munkres-js'); -const isEqual = require('lodash.isequal'); const { iouAreas } = require('./utils'); const { ItemTracked, reset } = require('./ItemTracked'); +const { munkresAlgorithm } = require('./trackAlgorithms/munkres'); +const { kdTreeAlgorithm } = require('./trackAlgorithms/kdTree'); const DEBUG_MODE = false; // Distance function -const iouDistance = function(item1, item2) { +const iouDistance = function (item1, item2) { // IOU distance, between 0 and 1 // The smaller, the less overlap const iou = iouAreas(item1, item2); @@ -16,12 +15,12 @@ const iouDistance = function(item1, item2) { let distance = 1 - iou; // If the overlap is iou < 0.95, exclude value - if(distance > (1 - params.iouLimit)) { + if (distance > (1 - params.iouLimit)) { distance = params.distanceLimit + 1; } return distance; -} +}; const params = { // DEFAULT_UNMATCHEDFRAMES_TOLERANCE @@ -44,35 +43,32 @@ const params = { // 'kdTree' or 'munkres'. matchingAlgorithm: 'munkres', // matchingAlgorithm: 'kdTree', -} +}; // A dictionary of itemTracked currently tracked // key: uuid // value: ItemTracked object let mapOfItemsTracked = new Map(); -// A dictionnary keeping memory of all tracked object (even after they disappear) +// A dictionary keeping memory of all tracked object (even after they disappear) // Useful to ouput the file of all items tracked let mapOfAllItemsTracked = new Map(); // By default, we do not keep all the history in memory let keepAllHistoryInMemory = false; - exports.computeDistance = iouDistance; -exports.updateTrackedItemsWithNewFrame = function(detectionsOfThisFrame, frameNb) { - // A kd-tree containing all the itemtracked - // Need to rebuild on each frame, because itemTracked positions have changed - let treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ["x", "y", "w", "h"]); +exports.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameNb) { + const treeItemsTracked = kdTreeAlgorithm().rebuildTree(mapOfItemsTracked, params.distanceFunc); // SCENARIO 1: itemsTracked map is empty - if(mapOfItemsTracked.size === 0) { + if (mapOfItemsTracked.size === 0) { // Just add every detected item as item Tracked - detectionsOfThisFrame.forEach(function(itemDetected) { - const newItemTracked = new ItemTracked(itemDetected, frameNb, params.unMatchedFramesTolerance, params.fastDelete) + detectionsOfThisFrame.forEach((itemDetected) => { + const newItemTracked = new ItemTracked(itemDetected, frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map - mapOfItemsTracked.set(newItemTracked.id, newItemTracked) + mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree treeItemsTracked.insert(newItemTracked); }); @@ -83,245 +79,86 @@ exports.updateTrackedItemsWithNewFrame = function(detectionsOfThisFrame, frameNb matchedList.fill(false); // Match existing Tracked items with the items detected in the new frame // For each look in the new detection to find the closest match - if(detectionsOfThisFrame.length > 0) { - if (params.matchingAlgorithm === 'munkres') { - const trackedItemIds = Array.from(mapOfItemsTracked.keys()); - - const costMatrix = Array.from(mapOfItemsTracked.values()). - map(itemTracked => { - const predictedPosition = itemTracked.predictNextPosition(); - return detectionsOfThisFrame.map( - detection => params.distanceFunc(predictedPosition, detection)); - }); - - mapOfItemsTracked.forEach(function(itemTracked) { - itemTracked.makeAvailable(); - }); - - munkres(costMatrix). - filter(m => costMatrix[m[0]][m[1]] <= params.distanceLimit). - forEach(m => { - const itemTracked = mapOfItemsTracked.get(trackedItemIds[m[0]]); - const updatedTrackedItemProperties = detectionsOfThisFrame[m[1]]; - matchedList[m[1]] = { idDisplay: itemTracked.idDisplay }; - itemTracked. - makeUnavailable(). - update(updatedTrackedItemProperties, frameNb); - }); - - matchedList.forEach(function(matched, index) { - if (!matched) { - if (Math.min(...costMatrix.map(m => m[index])) > params.distanceLimit) { - const newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete) - mapOfItemsTracked.set(newItemTracked.id, newItemTracked) - newItemTracked.makeUnavailable(); - costMatrix.push(detectionsOfThisFrame.map( - detection => params.distanceFunc(newItemTracked, detection))); - } - } - }); + if (detectionsOfThisFrame.length > 0) { + let matchingAlgorithmFactory = params.matchingAlgorithm === 'munkres' ? munkresAlgorithm : kdTreeAlgorithm; + switch (params.matchingAlgorithm) { + case 'munkres': + matchingAlgorithmFactory = munkresAlgorithm; + break; + case 'kdtree': + matchingAlgorithmFactory = kdTreeAlgorithm; + break; + default: + throw new Error(`Unknown matching algorithm ${params.matchingAlgorithm}`); } - else if (params.matchingAlgorithm === 'kdTree') { - // Contruct a kd tree for the detections of this frame - const treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ["x", "y", "w", "h"]); - - mapOfItemsTracked.forEach(function(itemTracked) { - - // First predict the new position of the itemTracked - const predictedPosition = itemTracked.predictNextPosition() - - // Make available for matching - itemTracked.makeAvailable(); - - // Search for a detection that matches - const treeSearchResult = treeDetectionsOfThisFrame.nearest(predictedPosition, 1, params.distanceLimit)[0]; - - // Only for debug assessments of predictions - const treeSearchResultWithoutPrediction = treeDetectionsOfThisFrame.nearest(itemTracked, 1, params.distanceLimit)[0]; - // Only if we enable the extra refinement - const treeSearchMultipleResults = treeDetectionsOfThisFrame.nearest(predictedPosition, 2, params.distanceLimit); - - // If we have found something - if(treeSearchResult) { - - // This is an extra refinement that happens in 0.001% of tracked items matching - // If IOU overlap is super similar for two potential match, add an extra check - // if(treeSearchMultipleResults.length === 2) { - - // const indexFirstChoice = 0; - // if(treeSearchMultipleResults[0][1] > treeSearchMultipleResults[1][1]) { - // indexFirstChoice = 1; - // } - - // const detectionFirstChoice = { - // bbox: treeSearchMultipleResults[indexFirstChoice][0], - // distance: treeSearchMultipleResults[indexFirstChoice][1] - // } - - // const detectionSecondChoice = { - // bbox: treeSearchMultipleResults[1 - indexFirstChoice][0], - // distance: treeSearchMultipleResults[1 - indexFirstChoice][1] - // } - - // const deltaDistance = Math.abs(detectionFirstChoice.distance - detectionSecondChoice.distance); - - // if(deltaDistance < 0.05) { - - // detectionFirstChoice.area = detectionFirstChoice.bbox.w * detectionFirstChoice.bbox.h; - // detectionSecondChoice.area = detectionSecondChoice.bbox.w * detectionSecondChoice.bbox.h; - // const itemTrackedArea = itemTracked.w * itemTracked.h; - // const deltaAreaFirstChoice = Math.abs(detectionFirstChoice.area - itemTrackedArea) / (detectionFirstChoice.area + itemTrackedArea); - // const deltaAreaSecondChoice = Math.abs(detectionSecondChoice.area - itemTrackedArea) / (detectionSecondChoice.area + itemTrackedArea); - - // // Compare the area of each, priorize the detections that as a overal similar area - // // even if it overlaps less - // if(deltaAreaFirstChoice > deltaAreaSecondChoice) { - // if(Math.abs(deltaAreaFirstChoice - deltaAreaSecondChoice) > 0.5) { - // if(DEBUG_MODE) { - // console.log('Switch choice ! wise it seems different for frame: ' + frameNb + ' itemTracked ' + itemTracked.idDisplay) - // console.log(Math.abs(deltaAreaFirstChoice - deltaAreaSecondChoice)); - // } - // // Change tree search result: - // treeSearchResult = treeSearchMultipleResults[1 - indexFirstChoice] - // } - // } - // } - // } - - if(DEBUG_MODE) { - // Assess different results between predition or not - if(!isEqual(treeSearchResult[0], treeSearchResultWithoutPrediction && treeSearchResultWithoutPrediction[0])) { - console.log('Making the pre-prediction led to a difference result:'); - console.log('For frame ' + frameNb + ' itemNb ' + itemTracked.idDisplay) - } - } - - const indexClosestNewDetectedItem = detectionsOfThisFrame.indexOf(treeSearchResult[0]); - // If this detections was not already matched to a tracked item - // (otherwise it would be matched to two tracked items...) - if(!matchedList[indexClosestNewDetectedItem]) { - matchedList[indexClosestNewDetectedItem] = { - idDisplay: itemTracked.idDisplay - } - // Update properties of tracked object - const updatedTrackedItemProperties = detectionsOfThisFrame[indexClosestNewDetectedItem] - mapOfItemsTracked.get(itemTracked.id) - .makeUnavailable() - .update(updatedTrackedItemProperties, frameNb) - } else { - // Means two already tracked item are concurrent to get assigned a new detections - // Rule is to priorize the oldest one to avoid id-reassignment - } - } - }); - } else { - throw `Unknown matching algorithm "${params.matchingAlgorithm}"`; - } + matchingAlgorithmFactory().generatedMatchedList(mapOfItemsTracked, params, detectionsOfThisFrame, matchedList, frameNb, DEBUG_MODE); } else { - if(DEBUG_MODE) { - console.log('[Tracker] Nothing detected for frame nº' + frameNb) + if (DEBUG_MODE) { + console.log(`[Tracker] Nothing detected for frame nº${frameNb}`); } // Make existing tracked item available for deletion (to avoid ghost) - mapOfItemsTracked.forEach(function(itemTracked) { + mapOfItemsTracked.forEach((itemTracked) => { itemTracked.makeAvailable(); }); } - if (params.matchingAlgorithm === 'kdTree') { - // Add any unmatched items as new trackedItem only if those new items are not too similar - // to existing trackedItems this avoids adding some double match of YOLO and bring down drasticly reassignments - if(mapOfItemsTracked.size > 0) { // Safety check to see if we still have object tracked (could have been deleted previously) - // Rebuild tracked item tree to take in account the new positions - treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ["x", "y", "w", "h"]); - // console.log(`Nb new items Unmatched : ${matchedList.filter((isMatched) => isMatched === false).length}`) - matchedList.forEach(function(matched, index) { - // Iterate through unmatched new detections - if(!matched) { - // Do not add as new tracked item if it is to similar to an existing one - const treeSearchResult = treeItemsTracked.nearest(detectionsOfThisFrame[index], 1, params.distanceLimit)[0]; - - if(!treeSearchResult) { - const newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete) - // Add it to the map - mapOfItemsTracked.set(newItemTracked.id, newItemTracked) - // Add it to the kd tree - treeItemsTracked.insert(newItemTracked); - // Make unvailable - newItemTracked.makeUnavailable(); - } else { - // console.log('Do not add, its overlapping an existing object') - } - } - }); - } - } - // Start killing the itemTracked (and predicting next position) // that are tracked but haven't been matched this frame - mapOfItemsTracked.forEach(function(itemTracked) { - if(itemTracked.available) { + mapOfItemsTracked.forEach((itemTracked) => { + if (itemTracked.available) { itemTracked.countDown(frameNb); itemTracked.updateTheoricalPositionAndSize(); - if(itemTracked.isDead()) { + if (itemTracked.isDead()) { mapOfItemsTracked.delete(itemTracked.id); treeItemsTracked.remove(itemTracked); - if(keepAllHistoryInMemory) { + if (keepAllHistoryInMemory) { mapOfAllItemsTracked.set(itemTracked.id, itemTracked); } } } }); - } -} +}; -exports.reset = function() { +exports.reset = function () { mapOfItemsTracked = new Map(); mapOfAllItemsTracked = new Map(); reset(); -} +}; -exports.setParams = function(newParams) { +exports.setParams = function (newParams) { Object.keys(newParams).forEach((key) => { params[key] = newParams[key]; }); -} +}; -exports.enableKeepInMemory = function() { +exports.enableKeepInMemory = function () { keepAllHistoryInMemory = true; -} +}; -exports.disableKeepInMemory = function() { +exports.disableKeepInMemory = function () { keepAllHistoryInMemory = false; -} +}; -exports.getJSONOfTrackedItems = function(roundInt = true) { - return Array.from(mapOfItemsTracked.values()).map(function(itemTracked) { - return itemTracked.toJSON(roundInt); - }); +exports.getJSONOfTrackedItems = function (roundInt = true) { + return Array.from(mapOfItemsTracked.values()).map((itemTracked) => itemTracked.toJSON(roundInt)); }; -exports.getJSONDebugOfTrackedItems = function(roundInt = true) { - return Array.from(mapOfItemsTracked.values()).map(function(itemTracked) { - return itemTracked.toJSONDebug(roundInt); - }); +exports.getJSONDebugOfTrackedItems = function (roundInt = true) { + return Array.from(mapOfItemsTracked.values()).map((itemTracked) => itemTracked.toJSONDebug(roundInt)); }; -exports.getTrackedItemsInMOTFormat = function(frameNb) { - return Array.from(mapOfItemsTracked.values()).map(function(itemTracked) { - return itemTracked.toMOT(frameNb); - }); +exports.getTrackedItemsInMOTFormat = function (frameNb) { + return Array.from(mapOfItemsTracked.values()).map((itemTracked) => itemTracked.toMOT(frameNb)); }; // Work only if keepInMemory is enabled -exports.getAllTrackedItems = function() { +exports.getAllTrackedItems = function () { return mapOfAllItemsTracked; }; // Work only if keepInMemory is enabled -exports.getJSONOfAllTrackedItems = function() { - return Array.from(mapOfAllItemsTracked.values()).map(function(itemTracked) { - return itemTracked.toJSONGenericInfo(); - }); +exports.getJSONOfAllTrackedItems = function () { + return Array.from(mapOfAllItemsTracked.values()).map((itemTracked) => itemTracked.toJSONGenericInfo()); }; diff --git a/src/tracker/trackAlgorithms/kdTree.js b/src/tracker/trackAlgorithms/kdTree.js new file mode 100644 index 0000000..174807a --- /dev/null +++ b/src/tracker/trackAlgorithms/kdTree.js @@ -0,0 +1,135 @@ +const isEqual = require('lodash.isequal'); +const { kdTree } = require('kd-tree-javascript'); +const { ItemTracked } = require('../ItemTracked'); + +// A kd-tree containing all the itemtracked +// Need to rebuild on each frame, because itemTracked positions have changed +const rebuildTree = (mapOfItemsTracked, distanceFunc) => new kdTree(Array.from(mapOfItemsTracked.values()), distanceFunc, ['x', 'y', 'w', 'h']); + +const generatedMatchedList = (mapOfItemsTracked, params, detectionsOfThisFrame, matchedList, frameNb, DEBUG_MODE = false) => { + // Contruct a kd tree for the detections of this frame + const treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ['x', 'y', 'w', 'h']); + + mapOfItemsTracked.forEach((itemTracked) => { + // First predict the new position of the itemTracked + const predictedPosition = itemTracked.predictNextPosition(); + + // Make available for matching + itemTracked.makeAvailable(); + + // Search for a detection that matches + const treeSearchResult = treeDetectionsOfThisFrame.nearest(predictedPosition, 1, params.distanceLimit)[0]; + + // Only for debug assessments of predictions + const treeSearchResultWithoutPrediction = treeDetectionsOfThisFrame.nearest(itemTracked, 1, params.distanceLimit)[0]; + // Only if we enable the extra refinement + const treeSearchMultipleResults = treeDetectionsOfThisFrame.nearest(predictedPosition, 2, params.distanceLimit); + + // If we have found something + if (treeSearchResult) { + // This is an extra refinement that happens in 0.001% of tracked items matching + // If IOU overlap is super similar for two potential match, add an extra check + // if(treeSearchMultipleResults.length === 2) { + + // const indexFirstChoice = 0; + // if(treeSearchMultipleResults[0][1] > treeSearchMultipleResults[1][1]) { + // indexFirstChoice = 1; + // } + + // const detectionFirstChoice = { + // bbox: treeSearchMultipleResults[indexFirstChoice][0], + // distance: treeSearchMultipleResults[indexFirstChoice][1] + // } + + // const detectionSecondChoice = { + // bbox: treeSearchMultipleResults[1 - indexFirstChoice][0], + // distance: treeSearchMultipleResults[1 - indexFirstChoice][1] + // } + + // const deltaDistance = Math.abs(detectionFirstChoice.distance - detectionSecondChoice.distance); + + // if(deltaDistance < 0.05) { + + // detectionFirstChoice.area = detectionFirstChoice.bbox.w * detectionFirstChoice.bbox.h; + // detectionSecondChoice.area = detectionSecondChoice.bbox.w * detectionSecondChoice.bbox.h; + // const itemTrackedArea = itemTracked.w * itemTracked.h; + + // const deltaAreaFirstChoice = Math.abs(detectionFirstChoice.area - itemTrackedArea) / (detectionFirstChoice.area + itemTrackedArea); + // const deltaAreaSecondChoice = Math.abs(detectionSecondChoice.area - itemTrackedArea) / (detectionSecondChoice.area + itemTrackedArea); + + // // Compare the area of each, priorize the detections that as a overal similar area + // // even if it overlaps less + // if(deltaAreaFirstChoice > deltaAreaSecondChoice) { + // if(Math.abs(deltaAreaFirstChoice - deltaAreaSecondChoice) > 0.5) { + // if(DEBUG_MODE) { + // console.log('Switch choice ! wise it seems different for frame: ' + frameNb + ' itemTracked ' + itemTracked.idDisplay) + // console.log(Math.abs(deltaAreaFirstChoice - deltaAreaSecondChoice)); + // } + // // Change tree search result: + // treeSearchResult = treeSearchMultipleResults[1 - indexFirstChoice] + // } + // } + // } + // } + + if (DEBUG_MODE) { + // Assess different results between predition or not + if (!isEqual(treeSearchResult[0], treeSearchResultWithoutPrediction && treeSearchResultWithoutPrediction[0])) { + console.log('Making the pre-prediction led to a difference result:'); + console.log(`For frame ${frameNb} itemNb ${itemTracked.idDisplay}`); + } + } + + const indexClosestNewDetectedItem = detectionsOfThisFrame.indexOf(treeSearchResult[0]); + // If this detections was not already matched to a tracked item + // (otherwise it would be matched to two tracked items...) + if (!matchedList[indexClosestNewDetectedItem]) { + matchedList[indexClosestNewDetectedItem] = { + idDisplay: itemTracked.idDisplay, + }; + // Update properties of tracked object + const updatedTrackedItemProperties = detectionsOfThisFrame[indexClosestNewDetectedItem]; + mapOfItemsTracked.get(itemTracked.id) + .makeUnavailable() + .update(updatedTrackedItemProperties, frameNb); + } else { + // Means two already tracked item are concurrent to get assigned a new detections + // Rule is to priorize the oldest one to avoid id-reassignment + } + } + + // Add any unmatched items as new trackedItem only if those new items are not too similar + // to existing trackedItems this avoids adding some double match of YOLO and bring down drasticly reassignments + if (mapOfItemsTracked.size > 0) { // Safety check to see if we still have object tracked (could have been deleted previously) + // Rebuild tracked item tree to take in account the new positions + treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ['x', 'y', 'w', 'h']); + // console.log(`Nb new items Unmatched : ${matchedList.filter((isMatched) => isMatched === false).length}`) + matchedList.forEach((matched, index) => { + // Iterate through unmatched new detections + if (!matched) { + // Do not add as new tracked item if it is to similar to an existing one + const treeSearchResult = treeItemsTracked.nearest(detectionsOfThisFrame[index], 1, params.distanceLimit)[0]; + + if (!treeSearchResult) { + const newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); + // Add it to the map + mapOfItemsTracked.set(newItemTracked.id, newItemTracked); + // Add it to the kd tree + treeItemsTracked.insert(newItemTracked); + // Make unvailable + newItemTracked.makeUnavailable(); + } else { + // console.log('Do not add, its overlapping an existing object') + } + } + }); + } + }); +}; + +exports.kdTreeAlgorithm = function () { + return ({ + generatedMatchedList, + rebuildTree, + }); +}; diff --git a/src/tracker/trackAlgorithms/munkres.js b/src/tracker/trackAlgorithms/munkres.js new file mode 100644 index 0000000..9b039e6 --- /dev/null +++ b/src/tracker/trackAlgorithms/munkres.js @@ -0,0 +1,48 @@ +const munkres = require('munkres-js'); +const { ItemTracked } = require('../ItemTracked'); + +const generatedMatchedList = (mapOfItemsTracked, params, detectionsOfThisFrame, matchedList, frameNb) => { + const trackedItemIds = Array.from(mapOfItemsTracked.keys()); + + const costMatrix = Array.from(mapOfItemsTracked.values()) + .map((itemTracked) => { + const predictedPosition = itemTracked.predictNextPosition(); + return detectionsOfThisFrame.map( + (detection) => params.distanceFunc(predictedPosition, detection), + ); + }); + + mapOfItemsTracked.forEach((itemTracked) => { + itemTracked.makeAvailable(); + }); + + munkres(costMatrix) + .filter((m) => costMatrix[m[0]][m[1]] <= params.distanceLimit) + .forEach((m) => { + const itemTracked = mapOfItemsTracked.get(trackedItemIds[m[0]]); + const updatedTrackedItemProperties = detectionsOfThisFrame[m[1]]; + matchedList[m[1]] = { idDisplay: itemTracked.idDisplay }; + itemTracked + .makeUnavailable() + .update(updatedTrackedItemProperties, frameNb); + }); + + matchedList.forEach((matched, index) => { + if (!matched) { + if (Math.min(...costMatrix.map((m) => m[index])) > params.distanceLimit) { + const newItemTracked = ItemTracked(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); + mapOfItemsTracked.set(newItemTracked.id, newItemTracked); + newItemTracked.makeUnavailable(); + costMatrix.push(detectionsOfThisFrame.map( + (detection) => params.distanceFunc(newItemTracked, detection), + )); + } + } + }); +}; + +exports.munkresAlgorithm = function () { + return ({ + generatedMatchedList, + }); +}; From a5f33861d8b58de7ff3302cd0b5697c8b51d9618 Mon Sep 17 00:00:00 2001 From: Dmytro Kushnir Date: Mon, 19 Dec 2022 14:50:03 +0200 Subject: [PATCH 11/11] Add specific folder for eslint Co-authored-by: Dmytro Kushnir --- bundle.iife.js | 1350 +++++++++++++++++++----------------------- package.json | 4 +- src/tracker/index.js | 2 +- 3 files changed, 615 insertions(+), 741 deletions(-) diff --git a/bundle.iife.js b/bundle.iife.js index fc8c7c9..6b6fd46 100644 --- a/bundle.iife.js +++ b/bundle.iife.js @@ -1,77 +1,71 @@ -var Tracker = (function (exports) { - 'use strict'; +const Tracker = (function (exports) { + const commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + const tracker = {}; - var tracker = {}; + const utils = {}; - var utils = {}; - - utils.isDetectionTooLarge = function (detections, largestAllowed) { + utils.isDetectionTooLarge = function (detections, largestAllowed) { return detections.w >= largestAllowed; - }; + }; - var isInsideArea = function isInsideArea(area, point) { - var xMin = area.x - area.w / 2; - var xMax = area.x + area.w / 2; - var yMin = area.y - area.h / 2; - var yMax = area.y + area.h / 2; + const isInsideArea = function isInsideArea(area, point) { + const xMin = area.x - area.w / 2; + const xMax = area.x + area.w / 2; + const yMin = area.y - area.h / 2; + const yMax = area.y + area.h / 2; return point.x >= xMin && point.x <= xMax && point.y >= yMin && point.y <= yMax; - }; + }; - utils.isInsideArea = isInsideArea; + utils.isInsideArea = isInsideArea; - utils.isInsideSomeAreas = function (areas, point) { - return areas.some(function (area) { - return isInsideArea(area, point); - }); - }; + utils.isInsideSomeAreas = function (areas, point) { + return areas.some((area) => isInsideArea(area, point)); + }; - utils.ignoreObjectsNotToDetect = function (detections, objectsToDetect) { - return detections.filter(function (detection) { - return objectsToDetect.indexOf(detection.name) > -1; - }); - }; + utils.ignoreObjectsNotToDetect = function (detections, objectsToDetect) { + return detections.filter((detection) => objectsToDetect.indexOf(detection.name) > -1); + }; - var getRectangleEdges = function getRectangleEdges(item) { + const getRectangleEdges = function getRectangleEdges(item) { return { x0: item.x - item.w / 2, y0: item.y - item.h / 2, x1: item.x + item.w / 2, - y1: item.y + item.h / 2 + y1: item.y + item.h / 2, }; - }; + }; - utils.getRectangleEdges = getRectangleEdges; + utils.getRectangleEdges = getRectangleEdges; - utils.iouAreas = function (item1, item2) { - var rect1 = getRectangleEdges(item1); - var rect2 = getRectangleEdges(item2); // Get overlap rectangle + utils.iouAreas = function (item1, item2) { + const rect1 = getRectangleEdges(item1); + const rect2 = getRectangleEdges(item2); // Get overlap rectangle - var overlap_x0 = Math.max(rect1.x0, rect2.x0); - var overlap_y0 = Math.max(rect1.y0, rect2.y0); - var overlap_x1 = Math.min(rect1.x1, rect2.x1); - var overlap_y1 = Math.min(rect1.y1, rect2.y1); // if there are an overlap + const overlap_x0 = Math.max(rect1.x0, rect2.x0); + const overlap_y0 = Math.max(rect1.y0, rect2.y0); + const overlap_x1 = Math.min(rect1.x1, rect2.x1); + const overlap_y1 = Math.min(rect1.y1, rect2.y1); // if there are an overlap if (overlap_x1 - overlap_x0 <= 0 || overlap_y1 - overlap_y0 <= 0) { // no overlap return 0; } - var area_rect1 = item1.w * item1.h; - var area_rect2 = item2.w * item2.h; - var area_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0); - var area_union = area_rect1 + area_rect2 - area_intersection; + const area_rect1 = item1.w * item1.h; + const area_rect2 = item2.w * item2.h; + const area_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0); + const area_union = area_rect1 + area_rect2 - area_intersection; return area_intersection / area_union; - }; + }; - utils.computeVelocityVector = function (item1, item2, nbFrame) { + utils.computeVelocityVector = function (item1, item2, nbFrame) { return { dx: (item2.x - item1.x) / nbFrame, - dy: (item2.y - item1.y) / nbFrame + dy: (item2.y - item1.y) / nbFrame, }; - }; - /* + }; + /* computeBearingIn360 @@ -104,9 +98,8 @@ var Tracker = (function (exports) { */ - - utils.computeBearingIn360 = function (dx, dy) { - var angle = Math.atan(dx / dy) / (Math.PI / 180); + utils.computeBearingIn360 = function (dx, dy) { + const angle = Math.atan(dx / dy) / (Math.PI / 180); if (angle > 0) { if (dy > 0) { @@ -121,34 +114,34 @@ var Tracker = (function (exports) { } return 360 + angle; - }; + }; - var ItemTracked$3 = {}; + const ItemTracked$3 = {}; - var rngBrowser = {exports: {}}; + const rngBrowser = { exports: {} }; - // browser this is a little complicated due to unknown quality of Math.random() - // and inconsistent support for the `crypto` API. We do the best we can via - // feature-detection - // getRandomValues needs to be invoked in a context where "this" is a Crypto - // implementation. Also, find the complete implementation of crypto on IE11. + // browser this is a little complicated due to unknown quality of Math.random() + // and inconsistent support for the `crypto` API. We do the best we can via + // feature-detection + // getRandomValues needs to be invoked in a context where "this" is a Crypto + // implementation. Also, find the complete implementation of crypto on IE11. - var getRandomValues = typeof crypto != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto); + const getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof window.msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto); - if (getRandomValues) { + if (getRandomValues) { // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto - var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef + const rnds8 = new Uint8Array(16); // eslint-disable-line no-undef rngBrowser.exports = function whatwgRNG() { getRandomValues(rnds8); return rnds8; }; - } else { + } else { // Math.random()-based (RNG) // // If all else fails, use Math.random(). It's fast, but is of unspecified // quality. - var rnds = new Array(16); + const rnds = new Array(16); rngBrowser.exports = function mathRNG() { for (var i = 0, r; i < 16; i++) { @@ -158,59 +151,59 @@ var Tracker = (function (exports) { return rnds; }; - } + } - /** + /** * Convert array of 16 byte values to UUID string format of the form: * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX */ - var byteToHex = []; + const byteToHex = []; - for (var i = 0; i < 256; ++i) { + for (let i = 0; i < 256; ++i) { byteToHex[i] = (i + 0x100).toString(16).substr(1); - } + } - function bytesToUuid$1(buf, offset) { - var i = offset || 0; - var bth = byteToHex; // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 + function bytesToUuid$1(buf, offset) { + let i = offset || 0; + const bth = byteToHex; // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 return [bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]]].join(''); - } + } - var bytesToUuid_1 = bytesToUuid$1; + const bytesToUuid_1 = bytesToUuid$1; - var rng = rngBrowser.exports; - var bytesToUuid = bytesToUuid_1; + const rng = rngBrowser.exports; + const bytesToUuid = bytesToUuid_1; - function v4(options, buf, offset) { - var i = buf && offset || 0; + function v4(options, buf, offset) { + const i = buf && offset || 0; - if (typeof options == 'string') { + if (typeof options === 'string') { buf = options === 'binary' ? new Array(16) : null; options = null; } options = options || {}; - var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` rnds[6] = rnds[6] & 0x0f | 0x40; rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided if (buf) { - for (var ii = 0; ii < 16; ++ii) { + for (let ii = 0; ii < 16; ++ii) { buf[i + ii] = rnds[ii]; } } return buf || bytesToUuid(rnds); - } + } - var v4_1 = v4; + const v4_1 = v4; - (function (exports) { - var uuidv4 = v4_1; - var computeBearingIn360 = utils.computeBearingIn360; - var computeVelocityVector = utils.computeVelocityVector; // Properties example + (function (exports) { + const uuidv4 = v4_1; + const { computeBearingIn360 } = utils; + const { computeVelocityVector } = utils; // Properties example // { // "x": 1021, // "y": 65, @@ -224,16 +217,16 @@ var Tracker = (function (exports) { exports.ITEM_HISTORY_MAX_LENGTH = 15; // Use a simple incremental unique id for the display - var idDisplay = 0; + let idDisplay = 0; exports.ItemTracked = function (properties, frameNb, unMatchedFramesTolerance, fastDelete) { - var DEFAULT_UNMATCHEDFRAMES_TOLERANCE = unMatchedFramesTolerance; - var itemTracked = {}; // ==== Private ===== + const DEFAULT_UNMATCHEDFRAMES_TOLERANCE = unMatchedFramesTolerance; + const itemTracked = {}; // ==== Private ===== // Am I available to be matched? itemTracked.available = true; // Should I be deleted? - itemTracked["delete"] = false; + itemTracked.delete = false; itemTracked.fastDelete = fastDelete; // How many unmatched frame should I survive? itemTracked.frameUnmatchedLeftBeforeDying = unMatchedFramesTolerance; @@ -257,7 +250,7 @@ var Tracker = (function (exports) { y: properties.y, w: properties.w, h: properties.h, - confidence: properties.confidence + confidence: properties.confidence, }); if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { @@ -266,7 +259,7 @@ var Tracker = (function (exports) { itemTracked.velocity = { dx: 0, - dy: 0 + dy: 0, }; itemTracked.nbTimeMatched = 1; // Assign an unique id to each Item tracked @@ -294,7 +287,7 @@ var Tracker = (function (exports) { y: this.y, w: this.w, h: this.h, - confidence: this.confidence + confidence: this.confidence, }); if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { @@ -309,7 +302,6 @@ var Tracker = (function (exports) { this.nameCount[properties.name] = 1; } // Reset dying counter - this.frameUnmatchedLeftBeforeDying = DEFAULT_UNMATCHEDFRAMES_TOLERANCE; // Compute new velocityVector based on last positions history this.velocity = this.updateVelocityVector(); @@ -333,7 +325,7 @@ var Tracker = (function (exports) { x: this.x, y: this.y, w: this.w, - h: this.h + h: this.h, }; } @@ -351,7 +343,7 @@ var Tracker = (function (exports) { y: this.y, w: this.w, h: this.h, - confidence: this.confidence + confidence: this.confidence, }); if (itemTracked.itemHistory.length >= exports.ITEM_HISTORY_MAX_LENGTH) { @@ -367,7 +359,7 @@ var Tracker = (function (exports) { x: this.x + this.velocity.dx, y: this.y + this.velocity.dy, w: this.w, - h: this.h + h: this.h, }; }; @@ -375,32 +367,31 @@ var Tracker = (function (exports) { return this.frameUnmatchedLeftBeforeDying < 0; }; // Velocity vector based on the last 15 frames - itemTracked.updateVelocityVector = function () { if (exports.ITEM_HISTORY_MAX_LENGTH <= 2) { return { dx: undefined, - dy: undefined + dy: undefined, }; } if (this.itemHistory.length <= exports.ITEM_HISTORY_MAX_LENGTH) { - var _start = this.itemHistory[0]; - var _end = this.itemHistory[this.itemHistory.length - 1]; + const _start = this.itemHistory[0]; + const _end = this.itemHistory[this.itemHistory.length - 1]; return computeVelocityVector(_start, _end, this.itemHistory.length); } - var start = this.itemHistory[this.itemHistory.length - exports.ITEM_HISTORY_MAX_LENGTH]; - var end = this.itemHistory[this.itemHistory.length - 1]; + const start = this.itemHistory[this.itemHistory.length - exports.ITEM_HISTORY_MAX_LENGTH]; + const end = this.itemHistory[this.itemHistory.length - 1]; return computeVelocityVector(start, end, exports.ITEM_HISTORY_MAX_LENGTH); }; itemTracked.getMostlyMatchedName = function () { - var _this = this; + const _this = this; - var nameMostlyMatchedOccurences = 0; - var nameMostlyMatched = ''; - Object.keys(this.nameCount).map(function (name) { + let nameMostlyMatchedOccurences = 0; + let nameMostlyMatched = ''; + Object.keys(this.nameCount).map((name) => { if (_this.nameCount[name] > nameMostlyMatchedOccurences) { nameMostlyMatched = name; nameMostlyMatchedOccurences = _this.nameCount[name]; @@ -410,7 +401,7 @@ var Tracker = (function (exports) { }; itemTracked.toJSONDebug = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + const roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; return { id: this.id, idDisplay: this.idDisplay, @@ -424,12 +415,12 @@ var Tracker = (function (exports) { name: this.getMostlyMatchedName(), isZombie: this.isZombie, appearFrame: this.appearFrame, - disappearFrame: this.disappearFrame + disappearFrame: this.disappearFrame, }; }; itemTracked.toJSON = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + const roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; return { id: this.idDisplay, x: roundInt ? parseFloat(this.x) : this.x, @@ -440,12 +431,15 @@ var Tracker = (function (exports) { // Here we negate dy to be in "normal" carthesian coordinates bearing: parseFloat(computeBearingIn360(this.velocity.dx, -this.velocity.dy)), name: this.getMostlyMatchedName(), - isZombie: this.isZombie + isZombie: this.isZombie, }; }; itemTracked.toMOT = function (frameIndex) { - return "".concat(frameIndex, ",").concat(this.idDisplay, ",").concat(this.x - this.w / 2, ",").concat(this.y - this.h / 2, ",").concat(this.w, ",").concat(this.h, ",").concat(this.confidence / 100, ",-1,-1,-1"); + return ''.concat(frameIndex, ',').concat(this.idDisplay, ',').concat(this.x - this.w / 2, ',').concat(this.y - this.h / 2, ',') + .concat(this.w, ',') + .concat(this.h, ',') + .concat(this.confidence / 100, ',-1,-1,-1'); }; itemTracked.toJSONGenericInfo = function () { @@ -456,7 +450,7 @@ var Tracker = (function (exports) { disappearFrame: this.disappearFrame, disappearArea: this.disappearArea, nbActiveFrame: this.disappearFrame - this.appearFrame, - name: this.getMostlyMatchedName() + name: this.getMostlyMatchedName(), }; }; @@ -466,46 +460,46 @@ var Tracker = (function (exports) { exports.reset = function () { idDisplay = 0; }; - })(ItemTracked$3); + }(ItemTracked$3)); - function _toConsumableArray(arr) { + function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); - } + } - function _arrayWithoutHoles(arr) { + function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); - } + } - function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); - } + function _iterableToArray(iter) { + if (typeof Symbol !== 'undefined' && iter[Symbol.iterator] != null || iter['@@iterator'] != null) return Array.from(iter); + } - function _unsupportedIterableToArray(o, minLen) { + function _unsupportedIterableToArray(o, minLen) { if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); - } - - function _arrayLikeToArray(arr, len) { + if (typeof o === 'string') return _arrayLikeToArray(o, minLen); + let n = Object.prototype.toString.call(o).slice(8, -1); + if (n === 'Object' && o.constructor) n = o.constructor.name; + if (n === 'Map' || n === 'Set') return Array.from(o); + if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } + + function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; - } + } - function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } + function _nonIterableSpread() { + throw new TypeError('Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'); + } - var munkres$2 = {}; + const munkres$2 = {}; - var munkres$1 = {exports: {}}; + const munkres$1 = { exports: {} }; - /** + /** * Introduction * ============ * @@ -679,9 +673,9 @@ var Tracker = (function (exports) { * * Copyright and License * ===================== - * + * * Copyright 2008-2016 Brian M. Clapper - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -695,17 +689,17 @@ var Tracker = (function (exports) { * limitations under the License. */ - (function (module) { + (function (module) { /** * A very large numerical value which can be used like an integer * (i. e., adding integers of similar size does not result in overflow). */ - var MAX_SIZE = parseInt(Number.MAX_SAFE_INTEGER / 2) || (1 << 26) * (1 << 26); + const MAX_SIZE = parseInt(Number.MAX_SAFE_INTEGER / 2) || (1 << 26) * (1 << 26); /** * A default value to pad the cost matrix with if it is not quadratic. */ - var DEFAULT_PAD_VALUE = 0; // --------------------------------------------------------------------------- + const DEFAULT_PAD_VALUE = 0; // --------------------------------------------------------------------------- // Classes // --------------------------------------------------------------------------- @@ -734,21 +728,20 @@ var Tracker = (function (exports) { * @return {Array} An array of arrays representing the padded matrix */ - Munkres.prototype.pad_matrix = function (matrix, pad_value) { pad_value = pad_value || DEFAULT_PAD_VALUE; - var max_columns = 0; - var total_rows = matrix.length; - var i; + let max_columns = 0; + let total_rows = matrix.length; + let i; for (i = 0; i < total_rows; ++i) if (matrix[i].length > max_columns) max_columns = matrix[i].length; total_rows = max_columns > total_rows ? max_columns : total_rows; - var new_matrix = []; + const new_matrix = []; for (i = 0; i < total_rows; ++i) { - var row = matrix[i] || []; - var new_row = row.slice(); // If this row is too short, pad it + const row = matrix[i] || []; + const new_row = row.slice(); // If this row is too short, pad it while (total_rows > new_row.length) new_row.push(pad_value); @@ -777,7 +770,6 @@ var Tracker = (function (exports) { * cost path through the matrix */ - Munkres.prototype.compute = function (cost_matrix, options) { options = options || {}; options.padValue = options.padValue || DEFAULT_PAD_VALUE; @@ -785,7 +777,7 @@ var Tracker = (function (exports) { this.n = this.C.length; this.original_length = cost_matrix.length; this.original_width = cost_matrix[0].length; - var nfalseArray = []; + const nfalseArray = []; /* array of n false values */ while (nfalseArray.length < this.n) nfalseArray.push(false); @@ -796,26 +788,26 @@ var Tracker = (function (exports) { this.Z0_c = 0; this.path = this.__make_matrix(this.n * 2, 0); this.marked = this.__make_matrix(this.n, 0); - var step = 1; - var steps = { + let step = 1; + const steps = { 1: this.__step1, 2: this.__step2, 3: this.__step3, 4: this.__step4, 5: this.__step5, - 6: this.__step6 + 6: this.__step6, }; while (true) { - var func = steps[step]; + const func = steps[step]; if (!func) // done - break; + { break; } step = func.apply(this); } - var results = []; + const results = []; - for (var i = 0; i < this.original_length; ++i) for (var j = 0; j < this.original_width; ++j) if (this.marked[i][j] == 1) results.push([i, j]); + for (let i = 0; i < this.original_length; ++i) for (let j = 0; j < this.original_width; ++j) if (this.marked[i][j] == 1) results.push([i, j]); return results; }; @@ -828,14 +820,13 @@ var Tracker = (function (exports) { * @return {Array} An array of arrays representing the newly created matrix */ - Munkres.prototype.__make_matrix = function (n, val) { - var matrix = []; + const matrix = []; - for (var i = 0; i < n; ++i) { + for (let i = 0; i < n; ++i) { matrix[i] = []; - for (var j = 0; j < n; ++j) matrix[i][j] = val; + for (let j = 0; j < n; ++j) matrix[i][j] = val; } return matrix; @@ -845,14 +836,13 @@ var Tracker = (function (exports) { * subtract it from every element in its row. Go to Step 2. */ - Munkres.prototype.__step1 = function () { - for (var i = 0; i < this.n; ++i) { + for (let i = 0; i < this.n; ++i) { // Find the minimum value for this row and subtract that minimum // from every element in the row. - var minval = Math.min.apply(Math, this.C[i]); + const minval = Math.min.apply(Math, this.C[i]); - for (var j = 0; j < this.n; ++j) this.C[i][j] -= minval; + for (let j = 0; j < this.n; ++j) this.C[i][j] -= minval; } return 2; @@ -863,10 +853,9 @@ var Tracker = (function (exports) { * matrix. Go to Step 3. */ - Munkres.prototype.__step2 = function () { - for (var i = 0; i < this.n; ++i) { - for (var j = 0; j < this.n; ++j) { + for (let i = 0; i < this.n; ++i) { + for (let j = 0; j < this.n; ++j) { if (this.C[i][j] === 0 && !this.col_covered[j] && !this.row_covered[i]) { this.marked[i][j] = 1; this.col_covered[j] = true; @@ -886,12 +875,11 @@ var Tracker = (function (exports) { * assignments. In this case, Go to DONE, otherwise, Go to Step 4. */ - Munkres.prototype.__step3 = function () { - var count = 0; + let count = 0; - for (var i = 0; i < this.n; ++i) { - for (var j = 0; j < this.n; ++j) { + for (let i = 0; i < this.n; ++i) { + for (let j = 0; j < this.n; ++j) { if (this.marked[i][j] == 1 && this.col_covered[j] == false) { this.col_covered[j] = true; ++count; @@ -909,15 +897,14 @@ var Tracker = (function (exports) { * left. Save the smallest uncovered value and Go to Step 6. */ - Munkres.prototype.__step4 = function () { - var done = false; - var row = -1, - col = -1, - star_col = -1; + const done = false; + let row = -1; + let col = -1; + let star_col = -1; while (!done) { - var z = this.__find_a_zero(); + const z = this.__find_a_zero(); row = z[0]; col = z[1]; @@ -947,15 +934,14 @@ var Tracker = (function (exports) { * primes and uncover every line in the matrix. Return to Step 3 */ - Munkres.prototype.__step5 = function () { - var count = 0; + let count = 0; this.path[count][0] = this.Z0_r; this.path[count][1] = this.Z0_c; - var done = false; + let done = false; while (!done) { - var row = this.__find_star_in_col(this.path[count][1]); + const row = this.__find_star_in_col(this.path[count][1]); if (row >= 0) { count++; @@ -966,7 +952,7 @@ var Tracker = (function (exports) { } if (!done) { - var col = this.__find_prime_in_row(this.path[count][0]); + const col = this.__find_prime_in_row(this.path[count][0]); count++; this.path[count][0] = this.path[count - 1][0]; @@ -989,12 +975,11 @@ var Tracker = (function (exports) { * lines. */ - Munkres.prototype.__step6 = function () { - var minval = this.__find_smallest(); + const minval = this.__find_smallest(); - for (var i = 0; i < this.n; ++i) { - for (var j = 0; j < this.n; ++j) { + for (let i = 0; i < this.n; ++i) { + for (let j = 0; j < this.n; ++j) { if (this.row_covered[i]) this.C[i][j] += minval; if (!this.col_covered[j]) this.C[i][j] -= minval; } @@ -1008,11 +993,10 @@ var Tracker = (function (exports) { * @return {Number} The smallest uncovered value, or MAX_SIZE if no value was found */ - Munkres.prototype.__find_smallest = function () { - var minval = MAX_SIZE; + let minval = MAX_SIZE; - for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (!this.row_covered[i] && !this.col_covered[j]) if (minval > this.C[i][j]) minval = this.C[i][j]; + for (let i = 0; i < this.n; ++i) for (let j = 0; j < this.n; ++j) if (!this.row_covered[i] && !this.col_covered[j]) if (minval > this.C[i][j]) minval = this.C[i][j]; return minval; }; @@ -1022,9 +1006,8 @@ var Tracker = (function (exports) { * @return {Array} The indices of the found element or [-1, -1] if not found */ - Munkres.prototype.__find_a_zero = function () { - for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.C[i][j] === 0 && !this.row_covered[i] && !this.col_covered[j]) return [i, j]; + for (let i = 0; i < this.n; ++i) for (let j = 0; j < this.n; ++j) if (this.C[i][j] === 0 && !this.row_covered[i] && !this.col_covered[j]) return [i, j]; return [-1, -1]; }; @@ -1036,9 +1019,8 @@ var Tracker = (function (exports) { * @return {Number} */ - Munkres.prototype.__find_star_in_row = function (row) { - for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 1) return j; + for (let j = 0; j < this.n; ++j) if (this.marked[row][j] == 1) return j; return -1; }; @@ -1048,9 +1030,8 @@ var Tracker = (function (exports) { * @return {Number} The row index, or -1 if no starred element was found */ - Munkres.prototype.__find_star_in_col = function (col) { - for (var i = 0; i < this.n; ++i) if (this.marked[i][col] == 1) return i; + for (let i = 0; i < this.n; ++i) if (this.marked[i][col] == 1) return i; return -1; }; @@ -1060,30 +1041,27 @@ var Tracker = (function (exports) { * @return {Number} The column index, or -1 if no prime element was found */ - Munkres.prototype.__find_prime_in_row = function (row) { - for (var j = 0; j < this.n; ++j) if (this.marked[row][j] == 2) return j; + for (let j = 0; j < this.n; ++j) if (this.marked[row][j] == 2) return j; return -1; }; Munkres.prototype.__convert_path = function (path, count) { - for (var i = 0; i <= count; ++i) this.marked[path[i][0]][path[i][1]] = this.marked[path[i][0]][path[i][1]] == 1 ? 0 : 1; + for (let i = 0; i <= count; ++i) this.marked[path[i][0]][path[i][1]] = this.marked[path[i][0]][path[i][1]] == 1 ? 0 : 1; }; /** Clear all covered matrix cells */ - Munkres.prototype.__clear_covers = function () { - for (var i = 0; i < this.n; ++i) { + for (let i = 0; i < this.n; ++i) { this.row_covered[i] = false; this.col_covered[i] = false; } }; /** Erase all prime markings */ - Munkres.prototype.__erase_primes = function () { - for (var i = 0; i < this.n; ++i) for (var j = 0; j < this.n; ++j) if (this.marked[i][j] == 2) this.marked[i][j] = 0; + for (let i = 0; i < this.n; ++i) for (let j = 0; j < this.n; ++j) if (this.marked[i][j] == 2) this.marked[i][j] = 0; }; // --------------------------------------------------------------------------- // Functions // --------------------------------------------------------------------------- @@ -1111,12 +1089,12 @@ var Tracker = (function (exports) { * @return {Array} The converted matrix */ - function make_cost_matrix(profit_matrix, inversion_function) { - var i, j; + let i; let + j; if (!inversion_function) { - var maximum = -1.0 / 0.0; + let maximum = -1.0 / 0.0; for (i = 0; i < profit_matrix.length; ++i) for (j = 0; j < profit_matrix[i].length; ++j) if (profit_matrix[i][j] > maximum) maximum = profit_matrix[i][j]; @@ -1125,10 +1103,10 @@ var Tracker = (function (exports) { }; } - var cost_matrix = []; + const cost_matrix = []; for (i = 0; i < profit_matrix.length; ++i) { - var row = profit_matrix[i]; + const row = profit_matrix[i]; cost_matrix[i] = []; for (j = 0; j < row.length; ++j) cost_matrix[i][j] = inversion_function(profit_matrix[i][j]); @@ -1145,25 +1123,25 @@ var Tracker = (function (exports) { * @return {String} The formatted matrix */ - function format_matrix(matrix) { - var columnWidths = []; - var i, j; + const columnWidths = []; + let i; let + j; for (i = 0; i < matrix.length; ++i) { for (j = 0; j < matrix[i].length; ++j) { - var entryWidth = String(matrix[i][j]).length; + const entryWidth = String(matrix[i][j]).length; if (!columnWidths[j] || entryWidth >= columnWidths[j]) columnWidths[j] = entryWidth; } } - var formatted = ''; + let formatted = ''; for (i = 0; i < matrix.length; ++i) { for (j = 0; j < matrix[i].length; ++j) { - var s = String(matrix[i][j]); // pad at front with spaces + let s = String(matrix[i][j]); // pad at front with spaces - while (s.length < columnWidths[j]) s = ' ' + s; + while (s.length < columnWidths[j]) s = ` ${s}`; formatted += s; // separate columns @@ -1178,13 +1156,12 @@ var Tracker = (function (exports) { // Exports // --------------------------------------------------------------------------- - function computeMunkres(cost_matrix, options) { - var m = new Munkres(); + const m = new Munkres(); return m.compute(cost_matrix, options); } - computeMunkres.version = "1.2.2"; + computeMunkres.version = '1.2.2'; computeMunkres.format_matrix = format_matrix; computeMunkres.make_cost_matrix = make_cost_matrix; computeMunkres.Munkres = Munkres; // backwards compatibility @@ -1192,59 +1169,51 @@ var Tracker = (function (exports) { if (module.exports) { module.exports = computeMunkres; } - })(munkres$1); + }(munkres$1)); - var munkres = munkres$1.exports; - var ItemTracked$2 = ItemTracked$3.ItemTracked; + const munkres = munkres$1.exports; + const ItemTracked$2 = ItemTracked$3.ItemTracked; - var generatedMatchedList$1 = function generatedMatchedList(mapOfItemsTracked, params, detectionsOfThisFrame, matchedList, frameNb) { - var trackedItemIds = Array.from(mapOfItemsTracked.keys()); - var costMatrix = Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { - var predictedPosition = itemTracked.predictNextPosition(); - return detectionsOfThisFrame.map(function (detection) { - return params.distanceFunc(predictedPosition, detection); - }); + const generatedMatchedList$1 = function generatedMatchedList(mapOfItemsTracked, params, detectionsOfThisFrame, matchedList, frameNb) { + const trackedItemIds = Array.from(mapOfItemsTracked.keys()); + const costMatrix = Array.from(mapOfItemsTracked.values()).map((itemTracked) => { + const predictedPosition = itemTracked.predictNextPosition(); + return detectionsOfThisFrame.map((detection) => params.distanceFunc(predictedPosition, detection)); }); - mapOfItemsTracked.forEach(function (itemTracked) { + mapOfItemsTracked.forEach((itemTracked) => { itemTracked.makeAvailable(); }); - munkres(costMatrix).filter(function (m) { - return costMatrix[m[0]][m[1]] <= params.distanceLimit; - }).forEach(function (m) { - var itemTracked = mapOfItemsTracked.get(trackedItemIds[m[0]]); - var updatedTrackedItemProperties = detectionsOfThisFrame[m[1]]; + munkres(costMatrix).filter((m) => costMatrix[m[0]][m[1]] <= params.distanceLimit).forEach((m) => { + const itemTracked = mapOfItemsTracked.get(trackedItemIds[m[0]]); + const updatedTrackedItemProperties = detectionsOfThisFrame[m[1]]; matchedList[m[1]] = { - idDisplay: itemTracked.idDisplay + idDisplay: itemTracked.idDisplay, }; itemTracked.makeUnavailable().update(updatedTrackedItemProperties, frameNb); }); - matchedList.forEach(function (matched, index) { + matchedList.forEach((matched, index) => { if (!matched) { - if (Math.min.apply(Math, _toConsumableArray(costMatrix.map(function (m) { - return m[index]; - }))) > params.distanceLimit) { - var newItemTracked = ItemTracked$2(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); + if (Math.min.apply(Math, _toConsumableArray(costMatrix.map((m) => m[index]))) > params.distanceLimit) { + const newItemTracked = ItemTracked$2(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); mapOfItemsTracked.set(newItemTracked.id, newItemTracked); newItemTracked.makeUnavailable(); - costMatrix.push(detectionsOfThisFrame.map(function (detection) { - return params.distanceFunc(newItemTracked, detection); - })); + costMatrix.push(detectionsOfThisFrame.map((detection) => params.distanceFunc(newItemTracked, detection))); } } }); - }; + }; - munkres$2.munkresAlgorithm = function () { + munkres$2.munkresAlgorithm = function () { return { - generatedMatchedList: generatedMatchedList$1 + generatedMatchedList: generatedMatchedList$1, }; - }; + }; - var kdTree$1 = {}; + const kdTree$1 = {}; - var lodash_isequal = {exports: {}}; + const lodash_isequal = { exports: {} }; - /** + /** * Lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright JS Foundation and other contributors @@ -1253,101 +1222,100 @@ var Tracker = (function (exports) { * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ - (function (module, exports) { + (function (module, exports) { /** Used as the size to enable large array optimizations. */ - var LARGE_ARRAY_SIZE = 200; + const LARGE_ARRAY_SIZE = 200; /** Used to stand-in for `undefined` hash values. */ - var HASH_UNDEFINED = '__lodash_hash_undefined__'; + const HASH_UNDEFINED = '__lodash_hash_undefined__'; /** Used to compose bitmasks for value comparisons. */ - var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; + const COMPARE_PARTIAL_FLAG = 1; + const COMPARE_UNORDERED_FLAG = 2; /** Used as references for various `Number` constants. */ - var MAX_SAFE_INTEGER = 9007199254740991; + const MAX_SAFE_INTEGER = 9007199254740991; /** `Object#toString` result references. */ - var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - asyncTag = '[object AsyncFunction]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - mapTag = '[object Map]', - numberTag = '[object Number]', - nullTag = '[object Null]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - proxyTag = '[object Proxy]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]', - undefinedTag = '[object Undefined]', - weakMapTag = '[object WeakMap]'; - var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; + const argsTag = '[object Arguments]'; + const arrayTag = '[object Array]'; + const asyncTag = '[object AsyncFunction]'; + const boolTag = '[object Boolean]'; + const dateTag = '[object Date]'; + const errorTag = '[object Error]'; + const funcTag = '[object Function]'; + const genTag = '[object GeneratorFunction]'; + const mapTag = '[object Map]'; + const numberTag = '[object Number]'; + const nullTag = '[object Null]'; + const objectTag = '[object Object]'; + const promiseTag = '[object Promise]'; + const proxyTag = '[object Proxy]'; + const regexpTag = '[object RegExp]'; + const setTag = '[object Set]'; + const stringTag = '[object String]'; + const symbolTag = '[object Symbol]'; + const undefinedTag = '[object Undefined]'; + const weakMapTag = '[object WeakMap]'; + const arrayBufferTag = '[object ArrayBuffer]'; + const dataViewTag = '[object DataView]'; + const float32Tag = '[object Float32Array]'; + const float64Tag = '[object Float64Array]'; + const int8Tag = '[object Int8Array]'; + const int16Tag = '[object Int16Array]'; + const int32Tag = '[object Int32Array]'; + const uint8Tag = '[object Uint8Array]'; + const uint8ClampedTag = '[object Uint8ClampedArray]'; + const uint16Tag = '[object Uint16Array]'; + const uint32Tag = '[object Uint32Array]'; /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ - var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + const reRegExpChar = /[\\^$.*+?()[\]{}|]/g; /** Used to detect host constructors (Safari). */ - var reIsHostCtor = /^\[object .+?Constructor\]$/; + const reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used to detect unsigned integer values. */ - var reIsUint = /^(?:0|[1-9]\d*)$/; + const reIsUint = /^(?:0|[1-9]\d*)$/; /** Used to identify `toStringTag` values of typed arrays. */ - var typedArrayTags = {}; + const typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; /** Detect free variable `global` from Node.js. */ - var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + const freeGlobal = typeof commonjsGlobal === 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; /** Detect free variable `self`. */ - var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + const freeSelf = typeof self === 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ - var root = freeGlobal || freeSelf || Function('return this')(); + const root = freeGlobal || freeSelf || Function('return this')(); /** Detect free variable `exports`. */ - var freeExports = exports && !exports.nodeType && exports; + const freeExports = exports && !exports.nodeType && exports; /** Detect free variable `module`. */ - var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; + const freeModule = freeExports && 'object' === 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ - var moduleExports = freeModule && freeModule.exports === freeExports; + const moduleExports = freeModule && freeModule.exports === freeExports; /** Detect free variable `process` from Node.js. */ - var freeProcess = moduleExports && freeGlobal.process; + const freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ - var nodeUtil = function () { + const nodeUtil = (function () { try { return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} - }(); + }()); /* Node.js helper references. */ - - var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + const nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** * A specialized version of `_.filter` for arrays without support for * iteratee shorthands. @@ -1359,13 +1327,13 @@ var Tracker = (function (exports) { */ function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; + let index = -1; + const length = array == null ? 0 : array.length; + let resIndex = 0; + const result = []; while (++index < length) { - var value = array[index]; + const value = array[index]; if (predicate(value, index, array)) { result[resIndex++] = value; @@ -1383,11 +1351,10 @@ var Tracker = (function (exports) { * @returns {Array} Returns `array`. */ - function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; + let index = -1; + const { length } = values; + const offset = array.length; while (++index < length) { array[offset + index] = values[index]; @@ -1406,10 +1373,9 @@ var Tracker = (function (exports) { * else `false`. */ - function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; + let index = -1; + const length = array == null ? 0 : array.length; while (++index < length) { if (predicate(array[index], index, array)) { @@ -1429,10 +1395,9 @@ var Tracker = (function (exports) { * @returns {Array} Returns the array of results. */ - function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); + let index = -1; + const result = Array(n); while (++index < n) { result[index] = iteratee(index); @@ -1448,7 +1413,6 @@ var Tracker = (function (exports) { * @returns {Function} Returns the new capped function. */ - function baseUnary(func) { return function (value) { return func(value); @@ -1463,7 +1427,6 @@ var Tracker = (function (exports) { * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function cacheHas(cache, key) { return cache.has(key); } @@ -1476,7 +1439,6 @@ var Tracker = (function (exports) { * @returns {*} Returns the property value. */ - function getValue(object, key) { return object == null ? undefined : object[key]; } @@ -1488,11 +1450,10 @@ var Tracker = (function (exports) { * @returns {Array} Returns the key-value pairs. */ - function mapToArray(map) { - var index = -1, - result = Array(map.size); - map.forEach(function (value, key) { + let index = -1; + const result = Array(map.size); + map.forEach((value, key) => { result[++index] = [key, value]; }); return result; @@ -1506,7 +1467,6 @@ var Tracker = (function (exports) { * @returns {Function} Returns the new function. */ - function overArg(func, transform) { return function (arg) { return func(transform(arg)); @@ -1520,79 +1480,76 @@ var Tracker = (function (exports) { * @returns {Array} Returns the values. */ - function setToArray(set) { - var index = -1, - result = Array(set.size); - set.forEach(function (value) { + let index = -1; + const result = Array(set.size); + set.forEach((value) => { result[++index] = value; }); return result; } /** Used for built-in method references. */ - - var arrayProto = Array.prototype, - funcProto = Function.prototype, - objectProto = Object.prototype; + const arrayProto = Array.prototype; + const funcProto = Function.prototype; + const objectProto = Object.prototype; /** Used to detect overreaching core-js shims. */ - var coreJsData = root['__core-js_shared__']; + const coreJsData = root['__core-js_shared__']; /** Used to resolve the decompiled source of functions. */ - var funcToString = funcProto.toString; + const funcToString = funcProto.toString; /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; + const { hasOwnProperty } = objectProto; /** Used to detect methods masquerading as native. */ - var maskSrcKey = function () { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? 'Symbol(src)_1.' + uid : ''; - }(); + const maskSrcKey = (function () { + const uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? `Symbol(src)_1.${uid}` : ''; + }()); /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ - - var nativeObjectToString = objectProto.toString; + const nativeObjectToString = objectProto.toString; /** Used to detect if a method is native. */ - var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); + const reIsNative = RegExp(`^${funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?')}$`); /** Built-in value references. */ - var Buffer = moduleExports ? root.Buffer : undefined, - Symbol = root.Symbol, - Uint8Array = root.Uint8Array, - propertyIsEnumerable = objectProto.propertyIsEnumerable, - splice = arrayProto.splice, - symToStringTag = Symbol ? Symbol.toStringTag : undefined; + const Buffer = moduleExports ? root.Buffer : undefined; + const { Symbol } = root; + const { Uint8Array } = root; + const { propertyIsEnumerable } = objectProto; + const { splice } = arrayProto; + const symToStringTag = Symbol ? Symbol.toStringTag : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ - var nativeGetSymbols = Object.getOwnPropertySymbols, - nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, - nativeKeys = overArg(Object.keys, Object); + const nativeGetSymbols = Object.getOwnPropertySymbols; + const nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + const nativeKeys = overArg(Object.keys, Object); /* Built-in method references that are verified to be native. */ - var DataView = getNative(root, 'DataView'), - Map = getNative(root, 'Map'), - Promise = getNative(root, 'Promise'), - Set = getNative(root, 'Set'), - WeakMap = getNative(root, 'WeakMap'), - nativeCreate = getNative(Object, 'create'); + const DataView = getNative(root, 'DataView'); + const Map = getNative(root, 'Map'); + const Promise = getNative(root, 'Promise'); + const Set = getNative(root, 'Set'); + const WeakMap = getNative(root, 'WeakMap'); + const nativeCreate = getNative(Object, 'create'); /** Used to detect maps, sets, and weakmaps. */ - var dataViewCtorString = toSource(DataView), - mapCtorString = toSource(Map), - promiseCtorString = toSource(Promise), - setCtorString = toSource(Set), - weakMapCtorString = toSource(WeakMap); + const dataViewCtorString = toSource(DataView); + const mapCtorString = toSource(Map); + const promiseCtorString = toSource(Promise); + const setCtorString = toSource(Set); + const weakMapCtorString = toSource(WeakMap); /** Used to convert symbols to primitives and strings. */ - var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + const symbolProto = Symbol ? Symbol.prototype : undefined; + const symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * Creates a hash object. * @@ -1602,12 +1559,12 @@ var Tracker = (function (exports) { */ function Hash(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; + let index = -1; + const length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { - var entry = entries[index]; + const entry = entries[index]; this.set(entry[0], entry[1]); } } @@ -1619,7 +1576,6 @@ var Tracker = (function (exports) { * @memberOf Hash */ - function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; this.size = 0; @@ -1635,9 +1591,8 @@ var Tracker = (function (exports) { * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - function hashDelete(key) { - var result = this.has(key) && delete this.__data__[key]; + const result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; } @@ -1651,12 +1606,11 @@ var Tracker = (function (exports) { * @returns {*} Returns the entry value. */ - function hashGet(key) { - var data = this.__data__; + const data = this.__data__; if (nativeCreate) { - var result = data[key]; + const result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } @@ -1672,9 +1626,8 @@ var Tracker = (function (exports) { * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function hashHas(key) { - var data = this.__data__; + const data = this.__data__; return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); } /** @@ -1688,17 +1641,15 @@ var Tracker = (function (exports) { * @returns {Object} Returns the hash instance. */ - function hashSet(key, value) { - var data = this.__data__; + const data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value; return this; } // Add methods to `Hash`. - Hash.prototype.clear = hashClear; - Hash.prototype['delete'] = hashDelete; + Hash.prototype.delete = hashDelete; Hash.prototype.get = hashGet; Hash.prototype.has = hashHas; Hash.prototype.set = hashSet; @@ -1711,12 +1662,12 @@ var Tracker = (function (exports) { */ function ListCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; + let index = -1; + const length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { - var entry = entries[index]; + const entry = entries[index]; this.set(entry[0], entry[1]); } } @@ -1728,7 +1679,6 @@ var Tracker = (function (exports) { * @memberOf ListCache */ - function listCacheClear() { this.__data__ = []; this.size = 0; @@ -1743,16 +1693,15 @@ var Tracker = (function (exports) { * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); + const data = this.__data__; + const index = assocIndexOf(data, key); if (index < 0) { return false; } - var lastIndex = data.length - 1; + const lastIndex = data.length - 1; if (index == lastIndex) { data.pop(); @@ -1773,10 +1722,9 @@ var Tracker = (function (exports) { * @returns {*} Returns the entry value. */ - function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); + const data = this.__data__; + const index = assocIndexOf(data, key); return index < 0 ? undefined : data[index][1]; } /** @@ -1789,7 +1737,6 @@ var Tracker = (function (exports) { * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function listCacheHas(key) { return assocIndexOf(this.__data__, key) > -1; } @@ -1804,10 +1751,9 @@ var Tracker = (function (exports) { * @returns {Object} Returns the list cache instance. */ - function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); + const data = this.__data__; + const index = assocIndexOf(data, key); if (index < 0) { ++this.size; @@ -1819,9 +1765,8 @@ var Tracker = (function (exports) { return this; } // Add methods to `ListCache`. - ListCache.prototype.clear = listCacheClear; - ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.delete = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; @@ -1834,12 +1779,12 @@ var Tracker = (function (exports) { */ function MapCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; + let index = -1; + const length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { - var entry = entries[index]; + const entry = entries[index]; this.set(entry[0], entry[1]); } } @@ -1851,13 +1796,12 @@ var Tracker = (function (exports) { * @memberOf MapCache */ - function mapCacheClear() { this.size = 0; this.__data__ = { - 'hash': new Hash(), - 'map': new (Map || ListCache)(), - 'string': new Hash() + hash: new Hash(), + map: new (Map || ListCache)(), + string: new Hash(), }; } /** @@ -1870,9 +1814,8 @@ var Tracker = (function (exports) { * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - function mapCacheDelete(key) { - var result = getMapData(this, key)['delete'](key); + const result = getMapData(this, key).delete(key); this.size -= result ? 1 : 0; return result; } @@ -1886,7 +1829,6 @@ var Tracker = (function (exports) { * @returns {*} Returns the entry value. */ - function mapCacheGet(key) { return getMapData(this, key).get(key); } @@ -1900,7 +1842,6 @@ var Tracker = (function (exports) { * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function mapCacheHas(key) { return getMapData(this, key).has(key); } @@ -1915,18 +1856,16 @@ var Tracker = (function (exports) { * @returns {Object} Returns the map cache instance. */ - function mapCacheSet(key, value) { - var data = getMapData(this, key), - size = data.size; + const data = getMapData(this, key); + const { size } = data; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; } // Add methods to `MapCache`. - MapCache.prototype.clear = mapCacheClear; - MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.delete = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; @@ -1940,8 +1879,8 @@ var Tracker = (function (exports) { */ function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; + let index = -1; + const length = values == null ? 0 : values.length; this.__data__ = new MapCache(); while (++index < length) { @@ -1959,7 +1898,6 @@ var Tracker = (function (exports) { * @returns {Object} Returns the cache instance. */ - function setCacheAdd(value) { this.__data__.set(value, HASH_UNDEFINED); @@ -1975,12 +1913,10 @@ var Tracker = (function (exports) { * @returns {number} Returns `true` if `value` is found, else `false`. */ - function setCacheHas(value) { return this.__data__.has(value); } // Add methods to `SetCache`. - SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; SetCache.prototype.has = setCacheHas; /** @@ -1992,7 +1928,7 @@ var Tracker = (function (exports) { */ function Stack(entries) { - var data = this.__data__ = new ListCache(entries); + const data = this.__data__ = new ListCache(entries); this.size = data.size; } /** @@ -2003,7 +1939,6 @@ var Tracker = (function (exports) { * @memberOf Stack */ - function stackClear() { this.__data__ = new ListCache(); this.size = 0; @@ -2018,10 +1953,9 @@ var Tracker = (function (exports) { * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - function stackDelete(key) { - var data = this.__data__, - result = data['delete'](key); + const data = this.__data__; + const result = data.delete(key); this.size = data.size; return result; } @@ -2035,7 +1969,6 @@ var Tracker = (function (exports) { * @returns {*} Returns the entry value. */ - function stackGet(key) { return this.__data__.get(key); } @@ -2049,7 +1982,6 @@ var Tracker = (function (exports) { * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function stackHas(key) { return this.__data__.has(key); } @@ -2064,12 +1996,11 @@ var Tracker = (function (exports) { * @returns {Object} Returns the stack cache instance. */ - function stackSet(key, value) { - var data = this.__data__; + let data = this.__data__; if (data instanceof ListCache) { - var pairs = data.__data__; + const pairs = data.__data__; if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) { pairs.push([key, value]); @@ -2085,9 +2016,8 @@ var Tracker = (function (exports) { return this; } // Add methods to `Stack`. - Stack.prototype.clear = stackClear; - Stack.prototype['delete'] = stackDelete; + Stack.prototype.delete = stackDelete; Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; @@ -2101,20 +2031,20 @@ var Tracker = (function (exports) { */ function arrayLikeKeys(value, inherited) { - var isArr = isArray(value), - isArg = !isArr && isArguments(value), - isBuff = !isArr && !isArg && isBuffer(value), - isType = !isArr && !isArg && !isBuff && isTypedArray(value), - skipIndexes = isArr || isArg || isBuff || isType, - result = skipIndexes ? baseTimes(value.length, String) : [], - length = result.length; - - for (var key in value) { + const isArr = isArray(value); + const isArg = !isArr && isArguments(value); + const isBuff = !isArr && !isArg && isBuffer(value); + const isType = !isArr && !isArg && !isBuff && isTypedArray(value); + const skipIndexes = isArr || isArg || isBuff || isType; + const result = skipIndexes ? baseTimes(value.length, String) : []; + const { length } = result; + + for (const key in value) { if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. - key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. - isBuff && (key == 'offset' || key == 'parent') || // PhantomJS 2 has enumerable non-index properties on typed arrays. - isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || // Skip index properties. - isIndex(key, length)))) { + key == 'length' // Node.js 0.10 has enumerable non-index properties on buffers. + || isBuff && (key == 'offset' || key == 'parent') // PhantomJS 2 has enumerable non-index properties on typed arrays. + || isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') // Skip index properties. + || isIndex(key, length)))) { result.push(key); } } @@ -2130,9 +2060,8 @@ var Tracker = (function (exports) { * @returns {number} Returns the index of the matched value, else `-1`. */ - function assocIndexOf(array, key) { - var length = array.length; + let { length } = array; while (length--) { if (eq(array[length][0], key)) { @@ -2154,9 +2083,8 @@ var Tracker = (function (exports) { * @returns {Array} Returns the array of property names and symbols. */ - function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); + const result = keysFunc(object); return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } /** @@ -2167,7 +2095,6 @@ var Tracker = (function (exports) { * @returns {string} Returns the `toStringTag`. */ - function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; @@ -2183,7 +2110,6 @@ var Tracker = (function (exports) { * @returns {boolean} Returns `true` if `value` is an `arguments` object, */ - function baseIsArguments(value) { return isObjectLike(value) && baseGetTag(value) == argsTag; } @@ -2202,7 +2128,6 @@ var Tracker = (function (exports) { * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ - function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; @@ -2229,17 +2154,16 @@ var Tracker = (function (exports) { * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ - function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = objIsArr ? arrayTag : getTag(object), - othTag = othIsArr ? arrayTag : getTag(other); + let objIsArr = isArray(object); + const othIsArr = isArray(other); + let objTag = objIsArr ? arrayTag : getTag(object); + let othTag = othIsArr ? arrayTag : getTag(other); objTag = objTag == argsTag ? objectTag : objTag; othTag = othTag == argsTag ? objectTag : othTag; - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; + let objIsObj = objTag == objectTag; + const othIsObj = othTag == objectTag; + const isSameTag = objTag == othTag; if (isSameTag && isBuffer(object)) { if (!isBuffer(other)) { @@ -2256,12 +2180,12 @@ var Tracker = (function (exports) { } if (!(bitmask & COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + const objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'); + const othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; + const objUnwrapped = objIsWrapped ? object.value() : object; + const othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new Stack()); return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } @@ -2283,13 +2207,12 @@ var Tracker = (function (exports) { * else `false`. */ - function baseIsNative(value) { if (!isObject(value) || isMasked(value)) { return false; } - var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + const pattern = isFunction(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } /** @@ -2300,7 +2223,6 @@ var Tracker = (function (exports) { * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ - function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } @@ -2312,15 +2234,14 @@ var Tracker = (function (exports) { * @returns {Array} Returns the array of property names. */ - function baseKeys(object) { if (!isPrototype(object)) { return nativeKeys(object); } - var result = []; + const result = []; - for (var key in Object(object)) { + for (const key in Object(object)) { if (hasOwnProperty.call(object, key) && key != 'constructor') { result.push(key); } @@ -2342,32 +2263,30 @@ var Tracker = (function (exports) { * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ - function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; + const isPartial = bitmask & COMPARE_PARTIAL_FLAG; + const arrLength = array.length; + const othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } // Assume cyclic values are equal. - - var stacked = stack.get(array); + const stacked = stack.get(array); if (stacked && stack.get(other)) { return stacked == other; } - var index = -1, - result = true, - seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined; + let index = -1; + let result = true; + const seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined; stack.set(array, other); stack.set(other, array); // Ignore non-index properties. while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; + var arrValue = array[index]; + const othValue = other[index]; if (customizer) { var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); @@ -2382,9 +2301,8 @@ var Tracker = (function (exports) { break; } // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!arraySome(other, function (othValue, othIndex) { + if (!arraySome(other, (othValue, othIndex) => { if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { return seen.push(othIndex); } @@ -2398,8 +2316,8 @@ var Tracker = (function (exports) { } } - stack['delete'](array); - stack['delete'](other); + stack.delete(array); + stack.delete(other); return result; } /** @@ -2420,7 +2338,6 @@ var Tracker = (function (exports) { * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ - function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { switch (tag) { case dataViewTag: @@ -2453,7 +2370,7 @@ var Tracker = (function (exports) { // Coerce regexes to strings and treat strings, primitives and objects, // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring // for more details. - return object == other + ''; + return object == `${other}`; case mapTag: var convert = mapToArray; @@ -2466,7 +2383,6 @@ var Tracker = (function (exports) { return false; } // Assume cyclic values are equal. - var stacked = stack.get(object); if (stacked) { @@ -2477,14 +2393,13 @@ var Tracker = (function (exports) { stack.set(object, other); var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); + stack.delete(object); return result; case symbolTag: if (symbolValueOf) { return symbolValueOf.call(object) == symbolValueOf.call(other); } - } return false; @@ -2503,19 +2418,18 @@ var Tracker = (function (exports) { * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ - function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - objProps = getAllKeys(object), - objLength = objProps.length, - othProps = getAllKeys(other), - othLength = othProps.length; + const isPartial = bitmask & COMPARE_PARTIAL_FLAG; + const objProps = getAllKeys(object); + const objLength = objProps.length; + const othProps = getAllKeys(other); + const othLength = othProps.length; if (objLength != othLength && !isPartial) { return false; } - var index = objLength; + let index = objLength; while (index--) { var key = objProps[index]; @@ -2525,28 +2439,26 @@ var Tracker = (function (exports) { } } // Assume cyclic values are equal. - - var stacked = stack.get(object); + const stacked = stack.get(object); if (stacked && stack.get(other)) { return stacked == other; } - var result = true; + let result = true; stack.set(object, other); stack.set(other, object); - var skipCtor = isPartial; + let skipCtor = isPartial; while (++index < objLength) { key = objProps[index]; - var objValue = object[key], - othValue = other[key]; + const objValue = object[key]; + const othValue = other[key]; if (customizer) { var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); } // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { result = false; break; @@ -2556,16 +2468,16 @@ var Tracker = (function (exports) { } if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. + const objCtor = object.constructor; + const othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { + if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor === 'function' && objCtor instanceof objCtor && typeof othCtor === 'function' && othCtor instanceof othCtor)) { result = false; } } - stack['delete'](object); - stack['delete'](other); + stack.delete(object); + stack.delete(other); return result; } /** @@ -2576,7 +2488,6 @@ var Tracker = (function (exports) { * @returns {Array} Returns the array of property names and symbols. */ - function getAllKeys(object) { return baseGetAllKeys(object, keys, getSymbols); } @@ -2589,10 +2500,9 @@ var Tracker = (function (exports) { * @returns {*} Returns the map data. */ - function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; + const data = map.__data__; + return isKeyable(key) ? data[typeof key === 'string' ? 'string' : 'hash'] : data.map; } /** * Gets the native function at `key` of `object`. @@ -2603,9 +2513,8 @@ var Tracker = (function (exports) { * @returns {*} Returns the function if it's native, else `undefined`. */ - function getNative(object, key) { - var value = getValue(object, key); + const value = getValue(object, key); return baseIsNative(value) ? value : undefined; } /** @@ -2616,17 +2525,16 @@ var Tracker = (function (exports) { * @returns {string} Returns the raw `toStringTag`. */ - function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; + const isOwn = hasOwnProperty.call(value, symToStringTag); + const tag = value[symToStringTag]; try { value[symToStringTag] = undefined; var unmasked = true; } catch (e) {} - var result = nativeObjectToString.call(value); + const result = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { @@ -2646,16 +2554,13 @@ var Tracker = (function (exports) { * @returns {Array} Returns the array of symbols. */ - var getSymbols = !nativeGetSymbols ? stubArray : function (object) { if (object == null) { return []; } object = Object(object); - return arrayFilter(nativeGetSymbols(object), function (symbol) { - return propertyIsEnumerable.call(object, symbol); - }); + return arrayFilter(nativeGetSymbols(object), (symbol) => propertyIsEnumerable.call(object, symbol)); }; /** * Gets the `toStringTag` of `value`. @@ -2669,9 +2574,9 @@ var Tracker = (function (exports) { if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) { getTag = function (value) { - var result = baseGetTag(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : ''; + const result = baseGetTag(value); + const Ctor = result == objectTag ? value.constructor : undefined; + const ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { @@ -2704,10 +2609,9 @@ var Tracker = (function (exports) { * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ - function isIndex(value, length) { length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length; + return !!length && (typeof value === 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length; } /** * Checks if `value` is suitable for use as unique object key. @@ -2717,9 +2621,8 @@ var Tracker = (function (exports) { * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ - function isKeyable(value) { - var type = typeof value; + const type = typeof value; return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null; } /** @@ -2730,7 +2633,6 @@ var Tracker = (function (exports) { * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ - function isMasked(func) { return !!maskSrcKey && maskSrcKey in func; } @@ -2742,10 +2644,9 @@ var Tracker = (function (exports) { * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ - function isPrototype(value) { - var Ctor = value && value.constructor, - proto = typeof Ctor == 'function' && Ctor.prototype || objectProto; + const Ctor = value && value.constructor; + const proto = typeof Ctor === 'function' && Ctor.prototype || objectProto; return value === proto; } /** @@ -2756,7 +2657,6 @@ var Tracker = (function (exports) { * @returns {string} Returns the converted string. */ - function objectToString(value) { return nativeObjectToString.call(value); } @@ -2768,7 +2668,6 @@ var Tracker = (function (exports) { * @returns {string} Returns the source code. */ - function toSource(func) { if (func != null) { try { @@ -2776,7 +2675,7 @@ var Tracker = (function (exports) { } catch (e) {} try { - return func + ''; + return `${func}`; } catch (e) {} } @@ -2815,7 +2714,6 @@ var Tracker = (function (exports) { * // => true */ - function eq(value, other) { return value === other || value !== value && other !== other; } @@ -2838,7 +2736,6 @@ var Tracker = (function (exports) { * // => false */ - var isArguments = baseIsArguments(function () { return arguments; }()) ? baseIsArguments : function (value) { @@ -2868,7 +2765,7 @@ var Tracker = (function (exports) { * // => false */ - var isArray = Array.isArray; + var { isArray } = Array; /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or @@ -2916,7 +2813,6 @@ var Tracker = (function (exports) { * // => false */ - var isBuffer = nativeIsBuffer || stubFalse; /** * Performs a deep comparison between two values to determine if they are @@ -2968,15 +2864,13 @@ var Tracker = (function (exports) { * // => false */ - function isFunction(value) { if (!isObject(value)) { return false; } // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 9 which returns 'object' for typed arrays and other constructors. - - var tag = baseGetTag(value); + const tag = baseGetTag(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } /** @@ -3006,9 +2900,8 @@ var Tracker = (function (exports) { * // => false */ - function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + return typeof value === 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } /** * Checks if `value` is the @@ -3036,9 +2929,8 @@ var Tracker = (function (exports) { * // => false */ - function isObject(value) { - var type = typeof value; + const type = typeof value; return value != null && (type == 'object' || type == 'function'); } /** @@ -3066,9 +2958,8 @@ var Tracker = (function (exports) { * // => false */ - function isObjectLike(value) { - return value != null && typeof value == 'object'; + return value != null && typeof value === 'object'; } /** * Checks if `value` is classified as a typed array. @@ -3088,7 +2979,6 @@ var Tracker = (function (exports) { * // => false */ - var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; /** * Creates an array of the own enumerable property names of `object`. @@ -3141,7 +3031,6 @@ var Tracker = (function (exports) { * // => false */ - function stubArray() { return []; } @@ -3159,17 +3048,16 @@ var Tracker = (function (exports) { * // => [false, false] */ - function stubFalse() { return false; } module.exports = isEqual; - })(lodash_isequal, lodash_isequal.exports); + }(lodash_isequal, lodash_isequal.exports)); - var kdTreeMin = {}; + const kdTreeMin = {}; - /** + /** * k-d Tree JavaScript - V 1.01 * * https://github.com/ubilabs/kd-tree-javascript @@ -3180,10 +3068,10 @@ var Tracker = (function (exports) { * @license MIT License */ - (function (exports) { - !function (t, n) { - n(exports ); - }(commonjsGlobal, function (t) { + (function (exports) { + !(function (t, n) { + n(exports); + }(commonjsGlobal, (t) => { function n(t, n, o) { this.obj = t, this.left = null, this.right = null, this.parent = o, this.dimension = n; } @@ -3193,174 +3081,175 @@ var Tracker = (function (exports) { } o.prototype = { - push: function (t) { + push(t) { this.content.push(t), this.bubbleUp(this.content.length - 1); }, - pop: function () { - var t = this.content[0], - n = this.content.pop(); + pop() { + const t = this.content[0]; + const n = this.content.pop(); return this.content.length > 0 && (this.content[0] = n, this.sinkDown(0)), t; }, - peek: function () { + peek() { return this.content[0]; }, - remove: function (t) { - for (var n = this.content.length, o = 0; o < n; o++) if (this.content[o] == t) { - var i = this.content.pop(); + remove(t) { + for (let n = this.content.length, o = 0; o < n; o++) { + if (this.content[o] == t) { + const i = this.content.pop(); return void (o != n - 1 && (this.content[o] = i, this.scoreFunction(i) < this.scoreFunction(t) ? this.bubbleUp(o) : this.sinkDown(o))); } + } - throw new Error("Node not found."); + throw new Error('Node not found.'); }, - size: function () { + size() { return this.content.length; }, - bubbleUp: function (t) { - for (var n = this.content[t]; t > 0;) { - var o = Math.floor((t + 1) / 2) - 1, - i = this.content[o]; + bubbleUp(t) { + for (let n = this.content[t]; t > 0;) { + const o = Math.floor((t + 1) / 2) - 1; + const i = this.content[o]; if (!(this.scoreFunction(n) < this.scoreFunction(i))) break; this.content[o] = n, this.content[t] = i, t = o; } }, - sinkDown: function (t) { - for (var n = this.content.length, o = this.content[t], i = this.scoreFunction(o);;) { - var e = 2 * (t + 1), - r = e - 1, - l = null; + sinkDown(t) { + for (let n = this.content.length, o = this.content[t], i = this.scoreFunction(o); ;) { + const e = 2 * (t + 1); + const r = e - 1; + let l = null; if (r < n) { - var u = this.content[r], - h = this.scoreFunction(u); + const u = this.content[r]; + var h = this.scoreFunction(u); h < i && (l = r); } if (e < n) { - var s = this.content[e]; - this.scoreFunction(s) < (null == l ? i : h) && (l = e); + const s = this.content[e]; + this.scoreFunction(s) < (l == null ? i : h) && (l = e); } - if (null == l) break; + if (l == null) break; this.content[t] = this.content[l], this.content[l] = o, t = l; } - } + }, }, t.kdTree = function (t, i, e) { function r(t, o, i) { - var l, - u, - h = o % e.length; - return 0 === t.length ? null : 1 === t.length ? new n(t[0], h, i) : (t.sort(function (t, n) { - return t[e[h]] - n[e[h]]; - }), l = Math.floor(t.length / 2), u = new n(t[l], h, i), u.left = r(t.slice(0, l), o + 1, u), u.right = r(t.slice(l + 1), o + 1, u), u); + let l; + let u; + const h = o % e.length; + return t.length === 0 ? null : t.length === 1 ? new n(t[0], h, i) : (t.sort((t, n) => t[e[h]] - n[e[h]]), l = Math.floor(t.length / 2), u = new n(t[l], h, i), u.left = r(t.slice(0, l), o + 1, u), u.right = r(t.slice(l + 1), o + 1, u), u); } - var l = this; - Array.isArray(t) ? this.root = r(t, 0, null) : function (t) { + const l = this; + Array.isArray(t) ? this.root = r(t, 0, null) : (function (t) { function n(t) { t.left && (t.left.parent = t, n(t.left)), t.right && (t.right.parent = t, n(t.right)); } l.root = t, n(l.root); - }(t), this.toJSON = function (t) { + }(t)), this.toJSON = function (t) { t || (t = this.root); - var o = new n(t.obj, t.dimension, null); + const o = new n(t.obj, t.dimension, null); return t.left && (o.left = l.toJSON(t.left)), t.right && (o.right = l.toJSON(t.right)), o; }, this.insert = function (t) { function o(n, i) { - if (null === n) return i; - var r = e[n.dimension]; + if (n === null) return i; + const r = e[n.dimension]; return t[r] < n.obj[r] ? o(n.left, n) : o(n.right, n); } - var i, - r, - l = o(this.root, null); - null !== l ? (i = new n(t, (l.dimension + 1) % e.length, l), r = e[l.dimension], t[r] < l.obj[r] ? l.left = i : l.right = i) : this.root = new n(t, 0, null); + let i; + let r; + const l = o(this.root, null); + l !== null ? (i = new n(t, (l.dimension + 1) % e.length, l), r = e[l.dimension], t[r] < l.obj[r] ? l.left = i : l.right = i) : this.root = new n(t, 0, null); }, this.remove = function (t) { function n(o) { - if (null === o) return null; + if (o === null) return null; if (o.obj === t) return o; - var i = e[o.dimension]; + const i = e[o.dimension]; return t[i] < o.obj[i] ? n(o.left) : n(o.right); } function o(t) { function n(t, o) { - var i, r, l, u, h; - return null === t ? null : (i = e[o], t.dimension === o ? null !== t.left ? n(t.left, o) : t : (r = t.obj[i], l = n(t.left, o), u = n(t.right, o), h = t, null !== l && l.obj[i] < r && (h = l), null !== u && u.obj[i] < h.obj[i] && (h = u), h)); + let i; let r; let l; let u; let + h; + return t === null ? null : (i = e[o], t.dimension === o ? t.left !== null ? n(t.left, o) : t : (r = t.obj[i], l = n(t.left, o), u = n(t.right, o), h = t, l !== null && l.obj[i] < r && (h = l), u !== null && u.obj[i] < h.obj[i] && (h = u), h)); } - var i, r, u; - if (null === t.left && null === t.right) return null === t.parent ? void (l.root = null) : (u = e[t.parent.dimension], void (t.obj[u] < t.parent.obj[u] ? t.parent.left = null : t.parent.right = null)); - null !== t.right ? (r = (i = n(t.right, t.dimension)).obj, o(i), t.obj = r) : (r = (i = n(t.left, t.dimension)).obj, o(i), t.right = t.left, t.left = null, t.obj = r); + let i; let r; let + u; + if (t.left === null && t.right === null) return t.parent === null ? void (l.root = null) : (u = e[t.parent.dimension], void (t.obj[u] < t.parent.obj[u] ? t.parent.left = null : t.parent.right = null)); + t.right !== null ? (r = (i = n(t.right, t.dimension)).obj, o(i), t.obj = r) : (r = (i = n(t.left, t.dimension)).obj, o(i), t.right = t.left, t.left = null, t.obj = r); } - var i; - null !== (i = n(l.root)) && o(i); + let i; + (i = n(l.root)) !== null && o(i); }, this.nearest = function (t, n, r) { function u(o) { function r(t, o) { f.push([t, o]), f.size() > n && f.pop(); } - var l, - h, - s, - c, - a = e[o.dimension], - g = i(t, o.obj), - p = {}; + let l; + let h; + let s; + let c; + const a = e[o.dimension]; + const g = i(t, o.obj); + const p = {}; for (c = 0; c < e.length; c += 1) c === o.dimension ? p[e[c]] = t[e[c]] : p[e[c]] = o.obj[e[c]]; - h = i(p, o.obj), null !== o.right || null !== o.left ? (u(l = null === o.right ? o.left : null === o.left ? o.right : t[a] < o.obj[a] ? o.left : o.right), (f.size() < n || g < f.peek()[1]) && r(o, g), (f.size() < n || Math.abs(h) < f.peek()[1]) && null !== (s = l === o.left ? o.right : o.left) && u(s)) : (f.size() < n || g < f.peek()[1]) && r(o, g); + h = i(p, o.obj), o.right !== null || o.left !== null ? (u(l = o.right === null ? o.left : o.left === null ? o.right : t[a] < o.obj[a] ? o.left : o.right), (f.size() < n || g < f.peek()[1]) && r(o, g), (f.size() < n || Math.abs(h) < f.peek()[1]) && (s = l === o.left ? o.right : o.left) !== null && u(s)) : (f.size() < n || g < f.peek()[1]) && r(o, g); } - var h, s, f; - if (f = new o(function (t) { - return -t[1]; - }), r) for (h = 0; h < n; h += 1) f.push([null, r]); + let h; let s; let + f; + if (f = new o((t) => -t[1]), r) for (h = 0; h < n; h += 1) f.push([null, r]); for (l.root && u(l.root), s = [], h = 0; h < Math.min(n, f.content.length); h += 1) f.content[h][0] && s.push([f.content[h][0].obj, f.content[h][1]]); return s; }, this.balanceFactor = function () { function t(n) { - return null === n ? 0 : Math.max(t(n.left), t(n.right)) + 1; + return n === null ? 0 : Math.max(t(n.left), t(n.right)) + 1; } function n(t) { - return null === t ? 0 : n(t.left) + n(t.right) + 1; + return t === null ? 0 : n(t.left) + n(t.right) + 1; } return t(l.root) / (Math.log(n(l.root)) / Math.log(2)); }; }, t.BinaryHeap = o; - }); - })(kdTreeMin); + })); + }(kdTreeMin)); - var isEqual = lodash_isequal.exports; - var kdTree = kdTreeMin.kdTree; - var ItemTracked$1 = ItemTracked$3.ItemTracked; // A kd-tree containing all the itemtracked - // Need to rebuild on each frame, because itemTracked positions have changed + const isEqual = lodash_isequal.exports; + const { kdTree } = kdTreeMin; + const ItemTracked$1 = ItemTracked$3.ItemTracked; // A kd-tree containing all the itemtracked + // Need to rebuild on each frame, because itemTracked positions have changed - var rebuildTree = function rebuildTree(mapOfItemsTracked, distanceFunc) { + const rebuildTree = function rebuildTree(mapOfItemsTracked, distanceFunc) { return new kdTree(Array.from(mapOfItemsTracked.values()), distanceFunc, ['x', 'y', 'w', 'h']); - }; + }; - var generatedMatchedList = function generatedMatchedList(mapOfItemsTracked, params, detectionsOfThisFrame, matchedList, frameNb) { - var DEBUG_MODE = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false; + const generatedMatchedList = function generatedMatchedList(mapOfItemsTracked, params, detectionsOfThisFrame, matchedList, frameNb) { + const DEBUG_MODE = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false; // Contruct a kd tree for the detections of this frame - var treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ['x', 'y', 'w', 'h']); - mapOfItemsTracked.forEach(function (itemTracked) { + const treeDetectionsOfThisFrame = new kdTree(detectionsOfThisFrame, params.distanceFunc, ['x', 'y', 'w', 'h']); + mapOfItemsTracked.forEach((itemTracked) => { // First predict the new position of the itemTracked - var predictedPosition = itemTracked.predictNextPosition(); // Make available for matching + const predictedPosition = itemTracked.predictNextPosition(); // Make available for matching itemTracked.makeAvailable(); // Search for a detection that matches - var treeSearchResult = treeDetectionsOfThisFrame.nearest(predictedPosition, 1, params.distanceLimit)[0]; // Only for debug assessments of predictions + const treeSearchResult = treeDetectionsOfThisFrame.nearest(predictedPosition, 1, params.distanceLimit)[0]; // Only for debug assessments of predictions - var treeSearchResultWithoutPrediction = treeDetectionsOfThisFrame.nearest(itemTracked, 1, params.distanceLimit)[0]; // Only if we enable the extra refinement + const treeSearchResultWithoutPrediction = treeDetectionsOfThisFrame.nearest(itemTracked, 1, params.distanceLimit)[0]; // Only if we enable the extra refinement treeDetectionsOfThisFrame.nearest(predictedPosition, 2, params.distanceLimit); // If we have found something @@ -3405,38 +3294,37 @@ var Tracker = (function (exports) { // Assess different results between predition or not if (!isEqual(treeSearchResult[0], treeSearchResultWithoutPrediction && treeSearchResultWithoutPrediction[0])) { console.log('Making the pre-prediction led to a difference result:'); - console.log("For frame ".concat(frameNb, " itemNb ").concat(itemTracked.idDisplay)); + console.log('For frame '.concat(frameNb, ' itemNb ').concat(itemTracked.idDisplay)); } } - var indexClosestNewDetectedItem = detectionsOfThisFrame.indexOf(treeSearchResult[0]); // If this detections was not already matched to a tracked item + const indexClosestNewDetectedItem = detectionsOfThisFrame.indexOf(treeSearchResult[0]); // If this detections was not already matched to a tracked item // (otherwise it would be matched to two tracked items...) if (!matchedList[indexClosestNewDetectedItem]) { matchedList[indexClosestNewDetectedItem] = { - idDisplay: itemTracked.idDisplay + idDisplay: itemTracked.idDisplay, }; // Update properties of tracked object - var updatedTrackedItemProperties = detectionsOfThisFrame[indexClosestNewDetectedItem]; + const updatedTrackedItemProperties = detectionsOfThisFrame[indexClosestNewDetectedItem]; mapOfItemsTracked.get(itemTracked.id).makeUnavailable().update(updatedTrackedItemProperties, frameNb); } } // Add any unmatched items as new trackedItem only if those new items are not too similar // to existing trackedItems this avoids adding some double match of YOLO and bring down drasticly reassignments - if (mapOfItemsTracked.size > 0) { // Safety check to see if we still have object tracked (could have been deleted previously) // Rebuild tracked item tree to take in account the new positions treeItemsTracked = new kdTree(Array.from(mapOfItemsTracked.values()), params.distanceFunc, ['x', 'y', 'w', 'h']); // console.log(`Nb new items Unmatched : ${matchedList.filter((isMatched) => isMatched === false).length}`) - matchedList.forEach(function (matched, index) { + matchedList.forEach((matched, index) => { // Iterate through unmatched new detections if (!matched) { // Do not add as new tracked item if it is to similar to an existing one - var _treeSearchResult = treeItemsTracked.nearest(detectionsOfThisFrame[index], 1, params.distanceLimit)[0]; + const _treeSearchResult = treeItemsTracked.nearest(detectionsOfThisFrame[index], 1, params.distanceLimit)[0]; if (!_treeSearchResult) { - var newItemTracked = ItemTracked$1(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map + const newItemTracked = ItemTracked$1(detectionsOfThisFrame[index], frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree @@ -3448,37 +3336,37 @@ var Tracker = (function (exports) { }); } }); - }; + }; - kdTree$1.kdTreeAlgorithm = function () { + kdTree$1.kdTreeAlgorithm = function () { return { - generatedMatchedList: generatedMatchedList, - rebuildTree: rebuildTree + generatedMatchedList, + rebuildTree, }; - }; + }; - var iouAreas = utils.iouAreas; - var ItemTracked = ItemTracked$3.ItemTracked, - reset = ItemTracked$3.reset; - var munkresAlgorithm = munkres$2.munkresAlgorithm; - var kdTreeAlgorithm = kdTree$1.kdTreeAlgorithm; - var DEBUG_MODE = false; // Distance function + const { iouAreas } = utils; + const { ItemTracked } = ItemTracked$3; + const { reset } = ItemTracked$3; + const { munkresAlgorithm } = munkres$2; + const { kdTreeAlgorithm } = kdTree$1; + const DEBUG_MODE = false; // Distance function - var iouDistance = function iouDistance(item1, item2) { + const iouDistance = function iouDistance(item1, item2) { // IOU distance, between 0 and 1 // The smaller, the less overlap - var iou = iouAreas(item1, item2); // Invert this as the KDTREESEARCH is looking for the smaller value + const iou = iouAreas(item1, item2); // Invert this as the KDTREESEARCH is looking for the smaller value - var distance = 1 - iou; // If the overlap is iou < 0.95, exclude value + let distance = 1 - iou; // If the overlap is iou < 0.95, exclude value if (distance > 1 - params.iouLimit) { distance = params.distanceLimit + 1; } return distance; - }; + }; - var params = { + var params = { // DEFAULT_UNMATCHEDFRAMES_TOLERANCE // This the number of frame we wait when an object isn't matched before considering it gone unMatchedFramesTolerance: 5, @@ -3497,27 +3385,27 @@ var Tracker = (function (exports) { distanceLimit: 10000, // The algorithm used to match tracks with new detections. Can be either // 'kdTree' or 'munkres'. - matchingAlgorithm: 'munkres' // matchingAlgorithm: 'kdTree', + matchingAlgorithm: 'munkres', // matchingAlgorithm: 'kdTree', - }; // A dictionary of itemTracked currently tracked - // key: uuid - // value: ItemTracked object + }; // A dictionary of itemTracked currently tracked + // key: uuid + // value: ItemTracked object - var mapOfItemsTracked = new Map(); // A dictionary keeping memory of all tracked object (even after they disappear) - // Useful to ouput the file of all items tracked + let mapOfItemsTracked = new Map(); // A dictionary keeping memory of all tracked object (even after they disappear) + // Useful to ouput the file of all items tracked - var mapOfAllItemsTracked = new Map(); // By default, we do not keep all the history in memory + let mapOfAllItemsTracked = new Map(); // By default, we do not keep all the history in memory - var keepAllHistoryInMemory = false; - var computeDistance = tracker.computeDistance = iouDistance; + let keepAllHistoryInMemory = false; + const computeDistance = tracker.computeDistance = iouDistance; - var updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameNb) { - var treeItemsTracked = kdTreeAlgorithm().rebuildTree(mapOfItemsTracked, params.distanceFunc); // SCENARIO 1: itemsTracked map is empty + const updateTrackedItemsWithNewFrame = tracker.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameNb) { + const treeItemsTracked = kdTreeAlgorithm().rebuildTree(mapOfItemsTracked, params.distanceFunc); // SCENARIO 1: itemsTracked map is empty if (mapOfItemsTracked.size === 0) { // Just add every detected item as item Tracked - detectionsOfThisFrame.forEach(function (itemDetected) { - var newItemTracked = new ItemTracked(itemDetected, frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map + detectionsOfThisFrame.forEach((itemDetected) => { + const newItemTracked = new ItemTracked(itemDetected, frameNb, params.unMatchedFramesTolerance, params.fastDelete); // Add it to the map mapOfItemsTracked.set(newItemTracked.id, newItemTracked); // Add it to the kd tree @@ -3525,12 +3413,12 @@ var Tracker = (function (exports) { }); } // SCENARIO 2: We already have itemsTracked in the map else { - var matchedList = new Array(detectionsOfThisFrame.length); + const matchedList = new Array(detectionsOfThisFrame.length); matchedList.fill(false); // Match existing Tracked items with the items detected in the new frame // For each look in the new detection to find the closest match if (detectionsOfThisFrame.length > 0) { - var matchingAlgorithmFactory = params.matchingAlgorithm === 'munkres' ? munkresAlgorithm : kdTreeAlgorithm; + let matchingAlgorithmFactory = params.matchingAlgorithm === 'munkres' ? munkresAlgorithm : kdTreeAlgorithm; switch (params.matchingAlgorithm) { case 'munkres': @@ -3542,27 +3430,24 @@ var Tracker = (function (exports) { break; default: - throw new Error("Unknown matching algorithm ".concat(params.matchingAlgorithm)); + throw new Error('Unknown matching algorithm '.concat(params.matchingAlgorithm)); } matchingAlgorithmFactory().generatedMatchedList(mapOfItemsTracked, params, detectionsOfThisFrame, matchedList, frameNb, DEBUG_MODE); } else { - - - mapOfItemsTracked.forEach(function (itemTracked) { + mapOfItemsTracked.forEach((itemTracked) => { itemTracked.makeAvailable(); }); } // Start killing the itemTracked (and predicting next position) // that are tracked but haven't been matched this frame - - mapOfItemsTracked.forEach(function (itemTracked) { + mapOfItemsTracked.forEach((itemTracked) => { if (itemTracked.available) { itemTracked.countDown(frameNb); itemTracked.updateTheoricalPositionAndSize(); if (itemTracked.isDead()) { - mapOfItemsTracked["delete"](itemTracked.id); + mapOfItemsTracked.delete(itemTracked.id); treeItemsTracked.remove(itemTracked); if (keepAllHistoryInMemory) { @@ -3572,75 +3457,64 @@ var Tracker = (function (exports) { } }); } - }; + }; - var reset_1 = tracker.reset = function () { + const reset_1 = tracker.reset = function () { mapOfItemsTracked = new Map(); mapOfAllItemsTracked = new Map(); reset(); - }; + }; - var setParams = tracker.setParams = function (newParams) { - Object.keys(newParams).forEach(function (key) { + const setParams = tracker.setParams = function (newParams) { + Object.keys(newParams).forEach((key) => { params[key] = newParams[key]; }); - }; + }; - var enableKeepInMemory = tracker.enableKeepInMemory = function () { + const enableKeepInMemory = tracker.enableKeepInMemory = function () { keepAllHistoryInMemory = true; - }; + }; - var disableKeepInMemory = tracker.disableKeepInMemory = function () { + const disableKeepInMemory = tracker.disableKeepInMemory = function () { keepAllHistoryInMemory = false; - }; + }; - var getJSONOfTrackedItems = tracker.getJSONOfTrackedItems = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { - return itemTracked.toJSON(roundInt); - }); - }; - - var getJSONDebugOfTrackedItems = tracker.getJSONDebugOfTrackedItems = function () { - var roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { - return itemTracked.toJSONDebug(roundInt); - }); - }; + const getJSONOfTrackedItems = tracker.getJSONOfTrackedItems = function () { + const roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return Array.from(mapOfItemsTracked.values()).map((itemTracked) => itemTracked.toJSON(roundInt)); + }; - var getTrackedItemsInMOTFormat = tracker.getTrackedItemsInMOTFormat = function (frameNb) { - return Array.from(mapOfItemsTracked.values()).map(function (itemTracked) { - return itemTracked.toMOT(frameNb); - }); - }; // Work only if keepInMemory is enabled + const getJSONDebugOfTrackedItems = tracker.getJSONDebugOfTrackedItems = function () { + const roundInt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return Array.from(mapOfItemsTracked.values()).map((itemTracked) => itemTracked.toJSONDebug(roundInt)); + }; + const getTrackedItemsInMOTFormat = tracker.getTrackedItemsInMOTFormat = function (frameNb) { + return Array.from(mapOfItemsTracked.values()).map((itemTracked) => itemTracked.toMOT(frameNb)); + }; // Work only if keepInMemory is enabled - var getAllTrackedItems = tracker.getAllTrackedItems = function () { + const getAllTrackedItems = tracker.getAllTrackedItems = function () { return mapOfAllItemsTracked; - }; // Work only if keepInMemory is enabled - - - var getJSONOfAllTrackedItems = tracker.getJSONOfAllTrackedItems = function () { - return Array.from(mapOfAllItemsTracked.values()).map(function (itemTracked) { - return itemTracked.toJSONGenericInfo(); - }); - }; - - exports.computeDistance = computeDistance; - exports["default"] = tracker; - exports.disableKeepInMemory = disableKeepInMemory; - exports.enableKeepInMemory = enableKeepInMemory; - exports.getAllTrackedItems = getAllTrackedItems; - exports.getJSONDebugOfTrackedItems = getJSONDebugOfTrackedItems; - exports.getJSONOfAllTrackedItems = getJSONOfAllTrackedItems; - exports.getJSONOfTrackedItems = getJSONOfTrackedItems; - exports.getTrackedItemsInMOTFormat = getTrackedItemsInMOTFormat; - exports.reset = reset_1; - exports.setParams = setParams; - exports.updateTrackedItemsWithNewFrame = updateTrackedItemsWithNewFrame; - - Object.defineProperty(exports, '__esModule', { value: true }); - - return exports; - -})({}); + }; // Work only if keepInMemory is enabled + + const getJSONOfAllTrackedItems = tracker.getJSONOfAllTrackedItems = function () { + return Array.from(mapOfAllItemsTracked.values()).map((itemTracked) => itemTracked.toJSONGenericInfo()); + }; + + exports.computeDistance = computeDistance; + exports.default = tracker; + exports.disableKeepInMemory = disableKeepInMemory; + exports.enableKeepInMemory = enableKeepInMemory; + exports.getAllTrackedItems = getAllTrackedItems; + exports.getJSONDebugOfTrackedItems = getJSONDebugOfTrackedItems; + exports.getJSONOfAllTrackedItems = getJSONOfAllTrackedItems; + exports.getJSONOfTrackedItems = getJSONOfTrackedItems; + exports.getTrackedItemsInMOTFormat = getTrackedItemsInMOTFormat; + exports.reset = reset_1; + exports.setParams = setParams; + exports.updateTrackedItemsWithNewFrame = updateTrackedItemsWithNewFrame; + + Object.defineProperty(exports, '__esModule', { value: true }); + + return exports; +}({})); diff --git a/package.json b/package.json index 28f9e71..6ee56f2 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,8 @@ "build-bundle:cjs": "rollup -c rollup.cjs.config", "build-bundle:esm": "rollup -c rollup.esm.config", "build-bundle:iife": "rollup -c rollup.iife.config", - "eslint": "./node_modules/.bin/eslint .", - "eslint:fix": "./node_modules/.bin/eslint --fix ." + "eslint": "./node_modules/.bin/eslint src", + "eslint:fix": "./node_modules/.bin/eslint --fix src" }, "author": "@dmytro--kushnir", "contributors": [ diff --git a/src/tracker/index.js b/src/tracker/index.js index 3beaa42..2eef05d 100644 --- a/src/tracker/index.js +++ b/src/tracker/index.js @@ -80,7 +80,7 @@ exports.updateTrackedItemsWithNewFrame = function (detectionsOfThisFrame, frameN // Match existing Tracked items with the items detected in the new frame // For each look in the new detection to find the closest match if (detectionsOfThisFrame.length > 0) { - let matchingAlgorithmFactory = params.matchingAlgorithm === 'munkres' ? munkresAlgorithm : kdTreeAlgorithm; + let matchingAlgorithmFactory; switch (params.matchingAlgorithm) { case 'munkres': matchingAlgorithmFactory = munkresAlgorithm;