diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml deleted file mode 100644 index 95720c7..0000000 --- a/.github/workflows/node.js.yml +++ /dev/null @@ -1,30 +0,0 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - -name: Node.js CI - -on: - push: - branches: ["dev", "main"] - pull_request: - branches: ["dev", "main"] - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [18.x, 20.x, 22.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - - steps: - - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - cache: "yarn" # Cache yarn dependencies - - run: yarn install - - run: yarn build --if-present - - run: yarn test diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index d43bd32..0493c85 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1,14 +1,9 @@ name: Validate NeuroJson_io Project on: - push: - branches: - - dev - - main pull_request: branches: - - dev - - main + - "*" jobs: validate: @@ -21,7 +16,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v3 with: - node-version: '18' + node-version: "18" - name: Install dependencies run: yarn install @@ -29,8 +24,5 @@ jobs: - name: Compile TypeScript run: yarn build - - name: Run Linter - run: yarn lint - - name: Run Security Audit run: yarn audit --level moderate diff --git a/.gitignore b/.gitignore index 992f45f..ba2e89d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .env node_modules .DS_Store +package-lock.json \ No newline at end of file diff --git a/build/asset-manifest.json b/build/asset-manifest.json deleted file mode 100644 index c2ddb8a..0000000 --- a/build/asset-manifest.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "files": { - "main.js": "/static/js/main.44f93a4f.js", - "index.html": "/index.html", - "main.44f93a4f.js.map": "/static/js/main.44f93a4f.js.map" - }, - "entrypoints": [ - "static/js/main.44f93a4f.js" - ] -} \ No newline at end of file diff --git a/build/index.html b/build/index.html deleted file mode 100644 index e04e8b9..0000000 --- a/build/index.html +++ /dev/null @@ -1 +0,0 @@ -NeuroJSON.io - Free Data Worth Sharing
\ No newline at end of file diff --git a/build/static/js/main.44f93a4f.js b/build/static/js/main.44f93a4f.js deleted file mode 100644 index afe146c..0000000 --- a/build/static/js/main.44f93a4f.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see main.44f93a4f.js.LICENSE.txt */ -!function(){var e={110:function(e,t,n){"use strict";var r=n(309),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?o:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=o;var u=Object.defineProperty,c=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var i=f(n);i&&i!==p&&e(t,i,r)}var o=c(n);h&&(o=o.concat(h(n)));for(var s=l(t),v=l(n),m=0;m1&&(r=Array.prototype.splice.call(arguments,1));for(var a=0;a19?function(t){var n=e.getLinks(t);return n?1+n.size/3:1}:function(t){var n=e.getLinks(t);return n?1+n.length/3:1};t&&"function"===typeof t.nodeMass&&(o=t.nodeMass);var s=new Map,l={},u=0,c=a.settings.springTransform||i;u=0,e.forEachNode((function(e){m(e.id),u+=1})),e.forEachLink(y),e.on("changed",v);var h=!1,d={step:function(){if(0===u)return f(!0),!0;var e=a.step();d.lastMove=e,d.fire("step");var t=e/u<=.01;return f(t),t},getNodePosition:function(e){return x(e).pos},setNodePosition:function(e){var t=x(e);t.setPosition.apply(t,Array.prototype.slice.call(arguments,1))},getLinkPosition:function(e){var t=l[e];if(t)return{from:t.from.pos,to:t.to.pos}},getGraphRect:function(){return a.getBBox()},forEachBody:p,pinNode:function(e,t){x(e.id).isPinned=!!t},isNodePinned:function(e){return x(e.id).isPinned},dispose:function(){e.off("changed",v),d.fire("disposed")},getBody:function(e){return s.get(e)},getSpring:function(t,n){var r;if(void 0===n)r="object"!==typeof t?t:t.id;else{var i=e.hasLink(t,n);if(!i)return;r=i.id}return l[r]},getForceVectorLength:function(){var e=0,t=0;return p((function(n){e+=Math.abs(n.force.x),t+=Math.abs(n.force.y)})),Math.sqrt(e*e+t*t)},simulator:a,graph:e,lastMove:0};return r(d),d;function f(e){var t;h!==e&&(h=e,t=e,d.fire("stable",t))}function p(e){s.forEach(e)}function v(t){for(var n=0;n max_{var}) max_{var} = bodyPos.{var};",{indent:6}),"\n }\n\n ").concat(t("boundingBox.min_{var} = min_{var};",{indent:4}),"\n ").concat(t("boundingBox.max_{var} = max_{var};",{indent:4}),"\n }\n\n function resetBoundingBox() {\n ").concat(t("boundingBox.min_{var} = boundingBox.max_{var} = 0;",{indent:4}),"\n }\n")}},525:function(e,t,n){var r=n(842);function i(e,t){return"\n".concat(o(e,t),"\n").concat(a(e),"\nreturn {Body: Body, Vector: Vector};\n")}function a(e){var t=r(e),n=t("{var}",{join:", "});return"\nfunction Body(".concat(n,") {\n this.isPinned = false;\n this.pos = new Vector(").concat(n,");\n this.force = new Vector();\n this.velocity = new Vector();\n this.mass = 1;\n\n this.springCount = 0;\n this.springLength = 0;\n}\n\nBody.prototype.reset = function() {\n this.force.reset();\n this.springCount = 0;\n this.springLength = 0;\n}\n\nBody.prototype.setPosition = function (").concat(n,") {\n ").concat(t("this.pos.{var} = {var} || 0;",{indent:2}),"\n};")}function o(e,t){var n=r(e),i="";t&&(i="".concat(n("\n var v{var};\nObject.defineProperty(this, '{var}', {\n set: function(v) { \n if (!Number.isFinite(v)) throw new Error('Cannot set non-numbers to {var}');\n v{var} = v; \n },\n get: function() { return v{var}; }\n});")));var a=n("{var}",{join:", "});return"function Vector(".concat(a,") {\n ").concat(i,"\n if (typeof arguments[0] === 'object') {\n // could be another vector\n let v = arguments[0];\n ").concat(n('if (!Number.isFinite(v.{var})) throw new Error("Expected value is not a finite number at Vector constructor ({var})");',{indent:4}),"\n ").concat(n("this.{var} = v.{var};",{indent:4}),"\n } else {\n ").concat(n('this.{var} = typeof {var} === "number" ? {var} : 0;',{indent:4}),"\n }\n }\n \n Vector.prototype.reset = function () {\n ").concat(n("this.{var} = ",{join:""}),"0;\n };")}e.exports=function(e,t){var n=i(e,t);return new Function(n)().Body},e.exports.generateCreateBodyFunctionBody=i,e.exports.getVectorCode=o,e.exports.getBodyCode=a},947:function(e,t,n){var r=n(842);function i(e){var t=r(e);return"\n if (!Number.isFinite(options.dragCoefficient)) throw new Error('dragCoefficient is not a finite number');\n\n return {\n update: function(body) {\n ".concat(t("body.force.{var} -= options.dragCoefficient * body.velocity.{var};",{indent:6}),"\n }\n };\n")}e.exports=function(e){var t=i(e);return new Function("options",t)},e.exports.generateCreateDragForceFunctionBody=i},63:function(e,t,n){var r=n(842);function i(e){var t=r(e);return"\n if (!Number.isFinite(options.springCoefficient)) throw new Error('Spring coefficient is not a number');\n if (!Number.isFinite(options.springLength)) throw new Error('Spring length is not a number');\n\n return {\n /**\n * Updates forces acting on a spring\n */\n update: function (spring) {\n var body1 = spring.from;\n var body2 = spring.to;\n var length = spring.length < 0 ? options.springLength : spring.length;\n ".concat(t("var d{var} = body2.pos.{var} - body1.pos.{var};",{indent:6}),"\n var r = Math.sqrt(").concat(t("d{var} * d{var}",{join:" + "}),");\n\n if (r === 0) {\n ").concat(t("d{var} = (random.nextDouble() - 0.5) / 50;",{indent:8}),"\n r = Math.sqrt(").concat(t("d{var} * d{var}",{join:" + "}),");\n }\n\n var d = r - length;\n var coefficient = ((spring.coefficient > 0) ? spring.coefficient : options.springCoefficient) * d / r;\n\n ").concat(t("body1.force.{var} += coefficient * d{var}",{indent:6}),";\n body1.springCount += 1;\n body1.springLength += r;\n\n ").concat(t("body2.force.{var} -= coefficient * d{var}",{indent:6}),";\n body2.springCount += 1;\n body2.springLength += r;\n }\n };\n")}e.exports=function(e){var t=i(e);return new Function("options","random",t)},e.exports.generateCreateSpringForceFunctionBody=i},100:function(e,t,n){var r=n(842);function i(e){var t=r(e);return"\n var length = bodies.length;\n if (length === 0) return 0;\n\n ".concat(t("var d{var} = 0, t{var} = 0;",{indent:2}),"\n\n for (var i = 0; i < length; ++i) {\n var body = bodies[i];\n if (body.isPinned) continue;\n\n if (adaptiveTimeStepWeight && body.springCount) {\n timeStep = (adaptiveTimeStepWeight * body.springLength/body.springCount);\n }\n\n var coeff = timeStep / body.mass;\n\n ").concat(t("body.velocity.{var} += coeff * body.force.{var};",{indent:4}),"\n ").concat(t("var v{var} = body.velocity.{var};",{indent:4}),"\n var v = Math.sqrt(").concat(t("v{var} * v{var}",{join:" + "}),");\n\n if (v > 1) {\n // We normalize it so that we move within timeStep range. \n // for the case when v <= 1 - we let velocity to fade out.\n ").concat(t("body.velocity.{var} = v{var} / v;",{indent:6}),"\n }\n\n ").concat(t("d{var} = timeStep * body.velocity.{var};",{indent:4}),"\n\n ").concat(t("body.pos.{var} += d{var};",{indent:4}),"\n\n ").concat(t("t{var} += Math.abs(d{var});",{indent:4}),"\n }\n\n return (").concat(t("t{var} * t{var}",{join:" + "}),")/length;\n")}e.exports=function(e){var t=i(e);return new Function("bodies","timeStep","adaptiveTimeStepWeight",t)},e.exports.generateIntegratorFunctionBody=i},547:function(e,t,n){var r=n(842),i=n(302);function a(e){var t=r(e),n=Math.pow(2,e);return"\n".concat("\n/**\n * Our implementation of QuadTree is non-recursive to avoid GC hit\n * This data structure represent stack of elements\n * which we are trying to insert into quad tree.\n */\nfunction InsertStack () {\n this.stack = [];\n this.popIdx = 0;\n}\n\nInsertStack.prototype = {\n isEmpty: function() {\n return this.popIdx === 0;\n },\n push: function (node, body) {\n var item = this.stack[this.popIdx];\n if (!item) {\n // we are trying to avoid memory pressure: create new element\n // only when absolutely necessary\n this.stack[this.popIdx] = new InsertStackElement(node, body);\n } else {\n item.node = node;\n item.body = body;\n }\n ++this.popIdx;\n },\n pop: function () {\n if (this.popIdx > 0) {\n return this.stack[--this.popIdx];\n }\n },\n reset: function () {\n this.popIdx = 0;\n }\n};\n\nfunction InsertStackElement(node, body) {\n this.node = node; // QuadTree node\n this.body = body; // physical body which needs to be inserted to node\n}\n","\n").concat(u(e),"\n").concat(o(e),"\n").concat(l(e),"\n").concat(s(e),"\n\nfunction createQuadTree(options, random) {\n options = options || {};\n options.gravity = typeof options.gravity === 'number' ? options.gravity : -1;\n options.theta = typeof options.theta === 'number' ? options.theta : 0.8;\n\n var gravity = options.gravity;\n var updateQueue = [];\n var insertStack = new InsertStack();\n var theta = options.theta;\n\n var nodesCache = [];\n var currentInCache = 0;\n var root = newNode();\n\n return {\n insertBodies: insertBodies,\n\n /**\n * Gets root node if it is present\n */\n getRoot: function() {\n return root;\n },\n\n updateBodyForce: update,\n\n options: function(newOptions) {\n if (newOptions) {\n if (typeof newOptions.gravity === 'number') {\n gravity = newOptions.gravity;\n }\n if (typeof newOptions.theta === 'number') {\n theta = newOptions.theta;\n }\n\n return this;\n }\n\n return {\n gravity: gravity,\n theta: theta\n };\n }\n };\n\n function newNode() {\n // To avoid pressure on GC we reuse nodes.\n var node = nodesCache[currentInCache];\n if (node) {\n").concat(function(e){for(var t=[],r=0;r {var}max) {var}max = pos.{var};",{indent:6}),"\n }\n\n // Makes the bounds square.\n var maxSideLength = -Infinity;\n ").concat(t("if ({var}max - {var}min > maxSideLength) maxSideLength = {var}max - {var}min ;",{indent:4}),"\n\n currentInCache = 0;\n root = newNode();\n ").concat(t("root.min_{var} = {var}min;",{indent:4}),"\n ").concat(t("root.max_{var} = {var}min + maxSideLength;",{indent:4}),"\n\n i = bodies.length - 1;\n if (i >= 0) {\n root.body = bodies[i];\n }\n while (i--) {\n insert(bodies[i], root);\n }\n }\n\n function insert(newBody) {\n insertStack.reset();\n insertStack.push(root, newBody);\n\n while (!insertStack.isEmpty()) {\n var stackItem = insertStack.pop();\n var node = stackItem.node;\n var body = stackItem.body;\n\n if (!node.body) {\n // This is internal node. Update the total mass of the node and center-of-mass.\n ").concat(t("var {var} = body.pos.{var};",{indent:8}),"\n node.mass += body.mass;\n ").concat(t("node.mass_{var} += body.mass * {var};",{indent:8}),"\n\n // Recursively insert the body in the appropriate quadrant.\n // But first find the appropriate quadrant.\n var quadIdx = 0; // Assume we are in the 0's quad.\n ").concat(t("var min_{var} = node.min_{var};",{indent:8}),"\n ").concat(t("var max_{var} = (min_{var} + node.max_{var}) / 2;",{indent:8}),"\n\n").concat(function(t){for(var n=[],r=Array(t+1).join(" "),a=0;a max_").concat(i(a),") {")),n.push(r+" quadIdx = quadIdx + ".concat(Math.pow(2,a),";")),n.push(r+" min_".concat(i(a)," = max_").concat(i(a),";")),n.push(r+" max_".concat(i(a)," = node.max_").concat(i(a),";")),n.push(r+"}");return n.join("\n")}(8),"\n\n var child = getChild(node, quadIdx);\n\n if (!child) {\n // The node is internal but this quadrant is not taken. Add\n // subnode to it.\n child = newNode();\n ").concat(t("child.min_{var} = min_{var};",{indent:10}),"\n ").concat(t("child.max_{var} = max_{var};",{indent:10}),"\n child.body = body;\n\n setChild(node, quadIdx, child);\n } else {\n // continue searching in this quadrant.\n insertStack.push(child, body);\n }\n } else {\n // We are trying to add to the leaf node.\n // We have to convert current leaf into internal node\n // and continue adding two nodes.\n var oldBody = node.body;\n node.body = null; // internal nodes do not cary bodies\n\n if (isSamePosition(oldBody.pos, body.pos)) {\n // Prevent infinite subdivision by bumping one node\n // anywhere in this quadrant\n var retriesCount = 3;\n do {\n var offset = random.nextDouble();\n ").concat(t("var d{var} = (node.max_{var} - node.min_{var}) * offset;",{indent:12}),"\n\n ").concat(t("oldBody.pos.{var} = node.min_{var} + d{var};",{indent:12}),"\n retriesCount -= 1;\n // Make sure we don't bump it out of the box. If we do, next iteration should fix it\n } while (retriesCount > 0 && isSamePosition(oldBody.pos, body.pos));\n\n if (retriesCount === 0 && isSamePosition(oldBody.pos, body.pos)) {\n // This is very bad, we ran out of precision.\n // if we do not return from the method we'll get into\n // infinite loop here. So we sacrifice correctness of layout, and keep the app running\n // Next layout iteration should get larger bounding box in the first step and fix this\n return;\n }\n }\n // Next iteration should subdivide node further.\n insertStack.push(node, oldBody);\n insertStack.push(node, body);\n }\n }\n }\n}\nreturn createQuadTree;\n\n")}function o(e){var t=r(e);return"\n function isSamePosition(point1, point2) {\n ".concat(t("var d{var} = Math.abs(point1.{var} - point2.{var});",{indent:2}),"\n \n return ").concat(t("d{var} < 1e-8",{join:" && "}),";\n } \n")}function s(e){var t=Math.pow(2,e);return"\nfunction setChild(node, idx, child) {\n ".concat(function(){for(var e=[],n=0;n 0) {\n return this.stack[--this.popIdx];\n }\n },\n reset: function () {\n this.popIdx = 0;\n }\n};\n\nfunction InsertStackElement(node, body) {\n this.node = node; // QuadTree node\n this.body = body; // physical body which needs to be inserted to node\n}\n"}e.exports=function(e){var t=a(e);return new Function(t)()},e.exports.generateQuadTreeFunctionBody=a,e.exports.getInsertStackCode=c,e.exports.getQuadNodeCode=u,e.exports.isSamePosition=o,e.exports.getChildBodyCode=l,e.exports.setChildBodyCode=s},302:function(e){e.exports=function(e){return 0===e?"x":1===e?"y":2===e?"z":"c"+(e+1)}},618:function(e,t,n){e.exports=function(e){var t=n(422),h=n(147),d=n(10);if(e){if(void 0!==e.springCoeff)throw new Error("springCoeff was renamed to springCoefficient");if(void 0!==e.dragCoeff)throw new Error("dragCoeff was renamed to dragCoefficient")}e=h(e,{springLength:10,springCoefficient:.8,gravity:-12,theta:.8,dragCoefficient:.9,timeStep:.5,adaptiveTimeStepWeight:0,dimensions:2,debug:!1});var f=u[e.dimensions];if(!f){var p=e.dimensions;f={Body:r(p,e.debug),createQuadTree:i(p),createBounds:a(p),createDragForce:o(p),createSpringForce:s(p),integrate:l(p)},u[p]=f}var v=f.Body,m=f.createQuadTree,g=f.createBounds,y=f.createDragForce,_=f.createSpringForce,b=f.integrate,x=n(165).random(42),S=[],w=[],E=m(e,x),M=g(S,e,x),T=_(e,x),k=y(e),A=[],C=new Map,P=0;L("nbody",(function(){if(0===S.length)return;E.insertBodies(S);var e=S.length;for(;e--;){var t=S[e];t.isPinned||(t.reset(),E.updateBodyForce(t),k.update(t))}})),L("spring",(function(){var e=w.length;for(;e--;)T.update(w[e])}));var R={bodies:S,quadTree:E,springs:w,settings:e,addForce:L,removeForce:function(e){var t=A.indexOf(C.get(e));if(t<0)return;A.splice(t,1),C.delete(e)},getForces:function(){return C},step:function(){for(var t=0;t=0?i:-1);return w.push(a),a},getTotalMovement:function(){return 0},removeSpring:function(e){if(e){var t=w.indexOf(e);return t>-1?(w.splice(t,1),!0):void 0}},getBestNewBodyPosition:function(e){return M.getBestNewPosition(e)},getBBox:O,getBoundingBox:O,invalidateBBox:function(){console.warn("invalidateBBox() is deprecated, bounds always recomputed on `getBBox()` call")},gravity:function(t){return void 0!==t?(e.gravity=t,E.options({gravity:t}),this):e.gravity},theta:function(t){return void 0!==t?(e.theta=t,E.options({theta:t}),this):e.theta},random:x};return function(e,t){for(var n in e)c(e,t,n)}(e,R),d(R),R;function O(){return M.update(),M.box}function L(e,t){if(C.has(e))throw new Error("Force "+e+" is already added");C.set(e,t),A.push(t)}};var r=n(525),i=n(547),a=n(282),o=n(947),s=n(63),l=n(100),u={};function c(e,t,n){if(e.hasOwnProperty(n)&&"function"!==typeof t[n]){var r=Number.isFinite(e[n]);t[n]=r?function(r){if(void 0!==r){if(!Number.isFinite(r))throw new Error("Value of "+n+" should be a valid number.");return e[n]=r,t}return e[n]}:function(r){return void 0!==r?(e[n]=r,t):e[n]}}}},422:function(e){e.exports=function(e,t,n,r){this.from=e,this.to=t,this.length=n,this.coefficient=r}},700:function(e,t,n){e.exports=function(e){"uniqueLinkId"in(e=e||{})&&(console.warn("ngraph.graph: Starting from version 0.14 `uniqueLinkId` is deprecated.\nUse `multigraph` option instead\n","\n","Note: there is also change in default behavior: From now on each graph\nis considered to be not a multigraph by default (each edge is unique)."),e.multigraph=e.uniqueLinkId);void 0===e.multigraph&&(e.multigraph=!1);if("function"!==typeof Map)throw new Error("ngraph.graph requires `Map` to be defined. Please polyfill it before using ngraph");var t=new Map,n=new Map,l={},u=0,c=e.multigraph?function(e,t,n){var r=s(e,t),i=l.hasOwnProperty(r);if(i||M(e,t)){i||(l[r]=0);var a="@"+ ++l[r];r=s(e+a,t+a)}return new o(e,t,n,r)}:function(e,t,r){var i=s(e,t),a=n.get(i);if(a)return a.data=r,a;return new o(e,t,r,i)},h=[],d=T,f=T,p=T,v=T,m={version:20,addNode:_,addLink:function(e,t,r){p();var i=b(e)||_(e),o=b(t)||_(t),s=c(e,t,r),l=n.has(s.id);n.set(s.id,s),a(i,s),e!==t&&a(o,s);return d(s,l?"update":"add"),v(),s},removeLink:function(e,t){void 0!==t&&(e=M(e,t));return E(e)},removeNode:x,getNode:b,getNodeCount:S,getLinkCount:w,getEdgeCount:w,getLinksCount:w,getNodesCount:S,getLinks:function(e){var t=b(e);return t?t.links:null},forEachNode:C,forEachLinkedNode:function(e,n,r){var i=b(e);if(i&&i.links&&"function"===typeof n)return r?function(e,n,r){var i=e.values(),a=i.next();for(;!a.done;){var o=a.value;if(o.fromId===n&&r(t.get(o.toId),o))return!0;a=i.next()}}(i.links,e,n):function(e,n,r){var i=e.values(),a=i.next();for(;!a.done;){var o=a.value,s=o.fromId===n?o.toId:o.fromId;if(r(t.get(s),o))return!0;a=i.next()}}(i.links,e,n)},forEachLink:function(e){if("function"===typeof e)for(var t=n.values(),r=t.next();!r.done;){if(e(r.value))return!0;r=t.next()}},beginUpdate:p,endUpdate:v,clear:function(){p(),C((function(e){x(e.id)})),v()},hasLink:M,hasNode:b,getLink:M};return r(m),function(){var e=m.on;function t(){return m.beginUpdate=p=k,m.endUpdate=v=A,d=g,f=y,m.on=e,e.apply(m,arguments)}m.on=t}(),m;function g(e,t){h.push({link:e,changeType:t})}function y(e,t){h.push({node:e,changeType:t})}function _(e,n){if(void 0===e)throw new Error("Invalid node identifier");p();var r=b(e);return r?(r.data=n,f(r,"update")):(r=new i(e,n),f(r,"add")),t.set(e,r),v(),r}function b(e){return t.get(e)}function x(e){var n=b(e);if(!n)return!1;p();var r=n.links;return r&&(r.forEach(E),n.links=null),t.delete(e),f(n,"remove"),v(),!0}function S(){return t.size}function w(){return n.size}function E(e){if(!e)return!1;if(!n.get(e.id))return!1;p(),n.delete(e.id);var t=b(e.fromId),r=b(e.toId);return t&&t.links.delete(e),r&&r.links.delete(e),d(e,"remove"),v(),!0}function M(e,t){if(void 0!==e&&void 0!==t)return n.get(s(e,t))}function T(){}function k(){u+=1}function A(){0===(u-=1)&&h.length>0&&(m.fire("changed",h),h.length=0)}function C(e){if("function"!==typeof e)throw new Error("Function is expected to iterate over graph nodes. You passed "+e);for(var n=t.values(),r=n.next();!r.done;){if(e(r.value))return!0;r=n.next()}}};var r=n(10);function i(e,t){this.id=e,this.links=null,this.data=t}function a(e,t){e.links?e.links.add(t):e.links=new Set([t])}function o(e,t,n,r){this.fromId=e,this.toId=t,this.data=n,this.id=r}function s(e,t){return e.toString()+"\ud83d\udc49 "+t.toString()}},147:function(e){e.exports=function e(t,n){var r;t||(t={});if(n)for(r in n)if(n.hasOwnProperty(r)){var i=t.hasOwnProperty(r),a=typeof n[r];!i||typeof t[r]!==a?t[r]=n[r]:"object"===a&&(t[r]=e(t[r],n[r]))}return t}},165:function(e){function t(e){return new n("number"===typeof e?e:+new Date)}function n(e){this.seed=e}function r(e){return Math.sqrt(2*Math.PI/e)*Math.pow(1/Math.E*(e+1/(12*e-1/(10*e))),e)}function i(){var e=this.seed;return e=4294967295&(3042594569^(e=(e=4294967295&((e=(e=4294967295&(3345072700^(e=e+2127912214+(e<<12)&4294967295)^e>>>19))+374761393+(e<<5)&4294967295)+3550635116^e<<9))+4251993797+(e<<3)&4294967295)^e>>>16),this.seed=e,(268435455&e)/268435456}e.exports=t,e.exports.random=t,e.exports.randomIterator=function(e,n){var r=n||t();if("function"!==typeof r.next)throw new Error("customRandom does not match expected API: next() function is missing");return{forEach:function(t){var n,i,a;for(n=e.length-1;n>0;--n)i=r.next(n+1),a=e[i],e[i]=e[n],e[n]=a,t(a);e.length&&t(e[0])},shuffle:function(){var t,n,i;for(t=e.length-1;t>0;--t)n=r.next(t+1),i=e[n],e[n]=e[t],e[t]=i;return e}}},n.prototype.next=function(e){return Math.floor(this.nextDouble()*e)},n.prototype.nextDouble=i,n.prototype.uniform=i,n.prototype.gaussian=function(){var e,t,n;do{e=(t=2*this.nextDouble()-1)*t+(n=2*this.nextDouble()-1)*n}while(e>=1||0===e);return t*Math.sqrt(-2*Math.log(e)/e)},n.prototype.levy=function(){var e=1.5,t=Math.pow(r(2.5)*Math.sin(Math.PI*e/2)/(r(1.25)*e*Math.pow(2,.25)),1/e);return this.gaussian()*t/Math.pow(Math.abs(this.gaussian()),1/e)}},463:function(e,t,n){"use strict";var r=n(791),i=n(296);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n