Comparing version 0.0.12 to 0.0.13
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.f6=e():t.f6=e()}(this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=250)}({10:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.camelize=e.isString=void 0;e.isString=function(t){return"string"==typeof t};var n,o,i=/-(\w)/g;e.camelize=(n=function(t){return t.replace(i,(function(t,e){return e?e.toUpperCase():""}))},o=Object.create(null),function(t){return o[t]||(o[t]=n(t))})},11:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isArray=void 0,e.isArray=Array.isArray},12:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toNumber=e.isNaN=e.isNumber=void 0;e.isNumber=function(t){return"number"==typeof t};e.isNaN=function(t){return Number.isNaN(Number(t))};e.toNumber=function(t){var r=parseFloat(t);return e.isNaN(r)?t:r}},13:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.traverseTreeUp=e.scaleMatrix=e.getAdjMatrix=e.floydWarshall=e.getDegree=void 0;e.getDegree=function(t,e,r){for(var n=[],o=0;o<t;o++)n[o]=0;return r?(r.forEach((function(t){t.source&&(n[e[t.source]]+=1),t.target&&(n[e[t.target]]+=1)})),n):n};e.floydWarshall=function(t){for(var e=[],r=t.length,n=0;n<r;n+=1){e[n]=[];for(var o=0;o<r;o+=1)n===o?e[n][o]=0:0!==t[n][o]&&t[n][o]?e[n][o]=t[n][o]:e[n][o]=1/0}for(var i=0;i<r;i+=1)for(n=0;n<r;n+=1)for(o=0;o<r;o+=1)e[n][o]>e[n][i]+e[i][o]&&(e[n][o]=e[n][i]+e[i][o]);return e};e.getAdjMatrix=function(t,e){var r=t.nodes,n=t.edges,o=[],i={};if(!r)throw new Error("invalid nodes data!");return r&&r.forEach((function(t,e){i[t.id]=e;o.push([])})),n&&n.forEach((function(t){var r=t.source,n=t.target,u=i[r],s=i[n];o[u][s]=1,e||(o[s][u]=1)})),o};e.scaleMatrix=function(t,e){var r=[];return t.forEach((function(t){var n=[];t.forEach((function(t){n.push(t*e)})),r.push(n)})),r};e.traverseTreeUp=function(t,e){"function"==typeof e&&function t(e,r){if(e&&e.children)for(var n=e.children.length-1;n>=0;n--)if(!t(e.children[n],r))return;return!!r(e)}(t,e)}},14:function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=this&&this.__assign||function(){return(o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.clone=e.isObject=void 0;e.isObject=function(t){return null!==t&&"object"===n(t)};e.clone=function(t){if(null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){var r=[];return t.forEach((function(t){r.push(t)})),r.map((function(t){return e.clone(t)}))}if("object"===n(t)&&t!=={}){var i=o({},t);return Object.keys(i).forEach((function(t){i[t]=e.clone(i[t])})),i}return t}},15:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isFunction=void 0;e.isFunction=function(t){return"function"==typeof t}},189:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.CircularLayout=void 0;var i=r(5),u=r(9);function s(t,e){var r=t.degree,n=e.degree;return r<n?-1:r>n?1:0}var c=function(t){function e(e){var r=t.call(this)||this;return r.radius=null,r.startRadius=null,r.endRadius=null,r.startAngle=0,r.endAngle=2*Math.PI,r.clockwise=!0,r.divisions=1,r.ordering=null,r.angleRatio=1,r.nodes=[],r.edges=[],r.nodeMap={},r.degrees=[],r.width=300,r.height=300,r.updateCfg(e),r}return o(e,t),e.prototype.getDefaultCfg=function(){return{radius:null,startRadius:null,endRadius:null,startAngle:0,endAngle:2*Math.PI,clockwise:!0,divisions:1,ordering:null,angleRatio:1}},e.prototype.execute=function(){var t=this.nodes,e=this.edges,r=t.length;if(0!==r){this.width||"undefined"==typeof window||(this.width=window.innerWidth),this.height||"undefined"==typeof window||(this.height=window.innerHeight),this.center||(this.center=[this.width/2,this.height/2]);var n=this.center;if(1===r)return t[0].x=n[0],t[0].y=n[1],void(this.onLayoutEnd&&this.onLayoutEnd());var o=this.radius,i=this.startRadius,s=this.endRadius,c=this.divisions,a=this.startAngle,f=this.endAngle,d=(f-a)/r,l={};t.forEach((function(t,e){l[t.id]=e})),this.nodeMap=l;var h=u.getDegree(t.length,l,e);this.degrees=h,o||i||s?!i&&s?i=s:i&&!s&&(s=i):o=this.height>this.width?this.width/2:this.height/2;var p=d*this.angleRatio,y=this.ordering,g=[];g="topology"===y?this.topologyOrdering():"topology-directed"===y?this.topologyOrdering(!0):"degree"===y?this.degreeOrdering():t;for(var v=this.clockwise,b=Math.ceil(r/c),_=0;_<r;++_){var O=o;O||null===i||null===s||(O=i+_*(s-i)/(r-1)),O||(O=10+100*_/(r-1));var j=a+_%b*p+2*Math.PI/c*Math.floor(_/b);v||(j=f-_%b*p-2*Math.PI/c*Math.floor(_/b)),g[_].x=n[0]+Math.cos(j)*O,g[_].y=n[1]+Math.sin(j)*O,g[_].weight=h[_]}return this.onLayoutEnd&&this.onLayoutEnd(),{nodes:g,edges:this.edges}}this.onLayoutEnd&&this.onLayoutEnd()},e.prototype.topologyOrdering=function(t){void 0===t&&(t=!1);var e=this.degrees,r=this.edges,n=this.nodes,o=u.clone(n),i=this.nodeMap,s=[o[0]],c=[n[0]],a=[],f=n.length;a[0]=!0,function(t,e,r,n){t.forEach((function(e,r){t[r].children=[],t[r].parent=[]})),n?e.forEach((function(e){var n=0;e.source&&(n=r[e.source]);var o=0;e.target&&(o=r[e.target]);var i=t[n].children,u=t[o].parent;i.push(t[o].id),u.push(t[n].id)})):e.forEach((function(e){var n=0;e.source&&(n=r[e.source]);var o=0;e.target&&(o=r[e.target]);var i=t[n].children,u=t[o].children;i.push(t[o].id),u.push(t[n].id)}))}(o,r,i,t);var d=0;return o.forEach((function(t,u){if(0!==u)if(u!==f-1&&e[u]===e[u+1]&&!function(t,e,r){for(var n=r.length,o=0;o<n;o++)if(t.id===r[o].source&&e.id===r[o].target||e.id===r[o].source&&t.id===r[o].target)return!0;return!1}(s[d],t,r)||a[u]){for(var l=s[d].children,h=!1,p=0;p<l.length;p++){var y=i[l[p]];if(e[y]===e[u]&&!a[y]){s.push(o[y]),c.push(n[i[o[y].id]]),a[y]=!0,h=!0;break}}for(var g=0;!h&&(a[g]||(s.push(o[g]),c.push(n[i[o[g].id]]),a[g]=!0,h=!0),++g!==f););}else s.push(t),c.push(n[i[t.id]]),a[u]=!0,d++})),c},e.prototype.degreeOrdering=function(){var t=this.nodes,e=[],r=this.degrees;return t.forEach((function(t,n){t.degree=r[n],e.push(t)})),e.sort(s),e},e.prototype.getType=function(){return"circular"},e}(i.Base);e.CircularLayout=c},250:function(t,e,r){"use strict";r.r(e);var n=r(189);e.default=n.CircularLayout},5:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Base=void 0;var n=function(){function t(){this.nodes=[],this.edges=[],this.combos=[],this.positions=[],this.destroyed=!1,this.onLayoutEnd=function(){}}return t.prototype.layout=function(t){return this.init(t),this.execute(!0)},t.prototype.init=function(t){this.nodes=t.nodes||[],this.edges=t.edges||[],this.combos=t.combos||[]},t.prototype.execute=function(t){},t.prototype.executeWithWorker=function(){},t.prototype.getDefaultCfg=function(){return{}},t.prototype.updateCfg=function(t){t&&Object.assign(this,t)},t.prototype.getType=function(){return"base"},t.prototype.destroy=function(){this.nodes=null,this.edges=null,this.combos=null,this.positions=null,this.destroyed=!0},t}();e.Base=n},9:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),o(r(10),e),o(r(11),e),o(r(12),e),o(r(13),e),o(r(14),e),o(r(15),e)}}).default})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.f6=e():t.f6=e()}(this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=250)}({10:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.camelize=e.isString=void 0;e.isString=function(t){return"string"==typeof t};var n,o,i=/-(\w)/g;e.camelize=(n=function(t){return t.replace(i,(function(t,e){return e?e.toUpperCase():""}))},o=Object.create(null),function(t){return o[t]||(o[t]=n(t))})},11:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isArray=void 0,e.isArray=Array.isArray},12:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toNumber=e.isNaN=e.isNumber=void 0;e.isNumber=function(t){return"number"==typeof t};e.isNaN=function(t){return Number.isNaN(Number(t))};e.toNumber=function(t){var r=parseFloat(t);return e.isNaN(r)?t:r}},13:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.traverseTreeUp=e.scaleMatrix=e.getAdjMatrix=e.floydWarshall=e.getDegree=void 0;e.getDegree=function(t,e,r){for(var n=[],o=0;o<t;o++)n[o]=0;return r?(r.forEach((function(t){t.source&&(n[e[t.source]]+=1),t.target&&(n[e[t.target]]+=1)})),n):n};e.floydWarshall=function(t){for(var e=[],r=t.length,n=0;n<r;n+=1){e[n]=[];for(var o=0;o<r;o+=1)n===o?e[n][o]=0:0!==t[n][o]&&t[n][o]?e[n][o]=t[n][o]:e[n][o]=1/0}for(var i=0;i<r;i+=1)for(n=0;n<r;n+=1)for(o=0;o<r;o+=1)e[n][o]>e[n][i]+e[i][o]&&(e[n][o]=e[n][i]+e[i][o]);return e};e.getAdjMatrix=function(t,e){var r=t.nodes,n=t.edges,o=[],i={};if(!r)throw new Error("invalid nodes data!");return r&&r.forEach((function(t,e){i[t.id]=e;o.push([])})),n&&n.forEach((function(t){var r=t.source,n=t.target,u=i[r],s=i[n];o[u][s]=1,e||(o[s][u]=1)})),o};e.scaleMatrix=function(t,e){var r=[];return t.forEach((function(t){var n=[];t.forEach((function(t){n.push(t*e)})),r.push(n)})),r};var n=function(t,e){if(t&&t.children)for(var r=t.children.length-1;r>=0;r--)if(!n(t.children[r],e))return;return!!e(t)};e.traverseTreeUp=function(t,e){"function"==typeof e&&n(t,e)}},14:function(t,e,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.clone=e.isObject=void 0;e.isObject=function(t){return null!==t&&"object"==typeof t};e.clone=function(t){if(null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){var r=[];return t.forEach((function(t){r.push(t)})),r.map((function(t){return e.clone(t)}))}if("object"==typeof t&&t!=={}){var o=n({},t);return Object.keys(o).forEach((function(t){o[t]=e.clone(o[t])})),o}return t}},15:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isFunction=void 0;e.isFunction=function(t){return"function"==typeof t}},189:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.CircularLayout=void 0;var i=r(5),u=r(9);function s(t,e){var r=t.degree,n=e.degree;return r<n?-1:r>n?1:0}var c=function(t){function e(e){var r=t.call(this)||this;return r.radius=null,r.startRadius=null,r.endRadius=null,r.startAngle=0,r.endAngle=2*Math.PI,r.clockwise=!0,r.divisions=1,r.ordering=null,r.angleRatio=1,r.nodes=[],r.edges=[],r.nodeMap={},r.degrees=[],r.width=300,r.height=300,r.updateCfg(e),r}return o(e,t),e.prototype.getDefaultCfg=function(){return{radius:null,startRadius:null,endRadius:null,startAngle:0,endAngle:2*Math.PI,clockwise:!0,divisions:1,ordering:null,angleRatio:1}},e.prototype.execute=function(){var t=this.nodes,e=this.edges,r=t.length;if(0!==r){this.width||"undefined"==typeof window||(this.width=window.innerWidth),this.height||"undefined"==typeof window||(this.height=window.innerHeight),this.center||(this.center=[this.width/2,this.height/2]);var n=this.center;if(1===r)return t[0].x=n[0],t[0].y=n[1],void(this.onLayoutEnd&&this.onLayoutEnd());var o=this.radius,i=this.startRadius,s=this.endRadius,c=this.divisions,a=this.startAngle,f=this.endAngle,d=(f-a)/r,l={};t.forEach((function(t,e){l[t.id]=e})),this.nodeMap=l;var h=u.getDegree(t.length,l,e);this.degrees=h,o||i||s?!i&&s?i=s:i&&!s&&(s=i):o=this.height>this.width?this.width/2:this.height/2;var p=d*this.angleRatio,g=this.ordering,y=[];y="topology"===g?this.topologyOrdering():"topology-directed"===g?this.topologyOrdering(!0):"degree"===g?this.degreeOrdering():t;for(var v=this.clockwise,b=Math.ceil(r/c),_=0;_<r;++_){var O=o;O||null===i||null===s||(O=i+_*(s-i)/(r-1)),O||(O=10+100*_/(r-1));var j=a+_%b*p+2*Math.PI/c*Math.floor(_/b);v||(j=f-_%b*p-2*Math.PI/c*Math.floor(_/b)),y[_].x=n[0]+Math.cos(j)*O,y[_].y=n[1]+Math.sin(j)*O,y[_].weight=h[_]}return this.onLayoutEnd&&this.onLayoutEnd(),{nodes:y,edges:this.edges}}this.onLayoutEnd&&this.onLayoutEnd()},e.prototype.topologyOrdering=function(t){void 0===t&&(t=!1);var e=this.degrees,r=this.edges,n=this.nodes,o=u.clone(n),i=this.nodeMap,s=[o[0]],c=[n[0]],a=[],f=n.length;a[0]=!0,function(t,e,r,n){t.forEach((function(e,r){t[r].children=[],t[r].parent=[]})),n?e.forEach((function(e){var n=0;e.source&&(n=r[e.source]);var o=0;e.target&&(o=r[e.target]);var i=t[n].children,u=t[o].parent;i.push(t[o].id),u.push(t[n].id)})):e.forEach((function(e){var n=0;e.source&&(n=r[e.source]);var o=0;e.target&&(o=r[e.target]);var i=t[n].children,u=t[o].children;i.push(t[o].id),u.push(t[n].id)}))}(o,r,i,t);var d=0;return o.forEach((function(t,u){if(0!==u)if(u!==f-1&&e[u]===e[u+1]&&!function(t,e,r){for(var n=r.length,o=0;o<n;o++)if(t.id===r[o].source&&e.id===r[o].target||e.id===r[o].source&&t.id===r[o].target)return!0;return!1}(s[d],t,r)||a[u]){for(var l=s[d].children,h=!1,p=0;p<l.length;p++){var g=i[l[p]];if(e[g]===e[u]&&!a[g]){s.push(o[g]),c.push(n[i[o[g].id]]),a[g]=!0,h=!0;break}}for(var y=0;!h&&(a[y]||(s.push(o[y]),c.push(n[i[o[y].id]]),a[y]=!0,h=!0),++y!==f););}else s.push(t),c.push(n[i[t.id]]),a[u]=!0,d++})),c},e.prototype.degreeOrdering=function(){var t=this.nodes,e=[],r=this.degrees;return t.forEach((function(t,n){t.degree=r[n],e.push(t)})),e.sort(s),e},e.prototype.getType=function(){return"circular"},e}(i.Base);e.CircularLayout=c},250:function(t,e,r){"use strict";r.r(e);var n=r(189);e.default=n.CircularLayout},5:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Base=void 0;var n=function(){function t(){this.nodes=[],this.edges=[],this.combos=[],this.positions=[],this.destroyed=!1,this.onLayoutEnd=function(){}}return t.prototype.layout=function(t){return this.init(t),this.execute(!0)},t.prototype.init=function(t){this.nodes=t.nodes||[],this.edges=t.edges||[],this.combos=t.combos||[]},t.prototype.execute=function(t){},t.prototype.executeWithWorker=function(){},t.prototype.getDefaultCfg=function(){return{}},t.prototype.updateCfg=function(t){t&&Object.assign(this,t)},t.prototype.getType=function(){return"base"},t.prototype.destroy=function(){this.nodes=null,this.edges=null,this.combos=null,this.positions=null,this.destroyed=!0},t.prototype.onTick=function(){},t}();e.Base=n},9:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),o(r(10),e),o(r(11),e),o(r(12),e),o(r(13),e),o(r(14),e),o(r(15),e)}}).default})); | ||
//# sourceMappingURL=circularLayout.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.f6=t():e.f6=t()}(this,(function(){return function(e){var t={};function o(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=e,o.c=t,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=251)}({10:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelize=t.isString=void 0;t.isString=function(e){return"string"==typeof e};var r,n,i=/-(\w)/g;t.camelize=(r=function(e){return e.replace(i,(function(e,t){return t?t.toUpperCase():""}))},n=Object.create(null),function(e){return n[e]||(n[e]=r(e))})},11:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArray=void 0,t.isArray=Array.isArray},12:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toNumber=t.isNaN=t.isNumber=void 0;t.isNumber=function(e){return"number"==typeof e};t.isNaN=function(e){return Number.isNaN(Number(e))};t.toNumber=function(e){var o=parseFloat(e);return t.isNaN(o)?e:o}},13:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.traverseTreeUp=t.scaleMatrix=t.getAdjMatrix=t.floydWarshall=t.getDegree=void 0;t.getDegree=function(e,t,o){for(var r=[],n=0;n<e;n++)r[n]=0;return o?(o.forEach((function(e){e.source&&(r[t[e.source]]+=1),e.target&&(r[t[e.target]]+=1)})),r):r};t.floydWarshall=function(e){for(var t=[],o=e.length,r=0;r<o;r+=1){t[r]=[];for(var n=0;n<o;n+=1)r===n?t[r][n]=0:0!==e[r][n]&&e[r][n]?t[r][n]=e[r][n]:t[r][n]=1/0}for(var i=0;i<o;i+=1)for(r=0;r<o;r+=1)for(n=0;n<o;n+=1)t[r][n]>t[r][i]+t[i][n]&&(t[r][n]=t[r][i]+t[i][n]);return t};t.getAdjMatrix=function(e,t){var o=e.nodes,r=e.edges,n=[],i={};if(!o)throw new Error("invalid nodes data!");return o&&o.forEach((function(e,t){i[e.id]=t;n.push([])})),r&&r.forEach((function(e){var o=e.source,r=e.target,c=i[o],a=i[r];n[c][a]=1,t||(n[a][c]=1)})),n};t.scaleMatrix=function(e,t){var o=[];return e.forEach((function(e){var r=[];e.forEach((function(e){r.push(e*t)})),o.push(r)})),o};t.traverseTreeUp=function(e,t){"function"==typeof t&&function e(t,o){if(t&&t.children)for(var r=t.children.length-1;r>=0;r--)if(!e(t.children[r],o))return;return!!o(t)}(e,t)}},14:function(e,t,o){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.clone=t.isObject=void 0;t.isObject=function(e){return null!==e&&"object"===r(e)};t.clone=function(e){if(null===e)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array){var o=[];return e.forEach((function(e){o.push(e)})),o.map((function(e){return t.clone(e)}))}if("object"===r(e)&&e!=={}){var i=n({},e);return Object.keys(i).forEach((function(e){i[e]=t.clone(i[e])})),i}return e}},15:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=void 0;t.isFunction=function(e){return"function"==typeof e}},190:function(e,t,o){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0}),t.ComboForceLayout=void 0;var i=o(5),c=o(9),a=function(e){function t(t){var o=e.call(this)||this;return o.center=[0,0],o.maxIteration=100,o.gravity=10,o.comboGravity=10,o.linkDistance=10,o.alpha=1,o.alphaMin=.001,o.alphaDecay=1-Math.pow(o.alphaMin,1/300),o.alphaTarget=0,o.velocityDecay=.6,o.edgeStrength=.6,o.nodeStrength=30,o.preventOverlap=!1,o.preventNodeOverlap=!1,o.preventComboOverlap=!1,o.collideStrength=void 0,o.nodeCollideStrength=.5,o.comboCollideStrength=.5,o.comboSpacing=20,o.comboPadding=10,o.optimizeRangeFactor=1,o.onTick=function(){},o.onLayoutEnd=function(){},o.depthAttractiveForceScale=1,o.depthRepulsiveForceScale=2,o.nodes=[],o.edges=[],o.combos=[],o.comboTrees=[],o.width=300,o.height=300,o.bias=[],o.nodeMap={},o.oriComboMap={},o.indexMap={},o.comboMap={},o.previousLayouted=!1,o.updateCfg(t),o}return n(t,e),t.prototype.getDefaultCfg=function(){return{maxIteration:100,center:[0,0],gravity:10,speed:1,comboGravity:30,preventOverlap:!1,preventComboOverlap:!0,preventNodeOverlap:!0,nodeSpacing:void 0,collideStrength:void 0,nodeCollideStrength:.5,comboCollideStrength:.5,comboSpacing:20,comboPadding:10,edgeStrength:.6,nodeStrength:30,linkDistance:10}},t.prototype.execute=function(){var e=this.nodes,t=this.center;if(this.comboTree={id:"comboTreeRoot",depth:-1,children:this.comboTrees},e&&0!==e.length){if(1===e.length)return e[0].x=t[0],e[0].y=t[1],void(this.onLayoutEnd&&this.onLayoutEnd());this.initVals(),this.run(),this.onLayoutEnd&&this.onLayoutEnd()}else this.onLayoutEnd&&this.onLayoutEnd()},t.prototype.run=function(){var e=this,t=e.nodes,o=e.previousLayouted?e.maxIteration/5:e.maxIteration;e.width||"undefined"==typeof window||(e.width=window.innerWidth),e.height||"undefined"==typeof window||(e.height=window.innerHeight);var r=e.center,n=e.velocityDecay,i=e.comboMap;e.previousLayouted||e.initPos(i);for(var a=function(o){var r=[];t.forEach((function(e,t){r[t]={x:0,y:0}})),e.applyCalculate(r),e.applyComboCenterForce(r),t.forEach((function(e,t){c.isNumber(e.x)&&c.isNumber(e.y)&&(e.x+=r[t].x*n,e.y+=r[t].y*n)})),e.alpha+=(e.alphaTarget-e.alpha)*e.alphaDecay,e.onTick()},u=0;u<o;u++)a();var s=[0,0];t.forEach((function(e){c.isNumber(e.x)&&c.isNumber(e.y)&&(s[0]+=e.x,s[1]+=e.y)})),s[0]/=t.length,s[1]/=t.length;var f=[r[0]-s[0],r[1]-s[1]];t.forEach((function(e,t){c.isNumber(e.x)&&c.isNumber(e.y)&&(e.x+=f[0],e.y+=f[1])})),e.combos.forEach((function(e){var t=i[e.id];t&&t.empty&&(e.x=t.cx||e.x,e.y=t.cy||e.y)})),e.previousLayouted=!0},t.prototype.initVals=function(){var e=this.edges,t=this.nodes,o=this.combos,r={},n={},i={};t.forEach((function(e,t){n[e.id]=e,i[e.id]=t})),this.nodeMap=n,this.indexMap=i;var a={};o.forEach((function(e){a[e.id]=e})),this.oriComboMap=a,this.comboMap=this.getComboMap();var u=this.preventOverlap;this.preventComboOverlap=this.preventComboOverlap||u,this.preventNodeOverlap=this.preventNodeOverlap||u;var s=this.collideStrength;s&&(this.comboCollideStrength=s,this.nodeCollideStrength=s),this.comboCollideStrength=this.comboCollideStrength?this.comboCollideStrength:0,this.nodeCollideStrength=this.nodeCollideStrength?this.nodeCollideStrength:0;for(var f=0;f<e.length;++f)r[e[f].source]?r[e[f].source]++:r[e[f].source]=1,r[e[f].target]?r[e[f].target]++:r[e[f].target]=1;var d=[];for(f=0;f<e.length;++f)d[f]=r[e[f].source]/(r[e[f].source]+r[e[f].target]);this.bias=d;var p,h,l=this.nodeSize,y=this.nodeSpacing;if(h=c.isNumber(y)?function(){return y}:c.isFunction(y)?y:function(){return 0},this.nodeSpacing=h,l)if(c.isFunction(l))p=function(e){return l(e)};else if(c.isArray(l)){var v=(l[0]>l[1]?l[0]:l[1])/2;p=function(e){return v}}else{var m=l/2;p=function(e){return m}}else p=function(e){return e.size?c.isArray(e.size)?(e.size[0]>e.size[1]?e.size[0]:e.size[1])/2:e.size/2:10};this.nodeSize=p;var b,g=this.comboSpacing;b=c.isNumber(g)?function(){return g}:c.isFunction(g)?g:function(){return 0},this.comboSpacing=b;var x,S=this.comboPadding;x=c.isNumber(S)?function(){return S}:c.isArray(S)?function(){return Math.max.apply(null,S)}:c.isFunction(S)?S:function(){return 0},this.comboPadding=x;var M,O=this.linkDistance;O||(O=10),M=c.isNumber(O)?function(e){return O}:O,this.linkDistance=M;var N,C=this.edgeStrength;C||(C=1),N=c.isNumber(C)?function(e){return C}:C,this.edgeStrength=N;var E,_=this.nodeStrength;_||(_=30),E=c.isNumber(_)?function(e){return _}:_,this.nodeStrength=E},t.prototype.initPos=function(e){this.nodes.forEach((function(t,o){var r=t.comboId,n=e[r];r&&n?(t.x=n.cx+100/(o+1),t.y=n.cy+100/(o+1)):(t.x=100/(o+1),t.y=100/(o+1))}))},t.prototype.getComboMap=function(){var e=this,t=e.nodeMap,o=e.indexMap,r=e.comboTrees,n=e.oriComboMap,i={};return(r||[]).forEach((function(r){var a=[];c.traverseTreeUp(r,(function(r){if("node"===r.itemType)return!0;if(!n[r.id])return!0;if(void 0===i[r.id]){var u={id:r.id,name:r.id,cx:0,cy:0,count:0,depth:e.oriComboMap[r.id].depth,children:[]};i[r.id]=u}var s=r.children;s&&s.forEach((function(e){if(!i[e.id]&&!t[e.id])return!0;a.push(e)}));var f=i[r.id];if(f.cx=0,f.cy=0,0===a.length){f.empty=!0;var d=n[r.id],p=Object.keys(t).length,h=r.id+"-visual-child-"+p,l={id:h,x:d.x,y:d.y,depth:f.depth+1,itemType:"node"};e.nodes.push(l),t[h]=l,o[h]=p,f.cx=d.x,f.cy=d.y,a.push(l)}return a.forEach((function(e){if(f.count++,"node"!==e.itemType){var o=i[e.id];return c.isNumber(o.cx)&&(f.cx+=o.cx),void(c.isNumber(o.cy)&&(f.cy+=o.cy))}var r=t[e.id];r&&(c.isNumber(r.x)&&(f.cx+=r.x),c.isNumber(r.y)&&(f.cy+=r.y))})),f.cx/=f.count,f.cy/=f.count,f.children=a,!0}))})),i},t.prototype.applyComboCenterForce=function(e){var t=this.gravity,o=this.comboGravity||t,r=this.alpha,n=this.comboTrees,i=this.indexMap,a=this.nodeMap,u=this.comboMap;(n||[]).forEach((function(t){c.traverseTreeUp(t,(function(t){if("node"===t.itemType)return!0;if(!u[t.id])return!0;var n=u[t.id],s=(n.depth+1)/10*.5,f=n.cx,d=n.cy;return n.cx=0,n.cy=0,n.children.forEach((function(t){if("node"!==t.itemType){var p=u[t.id];return p&&c.isNumber(p.cx)&&(n.cx+=p.cx),void(p&&c.isNumber(p.cy)&&(n.cy+=p.cy))}var h=a[t.id],l=h.x-f||.005,y=h.y-d||.005,v=Math.sqrt(l*l+y*y),m=i[h.id],b=o*r/v*s;e[m].x-=l*b,e[m].y-=y*b,c.isNumber(h.x)&&(n.cx+=h.x),c.isNumber(h.y)&&(n.cy+=h.y)})),n.cx/=n.count,n.cy/=n.count,!0}))}))},t.prototype.applyCalculate=function(e){var t=this.comboMap,o=this.nodes,r={};o.forEach((function(e,t){o.forEach((function(o,n){if(!(t<n)){var i=e.x-o.x||.005,c=e.y-o.y||.005,a=i*i+c*c,u=Math.sqrt(a);a<1&&(a=u),r[e.id+"-"+o.id]={vx:i,vy:c,vl2:a,vl:u},r[o.id+"-"+e.id]={vl2:a,vl:u,vx:-i,vy:-c}}}))})),this.updateComboSizes(t),this.calRepulsive(e,r),this.calAttractive(e,r),this.preventComboOverlap&&this.comboNonOverlapping(e,t)},t.prototype.updateComboSizes=function(e){var t=this,o=t.comboTrees,r=t.nodeMap,n=t.nodeSize,i=t.comboSpacing,a=t.comboPadding;(o||[]).forEach((function(o){var u=[];c.traverseTreeUp(o,(function(o){if("node"===o.itemType)return!0;var s=e[o.id];if(!s)return!1;var f=o.children;f&&f.forEach((function(t){(e[t.id]||r[t.id])&&u.push(t)})),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0,u.forEach((function(e){if("node"!==e.itemType)return!0;var t=r[e.id];if(!t)return!0;var o=n(t),i=t.x-o,c=t.y-o,a=t.x+o,u=t.y+o;s.minX>i&&(s.minX=i),s.minY>c&&(s.minY=c),s.maxX<a&&(s.maxX=a),s.maxY<u&&(s.maxY=u)}));var d=t.oriComboMap[o.id].size||10;c.isArray(d)&&(d=d[0]);var p=Math.max(s.maxX-s.minX,s.maxY-s.minY,d);return s.r=p/2+i(s)/2+a(s),!0}))}))},t.prototype.comboNonOverlapping=function(e,t){var o=this.comboTree,r=this.comboCollideStrength,n=this.indexMap,i=this.nodeMap;c.traverseTreeUp(o,(function(o){if(!t[o.id]&&!i[o.id]&&"comboTreeRoot"!==o.id)return!1;var c=o.children;return c&&c.length>1&&c.forEach((function(o,a){if("node"===o.itemType)return!1;var u=t[o.id];u&&c.forEach((function(c,s){if(a<=s)return!1;if("node"===c.itemType)return!1;var f=t[c.id];if(!f)return!1;var d=u.cx-f.cx||.005,p=u.cy-f.cy||.005,h=d*d+p*p,l=u.r,y=f.r,v=l+y,m=y*y,b=l*l;if(h<v*v){var g=o.children;if(!g||0===g.length)return!1;var x=c.children;if(!x||0===x.length)return!1;var S=Math.sqrt(h),M=(v-S)/S*r,O=d*M,N=p*M,C=m/(b+m),E=1-C;g.forEach((function(t){if("node"!==t.itemType)return!1;if(i[t.id]){var o=n[t.id];x.forEach((function(t){if("node"!==t.itemType)return!1;if(!i[t.id])return!1;var r=n[t.id];e[o].x+=O*C,e[o].y+=N*C,e[r].x-=O*E,e[r].y-=N*E}))}}))}}))})),!0}))},t.prototype.calRepulsive=function(e,t){var o=this,r=o.nodes,n=o.width*o.optimizeRangeFactor,i=o.nodeStrength,c=o.alpha,a=o.nodeCollideStrength,u=o.preventNodeOverlap,s=o.nodeSize,f=o.nodeSpacing,d=o.depthRepulsiveForceScale,p=o.center;r.forEach((function(h,l){if(h.x&&h.y){if(p){var y=o.gravity,v=h.x-p[0]||.005,m=h.y-p[1]||.005,b=Math.sqrt(v*v+m*m);e[l].x-=v*y*c/b,e[l].y-=m*y*c/b}r.forEach((function(o,r){if(l!==r&&o.x&&o.y){var p=t[h.id+"-"+o.id],y=p.vl2,v=p.vl;if(!(v>n)){var m=t[h.id+"-"+o.id],b=m.vx,g=m.vy,x=Math.log(Math.abs(o.depth-h.depth)/10)+1||1;x=x<1?1:x,o.comboId!==h.comboId&&(x+=1);var S=x?Math.pow(d,x):1,M=i(o)*c/y*S;if(e[l].x+=b*M,e[l].y+=g*M,l<r&&u){var O=s(h)+f(h),N=s(o)+f(o),C=O+N;if(y<C*C){var E=(C-v)/v*a,_=N*N,j=_/(O*O+_),T=b*E,w=g*E;e[l].x+=T*j,e[l].y+=w*j,j=1-j,e[r].x-=T*j,e[r].y-=w*j}}}}}))}}))},t.prototype.calAttractive=function(e,t){var o=this,r=o.edges,n=o.linkDistance,i=o.alpha,a=o.edgeStrength,u=o.bias,s=o.depthAttractiveForceScale;r.forEach((function(r,f){if(r.source&&r.target&&r.source!==r.target){var d=o.indexMap[r.source],p=o.indexMap[r.target],h=o.nodeMap[r.source],l=o.nodeMap[r.target];if(h&&l){var y=Math.log(Math.abs(h.depth-l.depth)/10);h.comboId===l.comboId&&(y/=2);var v=y?Math.pow(s,y):1;if(h.comboId!==l.comboId&&1===v?v=s/2:h.comboId===l.comboId&&(v=2),c.isNumber(l.x)&&c.isNumber(h.x)&&c.isNumber(l.y)&&c.isNumber(h.y)){var m=t[r.target+"-"+r.source],b=m.vl,g=m.vx,x=m.vy,S=(b-n(r))/b*i*a(r)*v,M=g*S,O=x*S,N=u[f];e[p].x-=M*N,e[p].y-=O*N,e[d].x+=M*(1-N),e[d].y+=O*(1-N)}}}}))},t.prototype.getType=function(){return"comboForce"},t}(i.Base);t.ComboForceLayout=a},251:function(e,t,o){"use strict";o.r(t);var r=o(190);t.default=r.ComboForceLayout},5:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Base=void 0;var r=function(){function e(){this.nodes=[],this.edges=[],this.combos=[],this.positions=[],this.destroyed=!1,this.onLayoutEnd=function(){}}return e.prototype.layout=function(e){return this.init(e),this.execute(!0)},e.prototype.init=function(e){this.nodes=e.nodes||[],this.edges=e.edges||[],this.combos=e.combos||[]},e.prototype.execute=function(e){},e.prototype.executeWithWorker=function(){},e.prototype.getDefaultCfg=function(){return{}},e.prototype.updateCfg=function(e){e&&Object.assign(this,e)},e.prototype.getType=function(){return"base"},e.prototype.destroy=function(){this.nodes=null,this.edges=null,this.combos=null,this.positions=null,this.destroyed=!0},e}();t.Base=r},9:function(e,t,o){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,o,r){void 0===r&&(r=o),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[o]}})}:function(e,t,o,r){void 0===r&&(r=o),e[r]=t[o]}),n=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||r(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),n(o(10),t),n(o(11),t),n(o(12),t),n(o(13),t),n(o(14),t),n(o(15),t)}}).default})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.f6=t():e.f6=t()}(this,(function(){return function(e){var t={};function o(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=e,o.c=t,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=251)}({10:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelize=t.isString=void 0;t.isString=function(e){return"string"==typeof e};var r,n,i=/-(\w)/g;t.camelize=(r=function(e){return e.replace(i,(function(e,t){return t?t.toUpperCase():""}))},n=Object.create(null),function(e){return n[e]||(n[e]=r(e))})},11:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArray=void 0,t.isArray=Array.isArray},12:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toNumber=t.isNaN=t.isNumber=void 0;t.isNumber=function(e){return"number"==typeof e};t.isNaN=function(e){return Number.isNaN(Number(e))};t.toNumber=function(e){var o=parseFloat(e);return t.isNaN(o)?e:o}},13:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.traverseTreeUp=t.scaleMatrix=t.getAdjMatrix=t.floydWarshall=t.getDegree=void 0;t.getDegree=function(e,t,o){for(var r=[],n=0;n<e;n++)r[n]=0;return o?(o.forEach((function(e){e.source&&(r[t[e.source]]+=1),e.target&&(r[t[e.target]]+=1)})),r):r};t.floydWarshall=function(e){for(var t=[],o=e.length,r=0;r<o;r+=1){t[r]=[];for(var n=0;n<o;n+=1)r===n?t[r][n]=0:0!==e[r][n]&&e[r][n]?t[r][n]=e[r][n]:t[r][n]=1/0}for(var i=0;i<o;i+=1)for(r=0;r<o;r+=1)for(n=0;n<o;n+=1)t[r][n]>t[r][i]+t[i][n]&&(t[r][n]=t[r][i]+t[i][n]);return t};t.getAdjMatrix=function(e,t){var o=e.nodes,r=e.edges,n=[],i={};if(!o)throw new Error("invalid nodes data!");return o&&o.forEach((function(e,t){i[e.id]=t;n.push([])})),r&&r.forEach((function(e){var o=e.source,r=e.target,c=i[o],a=i[r];n[c][a]=1,t||(n[a][c]=1)})),n};t.scaleMatrix=function(e,t){var o=[];return e.forEach((function(e){var r=[];e.forEach((function(e){r.push(e*t)})),o.push(r)})),o};var r=function(e,t){if(e&&e.children)for(var o=e.children.length-1;o>=0;o--)if(!r(e.children[o],t))return;return!!t(e)};t.traverseTreeUp=function(e,t){"function"==typeof t&&r(e,t)}},14:function(e,t,o){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.clone=t.isObject=void 0;t.isObject=function(e){return null!==e&&"object"==typeof e};t.clone=function(e){if(null===e)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array){var o=[];return e.forEach((function(e){o.push(e)})),o.map((function(e){return t.clone(e)}))}if("object"==typeof e&&e!=={}){var n=r({},e);return Object.keys(n).forEach((function(e){n[e]=t.clone(n[e])})),n}return e}},15:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=void 0;t.isFunction=function(e){return"function"==typeof e}},190:function(e,t,o){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0}),t.ComboForceLayout=void 0;var i=o(5),c=o(9),a=function(e){function t(t){var o=e.call(this)||this;return o.center=[0,0],o.maxIteration=100,o.gravity=10,o.comboGravity=10,o.linkDistance=10,o.alpha=1,o.alphaMin=.001,o.alphaDecay=1-Math.pow(o.alphaMin,1/300),o.alphaTarget=0,o.velocityDecay=.6,o.edgeStrength=.6,o.nodeStrength=30,o.preventOverlap=!1,o.preventNodeOverlap=!1,o.preventComboOverlap=!1,o.collideStrength=void 0,o.nodeCollideStrength=.5,o.comboCollideStrength=.5,o.comboSpacing=20,o.comboPadding=10,o.optimizeRangeFactor=1,o.onTick=function(){},o.onLayoutEnd=function(){},o.depthAttractiveForceScale=1,o.depthRepulsiveForceScale=2,o.nodes=[],o.edges=[],o.combos=[],o.comboTrees=[],o.width=300,o.height=300,o.bias=[],o.nodeMap={},o.oriComboMap={},o.indexMap={},o.comboMap={},o.previousLayouted=!1,o.updateCfg(t),o}return n(t,e),t.prototype.getDefaultCfg=function(){return{maxIteration:100,center:[0,0],gravity:10,speed:1,comboGravity:30,preventOverlap:!1,preventComboOverlap:!0,preventNodeOverlap:!0,nodeSpacing:void 0,collideStrength:void 0,nodeCollideStrength:.5,comboCollideStrength:.5,comboSpacing:20,comboPadding:10,edgeStrength:.6,nodeStrength:30,linkDistance:10}},t.prototype.execute=function(){var e=this.nodes,t=this.center;if(this.comboTree={id:"comboTreeRoot",depth:-1,children:this.comboTrees},e&&0!==e.length){if(1===e.length)return e[0].x=t[0],e[0].y=t[1],void(this.onLayoutEnd&&this.onLayoutEnd());this.initVals(),this.run(),this.onLayoutEnd&&this.onLayoutEnd()}else this.onLayoutEnd&&this.onLayoutEnd()},t.prototype.run=function(){var e=this,t=e.nodes,o=e.previousLayouted?e.maxIteration/5:e.maxIteration;e.width||"undefined"==typeof window||(e.width=window.innerWidth),e.height||"undefined"==typeof window||(e.height=window.innerHeight);var r=e.center,n=e.velocityDecay,i=e.comboMap;e.previousLayouted||e.initPos(i);for(var a=function(o){var r=[];t.forEach((function(e,t){r[t]={x:0,y:0}})),e.applyCalculate(r),e.applyComboCenterForce(r),t.forEach((function(e,t){c.isNumber(e.x)&&c.isNumber(e.y)&&(e.x+=r[t].x*n,e.y+=r[t].y*n)})),e.alpha+=(e.alphaTarget-e.alpha)*e.alphaDecay,e.onTick()},u=0;u<o;u++)a();var s=[0,0];t.forEach((function(e){c.isNumber(e.x)&&c.isNumber(e.y)&&(s[0]+=e.x,s[1]+=e.y)})),s[0]/=t.length,s[1]/=t.length;var d=[r[0]-s[0],r[1]-s[1]];t.forEach((function(e,t){c.isNumber(e.x)&&c.isNumber(e.y)&&(e.x+=d[0],e.y+=d[1])})),e.combos.forEach((function(e){var t=i[e.id];t&&t.empty&&(e.x=t.cx||e.x,e.y=t.cy||e.y)})),e.previousLayouted=!0},t.prototype.initVals=function(){var e=this.edges,t=this.nodes,o=this.combos,r={},n={},i={};t.forEach((function(e,t){n[e.id]=e,i[e.id]=t})),this.nodeMap=n,this.indexMap=i;var a={};o.forEach((function(e){a[e.id]=e})),this.oriComboMap=a,this.comboMap=this.getComboMap();var u=this.preventOverlap;this.preventComboOverlap=this.preventComboOverlap||u,this.preventNodeOverlap=this.preventNodeOverlap||u;var s=this.collideStrength;s&&(this.comboCollideStrength=s,this.nodeCollideStrength=s),this.comboCollideStrength=this.comboCollideStrength?this.comboCollideStrength:0,this.nodeCollideStrength=this.nodeCollideStrength?this.nodeCollideStrength:0;for(var d=0;d<e.length;++d)r[e[d].source]?r[e[d].source]++:r[e[d].source]=1,r[e[d].target]?r[e[d].target]++:r[e[d].target]=1;var f=[];for(d=0;d<e.length;++d)f[d]=r[e[d].source]/(r[e[d].source]+r[e[d].target]);this.bias=f;var p,h,l=this.nodeSize,v=this.nodeSpacing;if(h=c.isNumber(v)?function(){return v}:c.isFunction(v)?v:function(){return 0},this.nodeSpacing=h,l)if(c.isFunction(l))p=function(e){return l(e)};else if(c.isArray(l)){var y=(l[0]>l[1]?l[0]:l[1])/2;p=function(e){return y}}else{var m=l/2;p=function(e){return m}}else p=function(e){return e.size?c.isArray(e.size)?(e.size[0]>e.size[1]?e.size[0]:e.size[1])/2:e.size/2:10};this.nodeSize=p;var b,g=this.comboSpacing;b=c.isNumber(g)?function(){return g}:c.isFunction(g)?g:function(){return 0},this.comboSpacing=b;var x,M=this.comboPadding;x=c.isNumber(M)?function(){return M}:c.isArray(M)?function(){return Math.max.apply(null,M)}:c.isFunction(M)?M:function(){return 0},this.comboPadding=x;var S,O=this.linkDistance;O||(O=10),S=c.isNumber(O)?function(e){return O}:O,this.linkDistance=S;var N,C=this.edgeStrength;C||(C=1),N=c.isNumber(C)?function(e){return C}:C,this.edgeStrength=N;var E,_=this.nodeStrength;_||(_=30),E=c.isNumber(_)?function(e){return _}:_,this.nodeStrength=E},t.prototype.initPos=function(e){this.nodes.forEach((function(t,o){var r=t.comboId,n=e[r];r&&n?(t.x=n.cx+100/(o+1),t.y=n.cy+100/(o+1)):(t.x=100/(o+1),t.y=100/(o+1))}))},t.prototype.getComboMap=function(){var e=this,t=e.nodeMap,o=e.indexMap,r=e.comboTrees,n=e.oriComboMap,i={};return(r||[]).forEach((function(r){var a=[];c.traverseTreeUp(r,(function(r){if("node"===r.itemType)return!0;if(!n[r.id])return!0;if(void 0===i[r.id]){var u={id:r.id,name:r.id,cx:0,cy:0,count:0,depth:e.oriComboMap[r.id].depth,children:[]};i[r.id]=u}var s=r.children;s&&s.forEach((function(e){if(!i[e.id]&&!t[e.id])return!0;a.push(e)}));var d=i[r.id];if(d.cx=0,d.cy=0,0===a.length){d.empty=!0;var f=n[r.id],p=Object.keys(t).length,h=r.id+"-visual-child-"+p,l={id:h,x:f.x,y:f.y,depth:d.depth+1,itemType:"node"};e.nodes.push(l),t[h]=l,o[h]=p,d.cx=f.x,d.cy=f.y,a.push(l)}return a.forEach((function(e){if(d.count++,"node"!==e.itemType){var o=i[e.id];return c.isNumber(o.cx)&&(d.cx+=o.cx),void(c.isNumber(o.cy)&&(d.cy+=o.cy))}var r=t[e.id];r&&(c.isNumber(r.x)&&(d.cx+=r.x),c.isNumber(r.y)&&(d.cy+=r.y))})),d.cx/=d.count,d.cy/=d.count,d.children=a,!0}))})),i},t.prototype.applyComboCenterForce=function(e){var t=this.gravity,o=this.comboGravity||t,r=this.alpha,n=this.comboTrees,i=this.indexMap,a=this.nodeMap,u=this.comboMap;(n||[]).forEach((function(t){c.traverseTreeUp(t,(function(t){if("node"===t.itemType)return!0;if(!u[t.id])return!0;var n=u[t.id],s=(n.depth+1)/10*.5,d=n.cx,f=n.cy;return n.cx=0,n.cy=0,n.children.forEach((function(t){if("node"!==t.itemType){var p=u[t.id];return p&&c.isNumber(p.cx)&&(n.cx+=p.cx),void(p&&c.isNumber(p.cy)&&(n.cy+=p.cy))}var h=a[t.id],l=h.x-d||.005,v=h.y-f||.005,y=Math.sqrt(l*l+v*v),m=i[h.id],b=o*r/y*s;e[m].x-=l*b,e[m].y-=v*b,c.isNumber(h.x)&&(n.cx+=h.x),c.isNumber(h.y)&&(n.cy+=h.y)})),n.cx/=n.count,n.cy/=n.count,!0}))}))},t.prototype.applyCalculate=function(e){var t=this.comboMap,o=this.nodes,r={};o.forEach((function(e,t){o.forEach((function(o,n){if(!(t<n)){var i=e.x-o.x||.005,c=e.y-o.y||.005,a=i*i+c*c,u=Math.sqrt(a);a<1&&(a=u),r[e.id+"-"+o.id]={vx:i,vy:c,vl2:a,vl:u},r[o.id+"-"+e.id]={vl2:a,vl:u,vx:-i,vy:-c}}}))})),this.updateComboSizes(t),this.calRepulsive(e,r),this.calAttractive(e,r),this.preventComboOverlap&&this.comboNonOverlapping(e,t)},t.prototype.updateComboSizes=function(e){var t=this,o=t.comboTrees,r=t.nodeMap,n=t.nodeSize,i=t.comboSpacing,a=t.comboPadding;(o||[]).forEach((function(o){var u=[];c.traverseTreeUp(o,(function(o){if("node"===o.itemType)return!0;var s=e[o.id];if(!s)return!1;var d=o.children;d&&d.forEach((function(t){(e[t.id]||r[t.id])&&u.push(t)})),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0,u.forEach((function(e){if("node"!==e.itemType)return!0;var t=r[e.id];if(!t)return!0;var o=n(t),i=t.x-o,c=t.y-o,a=t.x+o,u=t.y+o;s.minX>i&&(s.minX=i),s.minY>c&&(s.minY=c),s.maxX<a&&(s.maxX=a),s.maxY<u&&(s.maxY=u)}));var f=t.oriComboMap[o.id].size||10;c.isArray(f)&&(f=f[0]);var p=Math.max(s.maxX-s.minX,s.maxY-s.minY,f);return s.r=p/2+i(s)/2+a(s),!0}))}))},t.prototype.comboNonOverlapping=function(e,t){var o=this.comboTree,r=this.comboCollideStrength,n=this.indexMap,i=this.nodeMap;c.traverseTreeUp(o,(function(o){if(!t[o.id]&&!i[o.id]&&"comboTreeRoot"!==o.id)return!1;var c=o.children;return c&&c.length>1&&c.forEach((function(o,a){if("node"===o.itemType)return!1;var u=t[o.id];u&&c.forEach((function(c,s){if(a<=s)return!1;if("node"===c.itemType)return!1;var d=t[c.id];if(!d)return!1;var f=u.cx-d.cx||.005,p=u.cy-d.cy||.005,h=f*f+p*p,l=u.r,v=d.r,y=l+v,m=v*v,b=l*l;if(h<y*y){var g=o.children;if(!g||0===g.length)return!1;var x=c.children;if(!x||0===x.length)return!1;var M=Math.sqrt(h),S=(y-M)/M*r,O=f*S,N=p*S,C=m/(b+m),E=1-C;g.forEach((function(t){if("node"!==t.itemType)return!1;if(i[t.id]){var o=n[t.id];x.forEach((function(t){if("node"!==t.itemType)return!1;if(!i[t.id])return!1;var r=n[t.id];e[o].x+=O*C,e[o].y+=N*C,e[r].x-=O*E,e[r].y-=N*E}))}}))}}))})),!0}))},t.prototype.calRepulsive=function(e,t){var o=this,r=o.nodes,n=o.width*o.optimizeRangeFactor,i=o.nodeStrength,c=o.alpha,a=o.nodeCollideStrength,u=o.preventNodeOverlap,s=o.nodeSize,d=o.nodeSpacing,f=o.depthRepulsiveForceScale,p=o.center;r.forEach((function(h,l){if(h.x&&h.y){if(p){var v=o.gravity,y=h.x-p[0]||.005,m=h.y-p[1]||.005,b=Math.sqrt(y*y+m*m);e[l].x-=y*v*c/b,e[l].y-=m*v*c/b}r.forEach((function(o,r){if(l!==r&&o.x&&o.y){var p=t[h.id+"-"+o.id],v=p.vl2,y=p.vl;if(!(y>n)){var m=t[h.id+"-"+o.id],b=m.vx,g=m.vy,x=Math.log(Math.abs(o.depth-h.depth)/10)+1||1;x=x<1?1:x,o.comboId!==h.comboId&&(x+=1);var M=x?Math.pow(f,x):1,S=i(o)*c/v*M;if(e[l].x+=b*S,e[l].y+=g*S,l<r&&u){var O=s(h)+d(h),N=s(o)+d(o),C=O+N;if(v<C*C){var E=(C-y)/y*a,_=N*N,j=_/(O*O+_),T=b*E,w=g*E;e[l].x+=T*j,e[l].y+=w*j,j=1-j,e[r].x-=T*j,e[r].y-=w*j}}}}}))}}))},t.prototype.calAttractive=function(e,t){var o=this,r=o.edges,n=o.linkDistance,i=o.alpha,a=o.edgeStrength,u=o.bias,s=o.depthAttractiveForceScale;r.forEach((function(r,d){if(r.source&&r.target&&r.source!==r.target){var f=o.indexMap[r.source],p=o.indexMap[r.target],h=o.nodeMap[r.source],l=o.nodeMap[r.target];if(h&&l){var v=Math.log(Math.abs(h.depth-l.depth)/10);h.comboId===l.comboId&&(v/=2);var y=v?Math.pow(s,v):1;if(h.comboId!==l.comboId&&1===y?y=s/2:h.comboId===l.comboId&&(y=2),c.isNumber(l.x)&&c.isNumber(h.x)&&c.isNumber(l.y)&&c.isNumber(h.y)){var m=t[r.target+"-"+r.source],b=m.vl,g=m.vx,x=m.vy,M=(b-n(r))/b*i*a(r)*y,S=g*M,O=x*M,N=u[d];e[p].x-=S*N,e[p].y-=O*N,e[f].x+=S*(1-N),e[f].y+=O*(1-N)}}}}))},t.prototype.getType=function(){return"comboForce"},t}(i.Base);t.ComboForceLayout=a},251:function(e,t,o){"use strict";o.r(t);var r=o(190);t.default=r.ComboForceLayout},5:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Base=void 0;var r=function(){function e(){this.nodes=[],this.edges=[],this.combos=[],this.positions=[],this.destroyed=!1,this.onLayoutEnd=function(){}}return e.prototype.layout=function(e){return this.init(e),this.execute(!0)},e.prototype.init=function(e){this.nodes=e.nodes||[],this.edges=e.edges||[],this.combos=e.combos||[]},e.prototype.execute=function(e){},e.prototype.executeWithWorker=function(){},e.prototype.getDefaultCfg=function(){return{}},e.prototype.updateCfg=function(e){e&&Object.assign(this,e)},e.prototype.getType=function(){return"base"},e.prototype.destroy=function(){this.nodes=null,this.edges=null,this.combos=null,this.positions=null,this.destroyed=!0},e.prototype.onTick=function(){},e}();t.Base=r},9:function(e,t,o){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,o,r){void 0===r&&(r=o),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[o]}})}:function(e,t,o,r){void 0===r&&(r=o),e[r]=t[o]}),n=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||r(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),n(o(10),t),n(o(11),t),n(o(12),t),n(o(13),t),n(o(14),t),n(o(15),t)}}).default})); | ||
//# sourceMappingURL=comboForceLayout.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.f6=t():e.f6=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=252)}({10:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelize=t.isString=void 0;t.isString=function(e){return"string"==typeof e};var r,o,i=/-(\w)/g;t.camelize=(r=function(e){return e.replace(i,(function(e,t){return t?t.toUpperCase():""}))},o=Object.create(null),function(e){return o[e]||(o[e]=r(e))})},11:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArray=void 0,t.isArray=Array.isArray},12:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toNumber=t.isNaN=t.isNumber=void 0;t.isNumber=function(e){return"number"==typeof e};t.isNaN=function(e){return Number.isNaN(Number(e))};t.toNumber=function(e){var n=parseFloat(e);return t.isNaN(n)?e:n}},13:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.traverseTreeUp=t.scaleMatrix=t.getAdjMatrix=t.floydWarshall=t.getDegree=void 0;t.getDegree=function(e,t,n){for(var r=[],o=0;o<e;o++)r[o]=0;return n?(n.forEach((function(e){e.source&&(r[t[e.source]]+=1),e.target&&(r[t[e.target]]+=1)})),r):r};t.floydWarshall=function(e){for(var t=[],n=e.length,r=0;r<n;r+=1){t[r]=[];for(var o=0;o<n;o+=1)r===o?t[r][o]=0:0!==e[r][o]&&e[r][o]?t[r][o]=e[r][o]:t[r][o]=1/0}for(var i=0;i<n;i+=1)for(r=0;r<n;r+=1)for(o=0;o<n;o+=1)t[r][o]>t[r][i]+t[i][o]&&(t[r][o]=t[r][i]+t[i][o]);return t};t.getAdjMatrix=function(e,t){var n=e.nodes,r=e.edges,o=[],i={};if(!n)throw new Error("invalid nodes data!");return n&&n.forEach((function(e,t){i[e.id]=t;o.push([])})),r&&r.forEach((function(e){var n=e.source,r=e.target,u=i[n],c=i[r];o[u][c]=1,t||(o[c][u]=1)})),o};t.scaleMatrix=function(e,t){var n=[];return e.forEach((function(e){var r=[];e.forEach((function(e){r.push(e*t)})),n.push(r)})),n};t.traverseTreeUp=function(e,t){"function"==typeof t&&function e(t,n){if(t&&t.children)for(var r=t.children.length-1;r>=0;r--)if(!e(t.children[r],n))return;return!!n(t)}(e,t)}},14:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.clone=t.isObject=void 0;t.isObject=function(e){return null!==e&&"object"===r(e)};t.clone=function(e){if(null===e)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array){var n=[];return e.forEach((function(e){n.push(e)})),n.map((function(e){return t.clone(e)}))}if("object"===r(e)&&e!=={}){var i=o({},e);return Object.keys(i).forEach((function(e){i[e]=t.clone(i[e])})),i}return e}},15:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=void 0;t.isFunction=function(e){return"function"==typeof e}},191:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ConcentricLayout=void 0;var i=n(9),u=function(e){function t(t){var n=e.call(this)||this;return n.nodeSize=30,n.minNodeSpacing=10,n.preventOverlap=!1,n.equidistant=!1,n.startAngle=1.5*Math.PI,n.clockwise=!0,n.sortBy="degree",n.nodes=[],n.edges=[],n.width=300,n.height=300,n.onLayoutEnd=function(){},n.updateCfg(t),n}return o(t,e),t.prototype.getDefaultCfg=function(){return{nodeSize:30,minNodeSpacing:10,preventOverlap:!1,sweep:void 0,equidistant:!1,startAngle:1.5*Math.PI,clockwise:!0,maxLevelDiff:void 0,sortBy:"degree"}},t.prototype.execute=function(){var e=this,t=e.nodes,n=e.edges,r=t.length;if(0!==r){e.width||"undefined"==typeof window||(e.width=window.innerWidth),e.height||"undefined"==typeof window||(e.height=window.innerHeight),e.center||(e.center=[e.width/2,e.height/2]);var o=e.center;if(1===r)return t[0].x=o[0],t[0].y=o[1],void(e.onLayoutEnd&&e.onLayoutEnd());var u,c=[];u=i.isArray(e.nodeSize)?Math.max(e.nodeSize[0],e.nodeSize[1]):e.nodeSize,t.forEach((function(e){c.push(e);var t=u;i.isArray(e.size)?t=Math.max(e.size[0],e.size[1]):i.isNumber(e.size)&&(t=e.size),u=Math.max(u,t)})),e.clockwise=void 0!==e.counterclockwise?!e.counterclockwise:e.clockwise;var a={},s={};if(c.forEach((function(e,t){a[e.id]=e,s[e.id]=t})),!("degree"!==e.sortBy&&i.isString(e.sortBy)&&void 0!==c[0][e.sortBy]||(e.sortBy="degree",i.isNumber(t[0].degree)))){var f=i.getDegree(t.length,s,n);c.forEach((function(e,t){e.degree=f[t]}))}c.sort((function(t,n){return n[e.sortBy]-t[e.sortBy]})),e.maxValueNode=c[0],e.maxLevelDiff=e.maxLevelDiff||e.maxValueNode[e.sortBy]/4;var d=[[]],l=d[0];c.forEach((function(t){if(l.length>0){var n=Math.abs(l[0][e.sortBy]-t[e.sortBy]);e.maxLevelDiff&&n>=e.maxLevelDiff&&(l=[],d.push(l))}l.push(t)}));var p=u+e.minNodeSpacing;if(!e.preventOverlap){var h=d.length>0&&d[0].length>1,y=(Math.min(e.width,e.height)/2-p)/(d.length+(h?1:0));p=Math.min(p,y)}var v=0;if(d.forEach((function(t){var n=e.sweep;void 0===n&&(n=2*Math.PI-2*Math.PI/t.length);var r=t.dTheta=n/Math.max(1,t.length-1);if(t.length>1&&e.preventOverlap){var o=Math.cos(r)-Math.cos(0),i=Math.sin(r)-Math.sin(0),u=Math.sqrt(p*p/(o*o+i*i));v=Math.max(u,v)}t.r=v,v+=p})),e.equidistant){for(var g=0,b=0,m=0;m<d.length;m++){var _=d[m].r-b;g=Math.max(g,_)}b=0,d.forEach((function(e,t){0===t&&(b=e.r),e.r=b,b+=g}))}return d.forEach((function(t){var n=t.dTheta,r=t.r;t.forEach((function(t,i){var u=e.startAngle+(e.clockwise?1:-1)*n*i;t.x=o[0]+r*Math.cos(u),t.y=o[1]+r*Math.sin(u)}))})),e.onLayoutEnd&&e.onLayoutEnd(),{nodes:t,edges:n}}e.onLayoutEnd&&e.onLayoutEnd()},t.prototype.getType=function(){return"concentric"},t}(n(5).Base);t.ConcentricLayout=u},252:function(e,t,n){"use strict";n.r(t);var r=n(191);t.default=r.ConcentricLayout},5:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Base=void 0;var r=function(){function e(){this.nodes=[],this.edges=[],this.combos=[],this.positions=[],this.destroyed=!1,this.onLayoutEnd=function(){}}return e.prototype.layout=function(e){return this.init(e),this.execute(!0)},e.prototype.init=function(e){this.nodes=e.nodes||[],this.edges=e.edges||[],this.combos=e.combos||[]},e.prototype.execute=function(e){},e.prototype.executeWithWorker=function(){},e.prototype.getDefaultCfg=function(){return{}},e.prototype.updateCfg=function(e){e&&Object.assign(this,e)},e.prototype.getType=function(){return"base"},e.prototype.destroy=function(){this.nodes=null,this.edges=null,this.combos=null,this.positions=null,this.destroyed=!0},e}();t.Base=r},9:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(10),t),o(n(11),t),o(n(12),t),o(n(13),t),o(n(14),t),o(n(15),t)}}).default})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.f6=t():e.f6=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=252)}({10:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelize=t.isString=void 0;t.isString=function(e){return"string"==typeof e};var r,o,i=/-(\w)/g;t.camelize=(r=function(e){return e.replace(i,(function(e,t){return t?t.toUpperCase():""}))},o=Object.create(null),function(e){return o[e]||(o[e]=r(e))})},11:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArray=void 0,t.isArray=Array.isArray},12:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toNumber=t.isNaN=t.isNumber=void 0;t.isNumber=function(e){return"number"==typeof e};t.isNaN=function(e){return Number.isNaN(Number(e))};t.toNumber=function(e){var n=parseFloat(e);return t.isNaN(n)?e:n}},13:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.traverseTreeUp=t.scaleMatrix=t.getAdjMatrix=t.floydWarshall=t.getDegree=void 0;t.getDegree=function(e,t,n){for(var r=[],o=0;o<e;o++)r[o]=0;return n?(n.forEach((function(e){e.source&&(r[t[e.source]]+=1),e.target&&(r[t[e.target]]+=1)})),r):r};t.floydWarshall=function(e){for(var t=[],n=e.length,r=0;r<n;r+=1){t[r]=[];for(var o=0;o<n;o+=1)r===o?t[r][o]=0:0!==e[r][o]&&e[r][o]?t[r][o]=e[r][o]:t[r][o]=1/0}for(var i=0;i<n;i+=1)for(r=0;r<n;r+=1)for(o=0;o<n;o+=1)t[r][o]>t[r][i]+t[i][o]&&(t[r][o]=t[r][i]+t[i][o]);return t};t.getAdjMatrix=function(e,t){var n=e.nodes,r=e.edges,o=[],i={};if(!n)throw new Error("invalid nodes data!");return n&&n.forEach((function(e,t){i[e.id]=t;o.push([])})),r&&r.forEach((function(e){var n=e.source,r=e.target,u=i[n],c=i[r];o[u][c]=1,t||(o[c][u]=1)})),o};t.scaleMatrix=function(e,t){var n=[];return e.forEach((function(e){var r=[];e.forEach((function(e){r.push(e*t)})),n.push(r)})),n};var r=function(e,t){if(e&&e.children)for(var n=e.children.length-1;n>=0;n--)if(!r(e.children[n],t))return;return!!t(e)};t.traverseTreeUp=function(e,t){"function"==typeof t&&r(e,t)}},14:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.clone=t.isObject=void 0;t.isObject=function(e){return null!==e&&"object"==typeof e};t.clone=function(e){if(null===e)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array){var n=[];return e.forEach((function(e){n.push(e)})),n.map((function(e){return t.clone(e)}))}if("object"==typeof e&&e!=={}){var o=r({},e);return Object.keys(o).forEach((function(e){o[e]=t.clone(o[e])})),o}return e}},15:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=void 0;t.isFunction=function(e){return"function"==typeof e}},191:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ConcentricLayout=void 0;var i=n(9),u=function(e){function t(t){var n=e.call(this)||this;return n.nodeSize=30,n.minNodeSpacing=10,n.preventOverlap=!1,n.equidistant=!1,n.startAngle=1.5*Math.PI,n.clockwise=!0,n.sortBy="degree",n.nodes=[],n.edges=[],n.width=300,n.height=300,n.onLayoutEnd=function(){},n.updateCfg(t),n}return o(t,e),t.prototype.getDefaultCfg=function(){return{nodeSize:30,minNodeSpacing:10,preventOverlap:!1,sweep:void 0,equidistant:!1,startAngle:1.5*Math.PI,clockwise:!0,maxLevelDiff:void 0,sortBy:"degree"}},t.prototype.execute=function(){var e=this,t=e.nodes,n=e.edges,r=t.length;if(0!==r){e.width||"undefined"==typeof window||(e.width=window.innerWidth),e.height||"undefined"==typeof window||(e.height=window.innerHeight),e.center||(e.center=[e.width/2,e.height/2]);var o=e.center;if(1===r)return t[0].x=o[0],t[0].y=o[1],void(e.onLayoutEnd&&e.onLayoutEnd());var u,c=[];u=i.isArray(e.nodeSize)?Math.max(e.nodeSize[0],e.nodeSize[1]):e.nodeSize,t.forEach((function(e){c.push(e);var t=u;i.isArray(e.size)?t=Math.max(e.size[0],e.size[1]):i.isNumber(e.size)&&(t=e.size),u=Math.max(u,t)})),e.clockwise=void 0!==e.counterclockwise?!e.counterclockwise:e.clockwise;var a={},s={};if(c.forEach((function(e,t){a[e.id]=e,s[e.id]=t})),!("degree"!==e.sortBy&&i.isString(e.sortBy)&&void 0!==c[0][e.sortBy]||(e.sortBy="degree",i.isNumber(t[0].degree)))){var f=i.getDegree(t.length,s,n);c.forEach((function(e,t){e.degree=f[t]}))}c.sort((function(t,n){return n[e.sortBy]-t[e.sortBy]})),e.maxValueNode=c[0],e.maxLevelDiff=e.maxLevelDiff||e.maxValueNode[e.sortBy]/4;var d=[[]],l=d[0];c.forEach((function(t){if(l.length>0){var n=Math.abs(l[0][e.sortBy]-t[e.sortBy]);e.maxLevelDiff&&n>=e.maxLevelDiff&&(l=[],d.push(l))}l.push(t)}));var p=u+e.minNodeSpacing;if(!e.preventOverlap){var h=d.length>0&&d[0].length>1,y=(Math.min(e.width,e.height)/2-p)/(d.length+(h?1:0));p=Math.min(p,y)}var v=0;if(d.forEach((function(t){var n=e.sweep;void 0===n&&(n=2*Math.PI-2*Math.PI/t.length);var r=t.dTheta=n/Math.max(1,t.length-1);if(t.length>1&&e.preventOverlap){var o=Math.cos(r)-Math.cos(0),i=Math.sin(r)-Math.sin(0),u=Math.sqrt(p*p/(o*o+i*i));v=Math.max(u,v)}t.r=v,v+=p})),e.equidistant){for(var g=0,b=0,m=0;m<d.length;m++){var _=d[m].r-b;g=Math.max(g,_)}b=0,d.forEach((function(e,t){0===t&&(b=e.r),e.r=b,b+=g}))}return d.forEach((function(t){var n=t.dTheta,r=t.r;t.forEach((function(t,i){var u=e.startAngle+(e.clockwise?1:-1)*n*i;t.x=o[0]+r*Math.cos(u),t.y=o[1]+r*Math.sin(u)}))})),e.onLayoutEnd&&e.onLayoutEnd(),{nodes:t,edges:n}}e.onLayoutEnd&&e.onLayoutEnd()},t.prototype.getType=function(){return"concentric"},t}(n(5).Base);t.ConcentricLayout=u},252:function(e,t,n){"use strict";n.r(t);var r=n(191);t.default=r.ConcentricLayout},5:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Base=void 0;var r=function(){function e(){this.nodes=[],this.edges=[],this.combos=[],this.positions=[],this.destroyed=!1,this.onLayoutEnd=function(){}}return e.prototype.layout=function(e){return this.init(e),this.execute(!0)},e.prototype.init=function(e){this.nodes=e.nodes||[],this.edges=e.edges||[],this.combos=e.combos||[]},e.prototype.execute=function(e){},e.prototype.executeWithWorker=function(){},e.prototype.getDefaultCfg=function(){return{}},e.prototype.updateCfg=function(e){e&&Object.assign(this,e)},e.prototype.getType=function(){return"base"},e.prototype.destroy=function(){this.nodes=null,this.edges=null,this.combos=null,this.positions=null,this.destroyed=!0},e.prototype.onTick=function(){},e}();t.Base=r},9:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(10),t),o(n(11),t),o(n(12),t),o(n(13),t),o(n(14),t),o(n(15),t)}}).default})); | ||
//# sourceMappingURL=concentricLayout.js.map |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.f6=e():t.f6=e()}(this,(function(){return function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(r,n,function(e){return t[e]}.bind(null,n));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=432)}({10:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.camelize=e.isString=void 0;e.isString=function(t){return"string"==typeof t};var r,n,o=/-(\w)/g;e.camelize=(r=function(t){return t.replace(o,(function(t,e){return e?e.toUpperCase():""}))},n=Object.create(null),function(t){return n[t]||(n[t]=r(t))})},11:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isArray=void 0,e.isArray=Array.isArray},12:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toNumber=e.isNaN=e.isNumber=void 0;e.isNumber=function(t){return"number"==typeof t};e.isNaN=function(t){return Number.isNaN(Number(t))};e.toNumber=function(t){var i=parseFloat(t);return e.isNaN(i)?t:i}},13:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.traverseTreeUp=e.scaleMatrix=e.getAdjMatrix=e.floydWarshall=e.getDegree=void 0;e.getDegree=function(t,e,i){for(var r=[],n=0;n<t;n++)r[n]=0;return i?(i.forEach((function(t){t.source&&(r[e[t.source]]+=1),t.target&&(r[e[t.target]]+=1)})),r):r};e.floydWarshall=function(t){for(var e=[],i=t.length,r=0;r<i;r+=1){e[r]=[];for(var n=0;n<i;n+=1)r===n?e[r][n]=0:0!==t[r][n]&&t[r][n]?e[r][n]=t[r][n]:e[r][n]=1/0}for(var o=0;o<i;o+=1)for(r=0;r<i;r+=1)for(n=0;n<i;n+=1)e[r][n]>e[r][o]+e[o][n]&&(e[r][n]=e[r][o]+e[o][n]);return e};e.getAdjMatrix=function(t,e){var i=t.nodes,r=t.edges,n=[],o={};if(!i)throw new Error("invalid nodes data!");return i&&i.forEach((function(t,e){o[t.id]=e;n.push([])})),r&&r.forEach((function(t){var i=t.source,r=t.target,s=o[i],u=o[r];n[s][u]=1,e||(n[u][s]=1)})),n};e.scaleMatrix=function(t,e){var i=[];return t.forEach((function(t){var r=[];t.forEach((function(t){r.push(t*e)})),i.push(r)})),i};e.traverseTreeUp=function(t,e){"function"==typeof e&&function t(e,i){if(e&&e.children)for(var r=e.children.length-1;r>=0;r--)if(!t(e.children[r],i))return;return!!i(e)}(t,e)}},14:function(t,e,i){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,i=1,r=arguments.length;i<r;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.clone=e.isObject=void 0;e.isObject=function(t){return null!==t&&"object"===r(t)};e.clone=function(t){if(null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){var i=[];return t.forEach((function(t){i.push(t)})),i.map((function(t){return e.clone(t)}))}if("object"===r(t)&&t!=={}){var o=n({},t);return Object.keys(o).forEach((function(t){o[t]=e.clone(o[t])})),o}return t}},15:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isFunction=void 0;e.isFunction=function(t){return"function"==typeof t}},193:function(t,e,i){"use strict";var r,n=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ForceAtlas2Layout=void 0;var s=i(5),u=i(9),h=o(i(433)),a=o(i(434)),c=o(i(435)),d=function(t){function e(e){var i=t.call(this)||this;return i.center=[0,0],i.width=300,i.height=300,i.nodes=[],i.edges=[],i.kr=5,i.kg=1,i.mode="normal",i.preventOverlap=!1,i.dissuadeHubs=!1,i.barnesHut=!1,i.maxIteration=0,i.ks=.1,i.ksmax=10,i.tao=.1,i.onLayoutEnd=function(){},i.prune=!1,i.updateCfg(e),i}return n(e,t),e.prototype.getDefaultCfg=function(){return{}},e.prototype.execute=function(){var t=this.nodes,e=this.maxIteration,i=this.onLayoutEnd,r=this.prune;this.width||"undefined"==typeof window||(this.width=window.innerWidth),this.height||"undefined"==typeof window||(this.height=window.innerHeight);for(var n=[],o=t.length,s=0;s<o;s+=1){var h=t[s],a=10,c=10;u.isNumber(h.size)&&(a=h.size,c=h.size),u.isArray(h.size)&&(isNaN(h.size[0])||(a=h.size[0]),isNaN(h.size[1])||(c=h.size[1])),this.getWidth&&!isNaN(this.getWidth(h))&&(c=this.getWidth(h)),this.getHeight&&!isNaN(this.getHeight(h))&&(a=this.getHeight(h));var d=Math.max(a,c);n.push(d)}!this.barnesHut&&o>250&&(this.barnesHut=!0),!this.prune&&o>100&&(this.prune=!0),0!==this.maxIteration||this.prune?0===this.maxIteration&&r&&(e=100,o<=200&&o>100?e=500:o>200&&(e=950),this.maxIteration=e):(e=250,o<=200&&o>100?e=1e3:o>200&&(e=1200),this.maxIteration=e),this.kr||(this.kr=50,o>100&&o<=500?this.kr=20:o>500&&(this.kr=1)),this.kg||(this.kg=20,o>100&&o<=500?this.kg=10:o>500&&(this.kg=1)),this.nodes=this.updateNodesByForces(n),i()},e.prototype.updateNodesByForces=function(t){for(var e=this.nodes,i=this.edges,r=this.maxIteration,n=i.filter((function(t){return t.source!==t.target})),o=e.length,s=n.length,u=[],h={},a={},c=[],d=0;d<o;d+=1)h[e[d].id]=d,u[d]=0,(void 0===e[d].x||isNaN(e[d].x))&&(e[d].x=1e3*Math.random()),(void 0===e[d].y||isNaN(e[d].y))&&(e[d].y=1e3*Math.random()),c.push({x:e[d].x,y:e[d].y});for(d=0;d<s;d+=1){for(var f=void 0,p=void 0,l=0,y=0,g=0;g<o;g+=1)e[g].id===n[d].source?(f=e[g],l=g):e[g].id===n[d].target&&(p=e[g],y=g),a[d]={sourceIdx:l,targetIdx:y};f&&(u[h[f.id]]+=1),p&&(u[h[p.id]]+=1)}var v=r;if(e=this.iterate(v,h,a,s,u,t),this.prune){for(g=0;g<s;g+=1)u[a[g].sourceIdx]<=1?(e[a[g].sourceIdx].x=e[a[g].targetIdx].x,e[a[g].sourceIdx].y=e[a[g].targetIdx].y):u[a[g].targetIdx]<=1&&(e[a[g].targetIdx].x=e[a[g].sourceIdx].x,e[a[g].targetIdx].y=e[a[g].sourceIdx].y);this.prune=!1,this.barnesHut=!1,v=100,e=this.iterate(v,h,a,s,u,t)}return e},e.prototype.iterate=function(t,e,i,r,n,o){for(var s=this.nodes,u=this.kr,a=this.preventOverlap,c=this.barnesHut,d=s.length,f=0,p=t,l=[],y=[],g=[],v=0;v<d;v+=1)if(l[2*v]=0,l[2*v+1]=0,c){var x={id:v,rx:s[v].x,ry:s[v].y,mass:1,g:u,degree:n[v]};g[v]=new h.default(x)}for(;p>0;){for(v=0;v<d;v+=1)y[2*v]=l[2*v],y[2*v+1]=l[2*v+1],l[2*v]=0,l[2*v+1]=0;l=this.getAttrForces(p,50,r,e,i,n,o,l),l=c&&(a&&p>50||!a)?this.getOptRepGraForces(l,g,n):this.getRepGraForces(p,50,l,100,o,n);var m=this.updatePos(l,y,f,n);s=m.nodes,f=m.sg,p--,this.tick&&this.tick()}return s},e.prototype.getAttrForces=function(t,e,i,r,n,o,s,u){for(var h=this.nodes,a=this.preventOverlap,c=this.dissuadeHubs,d=this.mode,f=this.prune,p=0;p<i;p+=1){var l=h[n[p].sourceIdx],y=n[p].sourceIdx,g=h[n[p].targetIdx],v=n[p].targetIdx;if(!f||!(o[y]<=1||o[v]<=1)){var x=[g.x-l.x,g.y-l.y],m=Math.hypot(x[0],x[1]);m=m<1e-4?1e-4:m,x[0]=x[0]/m,x[1]=x[1]/m,a&&t<e&&(m=m-s[y]-s[v]);var b=m,_=b;"linlog"===d&&(_=b=Math.log(1+m)),c&&(b=m/o[y],_=m/o[v]),a&&t<e&&m<=0?(b=0,_=0):a&&t<e&&m>0&&(b=m,_=m),u[2*r[l.id]]+=b*x[0],u[2*r[g.id]]-=_*x[0],u[2*r[l.id]+1]+=b*x[1],u[2*r[g.id]+1]-=_*x[1]}}return u},e.prototype.getRepGraForces=function(t,e,i,r,n,o){for(var s=this.nodes,u=this.preventOverlap,h=this.kr,a=this.kg,c=this.center,d=this.prune,f=s.length,p=0;p<f;p+=1){for(var l=p+1;l<f;l+=1)if(!d||!(o[p]<=1||o[l]<=1)){var y=[s[l].x-s[p].x,s[l].y-s[p].y],g=Math.hypot(y[0],y[1]);g=g<1e-4?1e-4:g,y[0]=y[0]/g,y[1]=y[1]/g,u&&t<e&&(g=g-n[p]-n[l]);var v=h*(o[p]+1)*(o[l]+1)/g;u&&t<e&&g<0?v=r*(o[p]+1)*(o[l]+1):u&&t<e&&0===g?v=0:u&&t<e&&g>0&&(v=h*(o[p]+1)*(o[l]+1)/g),i[2*p]-=v*y[0],i[2*l]+=v*y[0],i[2*p+1]-=v*y[1],i[2*l+1]+=v*y[1]}var x=[s[p].x-c[0],s[p].y-c[1]],m=Math.hypot(x[0],x[1]);x[0]=x[0]/m,x[1]=x[1]/m;var b=a*(o[p]+1);i[2*p]-=b*x[0],i[2*p+1]-=b*x[1]}return i},e.prototype.getOptRepGraForces=function(t,e,i){for(var r=this.nodes,n=this.kg,o=this.center,s=this.prune,u=r.length,h=9e10,d=-9e10,f=9e10,p=-9e10,l=0;l<u;l+=1)s&&i[l]<=1||(e[l].setPos(r[l].x,r[l].y),r[l].x>=d&&(d=r[l].x),r[l].x<=h&&(h=r[l].x),r[l].y>=p&&(p=r[l].y),r[l].y<=f&&(f=r[l].y));var y={xmid:(d+h)/2,ymid:(p+f)/2,length:Math.max(d-h,p-f),massCenter:o,mass:u},g=new a.default(y),v=new c.default(g);for(l=0;l<u;l+=1)s&&i[l]<=1||e[l].in(g)&&v.insert(e[l]);for(l=0;l<u;l+=1)if(!(s&&i[l]<=1)){e[l].resetForce(),v.updateForce(e[l]),t[2*l]-=e[l].fx,t[2*l+1]-=e[l].fy;var x=[r[l].x-o[0],r[l].y-o[1]],m=Math.hypot(x[0],x[1]);m=m<1e-4?1e-4:m,x[0]=x[0]/m,x[1]=x[1]/m;var b=n*(i[l]+1);t[2*l]-=b*x[0],t[2*l+1]-=b*x[1]}return t},e.prototype.updatePos=function(t,e,i,r){for(var n=this.nodes,o=this.ks,s=this.tao,u=this.prune,h=this.ksmax,a=n.length,c=[],d=[],f=0,p=0,l=0;l<a;l+=1)if(!(u&&r[l]<=1)){var y=[t[2*l]-e[2*l],t[2*l+1]-e[2*l+1]],g=Math.hypot(y[0],y[1]),v=[t[2*l]+e[2*l],t[2*l+1]+e[2*l+1]],x=Math.hypot(v[0],v[1]);c[l]=g,d[l]=x/2,f+=(r[l]+1)*c[l],p+=(r[l]+1)*d[l]}var m=i;i=s*p/f,0!==m&&(i=i>1.5*m?1.5*m:i);for(l=0;l<a;l+=1)if(!(u&&r[l]<=1)){var b=o*i/(1+i*Math.sqrt(c[l])),_=Math.hypot(t[2*l],t[2*l+1]),N=h/(_=_<1e-4?1e-4:_),O=(b=b>N?N:b)*t[2*l],j=b*t[2*l+1];n[l].x+=O,n[l].y+=j}return{nodes:n,sg:i}},e}(s.Base);e.ForceAtlas2Layout=d},432:function(t,e,i){"use strict";i.r(e);var r=i(193);e.default=r.ForceAtlas2Layout},433:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t){this.id=t.id||0,this.rx=t.rx,this.ry=t.ry,this.fx=0,this.fy=0,this.mass=t.mass,this.degree=t.degree,this.g=t.g||0}return t.prototype.distanceTo=function(t){var e=this.rx-t.rx,i=this.ry-t.ry;return Math.hypot(e,i)},t.prototype.setPos=function(t,e){this.rx=t,this.ry=e},t.prototype.resetForce=function(){this.fx=0,this.fy=0},t.prototype.addForce=function(t){var e=t.rx-this.rx,i=t.ry-this.ry,r=Math.hypot(e,i);r=r<1e-4?1e-4:r;var n=this.g*(this.degree+1)*(t.degree+1)/r;this.fx+=n*e/r,this.fy+=n*i/r},t.prototype.in=function(t){return t.contains(this.rx,this.ry)},t.prototype.add=function(e){var i=this.mass+e.mass;return new t({rx:(this.rx*this.mass+e.rx*e.mass)/i,ry:(this.ry*this.mass+e.ry*e.mass)/i,mass:i,degree:this.degree+e.degree})},t}();e.default=r},434:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t){this.xmid=t.xmid,this.ymid=t.ymid,this.length=t.length,this.massCenter=t.massCenter||[0,0],this.mass=t.mass||1}return t.prototype.getLength=function(){return this.length},t.prototype.contains=function(t,e){var i=this.length/2;return t<=this.xmid+i&&t>=this.xmid-i&&e<=this.ymid+i&&e>=this.ymid-i},t.prototype.NW=function(){return new t({xmid:this.xmid-this.length/4,ymid:this.ymid+this.length/4,length:this.length/2})},t.prototype.NE=function(){return new t({xmid:this.xmid+this.length/4,ymid:this.ymid+this.length/4,length:this.length/2})},t.prototype.SW=function(){return new t({xmid:this.xmid-this.length/4,ymid:this.ymid-this.length/4,length:this.length/2})},t.prototype.SE=function(){return new t({xmid:this.xmid+this.length/4,ymid:this.ymid-this.length/4,length:this.length/2})},t}();e.default=r},435:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t){this.body=null,this.quad=null,this.NW=null,this.NE=null,this.SW=null,this.SE=null,this.theta=.5,null!=t&&(this.quad=t)}return t.prototype.insert=function(e){null!=this.body?this._isExternal()?(this.quad&&(this.NW=new t(this.quad.NW()),this.NE=new t(this.quad.NE()),this.SW=new t(this.quad.SW()),this.SE=new t(this.quad.SE())),this._putBody(this.body),this._putBody(e),this.body=this.body.add(e)):(this.body=this.body.add(e),this._putBody(e)):this.body=e},t.prototype._putBody=function(t){this.quad&&(t.in(this.quad.NW())&&this.NW?this.NW.insert(t):t.in(this.quad.NE())&&this.NE?this.NE.insert(t):t.in(this.quad.SW())&&this.SW?this.SW.insert(t):t.in(this.quad.SE())&&this.SE&&this.SE.insert(t))},t.prototype._isExternal=function(){return null==this.NW&&null==this.NE&&null==this.SW&&null==this.SE},t.prototype.updateForce=function(t){null!=this.body&&t!==this.body&&(this._isExternal()||(this.quad?this.quad.getLength():0)/this.body.distanceTo(t)<this.theta?t.addForce(this.body):(this.NW&&this.NW.updateForce(t),this.NE&&this.NE.updateForce(t),this.SW&&this.SW.updateForce(t),this.SE&&this.SE.updateForce(t)))},t}();e.default=r},5:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Base=void 0;var r=function(){function t(){this.nodes=[],this.edges=[],this.combos=[],this.positions=[],this.destroyed=!1,this.onLayoutEnd=function(){}}return t.prototype.layout=function(t){return this.init(t),this.execute(!0)},t.prototype.init=function(t){this.nodes=t.nodes||[],this.edges=t.edges||[],this.combos=t.combos||[]},t.prototype.execute=function(t){},t.prototype.executeWithWorker=function(){},t.prototype.getDefaultCfg=function(){return{}},t.prototype.updateCfg=function(t){t&&Object.assign(this,t)},t.prototype.getType=function(){return"base"},t.prototype.destroy=function(){this.nodes=null,this.edges=null,this.combos=null,this.positions=null,this.destroyed=!0},t}();e.Base=r},9:function(t,e,i){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,i,r){void 0===r&&(r=i),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[i]}})}:function(t,e,i,r){void 0===r&&(r=i),t[r]=e[i]}),n=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||r(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(i(10),e),n(i(11),e),n(i(12),e),n(i(13),e),n(i(14),e),n(i(15),e)}}).default})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.f6=e():t.f6=e()}(this,(function(){return function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(r,n,function(e){return t[e]}.bind(null,n));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=432)}({10:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.camelize=e.isString=void 0;e.isString=function(t){return"string"==typeof t};var r,n,o=/-(\w)/g;e.camelize=(r=function(t){return t.replace(o,(function(t,e){return e?e.toUpperCase():""}))},n=Object.create(null),function(t){return n[t]||(n[t]=r(t))})},11:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isArray=void 0,e.isArray=Array.isArray},12:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toNumber=e.isNaN=e.isNumber=void 0;e.isNumber=function(t){return"number"==typeof t};e.isNaN=function(t){return Number.isNaN(Number(t))};e.toNumber=function(t){var i=parseFloat(t);return e.isNaN(i)?t:i}},13:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.traverseTreeUp=e.scaleMatrix=e.getAdjMatrix=e.floydWarshall=e.getDegree=void 0;e.getDegree=function(t,e,i){for(var r=[],n=0;n<t;n++)r[n]=0;return i?(i.forEach((function(t){t.source&&(r[e[t.source]]+=1),t.target&&(r[e[t.target]]+=1)})),r):r};e.floydWarshall=function(t){for(var e=[],i=t.length,r=0;r<i;r+=1){e[r]=[];for(var n=0;n<i;n+=1)r===n?e[r][n]=0:0!==t[r][n]&&t[r][n]?e[r][n]=t[r][n]:e[r][n]=1/0}for(var o=0;o<i;o+=1)for(r=0;r<i;r+=1)for(n=0;n<i;n+=1)e[r][n]>e[r][o]+e[o][n]&&(e[r][n]=e[r][o]+e[o][n]);return e};e.getAdjMatrix=function(t,e){var i=t.nodes,r=t.edges,n=[],o={};if(!i)throw new Error("invalid nodes data!");return i&&i.forEach((function(t,e){o[t.id]=e;n.push([])})),r&&r.forEach((function(t){var i=t.source,r=t.target,s=o[i],u=o[r];n[s][u]=1,e||(n[u][s]=1)})),n};e.scaleMatrix=function(t,e){var i=[];return t.forEach((function(t){var r=[];t.forEach((function(t){r.push(t*e)})),i.push(r)})),i};var r=function(t,e){if(t&&t.children)for(var i=t.children.length-1;i>=0;i--)if(!r(t.children[i],e))return;return!!e(t)};e.traverseTreeUp=function(t,e){"function"==typeof e&&r(t,e)}},14:function(t,e,i){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,i=1,r=arguments.length;i<r;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.clone=e.isObject=void 0;e.isObject=function(t){return null!==t&&"object"==typeof t};e.clone=function(t){if(null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){var i=[];return t.forEach((function(t){i.push(t)})),i.map((function(t){return e.clone(t)}))}if("object"==typeof t&&t!=={}){var n=r({},t);return Object.keys(n).forEach((function(t){n[t]=e.clone(n[t])})),n}return t}},15:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isFunction=void 0;e.isFunction=function(t){return"function"==typeof t}},193:function(t,e,i){"use strict";var r,n=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ForceAtlas2Layout=void 0;var s=i(5),u=i(9),h=o(i(433)),a=o(i(434)),d=o(i(435)),c=function(t){function e(e){var i=t.call(this)||this;return i.center=[0,0],i.width=300,i.height=300,i.nodes=[],i.edges=[],i.kr=5,i.kg=1,i.mode="normal",i.preventOverlap=!1,i.dissuadeHubs=!1,i.barnesHut=!1,i.maxIteration=0,i.ks=.1,i.ksmax=10,i.tao=.1,i.onLayoutEnd=function(){},i.prune=!1,i.updateCfg(e),i}return n(e,t),e.prototype.getDefaultCfg=function(){return{}},e.prototype.execute=function(){var t=this.nodes,e=this.maxIteration,i=this.onLayoutEnd,r=this.prune;this.width||"undefined"==typeof window||(this.width=window.innerWidth),this.height||"undefined"==typeof window||(this.height=window.innerHeight);for(var n=[],o=t.length,s=0;s<o;s+=1){var h=t[s],a=10,d=10;u.isNumber(h.size)&&(a=h.size,d=h.size),u.isArray(h.size)&&(isNaN(h.size[0])||(a=h.size[0]),isNaN(h.size[1])||(d=h.size[1])),this.getWidth&&!isNaN(this.getWidth(h))&&(d=this.getWidth(h)),this.getHeight&&!isNaN(this.getHeight(h))&&(a=this.getHeight(h));var c=Math.max(a,d);n.push(c)}!this.barnesHut&&o>250&&(this.barnesHut=!0),!this.prune&&o>100&&(this.prune=!0),0!==this.maxIteration||this.prune?0===this.maxIteration&&r&&(e=100,o<=200&&o>100?e=500:o>200&&(e=950),this.maxIteration=e):(e=250,o<=200&&o>100?e=1e3:o>200&&(e=1200),this.maxIteration=e),this.kr||(this.kr=50,o>100&&o<=500?this.kr=20:o>500&&(this.kr=1)),this.kg||(this.kg=20,o>100&&o<=500?this.kg=10:o>500&&(this.kg=1)),this.nodes=this.updateNodesByForces(n),i()},e.prototype.updateNodesByForces=function(t){for(var e=this.nodes,i=this.edges,r=this.maxIteration,n=i.filter((function(t){return t.source!==t.target})),o=e.length,s=n.length,u=[],h={},a={},d=[],c=0;c<o;c+=1)h[e[c].id]=c,u[c]=0,(void 0===e[c].x||isNaN(e[c].x))&&(e[c].x=1e3*Math.random()),(void 0===e[c].y||isNaN(e[c].y))&&(e[c].y=1e3*Math.random()),d.push({x:e[c].x,y:e[c].y});for(c=0;c<s;c+=1){for(var f=void 0,p=void 0,l=0,y=0,g=0;g<o;g+=1)e[g].id===n[c].source?(f=e[g],l=g):e[g].id===n[c].target&&(p=e[g],y=g),a[c]={sourceIdx:l,targetIdx:y};f&&(u[h[f.id]]+=1),p&&(u[h[p.id]]+=1)}var v=r;if(e=this.iterate(v,h,a,s,u,t),this.prune){for(g=0;g<s;g+=1)u[a[g].sourceIdx]<=1?(e[a[g].sourceIdx].x=e[a[g].targetIdx].x,e[a[g].sourceIdx].y=e[a[g].targetIdx].y):u[a[g].targetIdx]<=1&&(e[a[g].targetIdx].x=e[a[g].sourceIdx].x,e[a[g].targetIdx].y=e[a[g].sourceIdx].y);this.prune=!1,this.barnesHut=!1,v=100,e=this.iterate(v,h,a,s,u,t)}return e},e.prototype.iterate=function(t,e,i,r,n,o){for(var s=this.nodes,u=this.kr,a=this.preventOverlap,d=this.barnesHut,c=s.length,f=0,p=t,l=[],y=[],g=[],v=0;v<c;v+=1)if(l[2*v]=0,l[2*v+1]=0,d){var x={id:v,rx:s[v].x,ry:s[v].y,mass:1,g:u,degree:n[v]};g[v]=new h.default(x)}for(;p>0;){for(v=0;v<c;v+=1)y[2*v]=l[2*v],y[2*v+1]=l[2*v+1],l[2*v]=0,l[2*v+1]=0;l=this.getAttrForces(p,50,r,e,i,n,o,l),l=d&&(a&&p>50||!a)?this.getOptRepGraForces(l,g,n):this.getRepGraForces(p,50,l,100,o,n);var m=this.updatePos(l,y,f,n);s=m.nodes,f=m.sg,p--,this.tick&&this.tick()}return s},e.prototype.getAttrForces=function(t,e,i,r,n,o,s,u){for(var h=this.nodes,a=this.preventOverlap,d=this.dissuadeHubs,c=this.mode,f=this.prune,p=0;p<i;p+=1){var l=h[n[p].sourceIdx],y=n[p].sourceIdx,g=h[n[p].targetIdx],v=n[p].targetIdx;if(!f||!(o[y]<=1||o[v]<=1)){var x=[g.x-l.x,g.y-l.y],m=Math.hypot(x[0],x[1]);m=m<1e-4?1e-4:m,x[0]=x[0]/m,x[1]=x[1]/m,a&&t<e&&(m=m-s[y]-s[v]);var b=m,_=b;"linlog"===c&&(_=b=Math.log(1+m)),d&&(b=m/o[y],_=m/o[v]),a&&t<e&&m<=0?(b=0,_=0):a&&t<e&&m>0&&(b=m,_=m),u[2*r[l.id]]+=b*x[0],u[2*r[g.id]]-=_*x[0],u[2*r[l.id]+1]+=b*x[1],u[2*r[g.id]+1]-=_*x[1]}}return u},e.prototype.getRepGraForces=function(t,e,i,r,n,o){for(var s=this.nodes,u=this.preventOverlap,h=this.kr,a=this.kg,d=this.center,c=this.prune,f=s.length,p=0;p<f;p+=1){for(var l=p+1;l<f;l+=1)if(!c||!(o[p]<=1||o[l]<=1)){var y=[s[l].x-s[p].x,s[l].y-s[p].y],g=Math.hypot(y[0],y[1]);g=g<1e-4?1e-4:g,y[0]=y[0]/g,y[1]=y[1]/g,u&&t<e&&(g=g-n[p]-n[l]);var v=h*(o[p]+1)*(o[l]+1)/g;u&&t<e&&g<0?v=r*(o[p]+1)*(o[l]+1):u&&t<e&&0===g?v=0:u&&t<e&&g>0&&(v=h*(o[p]+1)*(o[l]+1)/g),i[2*p]-=v*y[0],i[2*l]+=v*y[0],i[2*p+1]-=v*y[1],i[2*l+1]+=v*y[1]}var x=[s[p].x-d[0],s[p].y-d[1]],m=Math.hypot(x[0],x[1]);x[0]=x[0]/m,x[1]=x[1]/m;var b=a*(o[p]+1);i[2*p]-=b*x[0],i[2*p+1]-=b*x[1]}return i},e.prototype.getOptRepGraForces=function(t,e,i){for(var r=this.nodes,n=this.kg,o=this.center,s=this.prune,u=r.length,h=9e10,c=-9e10,f=9e10,p=-9e10,l=0;l<u;l+=1)s&&i[l]<=1||(e[l].setPos(r[l].x,r[l].y),r[l].x>=c&&(c=r[l].x),r[l].x<=h&&(h=r[l].x),r[l].y>=p&&(p=r[l].y),r[l].y<=f&&(f=r[l].y));var y={xmid:(c+h)/2,ymid:(p+f)/2,length:Math.max(c-h,p-f),massCenter:o,mass:u},g=new a.default(y),v=new d.default(g);for(l=0;l<u;l+=1)s&&i[l]<=1||e[l].in(g)&&v.insert(e[l]);for(l=0;l<u;l+=1)if(!(s&&i[l]<=1)){e[l].resetForce(),v.updateForce(e[l]),t[2*l]-=e[l].fx,t[2*l+1]-=e[l].fy;var x=[r[l].x-o[0],r[l].y-o[1]],m=Math.hypot(x[0],x[1]);m=m<1e-4?1e-4:m,x[0]=x[0]/m,x[1]=x[1]/m;var b=n*(i[l]+1);t[2*l]-=b*x[0],t[2*l+1]-=b*x[1]}return t},e.prototype.updatePos=function(t,e,i,r){for(var n=this.nodes,o=this.ks,s=this.tao,u=this.prune,h=this.ksmax,a=n.length,d=[],c=[],f=0,p=0,l=0;l<a;l+=1)if(!(u&&r[l]<=1)){var y=[t[2*l]-e[2*l],t[2*l+1]-e[2*l+1]],g=Math.hypot(y[0],y[1]),v=[t[2*l]+e[2*l],t[2*l+1]+e[2*l+1]],x=Math.hypot(v[0],v[1]);d[l]=g,c[l]=x/2,f+=(r[l]+1)*d[l],p+=(r[l]+1)*c[l]}var m=i;i=s*p/f,0!==m&&(i=i>1.5*m?1.5*m:i);for(l=0;l<a;l+=1)if(!(u&&r[l]<=1)){var b=o*i/(1+i*Math.sqrt(d[l])),_=Math.hypot(t[2*l],t[2*l+1]),N=h/(_=_<1e-4?1e-4:_),O=(b=b>N?N:b)*t[2*l],j=b*t[2*l+1];n[l].x+=O,n[l].y+=j}return{nodes:n,sg:i}},e}(s.Base);e.ForceAtlas2Layout=c},432:function(t,e,i){"use strict";i.r(e);var r=i(193);e.default=r.ForceAtlas2Layout},433:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t){this.id=t.id||0,this.rx=t.rx,this.ry=t.ry,this.fx=0,this.fy=0,this.mass=t.mass,this.degree=t.degree,this.g=t.g||0}return t.prototype.distanceTo=function(t){var e=this.rx-t.rx,i=this.ry-t.ry;return Math.hypot(e,i)},t.prototype.setPos=function(t,e){this.rx=t,this.ry=e},t.prototype.resetForce=function(){this.fx=0,this.fy=0},t.prototype.addForce=function(t){var e=t.rx-this.rx,i=t.ry-this.ry,r=Math.hypot(e,i);r=r<1e-4?1e-4:r;var n=this.g*(this.degree+1)*(t.degree+1)/r;this.fx+=n*e/r,this.fy+=n*i/r},t.prototype.in=function(t){return t.contains(this.rx,this.ry)},t.prototype.add=function(e){var i=this.mass+e.mass;return new t({rx:(this.rx*this.mass+e.rx*e.mass)/i,ry:(this.ry*this.mass+e.ry*e.mass)/i,mass:i,degree:this.degree+e.degree})},t}();e.default=r},434:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t){this.xmid=t.xmid,this.ymid=t.ymid,this.length=t.length,this.massCenter=t.massCenter||[0,0],this.mass=t.mass||1}return t.prototype.getLength=function(){return this.length},t.prototype.contains=function(t,e){var i=this.length/2;return t<=this.xmid+i&&t>=this.xmid-i&&e<=this.ymid+i&&e>=this.ymid-i},t.prototype.NW=function(){return new t({xmid:this.xmid-this.length/4,ymid:this.ymid+this.length/4,length:this.length/2})},t.prototype.NE=function(){return new t({xmid:this.xmid+this.length/4,ymid:this.ymid+this.length/4,length:this.length/2})},t.prototype.SW=function(){return new t({xmid:this.xmid-this.length/4,ymid:this.ymid-this.length/4,length:this.length/2})},t.prototype.SE=function(){return new t({xmid:this.xmid+this.length/4,ymid:this.ymid-this.length/4,length:this.length/2})},t}();e.default=r},435:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t){this.body=null,this.quad=null,this.NW=null,this.NE=null,this.SW=null,this.SE=null,this.theta=.5,null!=t&&(this.quad=t)}return t.prototype.insert=function(e){null!=this.body?this._isExternal()?(this.quad&&(this.NW=new t(this.quad.NW()),this.NE=new t(this.quad.NE()),this.SW=new t(this.quad.SW()),this.SE=new t(this.quad.SE())),this._putBody(this.body),this._putBody(e),this.body=this.body.add(e)):(this.body=this.body.add(e),this._putBody(e)):this.body=e},t.prototype._putBody=function(t){this.quad&&(t.in(this.quad.NW())&&this.NW?this.NW.insert(t):t.in(this.quad.NE())&&this.NE?this.NE.insert(t):t.in(this.quad.SW())&&this.SW?this.SW.insert(t):t.in(this.quad.SE())&&this.SE&&this.SE.insert(t))},t.prototype._isExternal=function(){return null==this.NW&&null==this.NE&&null==this.SW&&null==this.SE},t.prototype.updateForce=function(t){null!=this.body&&t!==this.body&&(this._isExternal()||(this.quad?this.quad.getLength():0)/this.body.distanceTo(t)<this.theta?t.addForce(this.body):(this.NW&&this.NW.updateForce(t),this.NE&&this.NE.updateForce(t),this.SW&&this.SW.updateForce(t),this.SE&&this.SE.updateForce(t)))},t}();e.default=r},5:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Base=void 0;var r=function(){function t(){this.nodes=[],this.edges=[],this.combos=[],this.positions=[],this.destroyed=!1,this.onLayoutEnd=function(){}}return t.prototype.layout=function(t){return this.init(t),this.execute(!0)},t.prototype.init=function(t){this.nodes=t.nodes||[],this.edges=t.edges||[],this.combos=t.combos||[]},t.prototype.execute=function(t){},t.prototype.executeWithWorker=function(){},t.prototype.getDefaultCfg=function(){return{}},t.prototype.updateCfg=function(t){t&&Object.assign(this,t)},t.prototype.getType=function(){return"base"},t.prototype.destroy=function(){this.nodes=null,this.edges=null,this.combos=null,this.positions=null,this.destroyed=!0},t.prototype.onTick=function(){},t}();e.Base=r},9:function(t,e,i){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,i,r){void 0===r&&(r=i),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[i]}})}:function(t,e,i,r){void 0===r&&(r=i),t[r]=e[i]}),n=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||r(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(i(10),e),n(i(11),e),n(i(12),e),n(i(13),e),n(i(14),e),n(i(15),e)}}).default})); | ||
//# sourceMappingURL=forceAtlas2Layout.js.map |
@@ -1,2 +0,2 @@ | ||
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.f6=n():t.f6=n()}(this,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=436)}({10:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.camelize=n.isString=void 0;n.isString=function(t){return"string"==typeof t};var r,o,i=/-(\w)/g;n.camelize=(r=function(t){return t.replace(i,(function(t,n){return n?n.toUpperCase():""}))},o=Object.create(null),function(t){return o[t]||(o[t]=r(t))})},11:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isArray=void 0,n.isArray=Array.isArray},12:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.toNumber=n.isNaN=n.isNumber=void 0;n.isNumber=function(t){return"number"==typeof t};n.isNaN=function(t){return Number.isNaN(Number(t))};n.toNumber=function(t){var e=parseFloat(t);return n.isNaN(e)?t:e}},13:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.traverseTreeUp=n.scaleMatrix=n.getAdjMatrix=n.floydWarshall=n.getDegree=void 0;n.getDegree=function(t,n,e){for(var r=[],o=0;o<t;o++)r[o]=0;return e?(e.forEach((function(t){t.source&&(r[n[t.source]]+=1),t.target&&(r[n[t.target]]+=1)})),r):r};n.floydWarshall=function(t){for(var n=[],e=t.length,r=0;r<e;r+=1){n[r]=[];for(var o=0;o<e;o+=1)r===o?n[r][o]=0:0!==t[r][o]&&t[r][o]?n[r][o]=t[r][o]:n[r][o]=1/0}for(var i=0;i<e;i+=1)for(r=0;r<e;r+=1)for(o=0;o<e;o+=1)n[r][o]>n[r][i]+n[i][o]&&(n[r][o]=n[r][i]+n[i][o]);return n};n.getAdjMatrix=function(t,n){var e=t.nodes,r=t.edges,o=[],i={};if(!e)throw new Error("invalid nodes data!");return e&&e.forEach((function(t,n){i[t.id]=n;o.push([])})),r&&r.forEach((function(t){var e=t.source,r=t.target,u=i[e],c=i[r];o[u][c]=1,n||(o[c][u]=1)})),o};n.scaleMatrix=function(t,n){var e=[];return t.forEach((function(t){var r=[];t.forEach((function(t){r.push(t*n)})),e.push(r)})),e};n.traverseTreeUp=function(t,n){"function"==typeof n&&function t(n,e){if(n&&n.children)for(var r=n.children.length-1;r>=0;r--)if(!t(n.children[r],e))return;return!!e(n)}(t,n)}},14:function(t,n,e){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=this&&this.__assign||function(){return(o=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)};Object.defineProperty(n,"__esModule",{value:!0}),n.clone=n.isObject=void 0;n.isObject=function(t){return null!==t&&"object"===r(t)};n.clone=function(t){if(null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){var e=[];return t.forEach((function(t){e.push(t)})),e.map((function(t){return n.clone(t)}))}if("object"===r(t)&&t!=={}){var i=o({},t);return Object.keys(i).forEach((function(t){i[t]=n.clone(i[t])})),i}return t}},15:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isFunction=void 0;n.isFunction=function(t){return"function"==typeof t}},187:function(t,n,e){"use strict";e.r(n),e.d(n,"forceCenter",(function(){return r})),e.d(n,"forceCollide",(function(){return v})),e.d(n,"forceLink",(function(){return b})),e.d(n,"forceManyBody",(function(){return V})),e.d(n,"forceRadial",(function(){return Z})),e.d(n,"forceSimulation",(function(){return Q})),e.d(n,"forceX",(function(){return $})),e.d(n,"forceY",(function(){return tt}));var r=function(t,n){var e,r=1;function o(){var o,i,u=e.length,c=0,f=0;for(o=0;o<u;++o)c+=(i=e[o]).x,f+=i.y;for(c=(c/u-t)*r,f=(f/u-n)*r,o=0;o<u;++o)(i=e[o]).x-=c,i.y-=f}return null==t&&(t=0),null==n&&(n=0),o.initialize=function(t){e=t},o.x=function(n){return arguments.length?(t=+n,o):t},o.y=function(t){return arguments.length?(n=+t,o):n},o.strength=function(t){return arguments.length?(r=+t,o):r},o};function o(t,n,e,r){if(isNaN(n)||isNaN(e))return t;var o,i,u,c,f,a,l,s,h,d=t._root,y={data:r},p=t._x0,v=t._y0,g=t._x1,_=t._y1;if(!d)return t._root=y,t;for(;d.length;)if((a=n>=(i=(p+g)/2))?p=i:g=i,(l=e>=(u=(v+_)/2))?v=u:_=u,o=d,!(d=d[s=l<<1|a]))return o[s]=y,t;if(c=+t._x.call(null,d.data),f=+t._y.call(null,d.data),n===c&&e===f)return y.next=d,o?o[s]=y:t._root=y,t;do{o=o?o[s]=new Array(4):t._root=new Array(4),(a=n>=(i=(p+g)/2))?p=i:g=i,(l=e>=(u=(v+_)/2))?v=u:_=u}while((s=l<<1|a)==(h=(f>=u)<<1|c>=i));return o[h]=d,o[s]=y,t}var i=function(t,n,e,r,o){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=o};function u(t){return t[0]}function c(t){return t[1]}function f(t,n,e){var r=new a(null==n?u:n,null==e?c:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function a(t,n,e,r,o,i){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=o,this._y1=i,this._root=void 0}function l(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var s=f.prototype=a.prototype;s.copy=function(){var t,n,e=new a(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=l(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var o=0;o<4;++o)(n=r.source[o])&&(n.length?t.push({source:n,target:r.target[o]=new Array(4)}):r.target[o]=l(n));return e},s.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return o(this.cover(n,e),n,e,t)},s.addAll=function(t){var n,e,r,i,u=t.length,c=new Array(u),f=new Array(u),a=1/0,l=1/0,s=-1/0,h=-1/0;for(e=0;e<u;++e)isNaN(r=+this._x.call(null,n=t[e]))||isNaN(i=+this._y.call(null,n))||(c[e]=r,f[e]=i,r<a&&(a=r),r>s&&(s=r),i<l&&(l=i),i>h&&(h=i));if(a>s||l>h)return this;for(this.cover(a,l).cover(s,h),e=0;e<u;++e)o(this,c[e],f[e],t[e]);return this},s.cover=function(t,n){if(isNaN(t=+t)||isNaN(n=+n))return this;var e=this._x0,r=this._y0,o=this._x1,i=this._y1;if(isNaN(e))o=(e=Math.floor(t))+1,i=(r=Math.floor(n))+1;else{for(var u,c,f=o-e||1,a=this._root;e>t||t>=o||r>n||n>=i;)switch(c=(n<r)<<1|t<e,(u=new Array(4))[c]=a,a=u,f*=2,c){case 0:o=e+f,i=r+f;break;case 1:e=o-f,i=r+f;break;case 2:o=e+f,r=i-f;break;case 3:e=o-f,r=i-f}this._root&&this._root.length&&(this._root=a)}return this._x0=e,this._y0=r,this._x1=o,this._y1=i,this},s.data=function(){var t=[];return this.visit((function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)})),t},s.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},s.find=function(t,n,e){var r,o,u,c,f,a,l,s=this._x0,h=this._y0,d=this._x1,y=this._y1,p=[],v=this._root;for(v&&p.push(new i(v,s,h,d,y)),null==e?e=1/0:(s=t-e,h=n-e,d=t+e,y=n+e,e*=e);a=p.pop();)if(!(!(v=a.node)||(o=a.x0)>d||(u=a.y0)>y||(c=a.x1)<s||(f=a.y1)<h))if(v.length){var g=(o+c)/2,_=(u+f)/2;p.push(new i(v[3],g,_,c,f),new i(v[2],o,_,g,f),new i(v[1],g,u,c,_),new i(v[0],o,u,g,_)),(l=(n>=_)<<1|t>=g)&&(a=p[p.length-1],p[p.length-1]=p[p.length-1-l],p[p.length-1-l]=a)}else{var x=t-+this._x.call(null,v.data),b=n-+this._y.call(null,v.data),w=x*x+b*b;if(w<e){var m=Math.sqrt(e=w);s=t-m,h=n-m,d=t+m,y=n+m,r=v.data}}return r},s.remove=function(t){if(isNaN(i=+this._x.call(null,t))||isNaN(u=+this._y.call(null,t)))return this;var n,e,r,o,i,u,c,f,a,l,s,h,d=this._root,y=this._x0,p=this._y0,v=this._x1,g=this._y1;if(!d)return this;if(d.length)for(;;){if((a=i>=(c=(y+v)/2))?y=c:v=c,(l=u>=(f=(p+g)/2))?p=f:g=f,n=d,!(d=d[s=l<<1|a]))return this;if(!d.length)break;(n[s+1&3]||n[s+2&3]||n[s+3&3])&&(e=n,h=s)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(o=d.next)&&delete d.next,r?(o?r.next=o:delete r.next,this):n?(o?n[s]=o:delete n[s],(d=n[0]||n[1]||n[2]||n[3])&&d===(n[3]||n[2]||n[1]||n[0])&&!d.length&&(e?e[h]=d:this._root=d),this):(this._root=o,this)},s.removeAll=function(t){for(var n=0,e=t.length;n<e;++n)this.remove(t[n]);return this},s.root=function(){return this._root},s.size=function(){var t=0;return this.visit((function(n){if(!n.length)do{++t}while(n=n.next)})),t},s.visit=function(t){var n,e,r,o,u,c,f=[],a=this._root;for(a&&f.push(new i(a,this._x0,this._y0,this._x1,this._y1));n=f.pop();)if(!t(a=n.node,r=n.x0,o=n.y0,u=n.x1,c=n.y1)&&a.length){var l=(r+u)/2,s=(o+c)/2;(e=a[3])&&f.push(new i(e,l,s,u,c)),(e=a[2])&&f.push(new i(e,r,s,l,c)),(e=a[1])&&f.push(new i(e,l,o,u,s)),(e=a[0])&&f.push(new i(e,r,o,l,s))}return this},s.visitAfter=function(t){var n,e=[],r=[];for(this._root&&e.push(new i(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var o=n.node;if(o.length){var u,c=n.x0,f=n.y0,a=n.x1,l=n.y1,s=(c+a)/2,h=(f+l)/2;(u=o[0])&&e.push(new i(u,c,f,s,h)),(u=o[1])&&e.push(new i(u,s,f,a,h)),(u=o[2])&&e.push(new i(u,c,h,s,l)),(u=o[3])&&e.push(new i(u,s,h,a,l))}r.push(n)}for(;n=r.pop();)t(n.node,n.x0,n.y0,n.x1,n.y1);return this},s.x=function(t){return arguments.length?(this._x=t,this):this._x},s.y=function(t){return arguments.length?(this._y=t,this):this._y};var h=function(t){return function(){return t}},d=function(t){return 1e-6*(t()-.5)};function y(t){return t.x+t.vx}function p(t){return t.y+t.vy}var v=function(t){var n,e,r,o=1,i=1;function u(){for(var t,u,a,l,s,h,v,g=n.length,_=0;_<i;++_)for(u=f(n,y,p).visitAfter(c),t=0;t<g;++t)a=n[t],h=e[a.index],v=h*h,l=a.x+a.vx,s=a.y+a.vy,u.visit(x);function x(t,n,e,i,u){var c=t.data,f=t.r,y=h+f;if(!c)return n>l+y||i<l-y||e>s+y||u<s-y;if(c.index>a.index){var p=l-c.x-c.vx,g=s-c.y-c.vy,_=p*p+g*g;_<y*y&&(0===p&&(_+=(p=d(r))*p),0===g&&(_+=(g=d(r))*g),_=(y-(_=Math.sqrt(_)))/_*o,a.vx+=(p*=_)*(y=(f*=f)/(v+f)),a.vy+=(g*=_)*y,c.vx-=p*(y=1-y),c.vy-=g*y)}}}function c(t){if(t.data)return t.r=e[t.data.index];for(var n=t.r=0;n<4;++n)t[n]&&t[n].r>t.r&&(t.r=t[n].r)}function a(){if(n){var r,o,i=n.length;for(e=new Array(i),r=0;r<i;++r)o=n[r],e[o.index]=+t(o,r,n)}}return"function"!=typeof t&&(t=h(null==t?1:+t)),u.initialize=function(t,e){n=t,r=e,a()},u.iterations=function(t){return arguments.length?(i=+t,u):i},u.strength=function(t){return arguments.length?(o=+t,u):o},u.radius=function(n){return arguments.length?(t="function"==typeof n?n:h(+n),a(),u):t},u};function g(t){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _(t){return t.index}function x(t,n){var e=t.get(n);if(!e)throw new Error("node not found: "+n);return e}var b=function(t){var n,e,r,o,i,u,c=_,f=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},a=h(30),l=1;function s(r){for(var o=0,c=t.length;o<l;++o)for(var f,a,s,h,y,p,v,g=0;g<c;++g)a=(f=t[g]).source,h=(s=f.target).x+s.vx-a.x-a.vx||d(u),y=s.y+s.vy-a.y-a.vy||d(u),h*=p=((p=Math.sqrt(h*h+y*y))-e[g])/p*r*n[g],y*=p,s.vx-=h*(v=i[g]),s.vy-=y*v,a.vx+=h*(v=1-v),a.vy+=y*v}function y(){if(r){var u,f,a=r.length,l=t.length,s=new Map(r.map((function(t,n){return[c(t,n,r),t]})));for(u=0,o=new Array(a);u<l;++u)(f=t[u]).index=u,"object"!==g(f.source)&&(f.source=x(s,f.source)),"object"!==g(f.target)&&(f.target=x(s,f.target)),o[f.source.index]=(o[f.source.index]||0)+1,o[f.target.index]=(o[f.target.index]||0)+1;for(u=0,i=new Array(l);u<l;++u)f=t[u],i[u]=o[f.source.index]/(o[f.source.index]+o[f.target.index]);n=new Array(l),p(),e=new Array(l),v()}}function p(){if(r)for(var e=0,o=t.length;e<o;++e)n[e]=+f(t[e],e,t)}function v(){if(r)for(var n=0,o=t.length;n<o;++n)e[n]=+a(t[n],n,t)}return null==t&&(t=[]),s.initialize=function(t,n){r=t,u=n,y()},s.links=function(n){return arguments.length?(t=n,y(),s):t},s.id=function(t){return arguments.length?(c=t,s):c},s.iterations=function(t){return arguments.length?(l=+t,s):l},s.strength=function(t){return arguments.length?(f="function"==typeof t?t:h(+t),p(),s):f},s.distance=function(t){return arguments.length?(a="function"==typeof t?t:h(+t),v(),s):a},s},w={value:function(){}};function m(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new S(r)}function S(t){this._=t}function N(t,n){return t.trim().split(/^|\s+/).map((function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))}function O(t,n){for(var e,r=0,o=t.length;r<o;++r)if((e=t[r]).name===n)return e.value}function k(t,n,e){for(var r=0,o=t.length;r<o;++r)if(t[r].name===n){t[r]=w,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}S.prototype=m.prototype={constructor:S,on:function(t,n){var e,r=this._,o=N(t+"",r),i=-1,u=o.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++i<u;)if(e=(t=o[i]).type)r[e]=k(r[e],t.name,n);else if(null==n)for(e in r)r[e]=k(r[e],t.name,null);return this}for(;++i<u;)if((e=(t=o[i]).type)&&(e=O(r[e],t.name)))return e},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new S(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,o=new Array(e),i=0;i<e;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=0,e=(r=this._[t]).length;i<e;++i)r[i].value.apply(n,o)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],o=0,i=r.length;o<i;++o)r[o].value.apply(n,e)}};var M=m;function j(t){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var E,A,P=0,z=0,D=0,T=0,L=0,F=0,U="object"===("undefined"==typeof performance?"undefined":j(performance))&&performance.now?performance:Date,C="object"===("undefined"==typeof window?"undefined":j(window))&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function q(){return L||(C(B),L=U.now()+F)}function B(){L=0}function Y(){this._call=this._time=this._next=null}function R(t,n,e){var r=new Y;return r.restart(t,n,e),r}function G(){L=(T=U.now())+F,P=z=0;try{!function(){q(),++P;for(var t,n=E;n;)(t=L-n._time)>=0&&n._call.call(null,t),n=n._next;--P}()}finally{P=0,function(){var t,n,e=E,r=1/0;for(;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:E=n);A=t,W(r)}(),L=0}}function I(){var t=U.now(),n=t-T;n>1e3&&(F-=n,T=t)}function W(t){P||(z&&(z=clearTimeout(z)),t-L>24?(t<1/0&&(z=setTimeout(G,t-U.now()-F)),D&&(D=clearInterval(D))):(D||(T=U.now(),D=setInterval(I,1e3)),P=1,C(G)))}Y.prototype=R.prototype={constructor:Y,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?q():+e)+(null==n?0:+n),this._next||A===this||(A?A._next=this:E=this,A=this),this._call=t,this._time=e,W()},stop:function(){this._call&&(this._call=null,this._time=1/0,W())}};var X=4294967296;function K(t){return t.x}function H(t){return t.y}var J=Math.PI*(3-Math.sqrt(5)),Q=function(t){var n,e,r=1,o=.001,i=1-Math.pow(o,1/300),u=0,c=.6,f=new Map,a=R(h),l=M("tick","end"),s=(e=1,function(){return(e=(1664525*e+1013904223)%X)/X});function h(){d(),l.call("tick",n),r<o&&(a.stop(),l.call("end",n))}function d(e){var o,a,l=t.length;void 0===e&&(e=1);for(var s=0;s<e;++s)for(r+=(u-r)*i,f.forEach((function(t){t(r)})),o=0;o<l;++o)null==(a=t[o]).fx?a.x+=a.vx*=c:(a.x=a.fx,a.vx=0),null==a.fy?a.y+=a.vy*=c:(a.y=a.fy,a.vy=0);return n}function y(){for(var n,e=0,r=t.length;e<r;++e){if((n=t[e]).index=e,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),isNaN(n.x)||isNaN(n.y)){var o=10*Math.sqrt(.5+e),i=e*J;n.x=o*Math.cos(i),n.y=o*Math.sin(i)}(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}}function p(n){return n.initialize&&n.initialize(t,s),n}return null==t&&(t=[]),y(),n={tick:d,restart:function(){return a.restart(h),n},stop:function(){return a.stop(),n},nodes:function(e){return arguments.length?(t=e,y(),f.forEach(p),n):t},alpha:function(t){return arguments.length?(r=+t,n):r},alphaMin:function(t){return arguments.length?(o=+t,n):o},alphaDecay:function(t){return arguments.length?(i=+t,n):+i},alphaTarget:function(t){return arguments.length?(u=+t,n):u},velocityDecay:function(t){return arguments.length?(c=1-t,n):1-c},randomSource:function(t){return arguments.length?(s=t,f.forEach(p),n):s},force:function(t,e){return arguments.length>1?(null==e?f.delete(t):f.set(t,p(e)),n):f.get(t)},find:function(n,e,r){var o,i,u,c,f,a=0,l=t.length;for(null==r?r=1/0:r*=r,a=0;a<l;++a)(u=(o=n-(c=t[a]).x)*o+(i=e-c.y)*i)<r&&(f=c,r=u);return f},on:function(t,e){return arguments.length>1?(l.on(t,e),n):l.on(t)}}},V=function(){var t,n,e,r,o,i=h(-30),u=1,c=1/0,a=.81;function l(e){var o,i=t.length,u=f(t,K,H).visitAfter(y);for(r=e,o=0;o<i;++o)n=t[o],u.visit(p)}function s(){if(t){var n,e,r=t.length;for(o=new Array(r),n=0;n<r;++n)e=t[n],o[e.index]=+i(e,n,t)}}function y(t){var n,e,r,i,u,c=0,f=0;if(t.length){for(r=i=u=0;u<4;++u)(n=t[u])&&(e=Math.abs(n.value))&&(c+=n.value,f+=e,r+=e*n.x,i+=e*n.y);t.x=r/f,t.y=i/f}else{(n=t).x=n.data.x,n.y=n.data.y;do{c+=o[n.data.index]}while(n=n.next)}t.value=c}function p(t,i,f,l){if(!t.value)return!0;var s=t.x-n.x,h=t.y-n.y,y=l-i,p=s*s+h*h;if(y*y/a<p)return p<c&&(0===s&&(p+=(s=d(e))*s),0===h&&(p+=(h=d(e))*h),p<u&&(p=Math.sqrt(u*p)),n.vx+=s*t.value*r/p,n.vy+=h*t.value*r/p),!0;if(!(t.length||p>=c)){(t.data!==n||t.next)&&(0===s&&(p+=(s=d(e))*s),0===h&&(p+=(h=d(e))*h),p<u&&(p=Math.sqrt(u*p)));do{t.data!==n&&(y=o[t.data.index]*r/p,n.vx+=s*y,n.vy+=h*y)}while(t=t.next)}}return l.initialize=function(n,r){t=n,e=r,s()},l.strength=function(t){return arguments.length?(i="function"==typeof t?t:h(+t),s(),l):i},l.distanceMin=function(t){return arguments.length?(u=t*t,l):Math.sqrt(u)},l.distanceMax=function(t){return arguments.length?(c=t*t,l):Math.sqrt(c)},l.theta=function(t){return arguments.length?(a=t*t,l):Math.sqrt(a)},l},Z=function(t,n,e){var r,o,i,u=h(.1);function c(t){for(var u=0,c=r.length;u<c;++u){var f=r[u],a=f.x-n||1e-6,l=f.y-e||1e-6,s=Math.sqrt(a*a+l*l),h=(i[u]-s)*o[u]*t/s;f.vx+=a*h,f.vy+=l*h}}function f(){if(r){var n,e=r.length;for(o=new Array(e),i=new Array(e),n=0;n<e;++n)i[n]=+t(r[n],n,r),o[n]=isNaN(i[n])?0:+u(r[n],n,r)}}return"function"!=typeof t&&(t=h(+t)),null==n&&(n=0),null==e&&(e=0),c.initialize=function(t){r=t,f()},c.strength=function(t){return arguments.length?(u="function"==typeof t?t:h(+t),f(),c):u},c.radius=function(n){return arguments.length?(t="function"==typeof n?n:h(+n),f(),c):t},c.x=function(t){return arguments.length?(n=+t,c):n},c.y=function(t){return arguments.length?(e=+t,c):e},c},$=function(t){var n,e,r,o=h(.1);function i(t){for(var o,i=0,u=n.length;i<u;++i)(o=n[i]).vx+=(r[i]-o.x)*e[i]*t}function u(){if(n){var i,u=n.length;for(e=new Array(u),r=new Array(u),i=0;i<u;++i)e[i]=isNaN(r[i]=+t(n[i],i,n))?0:+o(n[i],i,n)}}return"function"!=typeof t&&(t=h(null==t?0:+t)),i.initialize=function(t){n=t,u()},i.strength=function(t){return arguments.length?(o="function"==typeof t?t:h(+t),u(),i):o},i.x=function(n){return arguments.length?(t="function"==typeof n?n:h(+n),u(),i):t},i},tt=function(t){var n,e,r,o=h(.1);function i(t){for(var o,i=0,u=n.length;i<u;++i)(o=n[i]).vy+=(r[i]-o.y)*e[i]*t}function u(){if(n){var i,u=n.length;for(e=new Array(u),r=new Array(u),i=0;i<u;++i)e[i]=isNaN(r[i]=+t(n[i],i,n))?0:+o(n[i],i,n)}}return"function"!=typeof t&&(t=h(null==t?0:+t)),i.initialize=function(t){n=t,u()},i.strength=function(t){return arguments.length?(o="function"==typeof t?t:h(+t),u(),i):o},i.y=function(n){return arguments.length?(t="function"==typeof n?n:h(+n),u(),i):t},i}},194:function(t,n,e){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),o=this&&this.__exportStar||function(t,n){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(n,e)||r(n,t,e)};Object.defineProperty(n,"__esModule",{value:!0}),o(e(437),n)},436:function(t,n,e){"use strict";e.r(n);var r=e(194);n.default=r.ForceLayout},437:function(t,n,e){"use strict";var r,o=this&&this.__extends||(r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}),i=this&&this.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),u=this&&this.__setModuleDefault||(Object.create?function(t,n){Object.defineProperty(t,"default",{enumerable:!0,value:n})}:function(t,n){t.default=n}),c=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)"default"!==e&&Object.prototype.hasOwnProperty.call(t,e)&&i(n,t,e);return u(n,t),n},f=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0}),n.ForceLayout=void 0;var a=c(e(187)),l=f(e(438)),s=e(9),h=e(5),d=e(439),y=function(t){function n(n){var e=t.call(this)||this;return e.center=[0,0],e.nodeStrength=null,e.edgeStrength=null,e.preventOverlap=!1,e.clusterNodeStrength=null,e.clusterEdgeStrength=null,e.clusterEdgeDistance=null,e.clusterNodeSize=null,e.clusterFociStrength=null,e.linkDistance=50,e.alphaDecay=.028,e.alphaMin=.001,e.alpha=.3,e.collideStrength=1,e.workerEnabled=!1,e.tick=function(){},e.onLayoutEnd=function(){},e.ticking=void 0,n&&e.updateCfg(n),e}return o(n,t),n.prototype.getDefaultCfg=function(){return{center:[0,0],nodeStrength:null,edgeStrength:null,preventOverlap:!1,nodeSize:void 0,nodeSpacing:void 0,linkDistance:50,forceSimulation:null,alphaDecay:.028,alphaMin:.001,alpha:.3,collideStrength:1,clustering:!1,clusterNodeStrength:-1,clusterEdgeStrength:.1,clusterEdgeDistance:100,clusterFociStrength:.8,clusterNodeSize:10,tick:function(){},onLayoutEnd:function(){},workerEnabled:!1}},n.prototype.init=function(t){this.nodes=t.nodes||[];var n=t.edges||[];this.edges=n.map((function(t){var n={},e=["targetNode","sourceNode","startPoint","endPoint"];return Object.keys(t).forEach((function(r){e.indexOf(r)>-1||(n[r]=t[r])})),n})),this.ticking=!1},n.prototype.execute=function(t){var n=this,e=n.nodes,r=n.edges;if(!n.ticking){var o=n.forceSimulation,i=n.alphaMin,u=n.alphaDecay,c=n.alpha;if(o){if(t)if(n.clustering&&n.clusterForce&&(n.clusterForce.nodes(e),n.clusterForce.links(r)),o.nodes(e),r&&n.edgeForce)n.edgeForce.links(r);else if(r&&!n.edgeForce){h=a.forceLink().id((function(t){return t.id})).links(r);n.edgeStrength&&h.strength(n.edgeStrength),n.linkDistance&&h.distance(n.linkDistance),n.edgeForce=h,o.force("link",h)}n.preventOverlap&&n.overlapProcess(o),o.alpha(c).restart(),this.ticking=!0}else try{var f=a.forceManyBody();if(n.nodeStrength&&f.strength(n.nodeStrength),o=a.forceSimulation().nodes(e),n.clustering){var s=l.default();s.centerX(n.center[0]).centerY(n.center[1]).template("force").strength(n.clusterFociStrength),r&&s.links(r),e&&s.nodes(e),s.forceLinkDistance(n.clusterEdgeDistance).forceLinkStrength(n.clusterEdgeStrength).forceCharge(n.clusterNodeStrength).forceNodeSize(n.clusterNodeSize),n.clusterForce=s,o.force("group",s)}if(o.force("center",a.forceCenter(n.center[0],n.center[1])).force("charge",f).alpha(c).alphaDecay(u).alphaMin(i),n.preventOverlap&&n.overlapProcess(o),r){var h=a.forceLink().id((function(t){return t.id})).links(r);n.edgeStrength&&h.strength(n.edgeStrength),n.linkDistance&&h.distance(n.linkDistance),n.edgeForce=h,o.force("link",h)}if(n.workerEnabled&&!p()&&(n.workerEnabled=!1,console.warn("workerEnabled option is only supported when running in web worker.")),n.workerEnabled){o.stop();for(var y=function(t){var n=t.alphaMin(),e=t.alphaTarget(),r=t.alpha(),o=Math.log((n-e)/(r-e))/Math.log(1-t.alphaDecay());return Math.ceil(o)}(o),v=1;v<=y;v++)o.tick(),postMessage({nodes:e,currentTick:v,totalTicks:y,type:d.LAYOUT_MESSAGE.TICK},void 0);n.ticking=!1}else o.on("tick",(function(){n.tick()})).on("end",(function(){n.ticking=!1,n.onLayoutEnd&&n.onLayoutEnd()})),n.ticking=!0;n.forceSimulation=o,n.ticking=!0}catch(t){n.ticking=!1,console.warn(t)}}},n.prototype.overlapProcess=function(t){var n,e,r=this.nodeSize,o=this.nodeSpacing,i=this.collideStrength;if(e=s.isNumber(o)?function(){return o}:s.isFunction(o)?o:function(){return 0},r)if(s.isFunction(r))n=function(t){return r(t)+e(t)};else if(s.isArray(r)){var u=(r[0]>r[1]?r[0]:r[1])/2;n=function(t){return u+e(t)}}else if(s.isNumber(r)){var c=r/2;n=function(t){return c+e(t)}}else n=function(){return 10};else n=function(t){return t.size?s.isArray(t.size)?(t.size[0]>t.size[1]?t.size[0]:t.size[1])/2+e(t):t.size/2+e(t):10+e(t)};t.force("collisionForce",a.forceCollide(n).strength(i))},n.prototype.updateCfg=function(t){this.ticking&&(this.forceSimulation.stop(),this.ticking=!1),this.forceSimulation=null,Object.assign(this,t)},n.prototype.destroy=function(){this.ticking&&(this.forceSimulation.stop(),this.ticking=!1),this.nodes=null,this.edges=null,this.destroyed=!0},n}(h.Base);function p(){return"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope}n.ForceLayout=y},438:function(t,n,e){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),o=this&&this.__setModuleDefault||(Object.create?function(t,n){Object.defineProperty(t,"default",{enumerable:!0,value:n})}:function(t,n){t.default=n}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)"default"!==e&&Object.prototype.hasOwnProperty.call(t,e)&&r(n,t,e);return o(n,t),n};Object.defineProperty(n,"__esModule",{value:!0});var u=i(e(187));n.default=function(){function t(t){return function(){return t}}var n,e=function(t){return t.cluster},r=t(1),o=t(-1),i=t(100),c=t(.1),f=[0,0],a=[],l={},s=[],h=100,d=100,y={none:{x:0,y:0}},p=[],v="force",g=!0,_=.1;function x(t){if(!g)return x;n.tick(),w();for(var r=0,o=a.length,i=void 0,u=t*_;r<o;++r)(i=a[r]).vx+=(y[e(i)].x-i.x)*u,i.vy+=(y[e(i)].y-i.y)*u}function b(){a&&function(){if(!a||!a.length)return;if(void 0===e(a[0]))throw Error("Couldnt find the grouping attribute for the nodes. Make sure to set it up with forceInABox.groupBy('clusterAttr') before calling .links()");var t=(y=[],v=[],g={},_=[],f=function(t){var n={};return t.forEach((function(t){var r=e(t);n[r]||(n[r]={count:0,sumforceNodeSize:0})})),t.forEach((function(t){var o=e(t),i=r(t),u=n[o];u.count=u.count+1,u.sumforceNodeSize=u.sumforceNodeSize+Math.PI*(i*i)*1.3,n[o]=u})),n}(a),_=function(t){var n={},r=[];return t.forEach((function(t){var r=function(t){var n=e(l[t.source]),r=e(l[t.target]);return n<=r?n+"~"+r:r+"~"+n}(t),o=0;void 0!==n[r]&&(o=n[r]),o+=1,n[r]=o})),Object.entries(n).forEach((function(t){var n=t[0],e=t[1],o=n.split("~")[0],i=n.split("~")[1];void 0!==o&&void 0!==i&&r.push({source:o,target:i,count:e})})),r}(s),Object.keys(f).forEach((function(t,n){var e=f[t];y.push({id:t,size:e.count,r:Math.sqrt(e.sumforceNodeSize/Math.PI)}),g[t]=n})),_.forEach((function(t){var n=g[t.source],e=g[t.target];void 0!==n&&void 0!==e&&v.push({source:n,target:e,count:t.count})})),{nodes:y,links:v});var f,y,v,g,_;n=u.forceSimulation(t.nodes).force("x",u.forceX(h).strength(.1)).force("y",u.forceY(d).strength(.1)).force("collide",u.forceCollide((function(t){return t.r})).iterations(4)).force("charge",u.forceManyBody().strength(o)).force("links",u.forceLink(t.nodes.length?t.links:[]).distance(i).strength(c)),p=n.nodes(),w()}()}function w(){return y={none:{x:0,y:0}},p.forEach((function(t){y[t.id]={x:t.x-f[0],y:t.y-f[1]}})),y}function m(t){l={},t.forEach((function(t){l[t.id]=t}))}return x.initialize=function(t){a=t,b()},x.template=function(t){return arguments.length?(v=t,b(),x):v},x.groupBy=function(t){return arguments.length?"string"==typeof t?(e=function(n){return n[t]},x):(e=t,x):e},x.enableGrouping=function(t){return arguments.length?(g=t,x):g},x.strength=function(t){return arguments.length?(_=t,x):_},x.centerX=function(t){return arguments.length?(h=t,x):h},x.centerY=function(t){return arguments.length?(d=t,x):d},x.nodes=function(t){return arguments.length?(m(t||[]),a=t||[],x):a},x.links=function(t){return arguments.length?(s=t||[],b(),x):s},x.forceNodeSize=function(n){return arguments.length?(r="function"==typeof n?n:t(+n),b(),x):r},x.nodeSize=x.forceNodeSize,x.forceCharge=function(n){return arguments.length?(o="function"==typeof n?n:t(+n),b(),x):o},x.forceLinkDistance=function(n){return arguments.length?(i="function"==typeof n?n:t(+n),b(),x):i},x.forceLinkStrength=function(n){return arguments.length?(c="function"==typeof n?n:t(+n),b(),x):c},x.offset=function(t){return arguments.length?(f=t,x):f},x.getFocis=w,x}},439:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LAYOUT_MESSAGE=void 0,n.LAYOUT_MESSAGE={RUN:"LAYOUT_RUN",END:"LAYOUT_END",ERROR:"LAYOUT_ERROR",TICK:"LAYOUT_TICK",GPURUN:"GPU_LAYOUT_RUN",GPUEND:"GPU_LAYOUT_END"}},5:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Base=void 0;var r=function(){function t(){this.nodes=[],this.edges=[],this.combos=[],this.positions=[],this.destroyed=!1,this.onLayoutEnd=function(){}}return t.prototype.layout=function(t){return this.init(t),this.execute(!0)},t.prototype.init=function(t){this.nodes=t.nodes||[],this.edges=t.edges||[],this.combos=t.combos||[]},t.prototype.execute=function(t){},t.prototype.executeWithWorker=function(){},t.prototype.getDefaultCfg=function(){return{}},t.prototype.updateCfg=function(t){t&&Object.assign(this,t)},t.prototype.getType=function(){return"base"},t.prototype.destroy=function(){this.nodes=null,this.edges=null,this.combos=null,this.positions=null,this.destroyed=!0},t}();n.Base=r},9:function(t,n,e){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),o=this&&this.__exportStar||function(t,n){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(n,e)||r(n,t,e)};Object.defineProperty(n,"__esModule",{value:!0}),o(e(10),n),o(e(11),n),o(e(12),n),o(e(13),n),o(e(14),n),o(e(15),n)}}).default})); | ||
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.f6=n():t.f6=n()}(this,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=436)}({10:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.camelize=n.isString=void 0;n.isString=function(t){return"string"==typeof t};var r,o,i=/-(\w)/g;n.camelize=(r=function(t){return t.replace(i,(function(t,n){return n?n.toUpperCase():""}))},o=Object.create(null),function(t){return o[t]||(o[t]=r(t))})},11:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isArray=void 0,n.isArray=Array.isArray},12:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.toNumber=n.isNaN=n.isNumber=void 0;n.isNumber=function(t){return"number"==typeof t};n.isNaN=function(t){return Number.isNaN(Number(t))};n.toNumber=function(t){var e=parseFloat(t);return n.isNaN(e)?t:e}},13:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.traverseTreeUp=n.scaleMatrix=n.getAdjMatrix=n.floydWarshall=n.getDegree=void 0;n.getDegree=function(t,n,e){for(var r=[],o=0;o<t;o++)r[o]=0;return e?(e.forEach((function(t){t.source&&(r[n[t.source]]+=1),t.target&&(r[n[t.target]]+=1)})),r):r};n.floydWarshall=function(t){for(var n=[],e=t.length,r=0;r<e;r+=1){n[r]=[];for(var o=0;o<e;o+=1)r===o?n[r][o]=0:0!==t[r][o]&&t[r][o]?n[r][o]=t[r][o]:n[r][o]=1/0}for(var i=0;i<e;i+=1)for(r=0;r<e;r+=1)for(o=0;o<e;o+=1)n[r][o]>n[r][i]+n[i][o]&&(n[r][o]=n[r][i]+n[i][o]);return n};n.getAdjMatrix=function(t,n){var e=t.nodes,r=t.edges,o=[],i={};if(!e)throw new Error("invalid nodes data!");return e&&e.forEach((function(t,n){i[t.id]=n;o.push([])})),r&&r.forEach((function(t){var e=t.source,r=t.target,u=i[e],c=i[r];o[u][c]=1,n||(o[c][u]=1)})),o};n.scaleMatrix=function(t,n){var e=[];return t.forEach((function(t){var r=[];t.forEach((function(t){r.push(t*n)})),e.push(r)})),e};var r=function(t,n){if(t&&t.children)for(var e=t.children.length-1;e>=0;e--)if(!r(t.children[e],n))return;return!!n(t)};n.traverseTreeUp=function(t,n){"function"==typeof n&&r(t,n)}},14:function(t,n,e){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)};Object.defineProperty(n,"__esModule",{value:!0}),n.clone=n.isObject=void 0;n.isObject=function(t){return null!==t&&"object"==typeof t};n.clone=function(t){if(null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){var e=[];return t.forEach((function(t){e.push(t)})),e.map((function(t){return n.clone(t)}))}if("object"==typeof t&&t!=={}){var o=r({},t);return Object.keys(o).forEach((function(t){o[t]=n.clone(o[t])})),o}return t}},15:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isFunction=void 0;n.isFunction=function(t){return"function"==typeof t}},187:function(t,n,e){"use strict";e.r(n),e.d(n,"forceCenter",(function(){return r})),e.d(n,"forceCollide",(function(){return v})),e.d(n,"forceLink",(function(){return b})),e.d(n,"forceManyBody",(function(){return V})),e.d(n,"forceRadial",(function(){return Z})),e.d(n,"forceSimulation",(function(){return Q})),e.d(n,"forceX",(function(){return $})),e.d(n,"forceY",(function(){return tt}));var r=function(t,n){var e,r=1;function o(){var o,i,u=e.length,c=0,f=0;for(o=0;o<u;++o)c+=(i=e[o]).x,f+=i.y;for(c=(c/u-t)*r,f=(f/u-n)*r,o=0;o<u;++o)(i=e[o]).x-=c,i.y-=f}return null==t&&(t=0),null==n&&(n=0),o.initialize=function(t){e=t},o.x=function(n){return arguments.length?(t=+n,o):t},o.y=function(t){return arguments.length?(n=+t,o):n},o.strength=function(t){return arguments.length?(r=+t,o):r},o};function o(t,n,e,r){if(isNaN(n)||isNaN(e))return t;var o,i,u,c,f,a,s,l,h,d=t._root,y={data:r},p=t._x0,v=t._y0,g=t._x1,_=t._y1;if(!d)return t._root=y,t;for(;d.length;)if((a=n>=(i=(p+g)/2))?p=i:g=i,(s=e>=(u=(v+_)/2))?v=u:_=u,o=d,!(d=d[l=s<<1|a]))return o[l]=y,t;if(c=+t._x.call(null,d.data),f=+t._y.call(null,d.data),n===c&&e===f)return y.next=d,o?o[l]=y:t._root=y,t;do{o=o?o[l]=new Array(4):t._root=new Array(4),(a=n>=(i=(p+g)/2))?p=i:g=i,(s=e>=(u=(v+_)/2))?v=u:_=u}while((l=s<<1|a)==(h=(f>=u)<<1|c>=i));return o[h]=d,o[l]=y,t}var i=function(t,n,e,r,o){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=o};function u(t){return t[0]}function c(t){return t[1]}function f(t,n,e){var r=new a(null==n?u:n,null==e?c:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function a(t,n,e,r,o,i){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=o,this._y1=i,this._root=void 0}function s(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var l=f.prototype=a.prototype;l.copy=function(){var t,n,e=new a(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=s(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var o=0;o<4;++o)(n=r.source[o])&&(n.length?t.push({source:n,target:r.target[o]=new Array(4)}):r.target[o]=s(n));return e},l.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return o(this.cover(n,e),n,e,t)},l.addAll=function(t){var n,e,r,i,u=t.length,c=new Array(u),f=new Array(u),a=1/0,s=1/0,l=-1/0,h=-1/0;for(e=0;e<u;++e)isNaN(r=+this._x.call(null,n=t[e]))||isNaN(i=+this._y.call(null,n))||(c[e]=r,f[e]=i,r<a&&(a=r),r>l&&(l=r),i<s&&(s=i),i>h&&(h=i));if(a>l||s>h)return this;for(this.cover(a,s).cover(l,h),e=0;e<u;++e)o(this,c[e],f[e],t[e]);return this},l.cover=function(t,n){if(isNaN(t=+t)||isNaN(n=+n))return this;var e=this._x0,r=this._y0,o=this._x1,i=this._y1;if(isNaN(e))o=(e=Math.floor(t))+1,i=(r=Math.floor(n))+1;else{for(var u,c,f=o-e||1,a=this._root;e>t||t>=o||r>n||n>=i;)switch(c=(n<r)<<1|t<e,(u=new Array(4))[c]=a,a=u,f*=2,c){case 0:o=e+f,i=r+f;break;case 1:e=o-f,i=r+f;break;case 2:o=e+f,r=i-f;break;case 3:e=o-f,r=i-f}this._root&&this._root.length&&(this._root=a)}return this._x0=e,this._y0=r,this._x1=o,this._y1=i,this},l.data=function(){var t=[];return this.visit((function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)})),t},l.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},l.find=function(t,n,e){var r,o,u,c,f,a,s,l=this._x0,h=this._y0,d=this._x1,y=this._y1,p=[],v=this._root;for(v&&p.push(new i(v,l,h,d,y)),null==e?e=1/0:(l=t-e,h=n-e,d=t+e,y=n+e,e*=e);a=p.pop();)if(!(!(v=a.node)||(o=a.x0)>d||(u=a.y0)>y||(c=a.x1)<l||(f=a.y1)<h))if(v.length){var g=(o+c)/2,_=(u+f)/2;p.push(new i(v[3],g,_,c,f),new i(v[2],o,_,g,f),new i(v[1],g,u,c,_),new i(v[0],o,u,g,_)),(s=(n>=_)<<1|t>=g)&&(a=p[p.length-1],p[p.length-1]=p[p.length-1-s],p[p.length-1-s]=a)}else{var x=t-+this._x.call(null,v.data),b=n-+this._y.call(null,v.data),w=x*x+b*b;if(w<e){var m=Math.sqrt(e=w);l=t-m,h=n-m,d=t+m,y=n+m,r=v.data}}return r},l.remove=function(t){if(isNaN(i=+this._x.call(null,t))||isNaN(u=+this._y.call(null,t)))return this;var n,e,r,o,i,u,c,f,a,s,l,h,d=this._root,y=this._x0,p=this._y0,v=this._x1,g=this._y1;if(!d)return this;if(d.length)for(;;){if((a=i>=(c=(y+v)/2))?y=c:v=c,(s=u>=(f=(p+g)/2))?p=f:g=f,n=d,!(d=d[l=s<<1|a]))return this;if(!d.length)break;(n[l+1&3]||n[l+2&3]||n[l+3&3])&&(e=n,h=l)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(o=d.next)&&delete d.next,r?(o?r.next=o:delete r.next,this):n?(o?n[l]=o:delete n[l],(d=n[0]||n[1]||n[2]||n[3])&&d===(n[3]||n[2]||n[1]||n[0])&&!d.length&&(e?e[h]=d:this._root=d),this):(this._root=o,this)},l.removeAll=function(t){for(var n=0,e=t.length;n<e;++n)this.remove(t[n]);return this},l.root=function(){return this._root},l.size=function(){var t=0;return this.visit((function(n){if(!n.length)do{++t}while(n=n.next)})),t},l.visit=function(t){var n,e,r,o,u,c,f=[],a=this._root;for(a&&f.push(new i(a,this._x0,this._y0,this._x1,this._y1));n=f.pop();)if(!t(a=n.node,r=n.x0,o=n.y0,u=n.x1,c=n.y1)&&a.length){var s=(r+u)/2,l=(o+c)/2;(e=a[3])&&f.push(new i(e,s,l,u,c)),(e=a[2])&&f.push(new i(e,r,l,s,c)),(e=a[1])&&f.push(new i(e,s,o,u,l)),(e=a[0])&&f.push(new i(e,r,o,s,l))}return this},l.visitAfter=function(t){var n,e=[],r=[];for(this._root&&e.push(new i(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var o=n.node;if(o.length){var u,c=n.x0,f=n.y0,a=n.x1,s=n.y1,l=(c+a)/2,h=(f+s)/2;(u=o[0])&&e.push(new i(u,c,f,l,h)),(u=o[1])&&e.push(new i(u,l,f,a,h)),(u=o[2])&&e.push(new i(u,c,h,l,s)),(u=o[3])&&e.push(new i(u,l,h,a,s))}r.push(n)}for(;n=r.pop();)t(n.node,n.x0,n.y0,n.x1,n.y1);return this},l.x=function(t){return arguments.length?(this._x=t,this):this._x},l.y=function(t){return arguments.length?(this._y=t,this):this._y};var h=function(t){return function(){return t}},d=function(t){return 1e-6*(t()-.5)};function y(t){return t.x+t.vx}function p(t){return t.y+t.vy}var v=function(t){var n,e,r,o=1,i=1;function u(){for(var t,u,a,s,l,h,v,g=n.length,_=0;_<i;++_)for(u=f(n,y,p).visitAfter(c),t=0;t<g;++t)a=n[t],h=e[a.index],v=h*h,s=a.x+a.vx,l=a.y+a.vy,u.visit(x);function x(t,n,e,i,u){var c=t.data,f=t.r,y=h+f;if(!c)return n>s+y||i<s-y||e>l+y||u<l-y;if(c.index>a.index){var p=s-c.x-c.vx,g=l-c.y-c.vy,_=p*p+g*g;_<y*y&&(0===p&&(_+=(p=d(r))*p),0===g&&(_+=(g=d(r))*g),_=(y-(_=Math.sqrt(_)))/_*o,a.vx+=(p*=_)*(y=(f*=f)/(v+f)),a.vy+=(g*=_)*y,c.vx-=p*(y=1-y),c.vy-=g*y)}}}function c(t){if(t.data)return t.r=e[t.data.index];for(var n=t.r=0;n<4;++n)t[n]&&t[n].r>t.r&&(t.r=t[n].r)}function a(){if(n){var r,o,i=n.length;for(e=new Array(i),r=0;r<i;++r)o=n[r],e[o.index]=+t(o,r,n)}}return"function"!=typeof t&&(t=h(null==t?1:+t)),u.initialize=function(t,e){n=t,r=e,a()},u.iterations=function(t){return arguments.length?(i=+t,u):i},u.strength=function(t){return arguments.length?(o=+t,u):o},u.radius=function(n){return arguments.length?(t="function"==typeof n?n:h(+n),a(),u):t},u};function g(t){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _(t){return t.index}function x(t,n){var e=t.get(n);if(!e)throw new Error("node not found: "+n);return e}var b=function(t){var n,e,r,o,i,u,c=_,f=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},a=h(30),s=1;function l(r){for(var o=0,c=t.length;o<s;++o)for(var f,a,l,h,y,p,v,g=0;g<c;++g)a=(f=t[g]).source,h=(l=f.target).x+l.vx-a.x-a.vx||d(u),y=l.y+l.vy-a.y-a.vy||d(u),h*=p=((p=Math.sqrt(h*h+y*y))-e[g])/p*r*n[g],y*=p,l.vx-=h*(v=i[g]),l.vy-=y*v,a.vx+=h*(v=1-v),a.vy+=y*v}function y(){if(r){var u,f,a=r.length,s=t.length,l=new Map(r.map((function(t,n){return[c(t,n,r),t]})));for(u=0,o=new Array(a);u<s;++u)(f=t[u]).index=u,"object"!==g(f.source)&&(f.source=x(l,f.source)),"object"!==g(f.target)&&(f.target=x(l,f.target)),o[f.source.index]=(o[f.source.index]||0)+1,o[f.target.index]=(o[f.target.index]||0)+1;for(u=0,i=new Array(s);u<s;++u)f=t[u],i[u]=o[f.source.index]/(o[f.source.index]+o[f.target.index]);n=new Array(s),p(),e=new Array(s),v()}}function p(){if(r)for(var e=0,o=t.length;e<o;++e)n[e]=+f(t[e],e,t)}function v(){if(r)for(var n=0,o=t.length;n<o;++n)e[n]=+a(t[n],n,t)}return null==t&&(t=[]),l.initialize=function(t,n){r=t,u=n,y()},l.links=function(n){return arguments.length?(t=n,y(),l):t},l.id=function(t){return arguments.length?(c=t,l):c},l.iterations=function(t){return arguments.length?(s=+t,l):s},l.strength=function(t){return arguments.length?(f="function"==typeof t?t:h(+t),p(),l):f},l.distance=function(t){return arguments.length?(a="function"==typeof t?t:h(+t),v(),l):a},l},w={value:function(){}};function m(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new N(r)}function N(t){this._=t}function S(t,n){return t.trim().split(/^|\s+/).map((function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))}function k(t,n){for(var e,r=0,o=t.length;r<o;++r)if((e=t[r]).name===n)return e.value}function O(t,n,e){for(var r=0,o=t.length;r<o;++r)if(t[r].name===n){t[r]=w,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}N.prototype=m.prototype={constructor:N,on:function(t,n){var e,r=this._,o=S(t+"",r),i=-1,u=o.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++i<u;)if(e=(t=o[i]).type)r[e]=O(r[e],t.name,n);else if(null==n)for(e in r)r[e]=O(r[e],t.name,null);return this}for(;++i<u;)if((e=(t=o[i]).type)&&(e=k(r[e],t.name)))return e},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new N(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,o=new Array(e),i=0;i<e;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=0,e=(r=this._[t]).length;i<e;++i)r[i].value.apply(n,o)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],o=0,i=r.length;o<i;++o)r[o].value.apply(n,e)}};var M=m;function j(t){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var E,A,P=0,z=0,D=0,T=0,L=0,F=0,U="object"===("undefined"==typeof performance?"undefined":j(performance))&&performance.now?performance:Date,C="object"===("undefined"==typeof window?"undefined":j(window))&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function q(){return L||(C(B),L=U.now()+F)}function B(){L=0}function Y(){this._call=this._time=this._next=null}function R(t,n,e){var r=new Y;return r.restart(t,n,e),r}function G(){L=(T=U.now())+F,P=z=0;try{!function(){q(),++P;for(var t,n=E;n;)(t=L-n._time)>=0&&n._call.call(null,t),n=n._next;--P}()}finally{P=0,function(){var t,n,e=E,r=1/0;for(;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:E=n);A=t,W(r)}(),L=0}}function I(){var t=U.now(),n=t-T;n>1e3&&(F-=n,T=t)}function W(t){P||(z&&(z=clearTimeout(z)),t-L>24?(t<1/0&&(z=setTimeout(G,t-U.now()-F)),D&&(D=clearInterval(D))):(D||(T=U.now(),D=setInterval(I,1e3)),P=1,C(G)))}Y.prototype=R.prototype={constructor:Y,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?q():+e)+(null==n?0:+n),this._next||A===this||(A?A._next=this:E=this,A=this),this._call=t,this._time=e,W()},stop:function(){this._call&&(this._call=null,this._time=1/0,W())}};var X=4294967296;function K(t){return t.x}function H(t){return t.y}var J=Math.PI*(3-Math.sqrt(5)),Q=function(t){var n,e,r=1,o=.001,i=1-Math.pow(o,1/300),u=0,c=.6,f=new Map,a=R(h),s=M("tick","end"),l=(e=1,function(){return(e=(1664525*e+1013904223)%X)/X});function h(){d(),s.call("tick",n),r<o&&(a.stop(),s.call("end",n))}function d(e){var o,a,s=t.length;void 0===e&&(e=1);for(var l=0;l<e;++l)for(r+=(u-r)*i,f.forEach((function(t){t(r)})),o=0;o<s;++o)null==(a=t[o]).fx?a.x+=a.vx*=c:(a.x=a.fx,a.vx=0),null==a.fy?a.y+=a.vy*=c:(a.y=a.fy,a.vy=0);return n}function y(){for(var n,e=0,r=t.length;e<r;++e){if((n=t[e]).index=e,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),isNaN(n.x)||isNaN(n.y)){var o=10*Math.sqrt(.5+e),i=e*J;n.x=o*Math.cos(i),n.y=o*Math.sin(i)}(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}}function p(n){return n.initialize&&n.initialize(t,l),n}return null==t&&(t=[]),y(),n={tick:d,restart:function(){return a.restart(h),n},stop:function(){return a.stop(),n},nodes:function(e){return arguments.length?(t=e,y(),f.forEach(p),n):t},alpha:function(t){return arguments.length?(r=+t,n):r},alphaMin:function(t){return arguments.length?(o=+t,n):o},alphaDecay:function(t){return arguments.length?(i=+t,n):+i},alphaTarget:function(t){return arguments.length?(u=+t,n):u},velocityDecay:function(t){return arguments.length?(c=1-t,n):1-c},randomSource:function(t){return arguments.length?(l=t,f.forEach(p),n):l},force:function(t,e){return arguments.length>1?(null==e?f.delete(t):f.set(t,p(e)),n):f.get(t)},find:function(n,e,r){var o,i,u,c,f,a=0,s=t.length;for(null==r?r=1/0:r*=r,a=0;a<s;++a)(u=(o=n-(c=t[a]).x)*o+(i=e-c.y)*i)<r&&(f=c,r=u);return f},on:function(t,e){return arguments.length>1?(s.on(t,e),n):s.on(t)}}},V=function(){var t,n,e,r,o,i=h(-30),u=1,c=1/0,a=.81;function s(e){var o,i=t.length,u=f(t,K,H).visitAfter(y);for(r=e,o=0;o<i;++o)n=t[o],u.visit(p)}function l(){if(t){var n,e,r=t.length;for(o=new Array(r),n=0;n<r;++n)e=t[n],o[e.index]=+i(e,n,t)}}function y(t){var n,e,r,i,u,c=0,f=0;if(t.length){for(r=i=u=0;u<4;++u)(n=t[u])&&(e=Math.abs(n.value))&&(c+=n.value,f+=e,r+=e*n.x,i+=e*n.y);t.x=r/f,t.y=i/f}else{(n=t).x=n.data.x,n.y=n.data.y;do{c+=o[n.data.index]}while(n=n.next)}t.value=c}function p(t,i,f,s){if(!t.value)return!0;var l=t.x-n.x,h=t.y-n.y,y=s-i,p=l*l+h*h;if(y*y/a<p)return p<c&&(0===l&&(p+=(l=d(e))*l),0===h&&(p+=(h=d(e))*h),p<u&&(p=Math.sqrt(u*p)),n.vx+=l*t.value*r/p,n.vy+=h*t.value*r/p),!0;if(!(t.length||p>=c)){(t.data!==n||t.next)&&(0===l&&(p+=(l=d(e))*l),0===h&&(p+=(h=d(e))*h),p<u&&(p=Math.sqrt(u*p)));do{t.data!==n&&(y=o[t.data.index]*r/p,n.vx+=l*y,n.vy+=h*y)}while(t=t.next)}}return s.initialize=function(n,r){t=n,e=r,l()},s.strength=function(t){return arguments.length?(i="function"==typeof t?t:h(+t),l(),s):i},s.distanceMin=function(t){return arguments.length?(u=t*t,s):Math.sqrt(u)},s.distanceMax=function(t){return arguments.length?(c=t*t,s):Math.sqrt(c)},s.theta=function(t){return arguments.length?(a=t*t,s):Math.sqrt(a)},s},Z=function(t,n,e){var r,o,i,u=h(.1);function c(t){for(var u=0,c=r.length;u<c;++u){var f=r[u],a=f.x-n||1e-6,s=f.y-e||1e-6,l=Math.sqrt(a*a+s*s),h=(i[u]-l)*o[u]*t/l;f.vx+=a*h,f.vy+=s*h}}function f(){if(r){var n,e=r.length;for(o=new Array(e),i=new Array(e),n=0;n<e;++n)i[n]=+t(r[n],n,r),o[n]=isNaN(i[n])?0:+u(r[n],n,r)}}return"function"!=typeof t&&(t=h(+t)),null==n&&(n=0),null==e&&(e=0),c.initialize=function(t){r=t,f()},c.strength=function(t){return arguments.length?(u="function"==typeof t?t:h(+t),f(),c):u},c.radius=function(n){return arguments.length?(t="function"==typeof n?n:h(+n),f(),c):t},c.x=function(t){return arguments.length?(n=+t,c):n},c.y=function(t){return arguments.length?(e=+t,c):e},c},$=function(t){var n,e,r,o=h(.1);function i(t){for(var o,i=0,u=n.length;i<u;++i)(o=n[i]).vx+=(r[i]-o.x)*e[i]*t}function u(){if(n){var i,u=n.length;for(e=new Array(u),r=new Array(u),i=0;i<u;++i)e[i]=isNaN(r[i]=+t(n[i],i,n))?0:+o(n[i],i,n)}}return"function"!=typeof t&&(t=h(null==t?0:+t)),i.initialize=function(t){n=t,u()},i.strength=function(t){return arguments.length?(o="function"==typeof t?t:h(+t),u(),i):o},i.x=function(n){return arguments.length?(t="function"==typeof n?n:h(+n),u(),i):t},i},tt=function(t){var n,e,r,o=h(.1);function i(t){for(var o,i=0,u=n.length;i<u;++i)(o=n[i]).vy+=(r[i]-o.y)*e[i]*t}function u(){if(n){var i,u=n.length;for(e=new Array(u),r=new Array(u),i=0;i<u;++i)e[i]=isNaN(r[i]=+t(n[i],i,n))?0:+o(n[i],i,n)}}return"function"!=typeof t&&(t=h(null==t?0:+t)),i.initialize=function(t){n=t,u()},i.strength=function(t){return arguments.length?(o="function"==typeof t?t:h(+t),u(),i):o},i.y=function(n){return arguments.length?(t="function"==typeof n?n:h(+n),u(),i):t},i}},194:function(t,n,e){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),o=this&&this.__exportStar||function(t,n){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(n,e)||r(n,t,e)};Object.defineProperty(n,"__esModule",{value:!0}),o(e(437),n)},436:function(t,n,e){"use strict";e.r(n);var r=e(194);n.default=r.ForceLayout},437:function(t,n,e){"use strict";var r,o=this&&this.__extends||(r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}),i=this&&this.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),u=this&&this.__setModuleDefault||(Object.create?function(t,n){Object.defineProperty(t,"default",{enumerable:!0,value:n})}:function(t,n){t.default=n}),c=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)"default"!==e&&Object.prototype.hasOwnProperty.call(t,e)&&i(n,t,e);return u(n,t),n},f=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0}),n.ForceLayout=void 0;var a=c(e(187)),s=f(e(438)),l=e(9),h=e(5),d=e(439),y=function(t){function n(n){var e=t.call(this)||this;return e.center=[0,0],e.nodeStrength=null,e.edgeStrength=null,e.preventOverlap=!1,e.clusterNodeStrength=null,e.clusterEdgeStrength=null,e.clusterEdgeDistance=null,e.clusterNodeSize=null,e.clusterFociStrength=null,e.linkDistance=50,e.alphaDecay=.028,e.alphaMin=.001,e.alpha=.3,e.collideStrength=1,e.workerEnabled=!1,e.tick=function(){},e.onLayoutEnd=function(){},e.ticking=void 0,n&&e.updateCfg(n),e}return o(n,t),n.prototype.getDefaultCfg=function(){return{center:[0,0],nodeStrength:null,edgeStrength:null,preventOverlap:!1,nodeSize:void 0,nodeSpacing:void 0,linkDistance:50,forceSimulation:null,alphaDecay:.028,alphaMin:.001,alpha:.3,collideStrength:1,clustering:!1,clusterNodeStrength:-1,clusterEdgeStrength:.1,clusterEdgeDistance:100,clusterFociStrength:.8,clusterNodeSize:10,tick:function(){},onLayoutEnd:function(){},workerEnabled:!1}},n.prototype.init=function(t){this.nodes=t.nodes||[];var n=t.edges||[];this.edges=n.map((function(t){var n={},e=["targetNode","sourceNode","startPoint","endPoint"];return Object.keys(t).forEach((function(r){e.indexOf(r)>-1||(n[r]=t[r])})),n})),this.ticking=!1},n.prototype.execute=function(t){var n=this,e=n.nodes,r=n.edges;if(!n.ticking){var o=n.forceSimulation,i=n.alphaMin,u=n.alphaDecay,c=n.alpha;if(o){if(t)if(n.clustering&&n.clusterForce&&(n.clusterForce.nodes(e),n.clusterForce.links(r)),o.nodes(e),r&&n.edgeForce)n.edgeForce.links(r);else if(r&&!n.edgeForce){h=a.forceLink().id((function(t){return t.id})).links(r);n.edgeStrength&&h.strength(n.edgeStrength),n.linkDistance&&h.distance(n.linkDistance),n.edgeForce=h,o.force("link",h)}n.preventOverlap&&n.overlapProcess(o),o.alpha(c).restart(),this.ticking=!0}else try{var f=a.forceManyBody();if(n.nodeStrength&&f.strength(n.nodeStrength),o=a.forceSimulation().nodes(e),n.clustering){var l=s.default();l.centerX(n.center[0]).centerY(n.center[1]).template("force").strength(n.clusterFociStrength),r&&l.links(r),e&&l.nodes(e),l.forceLinkDistance(n.clusterEdgeDistance).forceLinkStrength(n.clusterEdgeStrength).forceCharge(n.clusterNodeStrength).forceNodeSize(n.clusterNodeSize),n.clusterForce=l,o.force("group",l)}if(o.force("center",a.forceCenter(n.center[0],n.center[1])).force("charge",f).alpha(c).alphaDecay(u).alphaMin(i),n.preventOverlap&&n.overlapProcess(o),r){var h=a.forceLink().id((function(t){return t.id})).links(r);n.edgeStrength&&h.strength(n.edgeStrength),n.linkDistance&&h.distance(n.linkDistance),n.edgeForce=h,o.force("link",h)}if(n.workerEnabled&&!p()&&(n.workerEnabled=!1,console.warn("workerEnabled option is only supported when running in web worker.")),n.workerEnabled){o.stop();for(var y=function(t){var n=t.alphaMin(),e=t.alphaTarget(),r=t.alpha(),o=Math.log((n-e)/(r-e))/Math.log(1-t.alphaDecay());return Math.ceil(o)}(o),v=1;v<=y;v++)o.tick(),postMessage({nodes:e,currentTick:v,totalTicks:y,type:d.LAYOUT_MESSAGE.TICK},void 0);n.ticking=!1}else o.on("tick",(function(){n.tick()})).on("end",(function(){n.ticking=!1,n.onLayoutEnd&&n.onLayoutEnd()})),n.ticking=!0;n.forceSimulation=o,n.ticking=!0}catch(t){n.ticking=!1,console.warn(t)}}},n.prototype.overlapProcess=function(t){var n,e,r=this.nodeSize,o=this.nodeSpacing,i=this.collideStrength;if(e=l.isNumber(o)?function(){return o}:l.isFunction(o)?o:function(){return 0},r)if(l.isFunction(r))n=function(t){return r(t)+e(t)};else if(l.isArray(r)){var u=(r[0]>r[1]?r[0]:r[1])/2;n=function(t){return u+e(t)}}else if(l.isNumber(r)){var c=r/2;n=function(t){return c+e(t)}}else n=function(){return 10};else n=function(t){return t.size?l.isArray(t.size)?(t.size[0]>t.size[1]?t.size[0]:t.size[1])/2+e(t):t.size/2+e(t):10+e(t)};t.force("collisionForce",a.forceCollide(n).strength(i))},n.prototype.updateCfg=function(t){this.ticking&&(this.forceSimulation.stop(),this.ticking=!1),this.forceSimulation=null,Object.assign(this,t)},n.prototype.destroy=function(){this.ticking&&(this.forceSimulation.stop(),this.ticking=!1),this.nodes=null,this.edges=null,this.destroyed=!0},n}(h.Base);function p(){return"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope}n.ForceLayout=y},438:function(t,n,e){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),o=this&&this.__setModuleDefault||(Object.create?function(t,n){Object.defineProperty(t,"default",{enumerable:!0,value:n})}:function(t,n){t.default=n}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)"default"!==e&&Object.prototype.hasOwnProperty.call(t,e)&&r(n,t,e);return o(n,t),n};Object.defineProperty(n,"__esModule",{value:!0});var u=i(e(187));n.default=function(){function t(t){return function(){return t}}var n,e=function(t){return t.cluster},r=t(1),o=t(-1),i=t(100),c=t(.1),f=[0,0],a=[],s={},l=[],h=100,d=100,y={none:{x:0,y:0}},p=[],v="force",g=!0,_=.1;function x(t){if(!g)return x;n.tick(),w();for(var r=0,o=a.length,i=void 0,u=t*_;r<o;++r)(i=a[r]).vx+=(y[e(i)].x-i.x)*u,i.vy+=(y[e(i)].y-i.y)*u}function b(){a&&function(){if(!a||!a.length)return;if(void 0===e(a[0]))throw Error("Couldnt find the grouping attribute for the nodes. Make sure to set it up with forceInABox.groupBy('clusterAttr') before calling .links()");var t=(y=[],v=[],g={},_=[],f=function(t){var n={};return t.forEach((function(t){var r=e(t);n[r]||(n[r]={count:0,sumforceNodeSize:0})})),t.forEach((function(t){var o=e(t),i=r(t),u=n[o];u.count=u.count+1,u.sumforceNodeSize=u.sumforceNodeSize+Math.PI*(i*i)*1.3,n[o]=u})),n}(a),_=function(t){var n={},r=[];return t.forEach((function(t){var r=function(t){var n=e(s[t.source]),r=e(s[t.target]);return n<=r?n+"~"+r:r+"~"+n}(t),o=0;void 0!==n[r]&&(o=n[r]),o+=1,n[r]=o})),Object.entries(n).forEach((function(t){var n=t[0],e=t[1],o=n.split("~")[0],i=n.split("~")[1];void 0!==o&&void 0!==i&&r.push({source:o,target:i,count:e})})),r}(l),Object.keys(f).forEach((function(t,n){var e=f[t];y.push({id:t,size:e.count,r:Math.sqrt(e.sumforceNodeSize/Math.PI)}),g[t]=n})),_.forEach((function(t){var n=g[t.source],e=g[t.target];void 0!==n&&void 0!==e&&v.push({source:n,target:e,count:t.count})})),{nodes:y,links:v});var f,y,v,g,_;n=u.forceSimulation(t.nodes).force("x",u.forceX(h).strength(.1)).force("y",u.forceY(d).strength(.1)).force("collide",u.forceCollide((function(t){return t.r})).iterations(4)).force("charge",u.forceManyBody().strength(o)).force("links",u.forceLink(t.nodes.length?t.links:[]).distance(i).strength(c)),p=n.nodes(),w()}()}function w(){return y={none:{x:0,y:0}},p.forEach((function(t){y[t.id]={x:t.x-f[0],y:t.y-f[1]}})),y}function m(t){s={},t.forEach((function(t){s[t.id]=t}))}return x.initialize=function(t){a=t,b()},x.template=function(t){return arguments.length?(v=t,b(),x):v},x.groupBy=function(t){return arguments.length?"string"==typeof t?(e=function(n){return n[t]},x):(e=t,x):e},x.enableGrouping=function(t){return arguments.length?(g=t,x):g},x.strength=function(t){return arguments.length?(_=t,x):_},x.centerX=function(t){return arguments.length?(h=t,x):h},x.centerY=function(t){return arguments.length?(d=t,x):d},x.nodes=function(t){return arguments.length?(m(t||[]),a=t||[],x):a},x.links=function(t){return arguments.length?(l=t||[],b(),x):l},x.forceNodeSize=function(n){return arguments.length?(r="function"==typeof n?n:t(+n),b(),x):r},x.nodeSize=x.forceNodeSize,x.forceCharge=function(n){return arguments.length?(o="function"==typeof n?n:t(+n),b(),x):o},x.forceLinkDistance=function(n){return arguments.length?(i="function"==typeof n?n:t(+n),b(),x):i},x.forceLinkStrength=function(n){return arguments.length?(c="function"==typeof n?n:t(+n),b(),x):c},x.offset=function(t){return arguments.length?(f=t,x):f},x.getFocis=w,x}},439:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LAYOUT_MESSAGE=void 0,n.LAYOUT_MESSAGE={RUN:"LAYOUT_RUN",END:"LAYOUT_END",ERROR:"LAYOUT_ERROR",TICK:"LAYOUT_TICK",GPURUN:"GPU_LAYOUT_RUN",GPUEND:"GPU_LAYOUT_END"}},5:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Base=void 0;var r=function(){function t(){this.nodes=[],this.edges=[],this.combos=[],this.positions=[],this.destroyed=!1,this.onLayoutEnd=function(){}}return t.prototype.layout=function(t){return this.init(t),this.execute(!0)},t.prototype.init=function(t){this.nodes=t.nodes||[],this.edges=t.edges||[],this.combos=t.combos||[]},t.prototype.execute=function(t){},t.prototype.executeWithWorker=function(){},t.prototype.getDefaultCfg=function(){return{}},t.prototype.updateCfg=function(t){t&&Object.assign(this,t)},t.prototype.getType=function(){return"base"},t.prototype.destroy=function(){this.nodes=null,this.edges=null,this.combos=null,this.positions=null,this.destroyed=!0},t.prototype.onTick=function(){},t}();n.Base=r},9:function(t,n,e){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),o=this&&this.__exportStar||function(t,n){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(n,e)||r(n,t,e)};Object.defineProperty(n,"__esModule",{value:!0}),o(e(10),n),o(e(11),n),o(e(12),n),o(e(13),n),o(e(14),n),o(e(15),n)}}).default})); | ||
//# sourceMappingURL=forceLayout.js.map |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.f6=e():t.f6=e()}(this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=440)}({10:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.camelize=e.isString=void 0;e.isString=function(t){return"string"==typeof t};var r,o,i=/-(\w)/g;e.camelize=(r=function(t){return t.replace(i,(function(t,e){return e?e.toUpperCase():""}))},o=Object.create(null),function(t){return o[t]||(o[t]=r(t))})},11:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isArray=void 0,e.isArray=Array.isArray},12:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toNumber=e.isNaN=e.isNumber=void 0;e.isNumber=function(t){return"number"==typeof t};e.isNaN=function(t){return Number.isNaN(Number(t))};e.toNumber=function(t){var n=parseFloat(t);return e.isNaN(n)?t:n}},13:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.traverseTreeUp=e.scaleMatrix=e.getAdjMatrix=e.floydWarshall=e.getDegree=void 0;e.getDegree=function(t,e,n){for(var r=[],o=0;o<t;o++)r[o]=0;return n?(n.forEach((function(t){t.source&&(r[e[t.source]]+=1),t.target&&(r[e[t.target]]+=1)})),r):r};e.floydWarshall=function(t){for(var e=[],n=t.length,r=0;r<n;r+=1){e[r]=[];for(var o=0;o<n;o+=1)r===o?e[r][o]=0:0!==t[r][o]&&t[r][o]?e[r][o]=t[r][o]:e[r][o]=1/0}for(var i=0;i<n;i+=1)for(r=0;r<n;r+=1)for(o=0;o<n;o+=1)e[r][o]>e[r][i]+e[i][o]&&(e[r][o]=e[r][i]+e[i][o]);return e};e.getAdjMatrix=function(t,e){var n=t.nodes,r=t.edges,o=[],i={};if(!n)throw new Error("invalid nodes data!");return n&&n.forEach((function(t,e){i[t.id]=e;o.push([])})),r&&r.forEach((function(t){var n=t.source,r=t.target,u=i[n],c=i[r];o[u][c]=1,e||(o[c][u]=1)})),o};e.scaleMatrix=function(t,e){var n=[];return t.forEach((function(t){var r=[];t.forEach((function(t){r.push(t*e)})),n.push(r)})),n};e.traverseTreeUp=function(t,e){"function"==typeof e&&function t(e,n){if(e&&e.children)for(var r=e.children.length-1;r>=0;r--)if(!t(e.children[r],n))return;return!!n(e)}(t,e)}},14:function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=this&&this.__assign||function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.clone=e.isObject=void 0;e.isObject=function(t){return null!==t&&"object"===r(t)};e.clone=function(t){if(null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){var n=[];return t.forEach((function(t){n.push(t)})),n.map((function(t){return e.clone(t)}))}if("object"===r(t)&&t!=={}){var i=o({},t);return Object.keys(i).forEach((function(t){i[t]=e.clone(i[t])})),i}return t}},15:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isFunction=void 0;e.isFunction=function(t){return"function"==typeof t}},195:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.FruchtermanLayout=void 0;var i=n(5),u=n(9),c=function(t){function e(e){var n=t.call(this)||this;return n.maxIteration=1e3,n.gravity=10,n.speed=5,n.clustering=!1,n.clusterGravity=10,n.nodes=[],n.edges=[],n.width=300,n.height=300,n.nodeMap={},n.nodeIdxMap={},n.onLayoutEnd=function(){},n.tick=function(){},n.updateCfg(e),n}return o(e,t),e.prototype.getDefaultCfg=function(){return{maxIteration:1e3,gravity:10,speed:1,clustering:!1,clusterGravity:10}},e.prototype.execute=function(){var t=this,e=this.nodes;if(void 0!==this.timeInterval&&"undefined"!=typeof window&&window.clearInterval(this.timeInterval),e&&0!==e.length){this.width||"undefined"==typeof window||(this.width=window.innerWidth),this.height||"undefined"==typeof window||(this.height=window.innerHeight),this.center||(this.center=[this.width/2,this.height/2]);var n=this.center;if(1===e.length)return e[0].x=n[0],e[0].y=n[1],void(this.onLayoutEnd&&this.onLayoutEnd());var r={},o={};return e.forEach((function(e,n){u.isNumber(e.x)||(e.x=Math.random()*t.width),u.isNumber(e.y)||(e.y=Math.random()*t.height),r[e.id]=e,o[e.id]=n})),this.nodeMap=r,this.nodeIdxMap=o,this.run()}this.onLayoutEnd&&this.onLayoutEnd()},e.prototype.run=function(){var t=this,e=t.nodes;if(e){var n=t.edges,r=t.maxIteration,o=t.center,i=t.height*t.width,c=Math.sqrt(i)/10,s=i/(e.length+1),a=Math.sqrt(s),f=t.gravity,y=t.speed,l=t.clustering,d={};if(l)for(var p in e.forEach((function(t){if(void 0===d[t.cluster]){var e={name:t.cluster,cx:0,cy:0,count:0};d[t.cluster]=e}var n=d[t.cluster];u.isNumber(t.x)&&(n.cx+=t.x),u.isNumber(t.y)&&(n.cy+=t.y),n.count++})),d)d[p].cx/=d[p].count,d[p].cy/=d[p].count;if("undefined"!=typeof window){var h=0;return this.timeInterval=window.setInterval((function(){if(e){var i=[];if(e.forEach((function(t,e){i[e]={x:0,y:0}})),t.applyCalculate(e,n,i,a,s),l){var p=t.clusterGravity||f;for(var v in e.forEach((function(t,e){if(u.isNumber(t.x)&&u.isNumber(t.y)){var n=d[t.cluster],r=Math.sqrt((t.x-n.cx)*(t.x-n.cx)+(t.y-n.cy)*(t.y-n.cy)),o=a*p;i[e].x-=o*(t.x-n.cx)/r,i[e].y-=o*(t.y-n.cy)/r}})),d)d[v].cx=0,d[v].cy=0,d[v].count=0;for(var v in e.forEach((function(t){var e=d[t.cluster];u.isNumber(t.x)&&(e.cx+=t.x),u.isNumber(t.y)&&(e.cy+=t.y),e.count++})),d)d[v].cx/=d[v].count,d[v].cy/=d[v].count}e.forEach((function(t,e){if(u.isNumber(t.x)&&u.isNumber(t.y)){var n=.01*a*f;i[e].x-=n*(t.x-o[0]),i[e].y-=n*(t.y-o[1])}})),e.forEach((function(t,e){if(u.isNumber(t.fx)&&u.isNumber(t.fy))return t.x=t.fx,void(t.y=t.fy);if(u.isNumber(t.x)&&u.isNumber(t.y)){var n=Math.sqrt(i[e].x*i[e].x+i[e].y*i[e].y);if(n>0){var r=Math.min(c*(y/800),n);t.x+=i[e].x/n*r,t.y+=i[e].y/n*r}}})),t.tick&&t.tick(),++h>=r&&(t.onLayoutEnd&&t.onLayoutEnd(),window.clearInterval(t.timeInterval))}}),0),{nodes:e,edges:n}}}},e.prototype.applyCalculate=function(t,e,n,r,o){this.calRepulsive(t,n,o),e&&this.calAttractive(e,n,r)},e.prototype.calRepulsive=function(t,e,n){t.forEach((function(r,o){e[o]={x:0,y:0},t.forEach((function(t,i){if(o!==i&&u.isNumber(r.x)&&u.isNumber(t.x)&&u.isNumber(r.y)&&u.isNumber(t.y)){var c=r.x-t.x,s=r.y-t.y,a=c*c+s*s;if(0===a){a=1;var f=o>i?1:-1;c=.01*f,s=.01*f}var y=n/a;e[o].x+=c*y,e[o].y+=s*y}}))}))},e.prototype.calAttractive=function(t,e,n){var r=this;t.forEach((function(t){if(t.source&&t.target){var o=r.nodeIdxMap[t.source],i=r.nodeIdxMap[t.target];if(o!==i){var c=r.nodeMap[t.source],s=r.nodeMap[t.target];if(u.isNumber(s.x)&&u.isNumber(c.x)&&u.isNumber(s.y)&&u.isNumber(c.y)){var a=s.x-c.x,f=s.y-c.y,y=Math.sqrt(a*a+f*f),l=y*y/n;e[i].x-=a/y*l,e[i].y-=f/y*l,e[o].x+=a/y*l,e[o].y+=f/y*l}}}}))},e.prototype.stop=function(){this.timeInterval&&"undefined"!=typeof window&&window.clearInterval(this.timeInterval)},e.prototype.destroy=function(){this.stop(),this.tick=null,this.nodes=null,this.edges=null,this.destroyed=!0},e.prototype.getType=function(){return"fruchterman"},e}(i.Base);e.FruchtermanLayout=c},440:function(t,e,n){"use strict";n.r(e);var r=n(195);e.default=r.FruchtermanLayout},5:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Base=void 0;var r=function(){function t(){this.nodes=[],this.edges=[],this.combos=[],this.positions=[],this.destroyed=!1,this.onLayoutEnd=function(){}}return t.prototype.layout=function(t){return this.init(t),this.execute(!0)},t.prototype.init=function(t){this.nodes=t.nodes||[],this.edges=t.edges||[],this.combos=t.combos||[]},t.prototype.execute=function(t){},t.prototype.executeWithWorker=function(){},t.prototype.getDefaultCfg=function(){return{}},t.prototype.updateCfg=function(t){t&&Object.assign(this,t)},t.prototype.getType=function(){return"base"},t.prototype.destroy=function(){this.nodes=null,this.edges=null,this.combos=null,this.positions=null,this.destroyed=!0},t}();e.Base=r},9:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(10),e),o(n(11),e),o(n(12),e),o(n(13),e),o(n(14),e),o(n(15),e)}}).default})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.f6=e():t.f6=e()}(this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=440)}({10:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.camelize=e.isString=void 0;e.isString=function(t){return"string"==typeof t};var n,o,i=/-(\w)/g;e.camelize=(n=function(t){return t.replace(i,(function(t,e){return e?e.toUpperCase():""}))},o=Object.create(null),function(t){return o[t]||(o[t]=n(t))})},11:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isArray=void 0,e.isArray=Array.isArray},12:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toNumber=e.isNaN=e.isNumber=void 0;e.isNumber=function(t){return"number"==typeof t};e.isNaN=function(t){return Number.isNaN(Number(t))};e.toNumber=function(t){var r=parseFloat(t);return e.isNaN(r)?t:r}},13:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.traverseTreeUp=e.scaleMatrix=e.getAdjMatrix=e.floydWarshall=e.getDegree=void 0;e.getDegree=function(t,e,r){for(var n=[],o=0;o<t;o++)n[o]=0;return r?(r.forEach((function(t){t.source&&(n[e[t.source]]+=1),t.target&&(n[e[t.target]]+=1)})),n):n};e.floydWarshall=function(t){for(var e=[],r=t.length,n=0;n<r;n+=1){e[n]=[];for(var o=0;o<r;o+=1)n===o?e[n][o]=0:0!==t[n][o]&&t[n][o]?e[n][o]=t[n][o]:e[n][o]=1/0}for(var i=0;i<r;i+=1)for(n=0;n<r;n+=1)for(o=0;o<r;o+=1)e[n][o]>e[n][i]+e[i][o]&&(e[n][o]=e[n][i]+e[i][o]);return e};e.getAdjMatrix=function(t,e){var r=t.nodes,n=t.edges,o=[],i={};if(!r)throw new Error("invalid nodes data!");return r&&r.forEach((function(t,e){i[t.id]=e;o.push([])})),n&&n.forEach((function(t){var r=t.source,n=t.target,u=i[r],c=i[n];o[u][c]=1,e||(o[c][u]=1)})),o};e.scaleMatrix=function(t,e){var r=[];return t.forEach((function(t){var n=[];t.forEach((function(t){n.push(t*e)})),r.push(n)})),r};var n=function(t,e){if(t&&t.children)for(var r=t.children.length-1;r>=0;r--)if(!n(t.children[r],e))return;return!!e(t)};e.traverseTreeUp=function(t,e){"function"==typeof e&&n(t,e)}},14:function(t,e,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.clone=e.isObject=void 0;e.isObject=function(t){return null!==t&&"object"==typeof t};e.clone=function(t){if(null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){var r=[];return t.forEach((function(t){r.push(t)})),r.map((function(t){return e.clone(t)}))}if("object"==typeof t&&t!=={}){var o=n({},t);return Object.keys(o).forEach((function(t){o[t]=e.clone(o[t])})),o}return t}},15:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isFunction=void 0;e.isFunction=function(t){return"function"==typeof t}},195:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.FruchtermanLayout=void 0;var i=r(5),u=r(9);var c=0,s=function(t){function e(e){var r=t.call(this)||this;return r.maxIteration=1e3,r.gravity=10,r.speed=5,r.clustering=!1,r.clusterGravity=10,r.nodes=[],r.edges=[],r.width=300,r.height=300,r.nodeMap={},r.nodeIdxMap={},r.onLayoutEnd=function(){},r.tick=function(){},r.updateCfg(e),r}return o(e,t),e.prototype.getDefaultCfg=function(){return{maxIteration:1e3,gravity:10,speed:5,clustering:!1,clusterGravity:10}},e.prototype.execute=function(){var t=this,e=this.nodes,r=this.onLayoutEnd;if(e&&0!==e.length){if(this.width||"undefined"==typeof window||(this.width=window.innerWidth),this.height||"undefined"==typeof window||(this.height=window.innerHeight),this.center||(this.center=[this.width/2,this.height/2]),1===e.length)return e[0].x=this.center[0],e[0].y=this.center[1],void(r&&r());var n={},o={};return e.forEach((function(e,r){u.isNumber(e.x)||(e.x=Math.random()*t.width),u.isNumber(e.y)||(e.y=Math.random()*t.height),n[e.id]=e,o[e.id]=r})),this.nodeMap=n,this.nodeIdxMap=o,this.run()}r&&r()},e.prototype.run=function(){var t=this.nodes,e=this.clustering,r=this.edges;if(t){var n={};if(e)for(var o in t.forEach((function(t){if(void 0===n[t.cluster]){var e={name:t.cluster,cx:0,cy:0,count:0};n[t.cluster]=e}var r=n[t.cluster];u.isNumber(t.x)&&(r.cx+=t.x),u.isNumber(t.y)&&(r.cy+=t.y),r.count++})),n)n[o].cx/=n[o].count,n[o].cy/=n[o].count;return{nodes:t,edges:r}}},e.prototype.onTick=function(){var t=this,e=t.nodes,r=t.edges,n=t.maxIteration,o=t.center,i=t.height,s=t.width,a=t.gravity,f=t.speed,y=t.clustering,d=t.clusterGravity;if(e){var l=i*s,p=Math.sqrt(l)/10,h=l/(e.length+1),v=Math.sqrt(h),b={},x=[];if(e.forEach((function(t,e){x[e]={x:0,y:0}})),this.applyCalculate(e,r,x,v,h),y){for(var g in e.forEach((function(t,e){if(u.isNumber(t.x)&&u.isNumber(t.y)){var r=b[t.cluster],n=Math.sqrt((t.x-r.cx)*(t.x-r.cx)+(t.y-r.cy)*(t.y-r.cy)),o=v*(d||a);x[e].x-=o*(t.x-r.cx)/n,x[e].y-=o*(t.y-r.cy)/n}})),b)b[g].cx=0,b[g].cy=0,b[g].count=0;for(var g in e.forEach((function(t){var e=b[t.cluster];u.isNumber(t.x)&&(e.cx+=t.x),u.isNumber(t.y)&&(e.cy+=t.y),e.count++})),b)b[g].cx/=b[g].count,b[g].cy/=b[g].count}var m=.01*v*a;e.forEach((function(t,e){if(u.isNumber(t.x)&&u.isNumber(t.y)){if(x[e].x-=m*(t.x-o[0]),x[e].y-=m*(t.y-o[1]),u.isNumber(t.fx)&&u.isNumber(t.fy))return t.x=t.fx,void(t.y=t.fy);if(u.isNumber(t.x)&&u.isNumber(t.y)){var r=Math.sqrt(x[e].x*x[e].x+x[e].y*x[e].y);if(r>0){var n=p*(f/80);t.x+=x[e].x/r*n,t.y+=x[e].y/r*n}}}})),this.tick&&this.tick(),++c>=n&&this.onLayoutEnd&&this.onLayoutEnd()}},e.prototype.applyCalculate=function(t,e,r,n,o){this.calRepulsive(t,r,o),e&&this.calAttractive(e,r,n)},e.prototype.calRepulsive=function(t,e,r){t.forEach((function(n,o){e[o]={x:0,y:0},t.forEach((function(t,i){if(o!==i&&u.isNumber(n.x)&&u.isNumber(t.x)&&u.isNumber(n.y)&&u.isNumber(t.y)){var c=n.x-t.x,s=n.y-t.y,a=c*c+s*s;if(0===a){a=1;var f=o>i?1:-1;c=.01*f,s=.01*f}var y=r/a;e[o].x+=c*y,e[o].y+=s*y}}))}))},e.prototype.calAttractive=function(t,e,r){var n=this;t.forEach((function(t){if(t.source&&t.target){var o=n.nodeIdxMap[t.source],i=n.nodeIdxMap[t.target];if(o!==i){var c=n.nodeMap[t.source],s=n.nodeMap[t.target];if(u.isNumber(s.x)&&u.isNumber(c.x)&&u.isNumber(s.y)&&u.isNumber(c.y)){var a=s.x-c.x,f=s.y-c.y,y=Math.sqrt(a*a+f*f),d=y*y/r;e[i].x-=a/y*d,e[i].y-=f/y*d,e[o].x+=a/y*d,e[o].y+=f/y*d}}}}))},e.prototype.stop=function(){},e.prototype.destroy=function(){this.stop(),this.tick=null,this.nodes=null,this.edges=null,this.destroyed=!0},e.prototype.getType=function(){return"fruchterman"},e}(i.Base);e.FruchtermanLayout=s},440:function(t,e,r){"use strict";r.r(e);var n=r(195);e.default=n.FruchtermanLayout},5:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Base=void 0;var n=function(){function t(){this.nodes=[],this.edges=[],this.combos=[],this.positions=[],this.destroyed=!1,this.onLayoutEnd=function(){}}return t.prototype.layout=function(t){return this.init(t),this.execute(!0)},t.prototype.init=function(t){this.nodes=t.nodes||[],this.edges=t.edges||[],this.combos=t.combos||[]},t.prototype.execute=function(t){},t.prototype.executeWithWorker=function(){},t.prototype.getDefaultCfg=function(){return{}},t.prototype.updateCfg=function(t){t&&Object.assign(this,t)},t.prototype.getType=function(){return"base"},t.prototype.destroy=function(){this.nodes=null,this.edges=null,this.combos=null,this.positions=null,this.destroyed=!0},t.prototype.onTick=function(){},t}();e.Base=n},9:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),o(r(10),e),o(r(11),e),o(r(12),e),o(r(13),e),o(r(14),e),o(r(15),e)}}).default})); | ||
//# sourceMappingURL=fruchtermanLayout.js.map |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.f6=e():t.f6=e()}(this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=441)}({10:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.camelize=e.isString=void 0;e.isString=function(t){return"string"==typeof t};var r,o,i=/-(\w)/g;e.camelize=(r=function(t){return t.replace(i,(function(t,e){return e?e.toUpperCase():""}))},o=Object.create(null),function(t){return o[t]||(o[t]=r(t))})},11:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isArray=void 0,e.isArray=Array.isArray},12:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toNumber=e.isNaN=e.isNumber=void 0;e.isNumber=function(t){return"number"==typeof t};e.isNaN=function(t){return Number.isNaN(Number(t))};e.toNumber=function(t){var n=parseFloat(t);return e.isNaN(n)?t:n}},13:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.traverseTreeUp=e.scaleMatrix=e.getAdjMatrix=e.floydWarshall=e.getDegree=void 0;e.getDegree=function(t,e,n){for(var r=[],o=0;o<t;o++)r[o]=0;return n?(n.forEach((function(t){t.source&&(r[e[t.source]]+=1),t.target&&(r[e[t.target]]+=1)})),r):r};e.floydWarshall=function(t){for(var e=[],n=t.length,r=0;r<n;r+=1){e[r]=[];for(var o=0;o<n;o+=1)r===o?e[r][o]=0:0!==t[r][o]&&t[r][o]?e[r][o]=t[r][o]:e[r][o]=1/0}for(var i=0;i<n;i+=1)for(r=0;r<n;r+=1)for(o=0;o<n;o+=1)e[r][o]>e[r][i]+e[i][o]&&(e[r][o]=e[r][i]+e[i][o]);return e};e.getAdjMatrix=function(t,e){var n=t.nodes,r=t.edges,o=[],i={};if(!n)throw new Error("invalid nodes data!");return n&&n.forEach((function(t,e){i[t.id]=e;o.push([])})),r&&r.forEach((function(t){var n=t.source,r=t.target,u=i[n],a=i[r];o[u][a]=1,e||(o[a][u]=1)})),o};e.scaleMatrix=function(t,e){var n=[];return t.forEach((function(t){var r=[];t.forEach((function(t){r.push(t*e)})),n.push(r)})),n};e.traverseTreeUp=function(t,e){"function"==typeof e&&function t(e,n){if(e&&e.children)for(var r=e.children.length-1;r>=0;r--)if(!t(e.children[r],n))return;return!!n(e)}(t,e)}},14:function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=this&&this.__assign||function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.clone=e.isObject=void 0;e.isObject=function(t){return null!==t&&"object"===r(t)};e.clone=function(t){if(null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){var n=[];return t.forEach((function(t){n.push(t)})),n.map((function(t){return e.clone(t)}))}if("object"===r(t)&&t!=={}){var i=o({},t);return Object.keys(i).forEach((function(t){i[t]=e.clone(i[t])})),i}return t}},15:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isFunction=void 0;e.isFunction=function(t){return"function"==typeof t}},196:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.GForceLayout=void 0;var i=n(5),u=n(9),a=function(t,e){return t?u.isNumber(t)?function(e){return t}:t:function(t){return e||1}},c=function(t){function e(e){var n=t.call(this)||this;return n.maxIteration=1e3,n.edgeStrength=200,n.nodeStrength=1e3,n.coulombDisScale=.005,n.damping=.9,n.maxSpeed=1e3,n.minMovement=.5,n.interval=.02,n.factor=1,n.linkDistance=1,n.gravity=10,n.preventOverlap=!0,n.tick=function(){},n.nodes=[],n.edges=[],n.width=300,n.height=300,n.nodeMap={},n.nodeIdxMap={},n.updateCfg(e),n}return o(e,t),e.prototype.getDefaultCfg=function(){return{maxIteration:500,gravity:10,enableTick:!0}},e.prototype.execute=function(){var t=this,e=t.nodes;if(void 0!==t.timeInterval&&"undefined"!=typeof window&&window.clearInterval(t.timeInterval),e&&0!==e.length){t.width||"undefined"==typeof window||(t.width=window.innerWidth),t.height||"undefined"==typeof window||(t.height=window.innerHeight),t.center||(t.center=[t.width/2,t.height/2]);var n=t.center;if(1===e.length)return e[0].x=n[0],e[0].y=n[1],void(t.onLayoutEnd&&t.onLayoutEnd());var r={},o={};e.forEach((function(e,n){u.isNumber(e.x)||(e.x=Math.random()*t.width),u.isNumber(e.y)||(e.y=Math.random()*t.height),r[e.id]=e,o[e.id]=n})),t.nodeMap=r,t.nodeIdxMap=o,t.linkDistance=a(t.linkDistance,1),t.nodeStrength=a(t.nodeStrength,1),t.edgeStrength=a(t.edgeStrength,1);var i,c=t.nodeSize;if(t.preventOverlap){var s,f=t.nodeSpacing;s=u.isNumber(f)?function(){return f}:u.isFunction(f)?f:function(){return 0},i=c?u.isArray(c)?function(t){return(c[0]>c[1]?c[0]:c[1])+s(t)}:function(t){return c+s(t)}:function(t){return t.size?u.isArray(t.size)?(t.size[0]>t.size[1]?t.size[0]:t.size[1])+s(t):t.size+s(t):10+s(t)}}t.nodeSize=i;var d=t.edges;t.degrees=u.getDegree(e.length,t.nodeIdxMap,d),t.getMass||(t.getMass=function(e){return t.degrees[t.nodeIdxMap[e.id]]||1}),t.run()}else t.onLayoutEnd&&t.onLayoutEnd()},e.prototype.run=function(){var t=this,e=t.nodes,n=t.edges,r=t.maxIteration;if("undefined"!=typeof window){var o=0;this.timeInterval=window.setInterval((function(){var i=[],u=[];if(e){e.forEach((function(t,e){i[2*e]=0,i[2*e+1]=0,u[2*e]=0,u[2*e+1]=0})),t.calRepulsive(i,e),n&&t.calAttractive(i,n),t.calGravity(i,e);var a=Math.max(.02,t.interval-.002*o);t.updateVelocity(i,u,a,e);var c=[];e.forEach((function(t){c.push({x:t.x,y:t.y})})),t.updatePosition(u,a,e),t.tick&&t.tick();var s=0;e.forEach((function(t,e){var n=t.x-c[e].x,r=t.y-c[e].y;s+=Math.sqrt(n*n+r*r)})),(s/=e.length)<t.minMovement&&(window.clearInterval(t.timeInterval),t.onLayoutEnd&&t.onLayoutEnd()),++o>=r&&(t.onLayoutEnd&&t.onLayoutEnd(),window.clearInterval(t.timeInterval))}}),0)}},e.prototype.calRepulsive=function(t,e){var n=this.getMass,r=this.nodeStrength,o=this.factor,i=this.coulombDisScale,u=this.preventOverlap,a=this.nodeSize;e.forEach((function(c,s){var f=n?n(c):1;e.forEach((function(e,d){if(!(s>=d)){var l=c.x-e.x,p=c.y-e.y,y=Math.sqrt(l*l+p*p)+.01,h=(y+.1)*i,v=l/y,g=p/y,b=(r(c)+r(e))/2*o/(h*h),m=n?n(e):1;if(t[2*s]+=v*b,t[2*s+1]+=g*b,t[2*d]-=v*b,t[2*d+1]-=g*b,u&&y<(a(c)+a(e))/2){var x=(r(c)+r(e))/2/(y*y);t[2*s]+=v*x/f,t[2*s+1]+=g*x/f,t[2*d]-=v*x/m,t[2*d+1]-=g*x/m}}}))}))},e.prototype.calAttractive=function(t,e){var n=this.nodeMap,r=this.nodeIdxMap,o=this.linkDistance,i=this.edgeStrength,u=this.getMass;e.forEach((function(e,a){var c=n[e.source],s=n[e.target],f=s.x-c.x,d=s.y-c.y,l=Math.sqrt(f*f+d*d)+.01,p=f/l,y=d/l,h=((o(e)||1)-l)*i(e),v=r[e.source],g=r[e.target],b=u?u(c):1,m=u?u(s):1;t[2*v]-=p*h/b,t[2*v+1]-=y*h/b,t[2*g]+=p*h/m,t[2*g+1]+=y*h/m}))},e.prototype.calGravity=function(t,e){for(var n=this.center,r=this.gravity,o=this.degrees,i=e.length,a=0;a<i;a++){var c=e[a],s=c.x-n[0],f=c.y-n[1],d=r;if(this.getCenter){var l=this.getCenter(c,o[a]);l&&u.isNumber(l[0])&&u.isNumber(l[1])&&u.isNumber(l[2])&&(s=c.x-l[0],f=c.y-l[1],d=l[2])}d&&(t[2*a]-=d*s,t[2*a+1]-=d*f)}},e.prototype.updateVelocity=function(t,e,n,r){var o=this,i=n*o.damping;r.forEach((function(n,r){var u=t[2*r]*i||.01,a=t[2*r+1]*i||.01,c=Math.sqrt(u*u+a*a);if(c>o.maxSpeed){var s=o.maxSpeed/c;u*=s,a*=s}e[2*r]=u,e[2*r+1]=a}))},e.prototype.updatePosition=function(t,e,n){n.forEach((function(n,r){if(u.isNumber(n.fx)&&u.isNumber(n.fy))return n.x=n.fx,void(n.y=n.fy);var o=t[2*r]*e,i=t[2*r+1]*e;n.x+=o,n.y+=i}))},e.prototype.stop=function(){this.timeInterval&&"undefined"!=typeof window&&window.clearInterval(this.timeInterval)},e.prototype.destroy=function(){this.stop(),this.tick=null,this.nodes=null,this.edges=null,this.destroyed=!0},e.prototype.getType=function(){return"gForce"},e}(i.Base);e.GForceLayout=c},441:function(t,e,n){"use strict";n.r(e);var r=n(196);e.default=r.GForceLayout},5:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Base=void 0;var r=function(){function t(){this.nodes=[],this.edges=[],this.combos=[],this.positions=[],this.destroyed=!1,this.onLayoutEnd=function(){}}return t.prototype.layout=function(t){return this.init(t),this.execute(!0)},t.prototype.init=function(t){this.nodes=t.nodes||[],this.edges=t.edges||[],this.combos=t.combos||[]},t.prototype.execute=function(t){},t.prototype.executeWithWorker=function(){},t.prototype.getDefaultCfg=function(){return{}},t.prototype.updateCfg=function(t){t&&Object.assign(this,t)},t.prototype.getType=function(){return"base"},t.prototype.destroy=function(){this.nodes=null,this.edges=null,this.combos=null,this.positions=null,this.destroyed=!0},t}();e.Base=r},9:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(10),e),o(n(11),e),o(n(12),e),o(n(13),e),o(n(14),e),o(n(15),e)}}).default})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.f6=e():t.f6=e()}(this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=441)}({10:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.camelize=e.isString=void 0;e.isString=function(t){return"string"==typeof t};var r,o,i=/-(\w)/g;e.camelize=(r=function(t){return t.replace(i,(function(t,e){return e?e.toUpperCase():""}))},o=Object.create(null),function(t){return o[t]||(o[t]=r(t))})},11:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isArray=void 0,e.isArray=Array.isArray},12:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toNumber=e.isNaN=e.isNumber=void 0;e.isNumber=function(t){return"number"==typeof t};e.isNaN=function(t){return Number.isNaN(Number(t))};e.toNumber=function(t){var n=parseFloat(t);return e.isNaN(n)?t:n}},13:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.traverseTreeUp=e.scaleMatrix=e.getAdjMatrix=e.floydWarshall=e.getDegree=void 0;e.getDegree=function(t,e,n){for(var r=[],o=0;o<t;o++)r[o]=0;return n?(n.forEach((function(t){t.source&&(r[e[t.source]]+=1),t.target&&(r[e[t.target]]+=1)})),r):r};e.floydWarshall=function(t){for(var e=[],n=t.length,r=0;r<n;r+=1){e[r]=[];for(var o=0;o<n;o+=1)r===o?e[r][o]=0:0!==t[r][o]&&t[r][o]?e[r][o]=t[r][o]:e[r][o]=1/0}for(var i=0;i<n;i+=1)for(r=0;r<n;r+=1)for(o=0;o<n;o+=1)e[r][o]>e[r][i]+e[i][o]&&(e[r][o]=e[r][i]+e[i][o]);return e};e.getAdjMatrix=function(t,e){var n=t.nodes,r=t.edges,o=[],i={};if(!n)throw new Error("invalid nodes data!");return n&&n.forEach((function(t,e){i[t.id]=e;o.push([])})),r&&r.forEach((function(t){var n=t.source,r=t.target,u=i[n],a=i[r];o[u][a]=1,e||(o[a][u]=1)})),o};e.scaleMatrix=function(t,e){var n=[];return t.forEach((function(t){var r=[];t.forEach((function(t){r.push(t*e)})),n.push(r)})),n};var r=function(t,e){if(t&&t.children)for(var n=t.children.length-1;n>=0;n--)if(!r(t.children[n],e))return;return!!e(t)};e.traverseTreeUp=function(t,e){"function"==typeof e&&r(t,e)}},14:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.clone=e.isObject=void 0;e.isObject=function(t){return null!==t&&"object"==typeof t};e.clone=function(t){if(null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){var n=[];return t.forEach((function(t){n.push(t)})),n.map((function(t){return e.clone(t)}))}if("object"==typeof t&&t!=={}){var o=r({},t);return Object.keys(o).forEach((function(t){o[t]=e.clone(o[t])})),o}return t}},15:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isFunction=void 0;e.isFunction=function(t){return"function"==typeof t}},196:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.GForceLayout=void 0;var i=n(5),u=n(9),a=function(t,e){return t?u.isNumber(t)?function(e){return t}:t:function(t){return e||1}},c=function(t){function e(e){var n=t.call(this)||this;return n.maxIteration=1e3,n.edgeStrength=200,n.nodeStrength=1e3,n.coulombDisScale=.005,n.damping=.9,n.maxSpeed=1e3,n.minMovement=.5,n.interval=.02,n.factor=1,n.linkDistance=1,n.gravity=10,n.preventOverlap=!0,n.tick=function(){},n.nodes=[],n.edges=[],n.width=300,n.height=300,n.nodeMap={},n.nodeIdxMap={},n.updateCfg(e),n}return o(e,t),e.prototype.getDefaultCfg=function(){return{maxIteration:500,gravity:10,enableTick:!0}},e.prototype.execute=function(){var t=this,e=t.nodes;if(void 0!==t.timeInterval&&"undefined"!=typeof window&&window.clearInterval(t.timeInterval),e&&0!==e.length){t.width||"undefined"==typeof window||(t.width=window.innerWidth),t.height||"undefined"==typeof window||(t.height=window.innerHeight),t.center||(t.center=[t.width/2,t.height/2]);var n=t.center;if(1===e.length)return e[0].x=n[0],e[0].y=n[1],void(t.onLayoutEnd&&t.onLayoutEnd());var r={},o={};e.forEach((function(e,n){u.isNumber(e.x)||(e.x=Math.random()*t.width),u.isNumber(e.y)||(e.y=Math.random()*t.height),r[e.id]=e,o[e.id]=n})),t.nodeMap=r,t.nodeIdxMap=o,t.linkDistance=a(t.linkDistance,1),t.nodeStrength=a(t.nodeStrength,1),t.edgeStrength=a(t.edgeStrength,1);var i,c=t.nodeSize;if(t.preventOverlap){var s,f=t.nodeSpacing;s=u.isNumber(f)?function(){return f}:u.isFunction(f)?f:function(){return 0},i=c?u.isArray(c)?function(t){return(c[0]>c[1]?c[0]:c[1])+s(t)}:function(t){return c+s(t)}:function(t){return t.size?u.isArray(t.size)?(t.size[0]>t.size[1]?t.size[0]:t.size[1])+s(t):t.size+s(t):10+s(t)}}t.nodeSize=i;var d=t.edges;t.degrees=u.getDegree(e.length,t.nodeIdxMap,d),t.getMass||(t.getMass=function(e){return t.degrees[t.nodeIdxMap[e.id]]||1}),t.run()}else t.onLayoutEnd&&t.onLayoutEnd()},e.prototype.run=function(){var t=this,e=t.nodes,n=t.edges,r=t.maxIteration;if("undefined"!=typeof window){var o=0;this.timeInterval=window.setInterval((function(){var i=[],u=[];if(e){e.forEach((function(t,e){i[2*e]=0,i[2*e+1]=0,u[2*e]=0,u[2*e+1]=0})),t.calRepulsive(i,e),n&&t.calAttractive(i,n),t.calGravity(i,e);var a=Math.max(.02,t.interval-.002*o);t.updateVelocity(i,u,a,e);var c=[];e.forEach((function(t){c.push({x:t.x,y:t.y})})),t.updatePosition(u,a,e),t.tick&&t.tick();var s=0;e.forEach((function(t,e){var n=t.x-c[e].x,r=t.y-c[e].y;s+=Math.sqrt(n*n+r*r)})),(s/=e.length)<t.minMovement&&(window.clearInterval(t.timeInterval),t.onLayoutEnd&&t.onLayoutEnd()),++o>=r&&(t.onLayoutEnd&&t.onLayoutEnd(),window.clearInterval(t.timeInterval))}}),0)}},e.prototype.calRepulsive=function(t,e){var n=this.getMass,r=this.nodeStrength,o=this.factor,i=this.coulombDisScale,u=this.preventOverlap,a=this.nodeSize;e.forEach((function(c,s){var f=n?n(c):1;e.forEach((function(e,d){if(!(s>=d)){var l=c.x-e.x,p=c.y-e.y,h=Math.sqrt(l*l+p*p)+.01,y=(h+.1)*i,v=l/h,g=p/h,b=(r(c)+r(e))/2*o/(y*y),m=n?n(e):1;if(t[2*s]+=v*b,t[2*s+1]+=g*b,t[2*d]-=v*b,t[2*d+1]-=g*b,u&&h<(a(c)+a(e))/2){var x=(r(c)+r(e))/2/(h*h);t[2*s]+=v*x/f,t[2*s+1]+=g*x/f,t[2*d]-=v*x/m,t[2*d+1]-=g*x/m}}}))}))},e.prototype.calAttractive=function(t,e){var n=this.nodeMap,r=this.nodeIdxMap,o=this.linkDistance,i=this.edgeStrength,u=this.getMass;e.forEach((function(e,a){var c=n[e.source],s=n[e.target],f=s.x-c.x,d=s.y-c.y,l=Math.sqrt(f*f+d*d)+.01,p=f/l,h=d/l,y=((o(e)||1)-l)*i(e),v=r[e.source],g=r[e.target],b=u?u(c):1,m=u?u(s):1;t[2*v]-=p*y/b,t[2*v+1]-=h*y/b,t[2*g]+=p*y/m,t[2*g+1]+=h*y/m}))},e.prototype.calGravity=function(t,e){for(var n=this.center,r=this.gravity,o=this.degrees,i=e.length,a=0;a<i;a++){var c=e[a],s=c.x-n[0],f=c.y-n[1],d=r;if(this.getCenter){var l=this.getCenter(c,o[a]);l&&u.isNumber(l[0])&&u.isNumber(l[1])&&u.isNumber(l[2])&&(s=c.x-l[0],f=c.y-l[1],d=l[2])}d&&(t[2*a]-=d*s,t[2*a+1]-=d*f)}},e.prototype.updateVelocity=function(t,e,n,r){var o=this,i=n*o.damping;r.forEach((function(n,r){var u=t[2*r]*i||.01,a=t[2*r+1]*i||.01,c=Math.sqrt(u*u+a*a);if(c>o.maxSpeed){var s=o.maxSpeed/c;u*=s,a*=s}e[2*r]=u,e[2*r+1]=a}))},e.prototype.updatePosition=function(t,e,n){n.forEach((function(n,r){if(u.isNumber(n.fx)&&u.isNumber(n.fy))return n.x=n.fx,void(n.y=n.fy);var o=t[2*r]*e,i=t[2*r+1]*e;n.x+=o,n.y+=i}))},e.prototype.stop=function(){this.timeInterval&&"undefined"!=typeof window&&window.clearInterval(this.timeInterval)},e.prototype.destroy=function(){this.stop(),this.tick=null,this.nodes=null,this.edges=null,this.destroyed=!0},e.prototype.getType=function(){return"gForce"},e}(i.Base);e.GForceLayout=c},441:function(t,e,n){"use strict";n.r(e);var r=n(196);e.default=r.GForceLayout},5:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Base=void 0;var r=function(){function t(){this.nodes=[],this.edges=[],this.combos=[],this.positions=[],this.destroyed=!1,this.onLayoutEnd=function(){}}return t.prototype.layout=function(t){return this.init(t),this.execute(!0)},t.prototype.init=function(t){this.nodes=t.nodes||[],this.edges=t.edges||[],this.combos=t.combos||[]},t.prototype.execute=function(t){},t.prototype.executeWithWorker=function(){},t.prototype.getDefaultCfg=function(){return{}},t.prototype.updateCfg=function(t){t&&Object.assign(this,t)},t.prototype.getType=function(){return"base"},t.prototype.destroy=function(){this.nodes=null,this.edges=null,this.combos=null,this.positions=null,this.destroyed=!0},t.prototype.onTick=function(){},t}();e.Base=r},9:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(10),e),o(n(11),e),o(n(12),e),o(n(13),e),o(n(14),e),o(n(15),e)}}).default})); | ||
//# sourceMappingURL=gForceLayout.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.f6=t():e.f6=t()}(this,(function(){return function(e){var t={};function o(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=e,o.c=t,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=442)}({10:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelize=t.isString=void 0;t.isString=function(e){return"string"==typeof e};var r,n,i=/-(\w)/g;t.camelize=(r=function(e){return e.replace(i,(function(e,t){return t?t.toUpperCase():""}))},n=Object.create(null),function(e){return n[e]||(n[e]=r(e))})},11:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArray=void 0,t.isArray=Array.isArray},12:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toNumber=t.isNaN=t.isNumber=void 0;t.isNumber=function(e){return"number"==typeof e};t.isNaN=function(e){return Number.isNaN(Number(e))};t.toNumber=function(e){var o=parseFloat(e);return t.isNaN(o)?e:o}},13:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.traverseTreeUp=t.scaleMatrix=t.getAdjMatrix=t.floydWarshall=t.getDegree=void 0;t.getDegree=function(e,t,o){for(var r=[],n=0;n<e;n++)r[n]=0;return o?(o.forEach((function(e){e.source&&(r[t[e.source]]+=1),e.target&&(r[t[e.target]]+=1)})),r):r};t.floydWarshall=function(e){for(var t=[],o=e.length,r=0;r<o;r+=1){t[r]=[];for(var n=0;n<o;n+=1)r===n?t[r][n]=0:0!==e[r][n]&&e[r][n]?t[r][n]=e[r][n]:t[r][n]=1/0}for(var i=0;i<o;i+=1)for(r=0;r<o;r+=1)for(n=0;n<o;n+=1)t[r][n]>t[r][i]+t[i][n]&&(t[r][n]=t[r][i]+t[i][n]);return t};t.getAdjMatrix=function(e,t){var o=e.nodes,r=e.edges,n=[],i={};if(!o)throw new Error("invalid nodes data!");return o&&o.forEach((function(e,t){i[e.id]=t;n.push([])})),r&&r.forEach((function(e){var o=e.source,r=e.target,s=i[o],u=i[r];n[s][u]=1,t||(n[u][s]=1)})),n};t.scaleMatrix=function(e,t){var o=[];return e.forEach((function(e){var r=[];e.forEach((function(e){r.push(e*t)})),o.push(r)})),o};t.traverseTreeUp=function(e,t){"function"==typeof t&&function e(t,o){if(t&&t.children)for(var r=t.children.length-1;r>=0;r--)if(!e(t.children[r],o))return;return!!o(t)}(e,t)}},14:function(e,t,o){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.clone=t.isObject=void 0;t.isObject=function(e){return null!==e&&"object"===r(e)};t.clone=function(e){if(null===e)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array){var o=[];return e.forEach((function(e){o.push(e)})),o.map((function(e){return t.clone(e)}))}if("object"===r(e)&&e!=={}){var i=n({},e);return Object.keys(i).forEach((function(e){i[e]=t.clone(i[e])})),i}return e}},15:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=void 0;t.isFunction=function(e){return"function"==typeof e}},197:function(e,t,o){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0}),t.GridLayout=void 0;var i=o(9),s=function(e){function t(t){var o=e.call(this)||this;return o.begin=[0,0],o.preventOverlap=!0,o.preventOverlapPadding=10,o.condense=!1,o.sortBy="degree",o.nodeSize=30,o.nodes=[],o.edges=[],o.width=300,o.height=300,o.row=0,o.col=0,o.cellWidth=0,o.cellHeight=0,o.cellUsed={},o.id2manPos={},o.onLayoutEnd=function(){},o.updateCfg(t),o}return n(t,e),t.prototype.getDefaultCfg=function(){return{begin:[0,0],preventOverlap:!0,preventOverlapPadding:10,condense:!1,rows:void 0,cols:void 0,position:void 0,sortBy:"degree",nodeSize:30}},t.prototype.execute=function(){var e=this,t=e.nodes,o=t.length,r=e.begin;if(0!==o){if(1===o)return t[0].x=r[0],t[0].y=r[1],void(e.onLayoutEnd&&e.onLayoutEnd());var n=e.edges,s=[];t.forEach((function(e){s.push(e)}));var u={};if(s.forEach((function(e,t){u[e.id]=t})),("degree"===e.sortBy||!i.isString(e.sortBy)||void 0===s[0][e.sortBy])&&(e.sortBy="degree",i.isNaN(t[0].degree))){var c=i.getDegree(s.length,u,n);s.forEach((function(e,t){e.degree=c[t]}))}s.sort((function(t,o){return o[e.sortBy]-t[e.sortBy]})),e.width||"undefined"==typeof window||(e.width=window.innerWidth),e.height||"undefined"==typeof window||(e.height=window.innerHeight);var l=e.rows,a=null!=e.cols?e.cols:e.columns;if(e.cells=o,null!=l&&null!=a?(e.rows=l,e.cols=a):null!=l&&null==a?(e.rows=l,e.cols=Math.ceil(e.cells/e.rows)):null==l&&null!=a?(e.cols=a,e.rows=Math.ceil(e.cells/e.cols)):(e.splits=Math.sqrt(e.cells*e.height/e.width),e.rows=Math.round(e.splits),e.cols=Math.round(e.width/e.height*e.splits)),e.cols*e.rows>e.cells)((d=e.small())-1)*(f=e.large())>=e.cells?e.small(d-1):(f-1)*d>=e.cells&&e.large(f-1);else for(;e.cols*e.rows<e.cells;){var f,d=e.small();((f=e.large())+1)*d>=e.cells?e.large(f+1):e.small(d+1)}e.cellWidth=e.width/e.cols,e.cellHeight=e.height/e.rows,e.condense&&(e.cellWidth=0,e.cellHeight=0),e.preventOverlap&&s.forEach((function(t){var o,r;t.x&&t.y||(t.x=0,t.y=0),i.isArray(t.size)?(o=t.size[0],r=t.size[1]):i.isNumber(t.size)&&(o=t.size,r=t.size),void 0!==o&&void 0!==r||(i.isArray(e.nodeSize)?(o=e.nodeSize[0],r=e.nodeSize[1]):i.isNumber(e.nodeSize)?(o=e.nodeSize,r=e.nodeSize):(o=30,r=30));var n=e.preventOverlapPadding,s=o+n,u=r+n;e.cellWidth=Math.max(e.cellWidth,s),e.cellHeight=Math.max(e.cellHeight,u)})),e.cellUsed={},e.row=0,e.col=0,e.id2manPos={};for(var p=0;p<s.length;p++){var h=s[p],y=void 0;if(e.position&&(y=e.position(h)),y&&(void 0!==y.row||void 0!==y.col)){var v={row:y.row,col:y.col};if(void 0===v.col)for(v.col=0;e.used(v.row,v.col);)v.col++;else if(void 0===v.row)for(v.row=0;e.used(v.row,v.col);)v.row++;e.id2manPos[h.id]=v,e.use(v.row,v.col)}e.getPos(h)}return e.onLayoutEnd&&e.onLayoutEnd(),{edges:n,nodes:s}}e.onLayoutEnd&&e.onLayoutEnd()},t.prototype.small=function(e){var t,o=this.rows||5,r=this.cols||5;null==e?t=Math.min(o,r):Math.min(o,r)===this.rows?this.rows=e:this.cols=e;return t},t.prototype.large=function(e){var t,o=this.rows||5,r=this.cols||5;null==e?t=Math.max(o,r):Math.max(o,r)===this.rows?this.rows=e:this.cols=e;return t},t.prototype.used=function(e,t){return this.cellUsed["c-"+e+"-"+t]||!1},t.prototype.use=function(e,t){this.cellUsed["c-"+e+"-"+t]=!0},t.prototype.moveToNextCell=function(){var e=this.cols||5;this.col++,this.col>=e&&(this.col=0,this.row++)},t.prototype.getPos=function(e){var t,o,r=this.begin,n=this.cellWidth,i=this.cellHeight,s=this.id2manPos[e.id];if(s)t=s.col*n+n/2+r[0],o=s.row*i+i/2+r[1];else{for(;this.used(this.row,this.col);)this.moveToNextCell();t=this.col*n+n/2+r[0],o=this.row*i+i/2+r[1],this.use(this.row,this.col),this.moveToNextCell()}e.x=t,e.y=o},t.prototype.getType=function(){return"grid"},t}(o(5).Base);t.GridLayout=s},442:function(e,t,o){"use strict";o.r(t);var r=o(197);t.default=r.GridLayout},5:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Base=void 0;var r=function(){function e(){this.nodes=[],this.edges=[],this.combos=[],this.positions=[],this.destroyed=!1,this.onLayoutEnd=function(){}}return e.prototype.layout=function(e){return this.init(e),this.execute(!0)},e.prototype.init=function(e){this.nodes=e.nodes||[],this.edges=e.edges||[],this.combos=e.combos||[]},e.prototype.execute=function(e){},e.prototype.executeWithWorker=function(){},e.prototype.getDefaultCfg=function(){return{}},e.prototype.updateCfg=function(e){e&&Object.assign(this,e)},e.prototype.getType=function(){return"base"},e.prototype.destroy=function(){this.nodes=null,this.edges=null,this.combos=null,this.positions=null,this.destroyed=!0},e}();t.Base=r},9:function(e,t,o){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,o,r){void 0===r&&(r=o),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[o]}})}:function(e,t,o,r){void 0===r&&(r=o),e[r]=t[o]}),n=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||r(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),n(o(10),t),n(o(11),t),n(o(12),t),n(o(13),t),n(o(14),t),n(o(15),t)}}).default})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.f6=t():e.f6=t()}(this,(function(){return function(e){var t={};function o(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=e,o.c=t,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=442)}({10:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelize=t.isString=void 0;t.isString=function(e){return"string"==typeof e};var r,n,i=/-(\w)/g;t.camelize=(r=function(e){return e.replace(i,(function(e,t){return t?t.toUpperCase():""}))},n=Object.create(null),function(e){return n[e]||(n[e]=r(e))})},11:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArray=void 0,t.isArray=Array.isArray},12:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toNumber=t.isNaN=t.isNumber=void 0;t.isNumber=function(e){return"number"==typeof e};t.isNaN=function(e){return Number.isNaN(Number(e))};t.toNumber=function(e){var o=parseFloat(e);return t.isNaN(o)?e:o}},13:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.traverseTreeUp=t.scaleMatrix=t.getAdjMatrix=t.floydWarshall=t.getDegree=void 0;t.getDegree=function(e,t,o){for(var r=[],n=0;n<e;n++)r[n]=0;return o?(o.forEach((function(e){e.source&&(r[t[e.source]]+=1),e.target&&(r[t[e.target]]+=1)})),r):r};t.floydWarshall=function(e){for(var t=[],o=e.length,r=0;r<o;r+=1){t[r]=[];for(var n=0;n<o;n+=1)r===n?t[r][n]=0:0!==e[r][n]&&e[r][n]?t[r][n]=e[r][n]:t[r][n]=1/0}for(var i=0;i<o;i+=1)for(r=0;r<o;r+=1)for(n=0;n<o;n+=1)t[r][n]>t[r][i]+t[i][n]&&(t[r][n]=t[r][i]+t[i][n]);return t};t.getAdjMatrix=function(e,t){var o=e.nodes,r=e.edges,n=[],i={};if(!o)throw new Error("invalid nodes data!");return o&&o.forEach((function(e,t){i[e.id]=t;n.push([])})),r&&r.forEach((function(e){var o=e.source,r=e.target,s=i[o],u=i[r];n[s][u]=1,t||(n[u][s]=1)})),n};t.scaleMatrix=function(e,t){var o=[];return e.forEach((function(e){var r=[];e.forEach((function(e){r.push(e*t)})),o.push(r)})),o};var r=function(e,t){if(e&&e.children)for(var o=e.children.length-1;o>=0;o--)if(!r(e.children[o],t))return;return!!t(e)};t.traverseTreeUp=function(e,t){"function"==typeof t&&r(e,t)}},14:function(e,t,o){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.clone=t.isObject=void 0;t.isObject=function(e){return null!==e&&"object"==typeof e};t.clone=function(e){if(null===e)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array){var o=[];return e.forEach((function(e){o.push(e)})),o.map((function(e){return t.clone(e)}))}if("object"==typeof e&&e!=={}){var n=r({},e);return Object.keys(n).forEach((function(e){n[e]=t.clone(n[e])})),n}return e}},15:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=void 0;t.isFunction=function(e){return"function"==typeof e}},197:function(e,t,o){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0}),t.GridLayout=void 0;var i=o(9),s=function(e){function t(t){var o=e.call(this)||this;return o.begin=[0,0],o.preventOverlap=!0,o.preventOverlapPadding=10,o.condense=!1,o.sortBy="degree",o.nodeSize=30,o.nodes=[],o.edges=[],o.width=300,o.height=300,o.row=0,o.col=0,o.cellWidth=0,o.cellHeight=0,o.cellUsed={},o.id2manPos={},o.onLayoutEnd=function(){},o.updateCfg(t),o}return n(t,e),t.prototype.getDefaultCfg=function(){return{begin:[0,0],preventOverlap:!0,preventOverlapPadding:10,condense:!1,rows:void 0,cols:void 0,position:void 0,sortBy:"degree",nodeSize:30}},t.prototype.execute=function(){var e=this,t=e.nodes,o=t.length,r=e.begin;if(0!==o){if(1===o)return t[0].x=r[0],t[0].y=r[1],void(e.onLayoutEnd&&e.onLayoutEnd());var n=e.edges,s=[];t.forEach((function(e){s.push(e)}));var u={};if(s.forEach((function(e,t){u[e.id]=t})),("degree"===e.sortBy||!i.isString(e.sortBy)||void 0===s[0][e.sortBy])&&(e.sortBy="degree",i.isNaN(t[0].degree))){var c=i.getDegree(s.length,u,n);s.forEach((function(e,t){e.degree=c[t]}))}s.sort((function(t,o){return o[e.sortBy]-t[e.sortBy]})),e.width||"undefined"==typeof window||(e.width=window.innerWidth),e.height||"undefined"==typeof window||(e.height=window.innerHeight);var l=e.rows,a=null!=e.cols?e.cols:e.columns;if(e.cells=o,null!=l&&null!=a?(e.rows=l,e.cols=a):null!=l&&null==a?(e.rows=l,e.cols=Math.ceil(e.cells/e.rows)):null==l&&null!=a?(e.cols=a,e.rows=Math.ceil(e.cells/e.cols)):(e.splits=Math.sqrt(e.cells*e.height/e.width),e.rows=Math.round(e.splits),e.cols=Math.round(e.width/e.height*e.splits)),e.cols*e.rows>e.cells)((d=e.small())-1)*(f=e.large())>=e.cells?e.small(d-1):(f-1)*d>=e.cells&&e.large(f-1);else for(;e.cols*e.rows<e.cells;){var f,d=e.small();((f=e.large())+1)*d>=e.cells?e.large(f+1):e.small(d+1)}e.cellWidth=e.width/e.cols,e.cellHeight=e.height/e.rows,e.condense&&(e.cellWidth=0,e.cellHeight=0),e.preventOverlap&&s.forEach((function(t){var o,r;t.x&&t.y||(t.x=0,t.y=0),i.isArray(t.size)?(o=t.size[0],r=t.size[1]):i.isNumber(t.size)&&(o=t.size,r=t.size),void 0!==o&&void 0!==r||(i.isArray(e.nodeSize)?(o=e.nodeSize[0],r=e.nodeSize[1]):i.isNumber(e.nodeSize)?(o=e.nodeSize,r=e.nodeSize):(o=30,r=30));var n=e.preventOverlapPadding,s=o+n,u=r+n;e.cellWidth=Math.max(e.cellWidth,s),e.cellHeight=Math.max(e.cellHeight,u)})),e.cellUsed={},e.row=0,e.col=0,e.id2manPos={};for(var h=0;h<s.length;h++){var p=s[h],y=void 0;if(e.position&&(y=e.position(p)),y&&(void 0!==y.row||void 0!==y.col)){var v={row:y.row,col:y.col};if(void 0===v.col)for(v.col=0;e.used(v.row,v.col);)v.col++;else if(void 0===v.row)for(v.row=0;e.used(v.row,v.col);)v.row++;e.id2manPos[p.id]=v,e.use(v.row,v.col)}e.getPos(p)}return e.onLayoutEnd&&e.onLayoutEnd(),{edges:n,nodes:s}}e.onLayoutEnd&&e.onLayoutEnd()},t.prototype.small=function(e){var t,o=this.rows||5,r=this.cols||5;null==e?t=Math.min(o,r):Math.min(o,r)===this.rows?this.rows=e:this.cols=e;return t},t.prototype.large=function(e){var t,o=this.rows||5,r=this.cols||5;null==e?t=Math.max(o,r):Math.max(o,r)===this.rows?this.rows=e:this.cols=e;return t},t.prototype.used=function(e,t){return this.cellUsed["c-"+e+"-"+t]||!1},t.prototype.use=function(e,t){this.cellUsed["c-"+e+"-"+t]=!0},t.prototype.moveToNextCell=function(){var e=this.cols||5;this.col++,this.col>=e&&(this.col=0,this.row++)},t.prototype.getPos=function(e){var t,o,r=this.begin,n=this.cellWidth,i=this.cellHeight,s=this.id2manPos[e.id];if(s)t=s.col*n+n/2+r[0],o=s.row*i+i/2+r[1];else{for(;this.used(this.row,this.col);)this.moveToNextCell();t=this.col*n+n/2+r[0],o=this.row*i+i/2+r[1],this.use(this.row,this.col),this.moveToNextCell()}e.x=t,e.y=o},t.prototype.getType=function(){return"grid"},t}(o(5).Base);t.GridLayout=s},442:function(e,t,o){"use strict";o.r(t);var r=o(197);t.default=r.GridLayout},5:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Base=void 0;var r=function(){function e(){this.nodes=[],this.edges=[],this.combos=[],this.positions=[],this.destroyed=!1,this.onLayoutEnd=function(){}}return e.prototype.layout=function(e){return this.init(e),this.execute(!0)},e.prototype.init=function(e){this.nodes=e.nodes||[],this.edges=e.edges||[],this.combos=e.combos||[]},e.prototype.execute=function(e){},e.prototype.executeWithWorker=function(){},e.prototype.getDefaultCfg=function(){return{}},e.prototype.updateCfg=function(e){e&&Object.assign(this,e)},e.prototype.getType=function(){return"base"},e.prototype.destroy=function(){this.nodes=null,this.edges=null,this.combos=null,this.positions=null,this.destroyed=!0},e.prototype.onTick=function(){},e}();t.Base=r},9:function(e,t,o){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,o,r){void 0===r&&(r=o),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[o]}})}:function(e,t,o,r){void 0===r&&(r=o),e[r]=t[o]}),n=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||r(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),n(o(10),t),n(o(11),t),n(o(12),t),n(o(13),t),n(o(14),t),n(o(15),t)}}).default})); | ||
//# sourceMappingURL=gridLayout.js.map |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.f6=e():t.f6=e()}(this,(function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=448)}({448:function(t,e,n){"use strict";n.r(e);var o=n(58);e.default=o.RandomLayout},5:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Base=void 0;var o=function(){function t(){this.nodes=[],this.edges=[],this.combos=[],this.positions=[],this.destroyed=!1,this.onLayoutEnd=function(){}}return t.prototype.layout=function(t){return this.init(t),this.execute(!0)},t.prototype.init=function(t){this.nodes=t.nodes||[],this.edges=t.edges||[],this.combos=t.combos||[]},t.prototype.execute=function(t){},t.prototype.executeWithWorker=function(){},t.prototype.getDefaultCfg=function(){return{}},t.prototype.updateCfg=function(t){t&&Object.assign(this,t)},t.prototype.getType=function(){return"base"},t.prototype.destroy=function(){this.nodes=null,this.edges=null,this.combos=null,this.positions=null,this.destroyed=!0},t}();e.Base=o},58:function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.RandomLayout=void 0;var i=function(t){function e(e){var n=t.call(this)||this;return n.center=[0,0],n.width=300,n.height=300,n.nodes=[],n.edges=[],n.onLayoutEnd=function(){},n.updateCfg(e),n}return r(e,t),e.prototype.getDefaultCfg=function(){return{center:[0,0],width:300,height:300}},e.prototype.execute=function(){var t=this,e=t.nodes,n=t.center;return t.width||"undefined"==typeof window||(t.width=window.innerWidth),t.height||"undefined"==typeof window||(t.height=window.innerHeight),e&&e.forEach((function(e){e.x=.9*(Math.random()-.5)*t.width+n[0],e.y=.9*(Math.random()-.5)*t.height+n[1]})),t.onLayoutEnd&&t.onLayoutEnd(),{nodes:e,edges:this.edges}},e.prototype.getType=function(){return"random"},e}(n(5).Base);e.RandomLayout=i}}).default})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.f6=e():t.f6=e()}(this,(function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=448)}({448:function(t,e,n){"use strict";n.r(e);var o=n(58);e.default=o.RandomLayout},5:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Base=void 0;var o=function(){function t(){this.nodes=[],this.edges=[],this.combos=[],this.positions=[],this.destroyed=!1,this.onLayoutEnd=function(){}}return t.prototype.layout=function(t){return this.init(t),this.execute(!0)},t.prototype.init=function(t){this.nodes=t.nodes||[],this.edges=t.edges||[],this.combos=t.combos||[]},t.prototype.execute=function(t){},t.prototype.executeWithWorker=function(){},t.prototype.getDefaultCfg=function(){return{}},t.prototype.updateCfg=function(t){t&&Object.assign(this,t)},t.prototype.getType=function(){return"base"},t.prototype.destroy=function(){this.nodes=null,this.edges=null,this.combos=null,this.positions=null,this.destroyed=!0},t.prototype.onTick=function(){},t}();e.Base=o},58:function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.RandomLayout=void 0;var i=function(t){function e(e){var n=t.call(this)||this;return n.center=[0,0],n.width=300,n.height=300,n.nodes=[],n.edges=[],n.onLayoutEnd=function(){},n.updateCfg(e),n}return r(e,t),e.prototype.getDefaultCfg=function(){return{center:[0,0],width:300,height:300}},e.prototype.execute=function(){var t=this,e=t.nodes,n=t.center;return t.width||"undefined"==typeof window||(t.width=window.innerWidth),t.height||"undefined"==typeof window||(t.height=window.innerHeight),e&&e.forEach((function(e){e.x=.9*(Math.random()-.5)*t.width+n[0],e.y=.9*(Math.random()-.5)*t.height+n[1]})),t.onLayoutEnd&&t.onLayoutEnd(),{nodes:e,edges:this.edges}},e.prototype.getType=function(){return"random"},e}(n(5).Base);e.RandomLayout=i}}).default})); | ||
//# sourceMappingURL=randomLayout.js.map |
{ | ||
"name": "@antv/f6", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"description": "A Mobile Graph Visualization Framework in JavaScript", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5722634
17209