@antv/g6
Version:
graph visualization frame work
9 lines • 696 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.G6=e():t.G6=e()}(window,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.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 i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));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=476)}([function(t,e,n){var r=n(108),i={};r.merge(i,r,{mixin:function(t,e){var n=t.CFG?"CFG":"ATTRS";if(t&&e){t._mixins=e,t[n]=t[n]||{};var r={};i.each(e,function(e){i.augment(t,e);var a=e[n];a&&i.merge(r,a)}),t[n]=i.merge(r,t[n])}}}),t.exports=i},function(t,e,n){var r={},i=n(171),a=n(433),o=n(70),s=n(432),u=n(431),c=n(430);o.deepMix(r,o,s,a,i,u,c),t.exports=r},function(t,e,n){var r=n(15),i=n(3),a=5;function o(t,e,n,s){for(var u in n=n||0,s=s||a,e)if(e.hasOwnProperty(u)){var c=e[u];null!==c&&r(c)?(r(t[u])||(t[u]={}),n<s?o(t[u],c,n+1,s):t[u]=e[u]):i(c)?(t[u]=[],t[u]=t[u].concat(c)):void 0!==c&&(t[u]=c)}}t.exports=function(){for(var t=new Array(arguments.length),e=t.length,n=0;n<e;n++)t[n]=arguments[n];for(var r=t[0],i=1;i<e;i++)o(r,t[i]);return r}},function(t,e,n){var r=n(4),i=Array.isArray?Array.isArray:function(t){return r(t,"Array")};t.exports=i},function(t,e){var n={}.toString;t.exports=function(t,e){return n.call(t)==="[object "+e+"]"}},function(t,e,n){var r;try{r={cloneDeep:n(289),constant:n(88),defaults:n(288),each:n(149),filter:n(146),find:n(287),flatten:n(119),forEach:n(148),forIn:n(282),has:n(135),isUndefined:n(134),last:n(281),map:n(133),mapValues:n(280),max:n(279),merge:n(277),min:n(271),minBy:n(270),now:n(269),pick:n(268),range:n(263),reduce:n(131),sortBy:n(260),uniqueId:n(255),values:n(126),zipObject:n(254)}}catch(t){}r||(r=window._),t.exports=r},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(12),i=n(3);t.exports=function(t,e){if(t)if(i(t))for(var n=0,a=t.length;n<a&&!1!==e(t[n],n);n++);else if(r(t))for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}},,function(t,e){t.exports=function(t,e){if(t)for(var n in e)e.hasOwnProperty(n)&&(t.style[n]=e[n]);return t}},function(t,e){t.exports={version:"3.1.8",rootContainerClassName:"root-container",nodeContainerClassName:"node-container",edgeContainerClassName:"edge-container",customGroupContainerClassName:"custom-group-container",delegateContainerClassName:"delegate-container",defaultShapeFillColor:"#91d5ff",defaultShapeStrokeColor:"#91d5ff",defaultNode:{shape:"circle",style:{fill:"#fff"},size:40,color:"#333"},defaultEdge:{shape:"line",style:{},size:1,color:"#333"},nodeLabel:{style:{fill:"#595959",textAlign:"center",textBaseline:"middle"},offset:5},edgeLabel:{style:{fill:"#595959",textAlign:"center",textBaseline:"middle"}},nodeStateStyle:{active:{fillOpacity:.8},selected:{lineWidth:2}},edgeStateStyle:{active:{strokeOpacity:.8},selected:{lineWidth:2}},loopPosition:"top",delegateStyle:{fill:"#F3F9FF",fillOpacity:.5,stroke:"#1890FF",strokeOpacity:.9,lineDash:[5,5]}}},function(t,e,n){var r=n(0),i=n(453),a=n(188),o=n(104),s=["zIndex","capture","visible"],u=function t(e){t.superclass.constructor.call(this,e)};u.ATTRS={},r.extend(u,a);var c={matrix:"matrix",path:"path",points:"points",lineDash:"lineDash"};r.augment(u,i,{isShape:!0,drawInner:function(t){var e=this._attrs;this.createPath(t);var n=t.globalAlpha;if(this.hasFill()){var i=e.fillOpacity;r.isNil(i)||1===i?t.fill():(t.globalAlpha=i,t.fill(),t.globalAlpha=n)}if(this.hasStroke()&&this._attrs.lineWidth>0){var a=e.strokeOpacity;r.isNil(a)||1===a||(t.globalAlpha=a),t.stroke()}this.afterPath(t)},afterPath:function(){},isHitBox:function(){return!0},isHit:function(t,e){var n=[t,e,1];if(this.invert(n),this.isHitBox()){var r=this.getBBox();if(r&&!o.box(r.minX,r.maxX,r.minY,r.maxY,n[0],n[1]))return!1}var i=this._attrs.clip;return i?(i.invert(n,this.get("canvas")),!!i.isPointInPath(n[0],n[1])&&this.isPointInPath(n[0],n[1])):this.isPointInPath(n[0],n[1])},calculateBox:function(){return null},getHitLineWidth:function(){var t=this._attrs,e=t.lineAppendWidth||0;return(t.lineWidth||0)+e},clearTotalMatrix:function(){this._cfg.totalMatrix=null,this._cfg.region=null},clearBBox:function(){this._cfg.box=null,this._cfg.region=null},getBBox:function(){var t=this._cfg.box;return t||((t=this.calculateBox())&&(t.x=t.minX,t.y=t.minY,t.width=t.maxX-t.minX,t.height=t.maxY-t.minY),this._cfg.box=t),t},clone:function(){var t=this,e=null,n=t._attrs,i={};return r.each(n,function(t,e){c[e]&&r.isArray(n[e])?i[e]=function(t){for(var e=[],n=0;n<t.length;n++)r.isArray(t[n])?e.push([].concat(t[n])):e.push(t[n]);return e}(n[e]):i[e]=n[e]}),e=new t.constructor({attrs:i}),r.each(s,function(n){e._cfg[n]=t._cfg[n]}),e}}),t.exports=u},function(t,e){var 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.exports=function(t){var e=void 0===t?"undefined":n(t);return null!==t&&"object"===e||"function"===e}},function(t,e,n){"use strict";var r=n(5),i=n(23).Graph;function a(t,e,n,i){var a;do{a=r.uniqueId(i)}while(t.hasNode(a));return n.dummy=e,t.setNode(a,n),a}function o(t){return r.max(r.map(t.nodes(),function(e){var n=t.node(e).rank;if(!r.isUndefined(n))return n}))}t.exports={addDummyNode:a,simplify:function(t){var e=(new i).setGraph(t.graph());return r.forEach(t.nodes(),function(n){e.setNode(n,t.node(n))}),r.forEach(t.edges(),function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),e},asNonCompoundGraph:function(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return r.forEach(t.nodes(),function(n){t.children(n).length||e.setNode(n,t.node(n))}),r.forEach(t.edges(),function(n){e.setEdge(n,t.edge(n))}),e},successorWeights:function(t){var e=r.map(t.nodes(),function(e){var n={};return r.forEach(t.outEdges(e),function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight}),n});return r.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=r.map(t.nodes(),function(e){var n={};return r.forEach(t.inEdges(e),function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight}),n});return r.zipObject(t.nodes(),e)},intersectRect:function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,u=t.width/2,c=t.height/2;if(!o&&!s)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(s)*u>Math.abs(o)*c?(s<0&&(c=-c),n=c*o/s,r=c):(o<0&&(u=-u),n=u,r=u*s/o);return{x:i+n,y:a+r}},buildLayerMatrix:function(t){var e=r.map(r.range(o(t)+1),function(){return[]});return r.forEach(t.nodes(),function(n){var i=t.node(n),a=i.rank;r.isUndefined(a)||(e[a][i.order]=n)}),e},normalizeRanks:function(t){var e=r.min(r.map(t.nodes(),function(e){return t.node(e).rank}));r.forEach(t.nodes(),function(n){var i=t.node(n);r.has(i,"rank")&&(i.rank-=e)})},removeEmptyRanks:function(t){var e=r.min(r.map(t.nodes(),function(e){return t.node(e).rank})),n=[];r.forEach(t.nodes(),function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)});var i=0,a=t.graph().nodeRankFactor;r.forEach(n,function(e,n){r.isUndefined(e)&&n%a!=0?--i:i&&r.forEach(e,function(e){t.node(e).rank+=i})})},addBorderNode:function(t,e,n,r){var i={width:0,height:0};arguments.length>=4&&(i.rank=n,i.order=r);return a(t,"border",i,e)},maxRank:o,partition:function(t,e){var n={lhs:[],rhs:[]};return r.forEach(t,function(t){e(t)?n.lhs.push(t):n.rhs.push(t)}),n},time:function(t,e){var n=r.now();try{return e()}finally{console.log(t+" time: "+(r.now()-n)+"ms")}},notime:function(t,e){return e()}}},function(t,e){var 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.exports=function(t){return"object"===(void 0===t?"undefined":n(t))&&null!==t}},function(t,e,n){var r=n(14),i=n(4);t.exports=function(t){if(!r(t)||!i(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}},function(t,e){t.exports=function(t,e){if(t["_wrap_"+e])return t["_wrap_"+e];var n=function(n){t[e](n)};return t["_wrap_"+e]=n,n}},function(t,e,n){var r=n(4);t.exports=function(t){return r(t,"String")}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r;try{r={clone:n(401),constant:n(88),each:n(149),filter:n(146),has:n(135),isArray:n(6),isEmpty:n(325),isFunction:n(48),isUndefined:n(134),keys:n(29),map:n(133),reduce:n(131),size:n(322),transform:n(316),union:n(315),values:n(126)}}catch(t){}r||(r=window._),t.exports=r},function(t,e,n){var r=n(1);n(429);var i={},a={};function o(t){return a[t]||r.upperFirst(t)}var s={defaultShapeType:null,getShape:function(t){return this[t]||this[this.defaultShapeType]},draw:function(t,e,n){var r=this.getShape(t),i=r.draw(e,n);return r.afterDraw(e,n,i),i},update:function(t,e,n){var r=this.getShape(t);r.update&&(r.update(e,n),r.afterUpdate(e,n))},setState:function(t,e,n,r){this.getShape(t).setState(e,n,r)},shouldUpdate:function(t){return!!this.getShape(t).update},getControlPoints:function(t,e){return this.getShape(t).getControlPoints(e)},getAnchorPoints:function(t,e){return this.getShape(t).getAnchorPoints(e)}},u={options:{},getCustomConfig:function(){},draw:function(){},afterDraw:function(){},afterUpdate:function(){},setState:function(){},getControlPoints:function(t){return t.controlPoints},getAnchorPoints:function(t){var e=this.getCustomConfig(t)||{},n=this.options.anchorPoints,r=e.anchorPoints;return t.anchorPoints||r||n}};i.registerFactory=function(t,e){var n=o(t),a=r.mix({},s,e);return i[n]=a,a.className=n,function(t){var e="register"+t.className;i[e]=function(e,n,i){var a=i?t.getShape(i):u,o=r.mix({},a,n);return o.type=e,t[e]=o,o}}(a),a},i.getFactory=function(t){return this[t=o(t)]},t.exports=i},function(t,e){var n=document.createElement("table"),r=document.createElement("tr"),i=/^\s*<(\w+|!)[^>]*>/,a={tr:document.createElement("tbody"),tbody:n,thead:n,tfoot:n,td:r,th:r,"*":document.createElement("div")};t.exports=function(t){var e=i.test(t)&&RegExp.$1;e in a||(e="*");var n=a[e];t=t.replace(/(^\s*)|(\s*$)/g,""),n.innerHTML=""+t;var r=n.childNodes[0];return n.removeChild(r),r}},function(t,e,n){var r=n(166),i="object"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function("return this")();t.exports=a},function(t,e,n){var r;try{r=n(403)}catch(t){}r||(r=window.graphlib),t.exports=r},function(t,e,n){var r=n(1),i={registerLayout:function(t,e){if(!e)throw new Error("please specify handler for this layout:"+t);var n=function(t){r.mix(this,this.getDefaultCfg(),t)};r.augment(n,{init:function(t){this.nodes=t.nodes,this.edges=t.edges},execute:function(){},layout:function(t){this.init(t),this.execute()},updateCfg:function(t){r.mix(this,t)},destroy:function(){this.positions=null,this.nodes=null,this.edges=null,this.destroyed=!0},getDefaultCfg:function(){}},e),i[t]=n}};t.exports=i},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){t.exports=function(t){return null===t||void 0===t}},function(t,e,n){var r=n(345),i=n(335),a=n(30),o=n(6),s=n(328);t.exports=function(t){return"function"==typeof t?t:null==t?a:"object"==typeof t?o(t)?i(t[0],t[1]):r(t):s(t)}},function(t,e,n){var r=n(48),i=n(94);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,e,n){var r=n(163),i=n(92),a=n(28);t.exports=function(t){return a(t)?r(t):i(t)}},function(t,e){t.exports=function(t){return t}},function(t,e,n){var r=n(37),i=n(389),a=n(388),o="[object Null]",s="[object Undefined]",u=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?s:o:u&&u in Object(t)?i(t):a(t)}},function(t,e,n){var r=n(390),i=n(385);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(31),i=n(25),a="[object Symbol]";t.exports=function(t){return"symbol"==typeof t||i(t)&&r(t)==a}},function(t,e,n){var r=n(360),i=n(97),a=n(359),o=n(154),s=n(358),u=n(31),c=n(165),f=c(r),h=c(i),l=c(a),d=c(o),p=c(s),g=u;(r&&"[object DataView]"!=g(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=g(new i)||a&&"[object Promise]"!=g(a.resolve())||o&&"[object Set]"!=g(new o)||s&&"[object WeakMap]"!=g(new s))&&(g=function(t){var e=u(t),n="[object Object]"==e?t.constructor:void 0,r=n?c(n):"";if(r)switch(r){case f:return"[object DataView]";case h:return"[object Map]";case l:return"[object Promise]";case d:return"[object Set]";case p:return"[object WeakMap]"}return e}),t.exports=g},function(t,e,n){var r=n(163),i=n(365),a=n(28);t.exports=function(t){return a(t)?r(t,!0):i(t)}},function(t,e,n){(function(t){var r=n(22),i=n(369),a="object"==typeof e&&e&&!e.nodeType&&e,o=a&&"object"==typeof t&&t&&!t.nodeType&&t,s=o&&o.exports===a?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;t.exports=u}).call(this,n(69)(t))},function(t,e,n){var r=n(22).Symbol;t.exports=r},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},,,,,,function(t,e,n){var r=n(33),i=1/0;t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-i?"-0":e}},function(t,e,n){var r=n(368),i=n(60),a=n(93),o=a&&a.isTypedArray,s=o?i(o):r;t.exports=s},function(t,e,n){var r=n(370),i=n(25),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return i(t)&&o.call(t,"callee")&&!s.call(t,"callee")};t.exports=u},function(t,e,n){var r=n(63),i=n(62);t.exports=function(t,e,n,a){var o=!n;n||(n={});for(var s=-1,u=e.length;++s<u;){var c=e[s],f=a?a(n[c],t[c],c,n,t):void 0;void 0===f&&(f=t[c]),o?i(n,c,f):r(n,c,f)}return n}},function(t,e,n){var r=n(31),i=n(18),a="[object AsyncFunction]",o="[object Function]",s="[object GeneratorFunction]",u="[object Proxy]";t.exports=function(t){if(!i(t))return!1;var e=r(t);return e==o||e==s||e==a||e==u}},,function(t,e,n){var r=n(0),i=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,a=/[^\s\,]+/gi;t.exports={parseRadius:function(t){var e=0,n=0,i=0,a=0;return r.isArray(t)?1===t.length?e=n=i=a=t[0]:2===t.length?(e=i=t[0],n=a=t[1]):3===t.length?(e=t[0],n=a=t[1],i=t[2]):(e=t[0],n=t[1],i=t[2],a=t[3]):e=n=i=a=t,{r1:e,r2:n,r3:i,r4:a}},parsePath:function(t){return t=t||[],r.isArray(t)?t:r.isString(t)?(t=t.match(i),r.each(t,function(e,n){if((e=e.match(a))[0].length>1){var i=e[0].charAt(0);e.splice(1,0,e[0].substr(1)),e[0]=i}r.each(e,function(t,n){isNaN(t)||(e[n]=+t)}),t[n]=e}),t):void 0}}},function(t,e){t.exports=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)}},function(t,e,n){"use strict";var r=n(5);t.exports={longestPath:function(t){var e={};r.forEach(t.sources(),function n(i){var a=t.node(i);if(r.has(e,i))return a.rank;e[i]=!0;var o=r.min(r.map(t.outEdges(i),function(e){return n(e.w)-t.edge(e).minlen}));o!==Number.POSITIVE_INFINITY&&void 0!==o&&null!==o||(o=0);return a.rank=o})},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},function(t,e,n){var r=n(38),i=n(28),a=n(61),o=n(18);t.exports=function(t,e,n){if(!o(n))return!1;var s=typeof e;return!!("number"==s?i(n)&&a(e,n.length):"string"==s&&e in n)&&r(n[e],t)}},function(t,e,n){var r=n(30),i=n(130),a=n(129);t.exports=function(t,e){return a(i(t,e,r),t+"")}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}},function(t,e,n){var r=n(6),i=n(83),a=n(333),o=n(139);t.exports=function(t,e){return r(t)?t:i(t,e)?[t]:a(o(t))}},function(t,e,n){var r=n(87),i=n(347)(r);t.exports=i},function(t,e,n){var r=n(162)(Object.getPrototypeOf,Object);t.exports=r},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e){var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var i=typeof t;return!!(e=null==e?n:e)&&("number"==i||"symbol"!=i&&r.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e,n){var r=n(164);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e,n){var r=n(62),i=n(38),a=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var o=t[e];a.call(t,e)&&i(o,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(376);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e,n){var r=n(32)(Object,"create");t.exports=r},function(t,e,n){var r=n(38);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e,n){var r=n(400),i=n(399),a=n(398),o=n(397),s=n(396);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=o,u.prototype.set=s,t.exports=u},function(t,e,n){var r=n(67),i=n(395),a=n(394),o=n(393),s=n(392),u=n(391);function c(t){var e=this.__data__=new r(t);this.size=e.size}c.prototype.clear=i,c.prototype.delete=a,c.prototype.get=o,c.prototype.has=s,c.prototype.set=u,t.exports=c},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){var r=n(75),i={deepMix:n(2),mix:n(76),debounce:n(438),each:n(7),throttle:n(437),mat3:n(106),vec2:n(192),vec3:n(191),transform:n(190),clone:n(107),upperFirst:n(197),isNil:n(26),isArray:n(3),createDom:n(21),modifyCSS:n(9),isObject:n(12),isPlainObject:n(15),isNumber:n(77),isString:n(17),uniqueId:n(198),addEventListener:n(436),wrapBehavior:n(16),extend:n(195),augment:n(194),remove:n(435),formatPadding:function(t){var e=0,n=0,r=0,a=0;return i.isNumber(t)||i.isString(t)?e=n=r=a=t:i.isArray(t)&&(e=t[0],r=i.isNil(t[1])?t[0]:t[1],a=i.isNil(t[2])?t[0]:t[2],n=i.isNil(t[3])?r:t[3]),[e,r,a,n]},cloneEvent:function(t){var e=new r(t.type,t,!0,!0);return e.clientX=t.clientX,e.clientY=t.clientY,e.x=t.x,e.y=t.y,e.target=t.target,e.currentTarget=t.currentTarget,e.item=t.item,e}};t.exports=i},function(t,e,n){var r=n(0),i=n(104),a=n(103),o=n(186),s=n(185),u=r.vec3,c=r.mat3,f=["m","l","c","a","q","h","v","t","s","z"];function h(t,e,n){return{x:n.x+t,y:n.y+e}}function l(t,e){return{x:e.x+(e.x-t.x),y:e.y+(e.y-t.y)}}function d(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function p(t,e){return(t[0]*e[0]+t[1]*e[1])/(d(t)*d(e))}function g(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(p(t,e))}var v=function(t,e,n){this.preSegment=e,this.isLast=n,this.init(t,e)};r.augment(v,{init:function(t,e){var n=t[0];e=e||{endPoint:{x:0,y:0}};var i,a,o,s,u=f.indexOf(n)>=0,c=u?n.toUpperCase():n,d=t,v=e.endPoint,m=d[1],y=d[2];switch(c){default:break;case"M":s=u?h(m,y,v):{x:m,y:y},this.command="M",this.params=[v,s],this.subStart=s,this.endPoint=s;break;case"L":s=u?h(m,y,v):{x:m,y:y},this.command="L",this.params=[v,s],this.subStart=e.subStart,this.endPoint=s,this.endTangent=function(){return[s.x-v.x,s.y-v.y]},this.startTangent=function(){return[v.x-s.x,v.y-s.y]};break;case"H":s=u?h(m,0,v):{x:m,y:v.y},this.command="L",this.params=[v,s],this.subStart=e.subStart,this.endPoint=s,this.endTangent=function(){return[s.x-v.x,s.y-v.y]},this.startTangent=function(){return[v.x-s.x,v.y-s.y]};break;case"V":s=u?h(0,m,v):{x:v.x,y:m},this.command="L",this.params=[v,s],this.subStart=e.subStart,this.endPoint=s,this.endTangent=function(){return[s.x-v.x,s.y-v.y]},this.startTangent=function(){return[v.x-s.x,v.y-s.y]};break;case"Q":u?(i=h(m,y,v),a=h(d[3],d[4],v)):(i={x:m,y:y},a={x:d[3],y:d[4]}),this.command="Q",this.params=[v,i,a],this.subStart=e.subStart,this.endPoint=a,this.endTangent=function(){return[a.x-i.x,a.y-i.y]},this.startTangent=function(){return[v.x-i.x,v.y-i.y]};break;case"T":a=u?h(m,y,v):{x:m,y:y},"Q"===e.command?(i=l(e.params[1],v),this.command="Q",this.params=[v,i,a],this.subStart=e.subStart,this.endPoint=a,this.endTangent=function(){return[a.x-i.x,a.y-i.y]},this.startTangent=function(){return[v.x-i.x,v.y-i.y]}):(this.command="TL",this.params=[v,a],this.subStart=e.subStart,this.endPoint=a,this.endTangent=function(){return[a.x-v.x,a.y-v.y]},this.startTangent=function(){return[v.x-a.x,v.y-a.y]});break;case"C":u?(i=h(m,y,v),a=h(d[3],d[4],v),o=h(d[5],d[6],v)):(i={x:m,y:y},a={x:d[3],y:d[4]},o={x:d[5],y:d[6]}),this.command="C",this.params=[v,i,a,o],this.subStart=e.subStart,this.endPoint=o,this.endTangent=function(){return[o.x-a.x,o.y-a.y]},this.startTangent=function(){return[v.x-i.x,v.y-i.y]};break;case"S":u?(a=h(m,y,v),o=h(d[3],d[4],v)):(a={x:m,y:y},o={x:d[3],y:d[4]}),"C"===e.command?(i=l(e.params[2],v),this.command="C",this.params=[v,i,a,o],this.subStart=e.subStart,this.endPoint=o,this.endTangent=function(){return[o.x-a.x,o.y-a.y]},this.startTangent=function(){return[v.x-i.x,v.y-i.y]}):(this.command="SQ",this.params=[v,a,o],this.subStart=e.subStart,this.endPoint=o,this.endTangent=function(){return[o.x-a.x,o.y-a.y]},this.startTangent=function(){return[v.x-a.x,v.y-a.y]});break;case"A":var x=m,b=y,w=d[3],_=d[4],M=d[5];s=u?h(d[6],d[7],v):{x:d[6],y:d[7]},this.command="A";var S=function(t,e,n,i,a,o,s){var u=r.mod(r.toRadian(s),2*Math.PI),c=t.x,f=t.y,h=e.x,l=e.y,d=Math.cos(u)*(c-h)/2+Math.sin(u)*(f-l)/2,v=-1*Math.sin(u)*(c-h)/2+Math.cos(u)*(f-l)/2,m=d*d/(a*a)+v*v/(o*o);m>1&&(a*=Math.sqrt(m),o*=Math.sqrt(m));var y=a*a*(v*v)+o*o*(d*d),x=Math.sqrt((a*a*(o*o)-y)/y);n===i&&(x*=-1),isNaN(x)&&(x=0);var b=x*a*v/o,w=x*-o*d/a,_=(c+h)/2+Math.cos(u)*b-Math.sin(u)*w,M=(f+l)/2+Math.sin(u)*b+Math.cos(u)*w,S=g([1,0],[(d-b)/a,(v-w)/o]),P=[(d-b)/a,(v-w)/o],A=[(-1*d-b)/a,(-1*v-w)/o],k=g(P,A);return p(P,A)<=-1&&(k=Math.PI),p(P,A)>=1&&(k=0),0===i&&k>0&&(k-=2*Math.PI),1===i&&k<0&&(k+=2*Math.PI),[t,_,M,a,o,S,k,u,i]}(v,s,_,M,x,b,w);this.params=S;var P=e.subStart;this.subStart=P,this.endPoint=s;var A=S[5]%(2*Math.PI);r.isNumberEqual(A,2*Math.PI)&&(A=0);var k=S[6]%(2*Math.PI);r.isNumberEqual(k,2*Math.PI)&&(k=0);var C=.001;this.startTangent=function(){0===M&&(C*=-1);var t=S[3]*Math.cos(A-C)+S[1],e=S[4]*Math.sin(A-C)+S[2];return[t-P.x,e-P.y]},this.endTangent=function(){var t=S[6];t-2*Math.PI<1e-4&&(t=0);var e=S[3]*Math.cos(A+t+C)+S[1],n=S[4]*Math.sin(A+t-C)+S[2];return[v.x-e,v.y-n]};break;case"Z":this.command="Z",this.params=[v,e.subStart],this.subStart=e.subStart,this.endPoint=e.subStart}},isInside:function(t,e,n){var r=this.command,a=this.params,o=this.box;if(o&&!i.box(o.minX,o.maxX,o.minY,o.maxY,t,e))return!1;switch(r){default:break;case"M":return!1;case"TL":case"L":case"Z":return i.line(a[0].x,a[0].y,a[1].x,a[1].y,n,t,e);case"SQ":case"Q":return i.quadraticline(a[0].x,a[0].y,a[1].x,a[1].y,a[2].x,a[2].y,n,t,e);case"C":return i.cubicline(a[0].x,a[0].y,a[1].x,a[1].y,a[2].x,a[2].y,a[3].x,a[3].y,n,t,e);case"A":var s=a,f=s[1],h=s[2],l=s[3],d=s[4],p=s[5],g=s[6],v=s[7],m=s[8],y=l>d?l:d,x=l>d?1:l/d,b=l>d?d/l:1;s=[t,e,1];var w=[1,0,0,0,1,0,0,0,1];return c.translate(w,w,[-f,-h]),c.rotate(w,w,-v),c.scale(w,w,[1/x,1/b]),u.transformMat3(s,s,w),i.arcline(0,0,y,p,p+g,1-m,n,s[0],s[1])}return!1},draw:function(t){var e,n,r,i=this.command,a=this.params;switch(i){default:break;case"M":t.moveTo(a[1].x,a[1].y);break;case"TL":case"L":t.lineTo(a[1].x,a[1].y);break;case"SQ":case"Q":e=a[1],n=a[2],t.quadraticCurveTo(e.x,e.y,n.x,n.y);break;case"C":e=a[1],n=a[2],r=a[3],t.bezierCurveTo(e.x,e.y,n.x,n.y,r.x,r.y);break;case"A":var o=a,s=o[1],u=o[2],c=o[3],f=o[4],h=o[5],l=o[6],d=o[7],p=o[8],g=c>f?c:f,v=c>f?1:c/f,m=c>f?f/c:1;t.translate(s,u),t.rotate(d),t.scale(v,m),t.arc(0,0,g,h,h+l,1-p),t.scale(1/v,1/m),t.rotate(-d),t.translate(-s,-u);break;case"Z":t.closePath()}},shortenDraw:function(t,e,n){var r,i,a,o=this.command,s=this.params;switch(o){default:break;case"M":t.moveTo(s[1].x-e,s[1].y-n);break;case"TL":case"L":t.lineTo(s[1].x-e,s[1].y-n);break;case"SQ":case"Q":r=s[1],i=s[2],t.quadraticCurveTo(r.x,r.y,i.x-e,i.y-n);break;case"C":r=s[1],i=s[2],a=s[3],t.bezierCurveTo(r.x,r.y,i.x,i.y,a.x-e,a.y-n);break;case"A":var u=s,c=u[1],f=u[2],h=u[3],l=u[4],d=u[5],p=u[6],g=u[7],v=u[8],m=h>l?h:l,y=h>l?1:h/l,x=h>l?l/h:1;t.translate(c,f),t.rotate(g),t.scale(y,x),t.arc(0,0,m,d,d+p,1-v),t.scale(1/y,1/x),t.rotate(-g),t.translate(-c,-f);break;case"Z":t.closePath()}},getBBox:function(t){var e,n,r,i,u=t/2,c=this.params;switch(this.command){default:case"M":case"Z":break;case"TL":case"L":this.box={minX:Math.min(c[0].x,c[1].x)-u,maxX:Math.max(c[0].x,c[1].x)+u,minY:Math.min(c[0].y,c[1].y)-u,maxY:Math.max(c[0].y,c[1].y)+u};break;case"SQ":case"Q":for(r=0,i=(n=o.extrema(c[0].x,c[1].x,c[2].x)).length;r<i;r++)n[r]=o.at(c[0].x,c[1].x,c[2].x,n[r]);for(n.push(c[0].x,c[2].x),r=0,i=(e=o.extrema(c[0].y,c[1].y,c[2].y)).length;r<i;r++)e[r]=o.at(c[0].y,c[1].y,c[2].y,e);e.push(c[0].y,c[2].y),this.box={minX:Math.min.apply(Math,n)-u,maxX:Math.max.apply(Math,n)+u,minY:Math.min.apply(Math,e)-u,maxY:Math.max.apply(Math,e)+u};break;case"C":for(r=0,i=(n=a.extrema(c[0].x,c[1].x,c[2].x,c[3].x)).length;r<i;r++)n[r]=a.at(c[0].x,c[1].x,c[2].x,c[3].x,n[r]);for(r=0,i=(e=a.extrema(c[0].y,c[1].y,c[2].y,c[3].y)).length;r<i;r++)e[r]=a.at(c[0].y,c[1].y,c[2].y,c[3].y,e[r]);n.push(c[0].x,c[3].x),e.push(c[0].y,c[3].y),this.box={minX:Math.min.apply(Math,n)-u,maxX:Math.max.apply(Math,n)+u,minY:Math.min.apply(Math,e)-u,maxY:Math.max.apply(Math,e)+u};break;case"A":var f=c,h=f[1],l=f[2],d=f[3],p=f[4],g=f[5],v=f[6],m=f[7],y=f[8],x=g,b=g+v,w=s.xExtrema(m,d,p),_=1/0,M=-1/0,S=[x,b];for(r=2*-Math.PI;r<=2*Math.PI;r+=Math.PI){var P=w+r;1===y?x<P&&P<b&&S.push(P):b<P&&P<x&&S.push(P)}for(r=0,i=S.length;r<i;r++){var A=s.xAt(m,d,p,h,S[r]);A<_&&(_=A),A>M&&(M=A)}var k=s.yExtrema(m,d,p),C=1/0,E=-1/0,I=[x,b];for(r=2*-Math.PI;r<=2*Math.PI;r+=Math.PI){var N=k+r;1===y?x<N&&N<b&&I.push(N):b<N&&N<x&&I.push(N)}for(r=0,i=I.length;r<i;r++){var T=s.yAt(m,d,p,l,I[r]);T<C&&(C=T),T>E&&(E=T)}this.box={minX:_-u,maxX:M+u,minY:C-u,maxY:E+u}}}}),t.exports=v},function(t,e,n){var r=n(50),i=n(71),a=Math.PI,o=Math.sin,s=Math.cos,u=Math.atan2,c=10,f=a/3;function h(t,e,n,r,i,h,l){var d,p,g,v,m,y,x;if(!e.fill){var b=e.arrowLength||c,w=e.arrowAngle?e.arrowAngle*a/180:f;x=u(r-h,n-i),m=Math.abs(e.lineWidth*s(x))/2,y=Math.abs(e.lineWidth*o(x))/2,l&&(m=-m,y=-y),d=i+b*s(x+w/2),p=h+b*o(x+w/2),g=i+b*s(x-w/2),v=h+b*o(x-w/2),t.beginPath(),t.moveTo(d-m,p-y),t.lineTo(i-m,h-y),t.lineTo(g-m,v-y),t.moveTo(i-m,h-y),t.lineTo(i+m,h+y),t.moveTo(i,h),t.stroke()}}function l(t,e,n,a,u,c,f){var h=f?e.startArrow:e.endArrow,l=h.d,d=u-n,p=c-a,g=Math.atan2(p,d),v=function(t){var e,n=[],a=r.parsePath(t.path);if(!Array.isArray(a)||0===a.length||"M"!==a[0][0]&&"m"!==a[0][0])return!1;for(var o=a.length,s=0;s<a.length;s++){var u=a[s];e=new i(u,e,s===o-1),n.push(e)}return n}(h);if(v){l&&(u-=s(g)*l,c-=o(g)*l),t.save(),t.beginPath(),t.translate(u,c),t.rotate(g);for(var m=0;m<v.length;m++)v[m].draw(t);t.setTransform(1,0,0,1,0,0),t.fillStyle=t.strokeStyle,t.fill(),t.restore()}}t.exports={addStartArrow:function(t,e,n,r,i,a){"object"==typeof e.startArrow?l(t,e,n,r,i,a,!0):e.startArrow&&h(t,e,n,r,i,a,!0)},addEndArrow:function(t,e,n,r,i,a){"object"==typeof e.endArrow?l(t,e,n,r,i,a,!1):e.endArrow&&h(t,e,n,r,i,a,!1)},getShortenOffset:function(t,e,n,r,i){var a=Math.atan2(r-e,n-t);return{dx:s(a)*i,dy:o(a)*i}}}},function(t,e,n){var r=n(0);function i(t,e,n,r){return{x:Math.cos(r)*n+t,y:Math.sin(r)*n+e}}function a(t,e,n,r){var i,a;return r?t<e?(i=e-t,a=2*Math.PI-n+t):t>n&&(i=2*Math.PI-t+e,a=t-n):(i=t-e,a=n-t),i>a?n:e}function o(t,e,n,i){var o=0;return n-e>=2*Math.PI&&(o=2*Math.PI),e=r.mod(e,2*Math.PI),n=r.mod(n,2*Math.PI)+o,t=r.mod(t,2*Math.PI),i?e>=n?t>n&&t<e?t:a(t,n,e,!0):t<e||t>n?t:a(t,e,n):e<=n?e<t&&t<n?t:a(t,e,n,!0):t>e||t<n?t:a(t,n,e)}function s(t,e,n,i,a,s,u,c,f){var h=[u,c],l=[t,e],d=r.vec2.subtract([],h,l),p=r.vec2.angleTo([1,0],d);p=o(p,i,a,s);var g=[n*Math.cos(p)+t,n*Math.sin(p)+e];return f&&(f.x=g[0],f.y=g[1]),r.vec2.distance(g,h)}t.exports={nearAngle:o,projectPoint:function(t,e,n,r,i,a,o,u){var c={};return s(t,e,n,r,i,a,o,u,c),c},pointDistance:s,box:function(t,e,n,a,s,u){var c=Math.PI/2,f=Math.PI,h=3*Math.PI/2,l=[],d=o(0,a,s,u);0===d&&l.push(i(t,e,n,0)),(d=o(c,a,s,u))===c&&l.push(i(t,e,n,c)),(d=o(f,a,s,u))===f&&l.push(i(t,e,n,f)),(d=o(h,a,s,u))===h&&l.push(i(t,e,n,h)),l.push(i(t,e,n,a)),l.push(i(t,e,n,s));var p=1/0,g=-1/0,v=1/0,m=-1/0;return r.each(l,function(t){p>t.x&&(p=t.x),g<t.x&&(g=t.x),v>t.y&&(v=t.y),m<t.y&&(m=t.y)}),{minX:p,minY:v,maxX:g,maxY:m}}}},function(t,e,n){var r=n(0).vec2;t.exports={at:function(t,e,n){return(e-t)*n+t},pointDistance:function(t,e,n,i,a,o){var s=[n-t,i-e];if(r.exactEquals(s,[0,0]))return NaN;var u=[-s[1],s[0]];r.normalize(u,u);var c=[a-t,o-e];return Math.abs(r.dot(c,u))},box:function(t,e,n,r,i){var a=i/2,o=Math.min(t,n),s=Math.max(t,n);return{minX:o-a,minY:Math.min(e,r)-a,maxX:s+a,maxY:Math.max(e,r)+a}},len:function(t,e,n,r){return Math.sqrt((n-t)*(n-t)+(r-e)*(r-e))}}},function(t,e,n){var r=n(0),i=function(t,e,n,r){this.type=t,this.target=null,this.currentTarget=null,this.bubbles=n,this.cancelable=r,this.timeStamp=(new Date).getTime(),this.defaultPrevented=!1,this.propagationStopped=!1,this.removed=!1,this.event=e};r.augment(i,{preventDefault:function(){this.defaultPrevented=this.cancelable&&!0},stopPropagation:function(){this.propagationStopped=!0},remove:function(){this.remove=!0},clone:function(){return r.clone(this)},toString:function(){return"[Event (type="+this.type+")]"}}),t.exports=i},function(t,e){function n(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}t.exports=function(t,e,r,i){return e&&n(t,e),r&&n(t,r),i&&n(t,i),t}},function(t,e,n){var r=n(4);t.exports=function(t){return r(t,"Number")}},function(t,e,n){var r=n(4);t.exports=function(t){return r(t,"Function")}},function(t,e,n){t.exports={Canvas:n(475),Group:n(189),Shape:n(11),Arc:n(184),Circle:n(183),Dom:n(182),Ellipse:n(181),Fan:n(180),Image:n(179),Line:n(178),Marker:n(102),Path:n(177),Polygon:n(176),Polyline:n(175),Rect:n(174),Text:n(173),PathSegment:n(71),PathUtil:n(101),Event:n(75),EventEmitter:n(187),version:"3.4.5"}},,function(t,e,n){var r=n(33);t.exports=function(t,e,n){for(var i=-1,a=t.length;++i<a;){var o=t[i],s=e(o);if(null!=s&&(void 0===u?s==s&&!r(s):n(s,u)))var u=s,c=o}return c}},function(t,e,n){var r=n(90),i=n(314);t.exports=function t(e,n,a,o,s){var u=-1,c=e.length;for(a||(a=i),s||(s=[]);++u<c;){var f=e[u];n>0&&a(f)?n>1?t(f,n-1,a,o,s):r(s,f):o||(s[s.length]=f)}return s}},function(t,e,n){var r=n(6),i=n(33),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||o.test(t)||!a.test(t)||null!=e&&t in Object(e)}},function(t,e,n){var r=n(56),i=n(44);t.exports=function(t,e){for(var n=0,a=(e=r(e,t)).length;null!=t&&n<a;)t=t[i(e[n++])];return n&&n==a?t:void 0}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}},function(t,e,n){var r=n(348)();t.exports=r},function(t,e,n){var r=n(86),i=n(29);t.exports=function(t,e){return t&&r(t,e,i)}},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e,n){var r=n(153);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}},function(t,e,n){var r=n(159),i=n(158),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(t){return null==t?[]:(t=Object(t),r(o(t),function(e){return a.call(t,e)}))}:i;t.exports=s},function(t,e,n){var r=n(59),i=n(367),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))a.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e,n){(function(t){var r=n(166),i="object"==typeof e&&e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===i&&r.process,s=function(){try{var t=a&&a.require&&a.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=s}).call(this,n(69)(t))},function(t,e){var n=9007199254740991;t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},function(t,e,n){var r=n(384),i=n(377),a=n(375),o=n(374),s=n(373);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=o,u.prototype.set=s,t.exports=u},function(t,e,n){var r=n(32)(n(22),"Map");t.exports=r},function(t,e,n){"use strict";var r=n(19);t.exports=s;var i="\0",a="\0",o="";function s(t){this._isDirected=!r.has(t,"directed")||t.directed,this._isMultigraph=!!r.has(t,"multigraph")&&t.multigraph,this._isCompound=!!r.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[a]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function u(t,e){t[e]?t[e]++:t[e]=1}function c(t,e){--t[e]||delete t[e]}function f(t,e,n,a){var s=""+e,u=""+n;if(!t&&s>u){var c=s;s=u,u=c}return s+o+u+o+(r.isUndefined(a)?i:a)}function h(t,e){return f(t,e.v,e.w,e.name)}s.prototype._nodeCount=0,s.prototype._edgeCount=0,s.prototype.isDirected=function(){return this._isDirected},s.prototype.isMultigraph=function(){return this._isMultigraph},s.prototype.isCompound=function(){return this._isCompound},s.prototype.setGraph=function(t){return this._label=t,this},s.prototype.graph=function(){return this._label},s.prototype.setDefaultNodeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultNodeLabelFn=t,this},s.prototype.nodeCount=function(){return this._nodeCount},s.prototype.nodes=function(){return r.keys(this._nodes)},s.prototype.sources=function(){var t=this;return r.filter(this.nodes(),function(e){return r.isEmpty(t._in[e])})},s.prototype.sinks=function(){var t=this;return r.filter(this.nodes(),function(e){return r.isEmpty(t._out[e])})},s.prototype.setNodes=function(t,e){var n=arguments,i=this;return r.each(t,function(t){n.length>1?i.setNode(t,e):i.setNode(t)}),this},s.prototype.setNode=function(t,e){return r.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=a,this._children[t]={},this._children[a][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},s.prototype.node=function(t){return this._nodes[t]},s.prototype.hasNode=function(t){return r.has(this._nodes,t)},s.prototype.removeNode=function(t){var e=this;if(r.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],r.each(this.children(t),function(t){e.setParent(t)}),delete this._children[t]),r.each(r.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],r.each(r.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},s.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(e))e=a;else{for(var n=e+="";!r.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},s.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},s.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if(e!==a)return e}},s.prototype.children=function(t){if(r.isUndefined(t)&&(t=a),this._isCompound){var e=this._children[t];if(e)return r.keys(e)}else{if(t===a)return this.nodes();if(this.hasNode(t))return[]}},s.prototype.predecessors=function(t){var e=this._preds[t];if(e)return r.keys(e)},s.prototype.successors=function(t){var e=this._sucs[t];if(e)return r.keys(e)},s.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return r.union(e,this.successors(t))},s.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},s.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;r.each(this._nodes,function(n,r){t(r)&&e.setNode(r,n)}),r.each(this._edgeObjs,function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))});var i={};return this._isCompound&&r.each(e.nodes(),function(t){e.setParent(t,function t(r){var a=n.parent(r);return void 0===a||e.hasNode(a)?(i[r]=a,a):a in i?i[a]:t(a)}(t))}),e},s.prototype.setDefaultEdgeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultEdgeLabelFn=t,this},s.prototype.edgeCount=function(){return this._edgeCount},s.prototype.edges=function(){return r.values(this._edgeObjs)},s.prototype.setPath=function(t,e){var n=this,i=arguments;return r.reduce(t,function(t,r){return i.length>1?n.setEdge(t,r,e):n.setEdge(t,r),r}),this},s.prototype.setEdge=function(){var t,e,n,i,a=!1,o=arguments[0];"object"==typeof o&&null!==o&&"v"in o?(t=o.v,e=o.w,n=o.name,2===arguments.length&&(i=arguments[1],a=!0)):(t=o,e=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),t=""+t,e=""+e,r.isUndefined(n)||(n=""+n);var s=f(this._isDirected,t,e,n);if(r.has(this._edgeLabels,s))return a&&(this._edgeLabels[s]=i),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[s]=a?i:this._defaultEdgeLabelFn(t,e,n);var c=function(t,e,n,r){var i=""+e,a=""+n;if(!t&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};r&&(s.name=r);return s}(this._isDirected,t,e,n);return t=c.v,e=c.w,Object.freeze(c),this._edgeObjs[s]=c,u(this._preds[e],t),u(this._sucs[t],e),this._in[e][s]=c,this._out[t][s]=c,this._edgeCount++,this},s.prototype.edge=function(t,e,n){var r=1===arguments.length?h(this._isDirected,arguments[0]):f(this._isDirected,t,e,n);return this._edgeLabels[r]},s.prototype.hasEdge=function(t,e,n){var i=1===arguments.length?h(this._isDirected,arguments[0]):f(this._isDirected,t,e,n);return r.has(this._edgeLabels,i)},s.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?h(this._isDirected,arguments[0]):f(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],c(this._preds[e],t),c(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},s.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var i=r.values(n);return e?r.filter(i,function(t){return t.v===e}):i}},s.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var i=r.values(n);return e?r.filter(i,function(t){return t.w===e}):i}},s.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){(function(t,r){var i;
/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/(function(){var a,o=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",c="__lodash_hash_undefined__",f=500,h="__lodash_placeholder__",l=1,d=2,p=4,g=1,v=2,m=1,y=2,x=4,b=8,w=16,_=32,M=64,S=128,P=256,A=512,k=30,C="...",E=800,I=16,N=1,T=2,O=1/0,j=9007199254740991,B=1.7976931348623157e308,L=NaN,D=4294967295,R=D-1,F=D>>>1,Y=[["ary",S],["bind",m],["bindKey",y],["curry",b],["curryRight",w],["flip",A],["partial",_],["partialRight",M],["rearg",P]],z="[object Arguments]",q="[object Array]",X="[object AsyncFunction]",G="[object Boolean]",W="[object Date]",U="[object DOMException]",H="[object Error]",V="[object Function]",Z="[object GeneratorFunction]",Q="[object Map]",$="[object Number]",K="[object Null]",J="[object Object]",tt="[object Proxy]",et="[object RegExp]",nt="[object Set]",rt="[object String]",it="[object Symbol]",at="[object Undefined]",ot="[object WeakMap]",st="[object WeakSet]",ut="[object ArrayBuffer]",ct="[object DataView]",ft="[object Float32Array]",ht="[object Float64Array]",lt="[object Int8Array]",dt="[object Int16Array]",pt="[object Int32Array]",gt="[object Uint8Array]",vt="[object Uint8ClampedArray]",mt="[object Uint16Array]",yt="[object Uint32Array]",xt=/\b__p \+= '';/g,bt=/\b(__p \+=) '' \+/g,wt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,_t=/&(?:amp|lt|gt|quot|#39);/g,Mt=/[&<>"']/g,St=RegExp(_t.source),Pt=RegExp(Mt.source),At=/<%-([\s\S]+?)%>/g,kt=/<%([\s\S]+?)%>/g,Ct=/<%=([\s\S]+?)%>/g,Et=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,It=/^\w*$/,Nt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Tt=/[\\^$.*+?()[\]{}|]/g,Ot=RegExp(Tt.source),jt=/^\s+|\s+$/g,Bt=/^\s+/,Lt=/\s+$/,Dt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Rt=/\{\n\/\* \[wrapped with (.+)\] \*/,Ft=/,? & /,Yt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,zt=/\\(\\)?/g,qt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Xt=/\w*$/,Gt=/^[-+]0x[0-9a-f]+$/i,Wt=/^0b[01]+$/i,Ut=/^\[object .+?Constructor\]$/,Ht=/^0o[0-7]+$/i,Vt=/^(?:0|[1-9]\d*)$/,Zt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qt=/($^)/,$t=/['\n\r\u2028\u2029\\]/g,Kt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Jt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",te="[\\ud800-\\udfff]",ee="["+Jt+"]",ne="["+Kt+"]",re="\\d+",ie="[\\u2700-\\u27bf]",ae="[a-z\\xdf-\\xf6\\xf8-\\xff]",oe="[^\\ud800-\\udfff"+Jt+re+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",se="\\ud83c[\\udffb-\\udfff]",ue="[^\\ud800-\\udfff]",ce="(?:\\ud83c[\\udde6-\\uddff]){2}",fe="[\\ud800-\\udbff][\\udc00-\\udfff]",he="[A-Z\\xc0-\\xd6\\xd8-\\xde]",le="(?:"+ae+"|"+oe+")",de="(?:"+he+"|"+oe+")",pe="(?:"+ne+"|"+se+")"+"?",ge="[\\ufe0e\\ufe0f]?"+pe+("(?:\\u200d(?:"+[ue,ce,fe].join("|")+")[\\ufe0e\\ufe0f]?"+pe+")*"),ve="(?:"+[ie,ce,fe].join("|")+")"+ge,me="(?:"+[ue+ne+"?",ne,ce,fe,te].join("|")+")",ye=RegExp("['’]","g"),xe=RegExp(ne,"g"),be=RegExp(se+"(?="+se+")|"+me+ge,"g"),we=RegExp([he+"?"+ae+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ee,he,"$"].join("|")+")",de+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ee,he+le,"$"].join("|")+")",he+"?"+le+"+(?:['’](?:d|ll|m|re|s|t|ve))?",he+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",re,ve].join("|"),"g"),_e=RegExp("[\\u200d\\ud800-\\udfff"+Kt+"\\ufe0e\\ufe0f]"),Me=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Se=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Pe=-1,Ae={};Ae[ft]=Ae[ht]=Ae[lt]=Ae[dt]=Ae[pt]=Ae[gt]=Ae[vt]=Ae[mt]=Ae[yt]=!0,Ae[z]=Ae[q]=Ae[ut]=Ae[G]=Ae[ct]=Ae[W]=Ae[H]=Ae[V]=Ae[Q]=Ae[$]=Ae[J]=Ae[et]=Ae[nt]=Ae[rt]=Ae[ot]=!1;var ke={};ke[z]=ke[q]=ke[ut]=ke[ct]=ke[G]=ke[W]=ke[ft]=ke[ht]=ke[lt]=ke[dt]=ke[pt]=ke[Q]=ke[$]=ke[J]=ke[et]=ke[nt]=ke[rt]=ke[it]=ke[gt]=ke[vt]=ke[mt]=ke[yt]=!0,ke[H]=ke[V]=ke[ot]=!1;var Ce={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ee=parseFloat,Ie=parseInt,Ne="object"==typeof t&&t&&t.Object===Object&&t,Te="object"==typeof self&&self&&self.Object===Object&&self,Oe=Ne||Te||Function("return this")(),je="object"==typeof e&&e&&!e.nodeType&&e,Be=je&&"object"==typeof r&&r&&!r.nodeType&&r,Le=Be&&Be.exports===je,De=Le&&Ne.process,Re=function(){try{var t=Be&&Be.require&&Be.require("util").types;return t||De&&De.binding&&De.binding("util")}catch(t){}}(),Fe=Re&&Re.isArrayBuffer,Ye=Re&&Re.isDate,ze=Re&&Re.isMap,qe=Re&&Re.isRegExp,Xe=Re&&Re.isSet,Ge=Re&&Re.isTypedArray;function We(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ue(t,e,n,r){for(var i=-1,a=null==t?0:t.length;++i<a;){var o=t[i];e(r,o,n(o),t)}return r}function He(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ve(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ze(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Qe(t,e){for(var n=-1,r=null==t?0:t.length,i=0,a=[];++n<r;){var o=t[n];e(o,n,t)&&(a[i++]=o)}return a}function $e(t,e){return!!(null==t?0:t.length)&&un(t,e,0)>-1}function Ke(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function Je(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function tn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function en(t,e,n,r){var i=-1,a=null==t?0:t.length;for(r&&a&&(n=t[++i]);++i<a;)n=e(n,t[i],i,t);return n}function nn(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function rn(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var an=ln("length");function on(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function sn(t,e,n,r){for(var i=t.length,a=n+(r?1:-1);r?a--:++a<i;)if(e(t[a],a,t))return a;return-1}function un(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):sn(t,fn,n)}function cn(t,e,n,r){for(var i=n-1,a=t.length;++i<a;)if(r(t[i],e))return i;return-1}function fn(t){return t!=t}function hn(t,e){var n=null==t?0:t.length;return n?gn(t,e)/n:L}function ln(t){return function(e){return null==e?a:e[t]}}function dn(t){return function(e){return null==t?a:t[e]}}function pn(t,e,n,r,i){return i(t,function(t,i,a){n=r?(r=!1,t):e(n,t,i,a)}),n}function gn(t,e){for(var n,r=-1,i=t.length;++r<i;){var o=e(t[r]);o!==a&&(n=n===a?o:n+o)}return n}function vn(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function mn(t){return function(e){return t(e)}}function yn(t,e){return Je(e,function(e){return t[e]})}function xn(t,e){return t.has(e)}function bn(t,e){for(var n=-1,r=t.length;++n<r&&un(e,t[n],0)>-1;);return n}function wn(t,e){for(var n=t.length;n--&&un(e,t[n],0)>-1;);return n}var _n=dn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Mn=dn({"&":"&","<":"<",">":">",'"':""","'":"'"});function Sn(t){return"\\"+Ce[t]}function Pn(t){return _e.test(t)}function An(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function kn(t,e){return function(n){return t(e(n))}}function Cn(t,e){for(var n=-1,r=t.length,i=0,a=[];++n<r;){var o=t[n];o!==e&&o!==h||(t[n]=h,a[i++]=n)}return a}function En(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function In(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function Nn(t){return Pn(t)?function(t){var e=be.lastIndex=0;for(;be.test(t);)++e;return e}(t):an(t)}function Tn(t){return Pn(t)?function(t){return t.match(be)||[]}(t):function(t){return t.split("")