mirror of
https://github.com/mfocko/blog.git
synced 2024-11-24 22:11:54 +01:00
10065 lines
No EOL
291 KiB
JavaScript
10065 lines
No EOL
291 KiB
JavaScript
"use strict";
|
|
exports.id = 985;
|
|
exports.ids = [985];
|
|
exports.modules = {
|
|
|
|
/***/ 41644:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
bK: () => (/* reexport */ layout)
|
|
});
|
|
|
|
// UNUSED EXPORTS: acyclic, normalize, rank
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js
|
|
var forEach = __webpack_require__(70870);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/uniqueId.js
|
|
var uniqueId = __webpack_require__(66749);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules
|
|
var has = __webpack_require__(17452);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js
|
|
var constant = __webpack_require__(62002);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js
|
|
var flatten = __webpack_require__(27961);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/map.js
|
|
var map = __webpack_require__(43836);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/range.js + 2 modules
|
|
var range = __webpack_require__(74379);
|
|
// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/index.js
|
|
var graphlib = __webpack_require__(45625);
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/data/list.js
|
|
/*
|
|
* Simple doubly linked list implementation derived from Cormen, et al.,
|
|
* "Introduction to Algorithms".
|
|
*/
|
|
|
|
|
|
|
|
class List {
|
|
constructor() {
|
|
var sentinel = {};
|
|
sentinel._next = sentinel._prev = sentinel;
|
|
this._sentinel = sentinel;
|
|
}
|
|
dequeue() {
|
|
var sentinel = this._sentinel;
|
|
var entry = sentinel._prev;
|
|
if (entry !== sentinel) {
|
|
unlink(entry);
|
|
return entry;
|
|
}
|
|
}
|
|
enqueue(entry) {
|
|
var sentinel = this._sentinel;
|
|
if (entry._prev && entry._next) {
|
|
unlink(entry);
|
|
}
|
|
entry._next = sentinel._next;
|
|
sentinel._next._prev = entry;
|
|
sentinel._next = entry;
|
|
entry._prev = sentinel;
|
|
}
|
|
toString() {
|
|
var strs = [];
|
|
var sentinel = this._sentinel;
|
|
var curr = sentinel._prev;
|
|
while (curr !== sentinel) {
|
|
strs.push(JSON.stringify(curr, filterOutLinks));
|
|
curr = curr._prev;
|
|
}
|
|
return '[' + strs.join(', ') + ']';
|
|
}
|
|
}
|
|
|
|
function unlink(entry) {
|
|
entry._prev._next = entry._next;
|
|
entry._next._prev = entry._prev;
|
|
delete entry._next;
|
|
delete entry._prev;
|
|
}
|
|
|
|
function filterOutLinks(k, v) {
|
|
if (k !== '_next' && k !== '_prev') {
|
|
return v;
|
|
}
|
|
}
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/greedy-fas.js
|
|
|
|
|
|
|
|
|
|
/*
|
|
* A greedy heuristic for finding a feedback arc set for a graph. A feedback
|
|
* arc set is a set of edges that can be removed to make a graph acyclic.
|
|
* The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, "A fast and
|
|
* effective heuristic for the feedback arc set problem." This implementation
|
|
* adjusts that from the paper to allow for weighted edges.
|
|
*/
|
|
|
|
|
|
var DEFAULT_WEIGHT_FN = constant/* default */.Z(1);
|
|
|
|
function greedyFAS(g, weightFn) {
|
|
if (g.nodeCount() <= 1) {
|
|
return [];
|
|
}
|
|
var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN);
|
|
var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx);
|
|
|
|
// Expand multi-edges
|
|
return flatten/* default */.Z(
|
|
map/* default */.Z(results, function (e) {
|
|
return g.outEdges(e.v, e.w);
|
|
})
|
|
);
|
|
}
|
|
|
|
function doGreedyFAS(g, buckets, zeroIdx) {
|
|
var results = [];
|
|
var sources = buckets[buckets.length - 1];
|
|
var sinks = buckets[0];
|
|
|
|
var entry;
|
|
while (g.nodeCount()) {
|
|
while ((entry = sinks.dequeue())) {
|
|
removeNode(g, buckets, zeroIdx, entry);
|
|
}
|
|
while ((entry = sources.dequeue())) {
|
|
removeNode(g, buckets, zeroIdx, entry);
|
|
}
|
|
if (g.nodeCount()) {
|
|
for (var i = buckets.length - 2; i > 0; --i) {
|
|
entry = buckets[i].dequeue();
|
|
if (entry) {
|
|
results = results.concat(removeNode(g, buckets, zeroIdx, entry, true));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
return results;
|
|
}
|
|
|
|
function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) {
|
|
var results = collectPredecessors ? [] : undefined;
|
|
|
|
forEach/* default */.Z(g.inEdges(entry.v), function (edge) {
|
|
var weight = g.edge(edge);
|
|
var uEntry = g.node(edge.v);
|
|
|
|
if (collectPredecessors) {
|
|
results.push({ v: edge.v, w: edge.w });
|
|
}
|
|
|
|
uEntry.out -= weight;
|
|
assignBucket(buckets, zeroIdx, uEntry);
|
|
});
|
|
|
|
forEach/* default */.Z(g.outEdges(entry.v), function (edge) {
|
|
var weight = g.edge(edge);
|
|
var w = edge.w;
|
|
var wEntry = g.node(w);
|
|
wEntry['in'] -= weight;
|
|
assignBucket(buckets, zeroIdx, wEntry);
|
|
});
|
|
|
|
g.removeNode(entry.v);
|
|
|
|
return results;
|
|
}
|
|
|
|
function buildState(g, weightFn) {
|
|
var fasGraph = new graphlib/* Graph */.k();
|
|
var maxIn = 0;
|
|
var maxOut = 0;
|
|
|
|
forEach/* default */.Z(g.nodes(), function (v) {
|
|
fasGraph.setNode(v, { v: v, in: 0, out: 0 });
|
|
});
|
|
|
|
// Aggregate weights on nodes, but also sum the weights across multi-edges
|
|
// into a single edge for the fasGraph.
|
|
forEach/* default */.Z(g.edges(), function (e) {
|
|
var prevWeight = fasGraph.edge(e.v, e.w) || 0;
|
|
var weight = weightFn(e);
|
|
var edgeWeight = prevWeight + weight;
|
|
fasGraph.setEdge(e.v, e.w, edgeWeight);
|
|
maxOut = Math.max(maxOut, (fasGraph.node(e.v).out += weight));
|
|
maxIn = Math.max(maxIn, (fasGraph.node(e.w)['in'] += weight));
|
|
});
|
|
|
|
var buckets = range/* default */.Z(maxOut + maxIn + 3).map(function () {
|
|
return new List();
|
|
});
|
|
var zeroIdx = maxIn + 1;
|
|
|
|
forEach/* default */.Z(fasGraph.nodes(), function (v) {
|
|
assignBucket(buckets, zeroIdx, fasGraph.node(v));
|
|
});
|
|
|
|
return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx };
|
|
}
|
|
|
|
function assignBucket(buckets, zeroIdx, entry) {
|
|
if (!entry.out) {
|
|
buckets[0].enqueue(entry);
|
|
} else if (!entry['in']) {
|
|
buckets[buckets.length - 1].enqueue(entry);
|
|
} else {
|
|
buckets[entry.out - entry['in'] + zeroIdx].enqueue(entry);
|
|
}
|
|
}
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/acyclic.js
|
|
|
|
|
|
|
|
|
|
|
|
function run(g) {
|
|
var fas = g.graph().acyclicer === 'greedy' ? greedyFAS(g, weightFn(g)) : dfsFAS(g);
|
|
forEach/* default */.Z(fas, function (e) {
|
|
var label = g.edge(e);
|
|
g.removeEdge(e);
|
|
label.forwardName = e.name;
|
|
label.reversed = true;
|
|
g.setEdge(e.w, e.v, label, uniqueId/* default */.Z('rev'));
|
|
});
|
|
|
|
function weightFn(g) {
|
|
return function (e) {
|
|
return g.edge(e).weight;
|
|
};
|
|
}
|
|
}
|
|
|
|
function dfsFAS(g) {
|
|
var fas = [];
|
|
var stack = {};
|
|
var visited = {};
|
|
|
|
function dfs(v) {
|
|
if (has/* default */.Z(visited, v)) {
|
|
return;
|
|
}
|
|
visited[v] = true;
|
|
stack[v] = true;
|
|
forEach/* default */.Z(g.outEdges(v), function (e) {
|
|
if (has/* default */.Z(stack, e.w)) {
|
|
fas.push(e);
|
|
} else {
|
|
dfs(e.w);
|
|
}
|
|
});
|
|
delete stack[v];
|
|
}
|
|
|
|
forEach/* default */.Z(g.nodes(), dfs);
|
|
return fas;
|
|
}
|
|
|
|
function undo(g) {
|
|
forEach/* default */.Z(g.edges(), function (e) {
|
|
var label = g.edge(e);
|
|
if (label.reversed) {
|
|
g.removeEdge(e);
|
|
|
|
var forwardName = label.forwardName;
|
|
delete label.reversed;
|
|
delete label.forwardName;
|
|
g.setEdge(e.w, e.v, label, forwardName);
|
|
}
|
|
});
|
|
}
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/merge.js + 6 modules
|
|
var merge = __webpack_require__(59236);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/pick.js + 4 modules
|
|
var pick = __webpack_require__(61666);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/defaults.js
|
|
var defaults = __webpack_require__(3688);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js
|
|
var isSymbol = __webpack_require__(72714);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseExtremum.js
|
|
|
|
|
|
/**
|
|
* The base implementation of methods like `_.max` and `_.min` which accepts a
|
|
* `comparator` to determine the extremum value.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to iterate over.
|
|
* @param {Function} iteratee The iteratee invoked per iteration.
|
|
* @param {Function} comparator The comparator used to compare values.
|
|
* @returns {*} Returns the extremum value.
|
|
*/
|
|
function baseExtremum(array, iteratee, comparator) {
|
|
var index = -1,
|
|
length = array.length;
|
|
|
|
while (++index < length) {
|
|
var value = array[index],
|
|
current = iteratee(value);
|
|
|
|
if (current != null && (computed === undefined
|
|
? (current === current && !(0,isSymbol/* default */.Z)(current))
|
|
: comparator(current, computed)
|
|
)) {
|
|
var computed = current,
|
|
result = value;
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/* harmony default export */ const _baseExtremum = (baseExtremum);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseGt.js
|
|
/**
|
|
* The base implementation of `_.gt` which doesn't coerce arguments.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to compare.
|
|
* @param {*} other The other value to compare.
|
|
* @returns {boolean} Returns `true` if `value` is greater than `other`,
|
|
* else `false`.
|
|
*/
|
|
function baseGt(value, other) {
|
|
return value > other;
|
|
}
|
|
|
|
/* harmony default export */ const _baseGt = (baseGt);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js
|
|
var identity = __webpack_require__(69203);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/max.js
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Computes the maximum value of `array`. If `array` is empty or falsey,
|
|
* `undefined` is returned.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Math
|
|
* @param {Array} array The array to iterate over.
|
|
* @returns {*} Returns the maximum value.
|
|
* @example
|
|
*
|
|
* _.max([4, 2, 8, 6]);
|
|
* // => 8
|
|
*
|
|
* _.max([]);
|
|
* // => undefined
|
|
*/
|
|
function max(array) {
|
|
return (array && array.length)
|
|
? _baseExtremum(array, identity/* default */.Z, _baseGt)
|
|
: undefined;
|
|
}
|
|
|
|
/* harmony default export */ const lodash_es_max = (max);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/last.js
|
|
/**
|
|
* Gets the last element of `array`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {Array} array The array to query.
|
|
* @returns {*} Returns the last element of `array`.
|
|
* @example
|
|
*
|
|
* _.last([1, 2, 3]);
|
|
* // => 3
|
|
*/
|
|
function last(array) {
|
|
var length = array == null ? 0 : array.length;
|
|
return length ? array[length - 1] : undefined;
|
|
}
|
|
|
|
/* harmony default export */ const lodash_es_last = (last);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseAssignValue.js
|
|
var _baseAssignValue = __webpack_require__(74752);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js
|
|
var _baseForOwn = __webpack_require__(2693);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules
|
|
var _baseIteratee = __webpack_require__(74765);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/mapValues.js
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Creates an object with the same keys as `object` and values generated
|
|
* by running each own enumerable string keyed property of `object` thru
|
|
* `iteratee`. The iteratee is invoked with three arguments:
|
|
* (value, key, object).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 2.4.0
|
|
* @category Object
|
|
* @param {Object} object The object to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
* @returns {Object} Returns the new mapped object.
|
|
* @see _.mapKeys
|
|
* @example
|
|
*
|
|
* var users = {
|
|
* 'fred': { 'user': 'fred', 'age': 40 },
|
|
* 'pebbles': { 'user': 'pebbles', 'age': 1 }
|
|
* };
|
|
*
|
|
* _.mapValues(users, function(o) { return o.age; });
|
|
* // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.mapValues(users, 'age');
|
|
* // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
|
|
*/
|
|
function mapValues(object, iteratee) {
|
|
var result = {};
|
|
iteratee = (0,_baseIteratee/* default */.Z)(iteratee, 3);
|
|
|
|
(0,_baseForOwn/* default */.Z)(object, function(value, key, object) {
|
|
(0,_baseAssignValue/* default */.Z)(result, key, iteratee(value, key, object));
|
|
});
|
|
return result;
|
|
}
|
|
|
|
/* harmony default export */ const lodash_es_mapValues = (mapValues);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js
|
|
var isUndefined = __webpack_require__(49360);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseLt.js
|
|
/**
|
|
* The base implementation of `_.lt` which doesn't coerce arguments.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to compare.
|
|
* @param {*} other The other value to compare.
|
|
* @returns {boolean} Returns `true` if `value` is less than `other`,
|
|
* else `false`.
|
|
*/
|
|
function baseLt(value, other) {
|
|
return value < other;
|
|
}
|
|
|
|
/* harmony default export */ const _baseLt = (baseLt);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/min.js
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Computes the minimum value of `array`. If `array` is empty or falsey,
|
|
* `undefined` is returned.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Math
|
|
* @param {Array} array The array to iterate over.
|
|
* @returns {*} Returns the minimum value.
|
|
* @example
|
|
*
|
|
* _.min([4, 2, 8, 6]);
|
|
* // => 2
|
|
*
|
|
* _.min([]);
|
|
* // => undefined
|
|
*/
|
|
function min(array) {
|
|
return (array && array.length)
|
|
? _baseExtremum(array, identity/* default */.Z, _baseLt)
|
|
: undefined;
|
|
}
|
|
|
|
/* harmony default export */ const lodash_es_min = (min);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_root.js
|
|
var _root = __webpack_require__(66092);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/now.js
|
|
|
|
|
|
/**
|
|
* Gets the timestamp of the number of milliseconds that have elapsed since
|
|
* the Unix epoch (1 January 1970 00:00:00 UTC).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 2.4.0
|
|
* @category Date
|
|
* @returns {number} Returns the timestamp.
|
|
* @example
|
|
*
|
|
* _.defer(function(stamp) {
|
|
* console.log(_.now() - stamp);
|
|
* }, _.now());
|
|
* // => Logs the number of milliseconds it took for the deferred invocation.
|
|
*/
|
|
var now = function() {
|
|
return _root/* default */.Z.Date.now();
|
|
};
|
|
|
|
/* harmony default export */ const lodash_es_now = (now);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/util.js
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
* Adds a dummy node to the graph and return v.
|
|
*/
|
|
function addDummyNode(g, type, attrs, name) {
|
|
var v;
|
|
do {
|
|
v = uniqueId/* default */.Z(name);
|
|
} while (g.hasNode(v));
|
|
|
|
attrs.dummy = type;
|
|
g.setNode(v, attrs);
|
|
return v;
|
|
}
|
|
|
|
/*
|
|
* Returns a new graph with only simple edges. Handles aggregation of data
|
|
* associated with multi-edges.
|
|
*/
|
|
function simplify(g) {
|
|
var simplified = new graphlib/* Graph */.k().setGraph(g.graph());
|
|
forEach/* default */.Z(g.nodes(), function (v) {
|
|
simplified.setNode(v, g.node(v));
|
|
});
|
|
forEach/* default */.Z(g.edges(), function (e) {
|
|
var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 };
|
|
var label = g.edge(e);
|
|
simplified.setEdge(e.v, e.w, {
|
|
weight: simpleLabel.weight + label.weight,
|
|
minlen: Math.max(simpleLabel.minlen, label.minlen),
|
|
});
|
|
});
|
|
return simplified;
|
|
}
|
|
|
|
function asNonCompoundGraph(g) {
|
|
var simplified = new graphlib/* Graph */.k({ multigraph: g.isMultigraph() }).setGraph(g.graph());
|
|
forEach/* default */.Z(g.nodes(), function (v) {
|
|
if (!g.children(v).length) {
|
|
simplified.setNode(v, g.node(v));
|
|
}
|
|
});
|
|
forEach/* default */.Z(g.edges(), function (e) {
|
|
simplified.setEdge(e, g.edge(e));
|
|
});
|
|
return simplified;
|
|
}
|
|
|
|
function successorWeights(g) {
|
|
var weightMap = _.map(g.nodes(), function (v) {
|
|
var sucs = {};
|
|
_.forEach(g.outEdges(v), function (e) {
|
|
sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight;
|
|
});
|
|
return sucs;
|
|
});
|
|
return _.zipObject(g.nodes(), weightMap);
|
|
}
|
|
|
|
function predecessorWeights(g) {
|
|
var weightMap = _.map(g.nodes(), function (v) {
|
|
var preds = {};
|
|
_.forEach(g.inEdges(v), function (e) {
|
|
preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight;
|
|
});
|
|
return preds;
|
|
});
|
|
return _.zipObject(g.nodes(), weightMap);
|
|
}
|
|
|
|
/*
|
|
* Finds where a line starting at point ({x, y}) would intersect a rectangle
|
|
* ({x, y, width, height}) if it were pointing at the rectangle's center.
|
|
*/
|
|
function intersectRect(rect, point) {
|
|
var x = rect.x;
|
|
var y = rect.y;
|
|
|
|
// Rectangle intersection algorithm from:
|
|
// http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes
|
|
var dx = point.x - x;
|
|
var dy = point.y - y;
|
|
var w = rect.width / 2;
|
|
var h = rect.height / 2;
|
|
|
|
if (!dx && !dy) {
|
|
throw new Error('Not possible to find intersection inside of the rectangle');
|
|
}
|
|
|
|
var sx, sy;
|
|
if (Math.abs(dy) * w > Math.abs(dx) * h) {
|
|
// Intersection is top or bottom of rect.
|
|
if (dy < 0) {
|
|
h = -h;
|
|
}
|
|
sx = (h * dx) / dy;
|
|
sy = h;
|
|
} else {
|
|
// Intersection is left or right of rect.
|
|
if (dx < 0) {
|
|
w = -w;
|
|
}
|
|
sx = w;
|
|
sy = (w * dy) / dx;
|
|
}
|
|
|
|
return { x: x + sx, y: y + sy };
|
|
}
|
|
|
|
/*
|
|
* Given a DAG with each node assigned "rank" and "order" properties, this
|
|
* function will produce a matrix with the ids of each node.
|
|
*/
|
|
function buildLayerMatrix(g) {
|
|
var layering = map/* default */.Z(range/* default */.Z(util_maxRank(g) + 1), function () {
|
|
return [];
|
|
});
|
|
forEach/* default */.Z(g.nodes(), function (v) {
|
|
var node = g.node(v);
|
|
var rank = node.rank;
|
|
if (!isUndefined/* default */.Z(rank)) {
|
|
layering[rank][node.order] = v;
|
|
}
|
|
});
|
|
return layering;
|
|
}
|
|
|
|
/*
|
|
* Adjusts the ranks for all nodes in the graph such that all nodes v have
|
|
* rank(v) >= 0 and at least one node w has rank(w) = 0.
|
|
*/
|
|
function normalizeRanks(g) {
|
|
var min = lodash_es_min(
|
|
map/* default */.Z(g.nodes(), function (v) {
|
|
return g.node(v).rank;
|
|
})
|
|
);
|
|
forEach/* default */.Z(g.nodes(), function (v) {
|
|
var node = g.node(v);
|
|
if (has/* default */.Z(node, 'rank')) {
|
|
node.rank -= min;
|
|
}
|
|
});
|
|
}
|
|
|
|
function removeEmptyRanks(g) {
|
|
// Ranks may not start at 0, so we need to offset them
|
|
var offset = lodash_es_min(
|
|
map/* default */.Z(g.nodes(), function (v) {
|
|
return g.node(v).rank;
|
|
})
|
|
);
|
|
|
|
var layers = [];
|
|
forEach/* default */.Z(g.nodes(), function (v) {
|
|
var rank = g.node(v).rank - offset;
|
|
if (!layers[rank]) {
|
|
layers[rank] = [];
|
|
}
|
|
layers[rank].push(v);
|
|
});
|
|
|
|
var delta = 0;
|
|
var nodeRankFactor = g.graph().nodeRankFactor;
|
|
forEach/* default */.Z(layers, function (vs, i) {
|
|
if (isUndefined/* default */.Z(vs) && i % nodeRankFactor !== 0) {
|
|
--delta;
|
|
} else if (delta) {
|
|
forEach/* default */.Z(vs, function (v) {
|
|
g.node(v).rank += delta;
|
|
});
|
|
}
|
|
});
|
|
}
|
|
|
|
function addBorderNode(g, prefix, rank, order) {
|
|
var node = {
|
|
width: 0,
|
|
height: 0,
|
|
};
|
|
if (arguments.length >= 4) {
|
|
node.rank = rank;
|
|
node.order = order;
|
|
}
|
|
return addDummyNode(g, 'border', node, prefix);
|
|
}
|
|
|
|
function util_maxRank(g) {
|
|
return lodash_es_max(
|
|
map/* default */.Z(g.nodes(), function (v) {
|
|
var rank = g.node(v).rank;
|
|
if (!isUndefined/* default */.Z(rank)) {
|
|
return rank;
|
|
}
|
|
})
|
|
);
|
|
}
|
|
|
|
/*
|
|
* Partition a collection into two groups: `lhs` and `rhs`. If the supplied
|
|
* function returns true for an entry it goes into `lhs`. Otherwise it goes
|
|
* into `rhs.
|
|
*/
|
|
function partition(collection, fn) {
|
|
var result = { lhs: [], rhs: [] };
|
|
forEach/* default */.Z(collection, function (value) {
|
|
if (fn(value)) {
|
|
result.lhs.push(value);
|
|
} else {
|
|
result.rhs.push(value);
|
|
}
|
|
});
|
|
return result;
|
|
}
|
|
|
|
/*
|
|
* Returns a new function that wraps `fn` with a timer. The wrapper logs the
|
|
* time it takes to execute the function.
|
|
*/
|
|
function util_time(name, fn) {
|
|
var start = lodash_es_now();
|
|
try {
|
|
return fn();
|
|
} finally {
|
|
console.log(name + ' time: ' + (lodash_es_now() - start) + 'ms');
|
|
}
|
|
}
|
|
|
|
function notime(name, fn) {
|
|
return fn();
|
|
}
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/add-border-segments.js
|
|
|
|
|
|
|
|
|
|
|
|
function addBorderSegments(g) {
|
|
function dfs(v) {
|
|
var children = g.children(v);
|
|
var node = g.node(v);
|
|
if (children.length) {
|
|
forEach/* default */.Z(children, dfs);
|
|
}
|
|
|
|
if (has/* default */.Z(node, 'minRank')) {
|
|
node.borderLeft = [];
|
|
node.borderRight = [];
|
|
for (var rank = node.minRank, maxRank = node.maxRank + 1; rank < maxRank; ++rank) {
|
|
add_border_segments_addBorderNode(g, 'borderLeft', '_bl', v, node, rank);
|
|
add_border_segments_addBorderNode(g, 'borderRight', '_br', v, node, rank);
|
|
}
|
|
}
|
|
}
|
|
|
|
forEach/* default */.Z(g.children(), dfs);
|
|
}
|
|
|
|
function add_border_segments_addBorderNode(g, prop, prefix, sg, sgNode, rank) {
|
|
var label = { width: 0, height: 0, rank: rank, borderType: prop };
|
|
var prev = sgNode[prop][rank - 1];
|
|
var curr = addDummyNode(g, 'border', label, prefix);
|
|
sgNode[prop][rank] = curr;
|
|
g.setParent(curr, sg);
|
|
if (prev) {
|
|
g.setEdge(prev, curr, { weight: 1 });
|
|
}
|
|
}
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/coordinate-system.js
|
|
|
|
|
|
|
|
|
|
function adjust(g) {
|
|
var rankDir = g.graph().rankdir.toLowerCase();
|
|
if (rankDir === 'lr' || rankDir === 'rl') {
|
|
swapWidthHeight(g);
|
|
}
|
|
}
|
|
|
|
function coordinate_system_undo(g) {
|
|
var rankDir = g.graph().rankdir.toLowerCase();
|
|
if (rankDir === 'bt' || rankDir === 'rl') {
|
|
reverseY(g);
|
|
}
|
|
|
|
if (rankDir === 'lr' || rankDir === 'rl') {
|
|
swapXY(g);
|
|
swapWidthHeight(g);
|
|
}
|
|
}
|
|
|
|
function swapWidthHeight(g) {
|
|
forEach/* default */.Z(g.nodes(), function (v) {
|
|
swapWidthHeightOne(g.node(v));
|
|
});
|
|
forEach/* default */.Z(g.edges(), function (e) {
|
|
swapWidthHeightOne(g.edge(e));
|
|
});
|
|
}
|
|
|
|
function swapWidthHeightOne(attrs) {
|
|
var w = attrs.width;
|
|
attrs.width = attrs.height;
|
|
attrs.height = w;
|
|
}
|
|
|
|
function reverseY(g) {
|
|
forEach/* default */.Z(g.nodes(), function (v) {
|
|
reverseYOne(g.node(v));
|
|
});
|
|
|
|
forEach/* default */.Z(g.edges(), function (e) {
|
|
var edge = g.edge(e);
|
|
forEach/* default */.Z(edge.points, reverseYOne);
|
|
if (has/* default */.Z(edge, 'y')) {
|
|
reverseYOne(edge);
|
|
}
|
|
});
|
|
}
|
|
|
|
function reverseYOne(attrs) {
|
|
attrs.y = -attrs.y;
|
|
}
|
|
|
|
function swapXY(g) {
|
|
forEach/* default */.Z(g.nodes(), function (v) {
|
|
swapXYOne(g.node(v));
|
|
});
|
|
|
|
forEach/* default */.Z(g.edges(), function (e) {
|
|
var edge = g.edge(e);
|
|
forEach/* default */.Z(edge.points, swapXYOne);
|
|
if (has/* default */.Z(edge, 'x')) {
|
|
swapXYOne(edge);
|
|
}
|
|
});
|
|
}
|
|
|
|
function swapXYOne(attrs) {
|
|
var x = attrs.x;
|
|
attrs.x = attrs.y;
|
|
attrs.y = x;
|
|
}
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/normalize.js
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
* Breaks any long edges in the graph into short segments that span 1 layer
|
|
* each. This operation is undoable with the denormalize function.
|
|
*
|
|
* Pre-conditions:
|
|
*
|
|
* 1. The input graph is a DAG.
|
|
* 2. Each node in the graph has a "rank" property.
|
|
*
|
|
* Post-condition:
|
|
*
|
|
* 1. All edges in the graph have a length of 1.
|
|
* 2. Dummy nodes are added where edges have been split into segments.
|
|
* 3. The graph is augmented with a "dummyChains" attribute which contains
|
|
* the first dummy in each chain of dummy nodes produced.
|
|
*/
|
|
function normalize_run(g) {
|
|
g.graph().dummyChains = [];
|
|
forEach/* default */.Z(g.edges(), function (edge) {
|
|
normalizeEdge(g, edge);
|
|
});
|
|
}
|
|
|
|
function normalizeEdge(g, e) {
|
|
var v = e.v;
|
|
var vRank = g.node(v).rank;
|
|
var w = e.w;
|
|
var wRank = g.node(w).rank;
|
|
var name = e.name;
|
|
var edgeLabel = g.edge(e);
|
|
var labelRank = edgeLabel.labelRank;
|
|
|
|
if (wRank === vRank + 1) return;
|
|
|
|
g.removeEdge(e);
|
|
|
|
var dummy, attrs, i;
|
|
for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) {
|
|
edgeLabel.points = [];
|
|
attrs = {
|
|
width: 0,
|
|
height: 0,
|
|
edgeLabel: edgeLabel,
|
|
edgeObj: e,
|
|
rank: vRank,
|
|
};
|
|
dummy = addDummyNode(g, 'edge', attrs, '_d');
|
|
if (vRank === labelRank) {
|
|
attrs.width = edgeLabel.width;
|
|
attrs.height = edgeLabel.height;
|
|
// @ts-expect-error
|
|
attrs.dummy = 'edge-label';
|
|
// @ts-expect-error
|
|
attrs.labelpos = edgeLabel.labelpos;
|
|
}
|
|
g.setEdge(v, dummy, { weight: edgeLabel.weight }, name);
|
|
if (i === 0) {
|
|
g.graph().dummyChains.push(dummy);
|
|
}
|
|
v = dummy;
|
|
}
|
|
|
|
g.setEdge(v, w, { weight: edgeLabel.weight }, name);
|
|
}
|
|
|
|
function normalize_undo(g) {
|
|
forEach/* default */.Z(g.graph().dummyChains, function (v) {
|
|
var node = g.node(v);
|
|
var origLabel = node.edgeLabel;
|
|
var w;
|
|
g.setEdge(node.edgeObj, origLabel);
|
|
while (node.dummy) {
|
|
w = g.successors(v)[0];
|
|
g.removeNode(v);
|
|
origLabel.points.push({ x: node.x, y: node.y });
|
|
if (node.dummy === 'edge-label') {
|
|
origLabel.x = node.x;
|
|
origLabel.y = node.y;
|
|
origLabel.width = node.width;
|
|
origLabel.height = node.height;
|
|
}
|
|
v = w;
|
|
node = g.node(v);
|
|
}
|
|
});
|
|
}
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/minBy.js
|
|
|
|
|
|
|
|
|
|
/**
|
|
* This method is like `_.min` except that it accepts `iteratee` which is
|
|
* invoked for each element in `array` to generate the criterion by which
|
|
* the value is ranked. The iteratee is invoked with one argument: (value).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Math
|
|
* @param {Array} array The array to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
|
|
* @returns {*} Returns the minimum value.
|
|
* @example
|
|
*
|
|
* var objects = [{ 'n': 1 }, { 'n': 2 }];
|
|
*
|
|
* _.minBy(objects, function(o) { return o.n; });
|
|
* // => { 'n': 1 }
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.minBy(objects, 'n');
|
|
* // => { 'n': 1 }
|
|
*/
|
|
function minBy(array, iteratee) {
|
|
return (array && array.length)
|
|
? _baseExtremum(array, (0,_baseIteratee/* default */.Z)(iteratee, 2), _baseLt)
|
|
: undefined;
|
|
}
|
|
|
|
/* harmony default export */ const lodash_es_minBy = (minBy);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/util.js
|
|
|
|
|
|
|
|
|
|
/*
|
|
* Initializes ranks for the input graph using the longest path algorithm. This
|
|
* algorithm scales well and is fast in practice, it yields rather poor
|
|
* solutions. Nodes are pushed to the lowest layer possible, leaving the bottom
|
|
* ranks wide and leaving edges longer than necessary. However, due to its
|
|
* speed, this algorithm is good for getting an initial ranking that can be fed
|
|
* into other algorithms.
|
|
*
|
|
* This algorithm does not normalize layers because it will be used by other
|
|
* algorithms in most cases. If using this algorithm directly, be sure to
|
|
* run normalize at the end.
|
|
*
|
|
* Pre-conditions:
|
|
*
|
|
* 1. Input graph is a DAG.
|
|
* 2. Input graph node labels can be assigned properties.
|
|
*
|
|
* Post-conditions:
|
|
*
|
|
* 1. Each node will be assign an (unnormalized) "rank" property.
|
|
*/
|
|
function longestPath(g) {
|
|
var visited = {};
|
|
|
|
function dfs(v) {
|
|
var label = g.node(v);
|
|
if (has/* default */.Z(visited, v)) {
|
|
return label.rank;
|
|
}
|
|
visited[v] = true;
|
|
|
|
var rank = lodash_es_min(
|
|
map/* default */.Z(g.outEdges(v), function (e) {
|
|
return dfs(e.w) - g.edge(e).minlen;
|
|
})
|
|
);
|
|
|
|
if (
|
|
rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3
|
|
rank === undefined || // return value of _.map([]) for Lodash 4
|
|
rank === null
|
|
) {
|
|
// return value of _.map([null])
|
|
rank = 0;
|
|
}
|
|
|
|
return (label.rank = rank);
|
|
}
|
|
|
|
forEach/* default */.Z(g.sources(), dfs);
|
|
}
|
|
|
|
/*
|
|
* Returns the amount of slack for the given edge. The slack is defined as the
|
|
* difference between the length of the edge and its minimum length.
|
|
*/
|
|
function slack(g, e) {
|
|
return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen;
|
|
}
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
* Constructs a spanning tree with tight edges and adjusted the input node's
|
|
* ranks to achieve this. A tight edge is one that is has a length that matches
|
|
* its "minlen" attribute.
|
|
*
|
|
* The basic structure for this function is derived from Gansner, et al., "A
|
|
* Technique for Drawing Directed Graphs."
|
|
*
|
|
* Pre-conditions:
|
|
*
|
|
* 1. Graph must be a DAG.
|
|
* 2. Graph must be connected.
|
|
* 3. Graph must have at least one node.
|
|
* 5. Graph nodes must have been previously assigned a "rank" property that
|
|
* respects the "minlen" property of incident edges.
|
|
* 6. Graph edges must have a "minlen" property.
|
|
*
|
|
* Post-conditions:
|
|
*
|
|
* - Graph nodes will have their rank adjusted to ensure that all edges are
|
|
* tight.
|
|
*
|
|
* Returns a tree (undirected graph) that is constructed using only "tight"
|
|
* edges.
|
|
*/
|
|
function feasibleTree(g) {
|
|
var t = new graphlib/* Graph */.k({ directed: false });
|
|
|
|
// Choose arbitrary node from which to start our tree
|
|
var start = g.nodes()[0];
|
|
var size = g.nodeCount();
|
|
t.setNode(start, {});
|
|
|
|
var edge, delta;
|
|
while (tightTree(t, g) < size) {
|
|
edge = findMinSlackEdge(t, g);
|
|
delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge);
|
|
shiftRanks(t, g, delta);
|
|
}
|
|
|
|
return t;
|
|
}
|
|
|
|
/*
|
|
* Finds a maximal tree of tight edges and returns the number of nodes in the
|
|
* tree.
|
|
*/
|
|
function tightTree(t, g) {
|
|
function dfs(v) {
|
|
forEach/* default */.Z(g.nodeEdges(v), function (e) {
|
|
var edgeV = e.v,
|
|
w = v === edgeV ? e.w : edgeV;
|
|
if (!t.hasNode(w) && !slack(g, e)) {
|
|
t.setNode(w, {});
|
|
t.setEdge(v, w, {});
|
|
dfs(w);
|
|
}
|
|
});
|
|
}
|
|
|
|
forEach/* default */.Z(t.nodes(), dfs);
|
|
return t.nodeCount();
|
|
}
|
|
|
|
/*
|
|
* Finds the edge with the smallest slack that is incident on tree and returns
|
|
* it.
|
|
*/
|
|
function findMinSlackEdge(t, g) {
|
|
return lodash_es_minBy(g.edges(), function (e) {
|
|
if (t.hasNode(e.v) !== t.hasNode(e.w)) {
|
|
return slack(g, e);
|
|
}
|
|
});
|
|
}
|
|
|
|
function shiftRanks(t, g, delta) {
|
|
forEach/* default */.Z(t.nodes(), function (v) {
|
|
g.node(v).rank += delta;
|
|
});
|
|
}
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js
|
|
var isArrayLike = __webpack_require__(50585);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js
|
|
var keys = __webpack_require__(17179);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_createFind.js
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Creates a `_.find` or `_.findLast` function.
|
|
*
|
|
* @private
|
|
* @param {Function} findIndexFunc The function to find the collection index.
|
|
* @returns {Function} Returns the new find function.
|
|
*/
|
|
function createFind(findIndexFunc) {
|
|
return function(collection, predicate, fromIndex) {
|
|
var iterable = Object(collection);
|
|
if (!(0,isArrayLike/* default */.Z)(collection)) {
|
|
var iteratee = (0,_baseIteratee/* default */.Z)(predicate, 3);
|
|
collection = (0,keys/* default */.Z)(collection);
|
|
predicate = function(key) { return iteratee(iterable[key], key, iterable); };
|
|
}
|
|
var index = findIndexFunc(collection, predicate, fromIndex);
|
|
return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
|
|
};
|
|
}
|
|
|
|
/* harmony default export */ const _createFind = (createFind);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js
|
|
var _baseFindIndex = __webpack_require__(21692);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules
|
|
var toFinite = __webpack_require__(94099);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/toInteger.js
|
|
|
|
|
|
/**
|
|
* Converts `value` to an integer.
|
|
*
|
|
* **Note:** This method is loosely based on
|
|
* [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to convert.
|
|
* @returns {number} Returns the converted integer.
|
|
* @example
|
|
*
|
|
* _.toInteger(3.2);
|
|
* // => 3
|
|
*
|
|
* _.toInteger(Number.MIN_VALUE);
|
|
* // => 0
|
|
*
|
|
* _.toInteger(Infinity);
|
|
* // => 1.7976931348623157e+308
|
|
*
|
|
* _.toInteger('3.2');
|
|
* // => 3
|
|
*/
|
|
function toInteger(value) {
|
|
var result = (0,toFinite/* default */.Z)(value),
|
|
remainder = result % 1;
|
|
|
|
return result === result ? (remainder ? result - remainder : result) : 0;
|
|
}
|
|
|
|
/* harmony default export */ const lodash_es_toInteger = (toInteger);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/findIndex.js
|
|
|
|
|
|
|
|
|
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
var nativeMax = Math.max;
|
|
|
|
/**
|
|
* This method is like `_.find` except that it returns the index of the first
|
|
* element `predicate` returns truthy for instead of the element itself.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 1.1.0
|
|
* @category Array
|
|
* @param {Array} array The array to inspect.
|
|
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
|
* @param {number} [fromIndex=0] The index to search from.
|
|
* @returns {number} Returns the index of the found element, else `-1`.
|
|
* @example
|
|
*
|
|
* var users = [
|
|
* { 'user': 'barney', 'active': false },
|
|
* { 'user': 'fred', 'active': false },
|
|
* { 'user': 'pebbles', 'active': true }
|
|
* ];
|
|
*
|
|
* _.findIndex(users, function(o) { return o.user == 'barney'; });
|
|
* // => 0
|
|
*
|
|
* // The `_.matches` iteratee shorthand.
|
|
* _.findIndex(users, { 'user': 'fred', 'active': false });
|
|
* // => 1
|
|
*
|
|
* // The `_.matchesProperty` iteratee shorthand.
|
|
* _.findIndex(users, ['active', false]);
|
|
* // => 0
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.findIndex(users, 'active');
|
|
* // => 2
|
|
*/
|
|
function findIndex(array, predicate, fromIndex) {
|
|
var length = array == null ? 0 : array.length;
|
|
if (!length) {
|
|
return -1;
|
|
}
|
|
var index = fromIndex == null ? 0 : lodash_es_toInteger(fromIndex);
|
|
if (index < 0) {
|
|
index = nativeMax(length + index, 0);
|
|
}
|
|
return (0,_baseFindIndex/* default */.Z)(array, (0,_baseIteratee/* default */.Z)(predicate, 3), index);
|
|
}
|
|
|
|
/* harmony default export */ const lodash_es_findIndex = (findIndex);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/find.js
|
|
|
|
|
|
|
|
/**
|
|
* Iterates over elements of `collection`, returning the first element
|
|
* `predicate` returns truthy for. The predicate is invoked with three
|
|
* arguments: (value, index|key, collection).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to inspect.
|
|
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
|
* @param {number} [fromIndex=0] The index to search from.
|
|
* @returns {*} Returns the matched element, else `undefined`.
|
|
* @example
|
|
*
|
|
* var users = [
|
|
* { 'user': 'barney', 'age': 36, 'active': true },
|
|
* { 'user': 'fred', 'age': 40, 'active': false },
|
|
* { 'user': 'pebbles', 'age': 1, 'active': true }
|
|
* ];
|
|
*
|
|
* _.find(users, function(o) { return o.age < 40; });
|
|
* // => object for 'barney'
|
|
*
|
|
* // The `_.matches` iteratee shorthand.
|
|
* _.find(users, { 'age': 1, 'active': true });
|
|
* // => object for 'pebbles'
|
|
*
|
|
* // The `_.matchesProperty` iteratee shorthand.
|
|
* _.find(users, ['active', false]);
|
|
* // => object for 'fred'
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.find(users, 'active');
|
|
* // => object for 'barney'
|
|
*/
|
|
var find = _createFind(lodash_es_findIndex);
|
|
|
|
/* harmony default export */ const lodash_es_find = (find);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules
|
|
var filter = __webpack_require__(13445);
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra.js
|
|
|
|
|
|
|
|
|
|
|
|
var DEFAULT_WEIGHT_FUNC = constant/* default */.Z(1);
|
|
|
|
function dijkstra_dijkstra(g, source, weightFn, edgeFn) {
|
|
return runDijkstra(
|
|
g,
|
|
String(source),
|
|
weightFn || DEFAULT_WEIGHT_FUNC,
|
|
edgeFn ||
|
|
function (v) {
|
|
return g.outEdges(v);
|
|
}
|
|
);
|
|
}
|
|
|
|
function runDijkstra(g, source, weightFn, edgeFn) {
|
|
var results = {};
|
|
var pq = new PriorityQueue();
|
|
var v, vEntry;
|
|
|
|
var updateNeighbors = function (edge) {
|
|
var w = edge.v !== v ? edge.v : edge.w;
|
|
var wEntry = results[w];
|
|
var weight = weightFn(edge);
|
|
var distance = vEntry.distance + weight;
|
|
|
|
if (weight < 0) {
|
|
throw new Error(
|
|
'dijkstra does not allow negative edge weights. ' +
|
|
'Bad edge: ' +
|
|
edge +
|
|
' Weight: ' +
|
|
weight
|
|
);
|
|
}
|
|
|
|
if (distance < wEntry.distance) {
|
|
wEntry.distance = distance;
|
|
wEntry.predecessor = v;
|
|
pq.decrease(w, distance);
|
|
}
|
|
};
|
|
|
|
g.nodes().forEach(function (v) {
|
|
var distance = v === source ? 0 : Number.POSITIVE_INFINITY;
|
|
results[v] = { distance: distance };
|
|
pq.add(v, distance);
|
|
});
|
|
|
|
while (pq.size() > 0) {
|
|
v = pq.removeMin();
|
|
vEntry = results[v];
|
|
if (vEntry.distance === Number.POSITIVE_INFINITY) {
|
|
break;
|
|
}
|
|
|
|
edgeFn(v).forEach(updateNeighbors);
|
|
}
|
|
|
|
return results;
|
|
}
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra-all.js
|
|
|
|
|
|
|
|
|
|
|
|
function dijkstraAll(g, weightFunc, edgeFunc) {
|
|
return _.transform(
|
|
g.nodes(),
|
|
function (acc, v) {
|
|
acc[v] = dijkstra(g, v, weightFunc, edgeFunc);
|
|
},
|
|
{}
|
|
);
|
|
}
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/floyd-warshall.js
|
|
|
|
|
|
|
|
|
|
var floyd_warshall_DEFAULT_WEIGHT_FUNC = constant/* default */.Z(1);
|
|
|
|
function floydWarshall(g, weightFn, edgeFn) {
|
|
return runFloydWarshall(
|
|
g,
|
|
weightFn || floyd_warshall_DEFAULT_WEIGHT_FUNC,
|
|
edgeFn ||
|
|
function (v) {
|
|
return g.outEdges(v);
|
|
}
|
|
);
|
|
}
|
|
|
|
function runFloydWarshall(g, weightFn, edgeFn) {
|
|
var results = {};
|
|
var nodes = g.nodes();
|
|
|
|
nodes.forEach(function (v) {
|
|
results[v] = {};
|
|
results[v][v] = { distance: 0 };
|
|
nodes.forEach(function (w) {
|
|
if (v !== w) {
|
|
results[v][w] = { distance: Number.POSITIVE_INFINITY };
|
|
}
|
|
});
|
|
edgeFn(v).forEach(function (edge) {
|
|
var w = edge.v === v ? edge.w : edge.v;
|
|
var d = weightFn(edge);
|
|
results[v][w] = { distance: d, predecessor: v };
|
|
});
|
|
});
|
|
|
|
nodes.forEach(function (k) {
|
|
var rowK = results[k];
|
|
nodes.forEach(function (i) {
|
|
var rowI = results[i];
|
|
nodes.forEach(function (j) {
|
|
var ik = rowI[k];
|
|
var kj = rowK[j];
|
|
var ij = rowI[j];
|
|
var altDistance = ik.distance + kj.distance;
|
|
if (altDistance < ij.distance) {
|
|
ij.distance = altDistance;
|
|
ij.predecessor = kj.predecessor;
|
|
}
|
|
});
|
|
});
|
|
});
|
|
|
|
return results;
|
|
}
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseKeys.js + 1 modules
|
|
var _baseKeys = __webpack_require__(39473);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules
|
|
var _getTag = __webpack_require__(83970);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetTag.js + 2 modules
|
|
var _baseGetTag = __webpack_require__(93589);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js
|
|
var isArray = __webpack_require__(27771);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js
|
|
var isObjectLike = __webpack_require__(18533);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/isString.js
|
|
|
|
|
|
|
|
|
|
/** `Object#toString` result references. */
|
|
var stringTag = '[object String]';
|
|
|
|
/**
|
|
* Checks if `value` is classified as a `String` primitive or object.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
|
|
* @example
|
|
*
|
|
* _.isString('abc');
|
|
* // => true
|
|
*
|
|
* _.isString(1);
|
|
* // => false
|
|
*/
|
|
function isString(value) {
|
|
return typeof value == 'string' ||
|
|
(!(0,isArray/* default */.Z)(value) && (0,isObjectLike/* default */.Z)(value) && (0,_baseGetTag/* default */.Z)(value) == stringTag);
|
|
}
|
|
|
|
/* harmony default export */ const lodash_es_isString = (isString);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js
|
|
var _baseProperty = __webpack_require__(54193);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_asciiSize.js
|
|
|
|
|
|
/**
|
|
* Gets the size of an ASCII `string`.
|
|
*
|
|
* @private
|
|
* @param {string} string The string inspect.
|
|
* @returns {number} Returns the string size.
|
|
*/
|
|
var asciiSize = (0,_baseProperty/* default */.Z)('length');
|
|
|
|
/* harmony default export */ const _asciiSize = (asciiSize);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_hasUnicode.js
|
|
/** Used to compose unicode character classes. */
|
|
var rsAstralRange = '\\ud800-\\udfff',
|
|
rsComboMarksRange = '\\u0300-\\u036f',
|
|
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
|
rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
|
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
|
|
rsVarRange = '\\ufe0e\\ufe0f';
|
|
|
|
/** Used to compose unicode capture groups. */
|
|
var rsZWJ = '\\u200d';
|
|
|
|
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
|
|
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
|
|
|
|
/**
|
|
* Checks if `string` contains Unicode symbols.
|
|
*
|
|
* @private
|
|
* @param {string} string The string to inspect.
|
|
* @returns {boolean} Returns `true` if a symbol is found, else `false`.
|
|
*/
|
|
function hasUnicode(string) {
|
|
return reHasUnicode.test(string);
|
|
}
|
|
|
|
/* harmony default export */ const _hasUnicode = (hasUnicode);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_unicodeSize.js
|
|
/** Used to compose unicode character classes. */
|
|
var _unicodeSize_rsAstralRange = '\\ud800-\\udfff',
|
|
_unicodeSize_rsComboMarksRange = '\\u0300-\\u036f',
|
|
_unicodeSize_reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
|
_unicodeSize_rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
|
_unicodeSize_rsComboRange = _unicodeSize_rsComboMarksRange + _unicodeSize_reComboHalfMarksRange + _unicodeSize_rsComboSymbolsRange,
|
|
_unicodeSize_rsVarRange = '\\ufe0e\\ufe0f';
|
|
|
|
/** Used to compose unicode capture groups. */
|
|
var rsAstral = '[' + _unicodeSize_rsAstralRange + ']',
|
|
rsCombo = '[' + _unicodeSize_rsComboRange + ']',
|
|
rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
|
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
|
rsNonAstral = '[^' + _unicodeSize_rsAstralRange + ']',
|
|
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
|
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
|
_unicodeSize_rsZWJ = '\\u200d';
|
|
|
|
/** Used to compose unicode regexes. */
|
|
var reOptMod = rsModifier + '?',
|
|
rsOptVar = '[' + _unicodeSize_rsVarRange + ']?',
|
|
rsOptJoin = '(?:' + _unicodeSize_rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
|
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
|
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
|
|
|
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
|
|
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
|
|
|
|
/**
|
|
* Gets the size of a Unicode `string`.
|
|
*
|
|
* @private
|
|
* @param {string} string The string inspect.
|
|
* @returns {number} Returns the string size.
|
|
*/
|
|
function unicodeSize(string) {
|
|
var result = reUnicode.lastIndex = 0;
|
|
while (reUnicode.test(string)) {
|
|
++result;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/* harmony default export */ const _unicodeSize = (unicodeSize);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringSize.js
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Gets the number of symbols in `string`.
|
|
*
|
|
* @private
|
|
* @param {string} string The string to inspect.
|
|
* @returns {number} Returns the string size.
|
|
*/
|
|
function stringSize(string) {
|
|
return _hasUnicode(string)
|
|
? _unicodeSize(string)
|
|
: _asciiSize(string);
|
|
}
|
|
|
|
/* harmony default export */ const _stringSize = (stringSize);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/size.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** `Object#toString` result references. */
|
|
var mapTag = '[object Map]',
|
|
setTag = '[object Set]';
|
|
|
|
/**
|
|
* Gets the size of `collection` by returning its length for array-like
|
|
* values or the number of own enumerable string keyed properties for objects.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object|string} collection The collection to inspect.
|
|
* @returns {number} Returns the collection size.
|
|
* @example
|
|
*
|
|
* _.size([1, 2, 3]);
|
|
* // => 3
|
|
*
|
|
* _.size({ 'a': 1, 'b': 2 });
|
|
* // => 2
|
|
*
|
|
* _.size('pebbles');
|
|
* // => 7
|
|
*/
|
|
function size(collection) {
|
|
if (collection == null) {
|
|
return 0;
|
|
}
|
|
if ((0,isArrayLike/* default */.Z)(collection)) {
|
|
return lodash_es_isString(collection) ? _stringSize(collection) : collection.length;
|
|
}
|
|
var tag = (0,_getTag/* default */.Z)(collection);
|
|
if (tag == mapTag || tag == setTag) {
|
|
return collection.size;
|
|
}
|
|
return (0,_baseKeys/* default */.Z)(collection).length;
|
|
}
|
|
|
|
/* harmony default export */ const lodash_es_size = (size);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/topsort.js
|
|
|
|
|
|
|
|
|
|
topsort_topsort.CycleException = topsort_CycleException;
|
|
|
|
function topsort_topsort(g) {
|
|
var visited = {};
|
|
var stack = {};
|
|
var results = [];
|
|
|
|
function visit(node) {
|
|
if (has/* default */.Z(stack, node)) {
|
|
throw new topsort_CycleException();
|
|
}
|
|
|
|
if (!has/* default */.Z(visited, node)) {
|
|
stack[node] = true;
|
|
visited[node] = true;
|
|
forEach/* default */.Z(g.predecessors(node), visit);
|
|
delete stack[node];
|
|
results.push(node);
|
|
}
|
|
}
|
|
|
|
forEach/* default */.Z(g.sinks(), visit);
|
|
|
|
if (lodash_es_size(visited) !== g.nodeCount()) {
|
|
throw new topsort_CycleException();
|
|
}
|
|
|
|
return results;
|
|
}
|
|
|
|
function topsort_CycleException() {}
|
|
topsort_CycleException.prototype = new Error(); // must be an instance of Error to pass testing
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/is-acyclic.js
|
|
|
|
|
|
|
|
|
|
function isAcyclic(g) {
|
|
try {
|
|
topsort(g);
|
|
} catch (e) {
|
|
if (e instanceof CycleException) {
|
|
return false;
|
|
}
|
|
throw e;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dfs.js
|
|
|
|
|
|
|
|
|
|
/*
|
|
* A helper that preforms a pre- or post-order traversal on the input graph
|
|
* and returns the nodes in the order they were visited. If the graph is
|
|
* undirected then this algorithm will navigate using neighbors. If the graph
|
|
* is directed then this algorithm will navigate using successors.
|
|
*
|
|
* Order must be one of "pre" or "post".
|
|
*/
|
|
function dfs(g, vs, order) {
|
|
if (!isArray/* default */.Z(vs)) {
|
|
vs = [vs];
|
|
}
|
|
|
|
var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g);
|
|
|
|
var acc = [];
|
|
var visited = {};
|
|
forEach/* default */.Z(vs, function (v) {
|
|
if (!g.hasNode(v)) {
|
|
throw new Error('Graph does not have node: ' + v);
|
|
}
|
|
|
|
doDfs(g, v, order === 'post', visited, navigation, acc);
|
|
});
|
|
return acc;
|
|
}
|
|
|
|
function doDfs(g, v, postorder, visited, navigation, acc) {
|
|
if (!has/* default */.Z(visited, v)) {
|
|
visited[v] = true;
|
|
|
|
if (!postorder) {
|
|
acc.push(v);
|
|
}
|
|
forEach/* default */.Z(navigation(v), function (w) {
|
|
doDfs(g, w, postorder, visited, navigation, acc);
|
|
});
|
|
if (postorder) {
|
|
acc.push(v);
|
|
}
|
|
}
|
|
}
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/postorder.js
|
|
|
|
|
|
|
|
|
|
function postorder(g, vs) {
|
|
return dfs(g, vs, 'post');
|
|
}
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/preorder.js
|
|
|
|
|
|
|
|
|
|
function preorder(g, vs) {
|
|
return dfs(g, vs, 'pre');
|
|
}
|
|
|
|
// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + 9 modules
|
|
var graph = __webpack_require__(52544);
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/prim.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function prim(g, weightFunc) {
|
|
var result = new Graph();
|
|
var parents = {};
|
|
var pq = new PriorityQueue();
|
|
var v;
|
|
|
|
function updateNeighbors(edge) {
|
|
var w = edge.v === v ? edge.w : edge.v;
|
|
var pri = pq.priority(w);
|
|
if (pri !== undefined) {
|
|
var edgeWeight = weightFunc(edge);
|
|
if (edgeWeight < pri) {
|
|
parents[w] = v;
|
|
pq.decrease(w, edgeWeight);
|
|
}
|
|
}
|
|
}
|
|
|
|
if (g.nodeCount() === 0) {
|
|
return result;
|
|
}
|
|
|
|
_.each(g.nodes(), function (v) {
|
|
pq.add(v, Number.POSITIVE_INFINITY);
|
|
result.setNode(v);
|
|
});
|
|
|
|
// Start from an arbitrary node
|
|
pq.decrease(g.nodes()[0], 0);
|
|
|
|
var init = false;
|
|
while (pq.size() > 0) {
|
|
v = pq.removeMin();
|
|
if (_.has(parents, v)) {
|
|
result.setEdge(v, parents[v]);
|
|
} else if (init) {
|
|
throw new Error('Input graph is not connected: ' + g);
|
|
} else {
|
|
init = true;
|
|
}
|
|
|
|
g.nodeEdges(v).forEach(updateNeighbors);
|
|
}
|
|
|
|
return result;
|
|
}
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Expose some internals for testing purposes
|
|
networkSimplex.initLowLimValues = initLowLimValues;
|
|
networkSimplex.initCutValues = initCutValues;
|
|
networkSimplex.calcCutValue = calcCutValue;
|
|
networkSimplex.leaveEdge = leaveEdge;
|
|
networkSimplex.enterEdge = enterEdge;
|
|
networkSimplex.exchangeEdges = exchangeEdges;
|
|
|
|
/*
|
|
* The network simplex algorithm assigns ranks to each node in the input graph
|
|
* and iteratively improves the ranking to reduce the length of edges.
|
|
*
|
|
* Preconditions:
|
|
*
|
|
* 1. The input graph must be a DAG.
|
|
* 2. All nodes in the graph must have an object value.
|
|
* 3. All edges in the graph must have "minlen" and "weight" attributes.
|
|
*
|
|
* Postconditions:
|
|
*
|
|
* 1. All nodes in the graph will have an assigned "rank" attribute that has
|
|
* been optimized by the network simplex algorithm. Ranks start at 0.
|
|
*
|
|
*
|
|
* A rough sketch of the algorithm is as follows:
|
|
*
|
|
* 1. Assign initial ranks to each node. We use the longest path algorithm,
|
|
* which assigns ranks to the lowest position possible. In general this
|
|
* leads to very wide bottom ranks and unnecessarily long edges.
|
|
* 2. Construct a feasible tight tree. A tight tree is one such that all
|
|
* edges in the tree have no slack (difference between length of edge
|
|
* and minlen for the edge). This by itself greatly improves the assigned
|
|
* rankings by shorting edges.
|
|
* 3. Iteratively find edges that have negative cut values. Generally a
|
|
* negative cut value indicates that the edge could be removed and a new
|
|
* tree edge could be added to produce a more compact graph.
|
|
*
|
|
* Much of the algorithms here are derived from Gansner, et al., "A Technique
|
|
* for Drawing Directed Graphs." The structure of the file roughly follows the
|
|
* structure of the overall algorithm.
|
|
*/
|
|
function networkSimplex(g) {
|
|
g = simplify(g);
|
|
longestPath(g);
|
|
var t = feasibleTree(g);
|
|
initLowLimValues(t);
|
|
initCutValues(t, g);
|
|
|
|
var e, f;
|
|
while ((e = leaveEdge(t))) {
|
|
f = enterEdge(t, g, e);
|
|
exchangeEdges(t, g, e, f);
|
|
}
|
|
}
|
|
|
|
/*
|
|
* Initializes cut values for all edges in the tree.
|
|
*/
|
|
function initCutValues(t, g) {
|
|
var vs = postorder(t, t.nodes());
|
|
vs = vs.slice(0, vs.length - 1);
|
|
forEach/* default */.Z(vs, function (v) {
|
|
assignCutValue(t, g, v);
|
|
});
|
|
}
|
|
|
|
function assignCutValue(t, g, child) {
|
|
var childLab = t.node(child);
|
|
var parent = childLab.parent;
|
|
t.edge(child, parent).cutvalue = calcCutValue(t, g, child);
|
|
}
|
|
|
|
/*
|
|
* Given the tight tree, its graph, and a child in the graph calculate and
|
|
* return the cut value for the edge between the child and its parent.
|
|
*/
|
|
function calcCutValue(t, g, child) {
|
|
var childLab = t.node(child);
|
|
var parent = childLab.parent;
|
|
// True if the child is on the tail end of the edge in the directed graph
|
|
var childIsTail = true;
|
|
// The graph's view of the tree edge we're inspecting
|
|
var graphEdge = g.edge(child, parent);
|
|
// The accumulated cut value for the edge between this node and its parent
|
|
var cutValue = 0;
|
|
|
|
if (!graphEdge) {
|
|
childIsTail = false;
|
|
graphEdge = g.edge(parent, child);
|
|
}
|
|
|
|
cutValue = graphEdge.weight;
|
|
|
|
forEach/* default */.Z(g.nodeEdges(child), function (e) {
|
|
var isOutEdge = e.v === child,
|
|
other = isOutEdge ? e.w : e.v;
|
|
|
|
if (other !== parent) {
|
|
var pointsToHead = isOutEdge === childIsTail,
|
|
otherWeight = g.edge(e).weight;
|
|
|
|
cutValue += pointsToHead ? otherWeight : -otherWeight;
|
|
if (isTreeEdge(t, child, other)) {
|
|
var otherCutValue = t.edge(child, other).cutvalue;
|
|
cutValue += pointsToHead ? -otherCutValue : otherCutValue;
|
|
}
|
|
}
|
|
});
|
|
|
|
return cutValue;
|
|
}
|
|
|
|
function initLowLimValues(tree, root) {
|
|
if (arguments.length < 2) {
|
|
root = tree.nodes()[0];
|
|
}
|
|
dfsAssignLowLim(tree, {}, 1, root);
|
|
}
|
|
|
|
function dfsAssignLowLim(tree, visited, nextLim, v, parent) {
|
|
var low = nextLim;
|
|
var label = tree.node(v);
|
|
|
|
visited[v] = true;
|
|
forEach/* default */.Z(tree.neighbors(v), function (w) {
|
|
if (!has/* default */.Z(visited, w)) {
|
|
nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v);
|
|
}
|
|
});
|
|
|
|
label.low = low;
|
|
label.lim = nextLim++;
|
|
if (parent) {
|
|
label.parent = parent;
|
|
} else {
|
|
// TODO should be able to remove this when we incrementally update low lim
|
|
delete label.parent;
|
|
}
|
|
|
|
return nextLim;
|
|
}
|
|
|
|
function leaveEdge(tree) {
|
|
return lodash_es_find(tree.edges(), function (e) {
|
|
return tree.edge(e).cutvalue < 0;
|
|
});
|
|
}
|
|
|
|
function enterEdge(t, g, edge) {
|
|
var v = edge.v;
|
|
var w = edge.w;
|
|
|
|
// For the rest of this function we assume that v is the tail and w is the
|
|
// head, so if we don't have this edge in the graph we should flip it to
|
|
// match the correct orientation.
|
|
if (!g.hasEdge(v, w)) {
|
|
v = edge.w;
|
|
w = edge.v;
|
|
}
|
|
|
|
var vLabel = t.node(v);
|
|
var wLabel = t.node(w);
|
|
var tailLabel = vLabel;
|
|
var flip = false;
|
|
|
|
// If the root is in the tail of the edge then we need to flip the logic that
|
|
// checks for the head and tail nodes in the candidates function below.
|
|
if (vLabel.lim > wLabel.lim) {
|
|
tailLabel = wLabel;
|
|
flip = true;
|
|
}
|
|
|
|
var candidates = filter/* default */.Z(g.edges(), function (edge) {
|
|
return (
|
|
flip === isDescendant(t, t.node(edge.v), tailLabel) &&
|
|
flip !== isDescendant(t, t.node(edge.w), tailLabel)
|
|
);
|
|
});
|
|
|
|
return lodash_es_minBy(candidates, function (edge) {
|
|
return slack(g, edge);
|
|
});
|
|
}
|
|
|
|
function exchangeEdges(t, g, e, f) {
|
|
var v = e.v;
|
|
var w = e.w;
|
|
t.removeEdge(v, w);
|
|
t.setEdge(f.v, f.w, {});
|
|
initLowLimValues(t);
|
|
initCutValues(t, g);
|
|
updateRanks(t, g);
|
|
}
|
|
|
|
function updateRanks(t, g) {
|
|
var root = lodash_es_find(t.nodes(), function (v) {
|
|
return !g.node(v).parent;
|
|
});
|
|
var vs = preorder(t, root);
|
|
vs = vs.slice(1);
|
|
forEach/* default */.Z(vs, function (v) {
|
|
var parent = t.node(v).parent,
|
|
edge = g.edge(v, parent),
|
|
flipped = false;
|
|
|
|
if (!edge) {
|
|
edge = g.edge(parent, v);
|
|
flipped = true;
|
|
}
|
|
|
|
g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen);
|
|
});
|
|
}
|
|
|
|
/*
|
|
* Returns true if the edge is in the tree.
|
|
*/
|
|
function isTreeEdge(tree, u, v) {
|
|
return tree.hasEdge(u, v);
|
|
}
|
|
|
|
/*
|
|
* Returns true if the specified node is descendant of the root node per the
|
|
* assigned low and lim attributes in the tree.
|
|
*/
|
|
function isDescendant(tree, vLabel, rootLabel) {
|
|
return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim;
|
|
}
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
* Assigns a rank to each node in the input graph that respects the "minlen"
|
|
* constraint specified on edges between nodes.
|
|
*
|
|
* This basic structure is derived from Gansner, et al., "A Technique for
|
|
* Drawing Directed Graphs."
|
|
*
|
|
* Pre-conditions:
|
|
*
|
|
* 1. Graph must be a connected DAG
|
|
* 2. Graph nodes must be objects
|
|
* 3. Graph edges must have "weight" and "minlen" attributes
|
|
*
|
|
* Post-conditions:
|
|
*
|
|
* 1. Graph nodes will have a "rank" attribute based on the results of the
|
|
* algorithm. Ranks can start at any index (including negative), we'll
|
|
* fix them up later.
|
|
*/
|
|
function rank(g) {
|
|
switch (g.graph().ranker) {
|
|
case 'network-simplex':
|
|
networkSimplexRanker(g);
|
|
break;
|
|
case 'tight-tree':
|
|
tightTreeRanker(g);
|
|
break;
|
|
case 'longest-path':
|
|
longestPathRanker(g);
|
|
break;
|
|
default:
|
|
networkSimplexRanker(g);
|
|
}
|
|
}
|
|
|
|
// A fast and simple ranker, but results are far from optimal.
|
|
var longestPathRanker = longestPath;
|
|
|
|
function tightTreeRanker(g) {
|
|
longestPath(g);
|
|
feasibleTree(g);
|
|
}
|
|
|
|
function networkSimplexRanker(g) {
|
|
networkSimplex(g);
|
|
}
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules
|
|
var values = __webpack_require__(34148);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules
|
|
var reduce = __webpack_require__(92344);
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/nesting-graph.js
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
* A nesting graph creates dummy nodes for the tops and bottoms of subgraphs,
|
|
* adds appropriate edges to ensure that all cluster nodes are placed between
|
|
* these boundries, and ensures that the graph is connected.
|
|
*
|
|
* In addition we ensure, through the use of the minlen property, that nodes
|
|
* and subgraph border nodes to not end up on the same rank.
|
|
*
|
|
* Preconditions:
|
|
*
|
|
* 1. Input graph is a DAG
|
|
* 2. Nodes in the input graph has a minlen attribute
|
|
*
|
|
* Postconditions:
|
|
*
|
|
* 1. Input graph is connected.
|
|
* 2. Dummy nodes are added for the tops and bottoms of subgraphs.
|
|
* 3. The minlen attribute for nodes is adjusted to ensure nodes do not
|
|
* get placed on the same rank as subgraph border nodes.
|
|
*
|
|
* The nesting graph idea comes from Sander, "Layout of Compound Directed
|
|
* Graphs."
|
|
*/
|
|
function nesting_graph_run(g) {
|
|
var root = addDummyNode(g, 'root', {}, '_root');
|
|
var depths = treeDepths(g);
|
|
var height = lodash_es_max(values/* default */.Z(depths)) - 1; // Note: depths is an Object not an array
|
|
var nodeSep = 2 * height + 1;
|
|
|
|
g.graph().nestingRoot = root;
|
|
|
|
// Multiply minlen by nodeSep to align nodes on non-border ranks.
|
|
forEach/* default */.Z(g.edges(), function (e) {
|
|
g.edge(e).minlen *= nodeSep;
|
|
});
|
|
|
|
// Calculate a weight that is sufficient to keep subgraphs vertically compact
|
|
var weight = sumWeights(g) + 1;
|
|
|
|
// Create border nodes and link them up
|
|
forEach/* default */.Z(g.children(), function (child) {
|
|
nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child);
|
|
});
|
|
|
|
// Save the multiplier for node layers for later removal of empty border
|
|
// layers.
|
|
g.graph().nodeRankFactor = nodeSep;
|
|
}
|
|
|
|
function nesting_graph_dfs(g, root, nodeSep, weight, height, depths, v) {
|
|
var children = g.children(v);
|
|
if (!children.length) {
|
|
if (v !== root) {
|
|
g.setEdge(root, v, { weight: 0, minlen: nodeSep });
|
|
}
|
|
return;
|
|
}
|
|
|
|
var top = addBorderNode(g, '_bt');
|
|
var bottom = addBorderNode(g, '_bb');
|
|
var label = g.node(v);
|
|
|
|
g.setParent(top, v);
|
|
label.borderTop = top;
|
|
g.setParent(bottom, v);
|
|
label.borderBottom = bottom;
|
|
|
|
forEach/* default */.Z(children, function (child) {
|
|
nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child);
|
|
|
|
var childNode = g.node(child);
|
|
var childTop = childNode.borderTop ? childNode.borderTop : child;
|
|
var childBottom = childNode.borderBottom ? childNode.borderBottom : child;
|
|
var thisWeight = childNode.borderTop ? weight : 2 * weight;
|
|
var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1;
|
|
|
|
g.setEdge(top, childTop, {
|
|
weight: thisWeight,
|
|
minlen: minlen,
|
|
nestingEdge: true,
|
|
});
|
|
|
|
g.setEdge(childBottom, bottom, {
|
|
weight: thisWeight,
|
|
minlen: minlen,
|
|
nestingEdge: true,
|
|
});
|
|
});
|
|
|
|
if (!g.parent(v)) {
|
|
g.setEdge(root, top, { weight: 0, minlen: height + depths[v] });
|
|
}
|
|
}
|
|
|
|
function treeDepths(g) {
|
|
var depths = {};
|
|
function dfs(v, depth) {
|
|
var children = g.children(v);
|
|
if (children && children.length) {
|
|
forEach/* default */.Z(children, function (child) {
|
|
dfs(child, depth + 1);
|
|
});
|
|
}
|
|
depths[v] = depth;
|
|
}
|
|
forEach/* default */.Z(g.children(), function (v) {
|
|
dfs(v, 1);
|
|
});
|
|
return depths;
|
|
}
|
|
|
|
function sumWeights(g) {
|
|
return reduce/* default */.Z(
|
|
g.edges(),
|
|
function (acc, e) {
|
|
return acc + g.edge(e).weight;
|
|
},
|
|
0
|
|
);
|
|
}
|
|
|
|
function cleanup(g) {
|
|
var graphLabel = g.graph();
|
|
g.removeNode(graphLabel.nestingRoot);
|
|
delete graphLabel.nestingRoot;
|
|
forEach/* default */.Z(g.edges(), function (e) {
|
|
var edge = g.edge(e);
|
|
if (edge.nestingEdge) {
|
|
g.removeEdge(e);
|
|
}
|
|
});
|
|
}
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseClone.js + 15 modules
|
|
var _baseClone = __webpack_require__(48451);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/cloneDeep.js
|
|
|
|
|
|
/** Used to compose bitmasks for cloning. */
|
|
var CLONE_DEEP_FLAG = 1,
|
|
CLONE_SYMBOLS_FLAG = 4;
|
|
|
|
/**
|
|
* This method is like `_.clone` except that it recursively clones `value`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 1.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to recursively clone.
|
|
* @returns {*} Returns the deep cloned value.
|
|
* @see _.clone
|
|
* @example
|
|
*
|
|
* var objects = [{ 'a': 1 }, { 'b': 2 }];
|
|
*
|
|
* var deep = _.cloneDeep(objects);
|
|
* console.log(deep[0] === objects[0]);
|
|
* // => false
|
|
*/
|
|
function cloneDeep(value) {
|
|
return (0,_baseClone/* default */.Z)(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
|
|
}
|
|
|
|
/* harmony default export */ const lodash_es_cloneDeep = (cloneDeep);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js
|
|
|
|
|
|
|
|
|
|
function addSubgraphConstraints(g, cg, vs) {
|
|
var prev = {},
|
|
rootPrev;
|
|
|
|
forEach/* default */.Z(vs, function (v) {
|
|
var child = g.parent(v),
|
|
parent,
|
|
prevChild;
|
|
while (child) {
|
|
parent = g.parent(child);
|
|
if (parent) {
|
|
prevChild = prev[parent];
|
|
prev[parent] = child;
|
|
} else {
|
|
prevChild = rootPrev;
|
|
rootPrev = child;
|
|
}
|
|
if (prevChild && prevChild !== child) {
|
|
cg.setEdge(prevChild, child);
|
|
return;
|
|
}
|
|
child = parent;
|
|
}
|
|
});
|
|
|
|
/*
|
|
function dfs(v) {
|
|
var children = v ? g.children(v) : g.children();
|
|
if (children.length) {
|
|
var min = Number.POSITIVE_INFINITY,
|
|
subgraphs = [];
|
|
_.each(children, function(child) {
|
|
var childMin = dfs(child);
|
|
if (g.children(child).length) {
|
|
subgraphs.push({ v: child, order: childMin });
|
|
}
|
|
min = Math.min(min, childMin);
|
|
});
|
|
_.reduce(_.sortBy(subgraphs, "order"), function(prev, curr) {
|
|
cg.setEdge(prev.v, curr.v);
|
|
return curr;
|
|
});
|
|
return min;
|
|
}
|
|
return g.node(v).order;
|
|
}
|
|
dfs(undefined);
|
|
*/
|
|
}
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
* Constructs a graph that can be used to sort a layer of nodes. The graph will
|
|
* contain all base and subgraph nodes from the request layer in their original
|
|
* hierarchy and any edges that are incident on these nodes and are of the type
|
|
* requested by the "relationship" parameter.
|
|
*
|
|
* Nodes from the requested rank that do not have parents are assigned a root
|
|
* node in the output graph, which is set in the root graph attribute. This
|
|
* makes it easy to walk the hierarchy of movable nodes during ordering.
|
|
*
|
|
* Pre-conditions:
|
|
*
|
|
* 1. Input graph is a DAG
|
|
* 2. Base nodes in the input graph have a rank attribute
|
|
* 3. Subgraph nodes in the input graph has minRank and maxRank attributes
|
|
* 4. Edges have an assigned weight
|
|
*
|
|
* Post-conditions:
|
|
*
|
|
* 1. Output graph has all nodes in the movable rank with preserved
|
|
* hierarchy.
|
|
* 2. Root nodes in the movable layer are made children of the node
|
|
* indicated by the root attribute of the graph.
|
|
* 3. Non-movable nodes incident on movable nodes, selected by the
|
|
* relationship parameter, are included in the graph (without hierarchy).
|
|
* 4. Edges incident on movable nodes, selected by the relationship
|
|
* parameter, are added to the output graph.
|
|
* 5. The weights for copied edges are aggregated as need, since the output
|
|
* graph is not a multi-graph.
|
|
*/
|
|
function buildLayerGraph(g, rank, relationship) {
|
|
var root = createRootNode(g),
|
|
result = new graphlib/* Graph */.k({ compound: true })
|
|
.setGraph({ root: root })
|
|
.setDefaultNodeLabel(function (v) {
|
|
return g.node(v);
|
|
});
|
|
|
|
forEach/* default */.Z(g.nodes(), function (v) {
|
|
var node = g.node(v),
|
|
parent = g.parent(v);
|
|
|
|
if (node.rank === rank || (node.minRank <= rank && rank <= node.maxRank)) {
|
|
result.setNode(v);
|
|
result.setParent(v, parent || root);
|
|
|
|
// This assumes we have only short edges!
|
|
forEach/* default */.Z(g[relationship](v), function (e) {
|
|
var u = e.v === v ? e.w : e.v,
|
|
edge = result.edge(u, v),
|
|
weight = !isUndefined/* default */.Z(edge) ? edge.weight : 0;
|
|
result.setEdge(u, v, { weight: g.edge(e).weight + weight });
|
|
});
|
|
|
|
if (has/* default */.Z(node, 'minRank')) {
|
|
result.setNode(v, {
|
|
borderLeft: node.borderLeft[rank],
|
|
borderRight: node.borderRight[rank],
|
|
});
|
|
}
|
|
}
|
|
});
|
|
|
|
return result;
|
|
}
|
|
|
|
function createRootNode(g) {
|
|
var v;
|
|
while (g.hasNode((v = uniqueId/* default */.Z('_root'))));
|
|
return v;
|
|
}
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js
|
|
var _assignValue = __webpack_require__(72954);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseZipObject.js
|
|
/**
|
|
* This base implementation of `_.zipObject` which assigns values using `assignFunc`.
|
|
*
|
|
* @private
|
|
* @param {Array} props The property identifiers.
|
|
* @param {Array} values The property values.
|
|
* @param {Function} assignFunc The function to assign values.
|
|
* @returns {Object} Returns the new object.
|
|
*/
|
|
function baseZipObject(props, values, assignFunc) {
|
|
var index = -1,
|
|
length = props.length,
|
|
valsLength = values.length,
|
|
result = {};
|
|
|
|
while (++index < length) {
|
|
var value = index < valsLength ? values[index] : undefined;
|
|
assignFunc(result, props[index], value);
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/* harmony default export */ const _baseZipObject = (baseZipObject);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/zipObject.js
|
|
|
|
|
|
|
|
/**
|
|
* This method is like `_.fromPairs` except that it accepts two arrays,
|
|
* one of property identifiers and one of corresponding values.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.4.0
|
|
* @category Array
|
|
* @param {Array} [props=[]] The property identifiers.
|
|
* @param {Array} [values=[]] The property values.
|
|
* @returns {Object} Returns the new object.
|
|
* @example
|
|
*
|
|
* _.zipObject(['a', 'b'], [1, 2]);
|
|
* // => { 'a': 1, 'b': 2 }
|
|
*/
|
|
function zipObject(props, values) {
|
|
return _baseZipObject(props || [], values || [], _assignValue/* default */.Z);
|
|
}
|
|
|
|
/* harmony default export */ const lodash_es_zipObject = (zipObject);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules
|
|
var _baseFlatten = __webpack_require__(10626);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js
|
|
var _arrayMap = __webpack_require__(27679);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js
|
|
var _baseGet = __webpack_require__(13317);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseMap.js
|
|
var _baseMap = __webpack_require__(21018);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSortBy.js
|
|
/**
|
|
* The base implementation of `_.sortBy` which uses `comparer` to define the
|
|
* sort order of `array` and replaces criteria objects with their corresponding
|
|
* values.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to sort.
|
|
* @param {Function} comparer The function to define sort order.
|
|
* @returns {Array} Returns `array`.
|
|
*/
|
|
function baseSortBy(array, comparer) {
|
|
var length = array.length;
|
|
|
|
array.sort(comparer);
|
|
while (length--) {
|
|
array[length] = array[length].value;
|
|
}
|
|
return array;
|
|
}
|
|
|
|
/* harmony default export */ const _baseSortBy = (baseSortBy);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js
|
|
var _baseUnary = __webpack_require__(21162);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareAscending.js
|
|
|
|
|
|
/**
|
|
* Compares values to sort them in ascending order.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to compare.
|
|
* @param {*} other The other value to compare.
|
|
* @returns {number} Returns the sort order indicator for `value`.
|
|
*/
|
|
function compareAscending(value, other) {
|
|
if (value !== other) {
|
|
var valIsDefined = value !== undefined,
|
|
valIsNull = value === null,
|
|
valIsReflexive = value === value,
|
|
valIsSymbol = (0,isSymbol/* default */.Z)(value);
|
|
|
|
var othIsDefined = other !== undefined,
|
|
othIsNull = other === null,
|
|
othIsReflexive = other === other,
|
|
othIsSymbol = (0,isSymbol/* default */.Z)(other);
|
|
|
|
if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
|
|
(valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
|
|
(valIsNull && othIsDefined && othIsReflexive) ||
|
|
(!valIsDefined && othIsReflexive) ||
|
|
!valIsReflexive) {
|
|
return 1;
|
|
}
|
|
if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
|
|
(othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
|
|
(othIsNull && valIsDefined && valIsReflexive) ||
|
|
(!othIsDefined && valIsReflexive) ||
|
|
!othIsReflexive) {
|
|
return -1;
|
|
}
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
/* harmony default export */ const _compareAscending = (compareAscending);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareMultiple.js
|
|
|
|
|
|
/**
|
|
* Used by `_.orderBy` to compare multiple properties of a value to another
|
|
* and stable sort them.
|
|
*
|
|
* If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
|
|
* specify an order of "desc" for descending or "asc" for ascending sort order
|
|
* of corresponding values.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to compare.
|
|
* @param {Object} other The other object to compare.
|
|
* @param {boolean[]|string[]} orders The order to sort by for each property.
|
|
* @returns {number} Returns the sort order indicator for `object`.
|
|
*/
|
|
function compareMultiple(object, other, orders) {
|
|
var index = -1,
|
|
objCriteria = object.criteria,
|
|
othCriteria = other.criteria,
|
|
length = objCriteria.length,
|
|
ordersLength = orders.length;
|
|
|
|
while (++index < length) {
|
|
var result = _compareAscending(objCriteria[index], othCriteria[index]);
|
|
if (result) {
|
|
if (index >= ordersLength) {
|
|
return result;
|
|
}
|
|
var order = orders[index];
|
|
return result * (order == 'desc' ? -1 : 1);
|
|
}
|
|
}
|
|
// Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
|
|
// that causes it, under certain circumstances, to provide the same value for
|
|
// `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
|
|
// for more details.
|
|
//
|
|
// This also ensures a stable sort in V8 and other engines.
|
|
// See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
|
|
return object.index - other.index;
|
|
}
|
|
|
|
/* harmony default export */ const _compareMultiple = (compareMultiple);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseOrderBy.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* The base implementation of `_.orderBy` without param guards.
|
|
*
|
|
* @private
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
|
|
* @param {string[]} orders The sort orders of `iteratees`.
|
|
* @returns {Array} Returns the new sorted array.
|
|
*/
|
|
function baseOrderBy(collection, iteratees, orders) {
|
|
if (iteratees.length) {
|
|
iteratees = (0,_arrayMap/* default */.Z)(iteratees, function(iteratee) {
|
|
if ((0,isArray/* default */.Z)(iteratee)) {
|
|
return function(value) {
|
|
return (0,_baseGet/* default */.Z)(value, iteratee.length === 1 ? iteratee[0] : iteratee);
|
|
}
|
|
}
|
|
return iteratee;
|
|
});
|
|
} else {
|
|
iteratees = [identity/* default */.Z];
|
|
}
|
|
|
|
var index = -1;
|
|
iteratees = (0,_arrayMap/* default */.Z)(iteratees, (0,_baseUnary/* default */.Z)(_baseIteratee/* default */.Z));
|
|
|
|
var result = (0,_baseMap/* default */.Z)(collection, function(value, key, collection) {
|
|
var criteria = (0,_arrayMap/* default */.Z)(iteratees, function(iteratee) {
|
|
return iteratee(value);
|
|
});
|
|
return { 'criteria': criteria, 'index': ++index, 'value': value };
|
|
});
|
|
|
|
return _baseSortBy(result, function(object, other) {
|
|
return _compareMultiple(object, other, orders);
|
|
});
|
|
}
|
|
|
|
/* harmony default export */ const _baseOrderBy = (baseOrderBy);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js
|
|
var _baseRest = __webpack_require__(69581);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js
|
|
var _isIterateeCall = __webpack_require__(50439);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/sortBy.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Creates an array of elements, sorted in ascending order by the results of
|
|
* running each element in a collection thru each iteratee. This method
|
|
* performs a stable sort, that is, it preserves the original sort order of
|
|
* equal elements. The iteratees are invoked with one argument: (value).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {...(Function|Function[])} [iteratees=[_.identity]]
|
|
* The iteratees to sort by.
|
|
* @returns {Array} Returns the new sorted array.
|
|
* @example
|
|
*
|
|
* var users = [
|
|
* { 'user': 'fred', 'age': 48 },
|
|
* { 'user': 'barney', 'age': 36 },
|
|
* { 'user': 'fred', 'age': 30 },
|
|
* { 'user': 'barney', 'age': 34 }
|
|
* ];
|
|
*
|
|
* _.sortBy(users, [function(o) { return o.user; }]);
|
|
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
|
|
*
|
|
* _.sortBy(users, ['user', 'age']);
|
|
* // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
|
|
*/
|
|
var sortBy = (0,_baseRest/* default */.Z)(function(collection, iteratees) {
|
|
if (collection == null) {
|
|
return [];
|
|
}
|
|
var length = iteratees.length;
|
|
if (length > 1 && (0,_isIterateeCall/* default */.Z)(collection, iteratees[0], iteratees[1])) {
|
|
iteratees = [];
|
|
} else if (length > 2 && (0,_isIterateeCall/* default */.Z)(iteratees[0], iteratees[1], iteratees[2])) {
|
|
iteratees = [iteratees[0]];
|
|
}
|
|
return _baseOrderBy(collection, (0,_baseFlatten/* default */.Z)(iteratees, 1), []);
|
|
});
|
|
|
|
/* harmony default export */ const lodash_es_sortBy = (sortBy);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/cross-count.js
|
|
|
|
|
|
|
|
|
|
/*
|
|
* A function that takes a layering (an array of layers, each with an array of
|
|
* ordererd nodes) and a graph and returns a weighted crossing count.
|
|
*
|
|
* Pre-conditions:
|
|
*
|
|
* 1. Input graph must be simple (not a multigraph), directed, and include
|
|
* only simple edges.
|
|
* 2. Edges in the input graph must have assigned weights.
|
|
*
|
|
* Post-conditions:
|
|
*
|
|
* 1. The graph and layering matrix are left unchanged.
|
|
*
|
|
* This algorithm is derived from Barth, et al., "Bilayer Cross Counting."
|
|
*/
|
|
function crossCount(g, layering) {
|
|
var cc = 0;
|
|
for (var i = 1; i < layering.length; ++i) {
|
|
cc += twoLayerCrossCount(g, layering[i - 1], layering[i]);
|
|
}
|
|
return cc;
|
|
}
|
|
|
|
function twoLayerCrossCount(g, northLayer, southLayer) {
|
|
// Sort all of the edges between the north and south layers by their position
|
|
// in the north layer and then the south. Map these edges to the position of
|
|
// their head in the south layer.
|
|
var southPos = lodash_es_zipObject(
|
|
southLayer,
|
|
map/* default */.Z(southLayer, function (v, i) {
|
|
return i;
|
|
})
|
|
);
|
|
var southEntries = flatten/* default */.Z(
|
|
map/* default */.Z(northLayer, function (v) {
|
|
return lodash_es_sortBy(
|
|
map/* default */.Z(g.outEdges(v), function (e) {
|
|
return { pos: southPos[e.w], weight: g.edge(e).weight };
|
|
}),
|
|
'pos'
|
|
);
|
|
})
|
|
);
|
|
|
|
// Build the accumulator tree
|
|
var firstIndex = 1;
|
|
while (firstIndex < southLayer.length) firstIndex <<= 1;
|
|
var treeSize = 2 * firstIndex - 1;
|
|
firstIndex -= 1;
|
|
var tree = map/* default */.Z(new Array(treeSize), function () {
|
|
return 0;
|
|
});
|
|
|
|
// Calculate the weighted crossings
|
|
var cc = 0;
|
|
forEach/* default */.Z(
|
|
// @ts-expect-error
|
|
southEntries.forEach(function (entry) {
|
|
var index = entry.pos + firstIndex;
|
|
tree[index] += entry.weight;
|
|
var weightSum = 0;
|
|
// @ts-expect-error
|
|
while (index > 0) {
|
|
// @ts-expect-error
|
|
if (index % 2) {
|
|
weightSum += tree[index + 1];
|
|
}
|
|
// @ts-expect-error
|
|
index = (index - 1) >> 1;
|
|
tree[index] += entry.weight;
|
|
}
|
|
cc += entry.weight * weightSum;
|
|
})
|
|
);
|
|
|
|
return cc;
|
|
}
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/init-order.js
|
|
|
|
|
|
|
|
|
|
/*
|
|
* Assigns an initial order value for each node by performing a DFS search
|
|
* starting from nodes in the first rank. Nodes are assigned an order in their
|
|
* rank as they are first visited.
|
|
*
|
|
* This approach comes from Gansner, et al., "A Technique for Drawing Directed
|
|
* Graphs."
|
|
*
|
|
* Returns a layering matrix with an array per layer and each layer sorted by
|
|
* the order of its nodes.
|
|
*/
|
|
function initOrder(g) {
|
|
var visited = {};
|
|
var simpleNodes = filter/* default */.Z(g.nodes(), function (v) {
|
|
return !g.children(v).length;
|
|
});
|
|
var maxRank = lodash_es_max(
|
|
map/* default */.Z(simpleNodes, function (v) {
|
|
return g.node(v).rank;
|
|
})
|
|
);
|
|
var layers = map/* default */.Z(range/* default */.Z(maxRank + 1), function () {
|
|
return [];
|
|
});
|
|
|
|
function dfs(v) {
|
|
if (has/* default */.Z(visited, v)) return;
|
|
visited[v] = true;
|
|
var node = g.node(v);
|
|
layers[node.rank].push(v);
|
|
forEach/* default */.Z(g.successors(v), dfs);
|
|
}
|
|
|
|
var orderedVs = lodash_es_sortBy(simpleNodes, function (v) {
|
|
return g.node(v).rank;
|
|
});
|
|
forEach/* default */.Z(orderedVs, dfs);
|
|
|
|
return layers;
|
|
}
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/barycenter.js
|
|
|
|
|
|
|
|
|
|
function barycenter(g, movable) {
|
|
return map/* default */.Z(movable, function (v) {
|
|
var inV = g.inEdges(v);
|
|
if (!inV.length) {
|
|
return { v: v };
|
|
} else {
|
|
var result = reduce/* default */.Z(
|
|
inV,
|
|
function (acc, e) {
|
|
var edge = g.edge(e),
|
|
nodeU = g.node(e.v);
|
|
return {
|
|
sum: acc.sum + edge.weight * nodeU.order,
|
|
weight: acc.weight + edge.weight,
|
|
};
|
|
},
|
|
{ sum: 0, weight: 0 }
|
|
);
|
|
|
|
return {
|
|
v: v,
|
|
barycenter: result.sum / result.weight,
|
|
weight: result.weight,
|
|
};
|
|
}
|
|
});
|
|
}
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js
|
|
|
|
|
|
|
|
|
|
/*
|
|
* Given a list of entries of the form {v, barycenter, weight} and a
|
|
* constraint graph this function will resolve any conflicts between the
|
|
* constraint graph and the barycenters for the entries. If the barycenters for
|
|
* an entry would violate a constraint in the constraint graph then we coalesce
|
|
* the nodes in the conflict into a new node that respects the contraint and
|
|
* aggregates barycenter and weight information.
|
|
*
|
|
* This implementation is based on the description in Forster, "A Fast and
|
|
* Simple Hueristic for Constrained Two-Level Crossing Reduction," thought it
|
|
* differs in some specific details.
|
|
*
|
|
* Pre-conditions:
|
|
*
|
|
* 1. Each entry has the form {v, barycenter, weight}, or if the node has
|
|
* no barycenter, then {v}.
|
|
*
|
|
* Returns:
|
|
*
|
|
* A new list of entries of the form {vs, i, barycenter, weight}. The list
|
|
* `vs` may either be a singleton or it may be an aggregation of nodes
|
|
* ordered such that they do not violate constraints from the constraint
|
|
* graph. The property `i` is the lowest original index of any of the
|
|
* elements in `vs`.
|
|
*/
|
|
function resolveConflicts(entries, cg) {
|
|
var mappedEntries = {};
|
|
forEach/* default */.Z(entries, function (entry, i) {
|
|
var tmp = (mappedEntries[entry.v] = {
|
|
indegree: 0,
|
|
in: [],
|
|
out: [],
|
|
vs: [entry.v],
|
|
i: i,
|
|
});
|
|
if (!isUndefined/* default */.Z(entry.barycenter)) {
|
|
// @ts-expect-error
|
|
tmp.barycenter = entry.barycenter;
|
|
// @ts-expect-error
|
|
tmp.weight = entry.weight;
|
|
}
|
|
});
|
|
|
|
forEach/* default */.Z(cg.edges(), function (e) {
|
|
var entryV = mappedEntries[e.v];
|
|
var entryW = mappedEntries[e.w];
|
|
if (!isUndefined/* default */.Z(entryV) && !isUndefined/* default */.Z(entryW)) {
|
|
entryW.indegree++;
|
|
entryV.out.push(mappedEntries[e.w]);
|
|
}
|
|
});
|
|
|
|
var sourceSet = filter/* default */.Z(mappedEntries, function (entry) {
|
|
// @ts-expect-error
|
|
return !entry.indegree;
|
|
});
|
|
|
|
return doResolveConflicts(sourceSet);
|
|
}
|
|
|
|
function doResolveConflicts(sourceSet) {
|
|
var entries = [];
|
|
|
|
function handleIn(vEntry) {
|
|
return function (uEntry) {
|
|
if (uEntry.merged) {
|
|
return;
|
|
}
|
|
if (
|
|
isUndefined/* default */.Z(uEntry.barycenter) ||
|
|
isUndefined/* default */.Z(vEntry.barycenter) ||
|
|
uEntry.barycenter >= vEntry.barycenter
|
|
) {
|
|
mergeEntries(vEntry, uEntry);
|
|
}
|
|
};
|
|
}
|
|
|
|
function handleOut(vEntry) {
|
|
return function (wEntry) {
|
|
wEntry['in'].push(vEntry);
|
|
if (--wEntry.indegree === 0) {
|
|
sourceSet.push(wEntry);
|
|
}
|
|
};
|
|
}
|
|
|
|
while (sourceSet.length) {
|
|
var entry = sourceSet.pop();
|
|
entries.push(entry);
|
|
forEach/* default */.Z(entry['in'].reverse(), handleIn(entry));
|
|
forEach/* default */.Z(entry.out, handleOut(entry));
|
|
}
|
|
|
|
return map/* default */.Z(
|
|
filter/* default */.Z(entries, function (entry) {
|
|
return !entry.merged;
|
|
}),
|
|
function (entry) {
|
|
return pick/* default */.Z(entry, ['vs', 'i', 'barycenter', 'weight']);
|
|
}
|
|
);
|
|
}
|
|
|
|
function mergeEntries(target, source) {
|
|
var sum = 0;
|
|
var weight = 0;
|
|
|
|
if (target.weight) {
|
|
sum += target.barycenter * target.weight;
|
|
weight += target.weight;
|
|
}
|
|
|
|
if (source.weight) {
|
|
sum += source.barycenter * source.weight;
|
|
weight += source.weight;
|
|
}
|
|
|
|
target.vs = source.vs.concat(target.vs);
|
|
target.barycenter = sum / weight;
|
|
target.weight = weight;
|
|
target.i = Math.min(source.i, target.i);
|
|
source.merged = true;
|
|
}
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort.js
|
|
|
|
|
|
|
|
|
|
|
|
function sort(entries, biasRight) {
|
|
var parts = partition(entries, function (entry) {
|
|
return has/* default */.Z(entry, 'barycenter');
|
|
});
|
|
var sortable = parts.lhs,
|
|
unsortable = lodash_es_sortBy(parts.rhs, function (entry) {
|
|
return -entry.i;
|
|
}),
|
|
vs = [],
|
|
sum = 0,
|
|
weight = 0,
|
|
vsIndex = 0;
|
|
|
|
sortable.sort(compareWithBias(!!biasRight));
|
|
|
|
vsIndex = consumeUnsortable(vs, unsortable, vsIndex);
|
|
|
|
forEach/* default */.Z(sortable, function (entry) {
|
|
vsIndex += entry.vs.length;
|
|
vs.push(entry.vs);
|
|
sum += entry.barycenter * entry.weight;
|
|
weight += entry.weight;
|
|
vsIndex = consumeUnsortable(vs, unsortable, vsIndex);
|
|
});
|
|
|
|
var result = { vs: flatten/* default */.Z(vs) };
|
|
if (weight) {
|
|
result.barycenter = sum / weight;
|
|
result.weight = weight;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
function consumeUnsortable(vs, unsortable, index) {
|
|
var last;
|
|
while (unsortable.length && (last = lodash_es_last(unsortable)).i <= index) {
|
|
unsortable.pop();
|
|
vs.push(last.vs);
|
|
index++;
|
|
}
|
|
return index;
|
|
}
|
|
|
|
function compareWithBias(bias) {
|
|
return function (entryV, entryW) {
|
|
if (entryV.barycenter < entryW.barycenter) {
|
|
return -1;
|
|
} else if (entryV.barycenter > entryW.barycenter) {
|
|
return 1;
|
|
}
|
|
|
|
return !bias ? entryV.i - entryW.i : entryW.i - entryV.i;
|
|
};
|
|
}
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function sortSubgraph(g, v, cg, biasRight) {
|
|
var movable = g.children(v);
|
|
var node = g.node(v);
|
|
var bl = node ? node.borderLeft : undefined;
|
|
var br = node ? node.borderRight : undefined;
|
|
var subgraphs = {};
|
|
|
|
if (bl) {
|
|
movable = filter/* default */.Z(movable, function (w) {
|
|
return w !== bl && w !== br;
|
|
});
|
|
}
|
|
|
|
var barycenters = barycenter(g, movable);
|
|
forEach/* default */.Z(barycenters, function (entry) {
|
|
if (g.children(entry.v).length) {
|
|
var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight);
|
|
subgraphs[entry.v] = subgraphResult;
|
|
if (has/* default */.Z(subgraphResult, 'barycenter')) {
|
|
mergeBarycenters(entry, subgraphResult);
|
|
}
|
|
}
|
|
});
|
|
|
|
var entries = resolveConflicts(barycenters, cg);
|
|
expandSubgraphs(entries, subgraphs);
|
|
|
|
var result = sort(entries, biasRight);
|
|
|
|
if (bl) {
|
|
result.vs = flatten/* default */.Z([bl, result.vs, br]);
|
|
if (g.predecessors(bl).length) {
|
|
var blPred = g.node(g.predecessors(bl)[0]),
|
|
brPred = g.node(g.predecessors(br)[0]);
|
|
if (!has/* default */.Z(result, 'barycenter')) {
|
|
result.barycenter = 0;
|
|
result.weight = 0;
|
|
}
|
|
result.barycenter =
|
|
(result.barycenter * result.weight + blPred.order + brPred.order) / (result.weight + 2);
|
|
result.weight += 2;
|
|
}
|
|
}
|
|
|
|
return result;
|
|
}
|
|
|
|
function expandSubgraphs(entries, subgraphs) {
|
|
forEach/* default */.Z(entries, function (entry) {
|
|
entry.vs = flatten/* default */.Z(
|
|
entry.vs.map(function (v) {
|
|
if (subgraphs[v]) {
|
|
return subgraphs[v].vs;
|
|
}
|
|
return v;
|
|
})
|
|
);
|
|
});
|
|
}
|
|
|
|
function mergeBarycenters(target, other) {
|
|
if (!isUndefined/* default */.Z(target.barycenter)) {
|
|
target.barycenter =
|
|
(target.barycenter * target.weight + other.barycenter * other.weight) /
|
|
(target.weight + other.weight);
|
|
target.weight += other.weight;
|
|
} else {
|
|
target.barycenter = other.barycenter;
|
|
target.weight = other.weight;
|
|
}
|
|
}
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
* Applies heuristics to minimize edge crossings in the graph and sets the best
|
|
* order solution as an order attribute on each node.
|
|
*
|
|
* Pre-conditions:
|
|
*
|
|
* 1. Graph must be DAG
|
|
* 2. Graph nodes must be objects with a "rank" attribute
|
|
* 3. Graph edges must have the "weight" attribute
|
|
*
|
|
* Post-conditions:
|
|
*
|
|
* 1. Graph nodes will have an "order" attribute based on the results of the
|
|
* algorithm.
|
|
*/
|
|
function order(g) {
|
|
var maxRank = util_maxRank(g),
|
|
downLayerGraphs = buildLayerGraphs(g, range/* default */.Z(1, maxRank + 1), 'inEdges'),
|
|
upLayerGraphs = buildLayerGraphs(g, range/* default */.Z(maxRank - 1, -1, -1), 'outEdges');
|
|
|
|
var layering = initOrder(g);
|
|
assignOrder(g, layering);
|
|
|
|
var bestCC = Number.POSITIVE_INFINITY,
|
|
best;
|
|
|
|
for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) {
|
|
sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2);
|
|
|
|
layering = buildLayerMatrix(g);
|
|
var cc = crossCount(g, layering);
|
|
if (cc < bestCC) {
|
|
lastBest = 0;
|
|
best = lodash_es_cloneDeep(layering);
|
|
bestCC = cc;
|
|
}
|
|
}
|
|
|
|
assignOrder(g, best);
|
|
}
|
|
|
|
function buildLayerGraphs(g, ranks, relationship) {
|
|
return map/* default */.Z(ranks, function (rank) {
|
|
return buildLayerGraph(g, rank, relationship);
|
|
});
|
|
}
|
|
|
|
function sweepLayerGraphs(layerGraphs, biasRight) {
|
|
var cg = new graphlib/* Graph */.k();
|
|
forEach/* default */.Z(layerGraphs, function (lg) {
|
|
var root = lg.graph().root;
|
|
var sorted = sortSubgraph(lg, root, cg, biasRight);
|
|
forEach/* default */.Z(sorted.vs, function (v, i) {
|
|
lg.node(v).order = i;
|
|
});
|
|
addSubgraphConstraints(lg, cg, sorted.vs);
|
|
});
|
|
}
|
|
|
|
function assignOrder(g, layering) {
|
|
forEach/* default */.Z(layering, function (layer) {
|
|
forEach/* default */.Z(layer, function (v, i) {
|
|
g.node(v).order = i;
|
|
});
|
|
});
|
|
}
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js
|
|
|
|
|
|
|
|
|
|
function parentDummyChains(g) {
|
|
var postorderNums = parent_dummy_chains_postorder(g);
|
|
|
|
forEach/* default */.Z(g.graph().dummyChains, function (v) {
|
|
var node = g.node(v);
|
|
var edgeObj = node.edgeObj;
|
|
var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w);
|
|
var path = pathData.path;
|
|
var lca = pathData.lca;
|
|
var pathIdx = 0;
|
|
var pathV = path[pathIdx];
|
|
var ascending = true;
|
|
|
|
while (v !== edgeObj.w) {
|
|
node = g.node(v);
|
|
|
|
if (ascending) {
|
|
while ((pathV = path[pathIdx]) !== lca && g.node(pathV).maxRank < node.rank) {
|
|
pathIdx++;
|
|
}
|
|
|
|
if (pathV === lca) {
|
|
ascending = false;
|
|
}
|
|
}
|
|
|
|
if (!ascending) {
|
|
while (
|
|
pathIdx < path.length - 1 &&
|
|
g.node((pathV = path[pathIdx + 1])).minRank <= node.rank
|
|
) {
|
|
pathIdx++;
|
|
}
|
|
pathV = path[pathIdx];
|
|
}
|
|
|
|
g.setParent(v, pathV);
|
|
v = g.successors(v)[0];
|
|
}
|
|
});
|
|
}
|
|
|
|
// Find a path from v to w through the lowest common ancestor (LCA). Return the
|
|
// full path and the LCA.
|
|
function findPath(g, postorderNums, v, w) {
|
|
var vPath = [];
|
|
var wPath = [];
|
|
var low = Math.min(postorderNums[v].low, postorderNums[w].low);
|
|
var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim);
|
|
var parent;
|
|
var lca;
|
|
|
|
// Traverse up from v to find the LCA
|
|
parent = v;
|
|
do {
|
|
parent = g.parent(parent);
|
|
vPath.push(parent);
|
|
} while (parent && (postorderNums[parent].low > low || lim > postorderNums[parent].lim));
|
|
lca = parent;
|
|
|
|
// Traverse from w to LCA
|
|
parent = w;
|
|
while ((parent = g.parent(parent)) !== lca) {
|
|
wPath.push(parent);
|
|
}
|
|
|
|
return { path: vPath.concat(wPath.reverse()), lca: lca };
|
|
}
|
|
|
|
function parent_dummy_chains_postorder(g) {
|
|
var result = {};
|
|
var lim = 0;
|
|
|
|
function dfs(v) {
|
|
var low = lim;
|
|
forEach/* default */.Z(g.children(v), dfs);
|
|
result[v] = { low: low, lim: lim++ };
|
|
}
|
|
forEach/* default */.Z(g.children(), dfs);
|
|
|
|
return result;
|
|
}
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_castFunction.js
|
|
var _castFunction = __webpack_require__(68882);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/forOwn.js
|
|
|
|
|
|
|
|
/**
|
|
* Iterates over own enumerable string keyed properties of an object and
|
|
* invokes `iteratee` for each property. The iteratee is invoked with three
|
|
* arguments: (value, key, object). Iteratee functions may exit iteration
|
|
* early by explicitly returning `false`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.3.0
|
|
* @category Object
|
|
* @param {Object} object The object to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
* @returns {Object} Returns `object`.
|
|
* @see _.forOwnRight
|
|
* @example
|
|
*
|
|
* function Foo() {
|
|
* this.a = 1;
|
|
* this.b = 2;
|
|
* }
|
|
*
|
|
* Foo.prototype.c = 3;
|
|
*
|
|
* _.forOwn(new Foo, function(value, key) {
|
|
* console.log(key);
|
|
* });
|
|
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
|
|
*/
|
|
function forOwn(object, iteratee) {
|
|
return object && (0,_baseForOwn/* default */.Z)(object, (0,_castFunction/* default */.Z)(iteratee));
|
|
}
|
|
|
|
/* harmony default export */ const lodash_es_forOwn = (forOwn);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFor.js + 1 modules
|
|
var _baseFor = __webpack_require__(61395);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules
|
|
var keysIn = __webpack_require__(32957);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/forIn.js
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Iterates over own and inherited enumerable string keyed properties of an
|
|
* object and invokes `iteratee` for each property. The iteratee is invoked
|
|
* with three arguments: (value, key, object). Iteratee functions may exit
|
|
* iteration early by explicitly returning `false`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.3.0
|
|
* @category Object
|
|
* @param {Object} object The object to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
* @returns {Object} Returns `object`.
|
|
* @see _.forInRight
|
|
* @example
|
|
*
|
|
* function Foo() {
|
|
* this.a = 1;
|
|
* this.b = 2;
|
|
* }
|
|
*
|
|
* Foo.prototype.c = 3;
|
|
*
|
|
* _.forIn(new Foo, function(value, key) {
|
|
* console.log(key);
|
|
* });
|
|
* // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
|
|
*/
|
|
function forIn(object, iteratee) {
|
|
return object == null
|
|
? object
|
|
: (0,_baseFor/* default */.Z)(object, (0,_castFunction/* default */.Z)(iteratee), keysIn/* default */.Z);
|
|
}
|
|
|
|
/* harmony default export */ const lodash_es_forIn = (forIn);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/bk.js
|
|
|
|
|
|
|
|
|
|
/*
|
|
* This module provides coordinate assignment based on Brandes and Köpf, "Fast
|
|
* and Simple Horizontal Coordinate Assignment."
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
* Marks all edges in the graph with a type-1 conflict with the "type1Conflict"
|
|
* property. A type-1 conflict is one where a non-inner segment crosses an
|
|
* inner segment. An inner segment is an edge with both incident nodes marked
|
|
* with the "dummy" property.
|
|
*
|
|
* This algorithm scans layer by layer, starting with the second, for type-1
|
|
* conflicts between the current layer and the previous layer. For each layer
|
|
* it scans the nodes from left to right until it reaches one that is incident
|
|
* on an inner segment. It then scans predecessors to determine if they have
|
|
* edges that cross that inner segment. At the end a final scan is done for all
|
|
* nodes on the current rank to see if they cross the last visited inner
|
|
* segment.
|
|
*
|
|
* This algorithm (safely) assumes that a dummy node will only be incident on a
|
|
* single node in the layers being scanned.
|
|
*/
|
|
function findType1Conflicts(g, layering) {
|
|
var conflicts = {};
|
|
|
|
function visitLayer(prevLayer, layer) {
|
|
var // last visited node in the previous layer that is incident on an inner
|
|
// segment.
|
|
k0 = 0,
|
|
// Tracks the last node in this layer scanned for crossings with a type-1
|
|
// segment.
|
|
scanPos = 0,
|
|
prevLayerLength = prevLayer.length,
|
|
lastNode = lodash_es_last(layer);
|
|
|
|
forEach/* default */.Z(layer, function (v, i) {
|
|
var w = findOtherInnerSegmentNode(g, v),
|
|
k1 = w ? g.node(w).order : prevLayerLength;
|
|
|
|
if (w || v === lastNode) {
|
|
forEach/* default */.Z(layer.slice(scanPos, i + 1), function (scanNode) {
|
|
forEach/* default */.Z(g.predecessors(scanNode), function (u) {
|
|
var uLabel = g.node(u),
|
|
uPos = uLabel.order;
|
|
if ((uPos < k0 || k1 < uPos) && !(uLabel.dummy && g.node(scanNode).dummy)) {
|
|
addConflict(conflicts, u, scanNode);
|
|
}
|
|
});
|
|
});
|
|
// @ts-expect-error
|
|
scanPos = i + 1;
|
|
k0 = k1;
|
|
}
|
|
});
|
|
|
|
return layer;
|
|
}
|
|
|
|
reduce/* default */.Z(layering, visitLayer);
|
|
return conflicts;
|
|
}
|
|
|
|
function findType2Conflicts(g, layering) {
|
|
var conflicts = {};
|
|
|
|
function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) {
|
|
var v;
|
|
forEach/* default */.Z(range/* default */.Z(southPos, southEnd), function (i) {
|
|
v = south[i];
|
|
if (g.node(v).dummy) {
|
|
forEach/* default */.Z(g.predecessors(v), function (u) {
|
|
var uNode = g.node(u);
|
|
if (uNode.dummy && (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) {
|
|
addConflict(conflicts, u, v);
|
|
}
|
|
});
|
|
}
|
|
});
|
|
}
|
|
|
|
function visitLayer(north, south) {
|
|
var prevNorthPos = -1,
|
|
nextNorthPos,
|
|
southPos = 0;
|
|
|
|
forEach/* default */.Z(south, function (v, southLookahead) {
|
|
if (g.node(v).dummy === 'border') {
|
|
var predecessors = g.predecessors(v);
|
|
if (predecessors.length) {
|
|
nextNorthPos = g.node(predecessors[0]).order;
|
|
scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos);
|
|
// @ts-expect-error
|
|
southPos = southLookahead;
|
|
prevNorthPos = nextNorthPos;
|
|
}
|
|
}
|
|
scan(south, southPos, south.length, nextNorthPos, north.length);
|
|
});
|
|
|
|
return south;
|
|
}
|
|
|
|
reduce/* default */.Z(layering, visitLayer);
|
|
return conflicts;
|
|
}
|
|
|
|
function findOtherInnerSegmentNode(g, v) {
|
|
if (g.node(v).dummy) {
|
|
return lodash_es_find(g.predecessors(v), function (u) {
|
|
return g.node(u).dummy;
|
|
});
|
|
}
|
|
}
|
|
|
|
function addConflict(conflicts, v, w) {
|
|
if (v > w) {
|
|
var tmp = v;
|
|
v = w;
|
|
w = tmp;
|
|
}
|
|
|
|
var conflictsV = conflicts[v];
|
|
if (!conflictsV) {
|
|
conflicts[v] = conflictsV = {};
|
|
}
|
|
conflictsV[w] = true;
|
|
}
|
|
|
|
function hasConflict(conflicts, v, w) {
|
|
if (v > w) {
|
|
var tmp = v;
|
|
v = w;
|
|
w = tmp;
|
|
}
|
|
return has/* default */.Z(conflicts[v], w);
|
|
}
|
|
|
|
/*
|
|
* Try to align nodes into vertical "blocks" where possible. This algorithm
|
|
* attempts to align a node with one of its median neighbors. If the edge
|
|
* connecting a neighbor is a type-1 conflict then we ignore that possibility.
|
|
* If a previous node has already formed a block with a node after the node
|
|
* we're trying to form a block with, we also ignore that possibility - our
|
|
* blocks would be split in that scenario.
|
|
*/
|
|
function verticalAlignment(g, layering, conflicts, neighborFn) {
|
|
var root = {},
|
|
align = {},
|
|
pos = {};
|
|
|
|
// We cache the position here based on the layering because the graph and
|
|
// layering may be out of sync. The layering matrix is manipulated to
|
|
// generate different extreme alignments.
|
|
forEach/* default */.Z(layering, function (layer) {
|
|
forEach/* default */.Z(layer, function (v, order) {
|
|
root[v] = v;
|
|
align[v] = v;
|
|
pos[v] = order;
|
|
});
|
|
});
|
|
|
|
forEach/* default */.Z(layering, function (layer) {
|
|
var prevIdx = -1;
|
|
forEach/* default */.Z(layer, function (v) {
|
|
var ws = neighborFn(v);
|
|
if (ws.length) {
|
|
ws = lodash_es_sortBy(ws, function (w) {
|
|
return pos[w];
|
|
});
|
|
var mp = (ws.length - 1) / 2;
|
|
for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) {
|
|
var w = ws[i];
|
|
if (align[v] === v && prevIdx < pos[w] && !hasConflict(conflicts, v, w)) {
|
|
align[w] = v;
|
|
align[v] = root[v] = root[w];
|
|
prevIdx = pos[w];
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
return { root: root, align: align };
|
|
}
|
|
|
|
function horizontalCompaction(g, layering, root, align, reverseSep) {
|
|
// This portion of the algorithm differs from BK due to a number of problems.
|
|
// Instead of their algorithm we construct a new block graph and do two
|
|
// sweeps. The first sweep places blocks with the smallest possible
|
|
// coordinates. The second sweep removes unused space by moving blocks to the
|
|
// greatest coordinates without violating separation.
|
|
var xs = {},
|
|
blockG = buildBlockGraph(g, layering, root, reverseSep),
|
|
borderType = reverseSep ? 'borderLeft' : 'borderRight';
|
|
|
|
function iterate(setXsFunc, nextNodesFunc) {
|
|
var stack = blockG.nodes();
|
|
var elem = stack.pop();
|
|
var visited = {};
|
|
while (elem) {
|
|
if (visited[elem]) {
|
|
setXsFunc(elem);
|
|
} else {
|
|
visited[elem] = true;
|
|
stack.push(elem);
|
|
stack = stack.concat(nextNodesFunc(elem));
|
|
}
|
|
|
|
elem = stack.pop();
|
|
}
|
|
}
|
|
|
|
// First pass, assign smallest coordinates
|
|
function pass1(elem) {
|
|
xs[elem] = blockG.inEdges(elem).reduce(function (acc, e) {
|
|
return Math.max(acc, xs[e.v] + blockG.edge(e));
|
|
}, 0);
|
|
}
|
|
|
|
// Second pass, assign greatest coordinates
|
|
function pass2(elem) {
|
|
var min = blockG.outEdges(elem).reduce(function (acc, e) {
|
|
return Math.min(acc, xs[e.w] - blockG.edge(e));
|
|
}, Number.POSITIVE_INFINITY);
|
|
|
|
var node = g.node(elem);
|
|
if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) {
|
|
xs[elem] = Math.max(xs[elem], min);
|
|
}
|
|
}
|
|
|
|
iterate(pass1, blockG.predecessors.bind(blockG));
|
|
iterate(pass2, blockG.successors.bind(blockG));
|
|
|
|
// Assign x coordinates to all nodes
|
|
forEach/* default */.Z(align, function (v) {
|
|
xs[v] = xs[root[v]];
|
|
});
|
|
|
|
return xs;
|
|
}
|
|
|
|
function buildBlockGraph(g, layering, root, reverseSep) {
|
|
var blockGraph = new graphlib/* Graph */.k(),
|
|
graphLabel = g.graph(),
|
|
sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep);
|
|
|
|
forEach/* default */.Z(layering, function (layer) {
|
|
var u;
|
|
forEach/* default */.Z(layer, function (v) {
|
|
var vRoot = root[v];
|
|
blockGraph.setNode(vRoot);
|
|
if (u) {
|
|
var uRoot = root[u],
|
|
prevMax = blockGraph.edge(uRoot, vRoot);
|
|
blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0));
|
|
}
|
|
u = v;
|
|
});
|
|
});
|
|
|
|
return blockGraph;
|
|
}
|
|
|
|
/*
|
|
* Returns the alignment that has the smallest width of the given alignments.
|
|
*/
|
|
function findSmallestWidthAlignment(g, xss) {
|
|
return lodash_es_minBy(values/* default */.Z(xss), function (xs) {
|
|
var max = Number.NEGATIVE_INFINITY;
|
|
var min = Number.POSITIVE_INFINITY;
|
|
|
|
lodash_es_forIn(xs, function (x, v) {
|
|
var halfWidth = width(g, v) / 2;
|
|
|
|
max = Math.max(x + halfWidth, max);
|
|
min = Math.min(x - halfWidth, min);
|
|
});
|
|
|
|
return max - min;
|
|
});
|
|
}
|
|
|
|
/*
|
|
* Align the coordinates of each of the layout alignments such that
|
|
* left-biased alignments have their minimum coordinate at the same point as
|
|
* the minimum coordinate of the smallest width alignment and right-biased
|
|
* alignments have their maximum coordinate at the same point as the maximum
|
|
* coordinate of the smallest width alignment.
|
|
*/
|
|
function alignCoordinates(xss, alignTo) {
|
|
var alignToVals = values/* default */.Z(alignTo),
|
|
alignToMin = lodash_es_min(alignToVals),
|
|
alignToMax = lodash_es_max(alignToVals);
|
|
|
|
forEach/* default */.Z(['u', 'd'], function (vert) {
|
|
forEach/* default */.Z(['l', 'r'], function (horiz) {
|
|
var alignment = vert + horiz,
|
|
xs = xss[alignment],
|
|
delta;
|
|
if (xs === alignTo) return;
|
|
|
|
var xsVals = values/* default */.Z(xs);
|
|
delta = horiz === 'l' ? alignToMin - lodash_es_min(xsVals) : alignToMax - lodash_es_max(xsVals);
|
|
|
|
if (delta) {
|
|
xss[alignment] = lodash_es_mapValues(xs, function (x) {
|
|
return x + delta;
|
|
});
|
|
}
|
|
});
|
|
});
|
|
}
|
|
|
|
function balance(xss, align) {
|
|
return lodash_es_mapValues(xss.ul, function (ignore, v) {
|
|
if (align) {
|
|
return xss[align.toLowerCase()][v];
|
|
} else {
|
|
var xs = lodash_es_sortBy(map/* default */.Z(xss, v));
|
|
return (xs[1] + xs[2]) / 2;
|
|
}
|
|
});
|
|
}
|
|
|
|
function positionX(g) {
|
|
var layering = buildLayerMatrix(g);
|
|
var conflicts = merge/* default */.Z(findType1Conflicts(g, layering), findType2Conflicts(g, layering));
|
|
|
|
var xss = {};
|
|
var adjustedLayering;
|
|
forEach/* default */.Z(['u', 'd'], function (vert) {
|
|
adjustedLayering = vert === 'u' ? layering : values/* default */.Z(layering).reverse();
|
|
forEach/* default */.Z(['l', 'r'], function (horiz) {
|
|
if (horiz === 'r') {
|
|
adjustedLayering = map/* default */.Z(adjustedLayering, function (inner) {
|
|
return values/* default */.Z(inner).reverse();
|
|
});
|
|
}
|
|
|
|
var neighborFn = (vert === 'u' ? g.predecessors : g.successors).bind(g);
|
|
var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn);
|
|
var xs = horizontalCompaction(g, adjustedLayering, align.root, align.align, horiz === 'r');
|
|
if (horiz === 'r') {
|
|
xs = lodash_es_mapValues(xs, function (x) {
|
|
return -x;
|
|
});
|
|
}
|
|
xss[vert + horiz] = xs;
|
|
});
|
|
});
|
|
|
|
var smallestWidth = findSmallestWidthAlignment(g, xss);
|
|
alignCoordinates(xss, smallestWidth);
|
|
return balance(xss, g.graph().align);
|
|
}
|
|
|
|
function sep(nodeSep, edgeSep, reverseSep) {
|
|
return function (g, v, w) {
|
|
var vLabel = g.node(v);
|
|
var wLabel = g.node(w);
|
|
var sum = 0;
|
|
var delta;
|
|
|
|
sum += vLabel.width / 2;
|
|
if (has/* default */.Z(vLabel, 'labelpos')) {
|
|
switch (vLabel.labelpos.toLowerCase()) {
|
|
case 'l':
|
|
delta = -vLabel.width / 2;
|
|
break;
|
|
case 'r':
|
|
delta = vLabel.width / 2;
|
|
break;
|
|
}
|
|
}
|
|
if (delta) {
|
|
sum += reverseSep ? delta : -delta;
|
|
}
|
|
delta = 0;
|
|
|
|
sum += (vLabel.dummy ? edgeSep : nodeSep) / 2;
|
|
sum += (wLabel.dummy ? edgeSep : nodeSep) / 2;
|
|
|
|
sum += wLabel.width / 2;
|
|
if (has/* default */.Z(wLabel, 'labelpos')) {
|
|
switch (wLabel.labelpos.toLowerCase()) {
|
|
case 'l':
|
|
delta = wLabel.width / 2;
|
|
break;
|
|
case 'r':
|
|
delta = -wLabel.width / 2;
|
|
break;
|
|
}
|
|
}
|
|
if (delta) {
|
|
sum += reverseSep ? delta : -delta;
|
|
}
|
|
delta = 0;
|
|
|
|
return sum;
|
|
};
|
|
}
|
|
|
|
function width(g, v) {
|
|
return g.node(v).width;
|
|
}
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function position(g) {
|
|
g = asNonCompoundGraph(g);
|
|
|
|
positionY(g);
|
|
lodash_es_forOwn(positionX(g), function (x, v) {
|
|
g.node(v).x = x;
|
|
});
|
|
}
|
|
|
|
function positionY(g) {
|
|
var layering = buildLayerMatrix(g);
|
|
var rankSep = g.graph().ranksep;
|
|
var prevY = 0;
|
|
forEach/* default */.Z(layering, function (layer) {
|
|
var maxHeight = lodash_es_max(
|
|
map/* default */.Z(layer, function (v) {
|
|
return g.node(v).height;
|
|
})
|
|
);
|
|
forEach/* default */.Z(layer, function (v) {
|
|
g.node(v).y = prevY + maxHeight / 2;
|
|
});
|
|
prevY += maxHeight + rankSep;
|
|
});
|
|
}
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/layout.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function layout(g, opts) {
|
|
var time = opts && opts.debugTiming ? util_time : notime;
|
|
time('layout', function () {
|
|
var layoutGraph = time(' buildLayoutGraph', function () {
|
|
return buildLayoutGraph(g);
|
|
});
|
|
time(' runLayout', function () {
|
|
runLayout(layoutGraph, time);
|
|
});
|
|
time(' updateInputGraph', function () {
|
|
updateInputGraph(g, layoutGraph);
|
|
});
|
|
});
|
|
}
|
|
|
|
function runLayout(g, time) {
|
|
time(' makeSpaceForEdgeLabels', function () {
|
|
makeSpaceForEdgeLabels(g);
|
|
});
|
|
time(' removeSelfEdges', function () {
|
|
removeSelfEdges(g);
|
|
});
|
|
time(' acyclic', function () {
|
|
run(g);
|
|
});
|
|
time(' nestingGraph.run', function () {
|
|
nesting_graph_run(g);
|
|
});
|
|
time(' rank', function () {
|
|
rank(asNonCompoundGraph(g));
|
|
});
|
|
time(' injectEdgeLabelProxies', function () {
|
|
injectEdgeLabelProxies(g);
|
|
});
|
|
time(' removeEmptyRanks', function () {
|
|
removeEmptyRanks(g);
|
|
});
|
|
time(' nestingGraph.cleanup', function () {
|
|
cleanup(g);
|
|
});
|
|
time(' normalizeRanks', function () {
|
|
normalizeRanks(g);
|
|
});
|
|
time(' assignRankMinMax', function () {
|
|
assignRankMinMax(g);
|
|
});
|
|
time(' removeEdgeLabelProxies', function () {
|
|
removeEdgeLabelProxies(g);
|
|
});
|
|
time(' normalize.run', function () {
|
|
normalize_run(g);
|
|
});
|
|
time(' parentDummyChains', function () {
|
|
parentDummyChains(g);
|
|
});
|
|
time(' addBorderSegments', function () {
|
|
addBorderSegments(g);
|
|
});
|
|
time(' order', function () {
|
|
order(g);
|
|
});
|
|
time(' insertSelfEdges', function () {
|
|
insertSelfEdges(g);
|
|
});
|
|
time(' adjustCoordinateSystem', function () {
|
|
adjust(g);
|
|
});
|
|
time(' position', function () {
|
|
position(g);
|
|
});
|
|
time(' positionSelfEdges', function () {
|
|
positionSelfEdges(g);
|
|
});
|
|
time(' removeBorderNodes', function () {
|
|
removeBorderNodes(g);
|
|
});
|
|
time(' normalize.undo', function () {
|
|
normalize_undo(g);
|
|
});
|
|
time(' fixupEdgeLabelCoords', function () {
|
|
fixupEdgeLabelCoords(g);
|
|
});
|
|
time(' undoCoordinateSystem', function () {
|
|
coordinate_system_undo(g);
|
|
});
|
|
time(' translateGraph', function () {
|
|
translateGraph(g);
|
|
});
|
|
time(' assignNodeIntersects', function () {
|
|
assignNodeIntersects(g);
|
|
});
|
|
time(' reversePoints', function () {
|
|
reversePointsForReversedEdges(g);
|
|
});
|
|
time(' acyclic.undo', function () {
|
|
undo(g);
|
|
});
|
|
}
|
|
|
|
/*
|
|
* Copies final layout information from the layout graph back to the input
|
|
* graph. This process only copies whitelisted attributes from the layout graph
|
|
* to the input graph, so it serves as a good place to determine what
|
|
* attributes can influence layout.
|
|
*/
|
|
function updateInputGraph(inputGraph, layoutGraph) {
|
|
forEach/* default */.Z(inputGraph.nodes(), function (v) {
|
|
var inputLabel = inputGraph.node(v);
|
|
var layoutLabel = layoutGraph.node(v);
|
|
|
|
if (inputLabel) {
|
|
inputLabel.x = layoutLabel.x;
|
|
inputLabel.y = layoutLabel.y;
|
|
|
|
if (layoutGraph.children(v).length) {
|
|
inputLabel.width = layoutLabel.width;
|
|
inputLabel.height = layoutLabel.height;
|
|
}
|
|
}
|
|
});
|
|
|
|
forEach/* default */.Z(inputGraph.edges(), function (e) {
|
|
var inputLabel = inputGraph.edge(e);
|
|
var layoutLabel = layoutGraph.edge(e);
|
|
|
|
inputLabel.points = layoutLabel.points;
|
|
if (has/* default */.Z(layoutLabel, 'x')) {
|
|
inputLabel.x = layoutLabel.x;
|
|
inputLabel.y = layoutLabel.y;
|
|
}
|
|
});
|
|
|
|
inputGraph.graph().width = layoutGraph.graph().width;
|
|
inputGraph.graph().height = layoutGraph.graph().height;
|
|
}
|
|
|
|
var graphNumAttrs = ['nodesep', 'edgesep', 'ranksep', 'marginx', 'marginy'];
|
|
var graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: 'tb' };
|
|
var graphAttrs = ['acyclicer', 'ranker', 'rankdir', 'align'];
|
|
var nodeNumAttrs = ['width', 'height'];
|
|
var nodeDefaults = { width: 0, height: 0 };
|
|
var edgeNumAttrs = ['minlen', 'weight', 'width', 'height', 'labeloffset'];
|
|
var edgeDefaults = {
|
|
minlen: 1,
|
|
weight: 1,
|
|
width: 0,
|
|
height: 0,
|
|
labeloffset: 10,
|
|
labelpos: 'r',
|
|
};
|
|
var edgeAttrs = ['labelpos'];
|
|
|
|
/*
|
|
* Constructs a new graph from the input graph, which can be used for layout.
|
|
* This process copies only whitelisted attributes from the input graph to the
|
|
* layout graph. Thus this function serves as a good place to determine what
|
|
* attributes can influence layout.
|
|
*/
|
|
function buildLayoutGraph(inputGraph) {
|
|
var g = new graphlib/* Graph */.k({ multigraph: true, compound: true });
|
|
var graph = canonicalize(inputGraph.graph());
|
|
|
|
g.setGraph(
|
|
merge/* default */.Z({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), pick/* default */.Z(graph, graphAttrs))
|
|
);
|
|
|
|
forEach/* default */.Z(inputGraph.nodes(), function (v) {
|
|
var node = canonicalize(inputGraph.node(v));
|
|
g.setNode(v, defaults/* default */.Z(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults));
|
|
g.setParent(v, inputGraph.parent(v));
|
|
});
|
|
|
|
forEach/* default */.Z(inputGraph.edges(), function (e) {
|
|
var edge = canonicalize(inputGraph.edge(e));
|
|
g.setEdge(
|
|
e,
|
|
merge/* default */.Z({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), pick/* default */.Z(edge, edgeAttrs))
|
|
);
|
|
});
|
|
|
|
return g;
|
|
}
|
|
|
|
/*
|
|
* This idea comes from the Gansner paper: to account for edge labels in our
|
|
* layout we split each rank in half by doubling minlen and halving ranksep.
|
|
* Then we can place labels at these mid-points between nodes.
|
|
*
|
|
* We also add some minimal padding to the width to push the label for the edge
|
|
* away from the edge itself a bit.
|
|
*/
|
|
function makeSpaceForEdgeLabels(g) {
|
|
var graph = g.graph();
|
|
graph.ranksep /= 2;
|
|
forEach/* default */.Z(g.edges(), function (e) {
|
|
var edge = g.edge(e);
|
|
edge.minlen *= 2;
|
|
if (edge.labelpos.toLowerCase() !== 'c') {
|
|
if (graph.rankdir === 'TB' || graph.rankdir === 'BT') {
|
|
edge.width += edge.labeloffset;
|
|
} else {
|
|
edge.height += edge.labeloffset;
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
/*
|
|
* Creates temporary dummy nodes that capture the rank in which each edge's
|
|
* label is going to, if it has one of non-zero width and height. We do this
|
|
* so that we can safely remove empty ranks while preserving balance for the
|
|
* label's position.
|
|
*/
|
|
function injectEdgeLabelProxies(g) {
|
|
forEach/* default */.Z(g.edges(), function (e) {
|
|
var edge = g.edge(e);
|
|
if (edge.width && edge.height) {
|
|
var v = g.node(e.v);
|
|
var w = g.node(e.w);
|
|
var label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e };
|
|
addDummyNode(g, 'edge-proxy', label, '_ep');
|
|
}
|
|
});
|
|
}
|
|
|
|
function assignRankMinMax(g) {
|
|
var maxRank = 0;
|
|
forEach/* default */.Z(g.nodes(), function (v) {
|
|
var node = g.node(v);
|
|
if (node.borderTop) {
|
|
node.minRank = g.node(node.borderTop).rank;
|
|
node.maxRank = g.node(node.borderBottom).rank;
|
|
// @ts-expect-error
|
|
maxRank = lodash_es_max(maxRank, node.maxRank);
|
|
}
|
|
});
|
|
g.graph().maxRank = maxRank;
|
|
}
|
|
|
|
function removeEdgeLabelProxies(g) {
|
|
forEach/* default */.Z(g.nodes(), function (v) {
|
|
var node = g.node(v);
|
|
if (node.dummy === 'edge-proxy') {
|
|
g.edge(node.e).labelRank = node.rank;
|
|
g.removeNode(v);
|
|
}
|
|
});
|
|
}
|
|
|
|
function translateGraph(g) {
|
|
var minX = Number.POSITIVE_INFINITY;
|
|
var maxX = 0;
|
|
var minY = Number.POSITIVE_INFINITY;
|
|
var maxY = 0;
|
|
var graphLabel = g.graph();
|
|
var marginX = graphLabel.marginx || 0;
|
|
var marginY = graphLabel.marginy || 0;
|
|
|
|
function getExtremes(attrs) {
|
|
var x = attrs.x;
|
|
var y = attrs.y;
|
|
var w = attrs.width;
|
|
var h = attrs.height;
|
|
minX = Math.min(minX, x - w / 2);
|
|
maxX = Math.max(maxX, x + w / 2);
|
|
minY = Math.min(minY, y - h / 2);
|
|
maxY = Math.max(maxY, y + h / 2);
|
|
}
|
|
|
|
forEach/* default */.Z(g.nodes(), function (v) {
|
|
getExtremes(g.node(v));
|
|
});
|
|
forEach/* default */.Z(g.edges(), function (e) {
|
|
var edge = g.edge(e);
|
|
if (has/* default */.Z(edge, 'x')) {
|
|
getExtremes(edge);
|
|
}
|
|
});
|
|
|
|
minX -= marginX;
|
|
minY -= marginY;
|
|
|
|
forEach/* default */.Z(g.nodes(), function (v) {
|
|
var node = g.node(v);
|
|
node.x -= minX;
|
|
node.y -= minY;
|
|
});
|
|
|
|
forEach/* default */.Z(g.edges(), function (e) {
|
|
var edge = g.edge(e);
|
|
forEach/* default */.Z(edge.points, function (p) {
|
|
p.x -= minX;
|
|
p.y -= minY;
|
|
});
|
|
if (has/* default */.Z(edge, 'x')) {
|
|
edge.x -= minX;
|
|
}
|
|
if (has/* default */.Z(edge, 'y')) {
|
|
edge.y -= minY;
|
|
}
|
|
});
|
|
|
|
graphLabel.width = maxX - minX + marginX;
|
|
graphLabel.height = maxY - minY + marginY;
|
|
}
|
|
|
|
function assignNodeIntersects(g) {
|
|
forEach/* default */.Z(g.edges(), function (e) {
|
|
var edge = g.edge(e);
|
|
var nodeV = g.node(e.v);
|
|
var nodeW = g.node(e.w);
|
|
var p1, p2;
|
|
if (!edge.points) {
|
|
edge.points = [];
|
|
p1 = nodeW;
|
|
p2 = nodeV;
|
|
} else {
|
|
p1 = edge.points[0];
|
|
p2 = edge.points[edge.points.length - 1];
|
|
}
|
|
edge.points.unshift(intersectRect(nodeV, p1));
|
|
edge.points.push(intersectRect(nodeW, p2));
|
|
});
|
|
}
|
|
|
|
function fixupEdgeLabelCoords(g) {
|
|
forEach/* default */.Z(g.edges(), function (e) {
|
|
var edge = g.edge(e);
|
|
if (has/* default */.Z(edge, 'x')) {
|
|
if (edge.labelpos === 'l' || edge.labelpos === 'r') {
|
|
edge.width -= edge.labeloffset;
|
|
}
|
|
switch (edge.labelpos) {
|
|
case 'l':
|
|
edge.x -= edge.width / 2 + edge.labeloffset;
|
|
break;
|
|
case 'r':
|
|
edge.x += edge.width / 2 + edge.labeloffset;
|
|
break;
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
function reversePointsForReversedEdges(g) {
|
|
forEach/* default */.Z(g.edges(), function (e) {
|
|
var edge = g.edge(e);
|
|
if (edge.reversed) {
|
|
edge.points.reverse();
|
|
}
|
|
});
|
|
}
|
|
|
|
function removeBorderNodes(g) {
|
|
forEach/* default */.Z(g.nodes(), function (v) {
|
|
if (g.children(v).length) {
|
|
var node = g.node(v);
|
|
var t = g.node(node.borderTop);
|
|
var b = g.node(node.borderBottom);
|
|
var l = g.node(lodash_es_last(node.borderLeft));
|
|
var r = g.node(lodash_es_last(node.borderRight));
|
|
|
|
node.width = Math.abs(r.x - l.x);
|
|
node.height = Math.abs(b.y - t.y);
|
|
node.x = l.x + node.width / 2;
|
|
node.y = t.y + node.height / 2;
|
|
}
|
|
});
|
|
|
|
forEach/* default */.Z(g.nodes(), function (v) {
|
|
if (g.node(v).dummy === 'border') {
|
|
g.removeNode(v);
|
|
}
|
|
});
|
|
}
|
|
|
|
function removeSelfEdges(g) {
|
|
forEach/* default */.Z(g.edges(), function (e) {
|
|
if (e.v === e.w) {
|
|
var node = g.node(e.v);
|
|
if (!node.selfEdges) {
|
|
node.selfEdges = [];
|
|
}
|
|
node.selfEdges.push({ e: e, label: g.edge(e) });
|
|
g.removeEdge(e);
|
|
}
|
|
});
|
|
}
|
|
|
|
function insertSelfEdges(g) {
|
|
var layers = buildLayerMatrix(g);
|
|
forEach/* default */.Z(layers, function (layer) {
|
|
var orderShift = 0;
|
|
forEach/* default */.Z(layer, function (v, i) {
|
|
var node = g.node(v);
|
|
node.order = i + orderShift;
|
|
forEach/* default */.Z(node.selfEdges, function (selfEdge) {
|
|
addDummyNode(
|
|
g,
|
|
'selfedge',
|
|
{
|
|
width: selfEdge.label.width,
|
|
height: selfEdge.label.height,
|
|
rank: node.rank,
|
|
order: i + ++orderShift,
|
|
e: selfEdge.e,
|
|
label: selfEdge.label,
|
|
},
|
|
'_se'
|
|
);
|
|
});
|
|
delete node.selfEdges;
|
|
});
|
|
});
|
|
}
|
|
|
|
function positionSelfEdges(g) {
|
|
forEach/* default */.Z(g.nodes(), function (v) {
|
|
var node = g.node(v);
|
|
if (node.dummy === 'selfedge') {
|
|
var selfNode = g.node(node.e.v);
|
|
var x = selfNode.x + selfNode.width / 2;
|
|
var y = selfNode.y;
|
|
var dx = node.x - x;
|
|
var dy = selfNode.height / 2;
|
|
g.setEdge(node.e, node.label);
|
|
g.removeNode(v);
|
|
node.label.points = [
|
|
{ x: x + (2 * dx) / 3, y: y - dy },
|
|
{ x: x + (5 * dx) / 6, y: y - dy },
|
|
{ x: x + dx, y: y },
|
|
{ x: x + (5 * dx) / 6, y: y + dy },
|
|
{ x: x + (2 * dx) / 3, y: y + dy },
|
|
];
|
|
node.label.x = node.x;
|
|
node.label.y = node.y;
|
|
}
|
|
});
|
|
}
|
|
|
|
function selectNumberAttrs(obj, attrs) {
|
|
return lodash_es_mapValues(pick/* default */.Z(obj, attrs), Number);
|
|
}
|
|
|
|
function canonicalize(attrs) {
|
|
var newAttrs = {};
|
|
forEach/* default */.Z(attrs, function (v, k) {
|
|
newAttrs[k.toLowerCase()] = v;
|
|
});
|
|
return newAttrs;
|
|
}
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 52544:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
k: () => (/* binding */ Graph)
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules
|
|
var has = __webpack_require__(17452);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js
|
|
var constant = __webpack_require__(62002);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isFunction.js
|
|
var isFunction = __webpack_require__(73234);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js
|
|
var keys = __webpack_require__(17179);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules
|
|
var filter = __webpack_require__(13445);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isEmpty.js
|
|
var isEmpty = __webpack_require__(79697);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js
|
|
var forEach = __webpack_require__(70870);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js
|
|
var isUndefined = __webpack_require__(49360);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules
|
|
var _baseFlatten = __webpack_require__(10626);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js
|
|
var _baseRest = __webpack_require__(69581);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules
|
|
var _SetCache = __webpack_require__(63001);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js
|
|
var _baseFindIndex = __webpack_require__(21692);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsNaN.js
|
|
/**
|
|
* The base implementation of `_.isNaN` without support for number objects.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
|
|
*/
|
|
function baseIsNaN(value) {
|
|
return value !== value;
|
|
}
|
|
|
|
/* harmony default export */ const _baseIsNaN = (baseIsNaN);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_strictIndexOf.js
|
|
/**
|
|
* A specialized version of `_.indexOf` which performs strict equality
|
|
* comparisons of values, i.e. `===`.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to inspect.
|
|
* @param {*} value The value to search for.
|
|
* @param {number} fromIndex The index to search from.
|
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
*/
|
|
function strictIndexOf(array, value, fromIndex) {
|
|
var index = fromIndex - 1,
|
|
length = array.length;
|
|
|
|
while (++index < length) {
|
|
if (array[index] === value) {
|
|
return index;
|
|
}
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
/* harmony default export */ const _strictIndexOf = (strictIndexOf);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIndexOf.js
|
|
|
|
|
|
|
|
|
|
/**
|
|
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to inspect.
|
|
* @param {*} value The value to search for.
|
|
* @param {number} fromIndex The index to search from.
|
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
*/
|
|
function baseIndexOf(array, value, fromIndex) {
|
|
return value === value
|
|
? _strictIndexOf(array, value, fromIndex)
|
|
: (0,_baseFindIndex/* default */.Z)(array, _baseIsNaN, fromIndex);
|
|
}
|
|
|
|
/* harmony default export */ const _baseIndexOf = (baseIndexOf);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludes.js
|
|
|
|
|
|
/**
|
|
* A specialized version of `_.includes` for arrays without support for
|
|
* specifying an index to search from.
|
|
*
|
|
* @private
|
|
* @param {Array} [array] The array to inspect.
|
|
* @param {*} target The value to search for.
|
|
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
|
*/
|
|
function arrayIncludes(array, value) {
|
|
var length = array == null ? 0 : array.length;
|
|
return !!length && _baseIndexOf(array, value, 0) > -1;
|
|
}
|
|
|
|
/* harmony default export */ const _arrayIncludes = (arrayIncludes);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludesWith.js
|
|
/**
|
|
* This function is like `arrayIncludes` except that it accepts a comparator.
|
|
*
|
|
* @private
|
|
* @param {Array} [array] The array to inspect.
|
|
* @param {*} target The value to search for.
|
|
* @param {Function} comparator The comparator invoked per element.
|
|
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
|
*/
|
|
function arrayIncludesWith(array, value, comparator) {
|
|
var index = -1,
|
|
length = array == null ? 0 : array.length;
|
|
|
|
while (++index < length) {
|
|
if (comparator(value, array[index])) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
/* harmony default export */ const _arrayIncludesWith = (arrayIncludesWith);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js
|
|
var _cacheHas = __webpack_require__(59548);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_Set.js
|
|
var _Set = __webpack_require__(93203);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/noop.js
|
|
/**
|
|
* This method returns `undefined`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 2.3.0
|
|
* @category Util
|
|
* @example
|
|
*
|
|
* _.times(2, _.noop);
|
|
* // => [undefined, undefined]
|
|
*/
|
|
function noop() {
|
|
// No operation performed.
|
|
}
|
|
|
|
/* harmony default export */ const lodash_es_noop = (noop);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js
|
|
var _setToArray = __webpack_require__(6545);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_createSet.js
|
|
|
|
|
|
|
|
|
|
/** Used as references for various `Number` constants. */
|
|
var INFINITY = 1 / 0;
|
|
|
|
/**
|
|
* Creates a set object of `values`.
|
|
*
|
|
* @private
|
|
* @param {Array} values The values to add to the set.
|
|
* @returns {Object} Returns the new set.
|
|
*/
|
|
var createSet = !(_Set/* default */.Z && (1 / (0,_setToArray/* default */.Z)(new _Set/* default */.Z([,-0]))[1]) == INFINITY) ? lodash_es_noop : function(values) {
|
|
return new _Set/* default */.Z(values);
|
|
};
|
|
|
|
/* harmony default export */ const _createSet = (createSet);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseUniq.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Used as the size to enable large array optimizations. */
|
|
var LARGE_ARRAY_SIZE = 200;
|
|
|
|
/**
|
|
* The base implementation of `_.uniqBy` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to inspect.
|
|
* @param {Function} [iteratee] The iteratee invoked per element.
|
|
* @param {Function} [comparator] The comparator invoked per element.
|
|
* @returns {Array} Returns the new duplicate free array.
|
|
*/
|
|
function baseUniq(array, iteratee, comparator) {
|
|
var index = -1,
|
|
includes = _arrayIncludes,
|
|
length = array.length,
|
|
isCommon = true,
|
|
result = [],
|
|
seen = result;
|
|
|
|
if (comparator) {
|
|
isCommon = false;
|
|
includes = _arrayIncludesWith;
|
|
}
|
|
else if (length >= LARGE_ARRAY_SIZE) {
|
|
var set = iteratee ? null : _createSet(array);
|
|
if (set) {
|
|
return (0,_setToArray/* default */.Z)(set);
|
|
}
|
|
isCommon = false;
|
|
includes = _cacheHas/* default */.Z;
|
|
seen = new _SetCache/* default */.Z;
|
|
}
|
|
else {
|
|
seen = iteratee ? [] : result;
|
|
}
|
|
outer:
|
|
while (++index < length) {
|
|
var value = array[index],
|
|
computed = iteratee ? iteratee(value) : value;
|
|
|
|
value = (comparator || value !== 0) ? value : 0;
|
|
if (isCommon && computed === computed) {
|
|
var seenIndex = seen.length;
|
|
while (seenIndex--) {
|
|
if (seen[seenIndex] === computed) {
|
|
continue outer;
|
|
}
|
|
}
|
|
if (iteratee) {
|
|
seen.push(computed);
|
|
}
|
|
result.push(value);
|
|
}
|
|
else if (!includes(seen, computed, comparator)) {
|
|
if (seen !== result) {
|
|
seen.push(computed);
|
|
}
|
|
result.push(value);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/* harmony default export */ const _baseUniq = (baseUniq);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLikeObject.js
|
|
var isArrayLikeObject = __webpack_require__(836);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/union.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Creates an array of unique values, in order, from all given arrays using
|
|
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
* for equality comparisons.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {...Array} [arrays] The arrays to inspect.
|
|
* @returns {Array} Returns the new array of combined values.
|
|
* @example
|
|
*
|
|
* _.union([2], [1, 2]);
|
|
* // => [2, 1]
|
|
*/
|
|
var union = (0,_baseRest/* default */.Z)(function(arrays) {
|
|
return _baseUniq((0,_baseFlatten/* default */.Z)(arrays, 1, isArrayLikeObject/* default */.Z, true));
|
|
});
|
|
|
|
/* harmony default export */ const lodash_es_union = (union);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules
|
|
var values = __webpack_require__(34148);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules
|
|
var reduce = __webpack_require__(92344);
|
|
;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js
|
|
|
|
|
|
var DEFAULT_EDGE_NAME = '\x00';
|
|
var GRAPH_NODE = '\x00';
|
|
var EDGE_KEY_DELIM = '\x01';
|
|
|
|
// Implementation notes:
|
|
//
|
|
// * Node id query functions should return string ids for the nodes
|
|
// * Edge id query functions should return an "edgeObj", edge object, that is
|
|
// composed of enough information to uniquely identify an edge: {v, w, name}.
|
|
// * Internally we use an "edgeId", a stringified form of the edgeObj, to
|
|
// reference edges. This is because we need a performant way to look these
|
|
// edges up and, object properties, which have string keys, are the closest
|
|
// we're going to get to a performant hashtable in JavaScript.
|
|
|
|
// Implementation notes:
|
|
//
|
|
// * Node id query functions should return string ids for the nodes
|
|
// * Edge id query functions should return an "edgeObj", edge object, that is
|
|
// composed of enough information to uniquely identify an edge: {v, w, name}.
|
|
// * Internally we use an "edgeId", a stringified form of the edgeObj, to
|
|
// reference edges. This is because we need a performant way to look these
|
|
// edges up and, object properties, which have string keys, are the closest
|
|
// we're going to get to a performant hashtable in JavaScript.
|
|
class Graph {
|
|
constructor(opts = {}) {
|
|
this._isDirected = has/* default */.Z(opts, 'directed') ? opts.directed : true;
|
|
this._isMultigraph = has/* default */.Z(opts, 'multigraph') ? opts.multigraph : false;
|
|
this._isCompound = has/* default */.Z(opts, 'compound') ? opts.compound : false;
|
|
|
|
// Label for the graph itself
|
|
this._label = undefined;
|
|
|
|
// Defaults to be set when creating a new node
|
|
this._defaultNodeLabelFn = constant/* default */.Z(undefined);
|
|
|
|
// Defaults to be set when creating a new edge
|
|
this._defaultEdgeLabelFn = constant/* default */.Z(undefined);
|
|
|
|
// v -> label
|
|
this._nodes = {};
|
|
|
|
if (this._isCompound) {
|
|
// v -> parent
|
|
this._parent = {};
|
|
|
|
// v -> children
|
|
this._children = {};
|
|
this._children[GRAPH_NODE] = {};
|
|
}
|
|
|
|
// v -> edgeObj
|
|
this._in = {};
|
|
|
|
// u -> v -> Number
|
|
this._preds = {};
|
|
|
|
// v -> edgeObj
|
|
this._out = {};
|
|
|
|
// v -> w -> Number
|
|
this._sucs = {};
|
|
|
|
// e -> edgeObj
|
|
this._edgeObjs = {};
|
|
|
|
// e -> label
|
|
this._edgeLabels = {};
|
|
}
|
|
/* === Graph functions ========= */
|
|
isDirected() {
|
|
return this._isDirected;
|
|
}
|
|
isMultigraph() {
|
|
return this._isMultigraph;
|
|
}
|
|
isCompound() {
|
|
return this._isCompound;
|
|
}
|
|
setGraph(label) {
|
|
this._label = label;
|
|
return this;
|
|
}
|
|
graph() {
|
|
return this._label;
|
|
}
|
|
/* === Node functions ========== */
|
|
setDefaultNodeLabel(newDefault) {
|
|
if (!isFunction/* default */.Z(newDefault)) {
|
|
newDefault = constant/* default */.Z(newDefault);
|
|
}
|
|
this._defaultNodeLabelFn = newDefault;
|
|
return this;
|
|
}
|
|
nodeCount() {
|
|
return this._nodeCount;
|
|
}
|
|
nodes() {
|
|
return keys/* default */.Z(this._nodes);
|
|
}
|
|
sources() {
|
|
var self = this;
|
|
return filter/* default */.Z(this.nodes(), function (v) {
|
|
return isEmpty/* default */.Z(self._in[v]);
|
|
});
|
|
}
|
|
sinks() {
|
|
var self = this;
|
|
return filter/* default */.Z(this.nodes(), function (v) {
|
|
return isEmpty/* default */.Z(self._out[v]);
|
|
});
|
|
}
|
|
setNodes(vs, value) {
|
|
var args = arguments;
|
|
var self = this;
|
|
forEach/* default */.Z(vs, function (v) {
|
|
if (args.length > 1) {
|
|
self.setNode(v, value);
|
|
} else {
|
|
self.setNode(v);
|
|
}
|
|
});
|
|
return this;
|
|
}
|
|
setNode(v, value) {
|
|
if (has/* default */.Z(this._nodes, v)) {
|
|
if (arguments.length > 1) {
|
|
this._nodes[v] = value;
|
|
}
|
|
return this;
|
|
}
|
|
|
|
// @ts-expect-error
|
|
this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v);
|
|
if (this._isCompound) {
|
|
this._parent[v] = GRAPH_NODE;
|
|
this._children[v] = {};
|
|
this._children[GRAPH_NODE][v] = true;
|
|
}
|
|
this._in[v] = {};
|
|
this._preds[v] = {};
|
|
this._out[v] = {};
|
|
this._sucs[v] = {};
|
|
++this._nodeCount;
|
|
return this;
|
|
}
|
|
node(v) {
|
|
return this._nodes[v];
|
|
}
|
|
hasNode(v) {
|
|
return has/* default */.Z(this._nodes, v);
|
|
}
|
|
removeNode(v) {
|
|
var self = this;
|
|
if (has/* default */.Z(this._nodes, v)) {
|
|
var removeEdge = function (e) {
|
|
self.removeEdge(self._edgeObjs[e]);
|
|
};
|
|
delete this._nodes[v];
|
|
if (this._isCompound) {
|
|
this._removeFromParentsChildList(v);
|
|
delete this._parent[v];
|
|
forEach/* default */.Z(this.children(v), function (child) {
|
|
self.setParent(child);
|
|
});
|
|
delete this._children[v];
|
|
}
|
|
forEach/* default */.Z(keys/* default */.Z(this._in[v]), removeEdge);
|
|
delete this._in[v];
|
|
delete this._preds[v];
|
|
forEach/* default */.Z(keys/* default */.Z(this._out[v]), removeEdge);
|
|
delete this._out[v];
|
|
delete this._sucs[v];
|
|
--this._nodeCount;
|
|
}
|
|
return this;
|
|
}
|
|
setParent(v, parent) {
|
|
if (!this._isCompound) {
|
|
throw new Error('Cannot set parent in a non-compound graph');
|
|
}
|
|
|
|
if (isUndefined/* default */.Z(parent)) {
|
|
parent = GRAPH_NODE;
|
|
} else {
|
|
// Coerce parent to string
|
|
parent += '';
|
|
for (var ancestor = parent; !isUndefined/* default */.Z(ancestor); ancestor = this.parent(ancestor)) {
|
|
if (ancestor === v) {
|
|
throw new Error('Setting ' + parent + ' as parent of ' + v + ' would create a cycle');
|
|
}
|
|
}
|
|
|
|
this.setNode(parent);
|
|
}
|
|
|
|
this.setNode(v);
|
|
this._removeFromParentsChildList(v);
|
|
this._parent[v] = parent;
|
|
this._children[parent][v] = true;
|
|
return this;
|
|
}
|
|
_removeFromParentsChildList(v) {
|
|
delete this._children[this._parent[v]][v];
|
|
}
|
|
parent(v) {
|
|
if (this._isCompound) {
|
|
var parent = this._parent[v];
|
|
if (parent !== GRAPH_NODE) {
|
|
return parent;
|
|
}
|
|
}
|
|
}
|
|
children(v) {
|
|
if (isUndefined/* default */.Z(v)) {
|
|
v = GRAPH_NODE;
|
|
}
|
|
|
|
if (this._isCompound) {
|
|
var children = this._children[v];
|
|
if (children) {
|
|
return keys/* default */.Z(children);
|
|
}
|
|
} else if (v === GRAPH_NODE) {
|
|
return this.nodes();
|
|
} else if (this.hasNode(v)) {
|
|
return [];
|
|
}
|
|
}
|
|
predecessors(v) {
|
|
var predsV = this._preds[v];
|
|
if (predsV) {
|
|
return keys/* default */.Z(predsV);
|
|
}
|
|
}
|
|
successors(v) {
|
|
var sucsV = this._sucs[v];
|
|
if (sucsV) {
|
|
return keys/* default */.Z(sucsV);
|
|
}
|
|
}
|
|
neighbors(v) {
|
|
var preds = this.predecessors(v);
|
|
if (preds) {
|
|
return lodash_es_union(preds, this.successors(v));
|
|
}
|
|
}
|
|
isLeaf(v) {
|
|
var neighbors;
|
|
if (this.isDirected()) {
|
|
neighbors = this.successors(v);
|
|
} else {
|
|
neighbors = this.neighbors(v);
|
|
}
|
|
return neighbors.length === 0;
|
|
}
|
|
filterNodes(filter) {
|
|
// @ts-expect-error
|
|
var copy = new this.constructor({
|
|
directed: this._isDirected,
|
|
multigraph: this._isMultigraph,
|
|
compound: this._isCompound,
|
|
});
|
|
|
|
copy.setGraph(this.graph());
|
|
|
|
var self = this;
|
|
forEach/* default */.Z(this._nodes, function (value, v) {
|
|
if (filter(v)) {
|
|
copy.setNode(v, value);
|
|
}
|
|
});
|
|
|
|
forEach/* default */.Z(this._edgeObjs, function (e) {
|
|
// @ts-expect-error
|
|
if (copy.hasNode(e.v) && copy.hasNode(e.w)) {
|
|
copy.setEdge(e, self.edge(e));
|
|
}
|
|
});
|
|
|
|
var parents = {};
|
|
function findParent(v) {
|
|
var parent = self.parent(v);
|
|
if (parent === undefined || copy.hasNode(parent)) {
|
|
parents[v] = parent;
|
|
return parent;
|
|
} else if (parent in parents) {
|
|
return parents[parent];
|
|
} else {
|
|
return findParent(parent);
|
|
}
|
|
}
|
|
|
|
if (this._isCompound) {
|
|
forEach/* default */.Z(copy.nodes(), function (v) {
|
|
copy.setParent(v, findParent(v));
|
|
});
|
|
}
|
|
|
|
return copy;
|
|
}
|
|
/* === Edge functions ========== */
|
|
setDefaultEdgeLabel(newDefault) {
|
|
if (!isFunction/* default */.Z(newDefault)) {
|
|
newDefault = constant/* default */.Z(newDefault);
|
|
}
|
|
this._defaultEdgeLabelFn = newDefault;
|
|
return this;
|
|
}
|
|
edgeCount() {
|
|
return this._edgeCount;
|
|
}
|
|
edges() {
|
|
return values/* default */.Z(this._edgeObjs);
|
|
}
|
|
setPath(vs, value) {
|
|
var self = this;
|
|
var args = arguments;
|
|
reduce/* default */.Z(vs, function (v, w) {
|
|
if (args.length > 1) {
|
|
self.setEdge(v, w, value);
|
|
} else {
|
|
self.setEdge(v, w);
|
|
}
|
|
return w;
|
|
});
|
|
return this;
|
|
}
|
|
/*
|
|
* setEdge(v, w, [value, [name]])
|
|
* setEdge({ v, w, [name] }, [value])
|
|
*/
|
|
setEdge() {
|
|
var v, w, name, value;
|
|
var valueSpecified = false;
|
|
var arg0 = arguments[0];
|
|
|
|
if (typeof arg0 === 'object' && arg0 !== null && 'v' in arg0) {
|
|
v = arg0.v;
|
|
w = arg0.w;
|
|
name = arg0.name;
|
|
if (arguments.length === 2) {
|
|
value = arguments[1];
|
|
valueSpecified = true;
|
|
}
|
|
} else {
|
|
v = arg0;
|
|
w = arguments[1];
|
|
name = arguments[3];
|
|
if (arguments.length > 2) {
|
|
value = arguments[2];
|
|
valueSpecified = true;
|
|
}
|
|
}
|
|
|
|
v = '' + v;
|
|
w = '' + w;
|
|
if (!isUndefined/* default */.Z(name)) {
|
|
name = '' + name;
|
|
}
|
|
|
|
var e = edgeArgsToId(this._isDirected, v, w, name);
|
|
if (has/* default */.Z(this._edgeLabels, e)) {
|
|
if (valueSpecified) {
|
|
this._edgeLabels[e] = value;
|
|
}
|
|
return this;
|
|
}
|
|
|
|
if (!isUndefined/* default */.Z(name) && !this._isMultigraph) {
|
|
throw new Error('Cannot set a named edge when isMultigraph = false');
|
|
}
|
|
|
|
// It didn't exist, so we need to create it.
|
|
// First ensure the nodes exist.
|
|
this.setNode(v);
|
|
this.setNode(w);
|
|
|
|
// @ts-expect-error
|
|
this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name);
|
|
|
|
var edgeObj = edgeArgsToObj(this._isDirected, v, w, name);
|
|
// Ensure we add undirected edges in a consistent way.
|
|
v = edgeObj.v;
|
|
w = edgeObj.w;
|
|
|
|
Object.freeze(edgeObj);
|
|
this._edgeObjs[e] = edgeObj;
|
|
incrementOrInitEntry(this._preds[w], v);
|
|
incrementOrInitEntry(this._sucs[v], w);
|
|
this._in[w][e] = edgeObj;
|
|
this._out[v][e] = edgeObj;
|
|
this._edgeCount++;
|
|
return this;
|
|
}
|
|
edge(v, w, name) {
|
|
var e =
|
|
arguments.length === 1
|
|
? edgeObjToId(this._isDirected, arguments[0])
|
|
: edgeArgsToId(this._isDirected, v, w, name);
|
|
return this._edgeLabels[e];
|
|
}
|
|
hasEdge(v, w, name) {
|
|
var e =
|
|
arguments.length === 1
|
|
? edgeObjToId(this._isDirected, arguments[0])
|
|
: edgeArgsToId(this._isDirected, v, w, name);
|
|
return has/* default */.Z(this._edgeLabels, e);
|
|
}
|
|
removeEdge(v, w, name) {
|
|
var e =
|
|
arguments.length === 1
|
|
? edgeObjToId(this._isDirected, arguments[0])
|
|
: edgeArgsToId(this._isDirected, v, w, name);
|
|
var edge = this._edgeObjs[e];
|
|
if (edge) {
|
|
v = edge.v;
|
|
w = edge.w;
|
|
delete this._edgeLabels[e];
|
|
delete this._edgeObjs[e];
|
|
decrementOrRemoveEntry(this._preds[w], v);
|
|
decrementOrRemoveEntry(this._sucs[v], w);
|
|
delete this._in[w][e];
|
|
delete this._out[v][e];
|
|
this._edgeCount--;
|
|
}
|
|
return this;
|
|
}
|
|
inEdges(v, u) {
|
|
var inV = this._in[v];
|
|
if (inV) {
|
|
var edges = values/* default */.Z(inV);
|
|
if (!u) {
|
|
return edges;
|
|
}
|
|
return filter/* default */.Z(edges, function (edge) {
|
|
return edge.v === u;
|
|
});
|
|
}
|
|
}
|
|
outEdges(v, w) {
|
|
var outV = this._out[v];
|
|
if (outV) {
|
|
var edges = values/* default */.Z(outV);
|
|
if (!w) {
|
|
return edges;
|
|
}
|
|
return filter/* default */.Z(edges, function (edge) {
|
|
return edge.w === w;
|
|
});
|
|
}
|
|
}
|
|
nodeEdges(v, w) {
|
|
var inEdges = this.inEdges(v, w);
|
|
if (inEdges) {
|
|
return inEdges.concat(this.outEdges(v, w));
|
|
}
|
|
}
|
|
}
|
|
|
|
/* Number of nodes in the graph. Should only be changed by the implementation. */
|
|
Graph.prototype._nodeCount = 0;
|
|
|
|
/* Number of edges in the graph. Should only be changed by the implementation. */
|
|
Graph.prototype._edgeCount = 0;
|
|
|
|
function incrementOrInitEntry(map, k) {
|
|
if (map[k]) {
|
|
map[k]++;
|
|
} else {
|
|
map[k] = 1;
|
|
}
|
|
}
|
|
|
|
function decrementOrRemoveEntry(map, k) {
|
|
if (!--map[k]) {
|
|
delete map[k];
|
|
}
|
|
}
|
|
|
|
function edgeArgsToId(isDirected, v_, w_, name) {
|
|
var v = '' + v_;
|
|
var w = '' + w_;
|
|
if (!isDirected && v > w) {
|
|
var tmp = v;
|
|
v = w;
|
|
w = tmp;
|
|
}
|
|
return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (isUndefined/* default */.Z(name) ? DEFAULT_EDGE_NAME : name);
|
|
}
|
|
|
|
function edgeArgsToObj(isDirected, v_, w_, name) {
|
|
var v = '' + v_;
|
|
var w = '' + w_;
|
|
if (!isDirected && v > w) {
|
|
var tmp = v;
|
|
v = w;
|
|
w = tmp;
|
|
}
|
|
var edgeObj = { v: v, w: w };
|
|
if (name) {
|
|
edgeObj.name = name;
|
|
}
|
|
return edgeObj;
|
|
}
|
|
|
|
function edgeObjToId(isDirected, edgeObj) {
|
|
return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name);
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 45625:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ k: () => (/* reexport safe */ _graph_js__WEBPACK_IMPORTED_MODULE_0__.k)
|
|
/* harmony export */ });
|
|
/* unused harmony export version */
|
|
/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(52544);
|
|
// Includes only the "core" of graphlib
|
|
|
|
|
|
|
|
const version = '2.1.9-pre';
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 63001:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: () => (/* binding */ _SetCache)
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_MapCache.js + 14 modules
|
|
var _MapCache = __webpack_require__(37834);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheAdd.js
|
|
/** Used to stand-in for `undefined` hash values. */
|
|
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
|
|
/**
|
|
* 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;
|
|
}
|
|
|
|
/* harmony default export */ const _setCacheAdd = (setCacheAdd);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheHas.js
|
|
/**
|
|
* 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);
|
|
}
|
|
|
|
/* harmony default export */ const _setCacheHas = (setCacheHas);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_SetCache.js
|
|
|
|
|
|
|
|
|
|
/**
|
|
*
|
|
* 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/* default */.Z;
|
|
while (++index < length) {
|
|
this.add(values[index]);
|
|
}
|
|
}
|
|
|
|
// Add methods to `SetCache`.
|
|
SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd;
|
|
SetCache.prototype.has = _setCacheHas;
|
|
|
|
/* harmony default export */ const _SetCache = (SetCache);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 76579:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/**
|
|
* A specialized version of `_.forEach` for arrays without support for
|
|
* iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} [array] The array to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @returns {Array} Returns `array`.
|
|
*/
|
|
function arrayEach(array, iteratee) {
|
|
var index = -1,
|
|
length = array == null ? 0 : array.length;
|
|
|
|
while (++index < length) {
|
|
if (iteratee(array[index], index, array) === false) {
|
|
break;
|
|
}
|
|
}
|
|
return array;
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayEach);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 68774:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/**
|
|
* 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;
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayFilter);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 27679:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/**
|
|
* A specialized version of `_.map` for arrays without support for iteratee
|
|
* shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} [array] The array to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @returns {Array} Returns the new mapped array.
|
|
*/
|
|
function arrayMap(array, iteratee) {
|
|
var index = -1,
|
|
length = array == null ? 0 : array.length,
|
|
result = Array(length);
|
|
|
|
while (++index < length) {
|
|
result[index] = iteratee(array[index], index, array);
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayMap);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 58694:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/**
|
|
* 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;
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayPush);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 48451:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: () => (/* binding */ _baseClone)
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules
|
|
var _Stack = __webpack_require__(31667);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayEach.js
|
|
var _arrayEach = __webpack_require__(76579);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js
|
|
var _assignValue = __webpack_require__(72954);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_copyObject.js
|
|
var _copyObject = __webpack_require__(31899);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js
|
|
var keys = __webpack_require__(17179);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssign.js
|
|
|
|
|
|
|
|
/**
|
|
* The base implementation of `_.assign` without support for multiple sources
|
|
* or `customizer` functions.
|
|
*
|
|
* @private
|
|
* @param {Object} object The destination object.
|
|
* @param {Object} source The source object.
|
|
* @returns {Object} Returns `object`.
|
|
*/
|
|
function baseAssign(object, source) {
|
|
return object && (0,_copyObject/* default */.Z)(source, (0,keys/* default */.Z)(source), object);
|
|
}
|
|
|
|
/* harmony default export */ const _baseAssign = (baseAssign);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules
|
|
var keysIn = __webpack_require__(32957);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssignIn.js
|
|
|
|
|
|
|
|
/**
|
|
* The base implementation of `_.assignIn` without support for multiple sources
|
|
* or `customizer` functions.
|
|
*
|
|
* @private
|
|
* @param {Object} object The destination object.
|
|
* @param {Object} source The source object.
|
|
* @returns {Object} Returns `object`.
|
|
*/
|
|
function baseAssignIn(object, source) {
|
|
return object && (0,_copyObject/* default */.Z)(source, (0,keysIn/* default */.Z)(source), object);
|
|
}
|
|
|
|
/* harmony default export */ const _baseAssignIn = (baseAssignIn);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneBuffer.js
|
|
var _cloneBuffer = __webpack_require__(91050);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_copyArray.js
|
|
var _copyArray = __webpack_require__(87215);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_getSymbols.js
|
|
var _getSymbols = __webpack_require__(95695);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbols.js
|
|
|
|
|
|
|
|
/**
|
|
* Copies own symbols of `source` to `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} source The object to copy symbols from.
|
|
* @param {Object} [object={}] The object to copy symbols to.
|
|
* @returns {Object} Returns `object`.
|
|
*/
|
|
function copySymbols(source, object) {
|
|
return (0,_copyObject/* default */.Z)(source, (0,_getSymbols/* default */.Z)(source), object);
|
|
}
|
|
|
|
/* harmony default export */ const _copySymbols = (copySymbols);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js
|
|
var _arrayPush = __webpack_require__(58694);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_getPrototype.js
|
|
var _getPrototype = __webpack_require__(12513);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/stubArray.js
|
|
var stubArray = __webpack_require__(60532);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_getSymbolsIn.js
|
|
|
|
|
|
|
|
|
|
|
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
|
|
/**
|
|
* Creates an array of the own and inherited enumerable symbols of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of symbols.
|
|
*/
|
|
var getSymbolsIn = !nativeGetSymbols ? stubArray/* default */.Z : function(object) {
|
|
var result = [];
|
|
while (object) {
|
|
(0,_arrayPush/* default */.Z)(result, (0,_getSymbols/* default */.Z)(object));
|
|
object = (0,_getPrototype/* default */.Z)(object);
|
|
}
|
|
return result;
|
|
};
|
|
|
|
/* harmony default export */ const _getSymbolsIn = (getSymbolsIn);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbolsIn.js
|
|
|
|
|
|
|
|
/**
|
|
* Copies own and inherited symbols of `source` to `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} source The object to copy symbols from.
|
|
* @param {Object} [object={}] The object to copy symbols to.
|
|
* @returns {Object} Returns `object`.
|
|
*/
|
|
function copySymbolsIn(source, object) {
|
|
return (0,_copyObject/* default */.Z)(source, _getSymbolsIn(source), object);
|
|
}
|
|
|
|
/* harmony default export */ const _copySymbolsIn = (copySymbolsIn);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js
|
|
var _getAllKeys = __webpack_require__(1808);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetAllKeys.js
|
|
var _baseGetAllKeys = __webpack_require__(63327);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_getAllKeysIn.js
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Creates an array of own and inherited 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 getAllKeysIn(object) {
|
|
return (0,_baseGetAllKeys/* default */.Z)(object, keysIn/* default */.Z, _getSymbolsIn);
|
|
}
|
|
|
|
/* harmony default export */ const _getAllKeysIn = (getAllKeysIn);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules
|
|
var _getTag = __webpack_require__(83970);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneArray.js
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var _initCloneArray_hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/**
|
|
* Initializes an array clone.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to clone.
|
|
* @returns {Array} Returns the initialized clone.
|
|
*/
|
|
function initCloneArray(array) {
|
|
var length = array.length,
|
|
result = new array.constructor(length);
|
|
|
|
// Add properties assigned by `RegExp#exec`.
|
|
if (length && typeof array[0] == 'string' && _initCloneArray_hasOwnProperty.call(array, 'index')) {
|
|
result.index = array.index;
|
|
result.input = array.input;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/* harmony default export */ const _initCloneArray = (initCloneArray);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneArrayBuffer.js
|
|
var _cloneArrayBuffer = __webpack_require__(41884);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneDataView.js
|
|
|
|
|
|
/**
|
|
* Creates a clone of `dataView`.
|
|
*
|
|
* @private
|
|
* @param {Object} dataView The data view to clone.
|
|
* @param {boolean} [isDeep] Specify a deep clone.
|
|
* @returns {Object} Returns the cloned data view.
|
|
*/
|
|
function cloneDataView(dataView, isDeep) {
|
|
var buffer = isDeep ? (0,_cloneArrayBuffer/* default */.Z)(dataView.buffer) : dataView.buffer;
|
|
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
|
}
|
|
|
|
/* harmony default export */ const _cloneDataView = (cloneDataView);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneRegExp.js
|
|
/** Used to match `RegExp` flags from their coerced string values. */
|
|
var reFlags = /\w*$/;
|
|
|
|
/**
|
|
* Creates a clone of `regexp`.
|
|
*
|
|
* @private
|
|
* @param {Object} regexp The regexp to clone.
|
|
* @returns {Object} Returns the cloned regexp.
|
|
*/
|
|
function cloneRegExp(regexp) {
|
|
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
|
|
result.lastIndex = regexp.lastIndex;
|
|
return result;
|
|
}
|
|
|
|
/* harmony default export */ const _cloneRegExp = (cloneRegExp);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js
|
|
var _Symbol = __webpack_require__(17685);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneSymbol.js
|
|
|
|
|
|
/** Used to convert symbols to primitives and strings. */
|
|
var symbolProto = _Symbol/* default */.Z ? _Symbol/* default */.Z.prototype : undefined,
|
|
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
|
|
|
|
/**
|
|
* Creates a clone of the `symbol` object.
|
|
*
|
|
* @private
|
|
* @param {Object} symbol The symbol object to clone.
|
|
* @returns {Object} Returns the cloned symbol object.
|
|
*/
|
|
function cloneSymbol(symbol) {
|
|
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
|
|
}
|
|
|
|
/* harmony default export */ const _cloneSymbol = (cloneSymbol);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneTypedArray.js
|
|
var _cloneTypedArray = __webpack_require__(12701);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneByTag.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** `Object#toString` result references. */
|
|
var boolTag = '[object Boolean]',
|
|
dateTag = '[object Date]',
|
|
mapTag = '[object Map]',
|
|
numberTag = '[object Number]',
|
|
regexpTag = '[object RegExp]',
|
|
setTag = '[object Set]',
|
|
stringTag = '[object String]',
|
|
symbolTag = '[object Symbol]';
|
|
|
|
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]';
|
|
|
|
/**
|
|
* Initializes an object clone based on its `toStringTag`.
|
|
*
|
|
* **Note:** This function only supports cloning values with tags of
|
|
* `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to clone.
|
|
* @param {string} tag The `toStringTag` of the object to clone.
|
|
* @param {boolean} [isDeep] Specify a deep clone.
|
|
* @returns {Object} Returns the initialized clone.
|
|
*/
|
|
function initCloneByTag(object, tag, isDeep) {
|
|
var Ctor = object.constructor;
|
|
switch (tag) {
|
|
case arrayBufferTag:
|
|
return (0,_cloneArrayBuffer/* default */.Z)(object);
|
|
|
|
case boolTag:
|
|
case dateTag:
|
|
return new Ctor(+object);
|
|
|
|
case dataViewTag:
|
|
return _cloneDataView(object, isDeep);
|
|
|
|
case float32Tag: case float64Tag:
|
|
case int8Tag: case int16Tag: case int32Tag:
|
|
case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
|
|
return (0,_cloneTypedArray/* default */.Z)(object, isDeep);
|
|
|
|
case mapTag:
|
|
return new Ctor;
|
|
|
|
case numberTag:
|
|
case stringTag:
|
|
return new Ctor(object);
|
|
|
|
case regexpTag:
|
|
return _cloneRegExp(object);
|
|
|
|
case setTag:
|
|
return new Ctor;
|
|
|
|
case symbolTag:
|
|
return _cloneSymbol(object);
|
|
}
|
|
}
|
|
|
|
/* harmony default export */ const _initCloneByTag = (initCloneByTag);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_initCloneObject.js + 1 modules
|
|
var _initCloneObject = __webpack_require__(73658);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js
|
|
var isArray = __webpack_require__(27771);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules
|
|
var isBuffer = __webpack_require__(77008);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js
|
|
var isObjectLike = __webpack_require__(18533);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMap.js
|
|
|
|
|
|
|
|
/** `Object#toString` result references. */
|
|
var _baseIsMap_mapTag = '[object Map]';
|
|
|
|
/**
|
|
* The base implementation of `_.isMap` without Node.js optimizations.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a map, else `false`.
|
|
*/
|
|
function baseIsMap(value) {
|
|
return (0,isObjectLike/* default */.Z)(value) && (0,_getTag/* default */.Z)(value) == _baseIsMap_mapTag;
|
|
}
|
|
|
|
/* harmony default export */ const _baseIsMap = (baseIsMap);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js
|
|
var _baseUnary = __webpack_require__(21162);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_nodeUtil.js
|
|
var _nodeUtil = __webpack_require__(98351);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/isMap.js
|
|
|
|
|
|
|
|
|
|
/* Node.js helper references. */
|
|
var nodeIsMap = _nodeUtil/* default */.Z && _nodeUtil/* default */.Z.isMap;
|
|
|
|
/**
|
|
* Checks if `value` is classified as a `Map` object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.3.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a map, else `false`.
|
|
* @example
|
|
*
|
|
* _.isMap(new Map);
|
|
* // => true
|
|
*
|
|
* _.isMap(new WeakMap);
|
|
* // => false
|
|
*/
|
|
var isMap = nodeIsMap ? (0,_baseUnary/* default */.Z)(nodeIsMap) : _baseIsMap;
|
|
|
|
/* harmony default export */ const lodash_es_isMap = (isMap);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js
|
|
var isObject = __webpack_require__(77226);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsSet.js
|
|
|
|
|
|
|
|
/** `Object#toString` result references. */
|
|
var _baseIsSet_setTag = '[object Set]';
|
|
|
|
/**
|
|
* The base implementation of `_.isSet` without Node.js optimizations.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a set, else `false`.
|
|
*/
|
|
function baseIsSet(value) {
|
|
return (0,isObjectLike/* default */.Z)(value) && (0,_getTag/* default */.Z)(value) == _baseIsSet_setTag;
|
|
}
|
|
|
|
/* harmony default export */ const _baseIsSet = (baseIsSet);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/isSet.js
|
|
|
|
|
|
|
|
|
|
/* Node.js helper references. */
|
|
var nodeIsSet = _nodeUtil/* default */.Z && _nodeUtil/* default */.Z.isSet;
|
|
|
|
/**
|
|
* Checks if `value` is classified as a `Set` object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.3.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a set, else `false`.
|
|
* @example
|
|
*
|
|
* _.isSet(new Set);
|
|
* // => true
|
|
*
|
|
* _.isSet(new WeakSet);
|
|
* // => false
|
|
*/
|
|
var isSet = nodeIsSet ? (0,_baseUnary/* default */.Z)(nodeIsSet) : _baseIsSet;
|
|
|
|
/* harmony default export */ const lodash_es_isSet = (isSet);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseClone.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Used to compose bitmasks for cloning. */
|
|
var CLONE_DEEP_FLAG = 1,
|
|
CLONE_FLAT_FLAG = 2,
|
|
CLONE_SYMBOLS_FLAG = 4;
|
|
|
|
/** `Object#toString` result references. */
|
|
var argsTag = '[object Arguments]',
|
|
arrayTag = '[object Array]',
|
|
_baseClone_boolTag = '[object Boolean]',
|
|
_baseClone_dateTag = '[object Date]',
|
|
errorTag = '[object Error]',
|
|
funcTag = '[object Function]',
|
|
genTag = '[object GeneratorFunction]',
|
|
_baseClone_mapTag = '[object Map]',
|
|
_baseClone_numberTag = '[object Number]',
|
|
objectTag = '[object Object]',
|
|
_baseClone_regexpTag = '[object RegExp]',
|
|
_baseClone_setTag = '[object Set]',
|
|
_baseClone_stringTag = '[object String]',
|
|
_baseClone_symbolTag = '[object Symbol]',
|
|
weakMapTag = '[object WeakMap]';
|
|
|
|
var _baseClone_arrayBufferTag = '[object ArrayBuffer]',
|
|
_baseClone_dataViewTag = '[object DataView]',
|
|
_baseClone_float32Tag = '[object Float32Array]',
|
|
_baseClone_float64Tag = '[object Float64Array]',
|
|
_baseClone_int8Tag = '[object Int8Array]',
|
|
_baseClone_int16Tag = '[object Int16Array]',
|
|
_baseClone_int32Tag = '[object Int32Array]',
|
|
_baseClone_uint8Tag = '[object Uint8Array]',
|
|
_baseClone_uint8ClampedTag = '[object Uint8ClampedArray]',
|
|
_baseClone_uint16Tag = '[object Uint16Array]',
|
|
_baseClone_uint32Tag = '[object Uint32Array]';
|
|
|
|
/** Used to identify `toStringTag` values supported by `_.clone`. */
|
|
var cloneableTags = {};
|
|
cloneableTags[argsTag] = cloneableTags[arrayTag] =
|
|
cloneableTags[_baseClone_arrayBufferTag] = cloneableTags[_baseClone_dataViewTag] =
|
|
cloneableTags[_baseClone_boolTag] = cloneableTags[_baseClone_dateTag] =
|
|
cloneableTags[_baseClone_float32Tag] = cloneableTags[_baseClone_float64Tag] =
|
|
cloneableTags[_baseClone_int8Tag] = cloneableTags[_baseClone_int16Tag] =
|
|
cloneableTags[_baseClone_int32Tag] = cloneableTags[_baseClone_mapTag] =
|
|
cloneableTags[_baseClone_numberTag] = cloneableTags[objectTag] =
|
|
cloneableTags[_baseClone_regexpTag] = cloneableTags[_baseClone_setTag] =
|
|
cloneableTags[_baseClone_stringTag] = cloneableTags[_baseClone_symbolTag] =
|
|
cloneableTags[_baseClone_uint8Tag] = cloneableTags[_baseClone_uint8ClampedTag] =
|
|
cloneableTags[_baseClone_uint16Tag] = cloneableTags[_baseClone_uint32Tag] = true;
|
|
cloneableTags[errorTag] = cloneableTags[funcTag] =
|
|
cloneableTags[weakMapTag] = false;
|
|
|
|
/**
|
|
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
|
|
* traversed objects.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to clone.
|
|
* @param {boolean} bitmask The bitmask flags.
|
|
* 1 - Deep clone
|
|
* 2 - Flatten inherited properties
|
|
* 4 - Clone symbols
|
|
* @param {Function} [customizer] The function to customize cloning.
|
|
* @param {string} [key] The key of `value`.
|
|
* @param {Object} [object] The parent object of `value`.
|
|
* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
|
|
* @returns {*} Returns the cloned value.
|
|
*/
|
|
function baseClone(value, bitmask, customizer, key, object, stack) {
|
|
var result,
|
|
isDeep = bitmask & CLONE_DEEP_FLAG,
|
|
isFlat = bitmask & CLONE_FLAT_FLAG,
|
|
isFull = bitmask & CLONE_SYMBOLS_FLAG;
|
|
|
|
if (customizer) {
|
|
result = object ? customizer(value, key, object, stack) : customizer(value);
|
|
}
|
|
if (result !== undefined) {
|
|
return result;
|
|
}
|
|
if (!(0,isObject/* default */.Z)(value)) {
|
|
return value;
|
|
}
|
|
var isArr = (0,isArray/* default */.Z)(value);
|
|
if (isArr) {
|
|
result = _initCloneArray(value);
|
|
if (!isDeep) {
|
|
return (0,_copyArray/* default */.Z)(value, result);
|
|
}
|
|
} else {
|
|
var tag = (0,_getTag/* default */.Z)(value),
|
|
isFunc = tag == funcTag || tag == genTag;
|
|
|
|
if ((0,isBuffer/* default */.Z)(value)) {
|
|
return (0,_cloneBuffer/* default */.Z)(value, isDeep);
|
|
}
|
|
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
|
|
result = (isFlat || isFunc) ? {} : (0,_initCloneObject/* default */.Z)(value);
|
|
if (!isDeep) {
|
|
return isFlat
|
|
? _copySymbolsIn(value, _baseAssignIn(result, value))
|
|
: _copySymbols(value, _baseAssign(result, value));
|
|
}
|
|
} else {
|
|
if (!cloneableTags[tag]) {
|
|
return object ? value : {};
|
|
}
|
|
result = _initCloneByTag(value, tag, isDeep);
|
|
}
|
|
}
|
|
// Check for circular references and return its corresponding clone.
|
|
stack || (stack = new _Stack/* default */.Z);
|
|
var stacked = stack.get(value);
|
|
if (stacked) {
|
|
return stacked;
|
|
}
|
|
stack.set(value, result);
|
|
|
|
if (lodash_es_isSet(value)) {
|
|
value.forEach(function(subValue) {
|
|
result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
|
|
});
|
|
} else if (lodash_es_isMap(value)) {
|
|
value.forEach(function(subValue, key) {
|
|
result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
|
|
});
|
|
}
|
|
|
|
var keysFunc = isFull
|
|
? (isFlat ? _getAllKeysIn : _getAllKeys/* default */.Z)
|
|
: (isFlat ? keysIn/* default */.Z : keys/* default */.Z);
|
|
|
|
var props = isArr ? undefined : keysFunc(value);
|
|
(0,_arrayEach/* default */.Z)(props || value, function(subValue, key) {
|
|
if (props) {
|
|
key = subValue;
|
|
subValue = value[key];
|
|
}
|
|
// Recursively populate clone (susceptible to call stack limits).
|
|
(0,_assignValue/* default */.Z)(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
|
|
});
|
|
return result;
|
|
}
|
|
|
|
/* harmony default export */ const _baseClone = (baseClone);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 49811:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: () => (/* binding */ _baseEach)
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js
|
|
var _baseForOwn = __webpack_require__(2693);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js
|
|
var isArrayLike = __webpack_require__(50585);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_createBaseEach.js
|
|
|
|
|
|
/**
|
|
* Creates a `baseEach` or `baseEachRight` function.
|
|
*
|
|
* @private
|
|
* @param {Function} eachFunc The function to iterate over a collection.
|
|
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
* @returns {Function} Returns the new base function.
|
|
*/
|
|
function createBaseEach(eachFunc, fromRight) {
|
|
return function(collection, iteratee) {
|
|
if (collection == null) {
|
|
return collection;
|
|
}
|
|
if (!(0,isArrayLike/* default */.Z)(collection)) {
|
|
return eachFunc(collection, iteratee);
|
|
}
|
|
var length = collection.length,
|
|
index = fromRight ? length : -1,
|
|
iterable = Object(collection);
|
|
|
|
while ((fromRight ? index-- : ++index < length)) {
|
|
if (iteratee(iterable[index], index, iterable) === false) {
|
|
break;
|
|
}
|
|
}
|
|
return collection;
|
|
};
|
|
}
|
|
|
|
/* harmony default export */ const _createBaseEach = (createBaseEach);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseEach.js
|
|
|
|
|
|
|
|
/**
|
|
* The base implementation of `_.forEach` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @returns {Array|Object} Returns `collection`.
|
|
*/
|
|
var baseEach = _createBaseEach(_baseForOwn/* default */.Z);
|
|
|
|
/* harmony default export */ const _baseEach = (baseEach);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 21692:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/**
|
|
* The base implementation of `_.findIndex` and `_.findLastIndex` without
|
|
* support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to inspect.
|
|
* @param {Function} predicate The function invoked per iteration.
|
|
* @param {number} fromIndex The index to search from.
|
|
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
*/
|
|
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|
var length = array.length,
|
|
index = fromIndex + (fromRight ? 1 : -1);
|
|
|
|
while ((fromRight ? index-- : ++index < length)) {
|
|
if (predicate(array[index], index, array)) {
|
|
return index;
|
|
}
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseFindIndex);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 10626:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: () => (/* binding */ _baseFlatten)
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js
|
|
var _arrayPush = __webpack_require__(58694);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js
|
|
var _Symbol = __webpack_require__(17685);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isArguments.js + 1 modules
|
|
var isArguments = __webpack_require__(29169);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js
|
|
var isArray = __webpack_require__(27771);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_isFlattenable.js
|
|
|
|
|
|
|
|
|
|
/** Built-in value references. */
|
|
var spreadableSymbol = _Symbol/* default */.Z ? _Symbol/* default */.Z.isConcatSpreadable : undefined;
|
|
|
|
/**
|
|
* Checks if `value` is a flattenable `arguments` object or array.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
|
|
*/
|
|
function isFlattenable(value) {
|
|
return (0,isArray/* default */.Z)(value) || (0,isArguments/* default */.Z)(value) ||
|
|
!!(spreadableSymbol && value && value[spreadableSymbol]);
|
|
}
|
|
|
|
/* harmony default export */ const _isFlattenable = (isFlattenable);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFlatten.js
|
|
|
|
|
|
|
|
/**
|
|
* The base implementation of `_.flatten` with support for restricting flattening.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to flatten.
|
|
* @param {number} depth The maximum recursion depth.
|
|
* @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
|
|
* @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
|
|
* @param {Array} [result=[]] The initial result value.
|
|
* @returns {Array} Returns the new flattened array.
|
|
*/
|
|
function baseFlatten(array, depth, predicate, isStrict, result) {
|
|
var index = -1,
|
|
length = array.length;
|
|
|
|
predicate || (predicate = _isFlattenable);
|
|
result || (result = []);
|
|
|
|
while (++index < length) {
|
|
var value = array[index];
|
|
if (depth > 0 && predicate(value)) {
|
|
if (depth > 1) {
|
|
// Recursively flatten arrays (susceptible to call stack limits).
|
|
baseFlatten(value, depth - 1, predicate, isStrict, result);
|
|
} else {
|
|
(0,_arrayPush/* default */.Z)(result, value);
|
|
}
|
|
} else if (!isStrict) {
|
|
result[result.length] = value;
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/* harmony default export */ const _baseFlatten = (baseFlatten);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 2693:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _baseFor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(61395);
|
|
/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17179);
|
|
|
|
|
|
|
|
/**
|
|
* The base implementation of `_.forOwn` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @returns {Object} Returns `object`.
|
|
*/
|
|
function baseForOwn(object, iteratee) {
|
|
return object && (0,_baseFor_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(object, iteratee, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z);
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseForOwn);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 13317:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22823);
|
|
/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(62281);
|
|
|
|
|
|
|
|
/**
|
|
* The base implementation of `_.get` without support for default values.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @param {Array|string} path The path of the property to get.
|
|
* @returns {*} Returns the resolved value.
|
|
*/
|
|
function baseGet(object, path) {
|
|
path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(path, object);
|
|
|
|
var index = 0,
|
|
length = path.length;
|
|
|
|
while (object != null && index < length) {
|
|
object = object[(0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(path[index++])];
|
|
}
|
|
return (index && index == length) ? object : undefined;
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGet);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 63327:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _arrayPush_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58694);
|
|
/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27771);
|
|
|
|
|
|
|
|
/**
|
|
* 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 (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(object) ? result : (0,_arrayPush_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(result, symbolsFunc(object));
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGetAllKeys);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 74765:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: () => (/* binding */ _baseIteratee)
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules
|
|
var _Stack = __webpack_require__(31667);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules
|
|
var _SetCache = __webpack_require__(63001);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_arraySome.js
|
|
/**
|
|
* 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;
|
|
}
|
|
|
|
/* harmony default export */ const _arraySome = (arraySome);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js
|
|
var _cacheHas = __webpack_require__(59548);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalArrays.js
|
|
|
|
|
|
|
|
|
|
/** Used to compose bitmasks for value comparisons. */
|
|
var COMPARE_PARTIAL_FLAG = 1,
|
|
COMPARE_UNORDERED_FLAG = 2;
|
|
|
|
/**
|
|
* 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;
|
|
}
|
|
// Check that cyclic values are equal.
|
|
var arrStacked = stack.get(array);
|
|
var othStacked = stack.get(other);
|
|
if (arrStacked && othStacked) {
|
|
return arrStacked == other && othStacked == array;
|
|
}
|
|
var index = -1,
|
|
result = true,
|
|
seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new _SetCache/* default */.Z : 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 (!(0,_cacheHas/* default */.Z)(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;
|
|
}
|
|
|
|
/* harmony default export */ const _equalArrays = (equalArrays);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js
|
|
var _Symbol = __webpack_require__(17685);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_Uint8Array.js
|
|
var _Uint8Array = __webpack_require__(84073);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/eq.js
|
|
var eq = __webpack_require__(79651);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_mapToArray.js
|
|
/**
|
|
* 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;
|
|
}
|
|
|
|
/* harmony default export */ const _mapToArray = (mapToArray);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js
|
|
var _setToArray = __webpack_require__(6545);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalByTag.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Used to compose bitmasks for value comparisons. */
|
|
var _equalByTag_COMPARE_PARTIAL_FLAG = 1,
|
|
_equalByTag_COMPARE_UNORDERED_FLAG = 2;
|
|
|
|
/** `Object#toString` result references. */
|
|
var boolTag = '[object Boolean]',
|
|
dateTag = '[object Date]',
|
|
errorTag = '[object Error]',
|
|
mapTag = '[object Map]',
|
|
numberTag = '[object Number]',
|
|
regexpTag = '[object RegExp]',
|
|
setTag = '[object Set]',
|
|
stringTag = '[object String]',
|
|
symbolTag = '[object Symbol]';
|
|
|
|
var arrayBufferTag = '[object ArrayBuffer]',
|
|
dataViewTag = '[object DataView]';
|
|
|
|
/** Used to convert symbols to primitives and strings. */
|
|
var symbolProto = _Symbol/* default */.Z ? _Symbol/* default */.Z.prototype : undefined,
|
|
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
|
|
|
|
/**
|
|
* 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/* default */.Z(object), new _Uint8Array/* default */.Z(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 (0,eq/* default */.Z)(+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 & _equalByTag_COMPARE_PARTIAL_FLAG;
|
|
convert || (convert = _setToArray/* default */.Z);
|
|
|
|
if (object.size != other.size && !isPartial) {
|
|
return false;
|
|
}
|
|
// Assume cyclic values are equal.
|
|
var stacked = stack.get(object);
|
|
if (stacked) {
|
|
return stacked == other;
|
|
}
|
|
bitmask |= _equalByTag_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;
|
|
}
|
|
|
|
/* harmony default export */ const _equalByTag = (equalByTag);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js
|
|
var _getAllKeys = __webpack_require__(1808);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalObjects.js
|
|
|
|
|
|
/** Used to compose bitmasks for value comparisons. */
|
|
var _equalObjects_COMPARE_PARTIAL_FLAG = 1;
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var _equalObjects_hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/**
|
|
* 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 & _equalObjects_COMPARE_PARTIAL_FLAG,
|
|
objProps = (0,_getAllKeys/* default */.Z)(object),
|
|
objLength = objProps.length,
|
|
othProps = (0,_getAllKeys/* default */.Z)(other),
|
|
othLength = othProps.length;
|
|
|
|
if (objLength != othLength && !isPartial) {
|
|
return false;
|
|
}
|
|
var index = objLength;
|
|
while (index--) {
|
|
var key = objProps[index];
|
|
if (!(isPartial ? key in other : _equalObjects_hasOwnProperty.call(other, key))) {
|
|
return false;
|
|
}
|
|
}
|
|
// Check that cyclic values are equal.
|
|
var objStacked = stack.get(object);
|
|
var othStacked = stack.get(other);
|
|
if (objStacked && othStacked) {
|
|
return objStacked == other && othStacked == object;
|
|
}
|
|
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;
|
|
}
|
|
|
|
/* harmony default export */ const _equalObjects = (equalObjects);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules
|
|
var _getTag = __webpack_require__(83970);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js
|
|
var isArray = __webpack_require__(27771);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules
|
|
var isBuffer = __webpack_require__(77008);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isTypedArray.js + 1 modules
|
|
var isTypedArray = __webpack_require__(18843);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqualDeep.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Used to compose bitmasks for value comparisons. */
|
|
var _baseIsEqualDeep_COMPARE_PARTIAL_FLAG = 1;
|
|
|
|
/** `Object#toString` result references. */
|
|
var argsTag = '[object Arguments]',
|
|
arrayTag = '[object Array]',
|
|
objectTag = '[object Object]';
|
|
|
|
/** Used for built-in method references. */
|
|
var _baseIsEqualDeep_objectProto = Object.prototype;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var _baseIsEqualDeep_hasOwnProperty = _baseIsEqualDeep_objectProto.hasOwnProperty;
|
|
|
|
/**
|
|
* 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 = (0,isArray/* default */.Z)(object),
|
|
othIsArr = (0,isArray/* default */.Z)(other),
|
|
objTag = objIsArr ? arrayTag : (0,_getTag/* default */.Z)(object),
|
|
othTag = othIsArr ? arrayTag : (0,_getTag/* default */.Z)(other);
|
|
|
|
objTag = objTag == argsTag ? objectTag : objTag;
|
|
othTag = othTag == argsTag ? objectTag : othTag;
|
|
|
|
var objIsObj = objTag == objectTag,
|
|
othIsObj = othTag == objectTag,
|
|
isSameTag = objTag == othTag;
|
|
|
|
if (isSameTag && (0,isBuffer/* default */.Z)(object)) {
|
|
if (!(0,isBuffer/* default */.Z)(other)) {
|
|
return false;
|
|
}
|
|
objIsArr = true;
|
|
objIsObj = false;
|
|
}
|
|
if (isSameTag && !objIsObj) {
|
|
stack || (stack = new _Stack/* default */.Z);
|
|
return (objIsArr || (0,isTypedArray/* default */.Z)(object))
|
|
? _equalArrays(object, other, bitmask, customizer, equalFunc, stack)
|
|
: _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
}
|
|
if (!(bitmask & _baseIsEqualDeep_COMPARE_PARTIAL_FLAG)) {
|
|
var objIsWrapped = objIsObj && _baseIsEqualDeep_hasOwnProperty.call(object, '__wrapped__'),
|
|
othIsWrapped = othIsObj && _baseIsEqualDeep_hasOwnProperty.call(other, '__wrapped__');
|
|
|
|
if (objIsWrapped || othIsWrapped) {
|
|
var objUnwrapped = objIsWrapped ? object.value() : object,
|
|
othUnwrapped = othIsWrapped ? other.value() : other;
|
|
|
|
stack || (stack = new _Stack/* default */.Z);
|
|
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
|
}
|
|
}
|
|
if (!isSameTag) {
|
|
return false;
|
|
}
|
|
stack || (stack = new _Stack/* default */.Z);
|
|
return _equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
|
}
|
|
|
|
/* harmony default export */ const _baseIsEqualDeep = (baseIsEqualDeep);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js
|
|
var isObjectLike = __webpack_require__(18533);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqual.js
|
|
|
|
|
|
|
|
/**
|
|
* 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 || (!(0,isObjectLike/* default */.Z)(value) && !(0,isObjectLike/* default */.Z)(other))) {
|
|
return value !== value && other !== other;
|
|
}
|
|
return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
|
|
}
|
|
|
|
/* harmony default export */ const _baseIsEqual = (baseIsEqual);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMatch.js
|
|
|
|
|
|
|
|
/** Used to compose bitmasks for value comparisons. */
|
|
var _baseIsMatch_COMPARE_PARTIAL_FLAG = 1,
|
|
_baseIsMatch_COMPARE_UNORDERED_FLAG = 2;
|
|
|
|
/**
|
|
* The base implementation of `_.isMatch` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to inspect.
|
|
* @param {Object} source The object of property values to match.
|
|
* @param {Array} matchData The property names, values, and compare flags to match.
|
|
* @param {Function} [customizer] The function to customize comparisons.
|
|
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
|
|
*/
|
|
function baseIsMatch(object, source, matchData, customizer) {
|
|
var index = matchData.length,
|
|
length = index,
|
|
noCustomizer = !customizer;
|
|
|
|
if (object == null) {
|
|
return !length;
|
|
}
|
|
object = Object(object);
|
|
while (index--) {
|
|
var data = matchData[index];
|
|
if ((noCustomizer && data[2])
|
|
? data[1] !== object[data[0]]
|
|
: !(data[0] in object)
|
|
) {
|
|
return false;
|
|
}
|
|
}
|
|
while (++index < length) {
|
|
data = matchData[index];
|
|
var key = data[0],
|
|
objValue = object[key],
|
|
srcValue = data[1];
|
|
|
|
if (noCustomizer && data[2]) {
|
|
if (objValue === undefined && !(key in object)) {
|
|
return false;
|
|
}
|
|
} else {
|
|
var stack = new _Stack/* default */.Z;
|
|
if (customizer) {
|
|
var result = customizer(objValue, srcValue, key, object, source, stack);
|
|
}
|
|
if (!(result === undefined
|
|
? _baseIsEqual(srcValue, objValue, _baseIsMatch_COMPARE_PARTIAL_FLAG | _baseIsMatch_COMPARE_UNORDERED_FLAG, customizer, stack)
|
|
: result
|
|
)) {
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
/* harmony default export */ const _baseIsMatch = (baseIsMatch);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js
|
|
var isObject = __webpack_require__(77226);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_isStrictComparable.js
|
|
|
|
|
|
/**
|
|
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` if suitable for strict
|
|
* equality comparisons, else `false`.
|
|
*/
|
|
function isStrictComparable(value) {
|
|
return value === value && !(0,isObject/* default */.Z)(value);
|
|
}
|
|
|
|
/* harmony default export */ const _isStrictComparable = (isStrictComparable);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js
|
|
var keys = __webpack_require__(17179);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_getMatchData.js
|
|
|
|
|
|
|
|
/**
|
|
* Gets the property names, values, and compare flags of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the match data of `object`.
|
|
*/
|
|
function getMatchData(object) {
|
|
var result = (0,keys/* default */.Z)(object),
|
|
length = result.length;
|
|
|
|
while (length--) {
|
|
var key = result[length],
|
|
value = object[key];
|
|
|
|
result[length] = [key, value, _isStrictComparable(value)];
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/* harmony default export */ const _getMatchData = (getMatchData);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_matchesStrictComparable.js
|
|
/**
|
|
* A specialized version of `matchesProperty` for source values suitable
|
|
* for strict equality comparisons, i.e. `===`.
|
|
*
|
|
* @private
|
|
* @param {string} key The key of the property to get.
|
|
* @param {*} srcValue The value to match.
|
|
* @returns {Function} Returns the new spec function.
|
|
*/
|
|
function matchesStrictComparable(key, srcValue) {
|
|
return function(object) {
|
|
if (object == null) {
|
|
return false;
|
|
}
|
|
return object[key] === srcValue &&
|
|
(srcValue !== undefined || (key in Object(object)));
|
|
};
|
|
}
|
|
|
|
/* harmony default export */ const _matchesStrictComparable = (matchesStrictComparable);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatches.js
|
|
|
|
|
|
|
|
|
|
/**
|
|
* The base implementation of `_.matches` which doesn't clone `source`.
|
|
*
|
|
* @private
|
|
* @param {Object} source The object of property values to match.
|
|
* @returns {Function} Returns the new spec function.
|
|
*/
|
|
function baseMatches(source) {
|
|
var matchData = _getMatchData(source);
|
|
if (matchData.length == 1 && matchData[0][2]) {
|
|
return _matchesStrictComparable(matchData[0][0], matchData[0][1]);
|
|
}
|
|
return function(object) {
|
|
return object === source || _baseIsMatch(object, source, matchData);
|
|
};
|
|
}
|
|
|
|
/* harmony default export */ const _baseMatches = (baseMatches);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js
|
|
var _baseGet = __webpack_require__(13317);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/get.js
|
|
|
|
|
|
/**
|
|
* Gets the value at `path` of `object`. If the resolved value is
|
|
* `undefined`, the `defaultValue` is returned in its place.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.7.0
|
|
* @category Object
|
|
* @param {Object} object The object to query.
|
|
* @param {Array|string} path The path of the property to get.
|
|
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
|
|
* @returns {*} Returns the resolved value.
|
|
* @example
|
|
*
|
|
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
|
*
|
|
* _.get(object, 'a[0].b.c');
|
|
* // => 3
|
|
*
|
|
* _.get(object, ['a', '0', 'b', 'c']);
|
|
* // => 3
|
|
*
|
|
* _.get(object, 'a.b.c', 'default');
|
|
* // => 'default'
|
|
*/
|
|
function get(object, path, defaultValue) {
|
|
var result = object == null ? undefined : (0,_baseGet/* default */.Z)(object, path);
|
|
return result === undefined ? defaultValue : result;
|
|
}
|
|
|
|
/* harmony default export */ const lodash_es_get = (get);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules
|
|
var hasIn = __webpack_require__(75487);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js
|
|
var _isKey = __webpack_require__(99365);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js
|
|
var _toKey = __webpack_require__(62281);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatchesProperty.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Used to compose bitmasks for value comparisons. */
|
|
var _baseMatchesProperty_COMPARE_PARTIAL_FLAG = 1,
|
|
_baseMatchesProperty_COMPARE_UNORDERED_FLAG = 2;
|
|
|
|
/**
|
|
* The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
|
|
*
|
|
* @private
|
|
* @param {string} path The path of the property to get.
|
|
* @param {*} srcValue The value to match.
|
|
* @returns {Function} Returns the new spec function.
|
|
*/
|
|
function baseMatchesProperty(path, srcValue) {
|
|
if ((0,_isKey/* default */.Z)(path) && _isStrictComparable(srcValue)) {
|
|
return _matchesStrictComparable((0,_toKey/* default */.Z)(path), srcValue);
|
|
}
|
|
return function(object) {
|
|
var objValue = lodash_es_get(object, path);
|
|
return (objValue === undefined && objValue === srcValue)
|
|
? (0,hasIn/* default */.Z)(object, path)
|
|
: _baseIsEqual(srcValue, objValue, _baseMatchesProperty_COMPARE_PARTIAL_FLAG | _baseMatchesProperty_COMPARE_UNORDERED_FLAG);
|
|
};
|
|
}
|
|
|
|
/* harmony default export */ const _baseMatchesProperty = (baseMatchesProperty);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js
|
|
var identity = __webpack_require__(69203);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js
|
|
var _baseProperty = __webpack_require__(54193);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePropertyDeep.js
|
|
|
|
|
|
/**
|
|
* A specialized version of `baseProperty` which supports deep paths.
|
|
*
|
|
* @private
|
|
* @param {Array|string} path The path of the property to get.
|
|
* @returns {Function} Returns the new accessor function.
|
|
*/
|
|
function basePropertyDeep(path) {
|
|
return function(object) {
|
|
return (0,_baseGet/* default */.Z)(object, path);
|
|
};
|
|
}
|
|
|
|
/* harmony default export */ const _basePropertyDeep = (basePropertyDeep);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/property.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Creates a function that returns the value at `path` of a given object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 2.4.0
|
|
* @category Util
|
|
* @param {Array|string} path The path of the property to get.
|
|
* @returns {Function} Returns the new accessor function.
|
|
* @example
|
|
*
|
|
* var objects = [
|
|
* { 'a': { 'b': 2 } },
|
|
* { 'a': { 'b': 1 } }
|
|
* ];
|
|
*
|
|
* _.map(objects, _.property('a.b'));
|
|
* // => [2, 1]
|
|
*
|
|
* _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
|
|
* // => [1, 2]
|
|
*/
|
|
function property(path) {
|
|
return (0,_isKey/* default */.Z)(path) ? (0,_baseProperty/* default */.Z)((0,_toKey/* default */.Z)(path)) : _basePropertyDeep(path);
|
|
}
|
|
|
|
/* harmony default export */ const lodash_es_property = (property);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIteratee.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* The base implementation of `_.iteratee`.
|
|
*
|
|
* @private
|
|
* @param {*} [value=_.identity] The value to convert to an iteratee.
|
|
* @returns {Function} Returns the iteratee.
|
|
*/
|
|
function baseIteratee(value) {
|
|
// Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
|
|
// See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
|
|
if (typeof value == 'function') {
|
|
return value;
|
|
}
|
|
if (value == null) {
|
|
return identity/* default */.Z;
|
|
}
|
|
if (typeof value == 'object') {
|
|
return (0,isArray/* default */.Z)(value)
|
|
? _baseMatchesProperty(value[0], value[1])
|
|
: _baseMatches(value);
|
|
}
|
|
return lodash_es_property(value);
|
|
}
|
|
|
|
/* harmony default export */ const _baseIteratee = (baseIteratee);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 21018:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49811);
|
|
/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50585);
|
|
|
|
|
|
|
|
/**
|
|
* The base implementation of `_.map` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @returns {Array} Returns the new mapped array.
|
|
*/
|
|
function baseMap(collection, iteratee) {
|
|
var index = -1,
|
|
result = (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(collection) ? Array(collection.length) : [];
|
|
|
|
(0,_baseEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(collection, function(value, key, collection) {
|
|
result[++index] = iteratee(value, key, collection);
|
|
});
|
|
return result;
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseMap);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 54193:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/**
|
|
* The base implementation of `_.property` without support for deep paths.
|
|
*
|
|
* @private
|
|
* @param {string} key The key of the property to get.
|
|
* @returns {Function} Returns the new accessor function.
|
|
*/
|
|
function baseProperty(key) {
|
|
return function(object) {
|
|
return object == null ? undefined : object[key];
|
|
};
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseProperty);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 59548:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/**
|
|
* 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);
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cacheHas);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 68882:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(69203);
|
|
|
|
|
|
/**
|
|
* Casts `value` to `identity` if it's not a function.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to inspect.
|
|
* @returns {Function} Returns cast function.
|
|
*/
|
|
function castFunction(value) {
|
|
return typeof value == 'function' ? value : _identity_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z;
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (castFunction);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 22823:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: () => (/* binding */ _castPath)
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js
|
|
var isArray = __webpack_require__(27771);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js
|
|
var _isKey = __webpack_require__(99365);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/memoize.js
|
|
var memoize = __webpack_require__(42454);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_memoizeCapped.js
|
|
|
|
|
|
/** Used as the maximum memoize cache size. */
|
|
var MAX_MEMOIZE_SIZE = 500;
|
|
|
|
/**
|
|
* A specialized version of `_.memoize` which clears the memoized function's
|
|
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to have its output memoized.
|
|
* @returns {Function} Returns the new memoized function.
|
|
*/
|
|
function memoizeCapped(func) {
|
|
var result = (0,memoize/* default */.Z)(func, function(key) {
|
|
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
cache.clear();
|
|
}
|
|
return key;
|
|
});
|
|
|
|
var cache = result.cache;
|
|
return result;
|
|
}
|
|
|
|
/* harmony default export */ const _memoizeCapped = (memoizeCapped);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringToPath.js
|
|
|
|
|
|
/** Used to match property names within property paths. */
|
|
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
|
|
/** Used to match backslashes in property paths. */
|
|
var reEscapeChar = /\\(\\)?/g;
|
|
|
|
/**
|
|
* Converts `string` to a property path array.
|
|
*
|
|
* @private
|
|
* @param {string} string The string to convert.
|
|
* @returns {Array} Returns the property path array.
|
|
*/
|
|
var stringToPath = _memoizeCapped(function(string) {
|
|
var result = [];
|
|
if (string.charCodeAt(0) === 46 /* . */) {
|
|
result.push('');
|
|
}
|
|
string.replace(rePropName, function(match, number, quote, subString) {
|
|
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
|
});
|
|
return result;
|
|
});
|
|
|
|
/* harmony default export */ const _stringToPath = (stringToPath);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/toString.js + 1 modules
|
|
var lodash_es_toString = __webpack_require__(50751);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_castPath.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Casts `value` to a path array if it's not one.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to inspect.
|
|
* @param {Object} [object] The object to query keys on.
|
|
* @returns {Array} Returns the cast property path array.
|
|
*/
|
|
function castPath(value, object) {
|
|
if ((0,isArray/* default */.Z)(value)) {
|
|
return value;
|
|
}
|
|
return (0,_isKey/* default */.Z)(value, object) ? [value] : _stringToPath((0,lodash_es_toString/* default */.Z)(value));
|
|
}
|
|
|
|
/* harmony default export */ const _castPath = (castPath);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 1808:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63327);
|
|
/* harmony import */ var _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95695);
|
|
/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17179);
|
|
|
|
|
|
|
|
|
|
/**
|
|
* 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 (0,_baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(object, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z);
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getAllKeys);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 95695:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68774);
|
|
/* harmony import */ var _stubArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(60532);
|
|
|
|
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Built-in value references. */
|
|
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
|
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
|
|
/**
|
|
* 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_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z : function(object) {
|
|
if (object == null) {
|
|
return [];
|
|
}
|
|
object = Object(object);
|
|
return (0,_arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(nativeGetSymbols(object), function(symbol) {
|
|
return propertyIsEnumerable.call(object, symbol);
|
|
});
|
|
};
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getSymbols);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 16174:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22823);
|
|
/* harmony import */ var _isArguments_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(29169);
|
|
/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(27771);
|
|
/* harmony import */ var _isIndex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(56009);
|
|
/* harmony import */ var _isLength_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1656);
|
|
/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(62281);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Checks if `path` exists on `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @param {Array|string} path The path to check.
|
|
* @param {Function} hasFunc The function to check properties.
|
|
* @returns {boolean} Returns `true` if `path` exists, else `false`.
|
|
*/
|
|
function hasPath(object, path, hasFunc) {
|
|
path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(path, object);
|
|
|
|
var index = -1,
|
|
length = path.length,
|
|
result = false;
|
|
|
|
while (++index < length) {
|
|
var key = (0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(path[index]);
|
|
if (!(result = object != null && hasFunc(object, key))) {
|
|
break;
|
|
}
|
|
object = object[key];
|
|
}
|
|
if (result || ++index != length) {
|
|
return result;
|
|
}
|
|
length = object == null ? 0 : object.length;
|
|
return !!length && (0,_isLength_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(length) && (0,_isIndex_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(key, length) &&
|
|
((0,_isArray_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)(object) || (0,_isArguments_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)(object));
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hasPath);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 99365:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27771);
|
|
/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72714);
|
|
|
|
|
|
|
|
/** Used to match property names within property paths. */
|
|
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
reIsPlainProp = /^\w*$/;
|
|
|
|
/**
|
|
* Checks if `value` is a property name and not a property path.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @param {Object} [object] The object to query keys on.
|
|
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
*/
|
|
function isKey(value, object) {
|
|
if ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(value)) {
|
|
return false;
|
|
}
|
|
var type = typeof value;
|
|
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
|
value == null || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(value)) {
|
|
return true;
|
|
}
|
|
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
|
(object != null && value in Object(object));
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isKey);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 6545:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/**
|
|
* 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;
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setToArray);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 62281:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72714);
|
|
|
|
|
|
/** Used as references for various `Number` constants. */
|
|
var INFINITY = 1 / 0;
|
|
|
|
/**
|
|
* Converts `value` to a string key if it's not a string or symbol.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to inspect.
|
|
* @returns {string|symbol} Returns the key.
|
|
*/
|
|
function toKey(value) {
|
|
if (typeof value == 'string' || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(value)) {
|
|
return value;
|
|
}
|
|
var result = (value + '');
|
|
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toKey);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 3688:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _baseRest_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(69581);
|
|
/* harmony import */ var _eq_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(79651);
|
|
/* harmony import */ var _isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50439);
|
|
/* harmony import */ var _keysIn_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(32957);
|
|
|
|
|
|
|
|
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/**
|
|
* Assigns own and inherited enumerable string keyed properties of source
|
|
* objects to the destination object for all destination properties that
|
|
* resolve to `undefined`. Source objects are applied from left to right.
|
|
* Once a property is set, additional values of the same property are ignored.
|
|
*
|
|
* **Note:** This method mutates `object`.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Object
|
|
* @param {Object} object The destination object.
|
|
* @param {...Object} [sources] The source objects.
|
|
* @returns {Object} Returns `object`.
|
|
* @see _.defaultsDeep
|
|
* @example
|
|
*
|
|
* _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
|
|
* // => { 'a': 1, 'b': 2 }
|
|
*/
|
|
var defaults = (0,_baseRest_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(function(object, sources) {
|
|
object = Object(object);
|
|
|
|
var index = -1;
|
|
var length = sources.length;
|
|
var guard = length > 2 ? sources[2] : undefined;
|
|
|
|
if (guard && (0,_isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(sources[0], sources[1], guard)) {
|
|
length = 1;
|
|
}
|
|
|
|
while (++index < length) {
|
|
var source = sources[index];
|
|
var props = (0,_keysIn_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(source);
|
|
var propsIndex = -1;
|
|
var propsLength = props.length;
|
|
|
|
while (++propsIndex < propsLength) {
|
|
var key = props[propsIndex];
|
|
var value = object[key];
|
|
|
|
if (value === undefined ||
|
|
((0,_eq_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
|
|
object[key] = source[key];
|
|
}
|
|
}
|
|
}
|
|
|
|
return object;
|
|
});
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 13445:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: () => (/* binding */ lodash_es_filter)
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayFilter.js
|
|
var _arrayFilter = __webpack_require__(68774);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules
|
|
var _baseEach = __webpack_require__(49811);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFilter.js
|
|
|
|
|
|
/**
|
|
* The base implementation of `_.filter` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} predicate The function invoked per iteration.
|
|
* @returns {Array} Returns the new filtered array.
|
|
*/
|
|
function baseFilter(collection, predicate) {
|
|
var result = [];
|
|
(0,_baseEach/* default */.Z)(collection, function(value, index, collection) {
|
|
if (predicate(value, index, collection)) {
|
|
result.push(value);
|
|
}
|
|
});
|
|
return result;
|
|
}
|
|
|
|
/* harmony default export */ const _baseFilter = (baseFilter);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules
|
|
var _baseIteratee = __webpack_require__(74765);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js
|
|
var isArray = __webpack_require__(27771);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/filter.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Iterates over elements of `collection`, returning an array of all elements
|
|
* `predicate` returns truthy for. The predicate is invoked with three
|
|
* arguments: (value, index|key, collection).
|
|
*
|
|
* **Note:** Unlike `_.remove`, this method returns a new array.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
|
* @returns {Array} Returns the new filtered array.
|
|
* @see _.reject
|
|
* @example
|
|
*
|
|
* var users = [
|
|
* { 'user': 'barney', 'age': 36, 'active': true },
|
|
* { 'user': 'fred', 'age': 40, 'active': false }
|
|
* ];
|
|
*
|
|
* _.filter(users, function(o) { return !o.active; });
|
|
* // => objects for ['fred']
|
|
*
|
|
* // The `_.matches` iteratee shorthand.
|
|
* _.filter(users, { 'age': 36, 'active': true });
|
|
* // => objects for ['barney']
|
|
*
|
|
* // The `_.matchesProperty` iteratee shorthand.
|
|
* _.filter(users, ['active', false]);
|
|
* // => objects for ['fred']
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.filter(users, 'active');
|
|
* // => objects for ['barney']
|
|
*
|
|
* // Combining several predicates using `_.overEvery` or `_.overSome`.
|
|
* _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
|
|
* // => objects for ['fred', 'barney']
|
|
*/
|
|
function filter(collection, predicate) {
|
|
var func = (0,isArray/* default */.Z)(collection) ? _arrayFilter/* default */.Z : _baseFilter;
|
|
return func(collection, (0,_baseIteratee/* default */.Z)(predicate, 3));
|
|
}
|
|
|
|
/* harmony default export */ const lodash_es_filter = (filter);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 27961:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10626);
|
|
|
|
|
|
/**
|
|
* Flattens `array` a single level deep.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {Array} array The array to flatten.
|
|
* @returns {Array} Returns the new flattened array.
|
|
* @example
|
|
*
|
|
* _.flatten([1, [2, [3, [4]], 5]]);
|
|
* // => [1, 2, [3, [4]], 5]
|
|
*/
|
|
function flatten(array) {
|
|
var length = array == null ? 0 : array.length;
|
|
return length ? (0,_baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(array, 1) : [];
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (flatten);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 70870:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76579);
|
|
/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49811);
|
|
/* harmony import */ var _castFunction_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(68882);
|
|
/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27771);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Iterates over elements of `collection` and invokes `iteratee` for each element.
|
|
* The iteratee is invoked with three arguments: (value, index|key, collection).
|
|
* Iteratee functions may exit iteration early by explicitly returning `false`.
|
|
*
|
|
* **Note:** As with other "Collections" methods, objects with a "length"
|
|
* property are iterated like arrays. To avoid this behavior use `_.forIn`
|
|
* or `_.forOwn` for object iteration.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @alias each
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
* @returns {Array|Object} Returns `collection`.
|
|
* @see _.forEachRight
|
|
* @example
|
|
*
|
|
* _.forEach([1, 2], function(value) {
|
|
* console.log(value);
|
|
* });
|
|
* // => Logs `1` then `2`.
|
|
*
|
|
* _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
|
|
* console.log(key);
|
|
* });
|
|
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
|
|
*/
|
|
function forEach(collection, iteratee) {
|
|
var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(collection) ? _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z : _baseEach_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z;
|
|
return func(collection, (0,_castFunction_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(iteratee));
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (forEach);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 17452:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: () => (/* binding */ lodash_es_has)
|
|
});
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHas.js
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var _baseHas_hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/**
|
|
* The base implementation of `_.has` without support for deep paths.
|
|
*
|
|
* @private
|
|
* @param {Object} [object] The object to query.
|
|
* @param {Array|string} key The key to check.
|
|
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
|
*/
|
|
function baseHas(object, key) {
|
|
return object != null && _baseHas_hasOwnProperty.call(object, key);
|
|
}
|
|
|
|
/* harmony default export */ const _baseHas = (baseHas);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js
|
|
var _hasPath = __webpack_require__(16174);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/has.js
|
|
|
|
|
|
|
|
/**
|
|
* Checks if `path` is a direct property of `object`.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Object
|
|
* @param {Object} object The object to query.
|
|
* @param {Array|string} path The path to check.
|
|
* @returns {boolean} Returns `true` if `path` exists, else `false`.
|
|
* @example
|
|
*
|
|
* var object = { 'a': { 'b': 2 } };
|
|
* var other = _.create({ 'a': _.create({ 'b': 2 }) });
|
|
*
|
|
* _.has(object, 'a');
|
|
* // => true
|
|
*
|
|
* _.has(object, 'a.b');
|
|
* // => true
|
|
*
|
|
* _.has(object, ['a', 'b']);
|
|
* // => true
|
|
*
|
|
* _.has(other, 'a');
|
|
* // => false
|
|
*/
|
|
function has(object, path) {
|
|
return object != null && (0,_hasPath/* default */.Z)(object, path, _baseHas);
|
|
}
|
|
|
|
/* harmony default export */ const lodash_es_has = (has);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 75487:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: () => (/* binding */ lodash_es_hasIn)
|
|
});
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHasIn.js
|
|
/**
|
|
* The base implementation of `_.hasIn` without support for deep paths.
|
|
*
|
|
* @private
|
|
* @param {Object} [object] The object to query.
|
|
* @param {Array|string} key The key to check.
|
|
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
|
*/
|
|
function baseHasIn(object, key) {
|
|
return object != null && key in Object(object);
|
|
}
|
|
|
|
/* harmony default export */ const _baseHasIn = (baseHasIn);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js
|
|
var _hasPath = __webpack_require__(16174);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/hasIn.js
|
|
|
|
|
|
|
|
/**
|
|
* Checks if `path` is a direct or inherited property of `object`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Object
|
|
* @param {Object} object The object to query.
|
|
* @param {Array|string} path The path to check.
|
|
* @returns {boolean} Returns `true` if `path` exists, else `false`.
|
|
* @example
|
|
*
|
|
* var object = _.create({ 'a': _.create({ 'b': 2 }) });
|
|
*
|
|
* _.hasIn(object, 'a');
|
|
* // => true
|
|
*
|
|
* _.hasIn(object, 'a.b');
|
|
* // => true
|
|
*
|
|
* _.hasIn(object, ['a', 'b']);
|
|
* // => true
|
|
*
|
|
* _.hasIn(object, 'b');
|
|
* // => false
|
|
*/
|
|
function hasIn(object, path) {
|
|
return object != null && (0,_hasPath/* default */.Z)(object, path, _baseHasIn);
|
|
}
|
|
|
|
/* harmony default export */ const lodash_es_hasIn = (hasIn);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 72714:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(93589);
|
|
/* harmony import */ var _isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18533);
|
|
|
|
|
|
|
|
/** `Object#toString` result references. */
|
|
var symbolTag = '[object Symbol]';
|
|
|
|
/**
|
|
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
* @example
|
|
*
|
|
* _.isSymbol(Symbol.iterator);
|
|
* // => true
|
|
*
|
|
* _.isSymbol('abc');
|
|
* // => false
|
|
*/
|
|
function isSymbol(value) {
|
|
return typeof value == 'symbol' ||
|
|
((0,_isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(value) && (0,_baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(value) == symbolTag);
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isSymbol);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 49360:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/**
|
|
* Checks if `value` is `undefined`.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
|
|
* @example
|
|
*
|
|
* _.isUndefined(void 0);
|
|
* // => true
|
|
*
|
|
* _.isUndefined(null);
|
|
* // => false
|
|
*/
|
|
function isUndefined(value) {
|
|
return value === undefined;
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isUndefined);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 17179:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(87668);
|
|
/* harmony import */ var _baseKeys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39473);
|
|
/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50585);
|
|
|
|
|
|
|
|
|
|
/**
|
|
* 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 (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(object) ? (0,_arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(object) : (0,_baseKeys_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(object);
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (keys);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 43836:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27679);
|
|
/* harmony import */ var _baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(74765);
|
|
/* harmony import */ var _baseMap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21018);
|
|
/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27771);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Creates an array of values by running each element in `collection` thru
|
|
* `iteratee`. The iteratee is invoked with three arguments:
|
|
* (value, index|key, collection).
|
|
*
|
|
* Many lodash methods are guarded to work as iteratees for methods like
|
|
* `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
|
|
*
|
|
* The guarded methods are:
|
|
* `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
|
|
* `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
|
|
* `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
|
|
* `template`, `trim`, `trimEnd`, `trimStart`, and `words`
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
* @returns {Array} Returns the new mapped array.
|
|
* @example
|
|
*
|
|
* function square(n) {
|
|
* return n * n;
|
|
* }
|
|
*
|
|
* _.map([4, 8], square);
|
|
* // => [16, 64]
|
|
*
|
|
* _.map({ 'a': 4, 'b': 8 }, square);
|
|
* // => [16, 64] (iteration order is not guaranteed)
|
|
*
|
|
* var users = [
|
|
* { 'user': 'barney' },
|
|
* { 'user': 'fred' }
|
|
* ];
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.map(users, 'user');
|
|
* // => ['barney', 'fred']
|
|
*/
|
|
function map(collection, iteratee) {
|
|
var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(collection) ? _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z : _baseMap_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z;
|
|
return func(collection, (0,_baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(iteratee, 3));
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (map);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 61666:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: () => (/* binding */ lodash_es_pick)
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js
|
|
var _baseGet = __webpack_require__(13317);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js
|
|
var _assignValue = __webpack_require__(72954);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_castPath.js + 2 modules
|
|
var _castPath = __webpack_require__(22823);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_isIndex.js
|
|
var _isIndex = __webpack_require__(56009);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js
|
|
var isObject = __webpack_require__(77226);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js
|
|
var _toKey = __webpack_require__(62281);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSet.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* The base implementation of `_.set`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to modify.
|
|
* @param {Array|string} path The path of the property to set.
|
|
* @param {*} value The value to set.
|
|
* @param {Function} [customizer] The function to customize path creation.
|
|
* @returns {Object} Returns `object`.
|
|
*/
|
|
function baseSet(object, path, value, customizer) {
|
|
if (!(0,isObject/* default */.Z)(object)) {
|
|
return object;
|
|
}
|
|
path = (0,_castPath/* default */.Z)(path, object);
|
|
|
|
var index = -1,
|
|
length = path.length,
|
|
lastIndex = length - 1,
|
|
nested = object;
|
|
|
|
while (nested != null && ++index < length) {
|
|
var key = (0,_toKey/* default */.Z)(path[index]),
|
|
newValue = value;
|
|
|
|
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
|
|
return object;
|
|
}
|
|
|
|
if (index != lastIndex) {
|
|
var objValue = nested[key];
|
|
newValue = customizer ? customizer(objValue, key, nested) : undefined;
|
|
if (newValue === undefined) {
|
|
newValue = (0,isObject/* default */.Z)(objValue)
|
|
? objValue
|
|
: ((0,_isIndex/* default */.Z)(path[index + 1]) ? [] : {});
|
|
}
|
|
}
|
|
(0,_assignValue/* default */.Z)(nested, key, newValue);
|
|
nested = nested[key];
|
|
}
|
|
return object;
|
|
}
|
|
|
|
/* harmony default export */ const _baseSet = (baseSet);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePickBy.js
|
|
|
|
|
|
|
|
|
|
/**
|
|
* The base implementation of `_.pickBy` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Object} object The source object.
|
|
* @param {string[]} paths The property paths to pick.
|
|
* @param {Function} predicate The function invoked per property.
|
|
* @returns {Object} Returns the new object.
|
|
*/
|
|
function basePickBy(object, paths, predicate) {
|
|
var index = -1,
|
|
length = paths.length,
|
|
result = {};
|
|
|
|
while (++index < length) {
|
|
var path = paths[index],
|
|
value = (0,_baseGet/* default */.Z)(object, path);
|
|
|
|
if (predicate(value, path)) {
|
|
_baseSet(result, (0,_castPath/* default */.Z)(path, object), value);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/* harmony default export */ const _basePickBy = (basePickBy);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules
|
|
var hasIn = __webpack_require__(75487);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePick.js
|
|
|
|
|
|
|
|
/**
|
|
* The base implementation of `_.pick` without support for individual
|
|
* property identifiers.
|
|
*
|
|
* @private
|
|
* @param {Object} object The source object.
|
|
* @param {string[]} paths The property paths to pick.
|
|
* @returns {Object} Returns the new object.
|
|
*/
|
|
function basePick(object, paths) {
|
|
return _basePickBy(object, paths, function(value, path) {
|
|
return (0,hasIn/* default */.Z)(object, path);
|
|
});
|
|
}
|
|
|
|
/* harmony default export */ const _basePick = (basePick);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js
|
|
var flatten = __webpack_require__(27961);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_overRest.js + 1 modules
|
|
var _overRest = __webpack_require__(81211);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_setToString.js + 2 modules
|
|
var _setToString = __webpack_require__(27227);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_flatRest.js
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A specialized version of `baseRest` which flattens the rest array.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to apply a rest parameter to.
|
|
* @returns {Function} Returns the new function.
|
|
*/
|
|
function flatRest(func) {
|
|
return (0,_setToString/* default */.Z)((0,_overRest/* default */.Z)(func, undefined, flatten/* default */.Z), func + '');
|
|
}
|
|
|
|
/* harmony default export */ const _flatRest = (flatRest);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/pick.js
|
|
|
|
|
|
|
|
/**
|
|
* Creates an object composed of the picked `object` properties.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Object
|
|
* @param {Object} object The source object.
|
|
* @param {...(string|string[])} [paths] The property paths to pick.
|
|
* @returns {Object} Returns the new object.
|
|
* @example
|
|
*
|
|
* var object = { 'a': 1, 'b': '2', 'c': 3 };
|
|
*
|
|
* _.pick(object, ['a', 'c']);
|
|
* // => { 'a': 1, 'c': 3 }
|
|
*/
|
|
var pick = _flatRest(function(object, paths) {
|
|
return object == null ? {} : _basePick(object, paths);
|
|
});
|
|
|
|
/* harmony default export */ const lodash_es_pick = (pick);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 74379:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: () => (/* binding */ lodash_es_range)
|
|
});
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseRange.js
|
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
var nativeCeil = Math.ceil,
|
|
nativeMax = Math.max;
|
|
|
|
/**
|
|
* The base implementation of `_.range` and `_.rangeRight` which doesn't
|
|
* coerce arguments.
|
|
*
|
|
* @private
|
|
* @param {number} start The start of the range.
|
|
* @param {number} end The end of the range.
|
|
* @param {number} step The value to increment or decrement by.
|
|
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
* @returns {Array} Returns the range of numbers.
|
|
*/
|
|
function baseRange(start, end, step, fromRight) {
|
|
var index = -1,
|
|
length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
|
|
result = Array(length);
|
|
|
|
while (length--) {
|
|
result[fromRight ? length : ++index] = start;
|
|
start += step;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/* harmony default export */ const _baseRange = (baseRange);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js
|
|
var _isIterateeCall = __webpack_require__(50439);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules
|
|
var toFinite = __webpack_require__(94099);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_createRange.js
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Creates a `_.range` or `_.rangeRight` function.
|
|
*
|
|
* @private
|
|
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
* @returns {Function} Returns the new range function.
|
|
*/
|
|
function createRange(fromRight) {
|
|
return function(start, end, step) {
|
|
if (step && typeof step != 'number' && (0,_isIterateeCall/* default */.Z)(start, end, step)) {
|
|
end = step = undefined;
|
|
}
|
|
// Ensure the sign of `-0` is preserved.
|
|
start = (0,toFinite/* default */.Z)(start);
|
|
if (end === undefined) {
|
|
end = start;
|
|
start = 0;
|
|
} else {
|
|
end = (0,toFinite/* default */.Z)(end);
|
|
}
|
|
step = step === undefined ? (start < end ? 1 : -1) : (0,toFinite/* default */.Z)(step);
|
|
return _baseRange(start, end, step, fromRight);
|
|
};
|
|
}
|
|
|
|
/* harmony default export */ const _createRange = (createRange);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/range.js
|
|
|
|
|
|
/**
|
|
* Creates an array of numbers (positive and/or negative) progressing from
|
|
* `start` up to, but not including, `end`. A step of `-1` is used if a negative
|
|
* `start` is specified without an `end` or `step`. If `end` is not specified,
|
|
* it's set to `start` with `start` then set to `0`.
|
|
*
|
|
* **Note:** JavaScript follows the IEEE-754 standard for resolving
|
|
* floating-point values which can produce unexpected results.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Util
|
|
* @param {number} [start=0] The start of the range.
|
|
* @param {number} end The end of the range.
|
|
* @param {number} [step=1] The value to increment or decrement by.
|
|
* @returns {Array} Returns the range of numbers.
|
|
* @see _.inRange, _.rangeRight
|
|
* @example
|
|
*
|
|
* _.range(4);
|
|
* // => [0, 1, 2, 3]
|
|
*
|
|
* _.range(-4);
|
|
* // => [0, -1, -2, -3]
|
|
*
|
|
* _.range(1, 5);
|
|
* // => [1, 2, 3, 4]
|
|
*
|
|
* _.range(0, 20, 5);
|
|
* // => [0, 5, 10, 15]
|
|
*
|
|
* _.range(0, -4, -1);
|
|
* // => [0, -1, -2, -3]
|
|
*
|
|
* _.range(1, 4, 0);
|
|
* // => [1, 1, 1]
|
|
*
|
|
* _.range(0);
|
|
* // => []
|
|
*/
|
|
var range = _createRange();
|
|
|
|
/* harmony default export */ const lodash_es_range = (range);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 92344:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: () => (/* binding */ lodash_es_reduce)
|
|
});
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayReduce.js
|
|
/**
|
|
* A specialized version of `_.reduce` for arrays without support for
|
|
* iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} [array] The array to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @param {*} [accumulator] The initial value.
|
|
* @param {boolean} [initAccum] Specify using the first element of `array` as
|
|
* the initial value.
|
|
* @returns {*} Returns the accumulated value.
|
|
*/
|
|
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
var index = -1,
|
|
length = array == null ? 0 : array.length;
|
|
|
|
if (initAccum && length) {
|
|
accumulator = array[++index];
|
|
}
|
|
while (++index < length) {
|
|
accumulator = iteratee(accumulator, array[index], index, array);
|
|
}
|
|
return accumulator;
|
|
}
|
|
|
|
/* harmony default export */ const _arrayReduce = (arrayReduce);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules
|
|
var _baseEach = __webpack_require__(49811);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules
|
|
var _baseIteratee = __webpack_require__(74765);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseReduce.js
|
|
/**
|
|
* The base implementation of `_.reduce` and `_.reduceRight`, without support
|
|
* for iteratee shorthands, which iterates over `collection` using `eachFunc`.
|
|
*
|
|
* @private
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @param {*} accumulator The initial value.
|
|
* @param {boolean} initAccum Specify using the first or last element of
|
|
* `collection` as the initial value.
|
|
* @param {Function} eachFunc The function to iterate over `collection`.
|
|
* @returns {*} Returns the accumulated value.
|
|
*/
|
|
function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
|
|
eachFunc(collection, function(value, index, collection) {
|
|
accumulator = initAccum
|
|
? (initAccum = false, value)
|
|
: iteratee(accumulator, value, index, collection);
|
|
});
|
|
return accumulator;
|
|
}
|
|
|
|
/* harmony default export */ const _baseReduce = (baseReduce);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js
|
|
var isArray = __webpack_require__(27771);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/reduce.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Reduces `collection` to a value which is the accumulated result of running
|
|
* each element in `collection` thru `iteratee`, where each successive
|
|
* invocation is supplied the return value of the previous. If `accumulator`
|
|
* is not given, the first element of `collection` is used as the initial
|
|
* value. The iteratee is invoked with four arguments:
|
|
* (accumulator, value, index|key, collection).
|
|
*
|
|
* Many lodash methods are guarded to work as iteratees for methods like
|
|
* `_.reduce`, `_.reduceRight`, and `_.transform`.
|
|
*
|
|
* The guarded methods are:
|
|
* `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
|
|
* and `sortBy`
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
* @param {*} [accumulator] The initial value.
|
|
* @returns {*} Returns the accumulated value.
|
|
* @see _.reduceRight
|
|
* @example
|
|
*
|
|
* _.reduce([1, 2], function(sum, n) {
|
|
* return sum + n;
|
|
* }, 0);
|
|
* // => 3
|
|
*
|
|
* _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
|
|
* (result[value] || (result[value] = [])).push(key);
|
|
* return result;
|
|
* }, {});
|
|
* // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
|
|
*/
|
|
function reduce(collection, iteratee, accumulator) {
|
|
var func = (0,isArray/* default */.Z)(collection) ? _arrayReduce : _baseReduce,
|
|
initAccum = arguments.length < 3;
|
|
|
|
return func(collection, (0,_baseIteratee/* default */.Z)(iteratee, 4), accumulator, initAccum, _baseEach/* default */.Z);
|
|
}
|
|
|
|
/* harmony default export */ const lodash_es_reduce = (reduce);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 60532:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/**
|
|
* 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 [];
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stubArray);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 94099:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: () => (/* binding */ lodash_es_toFinite)
|
|
});
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_trimmedEndIndex.js
|
|
/** Used to match a single whitespace character. */
|
|
var reWhitespace = /\s/;
|
|
|
|
/**
|
|
* Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
|
|
* character of `string`.
|
|
*
|
|
* @private
|
|
* @param {string} string The string to inspect.
|
|
* @returns {number} Returns the index of the last non-whitespace character.
|
|
*/
|
|
function trimmedEndIndex(string) {
|
|
var index = string.length;
|
|
|
|
while (index-- && reWhitespace.test(string.charAt(index))) {}
|
|
return index;
|
|
}
|
|
|
|
/* harmony default export */ const _trimmedEndIndex = (trimmedEndIndex);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseTrim.js
|
|
|
|
|
|
/** Used to match leading whitespace. */
|
|
var reTrimStart = /^\s+/;
|
|
|
|
/**
|
|
* The base implementation of `_.trim`.
|
|
*
|
|
* @private
|
|
* @param {string} string The string to trim.
|
|
* @returns {string} Returns the trimmed string.
|
|
*/
|
|
function baseTrim(string) {
|
|
return string
|
|
? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '')
|
|
: string;
|
|
}
|
|
|
|
/* harmony default export */ const _baseTrim = (baseTrim);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js
|
|
var isObject = __webpack_require__(77226);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js
|
|
var isSymbol = __webpack_require__(72714);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/toNumber.js
|
|
|
|
|
|
|
|
|
|
/** Used as references for various `Number` constants. */
|
|
var NAN = 0 / 0;
|
|
|
|
/** Used to detect bad signed hexadecimal string values. */
|
|
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
|
|
/** Used to detect binary string values. */
|
|
var reIsBinary = /^0b[01]+$/i;
|
|
|
|
/** Used to detect octal string values. */
|
|
var reIsOctal = /^0o[0-7]+$/i;
|
|
|
|
/** Built-in method references without a dependency on `root`. */
|
|
var freeParseInt = parseInt;
|
|
|
|
/**
|
|
* Converts `value` to a number.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to process.
|
|
* @returns {number} Returns the number.
|
|
* @example
|
|
*
|
|
* _.toNumber(3.2);
|
|
* // => 3.2
|
|
*
|
|
* _.toNumber(Number.MIN_VALUE);
|
|
* // => 5e-324
|
|
*
|
|
* _.toNumber(Infinity);
|
|
* // => Infinity
|
|
*
|
|
* _.toNumber('3.2');
|
|
* // => 3.2
|
|
*/
|
|
function toNumber(value) {
|
|
if (typeof value == 'number') {
|
|
return value;
|
|
}
|
|
if ((0,isSymbol/* default */.Z)(value)) {
|
|
return NAN;
|
|
}
|
|
if ((0,isObject/* default */.Z)(value)) {
|
|
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
|
value = (0,isObject/* default */.Z)(other) ? (other + '') : other;
|
|
}
|
|
if (typeof value != 'string') {
|
|
return value === 0 ? value : +value;
|
|
}
|
|
value = _baseTrim(value);
|
|
var isBinary = reIsBinary.test(value);
|
|
return (isBinary || reIsOctal.test(value))
|
|
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
|
: (reIsBadHex.test(value) ? NAN : +value);
|
|
}
|
|
|
|
/* harmony default export */ const lodash_es_toNumber = (toNumber);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/toFinite.js
|
|
|
|
|
|
/** Used as references for various `Number` constants. */
|
|
var INFINITY = 1 / 0,
|
|
MAX_INTEGER = 1.7976931348623157e+308;
|
|
|
|
/**
|
|
* Converts `value` to a finite number.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.12.0
|
|
* @category Lang
|
|
* @param {*} value The value to convert.
|
|
* @returns {number} Returns the converted number.
|
|
* @example
|
|
*
|
|
* _.toFinite(3.2);
|
|
* // => 3.2
|
|
*
|
|
* _.toFinite(Number.MIN_VALUE);
|
|
* // => 5e-324
|
|
*
|
|
* _.toFinite(Infinity);
|
|
* // => 1.7976931348623157e+308
|
|
*
|
|
* _.toFinite('3.2');
|
|
* // => 3.2
|
|
*/
|
|
function toFinite(value) {
|
|
if (!value) {
|
|
return value === 0 ? value : 0;
|
|
}
|
|
value = lodash_es_toNumber(value);
|
|
if (value === INFINITY || value === -INFINITY) {
|
|
var sign = (value < 0 ? -1 : 1);
|
|
return sign * MAX_INTEGER;
|
|
}
|
|
return value === value ? value : 0;
|
|
}
|
|
|
|
/* harmony default export */ const lodash_es_toFinite = (toFinite);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 50751:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: () => (/* binding */ lodash_es_toString)
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js
|
|
var _Symbol = __webpack_require__(17685);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js
|
|
var _arrayMap = __webpack_require__(27679);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js
|
|
var isArray = __webpack_require__(27771);
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js
|
|
var isSymbol = __webpack_require__(72714);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseToString.js
|
|
|
|
|
|
|
|
|
|
|
|
/** Used as references for various `Number` constants. */
|
|
var INFINITY = 1 / 0;
|
|
|
|
/** Used to convert symbols to primitives and strings. */
|
|
var symbolProto = _Symbol/* default */.Z ? _Symbol/* default */.Z.prototype : undefined,
|
|
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
|
|
/**
|
|
* The base implementation of `_.toString` which doesn't convert nullish
|
|
* values to empty strings.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to process.
|
|
* @returns {string} Returns the string.
|
|
*/
|
|
function baseToString(value) {
|
|
// Exit early for strings to avoid a performance hit in some environments.
|
|
if (typeof value == 'string') {
|
|
return value;
|
|
}
|
|
if ((0,isArray/* default */.Z)(value)) {
|
|
// Recursively convert values (susceptible to call stack limits).
|
|
return (0,_arrayMap/* default */.Z)(value, baseToString) + '';
|
|
}
|
|
if ((0,isSymbol/* default */.Z)(value)) {
|
|
return symbolToString ? symbolToString.call(value) : '';
|
|
}
|
|
var result = (value + '');
|
|
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
}
|
|
|
|
/* harmony default export */ const _baseToString = (baseToString);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/toString.js
|
|
|
|
|
|
/**
|
|
* Converts `value` to a string. An empty string is returned for `null`
|
|
* and `undefined` values. The sign of `-0` is preserved.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to convert.
|
|
* @returns {string} Returns the converted string.
|
|
* @example
|
|
*
|
|
* _.toString(null);
|
|
* // => ''
|
|
*
|
|
* _.toString(-0);
|
|
* // => '-0'
|
|
*
|
|
* _.toString([1, 2, 3]);
|
|
* // => '1,2,3'
|
|
*/
|
|
function toString_toString(value) {
|
|
return value == null ? '' : _baseToString(value);
|
|
}
|
|
|
|
/* harmony default export */ const lodash_es_toString = (toString_toString);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 66749:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50751);
|
|
|
|
|
|
/** Used to generate unique IDs. */
|
|
var idCounter = 0;
|
|
|
|
/**
|
|
* Generates a unique ID. If `prefix` is given, the ID is appended to it.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Util
|
|
* @param {string} [prefix=''] The value to prefix the ID with.
|
|
* @returns {string} Returns the unique ID.
|
|
* @example
|
|
*
|
|
* _.uniqueId('contact_');
|
|
* // => 'contact_104'
|
|
*
|
|
* _.uniqueId();
|
|
* // => '105'
|
|
*/
|
|
function uniqueId(prefix) {
|
|
var id = ++idCounter;
|
|
return (0,_toString_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(prefix) + id;
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (uniqueId);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 34148:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: () => (/* binding */ lodash_es_values)
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js
|
|
var _arrayMap = __webpack_require__(27679);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseValues.js
|
|
|
|
|
|
/**
|
|
* The base implementation of `_.values` and `_.valuesIn` which creates an
|
|
* array of `object` property values corresponding to the property names
|
|
* of `props`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @param {Array} props The property names to get values for.
|
|
* @returns {Object} Returns the array of property values.
|
|
*/
|
|
function baseValues(object, props) {
|
|
return (0,_arrayMap/* default */.Z)(props, function(key) {
|
|
return object[key];
|
|
});
|
|
}
|
|
|
|
/* harmony default export */ const _baseValues = (baseValues);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js
|
|
var keys = __webpack_require__(17179);
|
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/values.js
|
|
|
|
|
|
|
|
/**
|
|
* Creates an array of the own enumerable string keyed property values of `object`.
|
|
*
|
|
* **Note:** Non-object values are coerced to objects.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Object
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of property values.
|
|
* @example
|
|
*
|
|
* function Foo() {
|
|
* this.a = 1;
|
|
* this.b = 2;
|
|
* }
|
|
*
|
|
* Foo.prototype.c = 3;
|
|
*
|
|
* _.values(new Foo);
|
|
* // => [1, 2] (iteration order is not guaranteed)
|
|
*
|
|
* _.values('hi');
|
|
* // => ['h', 'i']
|
|
*/
|
|
function values(object) {
|
|
return object == null ? [] : _baseValues(object, (0,keys/* default */.Z)(object));
|
|
}
|
|
|
|
/* harmony default export */ const lodash_es_values = (values);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 66985:
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ diagram: () => (/* binding */ diagram)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(85322);
|
|
/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64218);
|
|
/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41644);
|
|
/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45625);
|
|
/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27484);
|
|
/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(17967);
|
|
/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(20683);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var parser = function() {
|
|
var o = function(k, v, o2, l) {
|
|
for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
|
|
;
|
|
return o2;
|
|
}, $V0 = [1, 3], $V1 = [1, 4], $V2 = [1, 5], $V3 = [1, 6], $V4 = [5, 6, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 62, 63], $V5 = [1, 18], $V6 = [2, 7], $V7 = [1, 22], $V8 = [1, 23], $V9 = [1, 24], $Va = [1, 25], $Vb = [1, 26], $Vc = [1, 27], $Vd = [1, 20], $Ve = [1, 28], $Vf = [1, 29], $Vg = [62, 63], $Vh = [5, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 51, 53, 62, 63], $Vi = [1, 47], $Vj = [1, 48], $Vk = [1, 49], $Vl = [1, 50], $Vm = [1, 51], $Vn = [1, 52], $Vo = [1, 53], $Vp = [53, 54], $Vq = [1, 64], $Vr = [1, 60], $Vs = [1, 61], $Vt = [1, 62], $Vu = [1, 63], $Vv = [1, 65], $Vw = [1, 69], $Vx = [1, 70], $Vy = [1, 67], $Vz = [1, 68], $VA = [5, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 62, 63];
|
|
var parser2 = {
|
|
trace: function trace() {
|
|
},
|
|
yy: {},
|
|
symbols_: { "error": 2, "start": 3, "directive": 4, "NEWLINE": 5, "RD": 6, "diagram": 7, "EOF": 8, "acc_title": 9, "acc_title_value": 10, "acc_descr": 11, "acc_descr_value": 12, "acc_descr_multiline_value": 13, "requirementDef": 14, "elementDef": 15, "relationshipDef": 16, "requirementType": 17, "requirementName": 18, "STRUCT_START": 19, "requirementBody": 20, "ID": 21, "COLONSEP": 22, "id": 23, "TEXT": 24, "text": 25, "RISK": 26, "riskLevel": 27, "VERIFYMTHD": 28, "verifyType": 29, "STRUCT_STOP": 30, "REQUIREMENT": 31, "FUNCTIONAL_REQUIREMENT": 32, "INTERFACE_REQUIREMENT": 33, "PERFORMANCE_REQUIREMENT": 34, "PHYSICAL_REQUIREMENT": 35, "DESIGN_CONSTRAINT": 36, "LOW_RISK": 37, "MED_RISK": 38, "HIGH_RISK": 39, "VERIFY_ANALYSIS": 40, "VERIFY_DEMONSTRATION": 41, "VERIFY_INSPECTION": 42, "VERIFY_TEST": 43, "ELEMENT": 44, "elementName": 45, "elementBody": 46, "TYPE": 47, "type": 48, "DOCREF": 49, "ref": 50, "END_ARROW_L": 51, "relationship": 52, "LINE": 53, "END_ARROW_R": 54, "CONTAINS": 55, "COPIES": 56, "DERIVES": 57, "SATISFIES": 58, "VERIFIES": 59, "REFINES": 60, "TRACES": 61, "unqString": 62, "qString": 63, "$accept": 0, "$end": 1 },
|
|
terminals_: { 2: "error", 5: "NEWLINE", 6: "RD", 8: "EOF", 9: "acc_title", 10: "acc_title_value", 11: "acc_descr", 12: "acc_descr_value", 13: "acc_descr_multiline_value", 19: "STRUCT_START", 21: "ID", 22: "COLONSEP", 24: "TEXT", 26: "RISK", 28: "VERIFYMTHD", 30: "STRUCT_STOP", 31: "REQUIREMENT", 32: "FUNCTIONAL_REQUIREMENT", 33: "INTERFACE_REQUIREMENT", 34: "PERFORMANCE_REQUIREMENT", 35: "PHYSICAL_REQUIREMENT", 36: "DESIGN_CONSTRAINT", 37: "LOW_RISK", 38: "MED_RISK", 39: "HIGH_RISK", 40: "VERIFY_ANALYSIS", 41: "VERIFY_DEMONSTRATION", 42: "VERIFY_INSPECTION", 43: "VERIFY_TEST", 44: "ELEMENT", 47: "TYPE", 49: "DOCREF", 51: "END_ARROW_L", 53: "LINE", 54: "END_ARROW_R", 55: "CONTAINS", 56: "COPIES", 57: "DERIVES", 58: "SATISFIES", 59: "VERIFIES", 60: "REFINES", 61: "TRACES", 62: "unqString", 63: "qString" },
|
|
productions_: [0, [3, 3], [3, 2], [3, 4], [4, 2], [4, 2], [4, 1], [7, 0], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [14, 5], [20, 5], [20, 5], [20, 5], [20, 5], [20, 2], [20, 1], [17, 1], [17, 1], [17, 1], [17, 1], [17, 1], [17, 1], [27, 1], [27, 1], [27, 1], [29, 1], [29, 1], [29, 1], [29, 1], [15, 5], [46, 5], [46, 5], [46, 2], [46, 1], [16, 5], [16, 5], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [18, 1], [18, 1], [23, 1], [23, 1], [25, 1], [25, 1], [45, 1], [45, 1], [48, 1], [48, 1], [50, 1], [50, 1]],
|
|
performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
|
|
var $0 = $$.length - 1;
|
|
switch (yystate) {
|
|
case 4:
|
|
this.$ = $$[$0].trim();
|
|
yy.setAccTitle(this.$);
|
|
break;
|
|
case 5:
|
|
case 6:
|
|
this.$ = $$[$0].trim();
|
|
yy.setAccDescription(this.$);
|
|
break;
|
|
case 7:
|
|
this.$ = [];
|
|
break;
|
|
case 13:
|
|
yy.addRequirement($$[$0 - 3], $$[$0 - 4]);
|
|
break;
|
|
case 14:
|
|
yy.setNewReqId($$[$0 - 2]);
|
|
break;
|
|
case 15:
|
|
yy.setNewReqText($$[$0 - 2]);
|
|
break;
|
|
case 16:
|
|
yy.setNewReqRisk($$[$0 - 2]);
|
|
break;
|
|
case 17:
|
|
yy.setNewReqVerifyMethod($$[$0 - 2]);
|
|
break;
|
|
case 20:
|
|
this.$ = yy.RequirementType.REQUIREMENT;
|
|
break;
|
|
case 21:
|
|
this.$ = yy.RequirementType.FUNCTIONAL_REQUIREMENT;
|
|
break;
|
|
case 22:
|
|
this.$ = yy.RequirementType.INTERFACE_REQUIREMENT;
|
|
break;
|
|
case 23:
|
|
this.$ = yy.RequirementType.PERFORMANCE_REQUIREMENT;
|
|
break;
|
|
case 24:
|
|
this.$ = yy.RequirementType.PHYSICAL_REQUIREMENT;
|
|
break;
|
|
case 25:
|
|
this.$ = yy.RequirementType.DESIGN_CONSTRAINT;
|
|
break;
|
|
case 26:
|
|
this.$ = yy.RiskLevel.LOW_RISK;
|
|
break;
|
|
case 27:
|
|
this.$ = yy.RiskLevel.MED_RISK;
|
|
break;
|
|
case 28:
|
|
this.$ = yy.RiskLevel.HIGH_RISK;
|
|
break;
|
|
case 29:
|
|
this.$ = yy.VerifyType.VERIFY_ANALYSIS;
|
|
break;
|
|
case 30:
|
|
this.$ = yy.VerifyType.VERIFY_DEMONSTRATION;
|
|
break;
|
|
case 31:
|
|
this.$ = yy.VerifyType.VERIFY_INSPECTION;
|
|
break;
|
|
case 32:
|
|
this.$ = yy.VerifyType.VERIFY_TEST;
|
|
break;
|
|
case 33:
|
|
yy.addElement($$[$0 - 3]);
|
|
break;
|
|
case 34:
|
|
yy.setNewElementType($$[$0 - 2]);
|
|
break;
|
|
case 35:
|
|
yy.setNewElementDocRef($$[$0 - 2]);
|
|
break;
|
|
case 38:
|
|
yy.addRelationship($$[$0 - 2], $$[$0], $$[$0 - 4]);
|
|
break;
|
|
case 39:
|
|
yy.addRelationship($$[$0 - 2], $$[$0 - 4], $$[$0]);
|
|
break;
|
|
case 40:
|
|
this.$ = yy.Relationships.CONTAINS;
|
|
break;
|
|
case 41:
|
|
this.$ = yy.Relationships.COPIES;
|
|
break;
|
|
case 42:
|
|
this.$ = yy.Relationships.DERIVES;
|
|
break;
|
|
case 43:
|
|
this.$ = yy.Relationships.SATISFIES;
|
|
break;
|
|
case 44:
|
|
this.$ = yy.Relationships.VERIFIES;
|
|
break;
|
|
case 45:
|
|
this.$ = yy.Relationships.REFINES;
|
|
break;
|
|
case 46:
|
|
this.$ = yy.Relationships.TRACES;
|
|
break;
|
|
}
|
|
},
|
|
table: [{ 3: 1, 4: 2, 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 1: [3] }, { 3: 8, 4: 2, 5: [1, 7], 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 5: [1, 9] }, { 10: [1, 10] }, { 12: [1, 11] }, o($V4, [2, 6]), { 3: 12, 4: 2, 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 1: [2, 2] }, { 4: 17, 5: $V5, 7: 13, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, o($V4, [2, 4]), o($V4, [2, 5]), { 1: [2, 1] }, { 8: [1, 30] }, { 4: 17, 5: $V5, 7: 31, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 32, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 33, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 34, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 35, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 18: 36, 62: [1, 37], 63: [1, 38] }, { 45: 39, 62: [1, 40], 63: [1, 41] }, { 51: [1, 42], 53: [1, 43] }, o($Vg, [2, 20]), o($Vg, [2, 21]), o($Vg, [2, 22]), o($Vg, [2, 23]), o($Vg, [2, 24]), o($Vg, [2, 25]), o($Vh, [2, 49]), o($Vh, [2, 50]), { 1: [2, 3] }, { 8: [2, 8] }, { 8: [2, 9] }, { 8: [2, 10] }, { 8: [2, 11] }, { 8: [2, 12] }, { 19: [1, 44] }, { 19: [2, 47] }, { 19: [2, 48] }, { 19: [1, 45] }, { 19: [2, 53] }, { 19: [2, 54] }, { 52: 46, 55: $Vi, 56: $Vj, 57: $Vk, 58: $Vl, 59: $Vm, 60: $Vn, 61: $Vo }, { 52: 54, 55: $Vi, 56: $Vj, 57: $Vk, 58: $Vl, 59: $Vm, 60: $Vn, 61: $Vo }, { 5: [1, 55] }, { 5: [1, 56] }, { 53: [1, 57] }, o($Vp, [2, 40]), o($Vp, [2, 41]), o($Vp, [2, 42]), o($Vp, [2, 43]), o($Vp, [2, 44]), o($Vp, [2, 45]), o($Vp, [2, 46]), { 54: [1, 58] }, { 5: $Vq, 20: 59, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vw, 30: $Vx, 46: 66, 47: $Vy, 49: $Vz }, { 23: 71, 62: $Ve, 63: $Vf }, { 23: 72, 62: $Ve, 63: $Vf }, o($VA, [2, 13]), { 22: [1, 73] }, { 22: [1, 74] }, { 22: [1, 75] }, { 22: [1, 76] }, { 5: $Vq, 20: 77, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, o($VA, [2, 19]), o($VA, [2, 33]), { 22: [1, 78] }, { 22: [1, 79] }, { 5: $Vw, 30: $Vx, 46: 80, 47: $Vy, 49: $Vz }, o($VA, [2, 37]), o($VA, [2, 38]), o($VA, [2, 39]), { 23: 81, 62: $Ve, 63: $Vf }, { 25: 82, 62: [1, 83], 63: [1, 84] }, { 27: 85, 37: [1, 86], 38: [1, 87], 39: [1, 88] }, { 29: 89, 40: [1, 90], 41: [1, 91], 42: [1, 92], 43: [1, 93] }, o($VA, [2, 18]), { 48: 94, 62: [1, 95], 63: [1, 96] }, { 50: 97, 62: [1, 98], 63: [1, 99] }, o($VA, [2, 36]), { 5: [1, 100] }, { 5: [1, 101] }, { 5: [2, 51] }, { 5: [2, 52] }, { 5: [1, 102] }, { 5: [2, 26] }, { 5: [2, 27] }, { 5: [2, 28] }, { 5: [1, 103] }, { 5: [2, 29] }, { 5: [2, 30] }, { 5: [2, 31] }, { 5: [2, 32] }, { 5: [1, 104] }, { 5: [2, 55] }, { 5: [2, 56] }, { 5: [1, 105] }, { 5: [2, 57] }, { 5: [2, 58] }, { 5: $Vq, 20: 106, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vq, 20: 107, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vq, 20: 108, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vq, 20: 109, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vw, 30: $Vx, 46: 110, 47: $Vy, 49: $Vz }, { 5: $Vw, 30: $Vx, 46: 111, 47: $Vy, 49: $Vz }, o($VA, [2, 14]), o($VA, [2, 15]), o($VA, [2, 16]), o($VA, [2, 17]), o($VA, [2, 34]), o($VA, [2, 35])],
|
|
defaultActions: { 8: [2, 2], 12: [2, 1], 30: [2, 3], 31: [2, 8], 32: [2, 9], 33: [2, 10], 34: [2, 11], 35: [2, 12], 37: [2, 47], 38: [2, 48], 40: [2, 53], 41: [2, 54], 83: [2, 51], 84: [2, 52], 86: [2, 26], 87: [2, 27], 88: [2, 28], 90: [2, 29], 91: [2, 30], 92: [2, 31], 93: [2, 32], 95: [2, 55], 96: [2, 56], 98: [2, 57], 99: [2, 58] },
|
|
parseError: function parseError(str, hash) {
|
|
if (hash.recoverable) {
|
|
this.trace(str);
|
|
} else {
|
|
var error = new Error(str);
|
|
error.hash = hash;
|
|
throw error;
|
|
}
|
|
},
|
|
parse: function parse(input) {
|
|
var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
|
|
var args = lstack.slice.call(arguments, 1);
|
|
var lexer2 = Object.create(this.lexer);
|
|
var sharedState = { yy: {} };
|
|
for (var k in this.yy) {
|
|
if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
|
sharedState.yy[k] = this.yy[k];
|
|
}
|
|
}
|
|
lexer2.setInput(input, sharedState.yy);
|
|
sharedState.yy.lexer = lexer2;
|
|
sharedState.yy.parser = this;
|
|
if (typeof lexer2.yylloc == "undefined") {
|
|
lexer2.yylloc = {};
|
|
}
|
|
var yyloc = lexer2.yylloc;
|
|
lstack.push(yyloc);
|
|
var ranges = lexer2.options && lexer2.options.ranges;
|
|
if (typeof sharedState.yy.parseError === "function") {
|
|
this.parseError = sharedState.yy.parseError;
|
|
} else {
|
|
this.parseError = Object.getPrototypeOf(this).parseError;
|
|
}
|
|
function lex() {
|
|
var token;
|
|
token = tstack.pop() || lexer2.lex() || EOF;
|
|
if (typeof token !== "number") {
|
|
if (token instanceof Array) {
|
|
tstack = token;
|
|
token = tstack.pop();
|
|
}
|
|
token = self.symbols_[token] || token;
|
|
}
|
|
return token;
|
|
}
|
|
var symbol, state, action, r, yyval = {}, p, len, newState, expected;
|
|
while (true) {
|
|
state = stack[stack.length - 1];
|
|
if (this.defaultActions[state]) {
|
|
action = this.defaultActions[state];
|
|
} else {
|
|
if (symbol === null || typeof symbol == "undefined") {
|
|
symbol = lex();
|
|
}
|
|
action = table[state] && table[state][symbol];
|
|
}
|
|
if (typeof action === "undefined" || !action.length || !action[0]) {
|
|
var errStr = "";
|
|
expected = [];
|
|
for (p in table[state]) {
|
|
if (this.terminals_[p] && p > TERROR) {
|
|
expected.push("'" + this.terminals_[p] + "'");
|
|
}
|
|
}
|
|
if (lexer2.showPosition) {
|
|
errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
|
|
} else {
|
|
errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
|
|
}
|
|
this.parseError(errStr, {
|
|
text: lexer2.match,
|
|
token: this.terminals_[symbol] || symbol,
|
|
line: lexer2.yylineno,
|
|
loc: yyloc,
|
|
expected
|
|
});
|
|
}
|
|
if (action[0] instanceof Array && action.length > 1) {
|
|
throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
|
|
}
|
|
switch (action[0]) {
|
|
case 1:
|
|
stack.push(symbol);
|
|
vstack.push(lexer2.yytext);
|
|
lstack.push(lexer2.yylloc);
|
|
stack.push(action[1]);
|
|
symbol = null;
|
|
{
|
|
yyleng = lexer2.yyleng;
|
|
yytext = lexer2.yytext;
|
|
yylineno = lexer2.yylineno;
|
|
yyloc = lexer2.yylloc;
|
|
}
|
|
break;
|
|
case 2:
|
|
len = this.productions_[action[1]][1];
|
|
yyval.$ = vstack[vstack.length - len];
|
|
yyval._$ = {
|
|
first_line: lstack[lstack.length - (len || 1)].first_line,
|
|
last_line: lstack[lstack.length - 1].last_line,
|
|
first_column: lstack[lstack.length - (len || 1)].first_column,
|
|
last_column: lstack[lstack.length - 1].last_column
|
|
};
|
|
if (ranges) {
|
|
yyval._$.range = [
|
|
lstack[lstack.length - (len || 1)].range[0],
|
|
lstack[lstack.length - 1].range[1]
|
|
];
|
|
}
|
|
r = this.performAction.apply(yyval, [
|
|
yytext,
|
|
yyleng,
|
|
yylineno,
|
|
sharedState.yy,
|
|
action[1],
|
|
vstack,
|
|
lstack
|
|
].concat(args));
|
|
if (typeof r !== "undefined") {
|
|
return r;
|
|
}
|
|
if (len) {
|
|
stack = stack.slice(0, -1 * len * 2);
|
|
vstack = vstack.slice(0, -1 * len);
|
|
lstack = lstack.slice(0, -1 * len);
|
|
}
|
|
stack.push(this.productions_[action[1]][0]);
|
|
vstack.push(yyval.$);
|
|
lstack.push(yyval._$);
|
|
newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
|
stack.push(newState);
|
|
break;
|
|
case 3:
|
|
return true;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
};
|
|
var lexer = function() {
|
|
var lexer2 = {
|
|
EOF: 1,
|
|
parseError: function parseError(str, hash) {
|
|
if (this.yy.parser) {
|
|
this.yy.parser.parseError(str, hash);
|
|
} else {
|
|
throw new Error(str);
|
|
}
|
|
},
|
|
// resets the lexer, sets new input
|
|
setInput: function(input, yy) {
|
|
this.yy = yy || this.yy || {};
|
|
this._input = input;
|
|
this._more = this._backtrack = this.done = false;
|
|
this.yylineno = this.yyleng = 0;
|
|
this.yytext = this.matched = this.match = "";
|
|
this.conditionStack = ["INITIAL"];
|
|
this.yylloc = {
|
|
first_line: 1,
|
|
first_column: 0,
|
|
last_line: 1,
|
|
last_column: 0
|
|
};
|
|
if (this.options.ranges) {
|
|
this.yylloc.range = [0, 0];
|
|
}
|
|
this.offset = 0;
|
|
return this;
|
|
},
|
|
// consumes and returns one char from the input
|
|
input: function() {
|
|
var ch = this._input[0];
|
|
this.yytext += ch;
|
|
this.yyleng++;
|
|
this.offset++;
|
|
this.match += ch;
|
|
this.matched += ch;
|
|
var lines = ch.match(/(?:\r\n?|\n).*/g);
|
|
if (lines) {
|
|
this.yylineno++;
|
|
this.yylloc.last_line++;
|
|
} else {
|
|
this.yylloc.last_column++;
|
|
}
|
|
if (this.options.ranges) {
|
|
this.yylloc.range[1]++;
|
|
}
|
|
this._input = this._input.slice(1);
|
|
return ch;
|
|
},
|
|
// unshifts one char (or a string) into the input
|
|
unput: function(ch) {
|
|
var len = ch.length;
|
|
var lines = ch.split(/(?:\r\n?|\n)/g);
|
|
this._input = ch + this._input;
|
|
this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
|
this.offset -= len;
|
|
var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
|
this.match = this.match.substr(0, this.match.length - 1);
|
|
this.matched = this.matched.substr(0, this.matched.length - 1);
|
|
if (lines.length - 1) {
|
|
this.yylineno -= lines.length - 1;
|
|
}
|
|
var r = this.yylloc.range;
|
|
this.yylloc = {
|
|
first_line: this.yylloc.first_line,
|
|
last_line: this.yylineno + 1,
|
|
first_column: this.yylloc.first_column,
|
|
last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
|
|
};
|
|
if (this.options.ranges) {
|
|
this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
|
}
|
|
this.yyleng = this.yytext.length;
|
|
return this;
|
|
},
|
|
// When called from action, caches matched text and appends it on next action
|
|
more: function() {
|
|
this._more = true;
|
|
return this;
|
|
},
|
|
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
|
reject: function() {
|
|
if (this.options.backtrack_lexer) {
|
|
this._backtrack = true;
|
|
} else {
|
|
return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
|
|
text: "",
|
|
token: null,
|
|
line: this.yylineno
|
|
});
|
|
}
|
|
return this;
|
|
},
|
|
// retain first n characters of the match
|
|
less: function(n) {
|
|
this.unput(this.match.slice(n));
|
|
},
|
|
// displays already matched input, i.e. for error messages
|
|
pastInput: function() {
|
|
var past = this.matched.substr(0, this.matched.length - this.match.length);
|
|
return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
|
|
},
|
|
// displays upcoming input, i.e. for error messages
|
|
upcomingInput: function() {
|
|
var next = this.match;
|
|
if (next.length < 20) {
|
|
next += this._input.substr(0, 20 - next.length);
|
|
}
|
|
return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
},
|
|
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
showPosition: function() {
|
|
var pre = this.pastInput();
|
|
var c = new Array(pre.length + 1).join("-");
|
|
return pre + this.upcomingInput() + "\n" + c + "^";
|
|
},
|
|
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
test_match: function(match, indexed_rule) {
|
|
var token, lines, backup;
|
|
if (this.options.backtrack_lexer) {
|
|
backup = {
|
|
yylineno: this.yylineno,
|
|
yylloc: {
|
|
first_line: this.yylloc.first_line,
|
|
last_line: this.last_line,
|
|
first_column: this.yylloc.first_column,
|
|
last_column: this.yylloc.last_column
|
|
},
|
|
yytext: this.yytext,
|
|
match: this.match,
|
|
matches: this.matches,
|
|
matched: this.matched,
|
|
yyleng: this.yyleng,
|
|
offset: this.offset,
|
|
_more: this._more,
|
|
_input: this._input,
|
|
yy: this.yy,
|
|
conditionStack: this.conditionStack.slice(0),
|
|
done: this.done
|
|
};
|
|
if (this.options.ranges) {
|
|
backup.yylloc.range = this.yylloc.range.slice(0);
|
|
}
|
|
}
|
|
lines = match[0].match(/(?:\r\n?|\n).*/g);
|
|
if (lines) {
|
|
this.yylineno += lines.length;
|
|
}
|
|
this.yylloc = {
|
|
first_line: this.yylloc.last_line,
|
|
last_line: this.yylineno + 1,
|
|
first_column: this.yylloc.last_column,
|
|
last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
|
|
};
|
|
this.yytext += match[0];
|
|
this.match += match[0];
|
|
this.matches = match;
|
|
this.yyleng = this.yytext.length;
|
|
if (this.options.ranges) {
|
|
this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
|
}
|
|
this._more = false;
|
|
this._backtrack = false;
|
|
this._input = this._input.slice(match[0].length);
|
|
this.matched += match[0];
|
|
token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
|
if (this.done && this._input) {
|
|
this.done = false;
|
|
}
|
|
if (token) {
|
|
return token;
|
|
} else if (this._backtrack) {
|
|
for (var k in backup) {
|
|
this[k] = backup[k];
|
|
}
|
|
return false;
|
|
}
|
|
return false;
|
|
},
|
|
// return next match in input
|
|
next: function() {
|
|
if (this.done) {
|
|
return this.EOF;
|
|
}
|
|
if (!this._input) {
|
|
this.done = true;
|
|
}
|
|
var token, match, tempMatch, index;
|
|
if (!this._more) {
|
|
this.yytext = "";
|
|
this.match = "";
|
|
}
|
|
var rules = this._currentRules();
|
|
for (var i = 0; i < rules.length; i++) {
|
|
tempMatch = this._input.match(this.rules[rules[i]]);
|
|
if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
|
match = tempMatch;
|
|
index = i;
|
|
if (this.options.backtrack_lexer) {
|
|
token = this.test_match(tempMatch, rules[i]);
|
|
if (token !== false) {
|
|
return token;
|
|
} else if (this._backtrack) {
|
|
match = false;
|
|
continue;
|
|
} else {
|
|
return false;
|
|
}
|
|
} else if (!this.options.flex) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
if (match) {
|
|
token = this.test_match(match, rules[index]);
|
|
if (token !== false) {
|
|
return token;
|
|
}
|
|
return false;
|
|
}
|
|
if (this._input === "") {
|
|
return this.EOF;
|
|
} else {
|
|
return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
|
|
text: "",
|
|
token: null,
|
|
line: this.yylineno
|
|
});
|
|
}
|
|
},
|
|
// return next match that has a token
|
|
lex: function lex() {
|
|
var r = this.next();
|
|
if (r) {
|
|
return r;
|
|
} else {
|
|
return this.lex();
|
|
}
|
|
},
|
|
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
begin: function begin(condition) {
|
|
this.conditionStack.push(condition);
|
|
},
|
|
// pop the previously active lexer condition state off the condition stack
|
|
popState: function popState() {
|
|
var n = this.conditionStack.length - 1;
|
|
if (n > 0) {
|
|
return this.conditionStack.pop();
|
|
} else {
|
|
return this.conditionStack[0];
|
|
}
|
|
},
|
|
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
_currentRules: function _currentRules() {
|
|
if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
|
return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
|
} else {
|
|
return this.conditions["INITIAL"].rules;
|
|
}
|
|
},
|
|
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
topState: function topState(n) {
|
|
n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
|
if (n >= 0) {
|
|
return this.conditionStack[n];
|
|
} else {
|
|
return "INITIAL";
|
|
}
|
|
},
|
|
// alias for begin(condition)
|
|
pushState: function pushState(condition) {
|
|
this.begin(condition);
|
|
},
|
|
// return the number of states currently on the stack
|
|
stateStackSize: function stateStackSize() {
|
|
return this.conditionStack.length;
|
|
},
|
|
options: { "case-insensitive": true },
|
|
performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
|
|
switch ($avoiding_name_collisions) {
|
|
case 0:
|
|
return "title";
|
|
case 1:
|
|
this.begin("acc_title");
|
|
return 9;
|
|
case 2:
|
|
this.popState();
|
|
return "acc_title_value";
|
|
case 3:
|
|
this.begin("acc_descr");
|
|
return 11;
|
|
case 4:
|
|
this.popState();
|
|
return "acc_descr_value";
|
|
case 5:
|
|
this.begin("acc_descr_multiline");
|
|
break;
|
|
case 6:
|
|
this.popState();
|
|
break;
|
|
case 7:
|
|
return "acc_descr_multiline_value";
|
|
case 8:
|
|
return 5;
|
|
case 9:
|
|
break;
|
|
case 10:
|
|
break;
|
|
case 11:
|
|
break;
|
|
case 12:
|
|
return 8;
|
|
case 13:
|
|
return 6;
|
|
case 14:
|
|
return 19;
|
|
case 15:
|
|
return 30;
|
|
case 16:
|
|
return 22;
|
|
case 17:
|
|
return 21;
|
|
case 18:
|
|
return 24;
|
|
case 19:
|
|
return 26;
|
|
case 20:
|
|
return 28;
|
|
case 21:
|
|
return 31;
|
|
case 22:
|
|
return 32;
|
|
case 23:
|
|
return 33;
|
|
case 24:
|
|
return 34;
|
|
case 25:
|
|
return 35;
|
|
case 26:
|
|
return 36;
|
|
case 27:
|
|
return 37;
|
|
case 28:
|
|
return 38;
|
|
case 29:
|
|
return 39;
|
|
case 30:
|
|
return 40;
|
|
case 31:
|
|
return 41;
|
|
case 32:
|
|
return 42;
|
|
case 33:
|
|
return 43;
|
|
case 34:
|
|
return 44;
|
|
case 35:
|
|
return 55;
|
|
case 36:
|
|
return 56;
|
|
case 37:
|
|
return 57;
|
|
case 38:
|
|
return 58;
|
|
case 39:
|
|
return 59;
|
|
case 40:
|
|
return 60;
|
|
case 41:
|
|
return 61;
|
|
case 42:
|
|
return 47;
|
|
case 43:
|
|
return 49;
|
|
case 44:
|
|
return 51;
|
|
case 45:
|
|
return 54;
|
|
case 46:
|
|
return 53;
|
|
case 47:
|
|
this.begin("string");
|
|
break;
|
|
case 48:
|
|
this.popState();
|
|
break;
|
|
case 49:
|
|
return "qString";
|
|
case 50:
|
|
yy_.yytext = yy_.yytext.trim();
|
|
return 62;
|
|
}
|
|
},
|
|
rules: [/^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:(\r?\n)+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:$)/i, /^(?:requirementDiagram\b)/i, /^(?:\{)/i, /^(?:\})/i, /^(?::)/i, /^(?:id\b)/i, /^(?:text\b)/i, /^(?:risk\b)/i, /^(?:verifyMethod\b)/i, /^(?:requirement\b)/i, /^(?:functionalRequirement\b)/i, /^(?:interfaceRequirement\b)/i, /^(?:performanceRequirement\b)/i, /^(?:physicalRequirement\b)/i, /^(?:designConstraint\b)/i, /^(?:low\b)/i, /^(?:medium\b)/i, /^(?:high\b)/i, /^(?:analysis\b)/i, /^(?:demonstration\b)/i, /^(?:inspection\b)/i, /^(?:test\b)/i, /^(?:element\b)/i, /^(?:contains\b)/i, /^(?:copies\b)/i, /^(?:derives\b)/i, /^(?:satisfies\b)/i, /^(?:verifies\b)/i, /^(?:refines\b)/i, /^(?:traces\b)/i, /^(?:type\b)/i, /^(?:docref\b)/i, /^(?:<-)/i, /^(?:->)/i, /^(?:-)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[\w][^\r\n\{\<\>\-\=]*)/i],
|
|
conditions: { "acc_descr_multiline": { "rules": [6, 7], "inclusive": false }, "acc_descr": { "rules": [4], "inclusive": false }, "acc_title": { "rules": [2], "inclusive": false }, "unqString": { "rules": [], "inclusive": false }, "token": { "rules": [], "inclusive": false }, "string": { "rules": [48, 49], "inclusive": false }, "INITIAL": { "rules": [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 50], "inclusive": true } }
|
|
};
|
|
return lexer2;
|
|
}();
|
|
parser2.lexer = lexer;
|
|
function Parser() {
|
|
this.yy = {};
|
|
}
|
|
Parser.prototype = parser2;
|
|
parser2.Parser = Parser;
|
|
return new Parser();
|
|
}();
|
|
parser.parser = parser;
|
|
const parser$1 = parser;
|
|
let relations = [];
|
|
let latestRequirement = {};
|
|
let requirements = {};
|
|
let latestElement = {};
|
|
let elements = {};
|
|
const RequirementType = {
|
|
REQUIREMENT: "Requirement",
|
|
FUNCTIONAL_REQUIREMENT: "Functional Requirement",
|
|
INTERFACE_REQUIREMENT: "Interface Requirement",
|
|
PERFORMANCE_REQUIREMENT: "Performance Requirement",
|
|
PHYSICAL_REQUIREMENT: "Physical Requirement",
|
|
DESIGN_CONSTRAINT: "Design Constraint"
|
|
};
|
|
const RiskLevel = {
|
|
LOW_RISK: "Low",
|
|
MED_RISK: "Medium",
|
|
HIGH_RISK: "High"
|
|
};
|
|
const VerifyType = {
|
|
VERIFY_ANALYSIS: "Analysis",
|
|
VERIFY_DEMONSTRATION: "Demonstration",
|
|
VERIFY_INSPECTION: "Inspection",
|
|
VERIFY_TEST: "Test"
|
|
};
|
|
const Relationships = {
|
|
CONTAINS: "contains",
|
|
COPIES: "copies",
|
|
DERIVES: "derives",
|
|
SATISFIES: "satisfies",
|
|
VERIFIES: "verifies",
|
|
REFINES: "refines",
|
|
TRACES: "traces"
|
|
};
|
|
const addRequirement = (name, type) => {
|
|
if (requirements[name] === void 0) {
|
|
requirements[name] = {
|
|
name,
|
|
type,
|
|
id: latestRequirement.id,
|
|
text: latestRequirement.text,
|
|
risk: latestRequirement.risk,
|
|
verifyMethod: latestRequirement.verifyMethod
|
|
};
|
|
}
|
|
latestRequirement = {};
|
|
return requirements[name];
|
|
};
|
|
const getRequirements = () => requirements;
|
|
const setNewReqId = (id) => {
|
|
if (latestRequirement !== void 0) {
|
|
latestRequirement.id = id;
|
|
}
|
|
};
|
|
const setNewReqText = (text) => {
|
|
if (latestRequirement !== void 0) {
|
|
latestRequirement.text = text;
|
|
}
|
|
};
|
|
const setNewReqRisk = (risk) => {
|
|
if (latestRequirement !== void 0) {
|
|
latestRequirement.risk = risk;
|
|
}
|
|
};
|
|
const setNewReqVerifyMethod = (verifyMethod) => {
|
|
if (latestRequirement !== void 0) {
|
|
latestRequirement.verifyMethod = verifyMethod;
|
|
}
|
|
};
|
|
const addElement = (name) => {
|
|
if (elements[name] === void 0) {
|
|
elements[name] = {
|
|
name,
|
|
type: latestElement.type,
|
|
docRef: latestElement.docRef
|
|
};
|
|
_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__.l.info("Added new requirement: ", name);
|
|
}
|
|
latestElement = {};
|
|
return elements[name];
|
|
};
|
|
const getElements = () => elements;
|
|
const setNewElementType = (type) => {
|
|
if (latestElement !== void 0) {
|
|
latestElement.type = type;
|
|
}
|
|
};
|
|
const setNewElementDocRef = (docRef) => {
|
|
if (latestElement !== void 0) {
|
|
latestElement.docRef = docRef;
|
|
}
|
|
};
|
|
const addRelationship = (type, src, dst) => {
|
|
relations.push({
|
|
type,
|
|
src,
|
|
dst
|
|
});
|
|
};
|
|
const getRelationships = () => relations;
|
|
const clear = () => {
|
|
relations = [];
|
|
latestRequirement = {};
|
|
requirements = {};
|
|
latestElement = {};
|
|
elements = {};
|
|
(0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__.t)();
|
|
};
|
|
const db = {
|
|
RequirementType,
|
|
RiskLevel,
|
|
VerifyType,
|
|
Relationships,
|
|
getConfig: () => (0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__.c)().req,
|
|
addRequirement,
|
|
getRequirements,
|
|
setNewReqId,
|
|
setNewReqText,
|
|
setNewReqRisk,
|
|
setNewReqVerifyMethod,
|
|
setAccTitle: _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__.s,
|
|
getAccTitle: _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__.g,
|
|
setAccDescription: _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__.b,
|
|
getAccDescription: _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__.a,
|
|
addElement,
|
|
getElements,
|
|
setNewElementType,
|
|
setNewElementDocRef,
|
|
addRelationship,
|
|
getRelationships,
|
|
clear
|
|
};
|
|
const getStyles = (options) => `
|
|
|
|
marker {
|
|
fill: ${options.relationColor};
|
|
stroke: ${options.relationColor};
|
|
}
|
|
|
|
marker.cross {
|
|
stroke: ${options.lineColor};
|
|
}
|
|
|
|
svg {
|
|
font-family: ${options.fontFamily};
|
|
font-size: ${options.fontSize};
|
|
}
|
|
|
|
.reqBox {
|
|
fill: ${options.requirementBackground};
|
|
fill-opacity: 1.0;
|
|
stroke: ${options.requirementBorderColor};
|
|
stroke-width: ${options.requirementBorderSize};
|
|
}
|
|
|
|
.reqTitle, .reqLabel{
|
|
fill: ${options.requirementTextColor};
|
|
}
|
|
.reqLabelBox {
|
|
fill: ${options.relationLabelBackground};
|
|
fill-opacity: 1.0;
|
|
}
|
|
|
|
.req-title-line {
|
|
stroke: ${options.requirementBorderColor};
|
|
stroke-width: ${options.requirementBorderSize};
|
|
}
|
|
.relationshipLine {
|
|
stroke: ${options.relationColor};
|
|
stroke-width: 1;
|
|
}
|
|
.relationshipLabel {
|
|
fill: ${options.relationLabelColor};
|
|
}
|
|
|
|
`;
|
|
const styles = getStyles;
|
|
const ReqMarkers = {
|
|
CONTAINS: "contains",
|
|
ARROW: "arrow"
|
|
};
|
|
const insertLineEndings = (parentNode, conf2) => {
|
|
let containsNode = parentNode.append("defs").append("marker").attr("id", ReqMarkers.CONTAINS + "_line_ending").attr("refX", 0).attr("refY", conf2.line_height / 2).attr("markerWidth", conf2.line_height).attr("markerHeight", conf2.line_height).attr("orient", "auto").append("g");
|
|
containsNode.append("circle").attr("cx", conf2.line_height / 2).attr("cy", conf2.line_height / 2).attr("r", conf2.line_height / 2).attr("fill", "none");
|
|
containsNode.append("line").attr("x1", 0).attr("x2", conf2.line_height).attr("y1", conf2.line_height / 2).attr("y2", conf2.line_height / 2).attr("stroke-width", 1);
|
|
containsNode.append("line").attr("y1", 0).attr("y2", conf2.line_height).attr("x1", conf2.line_height / 2).attr("x2", conf2.line_height / 2).attr("stroke-width", 1);
|
|
parentNode.append("defs").append("marker").attr("id", ReqMarkers.ARROW + "_line_ending").attr("refX", conf2.line_height).attr("refY", 0.5 * conf2.line_height).attr("markerWidth", conf2.line_height).attr("markerHeight", conf2.line_height).attr("orient", "auto").append("path").attr(
|
|
"d",
|
|
`M0,0
|
|
L${conf2.line_height},${conf2.line_height / 2}
|
|
M${conf2.line_height},${conf2.line_height / 2}
|
|
L0,${conf2.line_height}`
|
|
).attr("stroke-width", 1);
|
|
};
|
|
const markers = {
|
|
ReqMarkers,
|
|
insertLineEndings
|
|
};
|
|
let conf = {};
|
|
let relCnt = 0;
|
|
const newRectNode = (parentNode, id) => {
|
|
return parentNode.insert("rect", "#" + id).attr("class", "req reqBox").attr("x", 0).attr("y", 0).attr("width", conf.rect_min_width + "px").attr("height", conf.rect_min_height + "px");
|
|
};
|
|
const newTitleNode = (parentNode, id, txts) => {
|
|
let x = conf.rect_min_width / 2;
|
|
let title = parentNode.append("text").attr("class", "req reqLabel reqTitle").attr("id", id).attr("x", x).attr("y", conf.rect_padding).attr("dominant-baseline", "hanging");
|
|
let i = 0;
|
|
txts.forEach((textStr) => {
|
|
if (i == 0) {
|
|
title.append("tspan").attr("text-anchor", "middle").attr("x", conf.rect_min_width / 2).attr("dy", 0).text(textStr);
|
|
} else {
|
|
title.append("tspan").attr("text-anchor", "middle").attr("x", conf.rect_min_width / 2).attr("dy", conf.line_height * 0.75).text(textStr);
|
|
}
|
|
i++;
|
|
});
|
|
let yPadding = 1.5 * conf.rect_padding;
|
|
let linePadding = i * conf.line_height * 0.75;
|
|
let totalY = yPadding + linePadding;
|
|
parentNode.append("line").attr("class", "req-title-line").attr("x1", "0").attr("x2", conf.rect_min_width).attr("y1", totalY).attr("y2", totalY);
|
|
return {
|
|
titleNode: title,
|
|
y: totalY
|
|
};
|
|
};
|
|
const newBodyNode = (parentNode, id, txts, yStart) => {
|
|
let body = parentNode.append("text").attr("class", "req reqLabel").attr("id", id).attr("x", conf.rect_padding).attr("y", yStart).attr("dominant-baseline", "hanging");
|
|
let currentRow = 0;
|
|
const charLimit = 30;
|
|
let wrappedTxts = [];
|
|
txts.forEach((textStr) => {
|
|
let currentTextLen = textStr.length;
|
|
while (currentTextLen > charLimit && currentRow < 3) {
|
|
let firstPart = textStr.substring(0, charLimit);
|
|
textStr = textStr.substring(charLimit, textStr.length);
|
|
currentTextLen = textStr.length;
|
|
wrappedTxts[wrappedTxts.length] = firstPart;
|
|
currentRow++;
|
|
}
|
|
if (currentRow == 3) {
|
|
let lastStr = wrappedTxts[wrappedTxts.length - 1];
|
|
wrappedTxts[wrappedTxts.length - 1] = lastStr.substring(0, lastStr.length - 4) + "...";
|
|
} else {
|
|
wrappedTxts[wrappedTxts.length] = textStr;
|
|
}
|
|
currentRow = 0;
|
|
});
|
|
wrappedTxts.forEach((textStr) => {
|
|
body.append("tspan").attr("x", conf.rect_padding).attr("dy", conf.line_height).text(textStr);
|
|
});
|
|
return body;
|
|
};
|
|
const addEdgeLabel = (parentNode, svgPath, conf2, txt) => {
|
|
const len = svgPath.node().getTotalLength();
|
|
const labelPoint = svgPath.node().getPointAtLength(len * 0.5);
|
|
const labelId = "rel" + relCnt;
|
|
relCnt++;
|
|
const labelNode = parentNode.append("text").attr("class", "req relationshipLabel").attr("id", labelId).attr("x", labelPoint.x).attr("y", labelPoint.y).attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(txt);
|
|
const labelBBox = labelNode.node().getBBox();
|
|
parentNode.insert("rect", "#" + labelId).attr("class", "req reqLabelBox").attr("x", labelPoint.x - labelBBox.width / 2).attr("y", labelPoint.y - labelBBox.height / 2).attr("width", labelBBox.width).attr("height", labelBBox.height).attr("fill", "white").attr("fill-opacity", "85%");
|
|
};
|
|
const drawRelationshipFromLayout = function(svg, rel, g, insert, diagObj) {
|
|
const edge = g.edge(elementString(rel.src), elementString(rel.dst));
|
|
const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .jvg)().x(function(d) {
|
|
return d.x;
|
|
}).y(function(d) {
|
|
return d.y;
|
|
});
|
|
const svgPath = svg.insert("path", "#" + insert).attr("class", "er relationshipLine").attr("d", lineFunction(edge.points)).attr("fill", "none");
|
|
if (rel.type == diagObj.db.Relationships.CONTAINS) {
|
|
svgPath.attr(
|
|
"marker-start",
|
|
"url(" + _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__.e.getUrl(conf.arrowMarkerAbsolute) + "#" + rel.type + "_line_ending)"
|
|
);
|
|
} else {
|
|
svgPath.attr("stroke-dasharray", "10,7");
|
|
svgPath.attr(
|
|
"marker-end",
|
|
"url(" + _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__.e.getUrl(conf.arrowMarkerAbsolute) + "#" + markers.ReqMarkers.ARROW + "_line_ending)"
|
|
);
|
|
}
|
|
addEdgeLabel(svg, svgPath, conf, `<<${rel.type}>>`);
|
|
return;
|
|
};
|
|
const drawReqs = (reqs, graph, svgNode) => {
|
|
Object.keys(reqs).forEach((reqName) => {
|
|
let req = reqs[reqName];
|
|
reqName = elementString(reqName);
|
|
_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__.l.info("Added new requirement: ", reqName);
|
|
const groupNode = svgNode.append("g").attr("id", reqName);
|
|
const textId = "req-" + reqName;
|
|
const rectNode = newRectNode(groupNode, textId);
|
|
let titleNodeInfo = newTitleNode(groupNode, reqName + "_title", [
|
|
`<<${req.type}>>`,
|
|
`${req.name}`
|
|
]);
|
|
newBodyNode(
|
|
groupNode,
|
|
reqName + "_body",
|
|
[
|
|
`Id: ${req.id}`,
|
|
`Text: ${req.text}`,
|
|
`Risk: ${req.risk}`,
|
|
`Verification: ${req.verifyMethod}`
|
|
],
|
|
titleNodeInfo.y
|
|
);
|
|
const rectBBox = rectNode.node().getBBox();
|
|
graph.setNode(reqName, {
|
|
width: rectBBox.width,
|
|
height: rectBBox.height,
|
|
shape: "rect",
|
|
id: reqName
|
|
});
|
|
});
|
|
};
|
|
const drawElements = (els, graph, svgNode) => {
|
|
Object.keys(els).forEach((elName) => {
|
|
let el = els[elName];
|
|
const id = elementString(elName);
|
|
const groupNode = svgNode.append("g").attr("id", id);
|
|
const textId = "element-" + id;
|
|
const rectNode = newRectNode(groupNode, textId);
|
|
let titleNodeInfo = newTitleNode(groupNode, textId + "_title", [`<<Element>>`, `${elName}`]);
|
|
newBodyNode(
|
|
groupNode,
|
|
textId + "_body",
|
|
[`Type: ${el.type || "Not Specified"}`, `Doc Ref: ${el.docRef || "None"}`],
|
|
titleNodeInfo.y
|
|
);
|
|
const rectBBox = rectNode.node().getBBox();
|
|
graph.setNode(id, {
|
|
width: rectBBox.width,
|
|
height: rectBBox.height,
|
|
shape: "rect",
|
|
id
|
|
});
|
|
});
|
|
};
|
|
const addRelationships = (relationships, g) => {
|
|
relationships.forEach(function(r) {
|
|
let src = elementString(r.src);
|
|
let dst = elementString(r.dst);
|
|
g.setEdge(src, dst, { relationship: r });
|
|
});
|
|
return relationships;
|
|
};
|
|
const adjustEntities = function(svgNode, graph) {
|
|
graph.nodes().forEach(function(v) {
|
|
if (v !== void 0 && graph.node(v) !== void 0) {
|
|
svgNode.select("#" + v);
|
|
svgNode.select("#" + v).attr(
|
|
"transform",
|
|
"translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y - graph.node(v).height / 2) + " )"
|
|
);
|
|
}
|
|
});
|
|
return;
|
|
};
|
|
const elementString = (str) => {
|
|
return str.replace(/\s/g, "").replace(/\./g, "_");
|
|
};
|
|
const draw = (text, id, _version, diagObj) => {
|
|
conf = (0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__.c)().requirement;
|
|
const securityLevel = conf.securityLevel;
|
|
let sandboxElement;
|
|
if (securityLevel === "sandbox") {
|
|
sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)("#i" + id);
|
|
}
|
|
const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)("body");
|
|
const svg = root.select(`[id='${id}']`);
|
|
markers.insertLineEndings(svg, conf);
|
|
const g = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__/* .Graph */ .k({
|
|
multigraph: false,
|
|
compound: false,
|
|
directed: true
|
|
}).setGraph({
|
|
rankdir: conf.layoutDirection,
|
|
marginx: 20,
|
|
marginy: 20,
|
|
nodesep: 100,
|
|
edgesep: 100,
|
|
ranksep: 100
|
|
}).setDefaultEdgeLabel(function() {
|
|
return {};
|
|
});
|
|
let requirements2 = diagObj.db.getRequirements();
|
|
let elements2 = diagObj.db.getElements();
|
|
let relationships = diagObj.db.getRelationships();
|
|
drawReqs(requirements2, g, svg);
|
|
drawElements(elements2, g, svg);
|
|
addRelationships(relationships, g);
|
|
(0,dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_1__/* .layout */ .bK)(g);
|
|
adjustEntities(svg, g);
|
|
relationships.forEach(function(rel) {
|
|
drawRelationshipFromLayout(svg, rel, g, id, diagObj);
|
|
});
|
|
const padding = conf.rect_padding;
|
|
const svgBounds = svg.node().getBBox();
|
|
const width = svgBounds.width + padding * 2;
|
|
const height = svgBounds.height + padding * 2;
|
|
(0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__.i)(svg, height, width, conf.useMaxWidth);
|
|
svg.attr("viewBox", `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`);
|
|
};
|
|
const renderer = {
|
|
draw
|
|
};
|
|
const diagram = {
|
|
parser: parser$1,
|
|
db,
|
|
renderer,
|
|
styles
|
|
};
|
|
|
|
|
|
|
|
/***/ })
|
|
|
|
};
|
|
; |