@hpcc-js/graph 2.84.1 → 2.84.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/index.es6.js +11 -2
  2. package/dist/index.es6.js.map +1 -1
  3. package/dist/index.js +11 -2
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/package.json +7 -7
  8. package/src/__package__.ts +2 -2
  9. package/src/__tests__/data.ts +444 -0
  10. package/src/__tests__/index.ts +1 -0
  11. package/src/__tests__/test1.ts +18 -0
  12. package/src/__tests__/test2.ts +79 -0
  13. package/src/__tests__/test3.ts +46 -0
  14. package/src/__tests__/test4.ts +66 -0
  15. package/src/__tests__/test5.ts +82 -0
  16. package/src/graph2/graphT.ts +7 -2
  17. package/src/graph2/layouts/placeholders.ts +4 -0
  18. package/types/__package__.d.ts +2 -2
  19. package/types/__package__.d.ts.map +1 -1
  20. package/types/__tests__/data.d.ts +9 -0
  21. package/types/__tests__/data.d.ts.map +1 -0
  22. package/types/__tests__/index.d.ts +2 -0
  23. package/types/__tests__/index.d.ts.map +1 -0
  24. package/types/__tests__/test1.d.ts +5 -0
  25. package/types/__tests__/test1.d.ts.map +1 -0
  26. package/types/__tests__/test2.d.ts +5 -0
  27. package/types/__tests__/test2.d.ts.map +1 -0
  28. package/types/__tests__/test3.d.ts +5 -0
  29. package/types/__tests__/test3.d.ts.map +1 -0
  30. package/types/__tests__/test4.d.ts +5 -0
  31. package/types/__tests__/test4.d.ts.map +1 -0
  32. package/types/__tests__/test5.d.ts +5 -0
  33. package/types/__tests__/test5.d.ts.map +1 -0
  34. package/types/graph2/graphT.d.ts.map +1 -1
  35. package/types/graph2/layouts/placeholders.d.ts +1 -0
  36. package/types/graph2/layouts/placeholders.d.ts.map +1 -1
  37. package/types-3.4/__package__.d.ts +2 -2
  38. package/types-3.4/__tests__/data.d.ts +9 -0
  39. package/types-3.4/__tests__/index.d.ts +2 -0
  40. package/types-3.4/__tests__/test1.d.ts +5 -0
  41. package/types-3.4/__tests__/test2.d.ts +5 -0
  42. package/types-3.4/__tests__/test3.d.ts +5 -0
  43. package/types-3.4/__tests__/test4.d.ts +5 -0
  44. package/types-3.4/__tests__/test5.d.ts +5 -0
  45. package/types-3.4/graph2/layouts/placeholders.d.ts +1 -0
package/dist/index.min.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@hpcc-js/common"),require("@hpcc-js/util"),require("@hpcc-js/api"),require("@hpcc-js/react"),require("@hpcc-js/html")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common","@hpcc-js/util","@hpcc-js/api","@hpcc-js/react","@hpcc-js/html"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@hpcc-js/graph"]={},e["@hpcc-js/common"],e["@hpcc-js/util"],e["@hpcc-js/api"],e["@hpcc-js/react"],e["@hpcc-js/html"])}(this,(function(e,t,r,n,o,i){"use strict";var a=function(e,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},a(e,t)};function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var u=function(){return u=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},u.apply(this,arguments)};function c(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function h(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var f=Math.PI,d=2*f,p=1e-6,g=d-p;function v(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function y(){return new v}function _(e){return function(){return e}}v.prototype=y.prototype={constructor:v,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(e,t,r,n,o,i){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+o)+","+(this._y1=+i)},arcTo:function(e,t,r,n,o){e=+e,t=+t,r=+r,n=+n,o=+o;var i=this._x1,a=this._y1,s=r-e,u=n-t,c=i-e,h=a-t,l=c*c+h*h;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(l>p)if(Math.abs(h*s-u*c)>p&&o){var d=r-i,g=n-a,v=s*s+u*u,y=d*d+g*g,_=Math.sqrt(v),m=Math.sqrt(l),b=o*Math.tan((f-Math.acos((v+l-y)/(2*_*m)))/2),x=b/m,w=b/_;Math.abs(x-1)>p&&(this._+="L"+(e+x*c)+","+(t+x*h)),this._+="A"+o+","+o+",0,0,"+ +(h*d>c*g)+","+(this._x1=e+w*s)+","+(this._y1=t+w*u)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,r,n,o,i){e=+e,t=+t,i=!!i;var a=(r=+r)*Math.cos(n),s=r*Math.sin(n),u=e+a,c=t+s,h=1^i,l=i?n-o:o-n;if(r<0)throw new Error("negative radius: "+r);null===this._x1?this._+="M"+u+","+c:(Math.abs(this._x1-u)>p||Math.abs(this._y1-c)>p)&&(this._+="L"+u+","+c),r&&(l<0&&(l=l%d+d),l>g?this._+="A"+r+","+r+",0,1,"+h+","+(e-a)+","+(t-s)+"A"+r+","+r+",0,1,"+h+","+(this._x1=u)+","+(this._y1=c):l>p&&(this._+="A"+r+","+r+",0,"+ +(l>=f)+","+h+","+(this._x1=e+r*Math.cos(o))+","+(this._y1=t+r*Math.sin(o))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};function m(e){this._context=e}function b(e){return new m(e)}function x(e){return e[0]}function w(e){return e[1]}function E(){var e=x,t=w,r=_(!0),n=null,o=b,i=null;function a(a){var s,u,c,h=a.length,l=!1;for(null==n&&(i=o(c=y())),s=0;s<=h;++s)!(s<h&&r(u=a[s],s,a))===l&&((l=!l)?i.lineStart():i.lineEnd()),l&&i.point(+e(u,s,a),+t(u,s,a));if(c)return i=null,c+""||null}return a.x=function(t){return arguments.length?(e="function"==typeof t?t:_(+t),a):e},a.y=function(e){return arguments.length?(t="function"==typeof e?e:_(+e),a):t},a.defined=function(e){return arguments.length?(r="function"==typeof e?e:_(!!e),a):r},a.curve=function(e){return arguments.length?(o=e,null!=n&&(i=o(n)),a):o},a.context=function(e){return arguments.length?(null==e?n=i=null:i=o(n=e),a):n},a}m.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var k=Array.prototype.slice;function S(e){return e.source}function D(e){return e.target}function j(e,t,r,n,o){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,o,n,o)}function C(){return function(e){var t=S,r=D,n=x,o=w,i=null;function a(){var a,s=k.call(arguments),u=t.apply(this,s),c=r.apply(this,s);if(i||(i=a=y()),e(i,+n.apply(this,(s[0]=u,s)),+o.apply(this,s),+n.apply(this,(s[0]=c,s)),+o.apply(this,s)),a)return i=null,a+""||null}return a.source=function(e){return arguments.length?(t=e,a):t},a.target=function(e){return arguments.length?(r=e,a):r},a.x=function(e){return arguments.length?(n="function"==typeof e?e:_(+e),a):n},a.y=function(e){return arguments.length?(o="function"==typeof e?e:_(+e),a):o},a.context=function(e){return arguments.length?(i=null==e?null:e,a):i},a}(j)}function A(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function O(e){this._context=e}function I(e){return new O(e)}function P(e,t){this._basis=new O(e),this._beta=t}O.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:A(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:A(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},P.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var n,o=e[0],i=t[0],a=e[r]-o,s=t[r]-i,u=-1;++u<=r;)n=u/r,this._basis.point(this._beta*e[u]+(1-this._beta)*(o+n*a),this._beta*t[u]+(1-this._beta)*(i+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};(function e(t){function r(e){return 1===t?new O(e):new P(e,t)}return r.beta=function(t){return e(+t)},r})(.85);function F(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function M(e,t){this._context=e,this._k=(1-t)/6}M.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:F(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:F(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var T=function e(t){function r(e){return new M(e,t)}return r.tension=function(t){return e(+t)},r}(0);function N(e,t){this._context=e,this._alpha=t}N.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:!function(e,t,r){var n=e._x1,o=e._y1,i=e._x2,a=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,o=(o*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>1e-12){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);i=(i*c+e._x1*e._l23_2a-t*e._l12_2a)/h,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(n,o,i,a,e._x2,e._y2)}(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};(function e(t){function r(e){return t?new N(e,t):new M(e,0)}return r.alpha=function(t){return e(+t)},r})(.5);function L(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}L(".graph_Edge{fill:none;stroke:#656565;stroke-width:1px}.graph_Edge .common_TextBox .common_Text{fill:#000;stroke:none}.graph_Edge .common_TextBox .common_Shape{fill:#fff;stroke:none}.graph_Edge.selected{stroke:red!important}.graph_Edge.selected .common_Text{fill:red!important}");var B=I,R=function(e){function r(){var r=e.call(this)||this;return r._points=[],r._weight=100,r._strokeDasharray=null,r._hidden=!1,r._textBox=(new t.TextBox).padding(0),r}return s(r,e),r.prototype.graphID=function(e){return arguments.length?(this._graphID=e,this):this._graphID},r.prototype.sourceVertex=function(e){return arguments.length?(this._sourceVertex=e,this):this._sourceVertex},r.prototype.targetVertex=function(e){return arguments.length?(this._targetVertex=e,this):this._targetVertex},r.prototype.weight=function(e){return arguments.length?(this._weight=e,this):this._weight},r.prototype.points=function(e,t,r){return arguments.length?(this._points=e,this._elementPath&&this.update(null,this._element,t,r),this):this._points},r.prototype.hidden=function(e){return arguments.length?(this._hidden=e,this):this._hidden},r.prototype.text=function(e){return arguments.length?(this._textBox.text(e),this):this._textBox.text()},r.prototype.enter=function(t,r){e.prototype.enter.call(this,t,r),this._elementPath=r.append("path"),this._textBox.text()&&this._textBox.target(t).tooltip(this.tooltip()).render()},r.prototype.update=function(r,n,o,i){e.prototype.update.call(this,r,n);var a=this;t.Platform.svgMarkerGlitch&&!i&&n.transition().duration((o||0)+100).on("start",(function(){a._pushMarkers(n)})).on("end",(function(){a._popMarkers(n)}));var s=a._calculateEdgePoints(this._sourceVertex,this._targetVertex,this._points),u=n.selectAll(".point2").data(this.showControlPoints()?s:[]);u.enter().append("circle").attr("class","point2").style("stroke","red").merge(u).attr("cx",(function(e){return e.x})).attr("cy",(function(e){return e.y})).attr("r",1),u.exit().remove();var c=E().x((function(e){return e.x})).y((function(e){return e.y})).curve(B)(s),h=this._elementPath;o&&(h=h.transition().duration(o)),h.attr("opacity",this._hidden?0:1).attr("marker-start",t.Platform.svgMarkerGlitch&&i||!this.sourceMarker_exists()?null:"url(#"+this._graphID+"_"+this.sourceMarker()+"Foot)").attr("marker-end",t.Platform.svgMarkerGlitch&&i||!this.targetMarker_exists()?null:"url(#"+this._graphID+"_"+this.targetMarker()+"Head)").attr("stroke",this.strokeColor_exists()?this.strokeColor():null).attr("stroke-dasharray",this.strokeDasharray_exists()?this.strokeDasharray():null).attr("d",c),this._textBox.text()&&this._textBox.tooltip(this.tooltip()).move(this._findMidPoint(s),o)},r.prototype.exit=function(t,r){this._textBox&&this._textBox.target(null),e.prototype.exit.call(this,t,r)},r.prototype._findMidPoint=function(e){var t=e.length/2;if(e.length%2)return e[Math.floor(t)];if(e.length){var r=e[t-1],n=e[t];return{x:(r.x+n.x)/2,y:(r.y+n.y)/2}}return{x:0,y:0}},r.prototype._calculateEdgePoints=function(e,t,r){if(!e||!t)return[{x:0,y:0},{x:0,y:0}];var n=r?r.filter((function(r){return!e.contains(r)&&!t.contains(r)})):[],o=0===n.length?t.pos():n[0],i=0===n.length?e.pos():n[n.length-1];if(n.unshift(e.intersection(e._pos,o)),n.push(t.intersection(t._pos,i)),n[0]||(n[0]=e._pos),n[n.length-1]||(n[n.length-1]=t._pos),(!r||0===r.length)&&2===n.length&&n[0]&&n[1]){var a=n[0].x-n[1].x,s=n[0].y-n[1].y;if(Math.sqrt(a*a+s*s))if(this.showArc()){var u=(n[0].x+n[1].x)/2-s*this.arcDepth()/100,c=(n[0].y+n[1].y)/2+a*this.arcDepth()/100;n=[{x:n[0].x,y:n[0].y},{x:u,y:c},{x:n[1].x,y:n[1].y}]}else n=[{x:n[0].x,y:n[0].y},{x:n[1].x,y:n[1].y}]}return n},r}(t.SVGWidget);R.prototype._class+=" graph_Edge",R.prototype.publish("arcDepth",16,"number","Arc Depth",null,{tags:["Basic"]}),R.prototype.publish("showControlPoints",!1,"boolean","Show/Hide Control Points",null,{tags:["Basic"]}),R.prototype.publish("showArc",!0,"boolean","Show/Hide Arc",null,{tags:["Basic"]}),R.prototype.publish("tooltip","","string","Tooltip",null,{tags:["Private"]}),R.prototype.publish("sourceMarker","circle","set","Source Marker",["none","circle"],{optional:!0}),R.prototype.publish("targetMarker","arrow","set","Source Marker",["none","arrow","circle"],{optional:!0}),R.prototype.publish("strokeDasharray",null,"string","Stroke Dash Array",null,{optional:!0}),R.prototype.publish("strokeColor",null,"html-color","Stroke Color",null,{optional:!0}),R.prototype.publish("textColor",null,"html-color","Text Color",null,{optional:!0}),R.prototype.publishProxy("text_shape_colorFill","_textBox","shape_colorFill"),R.prototype.publishProxy("text_shape_colorStroke","_textBox","shape_colorStroke"),R.prototype.publishProxy("text_text_colorFill","_textBox","text_colorFill");var V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var z=function(){this.__data__=[],this.size=0};var G=function(e,t){return e===t||e!=e&&t!=t},U=G;var H=function(e,t){for(var r=e.length;r--;)if(U(e[r][0],t))return r;return-1},q=H,W=Array.prototype.splice;var Y=function(e){var t=this.__data__,r=q(t,e);return!(r<0)&&(r==t.length-1?t.pop():W.call(t,r,1),--this.size,!0)},K=H;var Z=function(e){var t=this.__data__,r=K(t,e);return r<0?void 0:t[r][1]},$=H;var Q=H;var X=function(e,t){var r=this.__data__,n=Q(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},J=z,ee=Y,te=Z,re=function(e){return $(this.__data__,e)>-1},ne=X;function oe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}oe.prototype.clear=J,oe.prototype.delete=ee,oe.prototype.get=te,oe.prototype.has=re,oe.prototype.set=ne;var ie=oe,ae=ie;var se=function(){this.__data__=new ae,this.size=0};var ue=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r};var ce=function(e){return this.__data__.get(e)};var he=function(e){return this.__data__.has(e)},le="object"==typeof V&&V&&V.Object===Object&&V,fe=le,de="object"==typeof self&&self&&self.Object===Object&&self,pe=fe||de||Function("return this")(),ge=pe.Symbol,ve=ge,ye=Object.prototype,_e=ye.hasOwnProperty,me=ye.toString,be=ve?ve.toStringTag:void 0;var xe=function(e){var t=_e.call(e,be),r=e[be];try{e[be]=void 0;var n=!0}catch(e){}var o=me.call(e);return n&&(t?e[be]=r:delete e[be]),o},we=Object.prototype.toString;var Ee=function(e){return we.call(e)},ke=xe,Se=Ee,De=ge?ge.toStringTag:void 0;var je=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":De&&De in Object(e)?ke(e):Se(e)};var Ce=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},Ae=je,Oe=Ce;var Ie,Pe=function(e){if(!Oe(e))return!1;var t=Ae(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Fe=pe["__core-js_shared__"],Me=(Ie=/[^.]+$/.exec(Fe&&Fe.keys&&Fe.keys.IE_PROTO||""))?"Symbol(src)_1."+Ie:"";var Te=function(e){return!!Me&&Me in e},Ne=Function.prototype.toString;var Le=function(e){if(null!=e){try{return Ne.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Be=Pe,Re=Te,Ve=Ce,ze=Le,Ge=/^\[object .+?Constructor\]$/,Ue=Function.prototype,He=Object.prototype,qe=Ue.toString,We=He.hasOwnProperty,Ye=RegExp("^"+qe.call(We).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Ke=function(e){return!(!Ve(e)||Re(e))&&(Be(e)?Ye:Ge).test(ze(e))};var Ze=Ke,$e=function(e,t){return null==e?void 0:e[t]};var Qe=function(e,t){var r=$e(e,t);return Ze(r)?r:void 0},Xe=Qe(pe,"Map"),Je=Qe(Object,"create"),et=Je;var tt=function(){this.__data__=et?et(null):{},this.size=0};var rt=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},nt=Je,ot=Object.prototype.hasOwnProperty;var it=function(e){var t=this.__data__;if(nt){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return ot.call(t,e)?t[e]:void 0},at=Je,st=Object.prototype.hasOwnProperty;var ut=Je;var ct=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ut&&void 0===t?"__lodash_hash_undefined__":t,this},ht=tt,lt=rt,ft=it,dt=function(e){var t=this.__data__;return at?void 0!==t[e]:st.call(t,e)},pt=ct;function gt(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}gt.prototype.clear=ht,gt.prototype.delete=lt,gt.prototype.get=ft,gt.prototype.has=dt,gt.prototype.set=pt;var vt=gt,yt=ie,_t=Xe;var mt=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},bt=mt;var xt=function(e,t){var r=e.__data__;return bt(t)?r["string"==typeof t?"string":"hash"]:r.map},wt=xt;var Et=xt;var kt=xt;var St=xt;var Dt=function(e,t){var r=St(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},jt=function(){this.size=0,this.__data__={hash:new vt,map:new(_t||yt),string:new vt}},Ct=function(e){var t=wt(this,e).delete(e);return this.size-=t?1:0,t},At=function(e){return Et(this,e).get(e)},Ot=function(e){return kt(this,e).has(e)},It=Dt;function Pt(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Pt.prototype.clear=jt,Pt.prototype.delete=Ct,Pt.prototype.get=At,Pt.prototype.has=Ot,Pt.prototype.set=It;var Ft=Pt,Mt=ie,Tt=Xe,Nt=Ft;var Lt=function(e,t){var r=this.__data__;if(r instanceof Mt){var n=r.__data__;if(!Tt||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Nt(n)}return r.set(e,t),this.size=r.size,this},Bt=ie,Rt=se,Vt=ue,zt=ce,Gt=he,Ut=Lt;function Ht(e){var t=this.__data__=new Bt(e);this.size=t.size}Ht.prototype.clear=Rt,Ht.prototype.delete=Vt,Ht.prototype.get=zt,Ht.prototype.has=Gt,Ht.prototype.set=Ut;var qt=Ht;var Wt=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e},Yt=Qe,Kt=function(){try{var e=Yt(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Zt=Kt;var $t=function(e,t,r){"__proto__"==t&&Zt?Zt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},Qt=$t,Xt=G,Jt=Object.prototype.hasOwnProperty;var er=function(e,t,r){var n=e[t];Jt.call(e,t)&&Xt(n,r)&&(void 0!==r||t in e)||Qt(e,t,r)},tr=er,rr=$t;var nr=function(e,t,r,n){var o=!r;r||(r={});for(var i=-1,a=t.length;++i<a;){var s=t[i],u=n?n(r[s],e[s],s,r,e):void 0;void 0===u&&(u=e[s]),o?rr(r,s,u):tr(r,s,u)}return r};var or=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n};var ir=function(e){return null!=e&&"object"==typeof e},ar=je,sr=ir;var ur=function(e){return sr(e)&&"[object Arguments]"==ar(e)},cr=ur,hr=ir,lr=Object.prototype,fr=lr.hasOwnProperty,dr=lr.propertyIsEnumerable,pr=cr(function(){return arguments}())?cr:function(e){return hr(e)&&fr.call(e,"callee")&&!dr.call(e,"callee")},gr=pr,vr=Array.isArray,yr={exports:{}};var _r=function(){return!1};!function(e,t){var r=pe,n=_r,o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?r.Buffer:void 0,s=(a?a.isBuffer:void 0)||n;e.exports=s}(yr,yr.exports);var mr=/^(?:0|[1-9]\d*)$/;var br=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&mr.test(e))&&e>-1&&e%1==0&&e<t};var xr=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},wr=je,Er=xr,kr=ir,Sr={};Sr["[object Float32Array]"]=Sr["[object Float64Array]"]=Sr["[object Int8Array]"]=Sr["[object Int16Array]"]=Sr["[object Int32Array]"]=Sr["[object Uint8Array]"]=Sr["[object Uint8ClampedArray]"]=Sr["[object Uint16Array]"]=Sr["[object Uint32Array]"]=!0,Sr["[object Arguments]"]=Sr["[object Array]"]=Sr["[object ArrayBuffer]"]=Sr["[object Boolean]"]=Sr["[object DataView]"]=Sr["[object Date]"]=Sr["[object Error]"]=Sr["[object Function]"]=Sr["[object Map]"]=Sr["[object Number]"]=Sr["[object Object]"]=Sr["[object RegExp]"]=Sr["[object Set]"]=Sr["[object String]"]=Sr["[object WeakMap]"]=!1;var Dr=function(e){return kr(e)&&Er(e.length)&&!!Sr[wr(e)]};var jr=function(e){return function(t){return e(t)}},Cr={exports:{}};!function(e,t){var r=le,n=t&&!t.nodeType&&t,o=n&&e&&!e.nodeType&&e,i=o&&o.exports===n&&r.process,a=function(){try{var e=o&&o.require&&o.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=a}(Cr,Cr.exports);var Ar=Dr,Or=jr,Ir=Cr.exports,Pr=Ir&&Ir.isTypedArray,Fr=Pr?Or(Pr):Ar,Mr=or,Tr=gr,Nr=vr,Lr=yr.exports,Br=br,Rr=Fr,Vr=Object.prototype.hasOwnProperty;var zr=function(e,t){var r=Nr(e),n=!r&&Tr(e),o=!r&&!n&&Lr(e),i=!r&&!n&&!o&&Rr(e),a=r||n||o||i,s=a?Mr(e.length,String):[],u=s.length;for(var c in e)!t&&!Vr.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Br(c,u))||s.push(c);return s},Gr=Object.prototype;var Ur=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Gr)};var Hr=function(e,t){return function(r){return e(t(r))}},qr=Hr(Object.keys,Object),Wr=Ur,Yr=qr,Kr=Object.prototype.hasOwnProperty;var Zr=function(e){if(!Wr(e))return Yr(e);var t=[];for(var r in Object(e))Kr.call(e,r)&&"constructor"!=r&&t.push(r);return t},$r=Pe,Qr=xr;var Xr=function(e){return null!=e&&Qr(e.length)&&!$r(e)},Jr=zr,en=Zr,tn=Xr;var rn=function(e){return tn(e)?Jr(e):en(e)},nn=nr,on=rn;var an=function(e,t){return e&&nn(t,on(t),e)};var sn=Ce,un=Ur,cn=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t},hn=Object.prototype.hasOwnProperty;var ln=zr,fn=function(e){if(!sn(e))return cn(e);var t=un(e),r=[];for(var n in e)("constructor"!=n||!t&&hn.call(e,n))&&r.push(n);return r},dn=Xr;var pn=function(e){return dn(e)?ln(e,!0):fn(e)},gn=nr,vn=pn;var yn=function(e,t){return e&&gn(t,vn(t),e)},_n={exports:{}};!function(e,t){var r=pe,n=t&&!t.nodeType&&t,o=n&&e&&!e.nodeType&&e,i=o&&o.exports===n?r.Buffer:void 0,a=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=a?a(r):new e.constructor(r);return e.copy(n),n}}(_n,_n.exports);var mn=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t};var bn=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i};var xn=function(){return[]},wn=bn,En=xn,kn=Object.prototype.propertyIsEnumerable,Sn=Object.getOwnPropertySymbols,Dn=Sn?function(e){return null==e?[]:(e=Object(e),wn(Sn(e),(function(t){return kn.call(e,t)})))}:En,jn=nr,Cn=Dn;var An=function(e,t){return jn(e,Cn(e),t)};var On=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e},In=Hr(Object.getPrototypeOf,Object),Pn=On,Fn=In,Mn=Dn,Tn=xn,Nn=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Pn(t,Mn(e)),e=Fn(e);return t}:Tn,Ln=nr,Bn=Nn;var Rn=function(e,t){return Ln(e,Bn(e),t)},Vn=On,zn=vr;var Gn=function(e,t,r){var n=t(e);return zn(e)?n:Vn(n,r(e))},Un=Gn,Hn=Dn,qn=rn;var Wn=function(e){return Un(e,qn,Hn)},Yn=Gn,Kn=Nn,Zn=pn;var $n=function(e){return Yn(e,Zn,Kn)},Qn=Qe(pe,"DataView"),Xn=Qe(pe,"Promise"),Jn=Qe(pe,"Set"),eo=Qn,to=Xe,ro=Xn,no=Jn,oo=Qe(pe,"WeakMap"),io=je,ao=Le,so="[object Map]",uo="[object Promise]",co="[object Set]",ho="[object WeakMap]",lo="[object DataView]",fo=ao(eo),po=ao(to),go=ao(ro),vo=ao(no),yo=ao(oo),_o=io;(eo&&_o(new eo(new ArrayBuffer(1)))!=lo||to&&_o(new to)!=so||ro&&_o(ro.resolve())!=uo||no&&_o(new no)!=co||oo&&_o(new oo)!=ho)&&(_o=function(e){var t=io(e),r="[object Object]"==t?e.constructor:void 0,n=r?ao(r):"";if(n)switch(n){case fo:return lo;case po:return so;case go:return uo;case vo:return co;case yo:return ho}return t});var mo=_o,bo=Object.prototype.hasOwnProperty;var xo=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&bo.call(e,"index")&&(r.index=e.index,r.input=e.input),r},wo=pe.Uint8Array,Eo=wo;var ko=function(e){var t=new e.constructor(e.byteLength);return new Eo(t).set(new Eo(e)),t},So=ko;var Do=function(e,t){var r=t?So(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)},jo=/\w*$/;var Co=function(e){var t=new e.constructor(e.source,jo.exec(e));return t.lastIndex=e.lastIndex,t},Ao=ge?ge.prototype:void 0,Oo=Ao?Ao.valueOf:void 0;var Io=ko;var Po=function(e,t){var r=t?Io(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)},Fo=ko,Mo=Do,To=Co,No=function(e){return Oo?Object(Oo.call(e)):{}},Lo=Po;var Bo=function(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return Fo(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return Mo(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Lo(e,r);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(e);case"[object RegExp]":return To(e);case"[object Symbol]":return No(e)}},Ro=Ce,Vo=Object.create,zo=function(){function e(){}return function(t){if(!Ro(t))return{};if(Vo)return Vo(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),Go=zo,Uo=In,Ho=Ur;var qo=function(e){return"function"!=typeof e.constructor||Ho(e)?{}:Go(Uo(e))},Wo=mo,Yo=ir;var Ko=function(e){return Yo(e)&&"[object Map]"==Wo(e)},Zo=Ko,$o=jr,Qo=Cr.exports,Xo=Qo&&Qo.isMap,Jo=Xo?$o(Xo):Zo,ei=mo,ti=ir;var ri=function(e){return ti(e)&&"[object Set]"==ei(e)},ni=ri,oi=jr,ii=Cr.exports,ai=ii&&ii.isSet,si=ai?oi(ai):ni,ui=qt,ci=Wt,hi=er,li=an,fi=yn,di=_n.exports,pi=mn,gi=An,vi=Rn,yi=Wn,_i=$n,mi=mo,bi=xo,xi=Bo,wi=qo,Ei=vr,ki=yr.exports,Si=Jo,Di=Ce,ji=si,Ci=rn,Ai=pn,Oi="[object Arguments]",Ii="[object Function]",Pi="[object Object]",Fi={};Fi[Oi]=Fi["[object Array]"]=Fi["[object ArrayBuffer]"]=Fi["[object DataView]"]=Fi["[object Boolean]"]=Fi["[object Date]"]=Fi["[object Float32Array]"]=Fi["[object Float64Array]"]=Fi["[object Int8Array]"]=Fi["[object Int16Array]"]=Fi["[object Int32Array]"]=Fi["[object Map]"]=Fi["[object Number]"]=Fi[Pi]=Fi["[object RegExp]"]=Fi["[object Set]"]=Fi["[object String]"]=Fi["[object Symbol]"]=Fi["[object Uint8Array]"]=Fi["[object Uint8ClampedArray]"]=Fi["[object Uint16Array]"]=Fi["[object Uint32Array]"]=!0,Fi["[object Error]"]=Fi[Ii]=Fi["[object WeakMap]"]=!1;var Mi=function e(t,r,n,o,i,a){var s,u=1&r,c=2&r,h=4&r;if(n&&(s=i?n(t,o,i,a):n(t)),void 0!==s)return s;if(!Di(t))return t;var l=Ei(t);if(l){if(s=bi(t),!u)return pi(t,s)}else{var f=mi(t),d=f==Ii||"[object GeneratorFunction]"==f;if(ki(t))return di(t,u);if(f==Pi||f==Oi||d&&!i){if(s=c||d?{}:wi(t),!u)return c?vi(t,fi(s,t)):gi(t,li(s,t))}else{if(!Fi[f])return i?t:{};s=xi(t,f,u)}}a||(a=new ui);var p=a.get(t);if(p)return p;a.set(t,s),ji(t)?t.forEach((function(o){s.add(e(o,r,n,o,t,a))})):Si(t)&&t.forEach((function(o,i){s.set(i,e(o,r,n,i,t,a))}));var g=l?void 0:(h?c?_i:yi:c?Ai:Ci)(t);return ci(g||t,(function(o,i){g&&(o=t[i=o]),hi(s,i,e(o,r,n,i,t,a))})),s},Ti=Mi;var Ni=function(e){return Ti(e,4)};var Li=function(e){return function(){return e}};var Bi=function(e){return function(t,r,n){for(var o=-1,i=Object(t),a=n(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===r(i[u],u,i))break}return t}},Ri=Bi(),Vi=Ri,zi=rn;var Gi=function(e,t){return e&&Vi(e,t,zi)},Ui=Xr;var Hi=function(e,t){return function(r,n){if(null==r)return r;if(!Ui(r))return e(r,n);for(var o=r.length,i=t?o:-1,a=Object(r);(t?i--:++i<o)&&!1!==n(a[i],i,a););return r}},qi=Hi(Gi);var Wi=function(e){return e},Yi=Wi;var Ki=function(e){return"function"==typeof e?e:Yi},Zi=Wt,$i=qi,Qi=Ki,Xi=vr;var Ji=function(e,t){return(Xi(e)?Zi:$i)(e,Qi(t))},ea=Ji,ta=qi;var ra=function(e,t){var r=[];return ta(e,(function(e,n,o){t(e,n,o)&&r.push(e)})),r};var na=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var oa=function(e){return this.__data__.has(e)},ia=Ft,aa=na,sa=oa;function ua(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new ia;++t<r;)this.add(e[t])}ua.prototype.add=ua.prototype.push=aa,ua.prototype.has=sa;var ca=ua;var ha=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1};var la=function(e,t){return e.has(t)},fa=ca,da=ha,pa=la;var ga=function(e,t,r,n,o,i){var a=1&r,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=i.get(e),h=i.get(t);if(c&&h)return c==t&&h==e;var l=-1,f=!0,d=2&r?new fa:void 0;for(i.set(e,t),i.set(t,e);++l<s;){var p=e[l],g=t[l];if(n)var v=a?n(g,p,l,t,e,i):n(p,g,l,e,t,i);if(void 0!==v){if(v)continue;f=!1;break}if(d){if(!da(t,(function(e,t){if(!pa(d,t)&&(p===e||o(p,e,r,n,i)))return d.push(t)}))){f=!1;break}}else if(p!==g&&!o(p,g,r,n,i)){f=!1;break}}return i.delete(e),i.delete(t),f};var va=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r};var ya=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r},_a=wo,ma=G,ba=ga,xa=va,wa=ya,Ea=ge?ge.prototype:void 0,ka=Ea?Ea.valueOf:void 0;var Sa=function(e,t,r,n,o,i,a){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new _a(e),new _a(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ma(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=xa;case"[object Set]":var u=1&n;if(s||(s=wa),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;n|=2,a.set(e,t);var h=ba(s(e),s(t),n,o,i,a);return a.delete(e),h;case"[object Symbol]":if(ka)return ka.call(e)==ka.call(t)}return!1},Da=Wn,ja=Object.prototype.hasOwnProperty;var Ca=function(e,t,r,n,o,i){var a=1&r,s=Da(e),u=s.length;if(u!=Da(t).length&&!a)return!1;for(var c=u;c--;){var h=s[c];if(!(a?h in t:ja.call(t,h)))return!1}var l=i.get(e),f=i.get(t);if(l&&f)return l==t&&f==e;var d=!0;i.set(e,t),i.set(t,e);for(var p=a;++c<u;){var g=e[h=s[c]],v=t[h];if(n)var y=a?n(v,g,h,t,e,i):n(g,v,h,e,t,i);if(!(void 0===y?g===v||o(g,v,r,n,i):y)){d=!1;break}p||(p="constructor"==h)}if(d&&!p){var _=e.constructor,m=t.constructor;_==m||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof m&&m instanceof m||(d=!1)}return i.delete(e),i.delete(t),d},Aa=qt,Oa=ga,Ia=Sa,Pa=Ca,Fa=mo,Ma=vr,Ta=yr.exports,Na=Fr,La="[object Arguments]",Ba="[object Array]",Ra="[object Object]",Va=Object.prototype.hasOwnProperty;var za=function(e,t,r,n,o,i){var a=Ma(e),s=Ma(t),u=a?Ba:Fa(e),c=s?Ba:Fa(t),h=(u=u==La?Ra:u)==Ra,l=(c=c==La?Ra:c)==Ra,f=u==c;if(f&&Ta(e)){if(!Ta(t))return!1;a=!0,h=!1}if(f&&!h)return i||(i=new Aa),a||Na(e)?Oa(e,t,r,n,o,i):Ia(e,t,u,r,n,o,i);if(!(1&r)){var d=h&&Va.call(e,"__wrapped__"),p=l&&Va.call(t,"__wrapped__");if(d||p){var g=d?e.value():e,v=p?t.value():t;return i||(i=new Aa),o(g,v,r,n,i)}}return!!f&&(i||(i=new Aa),Pa(e,t,r,n,o,i))},Ga=ir;var Ua=function e(t,r,n,o,i){return t===r||(null==t||null==r||!Ga(t)&&!Ga(r)?t!=t&&r!=r:za(t,r,n,o,e,i))},Ha=qt,qa=Ua;var Wa=function(e,t,r,n){var o=r.length,i=o,a=!n;if(null==e)return!i;for(e=Object(e);o--;){var s=r[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var u=(s=r[o])[0],c=e[u],h=s[1];if(a&&s[2]){if(void 0===c&&!(u in e))return!1}else{var l=new Ha;if(n)var f=n(c,h,u,e,t,l);if(!(void 0===f?qa(h,c,3,n,l):f))return!1}}return!0},Ya=Ce;var Ka=function(e){return e==e&&!Ya(e)},Za=Ka,$a=rn;var Qa=function(e){for(var t=$a(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Za(o)]}return t};var Xa=function(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}},Ja=Wa,es=Qa,ts=Xa;var rs=function(e){var t=es(e);return 1==t.length&&t[0][2]?ts(t[0][0],t[0][1]):function(r){return r===e||Ja(r,e,t)}},ns=je,os=ir;var is=function(e){return"symbol"==typeof e||os(e)&&"[object Symbol]"==ns(e)},as=vr,ss=is,us=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cs=/^\w*$/;var hs=function(e,t){if(as(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!ss(e))||(cs.test(e)||!us.test(e)||null!=t&&e in Object(t))},ls=Ft;function fs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(fs.Cache||ls),r}fs.Cache=ls;var ds=fs;var ps=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gs=/\\(\\)?/g,vs=function(e){var t=ds(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ps,(function(e,r,n,o){t.push(n?o.replace(gs,"$1"):r||e)})),t}));var ys=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o},_s=ys,ms=vr,bs=is,xs=ge?ge.prototype:void 0,ws=xs?xs.toString:void 0;var Es=function e(t){if("string"==typeof t)return t;if(ms(t))return _s(t,e)+"";if(bs(t))return ws?ws.call(t):"";var r=t+"";return"0"==r&&1/t==-Infinity?"-0":r},ks=Es;var Ss=function(e){return null==e?"":ks(e)},Ds=vr,js=hs,Cs=vs,As=Ss;var Os=function(e,t){return Ds(e)?e:js(e,t)?[e]:Cs(As(e))},Is=is;var Ps=function(e){if("string"==typeof e||Is(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t},Fs=Os,Ms=Ps;var Ts=function(e,t){for(var r=0,n=(t=Fs(t,e)).length;null!=e&&r<n;)e=e[Ms(t[r++])];return r&&r==n?e:void 0},Ns=Ts;var Ls=function(e,t,r){var n=null==e?void 0:Ns(e,t);return void 0===n?r:n};var Bs=Os,Rs=gr,Vs=vr,zs=br,Gs=xr,Us=Ps;var Hs=function(e,t,r){for(var n=-1,o=(t=Bs(t,e)).length,i=!1;++n<o;){var a=Us(t[n]);if(!(i=null!=e&&r(e,a)))break;e=e[a]}return i||++n!=o?i:!!(o=null==e?0:e.length)&&Gs(o)&&zs(a,o)&&(Vs(e)||Rs(e))},qs=function(e,t){return null!=e&&t in Object(e)},Ws=Hs;var Ys=function(e,t){return null!=e&&Ws(e,t,qs)},Ks=Ua,Zs=Ls,$s=Ys,Qs=hs,Xs=Ka,Js=Xa,eu=Ps;var tu=function(e,t){return Qs(e)&&Xs(t)?Js(eu(e),t):function(r){var n=Zs(r,e);return void 0===n&&n===t?$s(r,e):Ks(t,n,3)}};var ru=function(e){return function(t){return null==t?void 0:t[e]}},nu=Ts;var ou=function(e){return function(t){return nu(t,e)}},iu=ru,au=ou,su=hs,uu=Ps;var cu=function(e){return su(e)?iu(uu(e)):au(e)},hu=rs,lu=tu,fu=Wi,du=vr,pu=cu;var gu=function(e){return"function"==typeof e?e:null==e?fu:"object"==typeof e?du(e)?lu(e[0],e[1]):hu(e):pu(e)},vu=bn,yu=ra,_u=gu,mu=vr;var bu=function(e,t){return(mu(e)?vu:yu)(e,_u(t))},xu=Object.prototype.hasOwnProperty;var wu=function(e,t){return null!=e&&xu.call(e,t)},Eu=Hs;var ku=function(e,t){return null!=e&&Eu(e,t,wu)},Su=Zr,Du=mo,ju=gr,Cu=vr,Au=Xr,Ou=yr.exports,Iu=Ur,Pu=Fr,Fu=Object.prototype.hasOwnProperty;var Mu=function(e){if(null==e)return!0;if(Au(e)&&(Cu(e)||"string"==typeof e||"function"==typeof e.splice||Ou(e)||Pu(e)||ju(e)))return!e.length;var t=Du(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(Iu(e))return!Su(e).length;for(var r in e)if(Fu.call(e,r))return!1;return!0};var Tu=function(e){return void 0===e},Nu=qi,Lu=Xr;var Bu=function(e,t){var r=-1,n=Lu(e)?Array(e.length):[];return Nu(e,(function(e,o,i){n[++r]=t(e,o,i)})),n},Ru=ys,Vu=gu,zu=Bu,Gu=vr;var Uu=function(e,t){return(Gu(e)?Ru:zu)(e,Vu(t))};var Hu=function(e,t,r,n){var o=-1,i=null==e?0:e.length;for(n&&i&&(r=e[++o]);++o<i;)r=t(r,e[o],o,e);return r};var qu=function(e,t,r,n,o){return o(e,(function(e,o,i){r=n?(n=!1,e):t(r,e,o,i)})),r},Wu=Hu,Yu=qi,Ku=gu,Zu=qu,$u=vr;var Qu=function(e,t,r){var n=$u(e)?Wu:Zu,o=arguments.length<3;return n(e,Ku(t),r,o,Yu)},Xu=je,Ju=vr,ec=ir;var tc=function(e){return"string"==typeof e||!Ju(e)&&ec(e)&&"[object String]"==Xu(e)},rc=ru("length"),nc=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var oc=function(e){return nc.test(e)},ic="[\\ud800-\\udfff]",ac="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",sc="\\ud83c[\\udffb-\\udfff]",uc="[^\\ud800-\\udfff]",cc="(?:\\ud83c[\\udde6-\\uddff]){2}",hc="[\\ud800-\\udbff][\\udc00-\\udfff]",lc="(?:"+ac+"|"+sc+")"+"?",fc="[\\ufe0e\\ufe0f]?",dc=fc+lc+("(?:\\u200d(?:"+[uc,cc,hc].join("|")+")"+fc+lc+")*"),pc="(?:"+[uc+ac+"?",ac,cc,hc,ic].join("|")+")",gc=RegExp(sc+"(?="+sc+")|"+pc+dc,"g");var vc=rc,yc=oc,_c=function(e){for(var t=gc.lastIndex=0;gc.test(e);)++t;return t};var mc=Zr,bc=mo,xc=Xr,wc=tc,Ec=function(e){return yc(e)?_c(e):vc(e)};var kc=function(e){if(null==e)return 0;if(xc(e))return wc(e)?Ec(e):e.length;var t=bc(e);return"[object Map]"==t||"[object Set]"==t?e.size:mc(e).length},Sc=Wt,Dc=zo,jc=Gi,Cc=gu,Ac=In,Oc=vr,Ic=yr.exports,Pc=Pe,Fc=Ce,Mc=Fr;var Tc=function(e,t,r){var n=Oc(e),o=n||Ic(e)||Mc(e);if(t=Cc(t),null==r){var i=e&&e.constructor;r=o?n?new i:[]:Fc(e)&&Pc(i)?Dc(Ac(e)):{}}return(o?Sc:jc)(e,(function(e,n,o){return t(r,e,n,o)})),r},Nc=gr,Lc=vr,Bc=ge?ge.isConcatSpreadable:void 0;var Rc=function(e){return Lc(e)||Nc(e)||!!(Bc&&e&&e[Bc])},Vc=On,zc=Rc;var Gc=function e(t,r,n,o,i){var a=-1,s=t.length;for(n||(n=zc),i||(i=[]);++a<s;){var u=t[a];r>0&&n(u)?r>1?e(u,r-1,n,o,i):Vc(i,u):o||(i[i.length]=u)}return i};var Uc=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)},Hc=Math.max;var qc=function(e,t,r){return t=Hc(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=Hc(n.length-t,0),a=Array(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),Uc(e,this,s)}},Wc=Li,Yc=Kt,Kc=Yc?function(e,t){return Yc(e,"toString",{configurable:!0,enumerable:!1,value:Wc(t),writable:!0})}:Wi,Zc=Date.now;var $c=function(e){var t=0,r=0;return function(){var n=Zc(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},Qc=$c(Kc),Xc=Wi,Jc=qc,eh=Qc;var th=function(e,t){return eh(Jc(e,t,Xc),e+"")};var rh=function(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1};var nh=function(e){return e!=e};var oh=function(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1},ih=rh,ah=nh,sh=oh;var uh=function(e,t,r){return t==t?sh(e,t,r):ih(e,ah,r)},ch=uh;var hh=function(e,t){return!!(null==e?0:e.length)&&ch(e,t,0)>-1};var lh=function(e,t,r){for(var n=-1,o=null==e?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1};var fh=Jn,dh=function(){},ph=fh&&1/ya(new fh([,-0]))[1]==1/0?function(e){return new fh(e)}:dh,gh=ca,vh=hh,yh=lh,_h=la,mh=ph,bh=ya;var xh=function(e,t,r){var n=-1,o=vh,i=e.length,a=!0,s=[],u=s;if(r)a=!1,o=yh;else if(i>=200){var c=t?null:mh(e);if(c)return bh(c);a=!1,o=_h,u=new gh}else u=t?[]:s;e:for(;++n<i;){var h=e[n],l=t?t(h):h;if(h=r||0!==h?h:0,a&&l==l){for(var f=u.length;f--;)if(u[f]===l)continue e;t&&u.push(l),s.push(h)}else o(u,l,r)||(u!==s&&u.push(l),s.push(h))}return s},wh=Xr,Eh=ir;var kh=function(e){return Eh(e)&&wh(e)},Sh=Gc,Dh=xh,jh=kh,Ch=th((function(e){return Dh(Sh(e,1,jh,!0))})),Ah=ys;var Oh=function(e,t){return Ah(t,(function(t){return e[t]}))},Ih=rn;var Ph,Fh=function(e){return null==e?[]:Oh(e,Ih(e))};try{Ph={clone:Ni,constant:Li,each:ea,filter:bu,has:ku,isArray:vr,isEmpty:Mu,isFunction:Pe,isUndefined:Tu,keys:rn,map:Uu,reduce:Qu,size:kc,transform:Tc,union:Ch,values:Fh}}catch(e){}Ph||(Ph=window._);var Mh=Ph,Th=Mh,Nh=Bh,Lh="\0";function Bh(e){this._isDirected=!Th.has(e,"directed")||e.directed,this._isMultigraph=!!Th.has(e,"multigraph")&&e.multigraph,this._isCompound=!!Th.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=Th.constant(void 0),this._defaultEdgeLabelFn=Th.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function Rh(e,t){e[t]?e[t]++:e[t]=1}function Vh(e,t){--e[t]||delete e[t]}function zh(e,t,r,n){var o=""+t,i=""+r;if(!e&&o>i){var a=o;o=i,i=a}return o+""+i+""+(Th.isUndefined(n)?"\0":n)}function Gh(e,t,r,n){var o=""+t,i=""+r;if(!e&&o>i){var a=o;o=i,i=a}var s={v:o,w:i};return n&&(s.name=n),s}function Uh(e,t){return zh(e,t.v,t.w,t.name)}Bh.prototype._nodeCount=0,Bh.prototype._edgeCount=0,Bh.prototype.isDirected=function(){return this._isDirected},Bh.prototype.isMultigraph=function(){return this._isMultigraph},Bh.prototype.isCompound=function(){return this._isCompound},Bh.prototype.setGraph=function(e){return this._label=e,this},Bh.prototype.graph=function(){return this._label},Bh.prototype.setDefaultNodeLabel=function(e){return Th.isFunction(e)||(e=Th.constant(e)),this._defaultNodeLabelFn=e,this},Bh.prototype.nodeCount=function(){return this._nodeCount},Bh.prototype.nodes=function(){return Th.keys(this._nodes)},Bh.prototype.sources=function(){var e=this;return Th.filter(this.nodes(),(function(t){return Th.isEmpty(e._in[t])}))},Bh.prototype.sinks=function(){var e=this;return Th.filter(this.nodes(),(function(t){return Th.isEmpty(e._out[t])}))},Bh.prototype.setNodes=function(e,t){var r=arguments,n=this;return Th.each(e,(function(e){r.length>1?n.setNode(e,t):n.setNode(e)})),this},Bh.prototype.setNode=function(e,t){return Th.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=Lh,this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},Bh.prototype.node=function(e){return this._nodes[e]},Bh.prototype.hasNode=function(e){return Th.has(this._nodes,e)},Bh.prototype.removeNode=function(e){var t=this;if(Th.has(this._nodes,e)){var r=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],Th.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),Th.each(Th.keys(this._in[e]),r),delete this._in[e],delete this._preds[e],Th.each(Th.keys(this._out[e]),r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},Bh.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Th.isUndefined(t))t=Lh;else{for(var r=t+="";!Th.isUndefined(r);r=this.parent(r))if(r===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},Bh.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},Bh.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==Lh)return t}},Bh.prototype.children=function(e){if(Th.isUndefined(e)&&(e=Lh),this._isCompound){var t=this._children[e];if(t)return Th.keys(t)}else{if(e===Lh)return this.nodes();if(this.hasNode(e))return[]}},Bh.prototype.predecessors=function(e){var t=this._preds[e];if(t)return Th.keys(t)},Bh.prototype.successors=function(e){var t=this._sucs[e];if(t)return Th.keys(t)},Bh.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return Th.union(t,this.successors(e))},Bh.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},Bh.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var r=this;Th.each(this._nodes,(function(r,n){e(n)&&t.setNode(n,r)})),Th.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,r.edge(e))}));var n={};function o(e){var i=r.parent(e);return void 0===i||t.hasNode(i)?(n[e]=i,i):i in n?n[i]:o(i)}return this._isCompound&&Th.each(t.nodes(),(function(e){t.setParent(e,o(e))})),t},Bh.prototype.setDefaultEdgeLabel=function(e){return Th.isFunction(e)||(e=Th.constant(e)),this._defaultEdgeLabelFn=e,this},Bh.prototype.edgeCount=function(){return this._edgeCount},Bh.prototype.edges=function(){return Th.values(this._edgeObjs)},Bh.prototype.setPath=function(e,t){var r=this,n=arguments;return Th.reduce(e,(function(e,o){return n.length>1?r.setEdge(e,o,t):r.setEdge(e,o),o})),this},Bh.prototype.setEdge=function(){var e,t,r,n,o=!1,i=arguments[0];"object"==typeof i&&null!==i&&"v"in i?(e=i.v,t=i.w,r=i.name,2===arguments.length&&(n=arguments[1],o=!0)):(e=i,t=arguments[1],r=arguments[3],arguments.length>2&&(n=arguments[2],o=!0)),e=""+e,t=""+t,Th.isUndefined(r)||(r=""+r);var a=zh(this._isDirected,e,t,r);if(Th.has(this._edgeLabels,a))return o&&(this._edgeLabels[a]=n),this;if(!Th.isUndefined(r)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[a]=o?n:this._defaultEdgeLabelFn(e,t,r);var s=Gh(this._isDirected,e,t,r);return e=s.v,t=s.w,Object.freeze(s),this._edgeObjs[a]=s,Rh(this._preds[t],e),Rh(this._sucs[e],t),this._in[t][a]=s,this._out[e][a]=s,this._edgeCount++,this},Bh.prototype.edge=function(e,t,r){var n=1===arguments.length?Uh(this._isDirected,arguments[0]):zh(this._isDirected,e,t,r);return this._edgeLabels[n]},Bh.prototype.hasEdge=function(e,t,r){var n=1===arguments.length?Uh(this._isDirected,arguments[0]):zh(this._isDirected,e,t,r);return Th.has(this._edgeLabels,n)},Bh.prototype.removeEdge=function(e,t,r){var n=1===arguments.length?Uh(this._isDirected,arguments[0]):zh(this._isDirected,e,t,r),o=this._edgeObjs[n];return o&&(e=o.v,t=o.w,delete this._edgeLabels[n],delete this._edgeObjs[n],Vh(this._preds[t],e),Vh(this._sucs[e],t),delete this._in[t][n],delete this._out[e][n],this._edgeCount--),this},Bh.prototype.inEdges=function(e,t){var r=this._in[e];if(r){var n=Th.values(r);return t?Th.filter(n,(function(e){return e.v===t})):n}},Bh.prototype.outEdges=function(e,t){var r=this._out[e];if(r){var n=Th.values(r);return t?Th.filter(n,(function(e){return e.w===t})):n}},Bh.prototype.nodeEdges=function(e,t){var r=this.inEdges(e,t);if(r)return r.concat(this.outEdges(e,t))};var Hh={Graph:Nh,version:"2.1.8"},qh=Mh,Wh=Nh,Yh={write:function(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:Kh(e),edges:Zh(e)};qh.isUndefined(e.graph())||(t.value=qh.clone(e.graph()));return t},read:function(e){var t=new Wh(e.options).setGraph(e.value);return qh.each(e.nodes,(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)})),qh.each(e.edges,(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)})),t}};function Kh(e){return qh.map(e.nodes(),(function(t){var r=e.node(t),n=e.parent(t),o={v:t};return qh.isUndefined(r)||(o.value=r),qh.isUndefined(n)||(o.parent=n),o}))}function Zh(e){return qh.map(e.edges(),(function(t){var r=e.edge(t),n={v:t.v,w:t.w};return qh.isUndefined(t.name)||(n.name=t.name),qh.isUndefined(r)||(n.value=r),n}))}var $h=Mh,Qh=function(e){var t,r={},n=[];function o(n){$h.has(r,n)||(r[n]=!0,t.push(n),$h.each(e.successors(n),o),$h.each(e.predecessors(n),o))}return $h.each(e.nodes(),(function(e){t=[],o(e),t.length&&n.push(t)})),n};var Xh=Mh,Jh=el;function el(){this._arr=[],this._keyIndices={}}el.prototype.size=function(){return this._arr.length},el.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},el.prototype.has=function(e){return Xh.has(this._keyIndices,e)},el.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},el.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},el.prototype.add=function(e,t){var r=this._keyIndices;if(e=String(e),!Xh.has(r,e)){var n=this._arr,o=n.length;return r[e]=o,n.push({key:e,priority:t}),this._decrease(o),!0}return!1},el.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},el.prototype.decrease=function(e,t){var r=this._keyIndices[e];if(t>this._arr[r].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[r].priority+" New: "+t);this._arr[r].priority=t,this._decrease(r)},el.prototype._heapify=function(e){var t=this._arr,r=2*e,n=r+1,o=e;r<t.length&&(o=t[r].priority<t[o].priority?r:o,n<t.length&&(o=t[n].priority<t[o].priority?n:o),o!==e&&(this._swap(e,o),this._heapify(o)))},el.prototype._decrease=function(e){for(var t,r=this._arr,n=r[e].priority;0!==e&&!(r[t=e>>1].priority<n);)this._swap(e,t),e=t},el.prototype._swap=function(e,t){var r=this._arr,n=this._keyIndices,o=r[e],i=r[t];r[e]=i,r[t]=o,n[i.key]=e,n[o.key]=t};var tl=Jh,rl=function(e,t,r,n){return function(e,t,r,n){var o,i,a={},s=new tl,u=function(e){var t=e.v!==o?e.v:e.w,n=a[t],u=r(e),c=i.distance+u;if(u<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+u);c<n.distance&&(n.distance=c,n.predecessor=o,s.decrease(t,c))};e.nodes().forEach((function(e){var r=e===t?0:Number.POSITIVE_INFINITY;a[e]={distance:r},s.add(e,r)}));for(;s.size()>0&&(o=s.removeMin(),(i=a[o]).distance!==Number.POSITIVE_INFINITY);)n(o).forEach(u);return a}(e,String(t),r||nl,n||function(t){return e.outEdges(t)})},nl=Mh.constant(1);var ol=rl,il=Mh,al=function(e,t,r){return il.transform(e.nodes(),(function(n,o){n[o]=ol(e,o,t,r)}),{})};var sl=Mh,ul=function(e){var t=0,r=[],n={},o=[];function i(a){var s=n[a]={onStack:!0,lowlink:t,index:t++};if(r.push(a),e.successors(a).forEach((function(e){sl.has(n,e)?n[e].onStack&&(s.lowlink=Math.min(s.lowlink,n[e].index)):(i(e),s.lowlink=Math.min(s.lowlink,n[e].lowlink))})),s.lowlink===s.index){var u,c=[];do{u=r.pop(),n[u].onStack=!1,c.push(u)}while(a!==u);o.push(c)}}return e.nodes().forEach((function(e){sl.has(n,e)||i(e)})),o};var cl=Mh,hl=ul,ll=function(e){return cl.filter(hl(e),(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])}))};var fl=function(e,t,r){return function(e,t,r){var n={},o=e.nodes();return o.forEach((function(e){n[e]={},n[e][e]={distance:0},o.forEach((function(t){e!==t&&(n[e][t]={distance:Number.POSITIVE_INFINITY})})),r(e).forEach((function(r){var o=r.v===e?r.w:r.v,i=t(r);n[e][o]={distance:i,predecessor:e}}))})),o.forEach((function(e){var t=n[e];o.forEach((function(r){var i=n[r];o.forEach((function(r){var n=i[e],o=t[r],a=i[r],s=n.distance+o.distance;s<a.distance&&(a.distance=s,a.predecessor=o.predecessor)}))}))})),n}(e,t||dl,r||function(t){return e.outEdges(t)})},dl=Mh.constant(1);var pl=Mh,gl=vl;function vl(e){var t={},r={},n=[];if(pl.each(e.sinks(),(function o(i){if(pl.has(r,i))throw new yl;pl.has(t,i)||(r[i]=!0,t[i]=!0,pl.each(e.predecessors(i),o),delete r[i],n.push(i))})),pl.size(t)!==e.nodeCount())throw new yl;return n}function yl(){}vl.CycleException=yl,yl.prototype=new Error;var _l=gl;var ml=Mh,bl=function(e,t,r){ml.isArray(t)||(t=[t]);var n=(e.isDirected()?e.successors:e.neighbors).bind(e),o=[],i={};return ml.each(t,(function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);xl(e,t,"post"===r,i,n,o)})),o};function xl(e,t,r,n,o,i){ml.has(n,t)||(n[t]=!0,r||i.push(t),ml.each(o(t),(function(t){xl(e,t,r,n,o,i)})),r&&i.push(t))}var wl=bl;var El=bl;var kl=Mh,Sl=Nh,Dl=Jh;var jl,Cl={Graph:Hh.Graph,json:Yh,alg:{components:Qh,dijkstra:rl,dijkstraAll:al,findCycles:ll,floydWarshall:fl,isAcyclic:function(e){try{_l(e)}catch(e){if(e instanceof _l.CycleException)return!1;throw e}return!0},postorder:function(e,t){return wl(e,t,"post")},preorder:function(e,t){return El(e,t,"pre")},prim:function(e,t){var r,n=new Sl,o={},i=new Dl;function a(e){var n=e.v===r?e.w:e.v,a=i.priority(n);if(void 0!==a){var s=t(e);s<a&&(o[n]=r,i.decrease(n,s))}}if(0===e.nodeCount())return n;kl.each(e.nodes(),(function(e){i.add(e,Number.POSITIVE_INFINITY),n.setNode(e)})),i.decrease(e.nodes()[0],0);var s=!1;for(;i.size()>0;){if(r=i.removeMin(),kl.has(o,r))n.setEdge(r,o[r]);else{if(s)throw new Error("Input graph is not connected: "+e);s=!0}e.nodeEdges(r).forEach(a)}return n},tarjan:ul,topsort:gl},version:Hh.version};try{jl=Cl}catch(e){}jl||(jl=window.graphlib);var Al=jl,Ol=Mi;var Il=function(e){return Ol(e,5)},Pl=G,Fl=Xr,Ml=br,Tl=Ce;var Nl=function(e,t,r){if(!Tl(r))return!1;var n=typeof t;return!!("number"==n?Fl(r)&&Ml(t,r.length):"string"==n&&t in r)&&Pl(r[t],e)},Ll=th,Bl=G,Rl=Nl,Vl=pn,zl=Object.prototype,Gl=zl.hasOwnProperty,Ul=Ll((function(e,t){e=Object(e);var r=-1,n=t.length,o=n>2?t[2]:void 0;for(o&&Rl(t[0],t[1],o)&&(n=1);++r<n;)for(var i=t[r],a=Vl(i),s=-1,u=a.length;++s<u;){var c=a[s],h=e[c];(void 0===h||Bl(h,zl[c])&&!Gl.call(e,c))&&(e[c]=i[c])}return e})),Hl=Ul,ql=gu,Wl=Xr,Yl=rn;var Kl=function(e){return function(t,r,n){var o=Object(t);if(!Wl(t)){var i=ql(r);t=Yl(t),r=function(e){return i(o[e],e,o)}}var a=e(t,r,n);return a>-1?o[i?t[a]:a]:void 0}},Zl=/\s/;var $l=function(e){for(var t=e.length;t--&&Zl.test(e.charAt(t)););return t},Ql=$l,Xl=/^\s+/;var Jl=function(e){return e?e.slice(0,Ql(e)+1).replace(Xl,""):e},ef=Ce,tf=is,rf=/^[-+]0x[0-9a-f]+$/i,nf=/^0b[01]+$/i,of=/^0o[0-7]+$/i,af=parseInt;var sf=function(e){if("number"==typeof e)return e;if(tf(e))return NaN;if(ef(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ef(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Jl(e);var r=nf.test(e);return r||of.test(e)?af(e.slice(2),r?2:8):rf.test(e)?NaN:+e},uf=sf,cf=1/0;var hf=function(e){return e?(e=uf(e))===cf||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0},lf=hf;var ff=function(e){var t=lf(e),r=t%1;return t==t?r?t-r:t:0},df=rh,pf=gu,gf=ff,vf=Math.max;var yf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:gf(r);return o<0&&(o=vf(n+o,0)),df(e,pf(t),o)},_f=Kl(yf),mf=Gc;var bf=function(e){return(null==e?0:e.length)?mf(e,1):[]},xf=Ri,wf=Ki,Ef=pn;var kf=function(e,t){return null==e?e:xf(e,wf(t),Ef)};var Sf=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0},Df=$t,jf=Gi,Cf=gu;var Af=function(e,t){var r={};return t=Cf(t),jf(e,(function(e,n,o){Df(r,n,t(e,n,o))})),r},Of=is;var If=function(e,t,r){for(var n=-1,o=e.length;++n<o;){var i=e[n],a=t(i);if(null!=a&&(void 0===s?a==a&&!Of(a):r(a,s)))var s=a,u=i}return u};var Pf=function(e,t){return e>t},Ff=If,Mf=Pf,Tf=Wi;var Nf=function(e){return e&&e.length?Ff(e,Tf,Mf):void 0},Lf=$t,Bf=G;var Rf=function(e,t,r){(void 0!==r&&!Bf(e[t],r)||void 0===r&&!(t in e))&&Lf(e,t,r)},Vf=je,zf=In,Gf=ir,Uf=Function.prototype,Hf=Object.prototype,qf=Uf.toString,Wf=Hf.hasOwnProperty,Yf=qf.call(Object);var Kf=function(e){if(!Gf(e)||"[object Object]"!=Vf(e))return!1;var t=zf(e);if(null===t)return!0;var r=Wf.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&qf.call(r)==Yf};var Zf=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},$f=nr,Qf=pn;var Xf=function(e){return $f(e,Qf(e))},Jf=Rf,ed=_n.exports,td=Po,rd=mn,nd=qo,od=gr,id=vr,ad=kh,sd=yr.exports,ud=Pe,cd=Ce,hd=Kf,ld=Fr,fd=Zf,dd=Xf;var pd=qt,gd=Rf,vd=Ri,yd=function(e,t,r,n,o,i,a){var s=fd(e,r),u=fd(t,r),c=a.get(u);if(c)Jf(e,r,c);else{var h=i?i(s,u,r+"",e,t,a):void 0,l=void 0===h;if(l){var f=id(u),d=!f&&sd(u),p=!f&&!d&&ld(u);h=u,f||d||p?id(s)?h=s:ad(s)?h=rd(s):d?(l=!1,h=ed(u,!0)):p?(l=!1,h=td(u,!0)):h=[]:hd(u)||od(u)?(h=s,od(s)?h=dd(s):cd(s)&&!ud(s)||(h=nd(u))):l=!1}l&&(a.set(u,h),o(h,u,n,i,a),a.delete(u)),Jf(e,r,h)}},_d=Ce,md=pn,bd=Zf;var xd=function e(t,r,n,o,i){t!==r&&vd(r,(function(a,s){if(i||(i=new pd),_d(a))yd(t,r,s,n,e,o,i);else{var u=o?o(bd(t,s),a,s+"",t,r,i):void 0;void 0===u&&(u=a),gd(t,s,u)}}),md)},wd=th,Ed=Nl;var kd=function(e){return wd((function(t,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&Ed(r[0],r[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,i)}return t}))},Sd=xd,Dd=kd((function(e,t,r){Sd(e,t,r)}));var jd=function(e,t){return e<t},Cd=If,Ad=jd,Od=Wi;var Id=function(e){return e&&e.length?Cd(e,Od,Ad):void 0},Pd=If,Fd=gu,Md=jd;var Td=function(e,t){return e&&e.length?Pd(e,Fd(t),Md):void 0},Nd=pe,Ld=function(){return Nd.Date.now()},Bd=er,Rd=Os,Vd=br,zd=Ce,Gd=Ps;var Ud=function(e,t,r,n){if(!zd(e))return e;for(var o=-1,i=(t=Rd(t,e)).length,a=i-1,s=e;null!=s&&++o<i;){var u=Gd(t[o]),c=r;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(o!=a){var h=s[u];void 0===(c=n?n(h,u,s):void 0)&&(c=zd(h)?h:Vd(t[o+1])?[]:{})}Bd(s,u,c),s=s[u]}return e},Hd=Ts,qd=Ud,Wd=Os;var Yd=function(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],s=Hd(e,a);r(s,a)&&qd(i,Wd(a,e),s)}return i},Kd=Yd,Zd=Ys;var $d=function(e,t){return Kd(e,t,(function(t,r){return Zd(e,r)}))},Qd=bf,Xd=qc,Jd=Qc;var ep=$d,tp=function(e){return Jd(Xd(e,void 0,Qd),e+"")}((function(e,t){return null==e?{}:ep(e,t)})),rp=Math.ceil,np=Math.max;var op=function(e,t,r,n){for(var o=-1,i=np(rp((t-e)/(r||1)),0),a=Array(i);i--;)a[n?i:++o]=e,e+=r;return a},ip=op,ap=Nl,sp=hf;var up=function(e){return function(t,r,n){return n&&"number"!=typeof n&&ap(t,r,n)&&(r=n=void 0),t=sp(t),void 0===r?(r=t,t=0):r=sp(r),n=void 0===n?t<r?1:-1:sp(n),ip(t,r,n,e)}}();var cp=is;var hp=function(e,t){if(e!==t){var r=void 0!==e,n=null===e,o=e==e,i=cp(e),a=void 0!==t,s=null===t,u=t==t,c=cp(t);if(!s&&!c&&!i&&e>t||i&&a&&u&&!s&&!c||n&&a&&u||!r&&u||!o)return 1;if(!n&&!i&&!c&&e<t||c&&r&&o&&!n&&!i||s&&r&&o||!a&&o||!u)return-1}return 0},lp=hp;var fp=function(e,t,r){for(var n=-1,o=e.criteria,i=t.criteria,a=o.length,s=r.length;++n<a;){var u=lp(o[n],i[n]);if(u)return n>=s?u:u*("desc"==r[n]?-1:1)}return e.index-t.index},dp=ys,pp=Ts,gp=gu,vp=Bu,yp=function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e},_p=jr,mp=fp,bp=Wi,xp=vr;var wp=function(e,t,r){t=t.length?dp(t,(function(e){return xp(e)?function(t){return pp(t,1===e.length?e[0]:e)}:e})):[bp];var n=-1;t=dp(t,_p(gp));var o=vp(e,(function(e,r,o){return{criteria:dp(t,(function(t){return t(e)})),index:++n,value:e}}));return yp(o,(function(e,t){return mp(e,t,r)}))},Ep=Gc,kp=wp,Sp=Nl,Dp=th((function(e,t){if(null==e)return[];var r=t.length;return r>1&&Sp(e,t[0],t[1])?t=[]:r>2&&Sp(t[0],t[1],t[2])&&(t=[t[0]]),kp(e,Ep(t,1),[])})),jp=Ss,Cp=0;var Ap=function(e){var t=++Cp;return jp(e)+t};var Op=function(e,t,r){for(var n=-1,o=e.length,i=t.length,a={};++n<o;){var s=n<i?t[n]:void 0;r(a,e[n],s)}return a},Ip=er,Pp=Op;var Fp,Mp=function(e,t){return Pp(e||[],t||[],Ip)};try{Fp={cloneDeep:Il,constant:Li,defaults:Hl,each:ea,filter:bu,find:_f,flatten:bf,forEach:Ji,forIn:kf,has:ku,isUndefined:Tu,last:Sf,map:Uu,mapValues:Af,max:Nf,merge:Dd,min:Id,minBy:Td,now:Ld,pick:tp,range:up,reduce:Qu,sortBy:Dp,uniqueId:Ap,values:Fh,zipObject:Mp}}catch(e){}Fp||(Fp=window._);var Tp=Fp,Np=Lp;function Lp(){var e={};e._next=e._prev=e,this._sentinel=e}function Bp(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Rp(e,t){if("_next"!==e&&"_prev"!==e)return t}Lp.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return Bp(t),t},Lp.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&Bp(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},Lp.prototype.toString=function(){for(var e=[],t=this._sentinel,r=t._prev;r!==t;)e.push(JSON.stringify(r,Rp)),r=r._prev;return"["+e.join(", ")+"]"};var Vp=Tp,zp=Al.Graph,Gp=Np,Up=function(e,t){if(e.nodeCount()<=1)return[];var r=function(e,t){var r=new zp,n=0,o=0;Vp.forEach(e.nodes(),(function(e){r.setNode(e,{v:e,in:0,out:0})})),Vp.forEach(e.edges(),(function(e){var i=r.edge(e.v,e.w)||0,a=t(e),s=i+a;r.setEdge(e.v,e.w,s),o=Math.max(o,r.node(e.v).out+=a),n=Math.max(n,r.node(e.w).in+=a)}));var i=Vp.range(o+n+3).map((function(){return new Gp})),a=n+1;return Vp.forEach(r.nodes(),(function(e){Wp(i,a,r.node(e))})),{graph:r,buckets:i,zeroIdx:a}}(e,t||Hp),n=function(e,t,r){var n,o=[],i=t[t.length-1],a=t[0];for(;e.nodeCount();){for(;n=a.dequeue();)qp(e,t,r,n);for(;n=i.dequeue();)qp(e,t,r,n);if(e.nodeCount())for(var s=t.length-2;s>0;--s)if(n=t[s].dequeue()){o=o.concat(qp(e,t,r,n,!0));break}}return o}(r.graph,r.buckets,r.zeroIdx);return Vp.flatten(Vp.map(n,(function(t){return e.outEdges(t.v,t.w)})),!0)},Hp=Vp.constant(1);function qp(e,t,r,n,o){var i=o?[]:void 0;return Vp.forEach(e.inEdges(n.v),(function(n){var a=e.edge(n),s=e.node(n.v);o&&i.push({v:n.v,w:n.w}),s.out-=a,Wp(t,r,s)})),Vp.forEach(e.outEdges(n.v),(function(n){var o=e.edge(n),i=n.w,a=e.node(i);a.in-=o,Wp(t,r,a)})),e.removeNode(n.v),i}function Wp(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}var Yp=Tp,Kp=Up,Zp={run:function(e){var t="greedy"===e.graph().acyclicer?Kp(e,function(e){return function(t){return e.edge(t).weight}}(e)):function(e){var t=[],r={},n={};function o(i){Yp.has(n,i)||(n[i]=!0,r[i]=!0,Yp.forEach(e.outEdges(i),(function(e){Yp.has(r,e.w)?t.push(e):o(e.w)})),delete r[i])}return Yp.forEach(e.nodes(),o),t}(e);Yp.forEach(t,(function(t){var r=e.edge(t);e.removeEdge(t),r.forwardName=t.name,r.reversed=!0,e.setEdge(t.w,t.v,r,Yp.uniqueId("rev"))}))},undo:function(e){Yp.forEach(e.edges(),(function(t){var r=e.edge(t);if(r.reversed){e.removeEdge(t);var n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}}))}};var $p=Tp,Qp=Al.Graph,Xp={addDummyNode:Jp,simplify:function(e){var t=(new Qp).setGraph(e.graph());return $p.forEach(e.nodes(),(function(r){t.setNode(r,e.node(r))})),$p.forEach(e.edges(),(function(r){var n=t.edge(r.v,r.w)||{weight:0,minlen:1},o=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+o.weight,minlen:Math.max(n.minlen,o.minlen)})})),t},asNonCompoundGraph:function(e){var t=new Qp({multigraph:e.isMultigraph()}).setGraph(e.graph());return $p.forEach(e.nodes(),(function(r){e.children(r).length||t.setNode(r,e.node(r))})),$p.forEach(e.edges(),(function(r){t.setEdge(r,e.edge(r))})),t},successorWeights:function(e){var t=$p.map(e.nodes(),(function(t){var r={};return $p.forEach(e.outEdges(t),(function(t){r[t.w]=(r[t.w]||0)+e.edge(t).weight})),r}));return $p.zipObject(e.nodes(),t)},predecessorWeights:function(e){var t=$p.map(e.nodes(),(function(t){var r={};return $p.forEach(e.inEdges(t),(function(t){r[t.v]=(r[t.v]||0)+e.edge(t).weight})),r}));return $p.zipObject(e.nodes(),t)},intersectRect:function(e,t){var r,n,o=e.x,i=e.y,a=t.x-o,s=t.y-i,u=e.width/2,c=e.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(s)*u>Math.abs(a)*c?(s<0&&(c=-c),r=c*a/s,n=c):(a<0&&(u=-u),r=u,n=u*s/a);return{x:o+r,y:i+n}},buildLayerMatrix:function(e){var t=$p.map($p.range(eg(e)+1),(function(){return[]}));return $p.forEach(e.nodes(),(function(r){var n=e.node(r),o=n.rank;$p.isUndefined(o)||(t[o][n.order]=r)})),t},normalizeRanks:function(e){var t=$p.min($p.map(e.nodes(),(function(t){return e.node(t).rank})));$p.forEach(e.nodes(),(function(r){var n=e.node(r);$p.has(n,"rank")&&(n.rank-=t)}))},removeEmptyRanks:function(e){var t=$p.min($p.map(e.nodes(),(function(t){return e.node(t).rank}))),r=[];$p.forEach(e.nodes(),(function(n){var o=e.node(n).rank-t;r[o]||(r[o]=[]),r[o].push(n)}));var n=0,o=e.graph().nodeRankFactor;$p.forEach(r,(function(t,r){$p.isUndefined(t)&&r%o!=0?--n:n&&$p.forEach(t,(function(t){e.node(t).rank+=n}))}))},addBorderNode:function(e,t,r,n){var o={width:0,height:0};arguments.length>=4&&(o.rank=r,o.order=n);return Jp(e,"border",o,t)},maxRank:eg,partition:function(e,t){var r={lhs:[],rhs:[]};return $p.forEach(e,(function(e){t(e)?r.lhs.push(e):r.rhs.push(e)})),r},time:function(e,t){var r=$p.now();try{return t()}finally{console.log(e+" time: "+($p.now()-r)+"ms")}},notime:function(e,t){return t()}};function Jp(e,t,r,n){var o;do{o=$p.uniqueId(n)}while(e.hasNode(o));return r.dummy=t,e.setNode(o,r),o}function eg(e){return $p.max($p.map(e.nodes(),(function(t){var r=e.node(t).rank;if(!$p.isUndefined(r))return r})))}var tg=Tp,rg=Xp,ng={run:function(e){e.graph().dummyChains=[],tg.forEach(e.edges(),(function(t){!function(e,t){var r,n,o,i=t.v,a=e.node(i).rank,s=t.w,u=e.node(s).rank,c=t.name,h=e.edge(t),l=h.labelRank;if(u===a+1)return;for(e.removeEdge(t),o=0,++a;a<u;++o,++a)h.points=[],n={width:0,height:0,edgeLabel:h,edgeObj:t,rank:a},r=rg.addDummyNode(e,"edge",n,"_d"),a===l&&(n.width=h.width,n.height=h.height,n.dummy="edge-label",n.labelpos=h.labelpos),e.setEdge(i,r,{weight:h.weight},c),0===o&&e.graph().dummyChains.push(r),i=r;e.setEdge(i,s,{weight:h.weight},c)}(e,t)}))},undo:function(e){tg.forEach(e.graph().dummyChains,(function(t){var r,n=e.node(t),o=n.edgeLabel;for(e.setEdge(n.edgeObj,o);n.dummy;)r=e.successors(t)[0],e.removeNode(t),o.points.push({x:n.x,y:n.y}),"edge-label"===n.dummy&&(o.x=n.x,o.y=n.y,o.width=n.width,o.height=n.height),t=r,n=e.node(t)}))}};var og=Tp,ig={longestPath:function(e){var t={};og.forEach(e.sources(),(function r(n){var o=e.node(n);if(og.has(t,n))return o.rank;t[n]=!0;var i=og.min(og.map(e.outEdges(n),(function(t){return r(t.w)-e.edge(t).minlen})));return i!==Number.POSITIVE_INFINITY&&null!=i||(i=0),o.rank=i}))},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}};var ag=Tp,sg=Al.Graph,ug=ig.slack,cg=function(e){var t,r,n=new sg({directed:!1}),o=e.nodes()[0],i=e.nodeCount();n.setNode(o,{});for(;hg(n,e)<i;)t=lg(n,e),r=n.hasNode(t.v)?ug(e,t):-ug(e,t),fg(n,e,r);return n};function hg(e,t){return ag.forEach(e.nodes(),(function r(n){ag.forEach(t.nodeEdges(n),(function(o){var i=o.v,a=n===i?o.w:i;e.hasNode(a)||ug(t,o)||(e.setNode(a,{}),e.setEdge(n,a,{}),r(a))}))})),e.nodeCount()}function lg(e,t){return ag.minBy(t.edges(),(function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return ug(t,r)}))}function fg(e,t,r){ag.forEach(e.nodes(),(function(e){t.node(e).rank+=r}))}var dg=Tp,pg=cg,gg=ig.slack,vg=ig.longestPath,yg=Al.alg.preorder,_g=Al.alg.postorder,mg=Xp.simplify,bg=xg;function xg(e){e=mg(e),vg(e);var t,r=pg(e);for(kg(r),wg(r,e);t=Dg(r);)Cg(r,e,t,jg(r,e,t))}function wg(e,t){var r=_g(e,e.nodes());r=r.slice(0,r.length-1),dg.forEach(r,(function(r){!function(e,t,r){var n=e.node(r).parent;e.edge(r,n).cutvalue=Eg(e,t,r)}(e,t,r)}))}function Eg(e,t,r){var n=e.node(r).parent,o=!0,i=t.edge(r,n),a=0;return i||(o=!1,i=t.edge(n,r)),a=i.weight,dg.forEach(t.nodeEdges(r),(function(i){var s=i.v===r,u=s?i.w:i.v;if(u!==n){var c=s===o,h=t.edge(i).weight;if(a+=c?h:-h,function(e,t,r){return e.hasEdge(t,r)}(e,r,u)){var l=e.edge(r,u).cutvalue;a+=c?-l:l}}})),a}function kg(e,t){arguments.length<2&&(t=e.nodes()[0]),Sg(e,{},1,t)}function Sg(e,t,r,n,o){var i=r,a=e.node(n);return t[n]=!0,dg.forEach(e.neighbors(n),(function(o){dg.has(t,o)||(r=Sg(e,t,r,o,n))})),a.low=i,a.lim=r++,o?a.parent=o:delete a.parent,r}function Dg(e){return dg.find(e.edges(),(function(t){return e.edge(t).cutvalue<0}))}function jg(e,t,r){var n=r.v,o=r.w;t.hasEdge(n,o)||(n=r.w,o=r.v);var i=e.node(n),a=e.node(o),s=i,u=!1;i.lim>a.lim&&(s=a,u=!0);var c=dg.filter(t.edges(),(function(t){return u===Ag(e,e.node(t.v),s)&&u!==Ag(e,e.node(t.w),s)}));return dg.minBy(c,(function(e){return gg(t,e)}))}function Cg(e,t,r,n){var o=r.v,i=r.w;e.removeEdge(o,i),e.setEdge(n.v,n.w,{}),kg(e),wg(e,t),function(e,t){var r=dg.find(e.nodes(),(function(e){return!t.node(e).parent})),n=yg(e,r);n=n.slice(1),dg.forEach(n,(function(r){var n=e.node(r).parent,o=t.edge(r,n),i=!1;o||(o=t.edge(n,r),i=!0),t.node(r).rank=t.node(n).rank+(i?o.minlen:-o.minlen)}))}(e,t)}function Ag(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}xg.initLowLimValues=kg,xg.initCutValues=wg,xg.calcCutValue=Eg,xg.leaveEdge=Dg,xg.enterEdge=jg,xg.exchangeEdges=Cg;var Og=ig.longestPath,Ig=cg,Pg=bg,Fg=function(e){switch(e.graph().ranker){case"network-simplex":default:Tg(e);break;case"tight-tree":!function(e){Og(e),Ig(e)}(e);break;case"longest-path":Mg(e)}};var Mg=Og;function Tg(e){Pg(e)}var Ng=Tp,Lg=function(e){var t=function(e){var t={},r=0;function n(o){var i=r;Ng.forEach(e.children(o),n),t[o]={low:i,lim:r++}}return Ng.forEach(e.children(),n),t}(e);Ng.forEach(e.graph().dummyChains,(function(r){for(var n=e.node(r),o=n.edgeObj,i=function(e,t,r,n){var o,i,a=[],s=[],u=Math.min(t[r].low,t[n].low),c=Math.max(t[r].lim,t[n].lim);o=r;do{o=e.parent(o),a.push(o)}while(o&&(t[o].low>u||c>t[o].lim));i=o,o=n;for(;(o=e.parent(o))!==i;)s.push(o);return{path:a.concat(s.reverse()),lca:i}}(e,t,o.v,o.w),a=i.path,s=i.lca,u=0,c=a[u],h=!0;r!==o.w;){if(n=e.node(r),h){for(;(c=a[u])!==s&&e.node(c).maxRank<n.rank;)u++;c===s&&(h=!1)}if(!h){for(;u<a.length-1&&e.node(c=a[u+1]).minRank<=n.rank;)u++;c=a[u]}e.setParent(r,c),r=e.successors(r)[0]}}))};var Bg=Tp,Rg=Xp,Vg={run:function(e){var t=Rg.addDummyNode(e,"root",{},"_root"),r=function(e){var t={};function r(n,o){var i=e.children(n);i&&i.length&&Bg.forEach(i,(function(e){r(e,o+1)})),t[n]=o}return Bg.forEach(e.children(),(function(e){r(e,1)})),t}(e),n=Bg.max(Bg.values(r))-1,o=2*n+1;e.graph().nestingRoot=t,Bg.forEach(e.edges(),(function(t){e.edge(t).minlen*=o}));var i=function(e){return Bg.reduce(e.edges(),(function(t,r){return t+e.edge(r).weight}),0)}(e)+1;Bg.forEach(e.children(),(function(a){zg(e,t,o,i,n,r,a)})),e.graph().nodeRankFactor=o},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,Bg.forEach(e.edges(),(function(t){e.edge(t).nestingEdge&&e.removeEdge(t)}))}};function zg(e,t,r,n,o,i,a){var s=e.children(a);if(s.length){var u=Rg.addBorderNode(e,"_bt"),c=Rg.addBorderNode(e,"_bb"),h=e.node(a);e.setParent(u,a),h.borderTop=u,e.setParent(c,a),h.borderBottom=c,Bg.forEach(s,(function(s){zg(e,t,r,n,o,i,s);var h=e.node(s),l=h.borderTop?h.borderTop:s,f=h.borderBottom?h.borderBottom:s,d=h.borderTop?n:2*n,p=l!==f?1:o-i[a]+1;e.setEdge(u,l,{weight:d,minlen:p,nestingEdge:!0}),e.setEdge(f,c,{weight:d,minlen:p,nestingEdge:!0})})),e.parent(a)||e.setEdge(t,u,{weight:0,minlen:o+i[a]})}else a!==t&&e.setEdge(t,a,{weight:0,minlen:r})}var Gg=Tp,Ug=Xp,Hg=function(e){Gg.forEach(e.children(),(function t(r){var n=e.children(r),o=e.node(r);if(n.length&&Gg.forEach(n,t),Gg.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var i=o.minRank,a=o.maxRank+1;i<a;++i)qg(e,"borderLeft","_bl",r,o,i),qg(e,"borderRight","_br",r,o,i)}}))};function qg(e,t,r,n,o,i){var a={width:0,height:0,rank:i,borderType:t},s=o[t][i-1],u=Ug.addDummyNode(e,"border",a,r);o[t][i]=u,e.setParent(u,n),s&&e.setEdge(s,u,{weight:1})}var Wg=Tp,Yg={adjust:function(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||Kg(e)},undo:function(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||function(e){Wg.forEach(e.nodes(),(function(t){$g(e.node(t))})),Wg.forEach(e.edges(),(function(t){var r=e.edge(t);Wg.forEach(r.points,$g),Wg.has(r,"y")&&$g(r)}))}(e);"lr"!==t&&"rl"!==t||(!function(e){Wg.forEach(e.nodes(),(function(t){Qg(e.node(t))})),Wg.forEach(e.edges(),(function(t){var r=e.edge(t);Wg.forEach(r.points,Qg),Wg.has(r,"x")&&Qg(r)}))}(e),Kg(e))}};function Kg(e){Wg.forEach(e.nodes(),(function(t){Zg(e.node(t))})),Wg.forEach(e.edges(),(function(t){Zg(e.edge(t))}))}function Zg(e){var t=e.width;e.width=e.height,e.height=t}function $g(e){e.y=-e.y}function Qg(e){var t=e.x;e.x=e.y,e.y=t}var Xg=Tp,Jg=function(e){var t={},r=Xg.filter(e.nodes(),(function(t){return!e.children(t).length})),n=Xg.max(Xg.map(r,(function(t){return e.node(t).rank}))),o=Xg.map(Xg.range(n+1),(function(){return[]}));function i(r){if(!Xg.has(t,r)){t[r]=!0;var n=e.node(r);o[n.rank].push(r),Xg.forEach(e.successors(r),i)}}var a=Xg.sortBy(r,(function(t){return e.node(t).rank}));return Xg.forEach(a,i),o};var ev=Tp,tv=function(e,t){for(var r=0,n=1;n<t.length;++n)r+=rv(e,t[n-1],t[n]);return r};function rv(e,t,r){for(var n=ev.zipObject(r,ev.map(r,(function(e,t){return t}))),o=ev.flatten(ev.map(t,(function(t){return ev.sortBy(ev.map(e.outEdges(t),(function(t){return{pos:n[t.w],weight:e.edge(t).weight}})),"pos")})),!0),i=1;i<r.length;)i<<=1;var a=2*i-1;i-=1;var s=ev.map(new Array(a),(function(){return 0})),u=0;return ev.forEach(o.forEach((function(e){var t=e.pos+i;s[t]+=e.weight;for(var r=0;t>0;)t%2&&(r+=s[t+1]),s[t=t-1>>1]+=e.weight;u+=e.weight*r}))),u}var nv=Tp;var ov=Tp;var iv=Tp,av=Xp;function sv(e,t,r){for(var n;t.length&&(n=iv.last(t)).i<=r;)t.pop(),e.push(n.vs),r++;return r}var uv=Tp,cv=function(e,t){return nv.map(t,(function(t){var r=e.inEdges(t);if(r.length){var n=nv.reduce(r,(function(t,r){var n=e.edge(r),o=e.node(r.v);return{sum:t.sum+n.weight*o.order,weight:t.weight+n.weight}}),{sum:0,weight:0});return{v:t,barycenter:n.sum/n.weight,weight:n.weight}}return{v:t}}))},hv=function(e,t){var r={};return ov.forEach(e,(function(e,t){var n=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};ov.isUndefined(e.barycenter)||(n.barycenter=e.barycenter,n.weight=e.weight)})),ov.forEach(t.edges(),(function(e){var t=r[e.v],n=r[e.w];ov.isUndefined(t)||ov.isUndefined(n)||(n.indegree++,t.out.push(r[e.w]))})),function(e){var t=[];function r(e){return function(t){t.merged||(ov.isUndefined(t.barycenter)||ov.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&function(e,t){var r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight);t.weight&&(r+=t.barycenter*t.weight,n+=t.weight);e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}function n(t){return function(r){r.in.push(t),0==--r.indegree&&e.push(r)}}for(;e.length;){var o=e.pop();t.push(o),ov.forEach(o.in.reverse(),r(o)),ov.forEach(o.out,n(o))}return ov.map(ov.filter(t,(function(e){return!e.merged})),(function(e){return ov.pick(e,["vs","i","barycenter","weight"])}))}(ov.filter(r,(function(e){return!e.indegree})))},lv=function(e,t){var r=av.partition(e,(function(e){return iv.has(e,"barycenter")})),n=r.lhs,o=iv.sortBy(r.rhs,(function(e){return-e.i})),i=[],a=0,s=0,u=0;n.sort((c=!!t,function(e,t){return e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:c?t.i-e.i:e.i-t.i})),u=sv(i,o,u),iv.forEach(n,(function(e){u+=e.vs.length,i.push(e.vs),a+=e.barycenter*e.weight,s+=e.weight,u=sv(i,o,u)}));var c;var h={vs:iv.flatten(i,!0)};s&&(h.barycenter=a/s,h.weight=s);return h},fv=function e(t,r,n,o){var i=t.children(r),a=t.node(r),s=a?a.borderLeft:void 0,u=a?a.borderRight:void 0,c={};s&&(i=uv.filter(i,(function(e){return e!==s&&e!==u})));var h=cv(t,i);uv.forEach(h,(function(r){if(t.children(r.v).length){var i=e(t,r.v,n,o);c[r.v]=i,uv.has(i,"barycenter")&&(a=r,s=i,uv.isUndefined(a.barycenter)?(a.barycenter=s.barycenter,a.weight=s.weight):(a.barycenter=(a.barycenter*a.weight+s.barycenter*s.weight)/(a.weight+s.weight),a.weight+=s.weight))}var a,s}));var l=hv(h,n);!function(e,t){uv.forEach(e,(function(e){e.vs=uv.flatten(e.vs.map((function(e){return t[e]?t[e].vs:e})),!0)}))}(l,c);var f=lv(l,o);if(s&&(f.vs=uv.flatten([s,f.vs,u],!0),t.predecessors(s).length)){var d=t.node(t.predecessors(s)[0]),p=t.node(t.predecessors(u)[0]);uv.has(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+d.order+p.order)/(f.weight+2),f.weight+=2}return f};var dv=Tp,pv=Al.Graph,gv=function(e,t,r){var n=function(e){var t;for(;e.hasNode(t=dv.uniqueId("_root")););return t}(e),o=new pv({compound:!0}).setGraph({root:n}).setDefaultNodeLabel((function(t){return e.node(t)}));return dv.forEach(e.nodes(),(function(i){var a=e.node(i),s=e.parent(i);(a.rank===t||a.minRank<=t&&t<=a.maxRank)&&(o.setNode(i),o.setParent(i,s||n),dv.forEach(e[r](i),(function(t){var r=t.v===i?t.w:t.v,n=o.edge(r,i),a=dv.isUndefined(n)?0:n.weight;o.setEdge(r,i,{weight:e.edge(t).weight+a})})),dv.has(a,"minRank")&&o.setNode(i,{borderLeft:a.borderLeft[t],borderRight:a.borderRight[t]}))})),o};var vv=Tp;var yv=Tp,_v=Jg,mv=tv,bv=fv,xv=gv,wv=function(e,t,r){var n,o={};vv.forEach(r,(function(r){for(var i,a,s=e.parent(r);s;){if((i=e.parent(s))?(a=o[i],o[i]=s):(a=n,n=s),a&&a!==s)return void t.setEdge(a,s);s=i}}))},Ev=Al.Graph,kv=Xp,Sv=function(e){var t=kv.maxRank(e),r=Dv(e,yv.range(1,t+1),"inEdges"),n=Dv(e,yv.range(t-1,-1,-1),"outEdges"),o=_v(e);Cv(e,o);for(var i,a=Number.POSITIVE_INFINITY,s=0,u=0;u<4;++s,++u){jv(s%2?r:n,s%4>=2),o=kv.buildLayerMatrix(e);var c=mv(e,o);c<a&&(u=0,i=yv.cloneDeep(o),a=c)}Cv(e,i)};function Dv(e,t,r){return yv.map(t,(function(t){return xv(e,t,r)}))}function jv(e,t){var r=new Ev;yv.forEach(e,(function(e){var n=e.graph().root,o=bv(e,n,r,t);yv.forEach(o.vs,(function(t,r){e.node(t).order=r})),wv(e,r,o.vs)}))}function Cv(e,t){yv.forEach(t,(function(t){yv.forEach(t,(function(t,r){e.node(t).order=r}))}))}var Av=Tp,Ov=Al.Graph,Iv=Xp,Pv=function(e){var t,r=Iv.buildLayerMatrix(e),n=Av.merge(Fv(e,r),Mv(e,r)),o={};Av.forEach(["u","d"],(function(i){t="u"===i?r:Av.values(r).reverse(),Av.forEach(["l","r"],(function(r){"r"===r&&(t=Av.map(t,(function(e){return Av.values(e).reverse()})));var a=("u"===i?e.predecessors:e.successors).bind(e),s=Lv(e,t,n,a),u=Bv(e,t,s.root,s.align,"r"===r);"r"===r&&(u=Av.mapValues(u,(function(e){return-e}))),o[i+r]=u}))}));var i=Rv(e,o);return Vv(o,i),zv(o,e.graph().align)};function Fv(e,t){var r={};return Av.reduce(t,(function(t,n){var o=0,i=0,a=t.length,s=Av.last(n);return Av.forEach(n,(function(t,u){var c=function(e,t){if(e.node(t).dummy)return Av.find(e.predecessors(t),(function(t){return e.node(t).dummy}))}(e,t),h=c?e.node(c).order:a;(c||t===s)&&(Av.forEach(n.slice(i,u+1),(function(t){Av.forEach(e.predecessors(t),(function(n){var i=e.node(n),a=i.order;!(a<o||h<a)||i.dummy&&e.node(t).dummy||Tv(r,n,t)}))})),i=u+1,o=h)})),n})),r}function Mv(e,t){var r={};function n(t,n,o,i,a){var s;Av.forEach(Av.range(n,o),(function(n){s=t[n],e.node(s).dummy&&Av.forEach(e.predecessors(s),(function(t){var n=e.node(t);n.dummy&&(n.order<i||n.order>a)&&Tv(r,t,s)}))}))}return Av.reduce(t,(function(t,r){var o,i=-1,a=0;return Av.forEach(r,(function(s,u){if("border"===e.node(s).dummy){var c=e.predecessors(s);c.length&&(o=e.node(c[0]).order,n(r,a,u,i,o),a=u,i=o)}n(r,a,r.length,o,t.length)})),r})),r}function Tv(e,t,r){if(t>r){var n=t;t=r,r=n}var o=e[t];o||(e[t]=o={}),o[r]=!0}function Nv(e,t,r){if(t>r){var n=t;t=r,r=n}return Av.has(e[t],r)}function Lv(e,t,r,n){var o={},i={},a={};return Av.forEach(t,(function(e){Av.forEach(e,(function(e,t){o[e]=e,i[e]=e,a[e]=t}))})),Av.forEach(t,(function(e){var t=-1;Av.forEach(e,(function(e){var s=n(e);if(s.length){s=Av.sortBy(s,(function(e){return a[e]}));for(var u=(s.length-1)/2,c=Math.floor(u),h=Math.ceil(u);c<=h;++c){var l=s[c];i[e]===e&&t<a[l]&&!Nv(r,e,l)&&(i[l]=e,i[e]=o[e]=o[l],t=a[l])}}}))})),{root:o,align:i}}function Bv(e,t,r,n,o){var i={},a=function(e,t,r,n){var o=new Ov,i=e.graph(),a=function(e,t,r){return function(n,o,i){var a,s=n.node(o),u=n.node(i),c=0;if(c+=s.width/2,Av.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":a=-s.width/2;break;case"r":a=s.width/2}if(a&&(c+=r?a:-a),a=0,c+=(s.dummy?t:e)/2,c+=(u.dummy?t:e)/2,c+=u.width/2,Av.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":a=u.width/2;break;case"r":a=-u.width/2}return a&&(c+=r?a:-a),a=0,c}}(i.nodesep,i.edgesep,n);return Av.forEach(t,(function(t){var n;Av.forEach(t,(function(t){var i=r[t];if(o.setNode(i),n){var s=r[n],u=o.edge(s,i);o.setEdge(s,i,Math.max(a(e,t,n),u||0))}n=t}))})),o}(e,t,r,o),s=o?"borderLeft":"borderRight";function u(e,t){for(var r=a.nodes(),n=r.pop(),o={};n;)o[n]?e(n):(o[n]=!0,r.push(n),r=r.concat(t(n))),n=r.pop()}return u((function(e){i[e]=a.inEdges(e).reduce((function(e,t){return Math.max(e,i[t.v]+a.edge(t))}),0)}),a.predecessors.bind(a)),u((function(t){var r=a.outEdges(t).reduce((function(e,t){return Math.min(e,i[t.w]-a.edge(t))}),Number.POSITIVE_INFINITY),n=e.node(t);r!==Number.POSITIVE_INFINITY&&n.borderType!==s&&(i[t]=Math.max(i[t],r))}),a.successors.bind(a)),Av.forEach(n,(function(e){i[e]=i[r[e]]})),i}function Rv(e,t){return Av.minBy(Av.values(t),(function(t){var r=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY;return Av.forIn(t,(function(t,o){var i=function(e,t){return e.node(t).width}(e,o)/2;r=Math.max(t+i,r),n=Math.min(t-i,n)})),r-n}))}function Vv(e,t){var r=Av.values(t),n=Av.min(r),o=Av.max(r);Av.forEach(["u","d"],(function(r){Av.forEach(["l","r"],(function(i){var a,s=r+i,u=e[s];if(u!==t){var c=Av.values(u);(a="l"===i?n-Av.min(c):o-Av.max(c))&&(e[s]=Av.mapValues(u,(function(e){return e+a})))}}))}))}function zv(e,t){return Av.mapValues(e.ul,(function(r,n){if(t)return e[t.toLowerCase()][n];var o=Av.sortBy(Av.map(e,n));return(o[1]+o[2])/2}))}var Gv=Tp,Uv=Xp,Hv=Pv,qv=function(e){(function(e){var t=Uv.buildLayerMatrix(e),r=e.graph().ranksep,n=0;Gv.forEach(t,(function(t){var o=Gv.max(Gv.map(t,(function(t){return e.node(t).height})));Gv.forEach(t,(function(t){e.node(t).y=n+o/2})),n+=o+r}))})(e=Uv.asNonCompoundGraph(e)),Gv.forEach(Hv(e),(function(t,r){e.node(r).x=t}))};var Wv=Tp,Yv=Zp,Kv=ng,Zv=Fg,$v=Xp.normalizeRanks,Qv=Lg,Xv=Xp.removeEmptyRanks,Jv=Vg,ey=Hg,ty=Yg,ry=Sv,ny=qv,oy=Xp,iy=Al.Graph,ay=function(e,t){var r=t&&t.debugTiming?oy.time:oy.notime;r("layout",(function(){var t=r(" buildLayoutGraph",(function(){return function(e){var t=new iy({multigraph:!0,compound:!0}),r=vy(e.graph());return t.setGraph(Wv.merge({},uy,gy(r,sy),Wv.pick(r,cy))),Wv.forEach(e.nodes(),(function(r){var n=vy(e.node(r));t.setNode(r,Wv.defaults(gy(n,hy),ly)),t.setParent(r,e.parent(r))})),Wv.forEach(e.edges(),(function(r){var n=vy(e.edge(r));t.setEdge(r,Wv.merge({},dy,gy(n,fy),Wv.pick(n,py)))})),t}(e)}));r(" runLayout",(function(){!function(e,t){t(" makeSpaceForEdgeLabels",(function(){!function(e){var t=e.graph();t.ranksep/=2,Wv.forEach(e.edges(),(function(r){var n=e.edge(r);n.minlen*=2,"c"!==n.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?n.width+=n.labeloffset:n.height+=n.labeloffset)}))}(e)})),t(" removeSelfEdges",(function(){!function(e){Wv.forEach(e.edges(),(function(t){if(t.v===t.w){var r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}}))}(e)})),t(" acyclic",(function(){Yv.run(e)})),t(" nestingGraph.run",(function(){Jv.run(e)})),t(" rank",(function(){Zv(oy.asNonCompoundGraph(e))})),t(" injectEdgeLabelProxies",(function(){!function(e){Wv.forEach(e.edges(),(function(t){var r=e.edge(t);if(r.width&&r.height){var n=e.node(t.v),o={rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t};oy.addDummyNode(e,"edge-proxy",o,"_ep")}}))}(e)})),t(" removeEmptyRanks",(function(){Xv(e)})),t(" nestingGraph.cleanup",(function(){Jv.cleanup(e)})),t(" normalizeRanks",(function(){$v(e)})),t(" assignRankMinMax",(function(){!function(e){var t=0;Wv.forEach(e.nodes(),(function(r){var n=e.node(r);n.borderTop&&(n.minRank=e.node(n.borderTop).rank,n.maxRank=e.node(n.borderBottom).rank,t=Wv.max(t,n.maxRank))})),e.graph().maxRank=t}(e)})),t(" removeEdgeLabelProxies",(function(){!function(e){Wv.forEach(e.nodes(),(function(t){var r=e.node(t);"edge-proxy"===r.dummy&&(e.edge(r.e).labelRank=r.rank,e.removeNode(t))}))}(e)})),t(" normalize.run",(function(){Kv.run(e)})),t(" parentDummyChains",(function(){Qv(e)})),t(" addBorderSegments",(function(){ey(e)})),t(" order",(function(){ry(e)})),t(" insertSelfEdges",(function(){!function(e){var t=oy.buildLayerMatrix(e);Wv.forEach(t,(function(t){var r=0;Wv.forEach(t,(function(t,n){var o=e.node(t);o.order=n+r,Wv.forEach(o.selfEdges,(function(t){oy.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:o.rank,order:n+ ++r,e:t.e,label:t.label},"_se")})),delete o.selfEdges}))}))}(e)})),t(" adjustCoordinateSystem",(function(){ty.adjust(e)})),t(" position",(function(){ny(e)})),t(" positionSelfEdges",(function(){!function(e){Wv.forEach(e.nodes(),(function(t){var r=e.node(t);if("selfedge"===r.dummy){var n=e.node(r.e.v),o=n.x+n.width/2,i=n.y,a=r.x-o,s=n.height/2;e.setEdge(r.e,r.label),e.removeNode(t),r.label.points=[{x:o+2*a/3,y:i-s},{x:o+5*a/6,y:i-s},{x:o+a,y:i},{x:o+5*a/6,y:i+s},{x:o+2*a/3,y:i+s}],r.label.x=r.x,r.label.y=r.y}}))}(e)})),t(" removeBorderNodes",(function(){!function(e){Wv.forEach(e.nodes(),(function(t){if(e.children(t).length){var r=e.node(t),n=e.node(r.borderTop),o=e.node(r.borderBottom),i=e.node(Wv.last(r.borderLeft)),a=e.node(Wv.last(r.borderRight));r.width=Math.abs(a.x-i.x),r.height=Math.abs(o.y-n.y),r.x=i.x+r.width/2,r.y=n.y+r.height/2}})),Wv.forEach(e.nodes(),(function(t){"border"===e.node(t).dummy&&e.removeNode(t)}))}(e)})),t(" normalize.undo",(function(){Kv.undo(e)})),t(" fixupEdgeLabelCoords",(function(){!function(e){Wv.forEach(e.edges(),(function(t){var r=e.edge(t);if(Wv.has(r,"x"))switch("l"!==r.labelpos&&"r"!==r.labelpos||(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}}))}(e)})),t(" undoCoordinateSystem",(function(){ty.undo(e)})),t(" translateGraph",(function(){!function(e){var t=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,o=0,i=e.graph(),a=i.marginx||0,s=i.marginy||0;function u(e){var i=e.x,a=e.y,s=e.width,u=e.height;t=Math.min(t,i-s/2),r=Math.max(r,i+s/2),n=Math.min(n,a-u/2),o=Math.max(o,a+u/2)}Wv.forEach(e.nodes(),(function(t){u(e.node(t))})),Wv.forEach(e.edges(),(function(t){var r=e.edge(t);Wv.has(r,"x")&&u(r)})),t-=a,n-=s,Wv.forEach(e.nodes(),(function(r){var o=e.node(r);o.x-=t,o.y-=n})),Wv.forEach(e.edges(),(function(r){var o=e.edge(r);Wv.forEach(o.points,(function(e){e.x-=t,e.y-=n})),Wv.has(o,"x")&&(o.x-=t),Wv.has(o,"y")&&(o.y-=n)})),i.width=r-t+a,i.height=o-n+s}(e)})),t(" assignNodeIntersects",(function(){!function(e){Wv.forEach(e.edges(),(function(t){var r,n,o=e.edge(t),i=e.node(t.v),a=e.node(t.w);o.points?(r=o.points[0],n=o.points[o.points.length-1]):(o.points=[],r=a,n=i),o.points.unshift(oy.intersectRect(i,r)),o.points.push(oy.intersectRect(a,n))}))}(e)})),t(" reversePoints",(function(){!function(e){Wv.forEach(e.edges(),(function(t){var r=e.edge(t);r.reversed&&r.points.reverse()}))}(e)})),t(" acyclic.undo",(function(){Yv.undo(e)}))}(t,r)})),r(" updateInputGraph",(function(){!function(e,t){Wv.forEach(e.nodes(),(function(r){var n=e.node(r),o=t.node(r);n&&(n.x=o.x,n.y=o.y,t.children(r).length&&(n.width=o.width,n.height=o.height))})),Wv.forEach(e.edges(),(function(r){var n=e.edge(r),o=t.edge(r);n.points=o.points,Wv.has(o,"x")&&(n.x=o.x,n.y=o.y)})),e.graph().width=t.graph().width,e.graph().height=t.graph().height}(e,t)}))}))};var sy=["nodesep","edgesep","ranksep","marginx","marginy"],uy={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},cy=["acyclicer","ranker","rankdir","align"],hy=["width","height"],ly={width:0,height:0},fy=["minlen","weight","width","height","labeloffset"],dy={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},py=["labelpos"];function gy(e,t){return Wv.mapValues(Wv.pick(e,t),Number)}function vy(e){var t={};return Wv.forEach(e,(function(e,r){t[r.toLowerCase()]=e})),t}var yy=Tp,_y=Xp,my=Al.Graph;var by={graphlib:Al,layout:ay,debug:{debugOrdering:function(e){var t=_y.buildLayerMatrix(e),r=new my({compound:!0,multigraph:!0}).setGraph({});return yy.forEach(e.nodes(),(function(t){r.setNode(t,{label:t}),r.setParent(t,"layer"+e.node(t).rank)})),yy.forEach(e.edges(),(function(e){r.setEdge(e.v,e.w,{},e.name)})),yy.forEach(t,(function(e,t){var n="layer"+t;r.setNode(n,{rank:"same"}),yy.reduce(e,(function(e,t){return r.setEdge(e,t,{style:"invis"}),t}))})),r}},util:{time:Xp.time,notime:Xp.notime},version:"0.8.5"},xy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t}(by.graphlib.Graph),wy=function(){function e(){this._g=new xy({multigraph:!0,compound:!0}),this._g.setGraph({}),this._g.setDefaultNodeLabel((function(){return{debug:"error"}})),this._g.setDefaultEdgeLabel((function(){return{debug:"error"}}))}return e.prototype.parent=function(e){return this._g.parent(e)},e.prototype.filterNodes=function(e){var t=[];return this.eachNode((function(r){e(r)&&t.push(r)})),t},e.prototype.eachNode=function(e){this._g.nodes().forEach((function(t){e(t,this.node(t))}),this)},e.prototype.filterEdges=function(e){var t=[];return this.eachEdge((function(r){e(r)&&t.push(r)})),t},e.prototype.eachEdge=function(e){this._g.edges().forEach((function(t){e(t,t.v,t.w,this.edge(t))}),this)},e.prototype.setData=function(e,t,r,n,o){for(var i=this,a={addedVertices:[],addedEdges:[]},s=e.concat(t),u=0;u<s.length;++u){var c=s[u];o&&this._g.hasNode(c._id)||(this._g.setNode(c._id,c),a.addedVertices.push(c))}for(u=0;u<r.length;++u){var h=r[u];o&&this._g.hasEdge(h._id)||(h._sourceVertex&&h._targetVertex?(this._g.setEdge(h._sourceVertex._id,h._targetVertex._id,h,h._id),a.addedEdges.push(h)):console.warn("Bad edge definition"))}if(n)for(u=0;u<n.length;++u)this._g.setParent(n[u].child._id,n[u].parent._id);if(o){var l=r.map((function(e){return e._id}));this.filterEdges((function(e){return l.indexOf(e.name)<0})).forEach((function(e){return i._g.removeEdge(e.v,e.w)}));var f=s.map((function(e){return e._id}));this.filterNodes((function(e){return f.indexOf(e)<0})).forEach((function(e){return i._g.removeNode(e)}))}return a},e.prototype.node=function(e){return this._g.node(e)},e.prototype.nodeCount=function(){return this._g.nodeCount()},e.prototype.nodes=function(){var e=this;return this._g.nodes().map((function(t){return e._g.node(t)}))},e.prototype.nodeEdges=function(e){return this._g.nodeEdges(e)},e.prototype.edge=function(e){return this._g.edge(e)},e.prototype.edges=function(){var e=this;return this._g.edges().map((function(t){return e._g.edge(t)}))},e.prototype.neighbors=function(e){var t=this;return this._g.neighbors(e).map((function(e){return t._g.node(e)}))},e.prototype.singleNeighbors=function(e){var t=this;return this._g.neighbors(e).filter((function(e){return 1===t._g.neighbors(e).length})).map((function(e){return t._g.node(e)}))},e.prototype.gatherShortestPath=function(e,t){for(var r=[],n=t,o=e[n];o;){if(o.distance<1/0&&o.predecessor){var i=this._g.nodeEdges(n,o.predecessor)[0];r.push(this._g.edge(i))}o=e[n=o.predecessor]}return r},e.prototype.shortestPath=function(e,t){return this.gatherShortestPath(by.graphlib.alg.dijkstra(this._g,e),t)},e.prototype.undirectedShortestPath=function(e,t){var r=this;return this.gatherShortestPath(by.graphlib.alg.dijkstra(this._g,e,null,(function(e){return r._g.nodeEdges(e)})),t)},e.prototype.getJSON=function(){var e=by.graphlib.json.write(this._g);return JSON.stringify(e,(function(e,t){return"value"===e?t._text&&t._text._text?t._text._text:t._id:t})," ")},e}();function Ey(e,t){var r;function n(){var n,o,i=r.length,a=0,s=0;for(n=0;n<i;++n)a+=(o=r[n]).x,s+=o.y;for(a=a/i-e,s=s/i-t,n=0;n<i;++n)(o=r[n]).x-=a,o.y-=s}return null==e&&(e=0),null==t&&(t=0),n.initialize=function(e){r=e},n.x=function(t){return arguments.length?(e=+t,n):e},n.y=function(e){return arguments.length?(t=+e,n):t},n}function ky(e){return function(){return e}}function Sy(){return 1e-6*(Math.random()-.5)}function Dy(e,t,r,n){if(isNaN(t)||isNaN(r))return e;var o,i,a,s,u,c,h,l,f,d=e._root,p={data:n},g=e._x0,v=e._y0,y=e._x1,_=e._y1;if(!d)return e._root=p,e;for(;d.length;)if((c=t>=(i=(g+y)/2))?g=i:y=i,(h=r>=(a=(v+_)/2))?v=a:_=a,o=d,!(d=d[l=h<<1|c]))return o[l]=p,e;if(s=+e._x.call(null,d.data),u=+e._y.call(null,d.data),t===s&&r===u)return p.next=d,o?o[l]=p:e._root=p,e;do{o=o?o[l]=new Array(4):e._root=new Array(4),(c=t>=(i=(g+y)/2))?g=i:y=i,(h=r>=(a=(v+_)/2))?v=a:_=a}while((l=h<<1|c)==(f=(u>=a)<<1|s>=i));return o[f]=d,o[l]=p,e}function jy(e,t,r,n,o){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=o}function Cy(e){return e[0]}function Ay(e){return e[1]}function Oy(e,t,r){var n=new Iy(null==t?Cy:t,null==r?Ay:r,NaN,NaN,NaN,NaN);return null==e?n:n.addAll(e)}function Iy(e,t,r,n,o,i){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=o,this._y1=i,this._root=void 0}function Py(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var Fy=Oy.prototype=Iy.prototype;function My(e){return e.index}function Ty(e,t){var r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function Ny(e){var r,n,o,i,a,s=My,u=function(e){return 1/Math.min(i[e.source.index],i[e.target.index])},c=ky(30),h=1;function l(t){for(var o=0,i=e.length;o<h;++o)for(var s,u,c,l,f,d,p,g=0;g<i;++g)u=(s=e[g]).source,l=(c=s.target).x+c.vx-u.x-u.vx||Sy(),f=c.y+c.vy-u.y-u.vy||Sy(),l*=d=((d=Math.sqrt(l*l+f*f))-n[g])/d*t*r[g],f*=d,c.vx-=l*(p=a[g]),c.vy-=f*p,u.vx+=l*(p=1-p),u.vy+=f*p}function f(){if(o){var u,c,h=o.length,l=e.length,f=t.map(o,s);for(u=0,i=new Array(h);u<l;++u)(c=e[u]).index=u,"object"!=typeof c.source&&(c.source=Ty(f,c.source)),"object"!=typeof c.target&&(c.target=Ty(f,c.target)),i[c.source.index]=(i[c.source.index]||0)+1,i[c.target.index]=(i[c.target.index]||0)+1;for(u=0,a=new Array(l);u<l;++u)c=e[u],a[u]=i[c.source.index]/(i[c.source.index]+i[c.target.index]);r=new Array(l),d(),n=new Array(l),p()}}function d(){if(o)for(var t=0,n=e.length;t<n;++t)r[t]=+u(e[t],t,e)}function p(){if(o)for(var t=0,r=e.length;t<r;++t)n[t]=+c(e[t],t,e)}return null==e&&(e=[]),l.initialize=function(e){o=e,f()},l.links=function(t){return arguments.length?(e=t,f(),l):e},l.id=function(e){return arguments.length?(s=e,l):s},l.iterations=function(e){return arguments.length?(h=+e,l):h},l.strength=function(e){return arguments.length?(u="function"==typeof e?e:ky(+e),d(),l):u},l.distance=function(e){return arguments.length?(c="function"==typeof e?e:ky(+e),p(),l):c},l}Fy.copy=function(){var e,t,r=new Iy(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return r;if(!n.length)return r._root=Py(n),r;for(e=[{source:n,target:r._root=new Array(4)}];n=e.pop();)for(var o=0;o<4;++o)(t=n.source[o])&&(t.length?e.push({source:t,target:n.target[o]=new Array(4)}):n.target[o]=Py(t));return r},Fy.add=function(e){var t=+this._x.call(null,e),r=+this._y.call(null,e);return Dy(this.cover(t,r),t,r,e)},Fy.addAll=function(e){var t,r,n,o,i=e.length,a=new Array(i),s=new Array(i),u=1/0,c=1/0,h=-1/0,l=-1/0;for(r=0;r<i;++r)isNaN(n=+this._x.call(null,t=e[r]))||isNaN(o=+this._y.call(null,t))||(a[r]=n,s[r]=o,n<u&&(u=n),n>h&&(h=n),o<c&&(c=o),o>l&&(l=o));if(u>h||c>l)return this;for(this.cover(u,c).cover(h,l),r=0;r<i;++r)Dy(this,a[r],s[r],e[r]);return this},Fy.cover=function(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var r=this._x0,n=this._y0,o=this._x1,i=this._y1;if(isNaN(r))o=(r=Math.floor(e))+1,i=(n=Math.floor(t))+1;else{for(var a,s,u=o-r,c=this._root;r>e||e>=o||n>t||t>=i;)switch(s=(t<n)<<1|e<r,(a=new Array(4))[s]=c,c=a,u*=2,s){case 0:o=r+u,i=n+u;break;case 1:r=o-u,i=n+u;break;case 2:o=r+u,n=i-u;break;case 3:r=o-u,n=i-u}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=n,this._x1=o,this._y1=i,this},Fy.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},Fy.extent=function(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Fy.find=function(e,t,r){var n,o,i,a,s,u,c,h=this._x0,l=this._y0,f=this._x1,d=this._y1,p=[],g=this._root;for(g&&p.push(new jy(g,h,l,f,d)),null==r?r=1/0:(h=e-r,l=t-r,f=e+r,d=t+r,r*=r);u=p.pop();)if(!(!(g=u.node)||(o=u.x0)>f||(i=u.y0)>d||(a=u.x1)<h||(s=u.y1)<l))if(g.length){var v=(o+a)/2,y=(i+s)/2;p.push(new jy(g[3],v,y,a,s),new jy(g[2],o,y,v,s),new jy(g[1],v,i,a,y),new jy(g[0],o,i,v,y)),(c=(t>=y)<<1|e>=v)&&(u=p[p.length-1],p[p.length-1]=p[p.length-1-c],p[p.length-1-c]=u)}else{var _=e-+this._x.call(null,g.data),m=t-+this._y.call(null,g.data),b=_*_+m*m;if(b<r){var x=Math.sqrt(r=b);h=e-x,l=t-x,f=e+x,d=t+x,n=g.data}}return n},Fy.remove=function(e){if(isNaN(i=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e)))return this;var t,r,n,o,i,a,s,u,c,h,l,f,d=this._root,p=this._x0,g=this._y0,v=this._x1,y=this._y1;if(!d)return this;if(d.length)for(;;){if((c=i>=(s=(p+v)/2))?p=s:v=s,(h=a>=(u=(g+y)/2))?g=u:y=u,t=d,!(d=d[l=h<<1|c]))return this;if(!d.length)break;(t[l+1&3]||t[l+2&3]||t[l+3&3])&&(r=t,f=l)}for(;d.data!==e;)if(n=d,!(d=d.next))return this;return(o=d.next)&&delete d.next,n?(o?n.next=o:delete n.next,this):t?(o?t[l]=o:delete t[l],(d=t[0]||t[1]||t[2]||t[3])&&d===(t[3]||t[2]||t[1]||t[0])&&!d.length&&(r?r[f]=d:this._root=d),this):(this._root=o,this)},Fy.removeAll=function(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this},Fy.root=function(){return this._root},Fy.size=function(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e},Fy.visit=function(e){var t,r,n,o,i,a,s=[],u=this._root;for(u&&s.push(new jy(u,this._x0,this._y0,this._x1,this._y1));t=s.pop();)if(!e(u=t.node,n=t.x0,o=t.y0,i=t.x1,a=t.y1)&&u.length){var c=(n+i)/2,h=(o+a)/2;(r=u[3])&&s.push(new jy(r,c,h,i,a)),(r=u[2])&&s.push(new jy(r,n,h,c,a)),(r=u[1])&&s.push(new jy(r,c,o,i,h)),(r=u[0])&&s.push(new jy(r,n,o,c,h))}return this},Fy.visitAfter=function(e){var t,r=[],n=[];for(this._root&&r.push(new jy(this._root,this._x0,this._y0,this._x1,this._y1));t=r.pop();){var o=t.node;if(o.length){var i,a=t.x0,s=t.y0,u=t.x1,c=t.y1,h=(a+u)/2,l=(s+c)/2;(i=o[0])&&r.push(new jy(i,a,s,h,l)),(i=o[1])&&r.push(new jy(i,h,s,u,l)),(i=o[2])&&r.push(new jy(i,a,l,h,c)),(i=o[3])&&r.push(new jy(i,h,l,u,c))}n.push(t)}for(;t=n.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this},Fy.x=function(e){return arguments.length?(this._x=e,this):this._x},Fy.y=function(e){return arguments.length?(this._y=e,this):this._y};var Ly,By,Ry=0,Vy=0,zy=0,Gy=0,Uy=0,Hy=0,qy="object"==typeof performance&&performance.now?performance:Date,Wy="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Yy(){return Uy||(Wy(Ky),Uy=qy.now()+Hy)}function Ky(){Uy=0}function Zy(){this._call=this._time=this._next=null}function $y(e,t,r){var n=new Zy;return n.restart(e,t,r),n}function Qy(){Uy=(Gy=qy.now())+Hy,Ry=Vy=0;try{!function(){Yy(),++Ry;for(var e,t=Ly;t;)(e=Uy-t._time)>=0&&t._call.call(null,e),t=t._next;--Ry}()}finally{Ry=0,function(){var e,t,r=Ly,n=1/0;for(;r;)r._call?(n>r._time&&(n=r._time),e=r,r=r._next):(t=r._next,r._next=null,r=e?e._next=t:Ly=t);By=e,Jy(n)}(),Uy=0}}function Xy(){var e=qy.now(),t=e-Gy;t>1e3&&(Hy-=t,Gy=e)}function Jy(e){Ry||(Vy&&(Vy=clearTimeout(Vy)),e-Uy>24?(e<1/0&&(Vy=setTimeout(Qy,e-qy.now()-Hy)),zy&&(zy=clearInterval(zy))):(zy||(Gy=qy.now(),zy=setInterval(Xy,1e3)),Ry=1,Wy(Qy)))}function e_(e){return e.x}function t_(e){return e.y}Zy.prototype=$y.prototype={constructor:Zy,restart:function(e,t,r){if("function"!=typeof e)throw new TypeError("callback is not a function");r=(null==r?Yy():+r)+(null==t?0:+t),this._next||By===this||(By?By._next=this:Ly=this,By=this),this._call=e,this._time=r,Jy()},stop:function(){this._call&&(this._call=null,this._time=1/0,Jy())}};var r_=Math.PI*(3-Math.sqrt(5));function n_(e){var r,n=1,o=.001,i=1-Math.pow(o,1/300),a=0,s=.6,u=t.map(),c=$y(l),h=t.dispatch("tick","end");function l(){f(),h.call("tick",r),n<o&&(c.stop(),h.call("end",r))}function f(t){var o,c,h=e.length;void 0===t&&(t=1);for(var l=0;l<t;++l)for(n+=(a-n)*i,u.each((function(e){e(n)})),o=0;o<h;++o)null==(c=e[o]).fx?c.x+=c.vx*=s:(c.x=c.fx,c.vx=0),null==c.fy?c.y+=c.vy*=s:(c.y=c.fy,c.vy=0);return r}function d(){for(var t,r=0,n=e.length;r<n;++r){if((t=e[r]).index=r,null!=t.fx&&(t.x=t.fx),null!=t.fy&&(t.y=t.fy),isNaN(t.x)||isNaN(t.y)){var o=10*Math.sqrt(r),i=r*r_;t.x=o*Math.cos(i),t.y=o*Math.sin(i)}(isNaN(t.vx)||isNaN(t.vy))&&(t.vx=t.vy=0)}}function p(t){return t.initialize&&t.initialize(e),t}return null==e&&(e=[]),d(),r={tick:f,restart:function(){return c.restart(l),r},stop:function(){return c.stop(),r},nodes:function(t){return arguments.length?(e=t,d(),u.each(p),r):e},alpha:function(e){return arguments.length?(n=+e,r):n},alphaMin:function(e){return arguments.length?(o=+e,r):o},alphaDecay:function(e){return arguments.length?(i=+e,r):+i},alphaTarget:function(e){return arguments.length?(a=+e,r):a},velocityDecay:function(e){return arguments.length?(s=1-e,r):1-s},force:function(e,t){return arguments.length>1?(null==t?u.remove(e):u.set(e,p(t)),r):u.get(e)},find:function(t,r,n){var o,i,a,s,u,c=0,h=e.length;for(null==n?n=1/0:n*=n,c=0;c<h;++c)(a=(o=t-(s=e[c]).x)*o+(i=r-s.y)*i)<n&&(u=s,n=a);return u},on:function(e,t){return arguments.length>1?(h.on(e,t),r):h.on(e)}}}function o_(){var e,t,r,n,o=ky(-30),i=1,a=1/0,s=.81;function u(n){var o,i=e.length,a=Oy(e,e_,t_).visitAfter(h);for(r=n,o=0;o<i;++o)t=e[o],a.visit(l)}function c(){if(e){var t,r,i=e.length;for(n=new Array(i),t=0;t<i;++t)r=e[t],n[r.index]=+o(r,t,e)}}function h(e){var t,r,o,i,a,s=0,u=0;if(e.length){for(o=i=a=0;a<4;++a)(t=e[a])&&(r=Math.abs(t.value))&&(s+=t.value,u+=r,o+=r*t.x,i+=r*t.y);e.x=o/u,e.y=i/u}else{(t=e).x=t.data.x,t.y=t.data.y;do{s+=n[t.data.index]}while(t=t.next)}e.value=s}function l(e,o,u,c){if(!e.value)return!0;var h=e.x-t.x,l=e.y-t.y,f=c-o,d=h*h+l*l;if(f*f/s<d)return d<a&&(0===h&&(d+=(h=Sy())*h),0===l&&(d+=(l=Sy())*l),d<i&&(d=Math.sqrt(i*d)),t.vx+=h*e.value*r/d,t.vy+=l*e.value*r/d),!0;if(!(e.length||d>=a)){(e.data!==t||e.next)&&(0===h&&(d+=(h=Sy())*h),0===l&&(d+=(l=Sy())*l),d<i&&(d=Math.sqrt(i*d)));do{e.data!==t&&(f=n[e.data.index]*r/d,t.vx+=h*f,t.vy+=l*f)}while(e=e.next)}}return u.initialize=function(t){e=t,c()},u.strength=function(e){return arguments.length?(o="function"==typeof e?e:ky(+e),c(),u):o},u.distanceMin=function(e){return arguments.length?(i=e*e,u):Math.sqrt(i)},u.distanceMax=function(e){return arguments.length?(a=e*e,u):Math.sqrt(a)},u.theta=function(e){return arguments.length?(s=e*e,u):Math.sqrt(s)},u}function i_(e,t,r,n){var o=this;this.pos={};n=n||(t<r?t-0:r-0)/2;var i=e.nodeCount(),a=-Math.PI/2,s=2*Math.PI/i;e.eachNode((function(e,i){var u=i.getBBox();o.pos[e]={x:i.fixed?i.x:t/2+Math.cos(a)*(n-0),y:i.fixed?i.y:r/2+Math.sin(a)*(n-0),width:u.width,height:u.height},a+=s}))}function a_(e,t,r,n){n=n||{};var o=this;this.pos={},this.vertices=[],this.vertexMap={},e.eachNode((function(t){var r=e.node(t),n=r.getBBox(),i={id:t,x:r.pos().x,y:r.pos().y,width:n.width,height:n.height,value:r};o.vertices.push(i),o.vertexMap[t]=i})),this.edges=[],e.eachEdge((function(e,t,r){o.edges.push({source:t,target:r})}));var i=Ny().id((function(e){return e.id})).distance(n.linkDistance).strength(n.linkStrength),a=o_().strength((function(e){var t=e.value.getBBox();return n.charge*Math.max(t.width,t.height)}));if(this.force=n_().force("link",i).force("charge",a).force("center",Ey(t/2,r/2)).velocityDecay(n.oneShot?.1:n.friction).nodes(this.vertices),i.links(this.edges),n.oneShot){this.force.restart();var s=e.nodeCount();s=Math.min(s*s,500);for(var u=0;u<s;++u)this.force.tick();this.force.stop()}}function s_(e,t,r,n){var o=new by.graphlib.Graph({multigraph:!0,compound:!0}).setGraph(n).setDefaultNodeLabel((function(){return{}})).setDefaultEdgeLabel((function(){return{}}));e.eachNode((function(t){var r=e.node(t).getBBox();o.setNode(t,{width:r.width,height:r.height})})),e.eachEdge((function(t,r,i){var a=e.edge(t);o.setEdge(r,i,{weight:a.weight()},a._id),n.digraph||o.setEdge(i,r,{weight:a.weight()},a._id)})),e.eachNode((function(t){o.setParent(t,e.parent(t))})),this.dagreLayout=by.layout(o,{debugTiming:!1});var i=-o.graph().width/2,a=-o.graph().height/2;o.nodes().forEach((function(e){var n=o.node(e);n.x+=i+t/2,n.y+=a+r/2})),o.edges().forEach((function(e){for(var n=o.edge(e),s=0;s<n.points.length;++s)n.points[s].x+=i+t/2,n.points[s].y+=a+r/2})),this.digraph=o}i_.prototype.nodePos=function(e){return this.pos[e]},i_.prototype.edgePoints=function(e){return[]},a_.prototype.nodePos=function(e){return this.vertexMap[e]},a_.prototype.edgePoints=function(e){return[]},s_.prototype.nodePos=function(e){return this.digraph.node(e)},s_.prototype.edgePoints=function(e){return this.digraph.edge(e._sourceVertex.id(),e._targetVertex.id(),e._id).points};L(".graph_Subgraph .border{fill:none;stroke:#1f77b4;stroke-width:1px;pointer-events:none}.graph_Subgraph.selected>rect{stroke:red!important}");var u_=function(e){function r(){var r=e.call(this)||this;return r._textWidget=(new t.Text).anchor("start").fontSize(14),r._buttonMin=(new t.Icon).diameter(18).shape_colorStroke("#1f77b4").shape_colorFill("#dcf1ff").image_colorFill("#1f77b4").on("click",(function(){r.minClick()}),!0).on("dblclick",(function(){}),!0),r._minState="normal",r}return s(r,e),r.prototype.minState=function(e){return arguments.length?(this._minState=e,this):this._minState},r.prototype.calcIcon=function(){switch(this._minState){case"normal":return"";case"partial":return""}},r.prototype.getBBox=function(e,t){var r=this.width(),n=this.height();return{x:-r/2,y:-n/2-14,width:r,height:n}},r.prototype.enter=function(t,r){e.prototype.enter.call(this,t,r),this._border=r.append("rect").attr("class","border"),this._textWidget.target(t),this._buttonMin.target(t)},r.prototype.update=function(r,n){e.prototype.update.call(this,r,n);var o=this.getBBox();this._border.attr("x",o.x).attr("y",o.y).attr("width",o.width).attr("height",o.height).style("fill",this.border_colorFill()).style("stroke",this.border_colorStroke()),this.border_colorFill_exists()&&!this.title_colorFill_exists()&&this.title_colorFill(t.Palette.textColor(this.border_colorFill())),this._textWidget.pos({x:o.x+4,y:o.y+14}).width(this.width()-8).text(this.showTitle()?this.title():"").render(),this._buttonMin.visible(this.showMinMax()).pos({x:o.x+o.width-13,y:o.y+13}).faChar(this.calcIcon()).render()},r.prototype.exit=function(t,r){this._buttonMin.target(null),this._textWidget.target(null),this._border.remove(),e.prototype.exit.call(this,t,r)},r.prototype.intersection=function(e,t){var r=null;return[].forEach((function(e){(null===r||r.d>e.d)&&(r=e)})),r&&r.i?r.i:null},r.prototype.click=function(e){},r.prototype.minClick=function(){switch(this._minState){case"normal":this._minState="partial";break;case"partial":this._minState="normal"}this._buttonMin.faChar(this.calcIcon()).render()},r}(t.SVGWidget);u_.prototype._class+=" graph_Subgraph",u_.prototype.publish("border_colorStroke",null,"html-color","Stroke Color",null,{optional:!0}),u_.prototype.publish("border_colorFill",null,"html-color","Fill Color",null,{optional:!0}),u_.prototype.publish("showTitle",!0,"boolean","Show Title",null,{tags:["Basic"]}),u_.prototype.publish("title","","string","Title",null,{tags:["Basic"]}),u_.prototype.publishProxy("titleFontSize","_textWidget","fontSize"),u_.prototype.publishProxy("title_colorFill","_textWidget","colorFill"),u_.prototype.publish("showMinMax",!1,"boolean","Show Min/Max",null,{tags:["Basic"]});L(".graph_Vertex.selected .common_Shape{stroke:red!important}");var c_=function(e){function r(){var r=e.call(this)||this;return r._icon=new t.Icon,r._textBox=new t.TextBox,r._annotationWidgets={},r.pos({x:void 0,y:void 0}),r}return s(r,e),r.prototype.getIconBBox=function(){var e=this._icon.getBBox(!0),t=this._textBox.getBBox(!0);switch(this.iconAnchor()){case"start":return{x:-t.width/2+e.width/3,y:-t.height/2-e.height/3,width:e.width,height:e.height};case"middle":return{x:0,y:-t.height/2-e.height/3,width:e.width,height:e.height};case"end":return{x:t.width/2-e.width/3,y:-t.height/2-e.height/3,width:e.width,height:e.height};case"left":return{x:-t.width/2-e.width/2,y:0,width:e.width,height:e.height}}return{x:0,y:0,width:e.width,height:e.height}},r.prototype.getBBox=function(e,t){var r=this.getIconBBox(),n=this._textBox.getBBox(!0),o=Math.min(r.x,n.x),i=Math.min(r.y,n.y);return{x:o,y:i,width:Math.max(r.x+r.width,n.x+n.width)-o,height:Math.max(r.y+r.height,n.y+n.height)-i}},r.prototype.enter=function(t,r){var n=this;e.prototype.enter.call(this,t,r),delete this._prevHash,this._icon.target(t),this._textBox.target(t),r.on("mouseover",(function(e){return n.mouseover(e.data())})).on("mouseout",(function(e){return n.mouseout(e.data())}))},r.prototype.update=function(r,n){e.prototype.update.call(this,r,n);var o=this.hashSum();if(this._prevHash!==o){this._prevHash=o,n.classed("centroid",this.centroid()),n.style("filter",this.centroid()?"url(#"+this._graphID+"_glow)":null),this._icon.tooltip(this.iconTooltip()?this.iconTooltip():this.tooltip()).render(),this._textBox.tooltip(this.tooltip()).render();var i=this.getIconBBox();this._icon.move(i);var a=this,s=n.selectAll(".annotation").data(this.annotationIcons()),u=s.enter().append("g").attr("class","annotation").each((function(e,r){a._annotationWidgets[r]=(new t.Icon).target(this).shape("square")})),c=this._textBox.getBBox(!0),h=c.width/2,l=c.height/2;u.merge(s).each((function(e,t){var r=a._annotationWidgets[t];for(var n in r.diameter(a.annotationDiameter()).shape_colorFill(a.textbox_shape_colorFill()).shape_colorStroke(a.textbox_shape_colorStroke()),e)r[n]?r[n](e[n]):globalThis.__hpcc_debug&&console.warn("Invalid annotation property: "+n);r.render();var o=r.getBBox(!0);r.move({x:h-o.width/2+4,y:l+o.height/2-4}),h-=o.width+a.annotationSpacing()})),s.exit().each((function(e,r){var n=t.select(this);a._annotationWidgets[r].target(null),delete a._annotationWidgets[r],n.remove()}))}},r.prototype.exit=function(t,r){for(var n in this._annotationWidgets)this._annotationWidgets[n].target(null);this._icon.target(null),this._textBox.target(null),e.prototype.exit.call(this,t,r)},r.prototype.contains=function(e){return this._icon.contains(e)||this._textBox.contains(e)},r.prototype.intersection=function(e,t){var r=this._icon.intersection(e,t),n=this._textBox.intersection(e,t);return r&&n?this.distance(r,t)<this.distance(n,t)?r:n:r||n},r.prototype.mouseover=function(e){},r.prototype.mouseout=function(e){},r}(t.SVGWidget);c_.prototype._class+=" graph_Vertex",c_.prototype.publishProxy("faChar","_icon"),c_.prototype.publishProxy("imageUrl","_icon"),c_.prototype.publishProxy("icon_diameter","_icon","diameter"),c_.prototype.publishProxy("icon_paddingPercent","_icon","paddingPercent"),c_.prototype.publishProxy("icon_shape_colorFill","_icon","shape_colorFill"),c_.prototype.publishProxy("icon_shape_colorStroke","_icon","shape_colorStroke"),c_.prototype.publishProxy("icon_image_colorFill","_icon","image_colorFill"),c_.prototype.publishProxy("icon_fontFamily","_icon","fontFamily"),c_.prototype.publish("centroid",!1,"boolean","Centroid Vertex"),c_.prototype.publishProxy("text","_textBox"),c_.prototype.publishProxy("anchor","_textBox"),c_.prototype.publishProxy("textbox_shape_colorStroke","_textBox","shape_colorStroke"),c_.prototype.publishProxy("textbox_shape_colorFill","_textBox","shape_colorFill"),c_.prototype.publishProxy("textbox_text_colorFill","_textBox","text_colorFill"),c_.prototype.publishProxy("textbox_text_fontFamily","_textBox","text_fontFamily"),c_.prototype.publish("iconAnchor","start","set","Horizontal anchor position of icon",["","start","middle","end","left"],{tags:["Basic"]}),c_.prototype.publish("iconTooltip","","string","iconTooltip",null,{tags:["Private"]}),c_.prototype.publish("tooltip","","string","Tooltip",null,{tags:["Private"]}),c_.prototype.publish("annotationDiameter",14,"number","Annotation Diameter",null,{tags:["Private"]}),c_.prototype.publish("annotationSpacing",3,"number","Annotation Spacing",null,{tags:["Private"]}),c_.prototype.publish("annotationIcons",[],"array","Annotations",null,{tags:["Private"]});L(".graph_Graph .marker{fill:#656565;stroke:none;stroke-width:1px}.graph_Graph .zoom{fill:none;pointer-events:all}.graph_Graph .selectionBrush{fill:none;stroke:#a9a9a9}.graph_Graph .graphEdge.shortest-path .graph_Edge{stroke:red}");var h_=function(e){function r(){var r=e.call(this)||this;r._toggleHierarchy=(new t.ToggleButton).faChar("fa-sitemap").tooltip("Hierarchy").on("click",(function(){return r.layoutClick("Hierarchy")})),r._toggleForceDirected=(new t.ToggleButton).faChar("fa-expand").tooltip("Force Directed").on("click",(function(){return r.layoutClick("ForceDirected")})),r._toggleForceDirected2=(new t.ToggleButton).faChar("fa-arrows").tooltip("Spring").on("click",(function(){return r.layoutClick("ForceDirected2")})),r._toggleCircle=(new t.ToggleButton).faChar("fa-circle-o").tooltip("Circle").on("click",(function(){return r.layoutClick("Circle")})),r._dataHash=0,r._neighborOffsets=[],n.IGraph.call(r),n.ITooltip.call(r),r.tooltipHTML((function(e){var t;return e instanceof u_?t=e.title().replace(/\n/g,"<br>"):(e instanceof c_||e instanceof R)&&(t=e.text().replace(/\n/g,"<br>")),t?'<p style="text-align:center">'.concat(t,"</p>"):null})),r._drawStartPos="origin";var o=[r._toggleHierarchy,r._toggleForceDirected,r._toggleForceDirected2,r._toggleCircle,new t.Spacer];return r._iconBar.buttons(o.concat(r._iconBar.buttons())),r._graphData=new wy,r.highlight={zoom:1.1,opacity:.33,edge:"1.25px"},r._selection=new t.Utility.Selection(r),r.zoomToFitLimit(1),r}return s(r,e),r.prototype.iconBarButtons=function(){return this._iconBar.buttons()},r.prototype.layoutClick=function(e){var t=this;this.layout(e),"ForceDirected2"!==e&&this.applyScaleOnLayout(!0),this.layout(e).render((function(e){t.applyScaleOnLayout(!1)}))},r.prototype.getOffsetPos=function(){return{x:0,y:0}},r.prototype.size=function(t){var r=e.prototype.size.apply(this,arguments);return r},r.prototype.clear=function(){this.data({subgraphs:[],vertices:[],edges:[],hierarchy:[]},!1)},r.prototype.data=function(t,r){var n=e.prototype.data.apply(this,arguments);if(arguments.length){r||(this._graphData=new wy,this._renderCount=0);var o=this._graphData.setData(t.subgraphs||[],t.vertices||[],t.edges||[],t.hierarchy||[],r||!1);o.addedVertices.length&&this._dataHash++;var i=this;o.addedVertices.forEach((function(e){e._graphID=i._id})),o.addedEdges.forEach((function(e){e._graphID=i._id}));var a={};this._graphData.edges().forEach((function(e){a[e._sourceVertex._id]||(a[e._sourceVertex._id]={}),a[e._sourceVertex._id][e._targetVertex._id]||(a[e._sourceVertex._id][e._targetVertex._id]=0);var t=++a[e._sourceVertex._id][e._targetVertex._id];e.arcDepth(16*t)}))}return n},r.prototype.graphData=function(){return this._graphData},r.prototype.selection=function(e){return arguments.length?(this._selection.set(e),this):this._selection.get()},r.prototype.linkcolor_default=function(e){return arguments.length?(this._linkcolor=e,this):this._linkcolor},r.prototype.linktooltip_default=function(e){return arguments.length?(this._linktooltip=e,this):this._linktooltip},r.prototype.dragstart=function(e){var r=this;if(this.allowDragging()){var n=t.d3Event();if(n.sourceEvent.stopPropagation(),e.__drag_dx=n.x-e.x(),e.__drag_dy=n.y-e.y(),this._dragging=!0,this.forceLayout){n.active||this.forceLayout.force.alphaTarget(.3).restart();var o=this.forceLayout.vertexMap[e.id()];o.fixed=!0,o.fx=o.x,o.fy=o.y}this._neighborOffsets=[],this.dragSingleNeighbors()&&(this._neighborOffsets=this._graphData.singleNeighbors(e.id()).map((function(r){return t.select(r.target()).raise(),{neighbor:r,offsetX:e.x()-r.x(),offsetY:e.y()-r.y()}})));for(var i=e.target(),a=i.nextSibling;a;)i.parentNode.insertBefore(a,i),a=i.nextSibling;t.Platform.svgMarkerGlitch&&this._graphData.nodeEdges(e.id()).forEach((function(e){var t=r._graphData.edge(e);r._pushMarkers(t.element())}))}},r.prototype.dragging=function(e){var r=this;if(this.allowDragging()){var n=t.d3Event();if(n.sourceEvent.stopPropagation(),e.move({x:n.x-e.__drag_dx,y:n.y-e.__drag_dy}),this.forceLayout){var o=this.forceLayout.vertexMap[e.id()];o.fixed=!0,o.fx=n.x-e.__drag_dx,o.fy=n.y-e.__drag_dy}this._neighborOffsets.forEach((function(t){var o=n.x-e.__drag_dx-t.offsetX,i=n.y-e.__drag_dy-t.offsetY;if(r.forceLayout){var a=r.forceLayout.vertexMap[t.neighbor.id()];a.fixed=!0,a.fx=o,a.fy=i}t.neighbor.move({x:o,y:i})})),this.refreshIncidentEdges(e,!0)}},r.prototype.dragend=function(e){var r=this;if(this.allowDragging()){if(t.d3Event().sourceEvent.stopPropagation(),this._dragging=!1,this.snapToGrid()){var n=e.calcSnap(this.snapToGrid());e.move(n[0]),this.refreshIncidentEdges(e,!0)}if(this.forceLayout){var o=this.forceLayout.vertexMap[e.id()];o.fixed=!1,o.fx=null,o.fy=null,this._neighborOffsets.forEach((function(e){var t=r.forceLayout.vertexMap[e.neighbor.id()];t.fixed=!1,t.fx=null,t.fy=null}))}this._neighborOffsets=[],t.Platform.svgMarkerGlitch&&this._graphData.nodeEdges(e.id()).forEach((function(e){var t=this._graphData.edge(e);this._popMarkers(t.element())}))}},r.prototype.enter=function(r,n){var o=this;e.prototype.enter.call(this,r,n),this._zoomGrab.on("click.clear",(function(){o.selectionClearOnBackgroundClick()&&o._selection.clear()})),this._d3Drag=t.drag().on("start",(function(e){return o.dragstart(e)})).on("end",(function(e){return o.dragend(e)})).on("drag",(function(e){return o.dragging(e)})),this.defs=this._renderElement.append("defs"),this.addMarkers(),this._centroidFilter=new t.SVGGlowFilter(this.defs,this._id+"_glow"),this.svg=this._renderElement.append("svg:g"),this.svgC=this.svg.append("g").attr("id",this._id+"C"),this.svgE=this.svg.append("g").attr("id",this._id+"E"),this.svgV=this.svg.append("g").attr("id",this._id+"V")},r.prototype.getBounds=function(e,t){var r=[[null,null],[null,null]];return e.forEach((function(e){var n=t?t.nodePos(e._id):{x:e.x(),y:e.y(),width:e.width(),height:e.height()},o=n.x-n.width/2,i=n.x+n.width/2,a=n.y-n.height/2,s=n.y+n.height/2;(null===r[0][0]||r[0][0]>o)&&(r[0][0]=o),(null===r[0][1]||r[0][1]>a)&&(r[0][1]=a),(null===r[1][0]||r[1][0]<i)&&(r[1][0]=i),(null===r[1][1]||r[1][1]<s)&&(r[1][1]=s)})),r},r.prototype.getVertexBounds=function(e){return this.getBounds(this._graphData.nodes(),e)},r.prototype.getSelectionBounds=function(e){return this.getBounds(this._selection.get(),e)},r.prototype.centerOnItem=function(e){var t=e.getBBox(!0),r=t.x+t.width/2,n=t.y+t.height/2,o={x:e.x()+r-t.width/2,y:e.y()+n-t.height/2,width:t.width,height:t.height};this.centerOnBBox(o)},r.prototype.zoomToItem=function(e){var t=e.getBBox(!0),r=t.x+t.width/2,n=t.y+t.height/2,o={x:e.x()+r-t.width/2,y:e.y()+n-t.height/2,width:t.width,height:t.height};this.zoomToBBox(o)},r.prototype.updateVertices=function(e,r,n){var o=this.width(),i=this.height(),a=this,s=e.selectAll("#"+this._id+r+" > .graphVertex").data(n,(function(e){return e.id()}));s.enter().append("g").attr("class","graphVertex").style("opacity",1e-6).on("click.selectionBag",(function(e){a._selection.click(e,t.d3Event()),a.selectionChanged()})).on("click",(function(e){var r=t.select(this).select(".graph_Vertex"),n=!1;r.empty()||(n=r.classed("selected")),a.vertex_click(a.rowToObj(e.data()),"",n,{vertex:e})})).on("dblclick",(function(e){t.d3Event().stopPropagation();var r=t.select(this).select(".graph_Vertex"),n=!1;r.empty()||(n=r.classed("selected")),a.vertex_dblclick(a.rowToObj(e.data()),"",n,{vertex:e})})).on("contextmenu",(function(e){var r=t.select(this).select(".graph_Vertex"),n=!1;r.empty()||(n=r.classed("selected")),a.vertex_contextmenu(a.rowToObj(e.data()),"",n,{vertex:e})})).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).on("mouseover",(function(e){a._dragging||a.vertex_mouseover(t.select(this),e)})).on("mouseout",(function(e){a._dragging||a.vertex_mouseout(t.select(this),e)})).each((function(e){t.select(this).style("cursor",a.allowDragging()?"move":"pointer"),e.target(this).pos({x:e.x()||o/2,y:e.y()||i/2}).animationFrameRender(),a.allowDragging()&&t.select(this).call(a._d3Drag);e.dispatch&&(e.dispatch.on("sizestart",(function(e){e.allowResize(a.allowDragging()),a.allowDragging()&&(a._dragging=!0)})),e.dispatch.on("size",(function(e){a.refreshIncidentEdges(e,!1)})),e.dispatch.on("sizeend",(function(e){if(a._dragging=!1,a.snapToGrid()){var t=e.calcSnap(a.snapToGrid());e.pos(t[0]).size(t[1]).render(),a.refreshIncidentEdges(e,!1)}})))})).transition().duration(750).style("opacity",1),s.each((function(e){e.animationFrameRender()})),s.exit().each((function(e){e.target(null)})).remove(),s.order()},r.prototype.update=function(r,n){var o=this;e.prototype.update.call(this,r,n),this.tooltip.hide(),this._centroidFilter.update(this.centroidColor());var i=this.layout();this._toggleHierarchy.selected("Hierarchy"===i).render(),this._toggleForceDirected.selected("ForceDirected"===i).render(),this._toggleForceDirected2.selected("ForceDirected2"===i).render(),this._toggleCircle.selected("Circle"===i).render();var a=this;this.updateVertices(this.svgC,"C",this._graphData.nodes().filter((function(e){return"Hierarchy"===o.layout()&&e instanceof u_}))),this.updateVertices(this.svgV,"V",this._graphData.nodes().filter((function(e){return!(e instanceof u_)})));var s=this.svgE.selectAll("#"+this._id+"E > .graphEdge").data(this.showEdges()?this._graphData.edges():[],(function(e){return e.id()}));s.enter().append("g").attr("class","graphEdge").style("opacity",1e-6).on("click.selectionBag",(function(e){a._selection.click(e,t.d3Event())})).on("click",(function(e){var r=t.select(this).select(".graph_Edge"),n=!1;r.empty()||(n=r.classed("selected")),a.edge_click(a.rowToObj(e.data()),"",n,{edge:e})})).on("dblclick",(function(e){var r=t.select(this).select(".graph_Edge"),n=!1;r.empty()||(n=r.classed("selected")),a.edge_dblclick(a.rowToObj(e.data()),"",n,{edge:e})})).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).on("mouseover",(function(e){a._dragging||a.edge_mouseover(t.select(this),e)})).on("mouseout",(function(e){a._dragging||a.edge_mouseout(t.select(this),e)})).each((function(e){e.target(this).animationFrameRender()})).transition().duration(750).style("opacity",1),s.each((function(e){e.animationFrameRender()})),s.exit().each((function(e){e.target(null)})).remove(),this._renderCount||(this._renderCount++,this.layout(this.layout()))},r.prototype.exit=function(t,r){this._graphData.nodes().forEach((function(e){return e.target(null)})),this._graphData.edges().forEach((function(e){return e.target(null)})),e.prototype.exit.call(this,t,r)},r.prototype.render=function(t){var r=this;return this.progress("start"),e.prototype.render.call(this,(function(e){r.doLayout().then((function(){r.progress("end"),t&&t(e)}))})),this},r.prototype.doLayout=function(e){var t=this;return void 0===e&&(e=0),new Promise((function(r,n){requestAnimationFrame((function(){t._prevLayout!==t.layout()||t._prevDataHash!==t._dataHash?(t._prevLayout=t.layout(),t._prevDataHash=t._dataHash,t._doLayout(e).then((function(){r()}))):r()}))}))},r.prototype._doLayout=function(e){var t=this;return void 0===e&&(e=0),new Promise((function(n,o){t.progress("layout-start"),t.forceLayout&&(t.forceLayout.force.stop(),t.forceLayout=null);var i=t,a=t.getLayoutEngine();"ForceDirected2"===t.layout()?(t.forceLayout=a,t.forceLayout.force.on("tick",(function(){i.progress("layout-tick"),a.vertices.forEach((function(e){if(e.fixed);else{var t=i._graphData.node(e.id);t&&t.move({x:e.x,y:e.y})}})),i._graphData.edges().forEach((function(e){e.points([],!1,!1)})),i.applyScaleOnLayout()})).on("end",(function(){i.progress("layout-end")})),t.forceLayout.force.restart(),n()):a&&(t.forceLayout=null,i._dragging=!0,i._graphData.nodes().forEach((function(e){var t=a.nodePos(e.id());e instanceof r.Subgraph?e.pos({x:t.x,y:t.y}).size({width:t.width,height:t.height}).animationFrameRender():e.move({x:t.x,y:t.y},0)})),i._graphData.edges().forEach((function(t){var r=a.edgePoints(t);t.points(r,e)})),i.applyScaleOnLayout()&&requestAnimationFrame((function(){i.zoomToFit(),n()})),t._fixIEMarkers(),setTimeout((function(){i._dragging=!1}),e?e+50:50),t.progress("layout-end"),i.applyScaleOnLayout()||n())}))},r.prototype.getLayoutEngine=function(){switch(this.layout()){case"Circle":return new i_(this._graphData,this._size.width,this._size.height);case"ForceDirected":return new a_(this._graphData,this._size.width,this._size.height,{oneShot:!0,linkDistance:this.forceDirectedLinkDistance(),linkStrength:this.forceDirectedLinkStrength(),friction:this.forceDirectedFriction(),charge:this.forceDirectedCharge(),chargeDistance:this.forceDirectedChargeDistance(),theta:this.forceDirectedTheta(),gravity:this.forceDirectedGravity()});case"ForceDirected2":return new a_(this._graphData,this._size.width,this._size.height,{linkDistance:this.forceDirectedLinkDistance(),linkStrength:this.forceDirectedLinkStrength(),friction:this.forceDirectedFriction(),charge:this.forceDirectedCharge(),chargeDistance:this.forceDirectedChargeDistance(),theta:this.forceDirectedTheta(),gravity:this.forceDirectedGravity()});case"Hierarchy":return new s_(this._graphData,this._size.width,this._size.height,{rankdir:this.hierarchyRankDirection(),nodesep:this.hierarchyNodeSeparation(),edgesep:this.hierarchyEdgeSeparation(),ranksep:this.hierarchyRankSeparation(),digraph:this.hierarchyDigraph()})}return null},r.prototype.getNeighborMap=function(e){var t={},r={};if(e)for(var n=this._graphData.nodeEdges(e.id()),o=0;o<n.length;++o){var i=this._graphData.edge(n[o]);r[i.id()]=i,i._sourceVertex.id()!==e.id()&&(t[i._sourceVertex.id()]=i._sourceVertex),i._targetVertex.id()!==e.id()&&(t[i._targetVertex.id()]=i._targetVertex)}return{vertices:t,edges:r}},r.prototype.highlightVerticies=function(e){var t=this,r=this;return this.svgV.selectAll(".graphVertex").classed("graphVertex-highlighted",(function(t){return!e||e[t.id()]})).style("filter",(function(r){return e&&e[r.id()]?"url(#"+t.id()+"_glow)":null})).transition().duration(this.transitionDuration()).on("end",(function(t){e&&e[t.id()]&&t._placeholderElement.node()&&t._placeholderElement.node().parentNode&&t._placeholderElement.node().parentNode.appendChild(t._placeholderElement.node())})).style("opacity",(function(t){return!e||e[t.id()]?1:r.highlight.opacity})),this},r.prototype.highlightEdges=function(e){var t=this;return this.svgE.selectAll(".graphEdge").classed("graphEdge-highlighted",(function(t){return!e||e[t.id()]})).style("stroke-width",(function(r){return e&&e[r.id()]?t.highlight.edge:"1px"})).transition().duration(this.transitionDuration()).style("opacity",(function(r){return!e||e[r.id()]?1:t.highlight.opacity})),this},r.prototype.highlightVertex=function(e,t){if(this.highlightOnMouseOverVertex())if(t){var r=this.getNeighborMap(t);r.vertices[t.id()]=t,this.highlightVerticies(r.vertices),this.highlightEdges(r.edges)}else this.highlightVerticies(null),this.highlightEdges(null)},r.prototype.highlightEdge=function(e,t){if(this.highlightOnMouseOverEdge())if(t){var r={};r[t._sourceVertex.id()]=t._sourceVertex,r[t._targetVertex.id()]=t._targetVertex;var n={};n[t.id()]=t,this.highlightVerticies(r),this.highlightEdges(n)}else this.highlightVerticies(null),this.highlightEdges(null)},r.prototype.refreshIncidentEdges=function(e,t){var r=this;this._graphData.nodeEdges(e.id()).forEach((function(e){r._graphData.edge(e).points([],!1,t)}))},r.prototype.centroids=function(){return this._graphData.nodes().filter((function(e){return e.centroid()}))},r.prototype.selectionChanged=function(){var e=this;if(this.highlightSelectedPathToCentroid()){var t={};this.centroids().forEach((function(r){e.selection().forEach((function(n){e._graphData.undirectedShortestPath(r.id(),n.id()).forEach((function(e){t[e.id()]=!0}))}))})),this.svgE.selectAll(".graphEdge").classed("shortest-path",(function(e){return!0===t[e.id()]}))}},r.prototype.vertex_click=function(e,t,r,o){o&&o.vertex&&o.vertex._placeholderElement.node().parentNode.appendChild(o.vertex._placeholderElement.node()),n.IGraph.prototype.vertex_click.apply(this,arguments)},r.prototype.vertex_dblclick=function(e,t,r,n){},r.prototype.vertex_contextmenu=function(e,t,r,n){},r.prototype.vertex_mouseover=function(e,t){this.highlightVertex(e,t)},r.prototype.vertex_mouseout=function(e,t){this.highlightVertex(null,null)},r.prototype.edge_mouseover=function(e,t){this.highlightEdge(e,t)},r.prototype.edge_mouseout=function(e,t){this.highlightEdge(null,null)},r.prototype.addMarkers=function(e){void 0===e&&(e=!1),e&&(this.defs.select("#"+this._id+"_arrowHead").remove(),this.defs.select("#"+this._id+"_circleFoot").remove(),this.defs.select("#"+this._id+"_circleHead").remove(),this.defs.select("#"+this._id+"_glow").remove()),this.defs.append("marker").attr("class","marker").attr("id",this._id+"_arrowHead").attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerWidth",8).attr("markerHeight",8).attr("markerUnits","strokeWidth").attr("orient","auto").append("polyline").attr("points","0,0 10,5 0,10 1,5"),this.defs.append("marker").attr("class","marker").attr("id",this._id+"_circleFoot").attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",7).attr("markerHeight",7).attr("markerUnits","strokeWidth").attr("orient","auto").append("circle").attr("cx",5).attr("cy",5).attr("r",4),this.defs.append("marker").attr("class","marker").attr("id",this._id+"_circleHead").attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",7).attr("markerHeight",7).attr("markerUnits","strokeWidth").attr("orient","auto").append("circle").attr("cx",5).attr("cy",5).attr("r",4)},r.prototype.progress=function(e){},r.Subgraph=u_,r.Vertex=c_,r.Edge=R,r.profileID=0,r}(t.SVGZoomWidget);h_.prototype._class+=" graph_Graph",h_.prototype.implements(n.IGraph.prototype),h_.prototype.implements(n.ITooltip.prototype),h_.prototype.publish("allowDragging",!0,"boolean","Allow Dragging of Vertices",null,{tags:["Advanced"]}),h_.prototype.publish("dragSingleNeighbors",!1,"boolean","Dragging a Vertex also moves its singleton neighbors",null,{tags:["Advanced"]}),h_.prototype.publish("layout","Circle","set","Default Layout",["Circle","ForceDirected","ForceDirected2","Hierarchy","None"],{tags:["Basic"]}),h_.prototype.publish("scale","100%","set","Zoom Level",["all","width","selection","100%","90%","75%","50%","25%","10%"],{tags:["Basic"]}),h_.prototype.publish("applyScaleOnLayout",!1,"boolean","Shrink to fit on Layout",null,{tags:["Basic"]}),h_.prototype.publish("highlightOnMouseOverVertex",!1,"boolean","Highlight Vertex on Mouse Over",null,{tags:["Basic"]}),h_.prototype.publish("highlightOnMouseOverEdge",!1,"boolean","Highlight Edge on Mouse Over",null,{tags:["Basic"]}),h_.prototype.publish("transitionDuration",250,"number","Transition Duration",null,{tags:["Intermediate"]}),h_.prototype.publish("showEdges",!0,"boolean","Show Edges",null,{tags:["Intermediate"]}),h_.prototype.publish("snapToGrid",0,"number","Snap to Grid",null,{tags:["Private"]}),h_.prototype.publish("selectionClearOnBackgroundClick",!1,"boolean","Clear selection on background click"),h_.prototype.publish("centroidColor","#00A000","html-color","Centroid Color",null,{tags:["Basic"]}),h_.prototype.publish("highlightSelectedPathToCentroid",!1,"boolean","Highlight path to Center Vertex (for selected vertices)",null,{tags:["Basic"]}),h_.prototype.publish("hierarchyRankDirection","TB","set","Direction for Rank Nodes",["TB","BT","LR","RL"],{tags:["Advanced"]}),h_.prototype.publish("hierarchyNodeSeparation",50,"number","Number of pixels that separate nodes horizontally in the layout",null,{tags:["Advanced"]}),h_.prototype.publish("hierarchyEdgeSeparation",10,"number","Number of pixels that separate edges horizontally in the layout",null,{tags:["Advanced"]}),h_.prototype.publish("hierarchyRankSeparation",50,"number","Number of pixels between each rank in the layout",null,{tags:["Advanced"]}),h_.prototype.publish("hierarchyDigraph",!0,"boolean","Directional Graph",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedLinkDistance",300,"number","Target distance between linked nodes",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedLinkStrength",1,"number","Strength (rigidity) of links",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedFriction",.9,"number","Friction coefficient",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedCharge",-25,"number","Charge strength ",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedChargeDistance",1e4,"number","Maximum distance over which charge forces are applied",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedTheta",.8,"number","Barnes–Hut approximation criterion",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedGravity",.1,"number","Gravitational strength",null,{tags:["Advanced"]});var l_=h_.prototype.scale;h_.prototype.scale=function(e,t){var r=l_.apply(this,arguments);return arguments.length&&this.zoomTo(e,t),r};var f_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.owner=function(e){return arguments.length?(this._owner=e,this):this._owner},t.prototype.valid=function(){return!!this.iconColumn()},t.prototype.indexes=function(){var e=this._owner.columns();return{iconCol:e.indexOf(this.iconColumn()),iconFillCol:e.indexOf(this.iconFillColumn()),tooltipCol:e.indexOf(this.tooltipColumn()),shapeStrokeCol:e.indexOf(this.shapeStrokeColumn()),shapeFillCol:e.indexOf(this.shapeFillColumn())}},t.prototype.mapper=function(){var e=this,t=this.indexes();return function(r){return{faChar:r[t.iconCol],tooltip:r[t.tooltipCol],shape_colorFill:r[t.shapeFillCol]||e.shapeFillDefault(),shape_colorStroke:r[t.shapeStrokeCol]||e.shapeStrokeDefault(),image_colorFill:r[t.iconFillCol]||e.iconFillDefault()}}},t}(t.PropertyExt);f_.prototype._class+=" graph_Annotation",f_.prototype.publish("iconColumn","","set","Icon column",(function(){return this._owner.columns()}),{optional:!0}),f_.prototype.publish("iconFillDefault","white","html-color","Icon fill default color"),f_.prototype.publish("iconFillColumn","","set","Icon fill color column",(function(){return this._owner.columns()}),{optional:!0}),f_.prototype.publish("tooltipColumn","","set","Tooltip column",(function(){return this._owner.columns()}),{optional:!0}),f_.prototype.publish("shapeStrokeDefault","darkred","html-color","Shape stroke default color"),f_.prototype.publish("shapeStrokeColumn","","set","Shape stroke color column",(function(){return this._owner.columns()}),{optional:!0}),f_.prototype.publish("shapeFillDefault","red","html-color","Shape fill default color"),f_.prototype.publish("shapeFillColumn","","set","Shape fill color column",(function(){return this._owner.columns()}),{optional:!0});var d_=function(e){function t(){var t=e.call(this)||this;return t._vertexMap={},t._edgeMap={},t._merge=!1,t._adjacencyData=[],t}return s(t,e),t.prototype.linksColumns=function(){var e=this.columns().indexOf(this.linksColumn()),t=this._db.field(e);return t?t.children().map((function(e){return e.label()})):[]},t.prototype.validAnnotations=function(){return this.annotations().filter((function(e){return e.valid()}))},t.prototype.updateData=function(){var t=this,n=r.hashSum([this._adjacencyData,this.uidColumn(),this.labelColumn(),this.iconColumn(),this.linksColumn(),this.linkUidColumn(),this.linkLabelColumn(),this.validAnnotations().map((function(e){return e.hashSum()}))]);if(this._prevAdjacencyDataHash!==n){this._prevAdjacencyDataHash=n;for(var o=this.columns(),i=o.indexOf(this.uidColumn()),a=o.indexOf(this.labelColumn()),s=o.indexOf(this.iconColumn()),u=o.indexOf(this.linksColumn()),c=this.linksColumns(),h=c.indexOf(this.linkUidColumn()),l=c.indexOf(this.linkLabelColumn()),f=this.validAnnotations().map((function(e){return e.mapper()})),d={},p={},g={vertices:this._adjacencyData.map((function(e){var r=e[i];if(void 0!==r){var n=d[r]||t._vertexMap[r];return n||(n=new c_),d[r]=n,n.text(e[a]).data(e).faChar(e[s]).annotationIcons(f.map((function(t){return t(e)}))),n}})).filter((function(e){return!!e})),edges:[]},v=0,y=this._adjacencyData;v<y.length;v++){var _=y[v],m=_[i],b=_[u];if(void 0!==m&&void 0!==b)for(var x=0,w=b;x<w.length;x++){var E=w[x],k=E[h],S=E[l],D="".concat(m,"->").concat(k),j=p[D]||this._edgeMap[D];j||(d[m]&&d[k]?j=(new R).sourceVertex(d[m]).targetVertex(d[k]).data(E):console.warn("Missing vertices for edge: "+D)),j&&(j.text(S),p[D]=j,g.edges.push(j))}}this._vertexMap=d,this._edgeMap=p,e.prototype.data.call(this,g,this._merge)}},t.prototype.data=function(e,t){if(!arguments.length)return this._adjacencyData;if(e instanceof Array)return this._merge=t,this._adjacencyData=e,this;throw new Error("Invalid data shape.")},t.prototype.update=function(t,r){this.updateData(),e.prototype.update.call(this,t,r)},t.prototype.click=function(e,t,r){},t}(h_);function p_(e,t){return e.sourceLinks.length?e.depth:t-1}function g_(e){return function(){return e}}function v_(e,t){return __(e.source,t.source)||e.index-t.index}function y_(e,t){return __(e.target,t.target)||e.index-t.index}function __(e,t){return e.y0-t.y0}function m_(e){return e.value}function b_(e){return e.index}function x_(e){return e.nodes}function w_(e){return e.links}function E_(e,t){const r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function k_({nodes:e}){for(const t of e){let e=t.y0,r=e;for(const r of t.sourceLinks)r.y0=e+r.width/2,e+=r.width;for(const e of t.targetLinks)e.y1=r+e.width/2,r+=e.width}}function S_(){let e,r,n,o=0,i=0,a=1,s=1,u=24,c=8,h=b_,l=p_,f=x_,d=w_,p=6;function g(){const e={nodes:f.apply(null,arguments),links:d.apply(null,arguments)};return v(e),y(e),_(e),m(e),b(e),k_(e),e}function v({nodes:e,links:t}){for(const[t,r]of e.entries())r.index=t,r.sourceLinks=[],r.targetLinks=[];const r=new Map(e.map(((t,r)=>[h(t,r,e),t])));for(const[e,n]of t.entries()){n.index=e;let{source:t,target:o}=n;"object"!=typeof t&&(t=n.source=E_(r,t)),"object"!=typeof o&&(o=n.target=E_(r,o)),t.sourceLinks.push(n),o.targetLinks.push(n)}if(null!=n)for(const{sourceLinks:t,targetLinks:r}of e)t.sort(n),r.sort(n)}function y({nodes:e}){for(const r of e)r.value=void 0===r.fixedValue?Math.max(t.sum(r.sourceLinks,m_),t.sum(r.targetLinks,m_)):r.fixedValue}function _({nodes:e}){const t=e.length;let r=new Set(e),n=new Set,o=0;for(;r.size;){for(const e of r){e.depth=o;for(const{target:t}of e.sourceLinks)n.add(t)}if(++o>t)throw new Error("circular link");r=n,n=new Set}}function m({nodes:e}){const t=e.length;let r=new Set(e),n=new Set,o=0;for(;r.size;){for(const e of r){e.height=o;for(const{source:t}of e.targetLinks)n.add(t)}if(++o>t)throw new Error("circular link");r=n,n=new Set}}function b(n){const h=function({nodes:e}){const n=t.max(e,(e=>e.depth))+1,i=(a-o-u)/(n-1),s=new Array(n);for(const t of e){const e=Math.max(0,Math.min(n-1,Math.floor(l.call(null,t,n))));t.layer=e,t.x0=o+e*i,t.x1=t.x0+u,s[e]?s[e].push(t):s[e]=[t]}if(r)for(const e of s)e.sort(r);return s}(n);e=Math.min(c,(s-i)/(t.max(h,(e=>e.length))-1)),function(r){const n=t.min(r,(r=>(s-i-(r.length-1)*e)/t.sum(r,m_)));for(const t of r){let r=i;for(const o of t){o.y0=r,o.y1=r+o.value*n,r=o.y1+e;for(const e of o.sourceLinks)e.width=e.value*n}r=(s-r+e)/(t.length+1);for(let e=0;e<t.length;++e){const n=t[e];n.y0+=r*(e+1),n.y1+=r*(e+1)}j(t)}}(h);for(let e=0;e<p;++e){const t=Math.pow(.99,e),r=Math.max(1-t,(e+1)/p);w(h,t,r),x(h,t,r)}}function x(e,t,n){for(let o=1,i=e.length;o<i;++o){const i=e[o];for(const e of i){let r=0,n=0;for(const{source:t,value:o}of e.targetLinks){let i=o*(e.layer-t.layer);r+=C(t,e)*i,n+=i}if(!(n>0))continue;let o=(r/n-e.y0)*t;e.y0+=o,e.y1+=o,D(e)}void 0===r&&i.sort(__),E(i,n)}}function w(e,t,n){for(let o=e.length-2;o>=0;--o){const i=e[o];for(const e of i){let r=0,n=0;for(const{target:t,value:o}of e.sourceLinks){let i=o*(t.layer-e.layer);r+=A(e,t)*i,n+=i}if(!(n>0))continue;let o=(r/n-e.y0)*t;e.y0+=o,e.y1+=o,D(e)}void 0===r&&i.sort(__),E(i,n)}}function E(t,r){const n=t.length>>1,o=t[n];S(t,o.y0-e,n-1,r),k(t,o.y1+e,n+1,r),S(t,s,t.length-1,r),k(t,i,0,r)}function k(t,r,n,o){for(;n<t.length;++n){const i=t[n],a=(r-i.y0)*o;a>1e-6&&(i.y0+=a,i.y1+=a),r=i.y1+e}}function S(t,r,n,o){for(;n>=0;--n){const i=t[n],a=(i.y1-r)*o;a>1e-6&&(i.y0-=a,i.y1-=a),r=i.y0-e}}function D({sourceLinks:e,targetLinks:t}){if(void 0===n){for(const{source:{sourceLinks:e}}of t)e.sort(y_);for(const{target:{targetLinks:t}}of e)t.sort(v_)}}function j(e){if(void 0===n)for(const{sourceLinks:t,targetLinks:r}of e)t.sort(y_),r.sort(v_)}function C(t,r){let n=t.y0-(t.sourceLinks.length-1)*e/2;for(const{target:o,width:i}of t.sourceLinks){if(o===r)break;n+=i+e}for(const{source:e,width:o}of r.targetLinks){if(e===t)break;n-=o}return n}function A(t,r){let n=r.y0-(r.targetLinks.length-1)*e/2;for(const{source:o,width:i}of r.targetLinks){if(o===t)break;n+=i+e}for(const{target:e,width:o}of t.sourceLinks){if(e===r)break;n-=o}return n}return g.update=function(e){return k_(e),e},g.nodeId=function(e){return arguments.length?(h="function"==typeof e?e:g_(e),g):h},g.nodeAlign=function(e){return arguments.length?(l="function"==typeof e?e:g_(e),g):l},g.nodeSort=function(e){return arguments.length?(r=e,g):r},g.nodeWidth=function(e){return arguments.length?(u=+e,g):u},g.nodePadding=function(t){return arguments.length?(c=e=+t,g):c},g.nodes=function(e){return arguments.length?(f="function"==typeof e?e:g_(e),g):f},g.links=function(e){return arguments.length?(d="function"==typeof e?e:g_(e),g):d},g.linkSort=function(e){return arguments.length?(n=e,g):n},g.size=function(e){return arguments.length?(o=i=0,a=+e[0],s=+e[1],g):[a-o,s-i]},g.extent=function(e){return arguments.length?(o=+e[0][0],a=+e[1][0],i=+e[0][1],s=+e[1][1],g):[[o,i],[a,s]]},g.iterations=function(e){return arguments.length?(p=+e,g):p},g}function D_(e){return[e.source.x1,e.y0]}function j_(e){return[e.target.x0,e.y1]}function C_(){return C().source(D_).target(j_)}d_.prototype._class+=" graph_AdjacencyGraph",d_.prototype.publish("uidColumn","","set","UID column",(function(){return this.columns()}),{optional:!0}),d_.prototype.publish("labelColumn","","set","Label column",(function(){return this.columns()}),{optional:!0}),d_.prototype.publish("iconColumn","","set","Icon column",(function(){return this.columns()}),{optional:!0}),d_.prototype.publish("linksColumn","","set","Links column",(function(){return this.columns()}),{optional:!0}),d_.prototype.publish("linkUidColumn","","set","Link UID column",(function(){return this.linksColumns()}),{optional:!0}),d_.prototype.publish("linkLabelColumn","","set","Link Label column",(function(){return this.linksColumns()}),{optional:!0}),d_.prototype.publish("annotations",[],"propertyArray","Annotations",null,{autoExpand:f_});L(".graph_Sankey .node rect{fill-opacity:.9;shape-rendering:crispEdges;stroke:#a9a9a9;cursor:move}.graph_Sankey .node.selected rect{stroke:red}.graph_Sankey .node.over rect{stroke:orange}.graph_Sankey .node.selected.over rect{stroke:red}.graph_Sankey .node text{pointer-events:none;text-shadow:0 1px 0 #fff}.graph_Sankey .node.selected text{fill:red}.graph_Sankey .node.over text{fill:orange}.graph_Sankey .node.selected.over text{fill:red}.graph_Sankey .link{fill:none;stroke:#000;stroke-opacity:.2}.graph_Sankey .link:hover{stroke-opacity:.5}");var A_={mean:t.mean,median:t.median,min:t.min,max:t.max,sum:t.sum},O_=function(e){function t(){return e.call(this)||this}return s(t,e),t.prototype.owner=function(e){return arguments.length?(this._owner=e,this):this._owner},t.prototype.valid=function(){return!!this.column()},t.prototype.aggregate=function(e){switch(this.aggrType()){case null:case void 0:case"":return e.length;default:var t=this._owner.columns().indexOf(this.aggrColumn());return A_[this.aggrType()](e,(function(e){return+e[t]}))}},t}(t.PropertyExt);O_.prototype._class+=" graph_Sankey.SankeyColumn",O_.prototype.publish("column",null,"set","Field",(function(){return this._owner?this._owner.columns():[]}),{optional:!0}),O_.prototype.publish("aggrType",null,"set","Aggregation Type",[null,"mean","median","sum","min","max"],{optional:!0,disable:function(e){return!e._owner||0===e._owner.mappings().indexOf(e)}}),O_.prototype.publish("aggrColumn",null,"set","Aggregation Field",(function(){return this._owner?this._owner.columns():[]}),{optional:!0,disable:function(e){return!e._owner||!e.aggrType()||0===e._owner.mappings().indexOf(e)}});var I_=function(e){function r(){var r=e.call(this)||this;return t.Utility.SimpleSelectionMixin.call(r),r._drawStartPos="origin",r}return s(r,e),r.prototype.sankeyData=function(){var e={vertices:[],edges:[]};if(0===this.data().length)return e;var t={},r=this.mappings().filter((function(e){return e.valid()}));return r.forEach((function(r,n){this._db.rollupView([r.column()]).entries().forEach((function(o){var i=r.column()+":"+n+":"+o.key;t[i]||(e.vertices.push({__id:i,__category:r.column(),name:o.key,origRow:o.value,value:o.value[n][2]}),t[i]=e.vertices.length-1)}),this)}),this),r.forEach((function(n,o){if(o<r.length-1){var i=r[o+1];this._db.rollupView([n.column(),i.column()]).entries().forEach((function(r){var a=n.column()+":"+o+":"+r.key;r.values.forEach((function(r){var n=i.column()+":"+(o+1)+":"+r.key;e.edges.push({__id:a+"_"+n,source:t[a],target:t[n],value:r.value[0][2]})}))}))}}),this),e},r.prototype.enter=function(t,r){e.prototype.enter.call(this,t,r),this._d3Sankey=new S_,this._selection.widgetElement(r)},r.prototype.update=function(r,n){e.prototype.update.call(this,r,n),this._palette=this._palette.switch(this.paletteID());var o=this.vertexStrokeWidth(),i=this.sankeyData(),a=2*o;this._d3Sankey.extent([[o,o],[this.width()-a,this.height()-a]]).nodeWidth(this.vertexWidth()).nodePadding(this.vertexPadding()),this._d3Sankey({nodes:i.vertices,links:i.edges});var s=this,u=n.selectAll(".link").data(i.edges);u.enter().append("path").attr("class","link").each((function(){t.select(this).append("title")})).merge(u).attr("d",C_()).style("stroke-width",(function(e){return Math.max(1,e.width)})).sort((function(e,t){return t.width-e.width})).select("title").text((function(e){return e.source.name+" → "+e.target.name+"\n"+e.value})),u.exit().remove();var c=n.selectAll(".node").data(i.vertices);c.enter().append("g").attr("class","node").call(this._selection.enter.bind(this._selection)).on("click",(function(e){s.click(s.rowToObj(e.origRow[0]),"",s._selection.selected(this))})).on("dblclick",(function(e){s.dblclick(s.rowToObj(e.origRow[0]),"",s._selection.selected(this))})).each((function(){var e=t.select(this);e.append("rect"),e.append("text")})).merge(c).attr("transform",(function(e){var t=0,r=0;return e.x0&&(t=e.x0),e.y0&&(r=e.y0),"translate("+(t+o)+","+(r+o)+")"})).each((function(){var e=t.select(this);e.select("rect").attr("height",(function(e){return e.y1-e.y0})).attr("width",s._d3Sankey.nodeWidth()).style("fill",(function(e){return s._palette(e.name)})).style("stroke",(function(e){return s.vertexStrokeColor()})).style("stroke-width",(function(e){return o})).style("cursor",s.xAxisMovement()||s.yAxisMovement()?null:"default"),e.select("text").attr("x",-6).attr("y",(function(e){return(e.y1-e.y0)/2})).attr("dy",".35em").attr("text-anchor","end").attr("transform",null).text((function(e){return e.name})).filter((function(e){return e.x0<s.width()/2})).attr("x",6+s._d3Sankey.nodeWidth()).attr("text-anchor","start")})),c.exit().remove()},r.prototype.exit=function(t,r){e.prototype.exit.call(this,t,r)},r.prototype.click=function(e,t,r){},r.prototype.dblclick=function(e,t,r){},r}(t.SVGWidget);function P_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function F_(e){return F_="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},F_(e)}function M_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T_(){return T_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},T_.apply(this,arguments)}function N_(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function L_(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return N_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?N_(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function B_(e,t){var r=[],n=[];return e.length&&function e(t,o){if(1===t.length)r.push(t[0]),n.push(t[0]);else{for(var i=Array(t.length-1),a=0;a<i.length;a++)0===a&&r.push(t[0]),a===i.length-1&&n.push(t[a+1]),i[a]=[(1-o)*t[a][0]+o*t[a+1][0],(1-o)*t[a][1]+o*t[a+1][1]];e(i,o)}}(e,t),{left:r,right:n.reverse()}}function R_(e){var t={};return 4===e.length&&(t.x2=e[2][0],t.y2=e[2][1]),e.length>=3&&(t.x1=e[1][0],t.y1=e[1][1]),t.x=e[e.length-1][0],t.y=e[e.length-1][1],4===e.length?t.type="C":3===e.length?t.type="Q":t.type="L",t}function V_(e,t,r){var n=[[e.x,e.y]];return null!=t.x1&&n.push([t.x1,t.y1]),null!=t.x2&&n.push([t.x2,t.y2]),n.push([t.x,t.y]),function(e,t){for(var r=[],n=e,o=1/(t=t||2),i=0;i<t-1;i++){var a=B_(n,o/(1-o*i));r.push(a.left),n=a.right}return r.push(n),r}(n,r).map(R_)}I_.prototype._class+=" graph_Sankey",I_.prototype.Column=O_,I_.prototype.mixin(t.Utility.SimpleSelectionMixin),I_.prototype._palette=t.Palette.ordinal("default"),I_.prototype.publish("paletteID","default","set","Color palette for this widget",I_.prototype._palette.switch()),I_.prototype.publish("mappings",[],"propertyArray","Source Columns",null,{autoExpand:O_}),I_.prototype.publish("vertexStrokeWidth",1,"number","Vertex Stroke Width"),I_.prototype.publish("vertexStrokeColor","darkgray","string","Vertex Stroke Color"),I_.prototype.publish("vertexWidth",36,"number","Vertex Width"),I_.prototype.publish("vertexPadding",40,"number","Vertex Padding"),I_.prototype.publish("xAxisMovement",!1,"boolean","Enable x-axis movement"),I_.prototype.publish("yAxisMovement",!1,"boolean","Enable y-axis movement");var z_=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,G_={M:["x","y"],L:["x","y"],H:["x"],V:["y"],C:["x1","y1","x2","y2","x","y"],S:["x2","y2","x","y"],Q:["x1","y1","x","y"],T:["x","y"],A:["rx","ry","xAxisRotation","largeArcFlag","sweepFlag","x","y"],Z:[]};function U_(e,t){for(var r=Array(e),n=0;n<e;n++)r[n]=t;return r}function H_(e){return"".concat(e.type).concat(G_[e.type].map((function(t){return e[t]})).join(","))}function q_(e,t,r){var n=e.length-1,o=t.length-1,i=n/o,a=U_(o).reduce((function(t,n,o){var a=Math.floor(i*o);if(r&&a<e.length-1&&r(e[a],e[a+1])){var s=i*o%1<.5;t[a]&&(s?a>0?a-=1:a<e.length-1&&(a+=1):a<e.length-1?a+=1:a>0&&(a-=1))}return t[a]=(t[a]||0)+1,t}),[]).reduce((function(t,r,n){if(n===e.length-1){var o=U_(r,T_({},e[e.length-1]));return"M"===o[0].type&&o.forEach((function(e){e.type="L"})),t.concat(o)}return t.concat(function(e,t,r){var n=[];if("L"===t.type||"Q"===t.type||"C"===t.type)n=n.concat(V_(e,t,r));else{var o=T_({},e);"M"===o.type&&(o.type="L"),(n=n.concat(U_(r-1).map((function(){return o})))).push(t)}return n}(e[n],e[n+1],r))}),[]);return a.unshift(e[0]),a}function W_(e){for(var t,r,n=(e||"").match(z_)||[],o=[],i=0;i<n.length;++i)if(t=G_[n[i]]){r={type:n[i]};for(var a=0;a<t.length;++a)r[t[a]]=+n[i+a+1];i+=t.length,o.push(r)}return o}function Y_(e,t,r){var n=null==e?[]:e.slice(),o=null==t?[]:t.slice(),i="object"===F_(r)?r:{excludeSegment:r,snapEndsToInput:!0},a=i.excludeSegment,s=i.snapEndsToInput;if(!n.length&&!o.length)return function(){return[]};var u=!(0!==n.length&&"Z"!==n[n.length-1].type||0!==o.length&&"Z"!==o[o.length-1].type);n.length>0&&"Z"===n[n.length-1].type&&n.pop(),o.length>0&&"Z"===o[o.length-1].type&&o.pop(),n.length?o.length||o.push(n[0]):n.push(o[0]),0!==Math.abs(o.length-n.length)&&(o.length>n.length?n=q_(n,o,a):o.length<n.length&&(o=q_(o,n,a)));var c=(n=n.map((function(e,t){return function(e,t){var r={x1:"x",y1:"y",x2:"x",y2:"y"},n=["xAxisRotation","largeArcFlag","sweepFlag"];if(e.type!==t.type&&"M"!==t.type.toUpperCase()){var o={};Object.keys(t).forEach((function(i){var a=t[i],s=e[i];void 0===s&&(n.includes(i)?s=a:(void 0===s&&r[i]&&(s=e[r[i]]),void 0===s&&(s=0))),o[i]=s})),o.type=t.type,e=o}return e}(e,o[t])}))).map((function(e){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P_(Object(r),!0).forEach((function(t){M_(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e)}));return u&&(c.push({type:"Z"}),n.push({type:"Z"})),function(e){if(1===e&&s)return null==t?[]:t;if(0===e)return n;for(var r=0;r<c.length;++r){var i,a=n[r],u=o[r],h=c[r],l=L_(G_[h.type]);try{for(l.s();!(i=l.n()).done;){var f=i.value;h[f]=(1-e)*a[f]+e*u[f],"largeArcFlag"!==f&&"sweepFlag"!==f||(h[f]=Math.round(h[f]))}}catch(e){l.e(e)}finally{l.f()}}return c}}Object.keys(G_).forEach((function(e){G_[e.toLowerCase()]=G_[e]}));var K_=E().x((function(e){return e[0]})).y((function(e){return e[1]})).curve(I),Z_=E().x((function(e){return e[0]})).y((function(e){return e[1]})).curve(T),$_=function(){function e(e){this._running=!1,this._graph=e}return e.prototype.start=function(){return this._running=!0,this._graph.progress("layout-start"),Promise.resolve(this)},e.prototype.stop=function(){return this._running=!1,this._graph.progress("layout-stop"),this},e.prototype.running=function(){return this._running},e.prototype.center=function(e){if(e.length%2==1)return e[Math.floor(e.length/2)];var t=e[e.length/2-1],r=e[e.length/2];return[(t[0]+r[0])/2,(t[1]+r[1])/2]},e.prototype.edgePath=function(e,t){var r=this._graph.projectPlacholder(e.source),n=this._graph.projectPlacholder(e.target),o=[[r.x,r.y],[n.x,n.y]];if(t){var i=o[0][0]-o[1][0],a=o[0][1]-o[1][1];if(Math.sqrt(i*i+a*a)){var s=(o[0][0]+o[1][0])/2-a*t/100,u=(o[0][1]+o[1][1])/2+i*t/100;return{path:Z_([o[0],[s,u],o[1]]),labelPos:[s,u]}}}return{path:K_(o),labelPos:this.center(o)}},e}(),Q_=function(e){return e*Math.PI/180},X_=function(e){function t(t,r){void 0===r&&(r=60);var n=e.call(this,t)||this;return n.sideLength=r,n}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=t._graph.size(),r=t._graph.graphData(),n=r.allVertices();r.allEdges().forEach((function(e){return delete e.points}));var o,i=(o=n.length,t.sideLength/(2*Math.sin(Q_(180/o)))),a=360/n.length;return n.forEach((function(t,r){delete t.fx,delete t.fy,t.x=e.width/2+Math.cos(Q_(r*a))*i,t.y=e.height/2+Math.sin(Q_(r*a))*i})),t._graph.moveVertices(!0).moveEdges(!0),t.stop(),t._running=!1,t}))},t}($_);var J_=E().x((function(e){return e[0]})).y((function(e){return e[1]})).curve(I),em=function(e){return"cluster_".concat(e)};function tm(e,t,r,n){var o=e-r,i=t-n;return Math.sqrt(o*o+i*i)}var rm=function(e){function t(t,r){var n=e.call(this,t)||this;return n._options=r,n}return s(t,e),t.prototype.start=function(){var t=this;e.prototype.start.call(this);var r=this._graph.size(),n=this._graph.graphData();return function(e,t){var r=new Blob(['!function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){throw new Error(\'Could not dynamically require "\'+e+\'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.\')}var n={exports:{}};n.exports=function(){function e(n,r,o){function i(s,u){if(!r[s]){if(!n[s]){if(!u&&t)return t(s);if(a)return a(s,!0);var c=new Error("Cannot find module \'"+s+"\'");throw c.code="MODULE_NOT_FOUND",c}var f=r[s]={exports:{}};n[s][0].call(f.exports,(function(e){return i(n[s][1][e]||e)}),f,f.exports,e,n,r,o)}return r[s].exports}for(var a=t,s=0;s<o.length;s++)i(o[s]);return i}return e}()({1:[function(e,t,n){t.exports={graphlib:e("./lib/graphlib"),layout:e("./lib/layout"),debug:e("./lib/debug"),util:{time:e("./lib/util").time,notime:e("./lib/util").notime},version:e("./lib/version")}},{"./lib/debug":6,"./lib/graphlib":7,"./lib/layout":9,"./lib/util":29,"./lib/version":30}],2:[function(e,t,n){var r=e("./lodash"),o=e("./greedy-fas");function i(e){var t="greedy"===e.graph().acyclicer?o(e,n(e)):a(e);function n(e){return function(t){return e.edge(t).weight}}r.forEach(t,(function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,r.uniqueId("rev"))}))}function a(e){var t=[],n={},o={};function i(a){r.has(o,a)||(o[a]=!0,n[a]=!0,r.forEach(e.outEdges(a),(function(e){r.has(n,e.w)?t.push(e):i(e.w)})),delete n[a])}return r.forEach(e.nodes(),i),t}function s(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}}))}t.exports={run:i,undo:s}},{"./greedy-fas":8,"./lodash":10}],3:[function(e,t,n){var r=e("./lodash"),o=e("./util");function i(e){function t(n){var o=e.children(n),i=e.node(n);if(o.length&&r.forEach(o,t),r.has(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var s=i.minRank,u=i.maxRank+1;s<u;++s)a(e,"borderLeft","_bl",n,i,s),a(e,"borderRight","_br",n,i,s)}}r.forEach(e.children(),t)}function a(e,t,n,r,i,a){var s={width:0,height:0,rank:a,borderType:t},u=i[t][a-1],c=o.addDummyNode(e,"border",s,n);i[t][a]=c,e.setParent(c,r),u&&e.setEdge(u,c,{weight:1})}t.exports=i},{"./lodash":10,"./util":29}],4:[function(e,t,n){var r=e("./lodash");function o(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||a(e)}function i(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||u(e),"lr"!==t&&"rl"!==t||(f(e),a(e))}function a(e){r.forEach(e.nodes(),(function(t){s(e.node(t))})),r.forEach(e.edges(),(function(t){s(e.edge(t))}))}function s(e){var t=e.width;e.width=e.height,e.height=t}function u(e){r.forEach(e.nodes(),(function(t){c(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.forEach(n.points,c),r.has(n,"y")&&c(n)}))}function c(e){e.y=-e.y}function f(e){r.forEach(e.nodes(),(function(t){d(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.forEach(n.points,d),r.has(n,"x")&&d(n)}))}function d(e){var t=e.x;e.x=e.y,e.y=t}t.exports={adjust:o,undo:i}},{"./lodash":10}],5:[function(e,t,n){function r(){var e={};e._next=e._prev=e,this._sentinel=e}function o(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function i(e,t){if("_next"!==e&&"_prev"!==e)return t}t.exports=r,r.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return o(t),t},r.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&o(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},r.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,i)),n=n._prev;return"["+e.join(", ")+"]"}},{}],6:[function(e,t,n){var r=e("./lodash"),o=e("./util"),i=e("./graphlib").Graph;function a(e){var t=o.buildLayerMatrix(e),n=new i({compound:!0,multigraph:!0}).setGraph({});return r.forEach(e.nodes(),(function(t){n.setNode(t,{label:t}),n.setParent(t,"layer"+e.node(t).rank)})),r.forEach(e.edges(),(function(e){n.setEdge(e.v,e.w,{},e.name)})),r.forEach(t,(function(e,t){var o="layer"+t;n.setNode(o,{rank:"same"}),r.reduce(e,(function(e,t){return n.setEdge(e,t,{style:"invis"}),t}))})),n}t.exports={debugOrdering:a}},{"./graphlib":7,"./lodash":10,"./util":29}],7:[function(e,t,n){var r;if("function"==typeof e)try{r=e("graphlib")}catch(e){}r||(r=window.graphlib),t.exports=r},{graphlib:31}],8:[function(e,t,n){var r=e("./lodash"),o=e("./graphlib").Graph,i=e("./data/list");t.exports=s;var a=r.constant(1);function s(e,t){if(e.nodeCount()<=1)return[];var n=f(e,t||a),o=u(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(o,(function(t){return e.outEdges(t.v,t.w)})),!0)}function u(e,t,n){for(var r,o=[],i=t[t.length-1],a=t[0];e.nodeCount();){for(;r=a.dequeue();)c(e,t,n,r);for(;r=i.dequeue();)c(e,t,n,r);if(e.nodeCount())for(var s=t.length-2;s>0;--s)if(r=t[s].dequeue()){o=o.concat(c(e,t,n,r,!0));break}}return o}function c(e,t,n,o,i){var a=i?[]:void 0;return r.forEach(e.inEdges(o.v),(function(r){var o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,d(t,n,s)})),r.forEach(e.outEdges(o.v),(function(r){var o=e.edge(r),i=r.w,a=e.node(i);a.in-=o,d(t,n,a)})),e.removeNode(o.v),a}function f(e,t){var n=new o,a=0,s=0;r.forEach(e.nodes(),(function(e){n.setNode(e,{v:e,in:0,out:0})})),r.forEach(e.edges(),(function(e){var r=n.edge(e.v,e.w)||0,o=t(e),i=r+o;n.setEdge(e.v,e.w,i),s=Math.max(s,n.node(e.v).out+=o),a=Math.max(a,n.node(e.w).in+=o)}));var u=r.range(s+a+3).map((function(){return new i})),c=a+1;return r.forEach(n.nodes(),(function(e){d(u,c,n.node(e))})),{graph:n,buckets:u,zeroIdx:c}}function d(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}},{"./data/list":5,"./graphlib":7,"./lodash":10}],9:[function(e,t,n){var r=e("./lodash"),o=e("./acyclic"),i=e("./normalize"),a=e("./rank"),s=e("./util").normalizeRanks,u=e("./parent-dummy-chains"),c=e("./util").removeEmptyRanks,f=e("./nesting-graph"),d=e("./add-border-segments"),h=e("./coordinate-system"),l=e("./order"),p=e("./position"),v=e("./util"),_=e("./graphlib").Graph;function y(e,t){var n=t&&t.debugTiming?v.time:v.notime;n("layout",(function(){var t=n(" buildLayoutGraph",(function(){return I(e)}));n(" runLayout",(function(){g(t,n)})),n(" updateInputGraph",(function(){b(e,t)}))}))}function g(e,t){t(" makeSpaceForEdgeLabels",(function(){S(e)})),t(" removeSelfEdges",(function(){B(e)})),t(" acyclic",(function(){o.run(e)})),t(" nestingGraph.run",(function(){f.run(e)})),t(" rank",(function(){a(v.asNonCompoundGraph(e))})),t(" injectEdgeLabelProxies",(function(){C(e)})),t(" removeEmptyRanks",(function(){c(e)})),t(" nestingGraph.cleanup",(function(){f.cleanup(e)})),t(" normalizeRanks",(function(){s(e)})),t(" assignRankMinMax",(function(){N(e)})),t(" removeEdgeLabelProxies",(function(){T(e)})),t(" normalize.run",(function(){i.run(e)})),t(" parentDummyChains",(function(){u(e)})),t(" addBorderSegments",(function(){d(e)})),t(" order",(function(){l(e)})),t(" insertSelfEdges",(function(){G(e)})),t(" adjustCoordinateSystem",(function(){h.adjust(e)})),t(" position",(function(){p(e)})),t(" positionSelfEdges",(function(){R(e)})),t(" removeBorderNodes",(function(){D(e)})),t(" normalize.undo",(function(){i.undo(e)})),t(" fixupEdgeLabelCoords",(function(){P(e)})),t(" undoCoordinateSystem",(function(){h.undo(e)})),t(" translateGraph",(function(){M(e)})),t(" assignNodeIntersects",(function(){L(e)})),t(" reversePoints",(function(){F(e)})),t(" acyclic.undo",(function(){o.undo(e)}))}function b(e,t){r.forEach(e.nodes(),(function(n){var r=e.node(n),o=t.node(n);r&&(r.x=o.x,r.y=o.y,t.children(n).length&&(r.width=o.width,r.height=o.height))})),r.forEach(e.edges(),(function(n){var o=e.edge(n),i=t.edge(n);o.points=i.points,r.has(i,"x")&&(o.x=i.x,o.y=i.y)})),e.graph().width=t.graph().width,e.graph().height=t.graph().height}t.exports=y;var m=["nodesep","edgesep","ranksep","marginx","marginy"],x={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},w=["acyclicer","ranker","rankdir","align"],E=["width","height"],j={width:0,height:0},k=["minlen","weight","width","height","labeloffset"],A={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},O=["labelpos"];function I(e){var t=new _({multigraph:!0,compound:!0}),n=z(e.graph());return t.setGraph(r.merge({},x,U(n,m),r.pick(n,w))),r.forEach(e.nodes(),(function(n){var o=z(e.node(n));t.setNode(n,r.defaults(U(o,E),j)),t.setParent(n,e.parent(n))})),r.forEach(e.edges(),(function(n){var o=z(e.edge(n));t.setEdge(n,r.merge({},A,U(o,k),r.pick(o,O)))})),t}function S(e){var t=e.graph();t.ranksep/=2,r.forEach(e.edges(),(function(n){var r=e.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}function C(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),o={rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t};v.addDummyNode(e,"edge-proxy",o,"_ep")}}))}function N(e){var t=0;r.forEach(e.nodes(),(function(n){var o=e.node(n);o.borderTop&&(o.minRank=e.node(o.borderTop).rank,o.maxRank=e.node(o.borderBottom).rank,t=r.max(t,o.maxRank))})),e.graph().maxRank=t}function T(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))}))}function M(e){var t=Number.POSITIVE_INFINITY,n=0,o=Number.POSITIVE_INFINITY,i=0,a=e.graph(),s=a.marginx||0,u=a.marginy||0;function c(e){var r=e.x,a=e.y,s=e.width,u=e.height;t=Math.min(t,r-s/2),n=Math.max(n,r+s/2),o=Math.min(o,a-u/2),i=Math.max(i,a+u/2)}r.forEach(e.nodes(),(function(t){c(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.has(n,"x")&&c(n)})),t-=s,o-=u,r.forEach(e.nodes(),(function(n){var r=e.node(n);r.x-=t,r.y-=o})),r.forEach(e.edges(),(function(n){var i=e.edge(n);r.forEach(i.points,(function(e){e.x-=t,e.y-=o})),r.has(i,"x")&&(i.x-=t),r.has(i,"y")&&(i.y-=o)})),a.width=n-t+s,a.height=i-o+u}function L(e){r.forEach(e.edges(),(function(t){var n,r,o=e.edge(t),i=e.node(t.v),a=e.node(t.w);o.points?(n=o.points[0],r=o.points[o.points.length-1]):(o.points=[],n=a,r=i),o.points.unshift(v.intersectRect(i,n)),o.points.push(v.intersectRect(a,r))}))}function P(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}function F(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);n.reversed&&n.points.reverse()}))}function D(e){r.forEach(e.nodes(),(function(t){if(e.children(t).length){var n=e.node(t),o=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(r.last(n.borderLeft)),s=e.node(r.last(n.borderRight));n.width=Math.abs(s.x-a.x),n.height=Math.abs(i.y-o.y),n.x=a.x+n.width/2,n.y=o.y+n.height/2}})),r.forEach(e.nodes(),(function(t){"border"===e.node(t).dummy&&e.removeNode(t)}))}function B(e){r.forEach(e.edges(),(function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}}))}function G(e){var t=v.buildLayerMatrix(e);r.forEach(t,(function(t){var n=0;r.forEach(t,(function(t,o){var i=e.node(t);i.order=o+n,r.forEach(i.selfEdges,(function(t){v.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:i.rank,order:o+ ++n,e:t.e,label:t.label},"_se")})),delete i.selfEdges}))}))}function R(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);if("selfedge"===n.dummy){var r=e.node(n.e.v),o=r.x+r.width/2,i=r.y,a=n.x-o,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:o+2*a/3,y:i-s},{x:o+5*a/6,y:i-s},{x:o+a,y:i},{x:o+5*a/6,y:i+s},{x:o+2*a/3,y:i+s}],n.label.x=n.x,n.label.y=n.y}}))}function U(e,t){return r.mapValues(r.pick(e,t),Number)}function z(e){var t={};return r.forEach(e,(function(e,n){t[n.toLowerCase()]=e})),t}},{"./acyclic":2,"./add-border-segments":3,"./coordinate-system":4,"./graphlib":7,"./lodash":10,"./nesting-graph":11,"./normalize":12,"./order":17,"./parent-dummy-chains":22,"./position":24,"./rank":26,"./util":29}],10:[function(e,t,n){var r;if("function"==typeof e)try{r={cloneDeep:e("lodash/cloneDeep"),constant:e("lodash/constant"),defaults:e("lodash/defaults"),each:e("lodash/each"),filter:e("lodash/filter"),find:e("lodash/find"),flatten:e("lodash/flatten"),forEach:e("lodash/forEach"),forIn:e("lodash/forIn"),has:e("lodash/has"),isUndefined:e("lodash/isUndefined"),last:e("lodash/last"),map:e("lodash/map"),mapValues:e("lodash/mapValues"),max:e("lodash/max"),merge:e("lodash/merge"),min:e("lodash/min"),minBy:e("lodash/minBy"),now:e("lodash/now"),pick:e("lodash/pick"),range:e("lodash/range"),reduce:e("lodash/reduce"),sortBy:e("lodash/sortBy"),uniqueId:e("lodash/uniqueId"),values:e("lodash/values"),zipObject:e("lodash/zipObject")}}catch(e){}r||(r=window._),t.exports=r},{"lodash/cloneDeep":227,"lodash/constant":228,"lodash/defaults":229,"lodash/each":230,"lodash/filter":232,"lodash/find":233,"lodash/flatten":235,"lodash/forEach":236,"lodash/forIn":237,"lodash/has":239,"lodash/isUndefined":258,"lodash/last":261,"lodash/map":262,"lodash/mapValues":263,"lodash/max":264,"lodash/merge":266,"lodash/min":267,"lodash/minBy":268,"lodash/now":270,"lodash/pick":271,"lodash/range":273,"lodash/reduce":274,"lodash/sortBy":276,"lodash/uniqueId":286,"lodash/values":287,"lodash/zipObject":288}],11:[function(e,t,n){var r=e("./lodash"),o=e("./util");function i(e){var t=o.addDummyNode(e,"root",{},"_root"),n=s(e),i=r.max(r.values(n))-1,c=2*i+1;e.graph().nestingRoot=t,r.forEach(e.edges(),(function(t){e.edge(t).minlen*=c}));var f=u(e)+1;r.forEach(e.children(),(function(r){a(e,t,c,f,i,n,r)})),e.graph().nodeRankFactor=c}function a(e,t,n,i,s,u,c){var f=e.children(c);if(f.length){var d=o.addBorderNode(e,"_bt"),h=o.addBorderNode(e,"_bb"),l=e.node(c);e.setParent(d,c),l.borderTop=d,e.setParent(h,c),l.borderBottom=h,r.forEach(f,(function(r){a(e,t,n,i,s,u,r);var o=e.node(r),f=o.borderTop?o.borderTop:r,l=o.borderBottom?o.borderBottom:r,p=o.borderTop?i:2*i,v=f!==l?1:s-u[c]+1;e.setEdge(d,f,{weight:p,minlen:v,nestingEdge:!0}),e.setEdge(l,h,{weight:p,minlen:v,nestingEdge:!0})})),e.parent(c)||e.setEdge(t,d,{weight:0,minlen:s+u[c]})}else c!==t&&e.setEdge(t,c,{weight:0,minlen:n})}function s(e){var t={};function n(o,i){var a=e.children(o);a&&a.length&&r.forEach(a,(function(e){n(e,i+1)})),t[o]=i}return r.forEach(e.children(),(function(e){n(e,1)})),t}function u(e){return r.reduce(e.edges(),(function(t,n){return t+e.edge(n).weight}),0)}function c(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,r.forEach(e.edges(),(function(t){e.edge(t).nestingEdge&&e.removeEdge(t)}))}t.exports={run:i,cleanup:c}},{"./lodash":10,"./util":29}],12:[function(e,t,n){var r=e("./lodash"),o=e("./util");function i(e){e.graph().dummyChains=[],r.forEach(e.edges(),(function(t){a(e,t)}))}function a(e,t){var n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,s=t.name,u=e.edge(t),c=u.labelRank;if(a!==r+1){var f,d,h;for(e.removeEdge(t),h=0,++r;r<a;++h,++r)u.points=[],d={width:0,height:0,edgeLabel:u,edgeObj:t,rank:r},f=o.addDummyNode(e,"edge",d,"_d"),r===c&&(d.width=u.width,d.height=u.height,d.dummy="edge-label",d.labelpos=u.labelpos),e.setEdge(n,f,{weight:u.weight},s),0===h&&e.graph().dummyChains.push(f),n=f;e.setEdge(n,i,{weight:u.weight},s)}}function s(e){r.forEach(e.graph().dummyChains,(function(t){var n,r=e.node(t),o=r.edgeLabel;for(e.setEdge(r.edgeObj,o);r.dummy;)n=e.successors(t)[0],e.removeNode(t),o.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(o.x=r.x,o.y=r.y,o.width=r.width,o.height=r.height),t=n,r=e.node(t)}))}t.exports={run:i,undo:s}},{"./lodash":10,"./util":29}],13:[function(e,t,n){var r=e("../lodash");function o(e,t,n){var o,i={};r.forEach(n,(function(n){for(var r,a,s=e.parent(n);s;){if((r=e.parent(s))?(a=i[r],i[r]=s):(a=o,o=s),a&&a!==s)return void t.setEdge(a,s);s=r}}))}t.exports=o},{"../lodash":10}],14:[function(e,t,n){var r=e("../lodash");function o(e,t){return r.map(t,(function(t){var n=e.inEdges(t);if(n.length){var o=r.reduce(n,(function(t,n){var r=e.edge(n),o=e.node(n.v);return{sum:t.sum+r.weight*o.order,weight:t.weight+r.weight}}),{sum:0,weight:0});return{v:t,barycenter:o.sum/o.weight,weight:o.weight}}return{v:t}}))}t.exports=o},{"../lodash":10}],15:[function(e,t,n){var r=e("../lodash"),o=e("../graphlib").Graph;function i(e,t,n){var i=a(e),s=new o({compound:!0}).setGraph({root:i}).setDefaultNodeLabel((function(t){return e.node(t)}));return r.forEach(e.nodes(),(function(o){var a=e.node(o),u=e.parent(o);(a.rank===t||a.minRank<=t&&t<=a.maxRank)&&(s.setNode(o),s.setParent(o,u||i),r.forEach(e[n](o),(function(t){var n=t.v===o?t.w:t.v,i=s.edge(n,o),a=r.isUndefined(i)?0:i.weight;s.setEdge(n,o,{weight:e.edge(t).weight+a})})),r.has(a,"minRank")&&s.setNode(o,{borderLeft:a.borderLeft[t],borderRight:a.borderRight[t]}))})),s}function a(e){for(var t;e.hasNode(t=r.uniqueId("_root")););return t}t.exports=i},{"../graphlib":7,"../lodash":10}],16:[function(e,t,n){var r=e("../lodash");function o(e,t){for(var n=0,r=1;r<t.length;++r)n+=i(e,t[r-1],t[r]);return n}function i(e,t,n){for(var o=r.zipObject(n,r.map(n,(function(e,t){return t}))),i=r.flatten(r.map(t,(function(t){return r.sortBy(r.map(e.outEdges(t),(function(t){return{pos:o[t.w],weight:e.edge(t).weight}})),"pos")})),!0),a=1;a<n.length;)a<<=1;var s=2*a-1;a-=1;var u=r.map(new Array(s),(function(){return 0})),c=0;return r.forEach(i.forEach((function(e){var t=e.pos+a;u[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=u[t+1]),u[t=t-1>>1]+=e.weight;c+=e.weight*n}))),c}t.exports=o},{"../lodash":10}],17:[function(e,t,n){var r=e("../lodash"),o=e("./init-order"),i=e("./cross-count"),a=e("./sort-subgraph"),s=e("./build-layer-graph"),u=e("./add-subgraph-constraints"),c=e("../graphlib").Graph,f=e("../util");function d(e){var t=f.maxRank(e),n=h(e,r.range(1,t+1),"inEdges"),a=h(e,r.range(t-1,-1,-1),"outEdges"),s=o(e);p(e,s);for(var u,c=Number.POSITIVE_INFINITY,d=0,v=0;v<4;++d,++v){l(d%2?n:a,d%4>=2),s=f.buildLayerMatrix(e);var _=i(e,s);_<c&&(v=0,u=r.cloneDeep(s),c=_)}p(e,u)}function h(e,t,n){return r.map(t,(function(t){return s(e,t,n)}))}function l(e,t){var n=new c;r.forEach(e,(function(e){var o=e.graph().root,i=a(e,o,n,t);r.forEach(i.vs,(function(t,n){e.node(t).order=n})),u(e,n,i.vs)}))}function p(e,t){r.forEach(t,(function(t){r.forEach(t,(function(t,n){e.node(t).order=n}))}))}t.exports=d},{"../graphlib":7,"../lodash":10,"../util":29,"./add-subgraph-constraints":13,"./build-layer-graph":15,"./cross-count":16,"./init-order":18,"./sort-subgraph":20}],18:[function(e,t,n){var r=e("../lodash");function o(e){var t={},n=r.filter(e.nodes(),(function(t){return!e.children(t).length})),o=r.max(r.map(n,(function(t){return e.node(t).rank}))),i=r.map(r.range(o+1),(function(){return[]}));function a(n){if(!r.has(t,n)){t[n]=!0;var o=e.node(n);i[o.rank].push(n),r.forEach(e.successors(n),a)}}var s=r.sortBy(n,(function(t){return e.node(t).rank}));return r.forEach(s,a),i}t.exports=o},{"../lodash":10}],19:[function(e,t,n){var r=e("../lodash");function o(e,t){var n={};return r.forEach(e,(function(e,t){var o=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};r.isUndefined(e.barycenter)||(o.barycenter=e.barycenter,o.weight=e.weight)})),r.forEach(t.edges(),(function(e){var t=n[e.v],o=n[e.w];r.isUndefined(t)||r.isUndefined(o)||(o.indegree++,t.out.push(n[e.w]))})),i(r.filter(n,(function(e){return!e.indegree})))}function i(e){var t=[];function n(e){return function(t){t.merged||(r.isUndefined(t.barycenter)||r.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&a(e,t)}}function o(t){return function(n){n.in.push(t),0==--n.indegree&&e.push(n)}}for(;e.length;){var i=e.pop();t.push(i),r.forEach(i.in.reverse(),n(i)),r.forEach(i.out,o(i))}return r.map(r.filter(t,(function(e){return!e.merged})),(function(e){return r.pick(e,["vs","i","barycenter","weight"])}))}function a(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}t.exports=o},{"../lodash":10}],20:[function(e,t,n){var r=e("../lodash"),o=e("./barycenter"),i=e("./resolve-conflicts"),a=e("./sort");function s(e,t,n,f){var d=e.children(t),h=e.node(t),l=h?h.borderLeft:void 0,p=h?h.borderRight:void 0,v={};l&&(d=r.filter(d,(function(e){return e!==l&&e!==p})));var _=o(e,d);r.forEach(_,(function(t){if(e.children(t.v).length){var o=s(e,t.v,n,f);v[t.v]=o,r.has(o,"barycenter")&&c(t,o)}}));var y=i(_,n);u(y,v);var g=a(y,f);if(l&&(g.vs=r.flatten([l,g.vs,p],!0),e.predecessors(l).length)){var b=e.node(e.predecessors(l)[0]),m=e.node(e.predecessors(p)[0]);r.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+b.order+m.order)/(g.weight+2),g.weight+=2}return g}function u(e,t){r.forEach(e,(function(e){e.vs=r.flatten(e.vs.map((function(e){return t[e]?t[e].vs:e})),!0)}))}function c(e,t){r.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}t.exports=s},{"../lodash":10,"./barycenter":14,"./resolve-conflicts":19,"./sort":21}],21:[function(e,t,n){var r=e("../lodash"),o=e("../util");function i(e,t){var n=o.partition(e,(function(e){return r.has(e,"barycenter")})),i=n.lhs,u=r.sortBy(n.rhs,(function(e){return-e.i})),c=[],f=0,d=0,h=0;i.sort(s(!!t)),h=a(c,u,h),r.forEach(i,(function(e){h+=e.vs.length,c.push(e.vs),f+=e.barycenter*e.weight,d+=e.weight,h=a(c,u,h)}));var l={vs:r.flatten(c,!0)};return d&&(l.barycenter=f/d,l.weight=d),l}function a(e,t,n){for(var o;t.length&&(o=r.last(t)).i<=n;)t.pop(),e.push(o.vs),n++;return n}function s(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}t.exports=i},{"../lodash":10,"../util":29}],22:[function(e,t,n){var r=e("./lodash");function o(e){var t=a(e);r.forEach(e.graph().dummyChains,(function(n){for(var r=e.node(n),o=r.edgeObj,a=i(e,t,o.v,o.w),s=a.path,u=a.lca,c=0,f=s[c],d=!0;n!==o.w;){if(r=e.node(n),d){for(;(f=s[c])!==u&&e.node(f).maxRank<r.rank;)c++;f===u&&(d=!1)}if(!d){for(;c<s.length-1&&e.node(f=s[c+1]).minRank<=r.rank;)c++;f=s[c]}e.setParent(n,f),n=e.successors(n)[0]}}))}function i(e,t,n,r){var o,i,a=[],s=[],u=Math.min(t[n].low,t[r].low),c=Math.max(t[n].lim,t[r].lim);o=n;do{o=e.parent(o),a.push(o)}while(o&&(t[o].low>u||c>t[o].lim));for(i=o,o=r;(o=e.parent(o))!==i;)s.push(o);return{path:a.concat(s.reverse()),lca:i}}function a(e){var t={},n=0;function o(i){var a=n;r.forEach(e.children(i),o),t[i]={low:a,lim:n++}}return r.forEach(e.children(),o),t}t.exports=o},{"./lodash":10}],23:[function(e,t,n){var r=e("../lodash"),o=e("../graphlib").Graph,i=e("../util");function a(e,t){var n={};function o(t,o){var i=0,a=0,s=t.length,f=r.last(o);return r.forEach(o,(function(t,d){var h=u(e,t),l=h?e.node(h).order:s;(h||t===f)&&(r.forEach(o.slice(a,d+1),(function(t){r.forEach(e.predecessors(t),(function(r){var o=e.node(r),a=o.order;!(a<i||l<a)||o.dummy&&e.node(t).dummy||c(n,r,t)}))})),a=d+1,i=l)})),o}return r.reduce(t,o),n}function s(e,t){var n={};function o(t,o,i,a,s){var u;r.forEach(r.range(o,i),(function(o){u=t[o],e.node(u).dummy&&r.forEach(e.predecessors(u),(function(t){var r=e.node(t);r.dummy&&(r.order<a||r.order>s)&&c(n,t,u)}))}))}function i(t,n){var i,a=-1,s=0;return r.forEach(n,(function(r,u){if("border"===e.node(r).dummy){var c=e.predecessors(r);c.length&&(i=e.node(c[0]).order,o(n,s,u,a,i),s=u,a=i)}o(n,s,n.length,i,t.length)})),n}return r.reduce(t,i),n}function u(e,t){if(e.node(t).dummy)return r.find(e.predecessors(t),(function(t){return e.node(t).dummy}))}function c(e,t,n){if(t>n){var r=t;t=n,n=r}var o=e[t];o||(e[t]=o={}),o[n]=!0}function f(e,t,n){if(t>n){var o=t;t=n,n=o}return r.has(e[t],n)}function d(e,t,n,o){var i={},a={},s={};return r.forEach(t,(function(e){r.forEach(e,(function(e,t){i[e]=e,a[e]=e,s[e]=t}))})),r.forEach(t,(function(e){var t=-1;r.forEach(e,(function(e){var u=o(e);if(u.length){u=r.sortBy(u,(function(e){return s[e]}));for(var c=(u.length-1)/2,d=Math.floor(c),h=Math.ceil(c);d<=h;++d){var l=u[d];a[e]===e&&t<s[l]&&!f(n,e,l)&&(a[l]=e,a[e]=i[e]=i[l],t=s[l])}}}))})),{root:i,align:a}}function h(e,t,n,o,i){var a={},s=l(e,t,n,i),u=i?"borderLeft":"borderRight";function c(e,t){for(var n=s.nodes(),r=n.pop(),o={};r;)o[r]?e(r):(o[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}function f(e){a[e]=s.inEdges(e).reduce((function(e,t){return Math.max(e,a[t.v]+s.edge(t))}),0)}function d(t){var n=s.outEdges(t).reduce((function(e,t){return Math.min(e,a[t.w]-s.edge(t))}),Number.POSITIVE_INFINITY),r=e.node(t);n!==Number.POSITIVE_INFINITY&&r.borderType!==u&&(a[t]=Math.max(a[t],n))}return c(f,s.predecessors.bind(s)),c(d,s.successors.bind(s)),r.forEach(o,(function(e){a[e]=a[n[e]]})),a}function l(e,t,n,i){var a=new o,s=e.graph(),u=g(s.nodesep,s.edgesep,i);return r.forEach(t,(function(t){var o;r.forEach(t,(function(t){var r=n[t];if(a.setNode(r),o){var i=n[o],s=a.edge(i,r);a.setEdge(i,r,Math.max(u(e,t,o),s||0))}o=t}))})),a}function p(e,t){return r.minBy(r.values(t),(function(t){var n=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;return r.forIn(t,(function(t,r){var i=b(e,r)/2;n=Math.max(t+i,n),o=Math.min(t-i,o)})),n-o}))}function v(e,t){var n=r.values(t),o=r.min(n),i=r.max(n);r.forEach(["u","d"],(function(n){r.forEach(["l","r"],(function(a){var s,u=n+a,c=e[u];if(c!==t){var f=r.values(c);(s="l"===a?o-r.min(f):i-r.max(f))&&(e[u]=r.mapValues(c,(function(e){return e+s})))}}))}))}function _(e,t){return r.mapValues(e.ul,(function(n,o){if(t)return e[t.toLowerCase()][o];var i=r.sortBy(r.map(e,o));return(i[1]+i[2])/2}))}function y(e){var t,n=i.buildLayerMatrix(e),o=r.merge(a(e,n),s(e,n)),u={};r.forEach(["u","d"],(function(i){t="u"===i?n:r.values(n).reverse(),r.forEach(["l","r"],(function(n){"r"===n&&(t=r.map(t,(function(e){return r.values(e).reverse()})));var a=("u"===i?e.predecessors:e.successors).bind(e),s=d(e,t,o,a),c=h(e,t,s.root,s.align,"r"===n);"r"===n&&(c=r.mapValues(c,(function(e){return-e}))),u[i+n]=c}))}));var c=p(e,u);return v(u,c),_(u,e.graph().align)}function g(e,t,n){return function(o,i,a){var s,u=o.node(i),c=o.node(a),f=0;if(f+=u.width/2,r.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=-u.width/2;break;case"r":s=u.width/2}if(s&&(f+=n?s:-s),s=0,f+=(u.dummy?t:e)/2,f+=(c.dummy?t:e)/2,f+=c.width/2,r.has(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":s=c.width/2;break;case"r":s=-c.width/2}return s&&(f+=n?s:-s),s=0,f}}function b(e,t){return e.node(t).width}t.exports={positionX:y,findType1Conflicts:a,findType2Conflicts:s,addConflict:c,hasConflict:f,verticalAlignment:d,horizontalCompaction:h,alignCoordinates:v,findSmallestWidthAlignment:p,balance:_}},{"../graphlib":7,"../lodash":10,"../util":29}],24:[function(e,t,n){var r=e("../lodash"),o=e("../util"),i=e("./bk").positionX;function a(e){s(e=o.asNonCompoundGraph(e)),r.forEach(i(e),(function(t,n){e.node(n).x=t}))}function s(e){var t=o.buildLayerMatrix(e),n=e.graph().ranksep,i=0;r.forEach(t,(function(t){var o=r.max(r.map(t,(function(t){return e.node(t).height})));r.forEach(t,(function(t){e.node(t).y=i+o/2})),i+=o+n}))}t.exports=a},{"../lodash":10,"../util":29,"./bk":23}],25:[function(e,t,n){var r=e("../lodash"),o=e("../graphlib").Graph,i=e("./util").slack;function a(e){var t,n,r=new o({directed:!1}),a=e.nodes()[0],f=e.nodeCount();for(r.setNode(a,{});s(r,e)<f;)t=u(r,e),n=r.hasNode(t.v)?i(e,t):-i(e,t),c(r,e,n);return r}function s(e,t){function n(o){r.forEach(t.nodeEdges(o),(function(r){var a=r.v,s=o===a?r.w:a;e.hasNode(s)||i(t,r)||(e.setNode(s,{}),e.setEdge(o,s,{}),n(s))}))}return r.forEach(e.nodes(),n),e.nodeCount()}function u(e,t){return r.minBy(t.edges(),(function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return i(t,n)}))}function c(e,t,n){r.forEach(e.nodes(),(function(e){t.node(e).rank+=n}))}t.exports=a},{"../graphlib":7,"../lodash":10,"./util":28}],26:[function(e,t,n){var r=e("./util").longestPath,o=e("./feasible-tree"),i=e("./network-simplex");function a(e){switch(e.graph().ranker){case"network-simplex":default:c(e);break;case"tight-tree":u(e);break;case"longest-path":s(e)}}t.exports=a;var s=r;function u(e){r(e),o(e)}function c(e){i(e)}},{"./feasible-tree":25,"./network-simplex":27,"./util":28}],27:[function(e,t,n){var r=e("../lodash"),o=e("./feasible-tree"),i=e("./util").slack,a=e("./util").longestPath,s=e("../graphlib").alg.preorder,u=e("../graphlib").alg.postorder,c=e("../util").simplify;function f(e){e=c(e),a(e);var t,n=o(e);for(p(n),d(n,e);t=_(n);)g(n,e,t,y(n,e,t))}function d(e,t){var n=u(e,e.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){h(e,t,n)}))}function h(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=l(e,t,n)}function l(e,t,n){var o=e.node(n).parent,i=!0,a=t.edge(n,o),s=0;return a||(i=!1,a=t.edge(o,n)),s=a.weight,r.forEach(t.nodeEdges(n),(function(r){var a=r.v===n,u=a?r.w:r.v;if(u!==o){var c=a===i,f=t.edge(r).weight;if(s+=c?f:-f,m(e,n,u)){var d=e.edge(n,u).cutvalue;s+=c?-d:d}}})),s}function p(e,t){arguments.length<2&&(t=e.nodes()[0]),v(e,{},1,t)}function v(e,t,n,o,i){var a=n,s=e.node(o);return t[o]=!0,r.forEach(e.neighbors(o),(function(i){r.has(t,i)||(n=v(e,t,n,i,o))})),s.low=a,s.lim=n++,i?s.parent=i:delete s.parent,n}function _(e){return r.find(e.edges(),(function(t){return e.edge(t).cutvalue<0}))}function y(e,t,n){var o=n.v,a=n.w;t.hasEdge(o,a)||(o=n.w,a=n.v);var s=e.node(o),u=e.node(a),c=s,f=!1;s.lim>u.lim&&(c=u,f=!0);var d=r.filter(t.edges(),(function(t){return f===x(e,e.node(t.v),c)&&f!==x(e,e.node(t.w),c)}));return r.minBy(d,(function(e){return i(t,e)}))}function g(e,t,n,r){var o=n.v,i=n.w;e.removeEdge(o,i),e.setEdge(r.v,r.w,{}),p(e),d(e,t),b(e,t)}function b(e,t){var n=r.find(e.nodes(),(function(e){return!t.node(e).parent})),o=s(e,n);o=o.slice(1),r.forEach(o,(function(n){var r=e.node(n).parent,o=t.edge(n,r),i=!1;o||(o=t.edge(r,n),i=!0),t.node(n).rank=t.node(r).rank+(i?o.minlen:-o.minlen)}))}function m(e,t,n){return e.hasEdge(t,n)}function x(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}t.exports=f,f.initLowLimValues=p,f.initCutValues=d,f.calcCutValue=l,f.leaveEdge=_,f.enterEdge=y,f.exchangeEdges=g},{"../graphlib":7,"../lodash":10,"../util":29,"./feasible-tree":25,"./util":28}],28:[function(e,t,n){var r=e("../lodash");function o(e){var t={};function n(o){var i=e.node(o);if(r.has(t,o))return i.rank;t[o]=!0;var a=r.min(r.map(e.outEdges(o),(function(t){return n(t.w)-e.edge(t).minlen})));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),i.rank=a}r.forEach(e.sources(),n)}function i(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}t.exports={longestPath:o,slack:i}},{"../lodash":10}],29:[function(e,t,n){var r=e("./lodash"),o=e("./graphlib").Graph;function i(e,t,n,o){var i;do{i=r.uniqueId(o)}while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function a(e){var t=(new o).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},o=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})})),t}function s(e){var t=new o({multigraph:e.isMultigraph()}).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){e.children(n).length||t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){t.setEdge(n,e.edge(n))})),t}function u(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.outEdges(t),(function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)}function c(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.inEdges(t),(function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)}function f(e,t){var n,r,o=e.x,i=e.y,a=t.x-o,s=t.y-i,u=e.width/2,c=e.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*u>Math.abs(a)*c?(s<0&&(c=-c),n=c*a/s,r=c):(a<0&&(u=-u),n=u,r=u*s/a),{x:o+n,y:i+r}}function d(e){var t=r.map(r.range(v(e)+1),(function(){return[]}));return r.forEach(e.nodes(),(function(n){var o=e.node(n),i=o.rank;r.isUndefined(i)||(t[i][o.order]=n)})),t}function h(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank})));r.forEach(e.nodes(),(function(n){var o=e.node(n);r.has(o,"rank")&&(o.rank-=t)}))}function l(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank}))),n=[];r.forEach(e.nodes(),(function(r){var o=e.node(r).rank-t;n[o]||(n[o]=[]),n[o].push(r)}));var o=0,i=e.graph().nodeRankFactor;r.forEach(n,(function(t,n){r.isUndefined(t)&&n%i!=0?--o:o&&r.forEach(t,(function(t){e.node(t).rank+=o}))}))}function p(e,t,n,r){var o={width:0,height:0};return arguments.length>=4&&(o.rank=n,o.order=r),i(e,"border",o,t)}function v(e){return r.max(r.map(e.nodes(),(function(t){var n=e.node(t).rank;if(!r.isUndefined(n))return n})))}function _(e,t){var n={lhs:[],rhs:[]};return r.forEach(e,(function(e){t(e)?n.lhs.push(e):n.rhs.push(e)})),n}function y(e,t){var n=r.now();try{return t()}finally{console.log(e+" time: "+(r.now()-n)+"ms")}}function g(e,t){return t()}t.exports={addDummyNode:i,simplify:a,asNonCompoundGraph:s,successorWeights:u,predecessorWeights:c,intersectRect:f,buildLayerMatrix:d,normalizeRanks:h,removeEmptyRanks:l,addBorderNode:p,maxRank:v,partition:_,time:y,notime:g}},{"./graphlib":7,"./lodash":10}],30:[function(e,t,n){t.exports="0.8.5"},{}],31:[function(e,t,n){var r=e("./lib");t.exports={Graph:r.Graph,json:e("./lib/json"),alg:e("./lib/alg"),version:r.version}},{"./lib":47,"./lib/alg":38,"./lib/json":48}],32:[function(e,t,n){var r=e("../lodash");function o(e){var t,n={},o=[];function i(o){r.has(n,o)||(n[o]=!0,t.push(o),r.each(e.successors(o),i),r.each(e.predecessors(o),i))}return r.each(e.nodes(),(function(e){t=[],i(e),t.length&&o.push(t)})),o}t.exports=o},{"../lodash":49}],33:[function(e,t,n){var r=e("../lodash");function o(e,t,n){r.isArray(t)||(t=[t]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),a=[],s={};return r.each(t,(function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);i(e,t,"post"===n,s,o,a)})),a}function i(e,t,n,o,a,s){r.has(o,t)||(o[t]=!0,n||s.push(t),r.each(a(t),(function(t){i(e,t,n,o,a,s)})),n&&s.push(t))}t.exports=o},{"../lodash":49}],34:[function(e,t,n){var r=e("./dijkstra"),o=e("../lodash");function i(e,t,n){return o.transform(e.nodes(),(function(o,i){o[i]=r(e,i,t,n)}),{})}t.exports=i},{"../lodash":49,"./dijkstra":35}],35:[function(e,t,n){var r=e("../lodash"),o=e("../data/priority-queue");t.exports=a;var i=r.constant(1);function a(e,t,n,r){return s(e,String(t),n||i,r||function(t){return e.outEdges(t)})}function s(e,t,n,r){var i,a,s={},u=new o,c=function(e){var t=e.v!==i?e.v:e.w,r=s[t],o=n(e),c=a.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);c<r.distance&&(r.distance=c,r.predecessor=i,u.decrease(t,c))};for(e.nodes().forEach((function(e){var n=e===t?0:Number.POSITIVE_INFINITY;s[e]={distance:n},u.add(e,n)}));u.size()>0&&(i=u.removeMin(),(a=s[i]).distance!==Number.POSITIVE_INFINITY);)r(i).forEach(c);return s}},{"../data/priority-queue":45,"../lodash":49}],36:[function(e,t,n){var r=e("../lodash"),o=e("./tarjan");function i(e){return r.filter(o(e),(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])}))}t.exports=i},{"../lodash":49,"./tarjan":43}],37:[function(e,t,n){var r=e("../lodash");t.exports=i;var o=r.constant(1);function i(e,t,n){return a(e,t||o,n||function(t){return e.outEdges(t)})}function a(e,t,n){var r={},o=e.nodes();return o.forEach((function(e){r[e]={},r[e][e]={distance:0},o.forEach((function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})})),n(e).forEach((function(n){var o=n.v===e?n.w:n.v,i=t(n);r[e][o]={distance:i,predecessor:e}}))})),o.forEach((function(e){var t=r[e];o.forEach((function(n){var i=r[n];o.forEach((function(n){var r=i[e],o=t[n],a=i[n],s=r.distance+o.distance;s<a.distance&&(a.distance=s,a.predecessor=o.predecessor)}))}))})),r}},{"../lodash":49}],38:[function(e,t,n){t.exports={components:e("./components"),dijkstra:e("./dijkstra"),dijkstraAll:e("./dijkstra-all"),findCycles:e("./find-cycles"),floydWarshall:e("./floyd-warshall"),isAcyclic:e("./is-acyclic"),postorder:e("./postorder"),preorder:e("./preorder"),prim:e("./prim"),tarjan:e("./tarjan"),topsort:e("./topsort")}},{"./components":32,"./dijkstra":35,"./dijkstra-all":34,"./find-cycles":36,"./floyd-warshall":37,"./is-acyclic":39,"./postorder":40,"./preorder":41,"./prim":42,"./tarjan":43,"./topsort":44}],39:[function(e,t,n){var r=e("./topsort");function o(e){try{r(e)}catch(e){if(e instanceof r.CycleException)return!1;throw e}return!0}t.exports=o},{"./topsort":44}],40:[function(e,t,n){var r=e("./dfs");function o(e,t){return r(e,t,"post")}t.exports=o},{"./dfs":33}],41:[function(e,t,n){var r=e("./dfs");function o(e,t){return r(e,t,"pre")}t.exports=o},{"./dfs":33}],42:[function(e,t,n){var r=e("../lodash"),o=e("../graph"),i=e("../data/priority-queue");function a(e,t){var n,a=new o,s={},u=new i;function c(e){var r=e.v===n?e.w:e.v,o=u.priority(r);if(void 0!==o){var i=t(e);i<o&&(s[r]=n,u.decrease(r,i))}}if(0===e.nodeCount())return a;r.each(e.nodes(),(function(e){u.add(e,Number.POSITIVE_INFINITY),a.setNode(e)})),u.decrease(e.nodes()[0],0);for(var f=!1;u.size()>0;){if(n=u.removeMin(),r.has(s,n))a.setEdge(n,s[n]);else{if(f)throw new Error("Input graph is not connected: "+e);f=!0}e.nodeEdges(n).forEach(c)}return a}t.exports=a},{"../data/priority-queue":45,"../graph":46,"../lodash":49}],43:[function(e,t,n){var r=e("../lodash");function o(e){var t=0,n=[],o={},i=[];function a(s){var u=o[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach((function(e){r.has(o,e)?o[e].onStack&&(u.lowlink=Math.min(u.lowlink,o[e].index)):(a(e),u.lowlink=Math.min(u.lowlink,o[e].lowlink))})),u.lowlink===u.index){var c,f=[];do{c=n.pop(),o[c].onStack=!1,f.push(c)}while(s!==c);i.push(f)}}return e.nodes().forEach((function(e){r.has(o,e)||a(e)})),i}t.exports=o},{"../lodash":49}],44:[function(e,t,n){var r=e("../lodash");function o(e){var t={},n={},o=[];function a(s){if(r.has(n,s))throw new i;r.has(t,s)||(n[s]=!0,t[s]=!0,r.each(e.predecessors(s),a),delete n[s],o.push(s))}if(r.each(e.sinks(),a),r.size(t)!==e.nodeCount())throw new i;return o}function i(){}t.exports=o,o.CycleException=i,i.prototype=new Error},{"../lodash":49}],45:[function(e,t,n){var r=e("../lodash");function o(){this._arr=[],this._keyIndices={}}t.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},o.prototype.has=function(e){return r.has(this._keyIndices,e)},o.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},o.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var o=this._arr,i=o.length;return n[e]=i,o.push({key:e,priority:t}),this._decrease(i),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},o.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},o.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,o=e;n<t.length&&(o=t[n].priority<t[o].priority?n:o,r<t.length&&(o=t[r].priority<t[o].priority?r:o),o!==e&&(this._swap(e,o),this._heapify(o)))},o.prototype._decrease=function(e){for(var t,n=this._arr,r=n[e].priority;0!==e&&!(n[t=e>>1].priority<r);)this._swap(e,t),e=t},o.prototype._swap=function(e,t){var n=this._arr,r=this._keyIndices,o=n[e],i=n[t];n[e]=i,n[t]=o,r[i.key]=e,r[o.key]=t}},{"../lodash":49}],46:[function(e,t,n){var r=e("./lodash");t.exports=s;var o="\\0",i="\\0",a="";function s(e){this._isDirected=!r.has(e,"directed")||e.directed,this._isMultigraph=!!r.has(e,"multigraph")&&e.multigraph,this._isCompound=!!r.has(e,"compound")&&e.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[i]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function u(e,t){e[t]?e[t]++:e[t]=1}function c(e,t){--e[t]||delete e[t]}function f(e,t,n,i){var s=""+t,u=""+n;if(!e&&s>u){var c=s;s=u,u=c}return s+a+u+a+(r.isUndefined(i)?o:i)}function d(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var a=o;o=i,i=a}var s={v:o,w:i};return r&&(s.name=r),s}function h(e,t){return f(e,t.v,t.w,t.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(e){return this._label=e,this},s.prototype.graph=function(){return this._label},s.prototype.setDefaultNodeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultNodeLabelFn=e,this},s.prototype.nodeCount=function(){return this._nodeCount},s.prototype.nodes=function(){return r.keys(this._nodes)},s.prototype.sources=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._in[t])}))},s.prototype.sinks=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._out[t])}))},s.prototype.setNodes=function(e,t){var n=arguments,o=this;return r.each(e,(function(e){n.length>1?o.setNode(e,t):o.setNode(e)})),this},s.prototype.setNode=function(e,t){return r.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=i,this._children[e]={},this._children[i][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},s.prototype.node=function(e){return this._nodes[e]},s.prototype.hasNode=function(e){return r.has(this._nodes,e)},s.prototype.removeNode=function(e){var t=this;if(r.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],r.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),r.each(r.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],r.each(r.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},s.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(t))t=i;else{for(var n=t+="";!r.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},s.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},s.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==i)return t}},s.prototype.children=function(e){if(r.isUndefined(e)&&(e=i),this._isCompound){var t=this._children[e];if(t)return r.keys(t)}else{if(e===i)return this.nodes();if(this.hasNode(e))return[]}},s.prototype.predecessors=function(e){var t=this._preds[e];if(t)return r.keys(t)},s.prototype.successors=function(e){var t=this._sucs[e];if(t)return r.keys(t)},s.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return r.union(t,this.successors(e))},s.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},s.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){e(r)&&t.setNode(r,n)})),r.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))}));var o={};function i(e){var r=n.parent(e);return void 0===r||t.hasNode(r)?(o[e]=r,r):r in o?o[r]:i(r)}return this._isCompound&&r.each(t.nodes(),(function(e){t.setParent(e,i(e))})),t},s.prototype.setDefaultEdgeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultEdgeLabelFn=e,this},s.prototype.edgeCount=function(){return this._edgeCount},s.prototype.edges=function(){return r.values(this._edgeObjs)},s.prototype.setPath=function(e,t){var n=this,o=arguments;return r.reduce(e,(function(e,r){return o.length>1?n.setEdge(e,r,t):n.setEdge(e,r),r})),this},s.prototype.setEdge=function(){var e,t,n,o,i=!1,a=arguments[0];"object"==typeof a&&null!==a&&"v"in a?(e=a.v,t=a.w,n=a.name,2===arguments.length&&(o=arguments[1],i=!0)):(e=a,t=arguments[1],n=arguments[3],arguments.length>2&&(o=arguments[2],i=!0)),e=""+e,t=""+t,r.isUndefined(n)||(n=""+n);var s=f(this._isDirected,e,t,n);if(r.has(this._edgeLabels,s))return i&&(this._edgeLabels[s]=o),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[s]=i?o:this._defaultEdgeLabelFn(e,t,n);var c=d(this._isDirected,e,t,n);return e=c.v,t=c.w,Object.freeze(c),this._edgeObjs[s]=c,u(this._preds[t],e),u(this._sucs[e],t),this._in[t][s]=c,this._out[e][s]=c,this._edgeCount++,this},s.prototype.edge=function(e,t,n){var r=1===arguments.length?h(this._isDirected,arguments[0]):f(this._isDirected,e,t,n);return this._edgeLabels[r]},s.prototype.hasEdge=function(e,t,n){var o=1===arguments.length?h(this._isDirected,arguments[0]):f(this._isDirected,e,t,n);return r.has(this._edgeLabels,o)},s.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?h(this._isDirected,arguments[0]):f(this._isDirected,e,t,n),o=this._edgeObjs[r];return o&&(e=o.v,t=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],c(this._preds[t],e),c(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},s.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var o=r.values(n);return t?r.filter(o,(function(e){return e.v===t})):o}},s.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var o=r.values(n);return t?r.filter(o,(function(e){return e.w===t})):o}},s.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},{"./lodash":49}],47:[function(e,t,n){t.exports={Graph:e("./graph"),version:e("./version")}},{"./graph":46,"./version":50}],48:[function(e,t,n){var r=e("./lodash"),o=e("./graph");function i(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:a(e),edges:s(e)};return r.isUndefined(e.graph())||(t.value=r.clone(e.graph())),t}function a(e){return r.map(e.nodes(),(function(t){var n=e.node(t),o=e.parent(t),i={v:t};return r.isUndefined(n)||(i.value=n),r.isUndefined(o)||(i.parent=o),i}))}function s(e){return r.map(e.edges(),(function(t){var n=e.edge(t),o={v:t.v,w:t.w};return r.isUndefined(t.name)||(o.name=t.name),r.isUndefined(n)||(o.value=n),o}))}function u(e){var t=new o(e.options).setGraph(e.value);return r.each(e.nodes,(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)})),r.each(e.edges,(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)})),t}t.exports={write:i,read:u}},{"./graph":46,"./lodash":49}],49:[function(e,t,n){var r;if("function"==typeof e)try{r={clone:e("lodash/clone"),constant:e("lodash/constant"),each:e("lodash/each"),filter:e("lodash/filter"),has:e("lodash/has"),isArray:e("lodash/isArray"),isEmpty:e("lodash/isEmpty"),isFunction:e("lodash/isFunction"),isUndefined:e("lodash/isUndefined"),keys:e("lodash/keys"),map:e("lodash/map"),reduce:e("lodash/reduce"),size:e("lodash/size"),transform:e("lodash/transform"),union:e("lodash/union"),values:e("lodash/values")}}catch(e){}r||(r=window._),t.exports=r},{"lodash/clone":226,"lodash/constant":228,"lodash/each":230,"lodash/filter":232,"lodash/has":239,"lodash/isArray":243,"lodash/isEmpty":247,"lodash/isFunction":248,"lodash/isUndefined":258,"lodash/keys":259,"lodash/map":262,"lodash/reduce":274,"lodash/size":275,"lodash/transform":284,"lodash/union":285,"lodash/values":287}],50:[function(e,t,n){t.exports="2.1.8"},{}],51:[function(e,t,n){var r=e("./_getNative")(e("./_root"),"DataView");t.exports=r},{"./_getNative":163,"./_root":208}],52:[function(e,t,n){var r=e("./_hashClear"),o=e("./_hashDelete"),i=e("./_hashGet"),a=e("./_hashHas"),s=e("./_hashSet");function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,t.exports=u},{"./_hashClear":172,"./_hashDelete":173,"./_hashGet":174,"./_hashHas":175,"./_hashSet":176}],53:[function(e,t,n){var r=e("./_listCacheClear"),o=e("./_listCacheDelete"),i=e("./_listCacheGet"),a=e("./_listCacheHas"),s=e("./_listCacheSet");function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,t.exports=u},{"./_listCacheClear":188,"./_listCacheDelete":189,"./_listCacheGet":190,"./_listCacheHas":191,"./_listCacheSet":192}],54:[function(e,t,n){var r=e("./_getNative")(e("./_root"),"Map");t.exports=r},{"./_getNative":163,"./_root":208}],55:[function(e,t,n){var r=e("./_mapCacheClear"),o=e("./_mapCacheDelete"),i=e("./_mapCacheGet"),a=e("./_mapCacheHas"),s=e("./_mapCacheSet");function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,t.exports=u},{"./_mapCacheClear":193,"./_mapCacheDelete":194,"./_mapCacheGet":195,"./_mapCacheHas":196,"./_mapCacheSet":197}],56:[function(e,t,n){var r=e("./_getNative")(e("./_root"),"Promise");t.exports=r},{"./_getNative":163,"./_root":208}],57:[function(e,t,n){var r=e("./_getNative")(e("./_root"),"Set");t.exports=r},{"./_getNative":163,"./_root":208}],58:[function(e,t,n){var r=e("./_MapCache"),o=e("./_setCacheAdd"),i=e("./_setCacheHas");function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,t.exports=a},{"./_MapCache":55,"./_setCacheAdd":210,"./_setCacheHas":211}],59:[function(e,t,n){var r=e("./_ListCache"),o=e("./_stackClear"),i=e("./_stackDelete"),a=e("./_stackGet"),s=e("./_stackHas"),u=e("./_stackSet");function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,t.exports=c},{"./_ListCache":53,"./_stackClear":215,"./_stackDelete":216,"./_stackGet":217,"./_stackHas":218,"./_stackSet":219}],60:[function(e,t,n){var r=e("./_root").Symbol;t.exports=r},{"./_root":208}],61:[function(e,t,n){var r=e("./_root").Uint8Array;t.exports=r},{"./_root":208}],62:[function(e,t,n){var r=e("./_getNative")(e("./_root"),"WeakMap");t.exports=r},{"./_getNative":163,"./_root":208}],63:[function(e,t,n){function r(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}t.exports=r},{}],64:[function(e,t,n){function r(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}t.exports=r},{}],65:[function(e,t,n){function r(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}t.exports=r},{}],66:[function(e,t,n){var r=e("./_baseIndexOf");function o(e,t){return!(null==e||!e.length)&&r(e,t,0)>-1}t.exports=o},{"./_baseIndexOf":95}],67:[function(e,t,n){function r(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}t.exports=r},{}],68:[function(e,t,n){var r=e("./_baseTimes"),o=e("./isArguments"),i=e("./isArray"),a=e("./isBuffer"),s=e("./_isIndex"),u=e("./isTypedArray"),c=Object.prototype.hasOwnProperty;function f(e,t){var n=i(e),f=!n&&o(e),d=!n&&!f&&a(e),h=!n&&!f&&!d&&u(e),l=n||f||d||h,p=l?r(e.length,String):[],v=p.length;for(var _ in e)!t&&!c.call(e,_)||l&&("length"==_||d&&("offset"==_||"parent"==_)||h&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||s(_,v))||p.push(_);return p}t.exports=f},{"./_baseTimes":125,"./_isIndex":181,"./isArguments":242,"./isArray":243,"./isBuffer":246,"./isTypedArray":257}],69:[function(e,t,n){function r(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}t.exports=r},{}],70:[function(e,t,n){function r(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}t.exports=r},{}],71:[function(e,t,n){function r(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}t.exports=r},{}],72:[function(e,t,n){function r(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}t.exports=r},{}],73:[function(e,t,n){var r=e("./_baseProperty")("length");t.exports=r},{"./_baseProperty":117}],74:[function(e,t,n){var r=e("./_baseAssignValue"),o=e("./eq");function i(e,t,n){(void 0!==n&&!o(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}t.exports=i},{"./_baseAssignValue":79,"./eq":231}],75:[function(e,t,n){var r=e("./_baseAssignValue"),o=e("./eq"),i=Object.prototype.hasOwnProperty;function a(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}t.exports=a},{"./_baseAssignValue":79,"./eq":231}],76:[function(e,t,n){var r=e("./eq");function o(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}t.exports=o},{"./eq":231}],77:[function(e,t,n){var r=e("./_copyObject"),o=e("./keys");function i(e,t){return e&&r(t,o(t),e)}t.exports=i},{"./_copyObject":143,"./keys":259}],78:[function(e,t,n){var r=e("./_copyObject"),o=e("./keysIn");function i(e,t){return e&&r(t,o(t),e)}t.exports=i},{"./_copyObject":143,"./keysIn":260}],79:[function(e,t,n){var r=e("./_defineProperty");function o(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}t.exports=o},{"./_defineProperty":153}],80:[function(e,t,n){var r=e("./_Stack"),o=e("./_arrayEach"),i=e("./_assignValue"),a=e("./_baseAssign"),s=e("./_baseAssignIn"),u=e("./_cloneBuffer"),c=e("./_copyArray"),f=e("./_copySymbols"),d=e("./_copySymbolsIn"),h=e("./_getAllKeys"),l=e("./_getAllKeysIn"),p=e("./_getTag"),v=e("./_initCloneArray"),_=e("./_initCloneByTag"),y=e("./_initCloneObject"),g=e("./isArray"),b=e("./isBuffer"),m=e("./isMap"),x=e("./isObject"),w=e("./isSet"),E=e("./keys"),j=1,k=2,A=4,O="[object Arguments]",I="[object Array]",S="[object Boolean]",C="[object Date]",N="[object Error]",T="[object Function]",M="[object GeneratorFunction]",L="[object Map]",P="[object Number]",F="[object Object]",D="[object RegExp]",B="[object Set]",G="[object String]",R="[object Symbol]",U="[object WeakMap]",z="[object ArrayBuffer]",V="[object DataView]",q="[object Float32Array]",K="[object Float64Array]",H="[object Int8Array]",Y="[object Int16Array]",$="[object Int32Array]",W="[object Uint8Array]",J="[object Uint8ClampedArray]",X="[object Uint16Array]",Z="[object Uint32Array]",Q={};function ee(e,t,n,I,S,C){var N,L=t&j,P=t&k,D=t&A;if(n&&(N=S?n(e,I,S,C):n(e)),void 0!==N)return N;if(!x(e))return e;var B=g(e);if(B){if(N=v(e),!L)return c(e,N)}else{var G=p(e),R=G==T||G==M;if(b(e))return u(e,L);if(G==F||G==O||R&&!S){if(N=P||R?{}:y(e),!L)return P?d(e,s(N,e)):f(e,a(N,e))}else{if(!Q[G])return S?e:{};N=_(e,G,L)}}C||(C=new r);var U=C.get(e);if(U)return U;C.set(e,N),w(e)?e.forEach((function(r){N.add(ee(r,t,n,r,e,C))})):m(e)&&e.forEach((function(r,o){N.set(o,ee(r,t,n,o,e,C))}));var z=D?P?l:h:P?keysIn:E,V=B?void 0:z(e);return o(V||e,(function(r,o){V&&(r=e[o=r]),i(N,o,ee(r,t,n,o,e,C))})),N}Q[O]=Q[I]=Q[z]=Q[V]=Q[S]=Q[C]=Q[q]=Q[K]=Q[H]=Q[Y]=Q[$]=Q[L]=Q[P]=Q[F]=Q[D]=Q[B]=Q[G]=Q[R]=Q[W]=Q[J]=Q[X]=Q[Z]=!0,Q[N]=Q[T]=Q[U]=!1,t.exports=ee},{"./_Stack":59,"./_arrayEach":64,"./_assignValue":75,"./_baseAssign":77,"./_baseAssignIn":78,"./_cloneBuffer":135,"./_copyArray":142,"./_copySymbols":144,"./_copySymbolsIn":145,"./_getAllKeys":159,"./_getAllKeysIn":160,"./_getTag":168,"./_initCloneArray":177,"./_initCloneByTag":178,"./_initCloneObject":179,"./isArray":243,"./isBuffer":246,"./isMap":250,"./isObject":251,"./isSet":254,"./keys":259}],81:[function(e,t,n){var r=e("./isObject"),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();t.exports=i},{"./isObject":251}],82:[function(e,t,n){var r=e("./_baseForOwn"),o=e("./_createBaseEach")(r);t.exports=o},{"./_baseForOwn":88,"./_createBaseEach":148}],83:[function(e,t,n){var r=e("./isSymbol");function o(e,t,n){for(var o=-1,i=e.length;++o<i;){var a=e[o],s=t(a);if(null!=s&&(void 0===u?s==s&&!r(s):n(s,u)))var u=s,c=a}return c}t.exports=o},{"./isSymbol":256}],84:[function(e,t,n){var r=e("./_baseEach");function o(e,t){var n=[];return r(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}t.exports=o},{"./_baseEach":82}],85:[function(e,t,n){function r(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}t.exports=r},{}],86:[function(e,t,n){var r=e("./_arrayPush"),o=e("./_isFlattenable");function i(e,t,n,a,s){var u=-1,c=e.length;for(n||(n=o),s||(s=[]);++u<c;){var f=e[u];t>0&&n(f)?t>1?i(f,t-1,n,a,s):r(s,f):a||(s[s.length]=f)}return s}t.exports=i},{"./_arrayPush":70,"./_isFlattenable":180}],87:[function(e,t,n){var r=e("./_createBaseFor")();t.exports=r},{"./_createBaseFor":149}],88:[function(e,t,n){var r=e("./_baseFor"),o=e("./keys");function i(e,t){return e&&r(e,t,o)}t.exports=i},{"./_baseFor":87,"./keys":259}],89:[function(e,t,n){var r=e("./_castPath"),o=e("./_toKey");function i(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n<i;)e=e[o(t[n++])];return n&&n==i?e:void 0}t.exports=i},{"./_castPath":133,"./_toKey":223}],90:[function(e,t,n){var r=e("./_arrayPush"),o=e("./isArray");function i(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}t.exports=i},{"./_arrayPush":70,"./isArray":243}],91:[function(e,t,n){var r=e("./_Symbol"),o=e("./_getRawTag"),i=e("./_objectToString"),a="[object Null]",s="[object Undefined]",u=r?r.toStringTag:void 0;function c(e){return null==e?void 0===e?s:a:u&&u in Object(e)?o(e):i(e)}t.exports=c},{"./_Symbol":60,"./_getRawTag":165,"./_objectToString":205}],92:[function(e,t,n){function r(e,t){return e>t}t.exports=r},{}],93:[function(e,t,n){var r=Object.prototype.hasOwnProperty;function o(e,t){return null!=e&&r.call(e,t)}t.exports=o},{}],94:[function(e,t,n){function r(e,t){return null!=e&&t in Object(e)}t.exports=r},{}],95:[function(e,t,n){var r=e("./_baseFindIndex"),o=e("./_baseIsNaN"),i=e("./_strictIndexOf");function a(e,t,n){return t==t?i(e,t,n):r(e,o,n)}t.exports=a},{"./_baseFindIndex":85,"./_baseIsNaN":101,"./_strictIndexOf":220}],96:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./isObjectLike"),i="[object Arguments]";function a(e){return o(e)&&r(e)==i}t.exports=a},{"./_baseGetTag":91,"./isObjectLike":252}],97:[function(e,t,n){var r=e("./_baseIsEqualDeep"),o=e("./isObjectLike");function i(e,t,n,a,s){return e===t||(null==e||null==t||!o(e)&&!o(t)?e!=e&&t!=t:r(e,t,n,a,i,s))}t.exports=i},{"./_baseIsEqualDeep":98,"./isObjectLike":252}],98:[function(e,t,n){var r=e("./_Stack"),o=e("./_equalArrays"),i=e("./_equalByTag"),a=e("./_equalObjects"),s=e("./_getTag"),u=e("./isArray"),c=e("./isBuffer"),f=e("./isTypedArray"),d=1,h="[object Arguments]",l="[object Array]",p="[object Object]",v=Object.prototype.hasOwnProperty;function _(e,t,n,_,y,g){var b=u(e),m=u(t),x=b?l:s(e),w=m?l:s(t),E=(x=x==h?p:x)==p,j=(w=w==h?p:w)==p,k=x==w;if(k&&c(e)){if(!c(t))return!1;b=!0,E=!1}if(k&&!E)return g||(g=new r),b||f(e)?o(e,t,n,_,y,g):i(e,t,x,n,_,y,g);if(!(n&d)){var A=E&&v.call(e,"__wrapped__"),O=j&&v.call(t,"__wrapped__");if(A||O){var I=A?e.value():e,S=O?t.value():t;return g||(g=new r),y(I,S,n,_,g)}}return!!k&&(g||(g=new r),a(e,t,n,_,y,g))}t.exports=_},{"./_Stack":59,"./_equalArrays":154,"./_equalByTag":155,"./_equalObjects":156,"./_getTag":168,"./isArray":243,"./isBuffer":246,"./isTypedArray":257}],99:[function(e,t,n){var r=e("./_getTag"),o=e("./isObjectLike"),i="[object Map]";function a(e){return o(e)&&r(e)==i}t.exports=a},{"./_getTag":168,"./isObjectLike":252}],100:[function(e,t,n){var r=e("./_Stack"),o=e("./_baseIsEqual"),i=1,a=2;function s(e,t,n,s){var u=n.length,c=u,f=!s;if(null==e)return!c;for(e=Object(e);u--;){var d=n[u];if(f&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++u<c;){var h=(d=n[u])[0],l=e[h],p=d[1];if(f&&d[2]){if(void 0===l&&!(h in e))return!1}else{var v=new r;if(s)var _=s(l,p,h,e,t,v);if(!(void 0===_?o(p,l,i|a,s,v):_))return!1}}return!0}t.exports=s},{"./_Stack":59,"./_baseIsEqual":97}],101:[function(e,t,n){function r(e){return e!=e}t.exports=r},{}],102:[function(e,t,n){var r=e("./isFunction"),o=e("./_isMasked"),i=e("./isObject"),a=e("./_toSource"),s=/[\\\\^$.*+?()[\\]{}|]/g,u=/^\\[object .+?Constructor\\]$/,c=Function.prototype,f=Object.prototype,d=c.toString,h=f.hasOwnProperty,l=RegExp("^"+d.call(h).replace(s,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$");function p(e){return!(!i(e)||o(e))&&(r(e)?l:u).test(a(e))}t.exports=p},{"./_isMasked":185,"./_toSource":224,"./isFunction":248,"./isObject":251}],103:[function(e,t,n){var r=e("./_getTag"),o=e("./isObjectLike"),i="[object Set]";function a(e){return o(e)&&r(e)==i}t.exports=a},{"./_getTag":168,"./isObjectLike":252}],104:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./isLength"),i=e("./isObjectLike"),a="[object Arguments]",s="[object Array]",u="[object Boolean]",c="[object Date]",f="[object Error]",d="[object Function]",h="[object Map]",l="[object Number]",p="[object Object]",v="[object RegExp]",_="[object Set]",y="[object String]",g="[object WeakMap]",b="[object ArrayBuffer]",m="[object DataView]",x="[object Float64Array]",w="[object Int8Array]",E="[object Int16Array]",j="[object Int32Array]",k="[object Uint8Array]",A="[object Uint8ClampedArray]",O="[object Uint16Array]",I="[object Uint32Array]",S={};function C(e){return i(e)&&o(e.length)&&!!S[r(e)]}S["[object Float32Array]"]=S[x]=S[w]=S[E]=S[j]=S[k]=S[A]=S[O]=S[I]=!0,S[a]=S[s]=S[b]=S[u]=S[m]=S[c]=S[f]=S[d]=S[h]=S[l]=S[p]=S[v]=S[_]=S[y]=S[g]=!1,t.exports=C},{"./_baseGetTag":91,"./isLength":249,"./isObjectLike":252}],105:[function(e,t,n){var r=e("./_baseMatches"),o=e("./_baseMatchesProperty"),i=e("./identity"),a=e("./isArray"),s=e("./property");function u(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):r(e):s(e)}t.exports=u},{"./_baseMatches":110,"./_baseMatchesProperty":111,"./identity":241,"./isArray":243,"./property":272}],106:[function(e,t,n){var r=e("./_isPrototype"),o=e("./_nativeKeys"),i=Object.prototype.hasOwnProperty;function a(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}t.exports=a},{"./_isPrototype":186,"./_nativeKeys":202}],107:[function(e,t,n){var r=e("./isObject"),o=e("./_isPrototype"),i=e("./_nativeKeysIn"),a=Object.prototype.hasOwnProperty;function s(e){if(!r(e))return i(e);var t=o(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}t.exports=s},{"./_isPrototype":186,"./_nativeKeysIn":203,"./isObject":251}],108:[function(e,t,n){function r(e,t){return e<t}t.exports=r},{}],109:[function(e,t,n){var r=e("./_baseEach"),o=e("./isArrayLike");function i(e,t){var n=-1,i=o(e)?Array(e.length):[];return r(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}t.exports=i},{"./_baseEach":82,"./isArrayLike":244}],110:[function(e,t,n){var r=e("./_baseIsMatch"),o=e("./_getMatchData"),i=e("./_matchesStrictComparable");function a(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}t.exports=a},{"./_baseIsMatch":100,"./_getMatchData":162,"./_matchesStrictComparable":199}],111:[function(e,t,n){var r=e("./_baseIsEqual"),o=e("./get"),i=e("./hasIn"),a=e("./_isKey"),s=e("./_isStrictComparable"),u=e("./_matchesStrictComparable"),c=e("./_toKey"),f=1,d=2;function h(e,t){return a(e)&&s(t)?u(c(e),t):function(n){var a=o(n,e);return void 0===a&&a===t?i(n,e):r(t,a,f|d)}}t.exports=h},{"./_baseIsEqual":97,"./_isKey":183,"./_isStrictComparable":187,"./_matchesStrictComparable":199,"./_toKey":223,"./get":238,"./hasIn":240}],112:[function(e,t,n){var r=e("./_Stack"),o=e("./_assignMergeValue"),i=e("./_baseFor"),a=e("./_baseMergeDeep"),s=e("./isObject"),u=e("./keysIn"),c=e("./_safeGet");function f(e,t,n,d,h){e!==t&&i(t,(function(i,u){if(h||(h=new r),s(i))a(e,t,u,n,f,d,h);else{var l=d?d(c(e,u),i,u+"",e,t,h):void 0;void 0===l&&(l=i),o(e,u,l)}}),u)}t.exports=f},{"./_Stack":59,"./_assignMergeValue":74,"./_baseFor":87,"./_baseMergeDeep":113,"./_safeGet":209,"./isObject":251,"./keysIn":260}],113:[function(e,t,n){var r=e("./_assignMergeValue"),o=e("./_cloneBuffer"),i=e("./_cloneTypedArray"),a=e("./_copyArray"),s=e("./_initCloneObject"),u=e("./isArguments"),c=e("./isArray"),f=e("./isArrayLikeObject"),d=e("./isBuffer"),h=e("./isFunction"),l=e("./isObject"),p=e("./isPlainObject"),v=e("./isTypedArray"),_=e("./_safeGet"),y=e("./toPlainObject");function g(e,t,n,g,b,m,x){var w=_(e,n),E=_(t,n),j=x.get(E);if(j)r(e,n,j);else{var k=m?m(w,E,n+"",e,t,x):void 0,A=void 0===k;if(A){var O=c(E),I=!O&&d(E),S=!O&&!I&&v(E);k=E,O||I||S?c(w)?k=w:f(w)?k=a(w):I?(A=!1,k=o(E,!0)):S?(A=!1,k=i(E,!0)):k=[]:p(E)||u(E)?(k=w,u(w)?k=y(w):l(w)&&!h(w)||(k=s(E))):A=!1}A&&(x.set(E,k),b(k,E,g,m,x),x.delete(E)),r(e,n,k)}}t.exports=g},{"./_assignMergeValue":74,"./_cloneBuffer":135,"./_cloneTypedArray":139,"./_copyArray":142,"./_initCloneObject":179,"./_safeGet":209,"./isArguments":242,"./isArray":243,"./isArrayLikeObject":245,"./isBuffer":246,"./isFunction":248,"./isObject":251,"./isPlainObject":253,"./isTypedArray":257,"./toPlainObject":282}],114:[function(e,t,n){var r=e("./_arrayMap"),o=e("./_baseIteratee"),i=e("./_baseMap"),a=e("./_baseSortBy"),s=e("./_baseUnary"),u=e("./_compareMultiple"),c=e("./identity");function f(e,t,n){var f=-1;t=r(t.length?t:[c],s(o));var d=i(e,(function(e,n,o){return{criteria:r(t,(function(t){return t(e)})),index:++f,value:e}}));return a(d,(function(e,t){return u(e,t,n)}))}t.exports=f},{"./_arrayMap":69,"./_baseIteratee":105,"./_baseMap":109,"./_baseSortBy":124,"./_baseUnary":127,"./_compareMultiple":141,"./identity":241}],115:[function(e,t,n){var r=e("./_basePickBy"),o=e("./hasIn");function i(e,t){return r(e,t,(function(t,n){return o(e,n)}))}t.exports=i},{"./_basePickBy":116,"./hasIn":240}],116:[function(e,t,n){var r=e("./_baseGet"),o=e("./_baseSet"),i=e("./_castPath");function a(e,t,n){for(var a=-1,s=t.length,u={};++a<s;){var c=t[a],f=r(e,c);n(f,c)&&o(u,i(c,e),f)}return u}t.exports=a},{"./_baseGet":89,"./_baseSet":122,"./_castPath":133}],117:[function(e,t,n){function r(e){return function(t){return null==t?void 0:t[e]}}t.exports=r},{}],118:[function(e,t,n){var r=e("./_baseGet");function o(e){return function(t){return r(t,e)}}t.exports=o},{"./_baseGet":89}],119:[function(e,t,n){var r=Math.ceil,o=Math.max;function i(e,t,n,i){for(var a=-1,s=o(r((t-e)/(n||1)),0),u=Array(s);s--;)u[i?s:++a]=e,e+=n;return u}t.exports=i},{}],120:[function(e,t,n){function r(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}t.exports=r},{}],121:[function(e,t,n){var r=e("./identity"),o=e("./_overRest"),i=e("./_setToString");function a(e,t){return i(o(e,t,r),e+"")}t.exports=a},{"./_overRest":207,"./_setToString":213,"./identity":241}],122:[function(e,t,n){var r=e("./_assignValue"),o=e("./_castPath"),i=e("./_isIndex"),a=e("./isObject"),s=e("./_toKey");function u(e,t,n,u){if(!a(e))return e;for(var c=-1,f=(t=o(t,e)).length,d=f-1,h=e;null!=h&&++c<f;){var l=s(t[c]),p=n;if(c!=d){var v=h[l];void 0===(p=u?u(v,l,h):void 0)&&(p=a(v)?v:i(t[c+1])?[]:{})}r(h,l,p),h=h[l]}return e}t.exports=u},{"./_assignValue":75,"./_castPath":133,"./_isIndex":181,"./_toKey":223,"./isObject":251}],123:[function(e,t,n){var r=e("./constant"),o=e("./_defineProperty"),i=e("./identity"),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:i;t.exports=a},{"./_defineProperty":153,"./constant":228,"./identity":241}],124:[function(e,t,n){function r(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}t.exports=r},{}],125:[function(e,t,n){function r(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}t.exports=r},{}],126:[function(e,t,n){var r=e("./_Symbol"),o=e("./_arrayMap"),i=e("./isArray"),a=e("./isSymbol"),s=1/0,u=r?r.prototype:void 0,c=u?u.toString:void 0;function f(e){if("string"==typeof e)return e;if(i(e))return o(e,f)+"";if(a(e))return c?c.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}t.exports=f},{"./_Symbol":60,"./_arrayMap":69,"./isArray":243,"./isSymbol":256}],127:[function(e,t,n){function r(e){return function(t){return e(t)}}t.exports=r},{}],128:[function(e,t,n){var r=e("./_SetCache"),o=e("./_arrayIncludes"),i=e("./_arrayIncludesWith"),a=e("./_cacheHas"),s=e("./_createSet"),u=e("./_setToArray"),c=200;function f(e,t,n){var f=-1,d=o,h=e.length,l=!0,p=[],v=p;if(n)l=!1,d=i;else if(h>=c){var _=t?null:s(e);if(_)return u(_);l=!1,d=a,v=new r}else v=t?[]:p;e:for(;++f<h;){var y=e[f],g=t?t(y):y;if(y=n||0!==y?y:0,l&&g==g){for(var b=v.length;b--;)if(v[b]===g)continue e;t&&v.push(g),p.push(y)}else d(v,g,n)||(v!==p&&v.push(g),p.push(y))}return p}t.exports=f},{"./_SetCache":58,"./_arrayIncludes":66,"./_arrayIncludesWith":67,"./_cacheHas":131,"./_createSet":152,"./_setToArray":212}],129:[function(e,t,n){var r=e("./_arrayMap");function o(e,t){return r(t,(function(t){return e[t]}))}t.exports=o},{"./_arrayMap":69}],130:[function(e,t,n){function r(e,t,n){for(var r=-1,o=e.length,i=t.length,a={};++r<o;){var s=r<i?t[r]:void 0;n(a,e[r],s)}return a}t.exports=r},{}],131:[function(e,t,n){function r(e,t){return e.has(t)}t.exports=r},{}],132:[function(e,t,n){var r=e("./identity");function o(e){return"function"==typeof e?e:r}t.exports=o},{"./identity":241}],133:[function(e,t,n){var r=e("./isArray"),o=e("./_isKey"),i=e("./_stringToPath"),a=e("./toString");function s(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}t.exports=s},{"./_isKey":183,"./_stringToPath":222,"./isArray":243,"./toString":283}],134:[function(e,t,n){var r=e("./_Uint8Array");function o(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}t.exports=o},{"./_Uint8Array":61}],135:[function(e,t,n){var r=e("./_root"),o="object"==typeof n&&n&&!n.nodeType&&n,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;function u(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}t.exports=u},{"./_root":208}],136:[function(e,t,n){var r=e("./_cloneArrayBuffer");function o(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}t.exports=o},{"./_cloneArrayBuffer":134}],137:[function(e,t,n){var r=/\\w*$/;function o(e){var t=new e.constructor(e.source,r.exec(e));return t.lastIndex=e.lastIndex,t}t.exports=o},{}],138:[function(e,t,n){var r=e("./_Symbol"),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;function a(e){return i?Object(i.call(e)):{}}t.exports=a},{"./_Symbol":60}],139:[function(e,t,n){var r=e("./_cloneArrayBuffer");function o(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}t.exports=o},{"./_cloneArrayBuffer":134}],140:[function(e,t,n){var r=e("./isSymbol");function o(e,t){if(e!==t){var n=void 0!==e,o=null===e,i=e==e,a=r(e),s=void 0!==t,u=null===t,c=t==t,f=r(t);if(!u&&!f&&!a&&e>t||a&&s&&c&&!u&&!f||o&&s&&c||!n&&c||!i)return 1;if(!o&&!a&&!f&&e<t||f&&n&&i&&!o&&!a||u&&n&&i||!s&&i||!c)return-1}return 0}t.exports=o},{"./isSymbol":256}],141:[function(e,t,n){var r=e("./_compareAscending");function o(e,t,n){for(var o=-1,i=e.criteria,a=t.criteria,s=i.length,u=n.length;++o<s;){var c=r(i[o],a[o]);if(c)return o>=u?c:c*("desc"==n[o]?-1:1)}return e.index-t.index}t.exports=o},{"./_compareAscending":140}],142:[function(e,t,n){function r(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}t.exports=r},{}],143:[function(e,t,n){var r=e("./_assignValue"),o=e("./_baseAssignValue");function i(e,t,n,i){var a=!n;n||(n={});for(var s=-1,u=t.length;++s<u;){var c=t[s],f=i?i(n[c],e[c],c,n,e):void 0;void 0===f&&(f=e[c]),a?o(n,c,f):r(n,c,f)}return n}t.exports=i},{"./_assignValue":75,"./_baseAssignValue":79}],144:[function(e,t,n){var r=e("./_copyObject"),o=e("./_getSymbols");function i(e,t){return r(e,o(e),t)}t.exports=i},{"./_copyObject":143,"./_getSymbols":166}],145:[function(e,t,n){var r=e("./_copyObject"),o=e("./_getSymbolsIn");function i(e,t){return r(e,o(e),t)}t.exports=i},{"./_copyObject":143,"./_getSymbolsIn":167}],146:[function(e,t,n){var r=e("./_root")["__core-js_shared__"];t.exports=r},{"./_root":208}],147:[function(e,t,n){var r=e("./_baseRest"),o=e("./_isIterateeCall");function i(e){return r((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var u=n[r];u&&e(t,u,r,a)}return t}))}t.exports=i},{"./_baseRest":121,"./_isIterateeCall":182}],148:[function(e,t,n){var r=e("./isArrayLike");function o(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var i=n.length,a=t?i:-1,s=Object(n);(t?a--:++a<i)&&!1!==o(s[a],a,s););return n}}t.exports=o},{"./isArrayLike":244}],149:[function(e,t,n){function r(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===n(i[u],u,i))break}return t}}t.exports=r},{}],150:[function(e,t,n){var r=e("./_baseIteratee"),o=e("./isArrayLike"),i=e("./keys");function a(e){return function(t,n,a){var s=Object(t);if(!o(t)){var u=r(n,3);t=i(t),n=function(e){return u(s[e],e,s)}}var c=e(t,n,a);return c>-1?s[u?t[c]:c]:void 0}}t.exports=a},{"./_baseIteratee":105,"./isArrayLike":244,"./keys":259}],151:[function(e,t,n){var r=e("./_baseRange"),o=e("./_isIterateeCall"),i=e("./toFinite");function a(e){return function(t,n,a){return a&&"number"!=typeof a&&o(t,n,a)&&(n=a=void 0),t=i(t),void 0===n?(n=t,t=0):n=i(n),a=void 0===a?t<n?1:-1:i(a),r(t,n,a,e)}}t.exports=a},{"./_baseRange":119,"./_isIterateeCall":182,"./toFinite":279}],152:[function(e,t,n){var r=e("./_Set"),o=e("./noop"),i=e("./_setToArray"),a=1/0,s=r&&1/i(new r([,-0]))[1]==a?function(e){return new r(e)}:o;t.exports=s},{"./_Set":57,"./_setToArray":212,"./noop":269}],153:[function(e,t,n){var r=e("./_getNative"),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();t.exports=o},{"./_getNative":163}],154:[function(e,t,n){var r=e("./_SetCache"),o=e("./_arraySome"),i=e("./_cacheHas"),a=1,s=2;function u(e,t,n,u,c,f){var d=n&a,h=e.length,l=t.length;if(h!=l&&!(d&&l>h))return!1;var p=f.get(e);if(p&&f.get(t))return p==t;var v=-1,_=!0,y=n&s?new r:void 0;for(f.set(e,t),f.set(t,e);++v<h;){var g=e[v],b=t[v];if(u)var m=d?u(b,g,v,t,e,f):u(g,b,v,e,t,f);if(void 0!==m){if(m)continue;_=!1;break}if(y){if(!o(t,(function(e,t){if(!i(y,t)&&(g===e||c(g,e,n,u,f)))return y.push(t)}))){_=!1;break}}else if(g!==b&&!c(g,b,n,u,f)){_=!1;break}}return f.delete(e),f.delete(t),_}t.exports=u},{"./_SetCache":58,"./_arraySome":72,"./_cacheHas":131}],155:[function(e,t,n){var r=e("./_Symbol"),o=e("./_Uint8Array"),i=e("./eq"),a=e("./_equalArrays"),s=e("./_mapToArray"),u=e("./_setToArray"),c=1,f=2,d="[object Boolean]",h="[object Date]",l="[object Error]",p="[object Map]",v="[object Number]",_="[object RegExp]",y="[object Set]",g="[object String]",b="[object Symbol]",m="[object ArrayBuffer]",x="[object DataView]",w=r?r.prototype:void 0,E=w?w.valueOf:void 0;function j(e,t,n,r,w,j,k){switch(n){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case m:return!(e.byteLength!=t.byteLength||!j(new o(e),new o(t)));case d:case h:case v:return i(+e,+t);case l:return e.name==t.name&&e.message==t.message;case _:case g:return e==t+"";case p:var A=s;case y:var O=r&c;if(A||(A=u),e.size!=t.size&&!O)return!1;var I=k.get(e);if(I)return I==t;r|=f,k.set(e,t);var S=a(A(e),A(t),r,w,j,k);return k.delete(e),S;case b:if(E)return E.call(e)==E.call(t)}return!1}t.exports=j},{"./_Symbol":60,"./_Uint8Array":61,"./_equalArrays":154,"./_mapToArray":198,"./_setToArray":212,"./eq":231}],156:[function(e,t,n){var r=e("./_getAllKeys"),o=1,i=Object.prototype.hasOwnProperty;function a(e,t,n,a,s,u){var c=n&o,f=r(e),d=f.length;if(d!=r(t).length&&!c)return!1;for(var h=d;h--;){var l=f[h];if(!(c?l in t:i.call(t,l)))return!1}var p=u.get(e);if(p&&u.get(t))return p==t;var v=!0;u.set(e,t),u.set(t,e);for(var _=c;++h<d;){var y=e[l=f[h]],g=t[l];if(a)var b=c?a(g,y,l,t,e,u):a(y,g,l,e,t,u);if(!(void 0===b?y===g||s(y,g,n,a,u):b)){v=!1;break}_||(_="constructor"==l)}if(v&&!_){var m=e.constructor,x=t.constructor;m==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof x&&x instanceof x||(v=!1)}return u.delete(e),u.delete(t),v}t.exports=a},{"./_getAllKeys":159}],157:[function(e,t,n){var r=e("./flatten"),o=e("./_overRest"),i=e("./_setToString");function a(e){return i(o(e,void 0,r),e+"")}t.exports=a},{"./_overRest":207,"./_setToString":213,"./flatten":235}],158:[function(t,n,r){(function(e){var t="object"==typeof e&&e&&e.Object===Object&&e;n.exports=t}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],159:[function(e,t,n){var r=e("./_baseGetAllKeys"),o=e("./_getSymbols"),i=e("./keys");function a(e){return r(e,i,o)}t.exports=a},{"./_baseGetAllKeys":90,"./_getSymbols":166,"./keys":259}],160:[function(e,t,n){var r=e("./_baseGetAllKeys"),o=e("./_getSymbolsIn"),i=e("./keysIn");function a(e){return r(e,i,o)}t.exports=a},{"./_baseGetAllKeys":90,"./_getSymbolsIn":167,"./keysIn":260}],161:[function(e,t,n){var r=e("./_isKeyable");function o(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}t.exports=o},{"./_isKeyable":184}],162:[function(e,t,n){var r=e("./_isStrictComparable"),o=e("./keys");function i(e){for(var t=o(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,r(a)]}return t}t.exports=i},{"./_isStrictComparable":187,"./keys":259}],163:[function(e,t,n){var r=e("./_baseIsNative"),o=e("./_getValue");function i(e,t){var n=o(e,t);return r(n)?n:void 0}t.exports=i},{"./_baseIsNative":102,"./_getValue":169}],164:[function(e,t,n){var r=e("./_overArg")(Object.getPrototypeOf,Object);t.exports=r},{"./_overArg":206}],165:[function(e,t,n){var r=e("./_Symbol"),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;function u(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}t.exports=u},{"./_Symbol":60}],166:[function(e,t,n){var r=e("./_arrayFilter"),o=e("./stubArray"),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o;t.exports=s},{"./_arrayFilter":65,"./stubArray":277}],167:[function(e,t,n){var r=e("./_arrayPush"),o=e("./_getPrototype"),i=e("./_getSymbols"),a=e("./stubArray"),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;t.exports=s},{"./_arrayPush":70,"./_getPrototype":164,"./_getSymbols":166,"./stubArray":277}],168:[function(e,t,n){var r=e("./_DataView"),o=e("./_Map"),i=e("./_Promise"),a=e("./_Set"),s=e("./_WeakMap"),u=e("./_baseGetTag"),c=e("./_toSource"),f="[object Map]",d="[object Object]",h="[object Promise]",l="[object Set]",p="[object WeakMap]",v="[object DataView]",_=c(r),y=c(o),g=c(i),b=c(a),m=c(s),x=u;(r&&x(new r(new ArrayBuffer(1)))!=v||o&&x(new o)!=f||i&&x(i.resolve())!=h||a&&x(new a)!=l||s&&x(new s)!=p)&&(x=function(e){var t=u(e),n=t==d?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case _:return v;case y:return f;case g:return h;case b:return l;case m:return p}return t}),t.exports=x},{"./_DataView":51,"./_Map":54,"./_Promise":56,"./_Set":57,"./_WeakMap":62,"./_baseGetTag":91,"./_toSource":224}],169:[function(e,t,n){function r(e,t){return null==e?void 0:e[t]}t.exports=r},{}],170:[function(e,t,n){var r=e("./_castPath"),o=e("./isArguments"),i=e("./isArray"),a=e("./_isIndex"),s=e("./isLength"),u=e("./_toKey");function c(e,t,n){for(var c=-1,f=(t=r(t,e)).length,d=!1;++c<f;){var h=u(t[c]);if(!(d=null!=e&&n(e,h)))break;e=e[h]}return d||++c!=f?d:!!(f=null==e?0:e.length)&&s(f)&&a(h,f)&&(i(e)||o(e))}t.exports=c},{"./_castPath":133,"./_isIndex":181,"./_toKey":223,"./isArguments":242,"./isArray":243,"./isLength":249}],171:[function(e,t,n){var r=RegExp("[\\\\u200d\\\\ud800-\\\\udfff\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff\\\\ufe0e\\\\ufe0f]");function o(e){return r.test(e)}t.exports=o},{}],172:[function(e,t,n){var r=e("./_nativeCreate");function o(){this.__data__=r?r(null):{},this.size=0}t.exports=o},{"./_nativeCreate":201}],173:[function(e,t,n){function r(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}t.exports=r},{}],174:[function(e,t,n){var r=e("./_nativeCreate"),o="__lodash_hash_undefined__",i=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;if(r){var n=t[e];return n===o?void 0:n}return i.call(t,e)?t[e]:void 0}t.exports=a},{"./_nativeCreate":201}],175:[function(e,t,n){var r=e("./_nativeCreate"),o=Object.prototype.hasOwnProperty;function i(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}t.exports=i},{"./_nativeCreate":201}],176:[function(e,t,n){var r=e("./_nativeCreate"),o="__lodash_hash_undefined__";function i(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?o:t,this}t.exports=i},{"./_nativeCreate":201}],177:[function(e,t,n){var r=Object.prototype.hasOwnProperty;function o(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&r.call(e,"index")&&(n.index=e.index,n.input=e.input),n}t.exports=o},{}],178:[function(e,t,n){var r=e("./_cloneArrayBuffer"),o=e("./_cloneDataView"),i=e("./_cloneRegExp"),a=e("./_cloneSymbol"),s=e("./_cloneTypedArray"),u="[object Boolean]",c="[object Date]",f="[object Map]",d="[object Number]",h="[object RegExp]",l="[object Set]",p="[object String]",v="[object Symbol]",_="[object ArrayBuffer]",y="[object DataView]",g="[object Float32Array]",b="[object Float64Array]",m="[object Int8Array]",x="[object Int16Array]",w="[object Int32Array]",E="[object Uint8Array]",j="[object Uint8ClampedArray]",k="[object Uint16Array]",A="[object Uint32Array]";function O(e,t,n){var O=e.constructor;switch(t){case _:return r(e);case u:case c:return new O(+e);case y:return o(e,n);case g:case b:case m:case x:case w:case E:case j:case k:case A:return s(e,n);case f:return new O;case d:case p:return new O(e);case h:return i(e);case l:return new O;case v:return a(e)}}t.exports=O},{"./_cloneArrayBuffer":134,"./_cloneDataView":136,"./_cloneRegExp":137,"./_cloneSymbol":138,"./_cloneTypedArray":139}],179:[function(e,t,n){var r=e("./_baseCreate"),o=e("./_getPrototype"),i=e("./_isPrototype");function a(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}t.exports=a},{"./_baseCreate":81,"./_getPrototype":164,"./_isPrototype":186}],180:[function(e,t,n){var r=e("./_Symbol"),o=e("./isArguments"),i=e("./isArray"),a=r?r.isConcatSpreadable:void 0;function s(e){return i(e)||o(e)||!!(a&&e&&e[a])}t.exports=s},{"./_Symbol":60,"./isArguments":242,"./isArray":243}],181:[function(e,t,n){var r=9007199254740991,o=/^(?:0|[1-9]\\d*)$/;function i(e,t){var n=typeof e;return!!(t=null==t?r:t)&&("number"==n||"symbol"!=n&&o.test(e))&&e>-1&&e%1==0&&e<t}t.exports=i},{}],182:[function(e,t,n){var r=e("./eq"),o=e("./isArrayLike"),i=e("./_isIndex"),a=e("./isObject");function s(e,t,n){if(!a(n))return!1;var s=typeof t;return!!("number"==s?o(n)&&i(t,n.length):"string"==s&&t in n)&&r(n[t],e)}t.exports=s},{"./_isIndex":181,"./eq":231,"./isArrayLike":244,"./isObject":251}],183:[function(e,t,n){var r=e("./isArray"),o=e("./isSymbol"),i=/\\.|\\[(?:[^[\\]]*|(["\'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,a=/^\\w*$/;function s(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||a.test(e)||!i.test(e)||null!=t&&e in Object(t)}t.exports=s},{"./isArray":243,"./isSymbol":256}],184:[function(e,t,n){function r(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}t.exports=r},{}],185:[function(e,t,n){var r,o=e("./_coreJsData"),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";function a(e){return!!i&&i in e}t.exports=a},{"./_coreJsData":146}],186:[function(e,t,n){var r=Object.prototype;function o(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}t.exports=o},{}],187:[function(e,t,n){var r=e("./isObject");function o(e){return e==e&&!r(e)}t.exports=o},{"./isObject":251}],188:[function(e,t,n){function r(){this.__data__=[],this.size=0}t.exports=r},{}],189:[function(e,t,n){var r=e("./_assocIndexOf"),o=Array.prototype.splice;function i(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))}t.exports=i},{"./_assocIndexOf":76}],190:[function(e,t,n){var r=e("./_assocIndexOf");function o(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}t.exports=o},{"./_assocIndexOf":76}],191:[function(e,t,n){var r=e("./_assocIndexOf");function o(e){return r(this.__data__,e)>-1}t.exports=o},{"./_assocIndexOf":76}],192:[function(e,t,n){var r=e("./_assocIndexOf");function o(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}t.exports=o},{"./_assocIndexOf":76}],193:[function(e,t,n){var r=e("./_Hash"),o=e("./_ListCache"),i=e("./_Map");function a(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}t.exports=a},{"./_Hash":52,"./_ListCache":53,"./_Map":54}],194:[function(e,t,n){var r=e("./_getMapData");function o(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}t.exports=o},{"./_getMapData":161}],195:[function(e,t,n){var r=e("./_getMapData");function o(e){return r(this,e).get(e)}t.exports=o},{"./_getMapData":161}],196:[function(e,t,n){var r=e("./_getMapData");function o(e){return r(this,e).has(e)}t.exports=o},{"./_getMapData":161}],197:[function(e,t,n){var r=e("./_getMapData");function o(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}t.exports=o},{"./_getMapData":161}],198:[function(e,t,n){function r(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}t.exports=r},{}],199:[function(e,t,n){function r(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}t.exports=r},{}],200:[function(e,t,n){var r=e("./memoize"),o=500;function i(e){var t=r(e,(function(e){return n.size===o&&n.clear(),e})),n=t.cache;return t}t.exports=i},{"./memoize":265}],201:[function(e,t,n){var r=e("./_getNative")(Object,"create");t.exports=r},{"./_getNative":163}],202:[function(e,t,n){var r=e("./_overArg")(Object.keys,Object);t.exports=r},{"./_overArg":206}],203:[function(e,t,n){function r(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}t.exports=r},{}],204:[function(e,t,n){var r=e("./_freeGlobal"),o="object"==typeof n&&n&&!n.nodeType&&n,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o&&r.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();t.exports=s},{"./_freeGlobal":158}],205:[function(e,t,n){var r=Object.prototype.toString;function o(e){return r.call(e)}t.exports=o},{}],206:[function(e,t,n){function r(e,t){return function(n){return e(t(n))}}t.exports=r},{}],207:[function(e,t,n){var r=e("./_apply"),o=Math.max;function i(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),u=Array(s);++a<s;)u[a]=i[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=i[a];return c[t]=n(u),r(e,this,c)}}t.exports=i},{"./_apply":63}],208:[function(e,t,n){var r=e("./_freeGlobal"),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},{"./_freeGlobal":158}],209:[function(e,t,n){function r(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}t.exports=r},{}],210:[function(e,t,n){var r="__lodash_hash_undefined__";function o(e){return this.__data__.set(e,r),this}t.exports=o},{}],211:[function(e,t,n){function r(e){return this.__data__.has(e)}t.exports=r},{}],212:[function(e,t,n){function r(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}t.exports=r},{}],213:[function(e,t,n){var r=e("./_baseSetToString"),o=e("./_shortOut")(r);t.exports=o},{"./_baseSetToString":123,"./_shortOut":214}],214:[function(e,t,n){var r=800,o=16,i=Date.now;function a(e){var t=0,n=0;return function(){var a=i(),s=o-(a-n);if(n=a,s>0){if(++t>=r)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}t.exports=a},{}],215:[function(e,t,n){var r=e("./_ListCache");function o(){this.__data__=new r,this.size=0}t.exports=o},{"./_ListCache":53}],216:[function(e,t,n){function r(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}t.exports=r},{}],217:[function(e,t,n){function r(e){return this.__data__.get(e)}t.exports=r},{}],218:[function(e,t,n){function r(e){return this.__data__.has(e)}t.exports=r},{}],219:[function(e,t,n){var r=e("./_ListCache"),o=e("./_Map"),i=e("./_MapCache"),a=200;function s(e,t){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!o||s.length<a-1)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(s)}return n.set(e,t),this.size=n.size,this}t.exports=s},{"./_ListCache":53,"./_Map":54,"./_MapCache":55}],220:[function(e,t,n){function r(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}t.exports=r},{}],221:[function(e,t,n){var r=e("./_asciiSize"),o=e("./_hasUnicode"),i=e("./_unicodeSize");function a(e){return o(e)?i(e):r(e)}t.exports=a},{"./_asciiSize":73,"./_hasUnicode":171,"./_unicodeSize":225}],222:[function(e,t,n){var r=e("./_memoizeCapped"),o=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,i=/\\\\(\\\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)})),t}));t.exports=a},{"./_memoizeCapped":200}],223:[function(e,t,n){var r=e("./isSymbol"),o=1/0;function i(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-o?"-0":t}t.exports=i},{"./isSymbol":256}],224:[function(e,t,n){var r=Function.prototype.toString;function o(e){if(null!=e){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}t.exports=o},{}],225:[function(e,t,n){var r="\\\\ud800-\\\\udfff",o="["+r+"]",i="[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]",a="\\\\ud83c[\\\\udffb-\\\\udfff]",s="[^"+r+"]",u="(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}",c="[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]",f="(?:"+i+"|"+a+")?",d="[\\\\ufe0e\\\\ufe0f]?",h=d+f+"(?:\\\\u200d(?:"+[s,u,c].join("|")+")"+d+f+")*",l="(?:"+[s+i+"?",i,u,c,o].join("|")+")",p=RegExp(a+"(?="+a+")|"+l+h,"g");function v(e){for(var t=p.lastIndex=0;p.test(e);)++t;return t}t.exports=v},{}],226:[function(e,t,n){var r=e("./_baseClone"),o=4;function i(e){return r(e,o)}t.exports=i},{"./_baseClone":80}],227:[function(e,t,n){var r=e("./_baseClone"),o=1,i=4;function a(e){return r(e,o|i)}t.exports=a},{"./_baseClone":80}],228:[function(e,t,n){function r(e){return function(){return e}}t.exports=r},{}],229:[function(e,t,n){var r=e("./_baseRest"),o=e("./eq"),i=e("./_isIterateeCall"),a=e("./keysIn"),s=Object.prototype,u=s.hasOwnProperty,c=r((function(e,t){e=Object(e);var n=-1,r=t.length,c=r>2?t[2]:void 0;for(c&&i(t[0],t[1],c)&&(r=1);++n<r;)for(var f=t[n],d=a(f),h=-1,l=d.length;++h<l;){var p=d[h],v=e[p];(void 0===v||o(v,s[p])&&!u.call(e,p))&&(e[p]=f[p])}return e}));t.exports=c},{"./_baseRest":121,"./_isIterateeCall":182,"./eq":231,"./keysIn":260}],230:[function(e,t,n){t.exports=e("./forEach")},{"./forEach":236}],231:[function(e,t,n){function r(e,t){return e===t||e!=e&&t!=t}t.exports=r},{}],232:[function(e,t,n){var r=e("./_arrayFilter"),o=e("./_baseFilter"),i=e("./_baseIteratee"),a=e("./isArray");function s(e,t){return(a(e)?r:o)(e,i(t,3))}t.exports=s},{"./_arrayFilter":65,"./_baseFilter":84,"./_baseIteratee":105,"./isArray":243}],233:[function(e,t,n){var r=e("./_createFind")(e("./findIndex"));t.exports=r},{"./_createFind":150,"./findIndex":234}],234:[function(e,t,n){var r=e("./_baseFindIndex"),o=e("./_baseIteratee"),i=e("./toInteger"),a=Math.max;function s(e,t,n){var s=null==e?0:e.length;if(!s)return-1;var u=null==n?0:i(n);return u<0&&(u=a(s+u,0)),r(e,o(t,3),u)}t.exports=s},{"./_baseFindIndex":85,"./_baseIteratee":105,"./toInteger":280}],235:[function(e,t,n){var r=e("./_baseFlatten");function o(e){return null!=e&&e.length?r(e,1):[]}t.exports=o},{"./_baseFlatten":86}],236:[function(e,t,n){var r=e("./_arrayEach"),o=e("./_baseEach"),i=e("./_castFunction"),a=e("./isArray");function s(e,t){return(a(e)?r:o)(e,i(t))}t.exports=s},{"./_arrayEach":64,"./_baseEach":82,"./_castFunction":132,"./isArray":243}],237:[function(e,t,n){var r=e("./_baseFor"),o=e("./_castFunction"),i=e("./keysIn");function a(e,t){return null==e?e:r(e,o(t),i)}t.exports=a},{"./_baseFor":87,"./_castFunction":132,"./keysIn":260}],238:[function(e,t,n){var r=e("./_baseGet");function o(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}t.exports=o},{"./_baseGet":89}],239:[function(e,t,n){var r=e("./_baseHas"),o=e("./_hasPath");function i(e,t){return null!=e&&o(e,t,r)}t.exports=i},{"./_baseHas":93,"./_hasPath":170}],240:[function(e,t,n){var r=e("./_baseHasIn"),o=e("./_hasPath");function i(e,t){return null!=e&&o(e,t,r)}t.exports=i},{"./_baseHasIn":94,"./_hasPath":170}],241:[function(e,t,n){function r(e){return e}t.exports=r},{}],242:[function(e,t,n){var r=e("./_baseIsArguments"),o=e("./isObjectLike"),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};t.exports=u},{"./_baseIsArguments":96,"./isObjectLike":252}],243:[function(e,t,n){var r=Array.isArray;t.exports=r},{}],244:[function(e,t,n){var r=e("./isFunction"),o=e("./isLength");function i(e){return null!=e&&o(e.length)&&!r(e)}t.exports=i},{"./isFunction":248,"./isLength":249}],245:[function(e,t,n){var r=e("./isArrayLike"),o=e("./isObjectLike");function i(e){return o(e)&&r(e)}t.exports=i},{"./isArrayLike":244,"./isObjectLike":252}],246:[function(e,t,n){var r=e("./_root"),o=e("./stubFalse"),i="object"==typeof n&&n&&!n.nodeType&&n,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===i?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||o;t.exports=u},{"./_root":208,"./stubFalse":278}],247:[function(e,t,n){var r=e("./_baseKeys"),o=e("./_getTag"),i=e("./isArguments"),a=e("./isArray"),s=e("./isArrayLike"),u=e("./isBuffer"),c=e("./_isPrototype"),f=e("./isTypedArray"),d="[object Map]",h="[object Set]",l=Object.prototype.hasOwnProperty;function p(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||f(e)||i(e)))return!e.length;var t=o(e);if(t==d||t==h)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(l.call(e,n))return!1;return!0}t.exports=p},{"./_baseKeys":106,"./_getTag":168,"./_isPrototype":186,"./isArguments":242,"./isArray":243,"./isArrayLike":244,"./isBuffer":246,"./isTypedArray":257}],248:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./isObject"),i="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",u="[object Proxy]";function c(e){if(!o(e))return!1;var t=r(e);return t==a||t==s||t==i||t==u}t.exports=c},{"./_baseGetTag":91,"./isObject":251}],249:[function(e,t,n){var r=9007199254740991;function o(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}t.exports=o},{}],250:[function(e,t,n){var r=e("./_baseIsMap"),o=e("./_baseUnary"),i=e("./_nodeUtil"),a=i&&i.isMap,s=a?o(a):r;t.exports=s},{"./_baseIsMap":99,"./_baseUnary":127,"./_nodeUtil":204}],251:[function(e,t,n){function r(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}t.exports=r},{}],252:[function(e,t,n){function r(e){return null!=e&&"object"==typeof e}t.exports=r},{}],253:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./_getPrototype"),i=e("./isObjectLike"),a="[object Object]",s=Function.prototype,u=Object.prototype,c=s.toString,f=u.hasOwnProperty,d=c.call(Object);function h(e){if(!i(e)||r(e)!=a)return!1;var t=o(e);if(null===t)return!0;var n=f.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==d}t.exports=h},{"./_baseGetTag":91,"./_getPrototype":164,"./isObjectLike":252}],254:[function(e,t,n){var r=e("./_baseIsSet"),o=e("./_baseUnary"),i=e("./_nodeUtil"),a=i&&i.isSet,s=a?o(a):r;t.exports=s},{"./_baseIsSet":103,"./_baseUnary":127,"./_nodeUtil":204}],255:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./isArray"),i=e("./isObjectLike"),a="[object String]";function s(e){return"string"==typeof e||!o(e)&&i(e)&&r(e)==a}t.exports=s},{"./_baseGetTag":91,"./isArray":243,"./isObjectLike":252}],256:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./isObjectLike"),i="[object Symbol]";function a(e){return"symbol"==typeof e||o(e)&&r(e)==i}t.exports=a},{"./_baseGetTag":91,"./isObjectLike":252}],257:[function(e,t,n){var r=e("./_baseIsTypedArray"),o=e("./_baseUnary"),i=e("./_nodeUtil"),a=i&&i.isTypedArray,s=a?o(a):r;t.exports=s},{"./_baseIsTypedArray":104,"./_baseUnary":127,"./_nodeUtil":204}],258:[function(e,t,n){function r(e){return void 0===e}t.exports=r},{}],259:[function(e,t,n){var r=e("./_arrayLikeKeys"),o=e("./_baseKeys"),i=e("./isArrayLike");function a(e){return i(e)?r(e):o(e)}t.exports=a},{"./_arrayLikeKeys":68,"./_baseKeys":106,"./isArrayLike":244}],260:[function(e,t,n){var r=e("./_arrayLikeKeys"),o=e("./_baseKeysIn"),i=e("./isArrayLike");function a(e){return i(e)?r(e,!0):o(e)}t.exports=a},{"./_arrayLikeKeys":68,"./_baseKeysIn":107,"./isArrayLike":244}],261:[function(e,t,n){function r(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}t.exports=r},{}],262:[function(e,t,n){var r=e("./_arrayMap"),o=e("./_baseIteratee"),i=e("./_baseMap"),a=e("./isArray");function s(e,t){return(a(e)?r:i)(e,o(t,3))}t.exports=s},{"./_arrayMap":69,"./_baseIteratee":105,"./_baseMap":109,"./isArray":243}],263:[function(e,t,n){var r=e("./_baseAssignValue"),o=e("./_baseForOwn"),i=e("./_baseIteratee");function a(e,t){var n={};return t=i(t,3),o(e,(function(e,o,i){r(n,o,t(e,o,i))})),n}t.exports=a},{"./_baseAssignValue":79,"./_baseForOwn":88,"./_baseIteratee":105}],264:[function(e,t,n){var r=e("./_baseExtremum"),o=e("./_baseGt"),i=e("./identity");function a(e){return e&&e.length?r(e,i,o):void 0}t.exports=a},{"./_baseExtremum":83,"./_baseGt":92,"./identity":241}],265:[function(e,t,n){var r=e("./_MapCache"),o="Expected a function";function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(o);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},{"./_MapCache":55}],266:[function(e,t,n){var r=e("./_baseMerge"),o=e("./_createAssigner")((function(e,t,n){r(e,t,n)}));t.exports=o},{"./_baseMerge":112,"./_createAssigner":147}],267:[function(e,t,n){var r=e("./_baseExtremum"),o=e("./_baseLt"),i=e("./identity");function a(e){return e&&e.length?r(e,i,o):void 0}t.exports=a},{"./_baseExtremum":83,"./_baseLt":108,"./identity":241}],268:[function(e,t,n){var r=e("./_baseExtremum"),o=e("./_baseIteratee"),i=e("./_baseLt");function a(e,t){return e&&e.length?r(e,o(t,2),i):void 0}t.exports=a},{"./_baseExtremum":83,"./_baseIteratee":105,"./_baseLt":108}],269:[function(e,t,n){function r(){}t.exports=r},{}],270:[function(e,t,n){var r=e("./_root"),o=function(){return r.Date.now()};t.exports=o},{"./_root":208}],271:[function(e,t,n){var r=e("./_basePick"),o=e("./_flatRest")((function(e,t){return null==e?{}:r(e,t)}));t.exports=o},{"./_basePick":115,"./_flatRest":157}],272:[function(e,t,n){var r=e("./_baseProperty"),o=e("./_basePropertyDeep"),i=e("./_isKey"),a=e("./_toKey");function s(e){return i(e)?r(a(e)):o(e)}t.exports=s},{"./_baseProperty":117,"./_basePropertyDeep":118,"./_isKey":183,"./_toKey":223}],273:[function(e,t,n){var r=e("./_createRange")();t.exports=r},{"./_createRange":151}],274:[function(e,t,n){var r=e("./_arrayReduce"),o=e("./_baseEach"),i=e("./_baseIteratee"),a=e("./_baseReduce"),s=e("./isArray");function u(e,t,n){var u=s(e)?r:a,c=arguments.length<3;return u(e,i(t,4),n,c,o)}t.exports=u},{"./_arrayReduce":71,"./_baseEach":82,"./_baseIteratee":105,"./_baseReduce":120,"./isArray":243}],275:[function(e,t,n){var r=e("./_baseKeys"),o=e("./_getTag"),i=e("./isArrayLike"),a=e("./isString"),s=e("./_stringSize"),u="[object Map]",c="[object Set]";function f(e){if(null==e)return 0;if(i(e))return a(e)?s(e):e.length;var t=o(e);return t==u||t==c?e.size:r(e).length}t.exports=f},{"./_baseKeys":106,"./_getTag":168,"./_stringSize":221,"./isArrayLike":244,"./isString":255}],276:[function(e,t,n){var r=e("./_baseFlatten"),o=e("./_baseOrderBy"),i=e("./_baseRest"),a=e("./_isIterateeCall"),s=i((function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),o(e,r(t,1),[])}));t.exports=s},{"./_baseFlatten":86,"./_baseOrderBy":114,"./_baseRest":121,"./_isIterateeCall":182}],277:[function(e,t,n){function r(){return[]}t.exports=r},{}],278:[function(e,t,n){function r(){return!1}t.exports=r},{}],279:[function(e,t,n){var r=e("./toNumber"),o=1/0,i=17976931348623157e292;function a(e){return e?(e=r(e))===o||e===-o?(e<0?-1:1)*i:e==e?e:0:0===e?e:0}t.exports=a},{"./toNumber":281}],280:[function(e,t,n){var r=e("./toFinite");function o(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}t.exports=o},{"./toFinite":279}],281:[function(e,t,n){var r=e("./isObject"),o=e("./isSymbol"),i=NaN,a=/^\\s+|\\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,f=parseInt;function d(e){if("number"==typeof e)return e;if(o(e))return i;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var n=u.test(e);return n||c.test(e)?f(e.slice(2),n?2:8):s.test(e)?i:+e}t.exports=d},{"./isObject":251,"./isSymbol":256}],282:[function(e,t,n){var r=e("./_copyObject"),o=e("./keysIn");function i(e){return r(e,o(e))}t.exports=i},{"./_copyObject":143,"./keysIn":260}],283:[function(e,t,n){var r=e("./_baseToString");function o(e){return null==e?"":r(e)}t.exports=o},{"./_baseToString":126}],284:[function(e,t,n){var r=e("./_arrayEach"),o=e("./_baseCreate"),i=e("./_baseForOwn"),a=e("./_baseIteratee"),s=e("./_getPrototype"),u=e("./isArray"),c=e("./isBuffer"),f=e("./isFunction"),d=e("./isObject"),h=e("./isTypedArray");function l(e,t,n){var l=u(e),p=l||c(e)||h(e);if(t=a(t,4),null==n){var v=e&&e.constructor;n=p?l?new v:[]:d(e)&&f(v)?o(s(e)):{}}return(p?r:i)(e,(function(e,r,o){return t(n,e,r,o)})),n}t.exports=l},{"./_arrayEach":64,"./_baseCreate":81,"./_baseForOwn":88,"./_baseIteratee":105,"./_getPrototype":164,"./isArray":243,"./isBuffer":246,"./isFunction":248,"./isObject":251,"./isTypedArray":257}],285:[function(e,t,n){var r=e("./_baseFlatten"),o=e("./_baseRest"),i=e("./_baseUniq"),a=e("./isArrayLikeObject"),s=o((function(e){return i(r(e,1,a,!0))}));t.exports=s},{"./_baseFlatten":86,"./_baseRest":121,"./_baseUniq":128,"./isArrayLikeObject":245}],286:[function(e,t,n){var r=e("./toString"),o=0;function i(e){var t=++o;return r(e)+t}t.exports=i},{"./toString":283}],287:[function(e,t,n){var r=e("./_baseValues"),o=e("./keys");function i(e){return null==e?[]:r(e,o(e))}t.exports=i},{"./_baseValues":129,"./keys":259}],288:[function(e,t,n){var r=e("./_assignValue"),o=e("./_baseZipObject");function i(e,t){return o(e||[],t||[],r)}t.exports=i},{"./_assignValue":75,"./_baseZipObject":130}]},{},[1])(1);var r={exports:{}};\n/*!\n\t * @overview es6-promise - a tiny implementation of Promises/A+.\n\t * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n\t * @license Licensed under MIT license\n\t * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n\t * @version v4.2.8+1e68dce6\n\t */function o(e,t){var r=e.subgraphs,o=e.nodes,i=e.links,a=e.hierarchy,s=new n.exports.graphlib.Graph({multigraph:!0,compound:!0,directed:!1!==t.digraph}).setGraph(t).setDefaultNodeLabel((function(){return{}})).setDefaultEdgeLabel((function(){return{}}));r.forEach((function(e){s.setNode(e.id,e)})),o.forEach((function(e){s.setNode(e.id,e)})),i.forEach((function(e){s.setEdge(e.source.id,e.target.id,e,e.id)})),a.forEach((function(e){s.setParent(e.child,e.parent)})),n.exports.layout(s,{debugTiming:!1});var u=-s.graph().width/2||0,c=-s.graph().height/2;return s.nodes().forEach((function(e){var t=s.node(e);t.x+=u,t.y+=c})),s.edges().forEach((function(e){var t=s.edge(e);t.points=t.points.map((function(e){return[e.x+u,e.y+c]}))})),{subgraphs:r,nodes:o,links:i}}!function(t,n){t.exports=function(){function t(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}function n(e){return"function"==typeof e}var r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=0,i=void 0,a=void 0,s=function(e,t){m[o]=e,m[o+1]=t,2===(o+=2)&&(a?a(x):E())};function u(e){a=e}function c(e){s=e}var f="undefined"!=typeof window?window:void 0,d=f||{},h=d.MutationObserver||d.WebKitMutationObserver,l="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),p="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function v(){return function(){return process.nextTick(x)}}function _(){return void 0!==i?function(){i(x)}:b()}function y(){var e=0,t=new h(x),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function g(){var e=new MessageChannel;return e.port1.onmessage=x,function(){return e.port2.postMessage(0)}}function b(){var e=setTimeout;return function(){return e(x,1)}}var m=new Array(1e3);function x(){for(var e=0;e<o;e+=2)(0,m[e])(m[e+1]),m[e]=void 0,m[e+1]=void 0;o=0}function w(){try{var e=Function("return this")().require("vertx");return i=e.runOnLoop||e.runOnContext,_()}catch(e){return b()}}var E=void 0;function j(e,t){var n=this,r=new this.constructor(O);void 0===r[A]&&Y(r);var o=n._state;if(o){var i=arguments[o-1];s((function(){return V(o,r,i,n._result)}))}else U(n,r,e,t);return r}function k(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(O);return D(n,e),n}E=l?v():h?y():p?g():void 0===f?w():b();var A=Math.random().toString(36).substring(2);function O(){}var I=void 0,S=1,C=2;function N(){return new TypeError("You cannot resolve a promise with itself")}function T(){return new TypeError("A promises callback cannot return that same promise.")}function M(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}function L(e,t,n){s((function(e){var r=!1,o=M(n,t,(function(n){r||(r=!0,t!==n?D(e,n):G(e,n))}),(function(t){r||(r=!0,R(e,t))}),"Settle: "+(e._label||" unknown promise"));!r&&o&&(r=!0,R(e,o))}),e)}function P(e,t){t._state===S?G(e,t._result):t._state===C?R(e,t._result):U(t,void 0,(function(t){return D(e,t)}),(function(t){return R(e,t)}))}function F(e,t,r){t.constructor===e.constructor&&r===j&&t.constructor.resolve===k?P(e,t):void 0===r?G(e,t):n(r)?L(e,t,r):G(e,t)}function D(e,n){if(e===n)R(e,N());else if(t(n)){var r=void 0;try{r=n.then}catch(t){return void R(e,t)}F(e,n,r)}else G(e,n)}function B(e){e._onerror&&e._onerror(e._result),z(e)}function G(e,t){e._state===I&&(e._result=t,e._state=S,0!==e._subscribers.length&&s(z,e))}function R(e,t){e._state===I&&(e._state=C,e._result=t,s(B,e))}function U(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+S]=n,o[i+C]=r,0===i&&e._state&&s(z,e)}function z(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,o=void 0,i=e._result,a=0;a<t.length;a+=3)r=t[a],o=t[a+n],r?V(n,r,o,i):o(i);e._subscribers.length=0}}function V(e,t,r,o){var i=n(r),a=void 0,s=void 0,u=!0;if(i){try{a=r(o)}catch(e){u=!1,s=e}if(t===a)return void R(t,T())}else a=o;t._state!==I||(i&&u?D(t,a):!1===u?R(t,s):e===S?G(t,a):e===C&&R(t,a))}function q(e,t){try{t((function(t){D(e,t)}),(function(t){R(e,t)}))}catch(t){R(e,t)}}var K=0;function H(){return K++}function Y(e){e[A]=K++,e._state=void 0,e._result=void 0,e._subscribers=[]}function $(){return new Error("Array Methods must be provided an Array")}var W=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(O),this.promise[A]||Y(this.promise),r(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?G(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&G(this.promise,this._result))):R(this.promise,$())}return e.prototype._enumerate=function(e){for(var t=0;this._state===I&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===k){var o=void 0,i=void 0,a=!1;try{o=e.then}catch(e){a=!0,i=e}if(o===j&&e._state!==I)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===te){var s=new n(O);a?R(s,i):F(s,e,o),this._willSettleAt(s,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},e.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===I&&(this._remaining--,e===C?R(r,n):this._result[t]=n),0===this._remaining&&G(r,this._result)},e.prototype._willSettleAt=function(e,t){var n=this;U(e,void 0,(function(e){return n._settledAt(S,t,e)}),(function(e){return n._settledAt(C,t,e)}))},e}();function J(e){return new W(this,e).promise}function X(e){var t=this;return r(e)?new t((function(n,r){for(var o=e.length,i=0;i<o;i++)t.resolve(e[i]).then(n,r)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))}function Z(e){var t=new this(O);return R(t,e),t}function Q(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function ee(){throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.")}var te=function(){function e(t){this[A]=H(),this._result=this._state=void 0,this._subscribers=[],O!==t&&("function"!=typeof t&&Q(),this instanceof e?q(this,t):ee())}return e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(e){var t=this,r=t.constructor;return n(e)?t.then((function(t){return r.resolve(e()).then((function(){return t}))}),(function(t){return r.resolve(e()).then((function(){throw t}))})):t.then(e,e)},e}();function ne(){var t=void 0;if(void 0!==e)t=e;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=te}return te.prototype.then=j,te.all=J,te.race=X,te.resolve=k,te.reject=Z,te._setScheduler=u,te._setAsap=c,te._asap=s,te.polyfill=ne,te.Promise=te,te}()}(r),r.exports.polyfill(),self.onmessage=function(e){var t=o.apply(void 0,e.data);self.postMessage(t)}}();'],{type:"application/javascript"}),n=URL.createObjectURL(r),o=new Worker(n);return{terminate:function(){return o.terminate()},response:new Promise((function(r){o.onmessage=function(e){r(e.data),o.terminate(),URL.revokeObjectURL(n)},o.postMessage([e,t])}))}}({subgraphs:n.allSubgraphs().map((function(e){return u(u({},e.props),{id:em(e.id)})})),nodes:n.allVertices().map((function(e){delete e.fx,delete e.fy;var t=e.element.node().getBBox();return u(u({width:t.width,height:t.height},e.props),{id:String(e.id)})})),links:n.allEdges().map((function(e){return{id:String(e.props.id),source:{id:String(e.source.props.id),text:e.source.props.text},target:{id:String(e.target.props.id),text:e.target.props.text}}})),hierarchy:l(l([],n.allSubgraphs().filter((function(e){return!!n.subgraphParent(e.id)})).map((function(e){return{parent:em(n.subgraphParent(e.id).props.id),child:em(e.id)}})),!0),n.allVertices().filter((function(e){return void 0!==n.vertexParent(e.id)})).map((function(e){return{parent:em(n.vertexParent(e.id).props.id),child:String(e.id)}})),!0)},this._options).response.then((function(e){return t.running()&&(e.subgraphs.forEach((function(e){var t=n.subgraph(e.id.substring(8));t.x=e.x+r.width/2,t.y=e.y+r.height/2,t.props.width=e.width,t.props.height=e.height})),e.nodes.forEach((function(e){var t=n.vertex(e.id);t.x=e.x+r.width/2,t.y=e.y+r.height/2})),e.links.forEach((function(e){var t=n.edge(e.id),o=tm(t.source.x,t.source.y,e.points[0][0]+r.width/2,e.points[0][1]+r.height/2),i=tm(t.target.x,t.target.y,e.points[0][0]+r.width/2,e.points[0][1]+r.height/2);t.points=l(l([o<i?[t.source.x,t.source.y]:[t.target.x,t.target.y]],e.points.map((function(e){return[e[0]+r.width/2,e[1]+r.height/2]})),!0),[o<i?[t.target.x,t.target.y]:[t.source.x,t.source.y]],!1)})),t._graph.moveVertices(!0).moveSubgraphs(!0).moveEdges(!0),t.stop()),t}))},t.prototype.edgePath=function(t,r){var n=this,o=[],i=!1;return t.points&&(o=t.points.map((function(e){var t=n._graph.project(e[0],!1),r=n._graph.project(e[1],!1);return(isNaN(t)||isNaN(r))&&(i=!0),[t,r]}))),i||o.length<2?e.prototype.edgePath.call(this,t,r):{path:J_(o),labelPos:this.center(o)}},t}($_),nm=function(e){function t(t,r){var n=e.call(this,t)||this;return n._options=r,n}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=t._graph.size(),r=t._graph.graphData(),n=r.allVertices(),o=r.allEdges();o.forEach((function(e){return delete e.points})),t._links=Ny(o).id((function(e){return e.id})).distance(t._options.linkDistance).strength(t._options.linkStrength),t._charge=o_().strength(t._options.repulsionStrength).distanceMin(t._options.distanceMin).distanceMax(t._options.distanceMax),t._center=Ey(e.width/2,e.height/2);var i=function(e){var t,r,n,o=ky(.1);function i(e){for(var o,i=0,a=t.length;i<a;++i)(o=t[i]).vx+=(n[i]-o.x)*r[i]*e}function a(){if(t){var i,a=t.length;for(r=new Array(a),n=new Array(a),i=0;i<a;++i)r[i]=isNaN(n[i]=+e(t[i],i,t))?0:+o(t[i],i,t)}}return"function"!=typeof e&&(e=ky(null==e?0:+e)),i.initialize=function(e){t=e,a()},i.strength=function(e){return arguments.length?(o="function"==typeof e?e:ky(+e),a(),i):o},i.x=function(t){return arguments.length?(e="function"==typeof t?t:ky(+t),a(),i):e},i}().strength(t._options.forceStrength),a=function(e){var t,r,n,o=ky(.1);function i(e){for(var o,i=0,a=t.length;i<a;++i)(o=t[i]).vy+=(n[i]-o.y)*r[i]*e}function a(){if(t){var i,a=t.length;for(r=new Array(a),n=new Array(a),i=0;i<a;++i)r[i]=isNaN(n[i]=+e(t[i],i,t))?0:+o(t[i],i,t)}}return"function"!=typeof e&&(e=ky(null==e?0:+e)),i.initialize=function(e){t=e,a()},i.strength=function(e){return arguments.length?(o="function"==typeof e?e:ky(+e),a(),i):o},i.y=function(t){return arguments.length?(e="function"==typeof t?t:ky(+t),a(),i):e},i}().strength(t._options.forceStrength);return t._simulation=n_(n.map((function(r){var n=r.element.node().getBBox(),o=n.width,i=n.height;return r.fx=t._options.pinCentroid&&r.props.centroid?e.width/2:void 0,r.fy=t._options.pinCentroid&&r.props.centroid?e.height/2:void 0,r.width=o,r.height=i,r}))).force("link",t._links).force("charge",t._charge).force("center",t._center).force("x",i).force("y",a).alpha(t._options.alpha/2).alphaMin(t._options.alphaMin).alphaDecay(t._options.alphaDecay).velocityDecay(t._options.velocityDecay).stop(),t}))},t.prototype.stop=function(){return this._simulation.stop(),e.prototype.stop.call(this)},t}($_),om=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){return t._simulation.tick(t._options.iterations),t.stop(),t._graph.moveVertices(!1).moveEdges(!1),t}))},t}(nm),im=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){return new Promise((function(e){t._simulation.on("tick",(function(){t._graph.moveVertices(!1).moveEdges(!1),t._graph.progress("layout-tick")})).on("end",(function(){t._running=!1,e(t)})).restart()}))}))},t}(nm);function am(e,t){var r=new Blob(['!function(){"use strict";function r(r,e,t){if(t||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return r.concat(n||Array.prototype.slice.call(e))}"undefined"!=typeof document&&document.currentScript&&document.currentScript.src;let e=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}().__hpcc_wasmFolder||void 0;let t="undefined"!=typeof document&&document.currentScript?document.currentScript.src:"undefined"!=typeof __filename?__filename:"undefined"!=typeof document&&document.currentScript?document.currentScript.src:"";t=t.substr(0,t.replace(/[?#].*/,"").lastIndexOf("/")+1);const n={};async function o(r,e,t){const n=r.default||r;return t||(t=await async function(r){return fetch(r,{credentials:"same-origin"}).then((e=>{if(!e.ok)throw"failed to load wasm binary file at \'"+r+"\'";return e.arrayBuffer()})).catch((r=>{throw r}))}(e)),await n({wasmBinary:t})}async function i(r,i,a,s){const u=`${function(r,e){for(;r.charAt(r.length-1)===e;)r=r.substring(0,r.length-1);return r}(a||function(r){if(!arguments.length)return e;const t=e;return e=r,t}()||t||".","/")}/${function(r,e){for(;r.charAt(0)===e;)r=r.substring(1);return r}(`${i}.wasm`,"/")}`;return n[u]||(n[u]=o(r,u,s)),n[u]}var a=(()=>{var r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return function(e){var t,n,o=void 0!==(e=e||{})?e:{};o.ready=new Promise((function(r,e){t=r,n=e}));var i,a,s=Object.assign({},o),u="./this.program",c=(r,e)=>{throw e},l="";"undefined"!=typeof document&&document.currentScript&&(l=document.currentScript.src),r&&(l=r),l=0!==l.indexOf("blob:")?l.substr(0,l.replace(/[?#].*/,"").lastIndexOf("/")+1):"",i=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.send(null),e.responseText},a=(r,e,t)=>{var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):t()},n.onerror=t,n.send(null)};var f,d=o.print||console.log.bind(console),p=o.printErr||console.warn.bind(console);Object.assign(o,s),s=null,o.arguments&&o.arguments,o.thisProgram&&(u=o.thisProgram),o.quit&&(c=o.quit),o.wasmBinary&&(f=o.wasmBinary);var h,m=o.noExitRuntime||!0;"object"!=typeof WebAssembly&&C("no native wasm support detected");var v=!1;function w(r,e){r||C(e)}var y,_,g,E,b,k,S,D="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function A(r,e,t){for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.buffer&&D)return D.decode(r.subarray(e,o));for(var i="";e<o;){var a=r[e++];if(128&a){var s=63&r[e++];if(192!=(224&a)){var u=63&r[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&r[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function F(r,e){return r?A(g,r,e):""}function M(r,e,t,n){if(!(n>0))return 0;for(var o=t,i=t+n-1,a=0;a<r.length;++a){var s=r.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&r.charCodeAt(++a);if(s<=127){if(t>=i)break;e[t++]=s}else if(s<=2047){if(t+1>=i)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=i)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=i)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o}function P(r){for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++t):e+=3}return e}function x(r){y=r,o.HEAP8=_=new Int8Array(r),o.HEAP16=E=new Int16Array(r),o.HEAP32=b=new Int32Array(r),o.HEAPU8=g=new Uint8Array(r),o.HEAPU16=new Uint16Array(r),o.HEAPU32=k=new Uint32Array(r),o.HEAPF32=new Float32Array(r),o.HEAPF64=S=new Float64Array(r)}o.INITIAL_MEMORY;var j=[],z=[],T=[];var R=0,B=null;function N(r){R++,o.monitorRunDependencies&&o.monitorRunDependencies(R)}function O(r){if(R--,o.monitorRunDependencies&&o.monitorRunDependencies(R),0==R&&B){var e=B;B=null,e()}}function C(r){o.onAbort&&o.onAbort(r),p(r="Aborted("+r+")"),v=!0,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw n(e),e}var L,I,G,U;function H(r){return r.startsWith("data:application/octet-stream;base64,")}function q(r){try{if(r==L&&f)return new Uint8Array(f);throw"both async and sync fetching of the wasm failed"}catch(r){C(r)}}H(L="graphvizlib.wasm")||(I=L,L=o.locateFile?o.locateFile(I,l):l+I);var V={163264:(r,e)=>{var t=F(r),n=F(e);rr.createPath("/",Y.dirname(t)),rr.writeFile(Y.join("/",t),n)}};function W(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function X(r){for(;r.length>0;)r.shift()(o)}var Y={isAbs:r=>"/"===r.charAt(0),splitPath:r=>/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/.exec(r).slice(1),normalizeArray:(r,e)=>{for(var t=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift("..");return r},normalize:r=>{var e=Y.isAbs(r),t="/"===r.substr(-1);return(r=Y.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"))||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:r=>{var e=Y.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:r=>{if("/"===r)return"/";var e=(r=(r=Y.normalize(r)).replace(/\\/$/,"")).lastIndexOf("/");return-1===e?r:r.substr(e+1)},join:function(){var r=Array.prototype.slice.call(arguments);return Y.normalize(r.join("/"))},join2:(r,e)=>Y.normalize(r+"/"+e)};var $={resolve:function(){for(var r="",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:rr.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,e=Y.isAbs(n)}return(e?"/":"")+(r=Y.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"))||"."},relative:(r,e)=>{function t(r){for(var e=0;e<r.length&&""===r[e];e++);for(var t=r.length-1;t>=0&&""===r[t];t--);return e>t?[]:r.slice(e,t-e+1)}r=$.resolve(r).substr(1),e=$.resolve(e).substr(1);for(var n=t(r.split("/")),o=t(e.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(a))).join("/")}};function K(r,e,t){var n=t>0?t:P(r)+1,o=new Array(n),i=M(r,o,0,o.length);return e&&(o.length=i),o}var J={ttys:[],init:function(){},shutdown:function(){},register:function(r,e){J.ttys[r]={input:[],output:[],ops:e},rr.registerDevice(r,J.stream_ops)},stream_ops:{open:function(r){var e=J.ttys[r.node.rdev];if(!e)throw new rr.ErrnoError(43);r.tty=e,r.seekable=!1},close:function(r){r.tty.ops.fsync(r.tty)},fsync:function(r){r.tty.ops.fsync(r.tty)},read:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new rr.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(r){throw new rr.ErrnoError(29)}if(void 0===s&&0===i)throw new rr.ErrnoError(6);if(null==s)break;i++,e[t+a]=s}return i&&(r.node.timestamp=Date.now()),i},write:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new rr.ErrnoError(60);try{for(var i=0;i<n;i++)r.tty.ops.put_char(r.tty,e[t+i])}catch(r){throw new rr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(r){if(!r.input.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\\n"),!e)return null;r.input=K(e,!0)}return r.input.shift()},put_char:function(r,e){null===e||10===e?(d(A(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},fsync:function(r){r.output&&r.output.length>0&&(d(A(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,e){null===e||10===e?(p(A(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},fsync:function(r){r.output&&r.output.length>0&&(p(A(r.output,0)),r.output=[])}}};function Q(r){r=function(r,e){return Math.ceil(r/e)*e}(r,65536);var e=Er(65536,r);return e?function(r,e){return g.fill(0,r,r+e),r}(e,r):0}var Z={ops_table:null,mount:function(r){return Z.createNode(null,"/",16895,0)},createNode:function(r,e,t,n){if(rr.isBlkdev(t)||rr.isFIFO(t))throw new rr.ErrnoError(63);Z.ops_table||(Z.ops_table={dir:{node:{getattr:Z.node_ops.getattr,setattr:Z.node_ops.setattr,lookup:Z.node_ops.lookup,mknod:Z.node_ops.mknod,rename:Z.node_ops.rename,unlink:Z.node_ops.unlink,rmdir:Z.node_ops.rmdir,readdir:Z.node_ops.readdir,symlink:Z.node_ops.symlink},stream:{llseek:Z.stream_ops.llseek}},file:{node:{getattr:Z.node_ops.getattr,setattr:Z.node_ops.setattr},stream:{llseek:Z.stream_ops.llseek,read:Z.stream_ops.read,write:Z.stream_ops.write,allocate:Z.stream_ops.allocate,mmap:Z.stream_ops.mmap,msync:Z.stream_ops.msync}},link:{node:{getattr:Z.node_ops.getattr,setattr:Z.node_ops.setattr,readlink:Z.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Z.node_ops.getattr,setattr:Z.node_ops.setattr},stream:rr.chrdev_stream_ops}});var o=rr.createNode(r,e,t,n);return rr.isDir(o.mode)?(o.node_ops=Z.ops_table.dir.node,o.stream_ops=Z.ops_table.dir.stream,o.contents={}):rr.isFile(o.mode)?(o.node_ops=Z.ops_table.file.node,o.stream_ops=Z.ops_table.file.stream,o.usedBytes=0,o.contents=null):rr.isLink(o.mode)?(o.node_ops=Z.ops_table.link.node,o.stream_ops=Z.ops_table.link.stream):rr.isChrdev(o.mode)&&(o.node_ops=Z.ops_table.chrdev.node,o.stream_ops=Z.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[e]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){e=Math.max(e,t*(t<1048576?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));var n=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,e){if(r.usedBytes!=e)if(0==e)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr:function(r){var e={};return e.dev=rr.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,rr.isDir(r.mode)?e.size=4096:rr.isFile(r.mode)?e.size=r.usedBytes:rr.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(r,e){void 0!==e.mode&&(r.mode=e.mode),void 0!==e.timestamp&&(r.timestamp=e.timestamp),void 0!==e.size&&Z.resizeFileStorage(r,e.size)},lookup:function(r,e){throw rr.genericErrors[44]},mknod:function(r,e,t,n){return Z.createNode(r,e,t,n)},rename:function(r,e,t){if(rr.isDir(r.mode)){var n;try{n=rr.lookupNode(e,t)}catch(r){}if(n)for(var o in n.contents)throw new rr.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp,r.parent=e},unlink:function(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir:function(r,e){var t=rr.lookupNode(r,e);for(var n in t.contents)throw new rr.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir:function(r){var e=[".",".."];for(var t in r.contents)r.contents.hasOwnProperty(t)&&e.push(t);return e},symlink:function(r,e,t){var n=Z.createNode(r,e,41471,0);return n.link=t,n},readlink:function(r){if(!rr.isLink(r.mode))throw new rr.ErrnoError(28);return r.link}},stream_ops:{read:function(r,e,t,n,o){var i=r.node.contents;if(o>=r.node.usedBytes)return 0;var a=Math.min(r.node.usedBytes-o,n);if(a>8&&i.subarray)e.set(i.subarray(o,o+a),t);else for(var s=0;s<a;s++)e[t+s]=i[o+s];return a},write:function(r,e,t,n,o,i){if(e.buffer===_.buffer&&(i=!1),!n)return 0;var a=r.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=e.subarray(t,t+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=e.slice(t,t+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(e.subarray(t,t+n),o),n}if(Z.expandFileStorage(a,o+n),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(t,t+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=e[t+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&rr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new rr.ErrnoError(28);return n},allocate:function(r,e,t){Z.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap:function(r,e,t,n,o){if(!rr.isFile(r.node.mode))throw new rr.ErrnoError(43);var i,a,s=r.node.contents;if(2&o||s.buffer!==y){if((t>0||t+e<s.length)&&(s=s.subarray?s.subarray(t,t+e):Array.prototype.slice.call(s,t,t+e)),a=!0,!(i=Q(e)))throw new rr.ErrnoError(48);_.set(s,i)}else a=!1,i=s.byteOffset;return{ptr:i,allocated:a}},msync:function(r,e,t,n,o){if(!rr.isFile(r.node.mode))throw new rr.ErrnoError(43);return 2&o||Z.stream_ops.write(r,e,0,n,t,!1),0}}};var rr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(r,e={})=>{if(!(r=$.resolve(rr.cwd(),r)))return{path:"",node:null};if((e=Object.assign({follow_mount:!0,recurse_count:0},e)).recurse_count>8)throw new rr.ErrnoError(32);for(var t=Y.normalizeArray(r.split("/").filter((r=>!!r)),!1),n=rr.root,o="/",i=0;i<t.length;i++){var a=i===t.length-1;if(a&&e.parent)break;if(n=rr.lookupNode(n,t[i]),o=Y.join2(o,t[i]),rr.isMountpoint(n)&&(!a||a&&e.follow_mount)&&(n=n.mounted.root),!a||e.follow)for(var s=0;rr.isLink(n.mode);){var u=rr.readlink(o);if(o=$.resolve(Y.dirname(o),u),n=rr.lookupPath(o,{recurse_count:e.recurse_count+1}).node,s++>40)throw new rr.ErrnoError(32)}}return{path:o,node:n}},getPath:r=>{for(var e;;){if(rr.isRoot(r)){var t=r.mount.mountpoint;return e?"/"!==t[t.length-1]?t+"/"+e:t+e:t}e=e?r.name+"/"+e:r.name,r=r.parent}},hashName:(r,e)=>{for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%rr.nameTable.length},hashAddNode:r=>{var e=rr.hashName(r.parent.id,r.name);r.name_next=rr.nameTable[e],rr.nameTable[e]=r},hashRemoveNode:r=>{var e=rr.hashName(r.parent.id,r.name);if(rr.nameTable[e]===r)rr.nameTable[e]=r.name_next;else for(var t=rr.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode:(r,e)=>{var t=rr.mayLookup(r);if(t)throw new rr.ErrnoError(t,r);for(var n=rr.hashName(r.id,e),o=rr.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===r.id&&i===e)return o}return rr.lookup(r,e)},createNode:(r,e,t,n)=>{var o=new rr.FSNode(r,e,t,n);return rr.hashAddNode(o),o},destroyNode:r=>{rr.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>49152==(49152&r),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:r=>{var e=rr.flagModes[r];if(void 0===e)throw new Error("Unknown file open mode: "+r);return e},flagsToPermissionString:r=>{var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:(r,e)=>rr.ignorePermissions||(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2,mayLookup:r=>{var e=rr.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate:(r,e)=>{try{rr.lookupNode(r,e);return 20}catch(r){}return rr.nodePermissions(r,"wx")},mayDelete:(r,e,t)=>{var n;try{n=rr.lookupNode(r,e)}catch(r){return r.errno}var o=rr.nodePermissions(r,"wx");if(o)return o;if(t){if(!rr.isDir(n.mode))return 54;if(rr.isRoot(n)||rr.getPath(n)===rr.cwd())return 10}else if(rr.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?rr.isLink(r.mode)?32:rr.isDir(r.mode)&&("r"!==rr.flagsToPermissionString(e)||512&e)?31:rr.nodePermissions(r,rr.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,e=rr.MAX_OPEN_FDS)=>{for(var t=r;t<=e;t++)if(!rr.streams[t])return t;throw new rr.ErrnoError(33)},getStream:r=>rr.streams[r],createStream:(r,e,t)=>{rr.FSStream||(rr.FSStream=function(){this.shared={}},rr.FSStream.prototype={},Object.defineProperties(rr.FSStream.prototype,{object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(r){this.shared.flags=r}},position:{get:function(){return this.shared.position},set:function(r){this.shared.position=r}}})),r=Object.assign(new rr.FSStream,r);var n=rr.nextfd(e,t);return r.fd=n,rr.streams[n]=r,r},closeStream:r=>{rr.streams[r]=null},chrdev_stream_ops:{open:r=>{var e=rr.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new rr.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice:(r,e)=>{rr.devices[r]={stream_ops:e}},getDevice:r=>rr.devices[r],getMounts:r=>{for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push.apply(t,n.mounts)}return e},syncfs:(r,e)=>{"function"==typeof r&&(e=r,r=!1),rr.syncFSRequests++,rr.syncFSRequests>1&&p("warning: "+rr.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=rr.getMounts(rr.root.mount),n=0;function o(r){return rr.syncFSRequests--,e(r)}function i(r){if(r)return i.errored?void 0:(i.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach((e=>{if(!e.type.syncfs)return i(null);e.type.syncfs(e,r,i)}))},mount:(r,e,t)=>{var n,o="/"===t,i=!t;if(o&&rr.root)throw new rr.ErrnoError(10);if(!o&&!i){var a=rr.lookupPath(t,{follow_mount:!1});if(t=a.path,n=a.node,rr.isMountpoint(n))throw new rr.ErrnoError(10);if(!rr.isDir(n.mode))throw new rr.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?rr.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:r=>{var e=rr.lookupPath(r,{follow_mount:!1});if(!rr.isMountpoint(e.node))throw new rr.ErrnoError(28);var t=e.node,n=t.mounted,o=rr.getMounts(n);Object.keys(rr.nameTable).forEach((r=>{for(var e=rr.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&rr.destroyNode(e),e=t}})),t.mounted=null;var i=t.mount.mounts.indexOf(n);t.mount.mounts.splice(i,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod:(r,e,t)=>{var n=rr.lookupPath(r,{parent:!0}).node,o=Y.basename(r);if(!o||"."===o||".."===o)throw new rr.ErrnoError(28);var i=rr.mayCreate(n,o);if(i)throw new rr.ErrnoError(i);if(!n.node_ops.mknod)throw new rr.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},create:(r,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,rr.mknod(r,e,0)),mkdir:(r,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,rr.mknod(r,e,0)),mkdirTree:(r,e)=>{for(var t=r.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{rr.mkdir(n,e)}catch(r){if(20!=r.errno)throw r}}},mkdev:(r,e,t)=>(void 0===t&&(t=e,e=438),e|=8192,rr.mknod(r,e,t)),symlink:(r,e)=>{if(!$.resolve(r))throw new rr.ErrnoError(44);var t=rr.lookupPath(e,{parent:!0}).node;if(!t)throw new rr.ErrnoError(44);var n=Y.basename(e),o=rr.mayCreate(t,n);if(o)throw new rr.ErrnoError(o);if(!t.node_ops.symlink)throw new rr.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename:(r,e)=>{var t,n,o=Y.dirname(r),i=Y.dirname(e),a=Y.basename(r),s=Y.basename(e);if(t=rr.lookupPath(r,{parent:!0}).node,n=rr.lookupPath(e,{parent:!0}).node,!t||!n)throw new rr.ErrnoError(44);if(t.mount!==n.mount)throw new rr.ErrnoError(75);var u,c=rr.lookupNode(t,a),l=$.relative(r,i);if("."!==l.charAt(0))throw new rr.ErrnoError(28);if("."!==(l=$.relative(e,o)).charAt(0))throw new rr.ErrnoError(55);try{u=rr.lookupNode(n,s)}catch(r){}if(c!==u){var f=rr.isDir(c.mode),d=rr.mayDelete(t,a,f);if(d)throw new rr.ErrnoError(d);if(d=u?rr.mayDelete(n,s,f):rr.mayCreate(n,s))throw new rr.ErrnoError(d);if(!t.node_ops.rename)throw new rr.ErrnoError(63);if(rr.isMountpoint(c)||u&&rr.isMountpoint(u))throw new rr.ErrnoError(10);if(n!==t&&(d=rr.nodePermissions(t,"w")))throw new rr.ErrnoError(d);rr.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(r){throw r}finally{rr.hashAddNode(c)}}},rmdir:r=>{var e=rr.lookupPath(r,{parent:!0}).node,t=Y.basename(r),n=rr.lookupNode(e,t),o=rr.mayDelete(e,t,!0);if(o)throw new rr.ErrnoError(o);if(!e.node_ops.rmdir)throw new rr.ErrnoError(63);if(rr.isMountpoint(n))throw new rr.ErrnoError(10);e.node_ops.rmdir(e,t),rr.destroyNode(n)},readdir:r=>{var e=rr.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new rr.ErrnoError(54);return e.node_ops.readdir(e)},unlink:r=>{var e=rr.lookupPath(r,{parent:!0}).node;if(!e)throw new rr.ErrnoError(44);var t=Y.basename(r),n=rr.lookupNode(e,t),o=rr.mayDelete(e,t,!1);if(o)throw new rr.ErrnoError(o);if(!e.node_ops.unlink)throw new rr.ErrnoError(63);if(rr.isMountpoint(n))throw new rr.ErrnoError(10);e.node_ops.unlink(e,t),rr.destroyNode(n)},readlink:r=>{var e=rr.lookupPath(r).node;if(!e)throw new rr.ErrnoError(44);if(!e.node_ops.readlink)throw new rr.ErrnoError(28);return $.resolve(rr.getPath(e.parent),e.node_ops.readlink(e))},stat:(r,e)=>{var t=rr.lookupPath(r,{follow:!e}).node;if(!t)throw new rr.ErrnoError(44);if(!t.node_ops.getattr)throw new rr.ErrnoError(63);return t.node_ops.getattr(t)},lstat:r=>rr.stat(r,!0),chmod:(r,e,t)=>{var n;"string"==typeof r?n=rr.lookupPath(r,{follow:!t}).node:n=r;if(!n.node_ops.setattr)throw new rr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:(r,e)=>{rr.chmod(r,e,!0)},fchmod:(r,e)=>{var t=rr.getStream(r);if(!t)throw new rr.ErrnoError(8);rr.chmod(t.node,e)},chown:(r,e,t,n)=>{var o;"string"==typeof r?o=rr.lookupPath(r,{follow:!n}).node:o=r;if(!o.node_ops.setattr)throw new rr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,e,t)=>{rr.chown(r,e,t,!0)},fchown:(r,e,t)=>{var n=rr.getStream(r);if(!n)throw new rr.ErrnoError(8);rr.chown(n.node,e,t)},truncate:(r,e)=>{if(e<0)throw new rr.ErrnoError(28);var t;"string"==typeof r?t=rr.lookupPath(r,{follow:!0}).node:t=r;if(!t.node_ops.setattr)throw new rr.ErrnoError(63);if(rr.isDir(t.mode))throw new rr.ErrnoError(31);if(!rr.isFile(t.mode))throw new rr.ErrnoError(28);var n=rr.nodePermissions(t,"w");if(n)throw new rr.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate:(r,e)=>{var t=rr.getStream(r);if(!t)throw new rr.ErrnoError(8);if(0==(2097155&t.flags))throw new rr.ErrnoError(28);rr.truncate(t.node,e)},utime:(r,e,t)=>{var n=rr.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,t)})},open:(r,e,t)=>{if(""===r)throw new rr.ErrnoError(44);var n;if(t=void 0===t?438:t,t=64&(e="string"==typeof e?rr.modeStringToFlags(e):e)?4095&t|32768:0,"object"==typeof r)n=r;else{r=Y.normalize(r);try{n=rr.lookupPath(r,{follow:!(131072&e)}).node}catch(r){}}var i=!1;if(64&e)if(n){if(128&e)throw new rr.ErrnoError(20)}else n=rr.mknod(r,t,0),i=!0;if(!n)throw new rr.ErrnoError(44);if(rr.isChrdev(n.mode)&&(e&=-513),65536&e&&!rr.isDir(n.mode))throw new rr.ErrnoError(54);if(!i){var a=rr.mayOpen(n,e);if(a)throw new rr.ErrnoError(a)}512&e&&!i&&rr.truncate(n,0),e&=-131713;var s=rr.createStream({node:n,path:rr.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!o.logReadFiles||1&e||(rr.readFiles||(rr.readFiles={}),r in rr.readFiles||(rr.readFiles[r]=1)),s},close:r=>{if(rr.isClosed(r))throw new rr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{rr.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek:(r,e,t)=>{if(rr.isClosed(r))throw new rr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new rr.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new rr.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read:(r,e,t,n,o)=>{if(n<0||o<0)throw new rr.ErrnoError(28);if(rr.isClosed(r))throw new rr.ErrnoError(8);if(1==(2097155&r.flags))throw new rr.ErrnoError(8);if(rr.isDir(r.node.mode))throw new rr.ErrnoError(31);if(!r.stream_ops.read)throw new rr.ErrnoError(28);var i=void 0!==o;if(i){if(!r.seekable)throw new rr.ErrnoError(70)}else o=r.position;var a=r.stream_ops.read(r,e,t,n,o);return i||(r.position+=a),a},write:(r,e,t,n,o,i)=>{if(n<0||o<0)throw new rr.ErrnoError(28);if(rr.isClosed(r))throw new rr.ErrnoError(8);if(0==(2097155&r.flags))throw new rr.ErrnoError(8);if(rr.isDir(r.node.mode))throw new rr.ErrnoError(31);if(!r.stream_ops.write)throw new rr.ErrnoError(28);r.seekable&&1024&r.flags&&rr.llseek(r,0,2);var a=void 0!==o;if(a){if(!r.seekable)throw new rr.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,i);return a||(r.position+=s),s},allocate:(r,e,t)=>{if(rr.isClosed(r))throw new rr.ErrnoError(8);if(e<0||t<=0)throw new rr.ErrnoError(28);if(0==(2097155&r.flags))throw new rr.ErrnoError(8);if(!rr.isFile(r.node.mode)&&!rr.isDir(r.node.mode))throw new rr.ErrnoError(43);if(!r.stream_ops.allocate)throw new rr.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap:(r,e,t,n,o)=>{if(0!=(2&n)&&0==(2&o)&&2!=(2097155&r.flags))throw new rr.ErrnoError(2);if(1==(2097155&r.flags))throw new rr.ErrnoError(2);if(!r.stream_ops.mmap)throw new rr.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o)},msync:(r,e,t,n,o)=>r&&r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0,munmap:r=>0,ioctl:(r,e,t)=>{if(!r.stream_ops.ioctl)throw new rr.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile:(r,e={})=>{if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error(\'Invalid encoding type "\'+e.encoding+\'"\');var t,n=rr.open(r,e.flags),o=rr.stat(r).size,i=new Uint8Array(o);return rr.read(n,i,0,o,0),"utf8"===e.encoding?t=A(i,0):"binary"===e.encoding&&(t=i),rr.close(n),t},writeFile:(r,e,t={})=>{t.flags=t.flags||577;var n=rr.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(P(e)+1),i=M(e,o,0,o.length);rr.write(n,o,0,i,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");rr.write(n,e,0,e.byteLength,void 0,t.canOwn)}rr.close(n)},cwd:()=>rr.currentPath,chdir:r=>{var e=rr.lookupPath(r,{follow:!0});if(null===e.node)throw new rr.ErrnoError(44);if(!rr.isDir(e.node.mode))throw new rr.ErrnoError(54);var t=rr.nodePermissions(e.node,"x");if(t)throw new rr.ErrnoError(t);rr.currentPath=e.path},createDefaultDirectories:()=>{rr.mkdir("/tmp"),rr.mkdir("/home"),rr.mkdir("/home/web_user")},createDefaultDevices:()=>{rr.mkdir("/dev"),rr.registerDevice(rr.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n}),rr.mkdev("/dev/null",rr.makedev(1,3)),J.register(rr.makedev(5,0),J.default_tty_ops),J.register(rr.makedev(6,0),J.default_tty1_ops),rr.mkdev("/dev/tty",rr.makedev(5,0)),rr.mkdev("/dev/tty1",rr.makedev(6,0));var r=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return()=>(crypto.getRandomValues(r),r[0])}return()=>C("randomDevice")}();rr.createDevice("/dev","random",r),rr.createDevice("/dev","urandom",r),rr.mkdir("/dev/shm"),rr.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{rr.mkdir("/proc");var r=rr.mkdir("/proc/self");rr.mkdir("/proc/self/fd"),rr.mount({mount:()=>{var e=rr.createNode(r,"fd",16895,73);return e.node_ops={lookup:(r,e)=>{var t=+e,n=rr.getStream(t);if(!n)throw new rr.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams:()=>{o.stdin?rr.createDevice("/dev","stdin",o.stdin):rr.symlink("/dev/tty","/dev/stdin"),o.stdout?rr.createDevice("/dev","stdout",null,o.stdout):rr.symlink("/dev/tty","/dev/stdout"),o.stderr?rr.createDevice("/dev","stderr",null,o.stderr):rr.symlink("/dev/tty1","/dev/stderr"),rr.open("/dev/stdin",0),rr.open("/dev/stdout",1),rr.open("/dev/stderr",1)},ensureErrnoError:()=>{rr.ErrnoError||(rr.ErrnoError=function(r,e){this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},rr.ErrnoError.prototype=new Error,rr.ErrnoError.prototype.constructor=rr.ErrnoError,[44].forEach((r=>{rr.genericErrors[r]=new rr.ErrnoError(r),rr.genericErrors[r].stack="<generic error, no stack>"})))},staticInit:()=>{rr.ensureErrnoError(),rr.nameTable=new Array(4096),rr.mount(Z,{},"/"),rr.createDefaultDirectories(),rr.createDefaultDevices(),rr.createSpecialDirectories(),rr.filesystems={MEMFS:Z}},init:(r,e,t)=>{rr.init.initialized=!0,rr.ensureErrnoError(),o.stdin=r||o.stdin,o.stdout=e||o.stdout,o.stderr=t||o.stderr,rr.createStandardStreams()},quit:()=>{rr.init.initialized=!1;for(var r=0;r<rr.streams.length;r++){var e=rr.streams[r];e&&rr.close(e)}},getMode:(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},findObject:(r,e)=>{var t=rr.analyzePath(r,e);return t.exists?t.object:null},analyzePath:(r,e)=>{try{r=(n=rr.lookupPath(r,{follow:!e})).path}catch(r){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=rr.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=Y.basename(r),n=rr.lookupPath(r,{follow:!e}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(r){t.error=r.errno}return t},createPath:(r,e,t,n)=>{r="string"==typeof r?r:rr.getPath(r);for(var o=e.split("/").reverse();o.length;){var i=o.pop();if(i){var a=Y.join2(r,i);try{rr.mkdir(a)}catch(r){}r=a}}return a},createFile:(r,e,t,n,o)=>{var i=Y.join2("string"==typeof r?r:rr.getPath(r),e),a=rr.getMode(n,o);return rr.create(i,a)},createDataFile:(r,e,t,n,o,i)=>{var a=e;r&&(r="string"==typeof r?r:rr.getPath(r),a=e?Y.join2(r,e):r);var s=rr.getMode(n,o),u=rr.create(a,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),l=0,f=t.length;l<f;++l)c[l]=t.charCodeAt(l);t=c}rr.chmod(u,146|s);var d=rr.open(u,577);rr.write(d,t,0,t.length,0,i),rr.close(d),rr.chmod(u,s)}return u},createDevice:(r,e,t,n)=>{var o=Y.join2("string"==typeof r?r:rr.getPath(r),e),i=rr.getMode(!!t,!!n);rr.createDevice.major||(rr.createDevice.major=64);var a=rr.makedev(rr.createDevice.major++,0);return rr.registerDevice(a,{open:r=>{r.seekable=!1},close:r=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(r,e,n,o,i)=>{for(var a=0,s=0;s<o;s++){var u;try{u=t()}catch(r){throw new rr.ErrnoError(29)}if(void 0===u&&0===a)throw new rr.ErrnoError(6);if(null==u)break;a++,e[n+s]=u}return a&&(r.node.timestamp=Date.now()),a},write:(r,e,t,o,i)=>{for(var a=0;a<o;a++)try{n(e[t+a])}catch(r){throw new rr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),a}}),rr.mkdev(o,i,a)},forceLoadFile:r=>{if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!i)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=K(i(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new rr.ErrnoError(29)}},createLazyFile:(r,e,t,n,o)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(r){if(!(r>this.length-1||r<0)){var e=r%this.chunkSize,t=r/this.chunkSize|0;return this.getter(t)[e]}},i.prototype.setDataGetter=function(r){this.getter=r},i.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn\'t load "+t+". Status: "+r.status);var e,n=Number(r.getResponseHeader("Content-length")),o=(e=r.getResponseHeader("Accept-Ranges"))&&"bytes"===e,i=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;o||(a=n);var s=this;s.setDataGetter((r=>{var e=r*a,o=(r+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=((r,e)=>{if(r>e)throw new Error("invalid range ("+r+", "+e+") or no bytes requested!");if(e>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==a&&o.setRequestHeader("Range","bytes="+r+"-"+e),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn\'t load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):K(o.responseText||"",!0)})(e,o)),void 0===s.chunks[r])throw new Error("doXHR failed!");return s.chunks[r]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,d("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a={isDevice:!1,url:t},s=rr.createFile(r,e,a,n,o);a.contents?s.contents=a.contents:a.url&&(s.contents=null,s.url=a.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};function c(r,e,t,n,o){var i=r.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var s=0;s<a;s++)e[t+s]=i[o+s];else for(s=0;s<a;s++)e[t+s]=i.get(o+s);return a}return Object.keys(s.stream_ops).forEach((r=>{var e=s.stream_ops[r];u[r]=function(){return rr.forceLoadFile(s),e.apply(null,arguments)}})),u.read=(r,e,t,n,o)=>(rr.forceLoadFile(s),c(r,e,t,n,o)),u.mmap=(r,e,t,n,o)=>{rr.forceLoadFile(s);var i=Q(e);if(!i)throw new rr.ErrnoError(48);return c(r,_,i,e,t),{ptr:i,allocated:!0}},s.stream_ops=u,s},createPreloadedFile:(r,e,t,n,o,i,s,u,c,l)=>{var f=e?$.resolve(Y.join2(r,e)):r;function d(t){function a(t){l&&l(),u||rr.createDataFile(r,e,t,n,o,c),i&&i(),O()}Browser.handledByPreloadPlugin(t,f,a,(()=>{s&&s(),O()}))||a(t)}N(),"string"==typeof t?function(r,e,t,n){var o=n?"":"al "+r;a(r,(t=>{w(t,\'Loading data file "\'+r+\'" failed (no arrayBuffer).\'),e(new Uint8Array(t)),o&&O()}),(e=>{if(!t)throw\'Loading data file "\'+r+\'" failed.\';t()})),o&&N()}(t,(r=>d(r)),s):d(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=rr.indexedDB();try{var o=n.open(rr.DB_NAME(),rr.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=()=>{d("creating db"),o.result.createObjectStore(rr.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([rr.DB_STORE_NAME],"readwrite"),i=n.objectStore(rr.DB_STORE_NAME),a=0,s=0,u=r.length;function c(){0==s?e():t()}r.forEach((r=>{var e=i.put(rr.analyzePath(r).object.contents,r);e.onsuccess=()=>{++a+s==u&&c()},e.onerror=()=>{s++,a+s==u&&c()}})),n.onerror=t},o.onerror=t},loadFilesFromDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=rr.indexedDB();try{var o=n.open(rr.DB_NAME(),rr.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([rr.DB_STORE_NAME],"readonly")}catch(r){return void t(r)}var a=i.objectStore(rr.DB_STORE_NAME),s=0,u=0,c=r.length;function l(){0==u?e():t()}r.forEach((r=>{var e=a.get(r);e.onsuccess=()=>{rr.analyzePath(r).exists&&rr.unlink(r),rr.createDataFile(Y.dirname(r),Y.basename(r),e.result,!0,!0,!0),++s+u==c&&l()},e.onerror=()=>{u++,s+u==c&&l()}})),i.onerror=t},o.onerror=t}},er={DEFAULT_POLLMASK:5,calculateAt:function(r,e,t){if(Y.isAbs(e))return e;var n;-100===r?n=rr.cwd():n=er.getStreamFromFD(r).path;if(0==e.length){if(!t)throw new rr.ErrnoError(44);return n}return Y.join2(n,e)},doStat:function(r,e,t){try{var n=r(e)}catch(r){if(r&&r.node&&Y.normalize(e)!==Y.normalize(rr.getPath(r.node)))return-54;throw r}return b[t>>2]=n.dev,b[t+8>>2]=n.ino,b[t+12>>2]=n.mode,k[t+16>>2]=n.nlink,b[t+20>>2]=n.uid,b[t+24>>2]=n.gid,b[t+28>>2]=n.rdev,U=[n.size>>>0,(G=n.size,+Math.abs(G)>=1?G>0?(0|Math.min(+Math.floor(G/4294967296),4294967295))>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],b[t+40>>2]=U[0],b[t+44>>2]=U[1],b[t+48>>2]=4096,b[t+52>>2]=n.blocks,U=[Math.floor(n.atime.getTime()/1e3)>>>0,(G=Math.floor(n.atime.getTime()/1e3),+Math.abs(G)>=1?G>0?(0|Math.min(+Math.floor(G/4294967296),4294967295))>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],b[t+56>>2]=U[0],b[t+60>>2]=U[1],k[t+64>>2]=0,U=[Math.floor(n.mtime.getTime()/1e3)>>>0,(G=Math.floor(n.mtime.getTime()/1e3),+Math.abs(G)>=1?G>0?(0|Math.min(+Math.floor(G/4294967296),4294967295))>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],b[t+72>>2]=U[0],b[t+76>>2]=U[1],k[t+80>>2]=0,U=[Math.floor(n.ctime.getTime()/1e3)>>>0,(G=Math.floor(n.ctime.getTime()/1e3),+Math.abs(G)>=1?G>0?(0|Math.min(+Math.floor(G/4294967296),4294967295))>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],b[t+88>>2]=U[0],b[t+92>>2]=U[1],k[t+96>>2]=0,U=[n.ino>>>0,(G=n.ino,+Math.abs(G)>=1?G>0?(0|Math.min(+Math.floor(G/4294967296),4294967295))>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],b[t+104>>2]=U[0],b[t+108>>2]=U[1],0},doMsync:function(r,e,t,n,o){var i=g.slice(r,r+t);rr.msync(e,i,o,t,n)},varargs:void 0,get:function(){return er.varargs+=4,b[er.varargs-4>>2]},getStr:function(r){return F(r)},getStreamFromFD:function(r){var e=rr.getStream(r);if(!e)throw new rr.ErrnoError(8);return e}};var tr=[];function nr(r){try{return h.grow(r-y.byteLength+65535>>>16),x(h.buffer),1}catch(r){}}var or={};function ir(){if(!ir.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:u||"./this.program"};for(var e in or)void 0===or[e]?delete r[e]:r[e]=or[e];var t=[];for(var e in r)t.push(e+"="+r[e]);ir.strings=t}return ir.strings}function ar(r){m||(o.onExit&&o.onExit(r),v=!0),c(r,new W(r))}var sr=function(r,e){ar(r)};var ur=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=rr.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},cr=365,lr=146;Object.defineProperties(ur.prototype,{read:{get:function(){return(this.mode&cr)===cr},set:function(r){r?this.mode|=cr:this.mode&=-366}},write:{get:function(){return(this.mode&lr)===lr},set:function(r){r?this.mode|=lr:this.mode&=-147}},isFolder:{get:function(){return rr.isDir(this.mode)}},isDevice:{get:function(){return rr.isChrdev(this.mode)}}}),rr.FSNode=ur,rr.staticInit();var fr={k:function(r,e,t,n){try{if(e=er.getStr(e),e=er.calculateAt(r,e),-8&t)return-28;var o=rr.lookupPath(e,{follow:!0}).node;if(!o)return-44;var i="";return 4&t&&(i+="r"),2&t&&(i+="w"),1&t&&(i+="x"),i&&rr.nodePermissions(o,i)?-2:0}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return-r.errno}},f:function(r,e,t){er.varargs=t;try{var n=er.getStreamFromFD(r);switch(e){case 0:return(o=er.get())<0?-28:rr.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=er.get();return n.flags|=o,0;case 5:o=er.get();return E[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return i=28,b[gr()>>2]=i,-1}}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return-r.errno}var i},u:function(r,e){try{var t=er.getStreamFromFD(r);return er.doStat(rr.stat,t.path,e)}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return-r.errno}},v:function(r,e,t){er.varargs=t;try{var n=er.getStreamFromFD(r);switch(e){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=er.get();return b[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:o=er.get();return rr.ioctl(n,e,o);default:return-28}}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return-r.errno}},s:function(r,e,t,n){try{e=er.getStr(e);var o=256&n,i=4096&n;return n&=-4353,e=er.calculateAt(r,e,i),er.doStat(o?rr.lstat:rr.stat,e,t)}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return-r.errno}},c:function(r,e,t,n){er.varargs=n;try{e=er.getStr(e),e=er.calculateAt(r,e);var o=n?er.get():0;return rr.open(e,t,o).fd}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return-r.errno}},t:function(r,e){try{return r=er.getStr(r),er.doStat(rr.stat,r,e)}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return-r.errno}},n:function(r,e,t){try{return e=er.getStr(e),e=er.calculateAt(r,e),0===t?rr.unlink(e):512===t?rr.rmdir(e):C("Invalid flags passed to unlinkat"),0}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return-r.errno}},d:function(){return Date.now()},i:function(){return true},o:function(r,e,t,n,o,i){try{var a=er.getStreamFromFD(n),s=rr.mmap(a,r,o,e,t),u=s.ptr;return b[i>>2]=s.allocated,u}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return-r.errno}},p:function(r,e,t,n,o,i){try{var a=er.getStreamFromFD(o);2&t&&er.doMsync(r,a,e,n,i),rr.munmap(a)}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return-r.errno}},a:function(){C("")},w:function(r,e,t){var n=function(r,e){var t;for(tr.length=0,e>>=2;t=g[r++];)e+=105!=t&e,tr.push(105==t?b[e]:S[e++>>1]),++e;return tr}(e,t);return V[r].apply(null,n)},j:function(r,e,t){g.copyWithin(r,e,e+t)},m:function(r){var e,t,n=g.length,o=2147483648;if((r>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,r+100663296),nr(Math.min(o,(e=Math.max(r,a))+((t=65536)-e%t)%t)))return!0}return!1},q:function(r,e){var t=0;return ir().forEach((function(n,o){var i=e+t;k[r+4*o>>2]=i,function(r,e,t){for(var n=0;n<r.length;++n)_[e++>>0]=r.charCodeAt(n);t||(_[e>>0]=0)}(n,i),t+=n.length+1})),0},r:function(r,e){var t=ir();k[r>>2]=t.length;var n=0;return t.forEach((function(r){n+=r.length+1})),k[e>>2]=n,0},e:sr,b:function(r){try{var e=er.getStreamFromFD(r);return rr.close(e),0}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return r.errno}},g:function(r,e,t,n){try{var o=function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=k[e>>2],s=k[e+4>>2];e+=8;var u=rr.read(r,_,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o}(er.getStreamFromFD(r),e,t);return k[n>>2]=o,0}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return r.errno}},l:function(r,e,t,n,o){try{var i=(u=t)+2097152>>>0<4194305-!!(s=e)?(s>>>0)+4294967296*u:NaN;if(isNaN(i))return 61;var a=er.getStreamFromFD(r);return rr.llseek(a,i,n),U=[a.position>>>0,(G=a.position,+Math.abs(G)>=1?G>0?(0|Math.min(+Math.floor(G/4294967296),4294967295))>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],b[o>>2]=U[0],b[o+4>>2]=U[1],a.getdents&&0===i&&0===n&&(a.getdents=null),0}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return r.errno}var s,u},h:function(r,e,t,n){try{var o=function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=k[e>>2],s=k[e+4>>2];e+=8;var u=rr.write(r,_,a,s,n);if(u<0)return-1;o+=u}return o}(er.getStreamFromFD(r),e,t);return k[n>>2]=o,0}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return r.errno}}};!function(){var r={a:fr};function e(r,e){var t,n=r.exports;o.asm=n,x((h=o.asm.x).buffer),o.asm.G,t=o.asm.y,z.unshift(t),O()}function t(r){e(r.instance)}function i(e){return(f||"function"!=typeof fetch?Promise.resolve().then((function(){return q(L)})):fetch(L,{credentials:"same-origin"}).then((function(r){if(!r.ok)throw"failed to load wasm binary file at \'"+L+"\'";return r.arrayBuffer()})).catch((function(){return q(L)}))).then((function(e){return WebAssembly.instantiate(e,r)})).then((function(r){return r})).then(e,(function(r){p("failed to asynchronously prepare wasm: "+r),C(r)}))}if(N(),o.instantiateWasm)try{return o.instantiateWasm(r,e)}catch(r){return p("Module.instantiateWasm callback failed with error: "+r),!1}(f||"function"!=typeof WebAssembly.instantiateStreaming||H(L)||"function"!=typeof fetch?i(t):fetch(L,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,r).then(t,(function(r){return p("wasm streaming compile failed: "+r),p("falling back to ArrayBuffer instantiation"),i(t)}))}))).catch(n)}(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.y).apply(null,arguments)};var dr=o._emscripten_bind_VoidPtr___destroy___0=function(){return(dr=o._emscripten_bind_VoidPtr___destroy___0=o.asm.z).apply(null,arguments)},pr=o._emscripten_bind_Graphviz_Graphviz_2=function(){return(pr=o._emscripten_bind_Graphviz_Graphviz_2=o.asm.A).apply(null,arguments)},hr=o._emscripten_bind_Graphviz_version_0=function(){return(hr=o._emscripten_bind_Graphviz_version_0=o.asm.B).apply(null,arguments)},mr=o._emscripten_bind_Graphviz_lastError_0=function(){return(mr=o._emscripten_bind_Graphviz_lastError_0=o.asm.C).apply(null,arguments)},vr=o._emscripten_bind_Graphviz_layout_3=function(){return(vr=o._emscripten_bind_Graphviz_layout_3=o.asm.D).apply(null,arguments)},wr=o._emscripten_bind_Graphviz_createFile_2=function(){return(wr=o._emscripten_bind_Graphviz_createFile_2=o.asm.E).apply(null,arguments)},yr=o._emscripten_bind_Graphviz___destroy___0=function(){return(yr=o._emscripten_bind_Graphviz___destroy___0=o.asm.F).apply(null,arguments)};o._free=function(){return(o._free=o.asm.H).apply(null,arguments)},o._malloc=function(){return(o._malloc=o.asm.I).apply(null,arguments)};var _r,gr=o.___errno_location=function(){return(gr=o.___errno_location=o.asm.J).apply(null,arguments)},Er=o._emscripten_builtin_memalign=function(){return(Er=o._emscripten_builtin_memalign=o.asm.K).apply(null,arguments)};function br(r){function e(){_r||(_r=!0,o.calledRun=!0,v||(o.noFSInit||rr.init.initialized||rr.init(),rr.ignorePermissions=!1,X(z),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)r=o.postRun.shift(),T.unshift(r);var r;X(T)}()))}R>0||(!function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)r=o.preRun.shift(),j.unshift(r);var r;X(j)}(),R>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e()))}if(o.___start_em_js=163408,o.___stop_em_js=163506,B=function r(){_r||br(),_r||(B=r)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function kr(){}function Sr(r){return(r||kr).__cache__}function Dr(r,e){var t=Sr(e),n=t[r];return n||((n=Object.create((e||kr).prototype)).ptr=r,t[r]=n)}br(),kr.prototype=Object.create(kr.prototype),kr.prototype.constructor=kr,kr.prototype.__class__=kr,kr.__cache__={},o.WrapperObject=kr,o.getCache=Sr,o.wrapPointer=Dr,o.castObject=function(r,e){return Dr(r.ptr,e)},o.NULL=Dr(0),o.destroy=function(r){if(!r.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";r.__destroy__(),delete Sr(r.__class__)[r.ptr]},o.compare=function(r,e){return r.ptr===e.ptr},o.getPointer=function(r){return r.ptr},o.getClass=function(r){return r.__class__};var Ar={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(Ar.needed){for(var r=0;r<Ar.temps.length;r++)o._free(Ar.temps[r]);Ar.temps.length=0,o._free(Ar.buffer),Ar.buffer=0,Ar.size+=Ar.needed,Ar.needed=0}Ar.buffer||(Ar.size+=128,Ar.buffer=o._malloc(Ar.size),w(Ar.buffer)),Ar.pos=0},alloc:function(r,e){w(Ar.buffer);var t,n=e.BYTES_PER_ELEMENT,i=r.length*n;return i=i+7&-8,Ar.pos+i>=Ar.size?(w(i>0),Ar.needed+=i,t=o._malloc(i),Ar.temps.push(t)):(t=Ar.buffer+Ar.pos,Ar.pos+=i),t},copy:function(r,e,t){switch(t>>>=0,e.BYTES_PER_ELEMENT){case 2:t>>>=1;break;case 4:t>>>=2;break;case 8:t>>>=3}for(var n=0;n<r.length;n++)e[t+n]=r[n]}};function Fr(r){if("string"==typeof r){var e=K(r),t=Ar.alloc(e,_);return Ar.copy(e,_,t),t}return r}function Mr(){throw"cannot construct a VoidPtr, no constructor in IDL"}function Pr(r,e){r&&"object"==typeof r&&(r=r.ptr),e&&"object"==typeof e&&(e=e.ptr),this.ptr=pr(r,e),Sr(Pr)[this.ptr]=this}return Mr.prototype=Object.create(kr.prototype),Mr.prototype.constructor=Mr,Mr.prototype.__class__=Mr,Mr.__cache__={},o.VoidPtr=Mr,Mr.prototype.__destroy__=Mr.prototype.__destroy__=function(){var r=this.ptr;dr(r)},Pr.prototype=Object.create(kr.prototype),Pr.prototype.constructor=Pr,Pr.prototype.__class__=Pr,Pr.__cache__={},o.Graphviz=Pr,Pr.prototype.version=Pr.prototype.version=function(){var r=this.ptr;return F(hr(r))},Pr.prototype.lastError=Pr.prototype.lastError=function(){var r=this.ptr;return F(mr(r))},Pr.prototype.layout=Pr.prototype.layout=function(r,e,t){var n=this.ptr;return Ar.prepare(),r=r&&"object"==typeof r?r.ptr:Fr(r),e=e&&"object"==typeof e?e.ptr:Fr(e),t=t&&"object"==typeof t?t.ptr:Fr(t),F(vr(n,r,e,t))},Pr.prototype.createFile=Pr.prototype.createFile=function(r,e){var t=this.ptr;Ar.prepare(),r=r&&"object"==typeof r?r.ptr:Fr(r),e=e&&"object"==typeof e?e.ptr:Fr(e),wr(t,r,e)},Pr.prototype.__destroy__=Pr.prototype.__destroy__=function(){var r=this.ptr;yr(r)},e.ready}})(),s=Object.freeze({__proto__:null,default:a});function u(r){return{path:r.path,data:`<?xml version="1.0" encoding="UTF-8" standalone="no"?>\\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\\n<svg width="${r.width}" height="${r.height}"></svg>`}}const c={layout:(r,e="svg",t="dot",n)=>r?i(s,"graphvizlib",null==n?void 0:n.wasmFolder,null==n?void 0:n.wasmBinary).then((o=>{const i=new o.Graphviz((null==n?void 0:n.yInvert)?1:0,(null==n?void 0:n.nop)?null==n?void 0:n.nop:0);!function(r,e){const t={images:[],files:[],...e};var n;[...t.files,...(n=t.images,n.map(u))].forEach((e=>r.createFile(e.path,e.data)))}(i,n);const a=i.layout(r,e,t);if(o.destroy(i),!a)throw new Error(o.Graphviz.prototype.lastError());return a})):Promise.resolve(""),circo(r,e="svg",t){return this.layout(r,e,"circo",t)},dot(r,e="svg",t){return this.layout(r,e,"dot",t)},fdp(r,e="svg",t){return this.layout(r,e,"fdp",t)},sfdp(r,e="svg",t){return this.layout(r,e,"sfdp",t)},neato(r,e="svg",t){return this.layout(r,e,"neato",t)},osage(r,e="svg",t){return this.layout(r,e,"osage",t)},patchwork(r,e="svg",t){return this.layout(r,e,"patchwork",t)},twopi(r,e="svg",t){return this.layout(r,e,"twopi",t)}};var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var f={exports:{}};\n/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.8+1e68dce6\n */function d(r){return void 0!==r.children}f.exports=function(){function r(r){var e=typeof r;return null!==r&&("object"===e||"function"===e)}function e(r){return"function"==typeof r}var t=Array.isArray?Array.isArray:function(r){return"[object Array]"===Object.prototype.toString.call(r)},n=0,o=void 0,i=void 0,a=function(r,e){g[n]=r,g[n+1]=e,2===(n+=2)&&(i?i(E):k())};function s(r){i=r}function u(r){a=r}var c="undefined"!=typeof window?window:void 0,f=c||{},d=f.MutationObserver||f.WebKitMutationObserver,p="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function m(){return function(){return process.nextTick(E)}}function v(){return void 0!==o?function(){o(E)}:_()}function w(){var r=0,e=new d(E),t=document.createTextNode("");return e.observe(t,{characterData:!0}),function(){t.data=r=++r%2}}function y(){var r=new MessageChannel;return r.port1.onmessage=E,function(){return r.port2.postMessage(0)}}function _(){var r=setTimeout;return function(){return r(E,1)}}var g=new Array(1e3);function E(){for(var r=0;r<n;r+=2)(0,g[r])(g[r+1]),g[r]=void 0,g[r+1]=void 0;n=0}function b(){try{var r=Function("return this")().require("vertx");return o=r.runOnLoop||r.runOnContext,v()}catch(r){return _()}}var k=void 0;function S(r,e){var t=this,n=new this.constructor(F);void 0===n[A]&&X(n);var o=t._state;if(o){var i=arguments[o-1];a((function(){return H(o,n,i,t._result)}))}else G(t,n,r,e);return n}function D(r){var e=this;if(r&&"object"==typeof r&&r.constructor===e)return r;var t=new e(F);return O(t,r),t}k=p?m():d?w():h?y():void 0===c?b():_();var A=Math.random().toString(36).substring(2);function F(){}var M=void 0,P=1,x=2;function j(){return new TypeError("You cannot resolve a promise with itself")}function z(){return new TypeError("A promises callback cannot return that same promise.")}function T(r,e,t,n){try{r.call(e,t,n)}catch(r){return r}}function R(r,e,t){a((function(r){var n=!1,o=T(t,e,(function(t){n||(n=!0,e!==t?O(r,t):L(r,t))}),(function(e){n||(n=!0,I(r,e))}),"Settle: "+(r._label||" unknown promise"));!n&&o&&(n=!0,I(r,o))}),r)}function B(r,e){e._state===P?L(r,e._result):e._state===x?I(r,e._result):G(e,void 0,(function(e){return O(r,e)}),(function(e){return I(r,e)}))}function N(r,t,n){t.constructor===r.constructor&&n===S&&t.constructor.resolve===D?B(r,t):void 0===n?L(r,t):e(n)?R(r,t,n):L(r,t)}function O(e,t){if(e===t)I(e,j());else if(r(t)){var n=void 0;try{n=t.then}catch(r){return void I(e,r)}N(e,t,n)}else L(e,t)}function C(r){r._onerror&&r._onerror(r._result),U(r)}function L(r,e){r._state===M&&(r._result=e,r._state=P,0!==r._subscribers.length&&a(U,r))}function I(r,e){r._state===M&&(r._state=x,r._result=e,a(C,r))}function G(r,e,t,n){var o=r._subscribers,i=o.length;r._onerror=null,o[i]=e,o[i+P]=t,o[i+x]=n,0===i&&r._state&&a(U,r)}function U(r){var e=r._subscribers,t=r._state;if(0!==e.length){for(var n=void 0,o=void 0,i=r._result,a=0;a<e.length;a+=3)n=e[a],o=e[a+t],n?H(t,n,o,i):o(i);r._subscribers.length=0}}function H(r,t,n,o){var i=e(n),a=void 0,s=void 0,u=!0;if(i){try{a=n(o)}catch(r){u=!1,s=r}if(t===a)return void I(t,z())}else a=o;t._state!==M||(i&&u?O(t,a):!1===u?I(t,s):r===P?L(t,a):r===x&&I(t,a))}function q(r,e){try{e((function(e){O(r,e)}),(function(e){I(r,e)}))}catch(e){I(r,e)}}var V=0;function W(){return V++}function X(r){r[A]=V++,r._state=void 0,r._result=void 0,r._subscribers=[]}function Y(){return new Error("Array Methods must be provided an Array")}var $=function(){function r(r,e){this._instanceConstructor=r,this.promise=new r(F),this.promise[A]||X(this.promise),t(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?L(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&L(this.promise,this._result))):I(this.promise,Y())}return r.prototype._enumerate=function(r){for(var e=0;this._state===M&&e<r.length;e++)this._eachEntry(r[e],e)},r.prototype._eachEntry=function(r,e){var t=this._instanceConstructor,n=t.resolve;if(n===D){var o=void 0,i=void 0,a=!1;try{o=r.then}catch(r){a=!0,i=r}if(o===S&&r._state!==M)this._settledAt(r._state,e,r._result);else if("function"!=typeof o)this._remaining--,this._result[e]=r;else if(t===er){var s=new t(F);a?I(s,i):N(s,r,o),this._willSettleAt(s,e)}else this._willSettleAt(new t((function(e){return e(r)})),e)}else this._willSettleAt(n(r),e)},r.prototype._settledAt=function(r,e,t){var n=this.promise;n._state===M&&(this._remaining--,r===x?I(n,t):this._result[e]=t),0===this._remaining&&L(n,this._result)},r.prototype._willSettleAt=function(r,e){var t=this;G(r,void 0,(function(r){return t._settledAt(P,e,r)}),(function(r){return t._settledAt(x,e,r)}))},r}();function K(r){return new $(this,r).promise}function J(r){var e=this;return t(r)?new e((function(t,n){for(var o=r.length,i=0;i<o;i++)e.resolve(r[i]).then(t,n)})):new e((function(r,e){return e(new TypeError("You must pass an array to race."))}))}function Q(r){var e=new this(F);return I(e,r),e}function Z(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function rr(){throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.")}var er=function(){function r(e){this[A]=W(),this._result=this._state=void 0,this._subscribers=[],F!==e&&("function"!=typeof e&&Z(),this instanceof r?q(this,e):rr())}return r.prototype.catch=function(r){return this.then(null,r)},r.prototype.finally=function(r){var t=this,n=t.constructor;return e(r)?t.then((function(e){return n.resolve(r()).then((function(){return e}))}),(function(e){return n.resolve(r()).then((function(){throw e}))})):t.then(r,r)},r}();function tr(){var r=void 0;if(void 0!==l)r=l;else if("undefined"!=typeof self)r=self;else try{r=Function("return this")()}catch(r){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=r.Promise;if(e){var t=null;try{t=Object.prototype.toString.call(e.resolve())}catch(r){}if("[object Promise]"===t&&!e.cast)return}r.Promise=er}return er.prototype.then=S,er.all=K,er.race=J,er.resolve=D,er.reject=Q,er._setScheduler=s,er._setAsap=u,er._asap=a,er.polyfill=tr,er.Promise=er,er}(),f.exports.polyfill();var p=function(r){var e=[];return r.children.forEach((function(r){d(r)?e.push(p(r)):e.push(h(r))})),"subgraph cluster_".concat(r.id,\' {\\nid="\').concat(r.id,\'";\\nlabel="\').concat(r.text,\'";\\nmargin=16;\\n\').concat(e.join("\\n"),"\\n}")},h=function(r){return"".concat(r.id,\' [id="\').concat(r.id,\'" label="\').concat(r.text,\'" width=\').concat(w(r.width)," height=").concat(w(r.height),"]")},m=function(r){return 96*r/72},v=function(r){return 96*r},w=function(r){return r/96};function y(r){var e=r?r.split(",").map((function(r){return m(+r)})):[0,0,0,0],t=e[0],n=e[1],o=e[2]-t,i=e[3]-n;return{x:t-o/2,y:n-i/2,width:o,height:i}}function _(r,e){var t=r.split(",").map((function(r){return m(+r)})),n=t[0],o=t[1];return{x:-n+e.width,y:-o+e.height}}function g(r,e,t,n){return c[r]&&c[r](e,t,{wasmFolder:n.wasmFolder}).then((function(r){return"json"===t?JSON.parse(r):r}))}function E(e,t){if(e.raw)return g(t.engine,e.raw,"svg",t);var n={},o=[],i=[],a={},s=[],u=[],c={},l=[],f=[];function m(r,e){d(r)?(n[r.id]=r,o.push(r),r.children.forEach((function(r){return m(r,!1)})),e&&i.push(p(r))):(a[r.id]=r,s.push(r),e&&u.push(h(r)))}return e.items.forEach((function(r){return m(r,!0)})),e.links.forEach((function(r){var e,t,n,o;c[r.id]=r,l.push(r),f.push((e=r.source.id,t=r.target.id,n=r.id,o=r.text,"".concat(e," -> ").concat(t,\' [id="\').concat(n,\'", label="\').concat(o,\'"]\')))})),g(t.engine,"digraph G {\\n graph [fontname=Verdana,fontsize=11.0];\\n graph [rankdir=TB];\\n node [shape=rect,fontname=Verdana,fontsize=11.0,fixedsize=true];\\n edge [fontname=Verdana,fontsize=11.0];\\n\\n".concat(i.join("\\n"),"\\n\\n").concat(f.join("\\n"),"\\n\\n").concat(u.join("\\n"),"\\n}"),"json",t).then((function(e){var t=y(e.bb);return e.objects&&e.objects.forEach((function(r){if(r.nodes){var e=function(r,e){var t=y(r);return{x:-t.x+e.width,y:-t.y+e.height,width:t.width,height:t.height}}(r.bb,t),o=n[r.id];o.x=e.x-t.width/2,o.y=e.y-t.height/2,o.width=e.width,o.height=e.height}else{var i=(u=r.pos,c=r.width,l=r.height,f=_(u,t),d=v(+c),p=v(+l),{x:f.x,y:f.y,width:d,height:p}),s=a[r.id];s&&(s.x=i.x-t.width/2,s.y=i.y-t.height/2)}var u,c,l,f,d,p})),e.edges&&e.edges.forEach((function(e){var n=c[e.id];n&&(n.points=function(e,t){if(e.pos){var n=e.pos.substr(2).split(" ").map((function(r){return _(r,t)})).map((function(r){return[r.x-t.width/2,r.y-t.height/2]})),o=n.shift();return r(r([],n,!0),[o],!1)}return[]}(e,t))})),{clusters:o,nodes:s,links:l}}))}self.onmessage=function(r){E.apply(void 0,r.data).then((function(r){self.postMessage(r)}))}}();'],{type:"application/javascript"}),n=URL.createObjectURL(r),o=new Worker(n);return{terminate:function(){return o.terminate()},response:new Promise((function(r){o.onmessage=function(e){r(e.data),o.terminate(),URL.revokeObjectURL(n)},o.postMessage([e,t])}))}}var sm=E().x((function(e){return e[0]})).y((function(e){return e[1]})).curve(I),um=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o._engine=r,o._wasmFolder=n,o}return s(t,e),t.prototype.start=function(){var t=this;e.prototype.start.call(this);var r=this._graph.size(),n=this._graph.graphData(),o={};return am({items:n.hierarchy((function(e,t,r){switch(e){case"subgraph":return{id:t.id,text:t.props.text,children:r};case"vertex":delete t.fx,delete t.fy;var n=t.element.node().getBBox(),i={id:t.id,text:t.props.text,width:n.width,height:n.height};return o[i.id]=i,i}})),links:n.allEdges().map((function(e){return{id:String(e.props.id),source:o[e.source.id],target:o[e.target.id],text:e.props.label||""}})),raw:""},{engine:this._engine,wasmFolder:this._wasmFolder}).response.then((function(e){return t.running()&&(e.clusters.forEach((function(e){var t=n.subgraph(e.id);t.x=e.x+r.width/2-e.width,t.y=e.y+r.height/2-e.height,t.props.width=e.width,t.props.height=e.height})),e.nodes.forEach((function(e){var t=n.vertex(e.id);t.x=e.x+r.width/2,t.y=e.y+r.height/2})),e.links.forEach((function(e){var t=n.edge(e.id);t.points=l(l([[t.source.x,t.source.y]],void 0!==e.points?e.points.map((function(e){return[e[0]+r.width/2,e[1]+r.height/2]})):[],!0),[[t.target.x,t.target.y]],!1)})),t._graph.moveSubgraphs(!0).moveVertices(!0).moveEdges(!0),t.stop()),t}))},t.prototype.edgePath=function(t,r){var n=this,o=[],i=!1;return t.points&&(o=t.points.map((function(e){var t=n._graph.project(e[0],!1),r=n._graph.project(e[1],!1);return(isNaN(t)||isNaN(r))&&(i=!0),[t,r]}))),i||o.length<2?e.prototype.edgePath.call(this,t,r):{path:sm(o),labelPos:this.center(o)}},t}($_),cm=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){return t.stop(),t}))},t}($_);function hm(e,t){return e.parent===t.parent?1:2}function lm(e,t){return e+t.x}function fm(e,t){return Math.max(e,t.y)}function dm(){var e=hm,t=1,r=1,n=!1;function o(o){var i,a=0;o.eachAfter((function(t){var r=t.children;r?(t.x=function(e){return e.reduce(lm,0)/e.length}(r),t.y=function(e){return 1+e.reduce(fm,0)}(r)):(t.x=i?a+=e(t,i):0,t.y=0,i=t)}));var s=function(e){for(var t;t=e.children;)e=t[0];return e}(o),u=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(o),c=s.x-e(s,u)/2,h=u.x+e(u,s)/2;return o.eachAfter(n?function(e){e.x=(e.x-o.x)*t,e.y=(o.y-e.y)*r}:function(e){e.x=(e.x-c)/(h-c)*t,e.y=(1-(o.y?e.y/o.y:1))*r})}return o.separation=function(t){return arguments.length?(e=t,o):e},o.size=function(e){return arguments.length?(n=!1,t=+e[0],r=+e[1],o):n?null:[t,r]},o.nodeSize=function(e){return arguments.length?(n=!0,t=+e[0],r=+e[1],o):n?[t,r]:null},o}function pm(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;--n>=0;)t+=r[n].value;else t=1;e.value=t}function gm(e,t){var r,n,o,i,a,s=new mm(e),u=+e.value&&(s.value=e.value),c=[s];for(null==t&&(t=vm);r=c.pop();)if(u&&(r.value=+r.data.value),(o=t(r.data))&&(a=o.length))for(r.children=new Array(a),i=a-1;i>=0;--i)c.push(n=r.children[i]=new mm(o[i])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(_m)}function vm(e){return e.children}function ym(e){e.data=e.data.data}function _m(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function mm(e){this.data=e,this.depth=this.height=0,this.parent=null}function bm(e,t){return e.parent===t.parent?1:2}function xm(e){var t=e.children;return t?t[0]:e.t}function wm(e){var t=e.children;return t?t[t.length-1]:e.t}function Em(e,t,r){var n=r/(t.i-e.i);t.c-=n,t.s+=r,e.c+=n,t.z+=r,t.m+=r}function km(e,t,r){return e.a.parent===t.parent?e.a:r}function Sm(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function Dm(){var e=bm,t=1,r=1,n=null;function o(o){var u=function(e){for(var t,r,n,o,i,a=new Sm(e,0),s=[a];t=s.pop();)if(n=t._.children)for(t.children=new Array(i=n.length),o=i-1;o>=0;--o)s.push(r=t.children[o]=new Sm(n[o],o)),r.parent=t;return(a.parent=new Sm(null,0)).children=[a],a}(o);if(u.eachAfter(i),u.parent.m=-u.z,u.eachBefore(a),n)o.eachBefore(s);else{var c=o,h=o,l=o;o.eachBefore((function(e){e.x<c.x&&(c=e),e.x>h.x&&(h=e),e.depth>l.depth&&(l=e)}));var f=c===h?1:e(c,h)/2,d=f-c.x,p=t/(h.x+f+d),g=r/(l.depth||1);o.eachBefore((function(e){e.x=(e.x+d)*p,e.y=e.depth*g}))}return o}function i(t){var r=t.children,n=t.parent.children,o=t.i?n[t.i-1]:null;if(r){!function(e){for(var t,r=0,n=0,o=e.children,i=o.length;--i>=0;)(t=o[i]).z+=r,t.m+=r,r+=t.s+(n+=t.c)}(t);var i=(r[0].z+r[r.length-1].z)/2;o?(t.z=o.z+e(t._,o._),t.m=t.z-i):t.z=i}else o&&(t.z=o.z+e(t._,o._));t.parent.A=function(t,r,n){if(r){for(var o,i=t,a=t,s=r,u=i.parent.children[0],c=i.m,h=a.m,l=s.m,f=u.m;s=wm(s),i=xm(i),s&&i;)u=xm(u),(a=wm(a)).a=t,(o=s.z+l-i.z-c+e(s._,i._))>0&&(Em(km(s,t,n),t,o),c+=o,h+=o),l+=s.m,c+=i.m,f+=u.m,h+=a.m;s&&!wm(a)&&(a.t=s,a.m+=l-h),i&&!xm(u)&&(u.t=i,u.m+=c-f,n=t)}return n}(t,o,t.parent.A||n[0])}function a(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=t,e.y=e.depth*r}return o.separation=function(t){return arguments.length?(e=t,o):e},o.size=function(e){return arguments.length?(n=!1,t=+e[0],r=+e[1],o):n?null:[t,r]},o.nodeSize=function(e){return arguments.length?(n=!0,t=+e[0],r=+e[1],o):n?[t,r]:null},o}!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=t._graph.size(),r=t._graph.graphData();return r.allEdges().forEach((function(e){return delete e.points})),r.allVertices().forEach((function(t){delete t.fx,delete t.fy,t.x=e.width/2+5*Math.random()-2.5,t.y=e.height/2+5*Math.random()-2.5})),t._graph.moveVertices(!0).moveEdges(!0),t.stop(),t}))}}($_),mm.prototype=gm.prototype={constructor:mm,count:function(){return this.eachAfter(pm)},each:function(e){var t,r,n,o,i=this,a=[i];do{for(t=a.reverse(),a=[];i=t.pop();)if(e(i),r=i.children)for(n=0,o=r.length;n<o;++n)a.push(r[n])}while(a.length);return this},eachAfter:function(e){for(var t,r,n,o=this,i=[o],a=[];o=i.pop();)if(a.push(o),t=o.children)for(r=0,n=t.length;r<n;++r)i.push(t[r]);for(;o=a.pop();)e(o);return this},eachBefore:function(e){for(var t,r,n=this,o=[n];n=o.pop();)if(e(n),t=n.children)for(r=t.length-1;r>=0;--r)o.push(t[r]);return this},sum:function(e){return this.eachAfter((function(t){for(var r=+e(t.data)||0,n=t.children,o=n&&n.length;--o>=0;)r+=n[o].value;t.value=r}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),o=null;e=r.pop(),t=n.pop();for(;e===t;)o=e,e=r.pop(),t=n.pop();return o}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var o=n.length;e!==r;)n.splice(o,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(r){r!==e&&t.push({source:r.parent,target:r})})),t},copy:function(){return gm(this).eachBefore(ym)}},Sm.prototype=Object.create(mm.prototype);var jm,Cm,Am,Om=C().x((function(e){return e.x})).y((function(e){return e.y})),Im=function(){function e(e,t,r,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=e),void 0===n&&(n=t),this.x1=e,this.y1=t,this.x2=r,this.y2=n}return Object.defineProperty(e.prototype,"x",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.x2-this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.y2-this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"center",{get:function(){return{x:this.x1+this.width/2,y:this.y1+this.height/2}},enumerable:!1,configurable:!0}),e.prototype.reset=function(e,t){this.x1=e,this.x2=e,this.y1=t,this.y2=t},e.prototype.expand=function(e,t){this.x1>e?this.x1=e:this.x2<e&&(this.x2=e),this.y1>t?this.y1=t:this.y2<t&&(this.y2=t)},e}(),Pm=function(e){function t(t,r){var n=e.call(this,t)||this;return n.options=r,n._visited={},n}return s(t,e),t.prototype.sortTree=function(e,t){var r=this;t||(t=this._tree),t.children.sort((function(t,r){return e.neighbors(r.origData.id).length-e.neighbors(t.origData.id).length}));var n=[];t.children.forEach((function(e,t){t%2==0?n.push(e):n.unshift(e)})),t.children=n,t.children.forEach((function(t){return r.sortTree(e,t)}))},t.prototype.depthFirst=function(e,t,r){var n=this;if(void 0===r&&(this._visited={},this._tree=void 0),!this._visited[t.id]){this._visited[t.id]=t;var o={origData:t,children:[]};void 0===r?this._tree=o:r.children.push(o),e.neighbors(t.id).forEach((function(t){return n.depthFirst(e,t,o)}))}},t.prototype.breadthFirst=function(e,t){var r=this;this._visited={},this._visited[t.id]=t,this._tree={origData:t,children:[]};var n=[];n.push(this._tree);for(var o=function(){var t=n.shift();e.neighbors(t.origData.id).forEach((function(e){if(!r._visited[e.id]){r._visited[e.id]=e;var o={origData:e,children:[]};t.children.push(o),n.push(o)}}))};n.length;)o();this.sortTree(e)},t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){for(var e,r=t._graph.graphData(),n=0,o=r.allVertices();n<o.length;n++){var i=o[n];if(delete i.fx,delete i.fy,void 0===e&&(e=i),i.props.centroid){e=i;break}}return r.allEdges().forEach((function(e){return delete e.points})),t.breadthFirst(r,e),t._d3Hierarchy=gm(t._tree),t}))},t.prototype.finalize=function(e){var t=this._graph.size(),r=new Im;e.forEach((function(e,t){0===t?r.reset(e.origData.x,e.origData.y):r.expand(e.origData.x,e.origData.y)}));var n=t.width/2-r.center.x,o=t.height/2-r.center.y;e.forEach((function(e){e.origData.x+=n,e.origData.y+=o})),this._graph.moveVertices(!0).moveEdges(!0),this.stop()},t}($_),Fm=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.options=r,n}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=Dm().nodeSize(["TB"===t.options.rankdir?200:100,"TB"===t.options.rankdir?100:200])(t._d3Hierarchy).descendants().map((function(e){return e.data.origData.x="TB"===t.options.rankdir?e.x:e.y,e.data.origData.y="TB"===t.options.rankdir?e.y:e.x,e.data}));return t.finalize(e),t}))},t.prototype.edgePath=function(e,t){var r=this._graph.projectPlacholder(e.source),n=this._graph.projectPlacholder(e.target);return{path:Om({source:r,target:n}),labelPos:this.center([[r.x,r.y],[n.x,n.y]])}},t}(Pm),Mm=function(e){function t(t){return e.call(this,t,{})||this}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=Dm().size([2*Math.PI,512]).separation((function(e,t){return(e.parent==t.parent?1:2)/e.depth}))(t._d3Hierarchy).descendants().map((function(e){return e.data.origData.angle=e.x,e.data.origData.radius=e.y,e.data.origData.x=Math.sin(e.x)*e.y,e.data.origData.y=Math.cos(e.x)*e.y,e.data}));return t.finalize(e),t}))},t}(Pm),Tm=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.options=r,n}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=dm().nodeSize(["TB"===t.options.rankdir?200:100,"TB"===t.options.rankdir?100:200])(t._d3Hierarchy).descendants().map((function(e){return e.data.origData.x="TB"===t.options.rankdir?e.x:e.y,e.data.origData.y="TB"===t.options.rankdir?e.y:e.x,e.data}));return t.finalize(e),t}))},t.prototype.edgePath=function(e,t){var r=this._graph.projectPlacholder(e.source),n=this._graph.projectPlacholder(e.target);return{path:Om({source:r,target:n}),labelPos:this.center([[r.x,r.y],[n.x,n.y]])}},t}(Pm),Nm=function(e){function t(t){return e.call(this,t,{})||this}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=dm().size([2*Math.PI,512]).separation((function(e,t){return(e.parent==t.parent?1:2)/e.depth}))(t._d3Hierarchy).descendants().map((function(e){return e.data.origData.x=Math.sin(e.x)*e.y,e.data.origData.y=Math.cos(e.x)*e.y,e.data}));return t.finalize(e),t}))},t}(Pm);L(".graph_Graph2 .allowDragging .graphVertex,.graph_Graph2 .graphVertex{cursor:pointer}.graph_Graph2 .allowDragging .graphVertex.grabbed{cursor:grabbing}.graph_Graph2 .graphEdge{stroke:#a9a9a9;fill:none}.graph_Graph2 .graphEdge>text{stroke:none;fill:#000}.graph_Graph2 .graphEdge.hide-text>text{display:none}.graph_Graph2 g.selected circle,.graph_Graph2 g.selected rect{stroke:red!important}");var Lm=null!==(Am=null===(Cm=null===(jm=null===globalThis||void 0===globalThis?void 0:globalThis.document)||void 0===jm?void 0:jm.currentScript)||void 0===Cm?void 0:Cm.src)&&void 0!==Am?Am:"./dummy.js";Lm=Lm.substring(0,Lm.replace(/[?#].*/,"").lastIndexOf("/")+1);function Bm(e){e.fx=e.sx=e.x,e.fy=e.sy=e.y}function Rm(e,t){e.fx=e.sx+t.fx-t.sx,e.fy=e.sy+t.fy-t.sy}function Vm(e){e.x=e.fx,e.y=e.fy,e.fx=e.sx=void 0,e.fy=e.sy=void 0}var zm=function(e){function n(n,o,a){var s=e.call(this)||this;s._toggleHierarchy=(new t.ToggleButton).faChar("fa-sitemap").tooltip("Hierarchy").on("click",(function(){return s.layoutClick("Hierarchy")})),s._toggleForceDirected=(new t.ToggleButton).faChar("fa-expand").tooltip("Force Directed").on("click",(function(){return s.layoutClick("ForceDirected")})),s._toggleForceDirected2=(new t.ToggleButton).faChar("fa-arrows").tooltip("Spring").on("click",(function(){return s.layoutClick("ForceDirected2")})),s._toggleCircle=(new t.ToggleButton).faChar("fa-circle-o").tooltip("Circle").on("click",(function(){return s.layoutClick("Circle")})),s._toggleDot=(new t.ToggleButton).faChar("fa-angle-double-down").tooltip("DOT").on("click",(function(){return s.layoutClick("DOT")})),s._toggleNeato=(new t.ToggleButton).faChar("fa-sun-o").tooltip("Neato").on("click",(function(){return s.layoutClick("Neato")})),s._toggleFDP=(new t.ToggleButton).faChar("fa-asterisk").tooltip("FDP").on("click",(function(){return s.layoutClick("FDP")})),s._toggleTwoPI=(new t.ToggleButton).faChar("fa-bullseye").tooltip("TwoPI").on("click",(function(){return s.layoutClick("TwoPI")})),s._toggleCirco=(new t.ToggleButton).faChar("fa-cogs").tooltip("Circo").on("click",(function(){return s.layoutClick("Circo")})),s._toggleT=(new t.ToggleButton).faChar("fa-sitemap fa-rotate-270").tooltip("Tree").on("click",(function(){return s.layoutClick("Tree")})),s._toggleRT=(new t.ToggleButton).faChar("fa-sun-o").tooltip("Radial Tree").on("click",(function(){return s.layoutClick("RadialTree")})),s._toggleD=(new t.ToggleButton).faChar("fa-sitemap fa-rotate-270").tooltip("Dendrogram").on("click",(function(){return s.layoutClick("Dendrogram")})),s._toggleRD=(new t.ToggleButton).faChar("fa-asterisk").tooltip("Radial Dendrogram").on("click",(function(){return s.layoutClick("RadialDendrogram")})),s._graphData=(new r.Graph2).idFunc((function(e){return e.id})).sourceFunc((function(e){return e.source.id})).targetFunc((function(e){return e.target.id})).updateFunc((function(e,t){return e.props=t.props,e})),s._prevDoClickTime=0,s._tooltip=new i.HTMLTooltip,s._selection=new t.Utility.Selection(s),s._dragHandler=t.drag(),s._catPalette=t.Palette.ordinal("hpcc10"),s._categories=[],s._annotations=[],s._origData={subgraphs:[],vertices:[],edges:[],hierarchy:[]},s._layoutAlgo=new cm(s),s.highlight={zoom:1.1,opacity:.33,edge:"1.25px"},s._transformScale=1,s._subgraphRenderer=n,s._vertexRenderer=o,s._edgeRenderer=a;var u=s;s._drawStartPos="origin";var c=[s._toggleHierarchy,s._toggleForceDirected,s._toggleForceDirected2,s._toggleCircle,new t.Spacer,s._toggleDot,s._toggleNeato,s._toggleFDP,s._toggleTwoPI,s._toggleCirco,new t.Spacer,s._toggleT,s._toggleRT,s._toggleD,s._toggleRD,new t.Spacer];return s._iconBar.buttons(c.concat(s._iconBar.buttons())),s._dragHandler.on("start",(function(e){if(u.allowDragging()){t.select(this).classed("grabbed",!0),Bm(e),t.Utility.safeRaise(this),u.moveVertexPlaceholder(e,!1,!0);var r=u.selection();u.selected(e.props,r)?r.filter((function(t){return t.id!==e.props.id})).forEach((function(e){Bm(u._graphData.vertex(e.id))})):u.dragSingleNeighbors()&&u._graphData.singleNeighbors(e.id).forEach((function(e){Bm(e)}))}})).on("drag",(function(e){if(u.allowDragging()){e.fx=e.sx+u.rproject(t.d3Event().x-e.sx),e.fy=e.sy+u.rproject(t.d3Event().y-e.sy),u._graphData.vertexEdges(e.id).forEach((function(e){return delete e.points})),u.moveVertexPlaceholder(e,!1,!0);var r=u.selection();u.selected(e.props,r)?r.filter((function(t){return t.id!==e.props.id})).forEach((function(t){var r=u._graphData.vertex(t.id);Rm(r,e),u.moveVertexPlaceholder(r,!1,!0)})):u.dragSingleNeighbors()&&u._graphData.singleNeighbors(e.id).forEach((function(t){Rm(t,e),u.moveVertexPlaceholder(t,!1,!0)}))}})).on("end",(function(e){var r=!0;if(u.allowDragging()){r=Math.abs(e.sx-e.fx)<1&&Math.abs(e.sy-e.fy)<1,Vm(e);var n=u.selection();u.selected(e.props,n)?n.filter((function(t){return t.id!==e.props.id})).forEach((function(e){Vm(u._graphData.vertex(e.id))})):u.dragSingleNeighbors()&&u._graphData.singleNeighbors(e.id).forEach(Vm),t.select(this).classed("grabbed",!1)}if(r){u._selection.click({_id:String(e.id),element:function(){return e.element}},t.d3Event().sourceEvent),u.selectionChanged();var o=e.element.classed("selected"),i=u.resolveEventOrigin();u.vertex_click(e.props.origData||e.props,"",o,i);var a=Date.now();a-u._prevDoClickTime<u.doubleClickMaxDelay()&&u.vertex_dblclick(e.props.origData||e.props,"",o,i),u._prevDoClickTime=a}})).filter((function(){return!0})),s}return s(n,e),n.prototype.resolveEventOrigin=function(){var e,r,n=t.d3Event(),o=(null!==(r=null===(e=null==n?void 0:n.sourceEvent)||void 0===e?void 0:e.path)&&void 0!==r?r:null==n?void 0:n.path).find((function(e){return(null==e?void 0:e.hasAttribute)&&(null==e?void 0:e.hasAttribute("data-click"))})),i=o?o.getAttribute("data-click"):"",a=o?o.getAttribute("data-click-data"):"",s=void 0;if(a)try{s=JSON.parse(a)}catch(e){console.warn("Unexpected annotation data:",a)}return{origin:i,data:s}},n.prototype.iconBarButtons=function(){return this._iconBar.buttons()},n.prototype.categories=function(e){return void 0===e?this._categories:(this._categories=e,this)},n.prototype.annotations=function(e){return void 0===e?this._annotations:(this._annotations=e,this)},n.prototype.data=function(e,t){var r=this;return void 0===e?this._origData:(this._origData=e,this._graphData.mergeSubgraphs((e.subgraphs||[]).map((function(e){return{id:e.id,props:e}}))),this._graphData.mergeVertices((e.vertices||[]).map((function(e){return{id:e.id,centroid:e.centroid,props:e}}))),this._graphData.mergeEdges((e.edges||[]).filter((function(e){return r._graphData.vertexExists(e.source.id)&&r._graphData.vertexExists(e.target.id)})).map((function(e){return{id:e.id,props:e,source:r._graphData.vertex(e.source.id),target:r._graphData.vertex(e.target.id)}}))),this._graphData.clearParents(),(e.hierarchy?e.hierarchy:[]).forEach((function(e){r._graphData.subgraphExists(e.child.id)?r._graphData.subgraphParent(e.child.id,e.parent.id):r._graphData.vertexExists(e.child.id)&&r._graphData.vertexParent(e.child.id,e.parent.id)})),this)},n.prototype.selected=function(e,t){return(t||this.selection()).some((function(t){return t.id===e.id}))},n.prototype.selection=function(e){var t=this;return arguments.length?(this._selection.set(e.map((function(e){var r=t._graphData.item(e.id);return{_id:String(r.id),element:function(){return r.element}}}))),this):this._selection.get().map((function(e){return t._graphData.item(e._id).props}))},n.prototype.graphData=function(){return this._graphData},n.prototype.resetLayout=function(){return delete this._prevLayout,this},n.prototype.layoutRunning=function(){return this._layoutAlgo&&this._layoutAlgo.running()},n.prototype.layoutAlgo=function(e){var t=this;return this._layoutAlgo&&this._layoutAlgo.stop(),this._layoutAlgo=e,this._layoutAlgo.start().then((function(){t.updateIconBar(),t.applyScaleOnLayout()&&setTimeout((function(){t.zoomToFit(t.transitionDuration())}),t.transitionDuration())}))},n.prototype.layoutClick=function(e){this.layoutRunning()?(this._layoutAlgo.stop(),this.updateIconBar()):(delete this._prevLayout,this.layout(e).render())},n.prototype.updateIconBarItem=function(e,t){var r=this.layout(),n=this._layoutAlgo&&this._layoutAlgo.running();e.enabled(!n||r===t).selected(n&&r===t).render()},n.prototype.updateIconBar=function(){e.prototype.updateIconBar.call(this),this.updateIconBarItem(this._toggleHierarchy,"Hierarchy"),this.updateIconBarItem(this._toggleDot,"DOT"),this.updateIconBarItem(this._toggleForceDirected,"ForceDirected"),this.updateIconBarItem(this._toggleNeato,"Neato"),this.updateIconBarItem(this._toggleFDP,"FDP"),this.updateIconBarItem(this._toggleForceDirected2,"ForceDirected2"),this.updateIconBarItem(this._toggleCircle,"Circle"),this.updateIconBarItem(this._toggleTwoPI,"TwoPI"),this.updateIconBarItem(this._toggleCirco,"Circo"),this.updateIconBarItem(this._toggleT,"Tree"),this.updateIconBarItem(this._toggleRT,"RadialTree"),this.updateIconBarItem(this._toggleD,"Dendrogram"),this.updateIconBarItem(this._toggleRD,"RadialDendrogram")},n.prototype.getNeighborMap=function(e){var t={},r={};if(e)for(var n=this._graphData.vertexEdges(e.id),o=0;o<n.length;++o){var i=this._graphData.edge(n[o].id);r[i.id]=i,i.source.id!==e.id&&(t[i.source.id]=i.source),i.target.id!==e.id&&(t[i.target.id]=i.target)}return{vertices:t,edges:r}},n.prototype.centerOnItem=function(e){var t,r,n,o=this._graphData.item(e);if((this._graphData.isSubgraph(o)||this._graphData.isVertex(o))&&(r=o.x,n=o.y),this._graphData.isEdge(o)&&(r=(t=[0,0])[0],n=t[1]),void 0!==r&&void 0!==n){var i=o.element.node().getBBox();if(this._graphData.isVertex(o)){var a=this.projectPlacholder(o);r=a.x,n=a.y}else this._graphData.isSubgraph(o)&&(r=this.project(o.x),n=this.project(o.y));var s=i.x+i.width/2,u=i.y+i.height/2,c={x:r+s-i.width/2,y:n+u-i.height/2,width:i.width,height:i.height};this.centerOnBBox(c)}},n.prototype.hideVertex=function(e){var t=this._graphData.item(e);return this._graphData.isVertex(t)&&(t.props.hidden=!0),this},n.prototype.showVertex=function(e){var t=this._graphData.item(e);return this._graphData.isVertex(t)&&(t.props.hidden=!1),this},n.prototype.highlightVerticies=function(e){var t=this,r=this,n=this._vertexG.selectAll(".graphVertex"),o=!r.showVertexLabels()&&r.showVertexLabelsOnHighlight();return n.classed("graphVertex-highlighted",(function(t){return!e||e[t.id]})).style("filter",(function(r){return e&&e[r.id]?"url(#"+t.id()+"_glow)":null})).each((function(t){if(o){var n=r.calcProps(u({showLabel:!(!e||!e[t.id])},r.vertexMapper(t.props,t.props.origData)));r._vertexRenderer(n,this)}})).transition().duration(this.transitionDuration()).on("end",(function(t){e&&e[t.id]&&t.element.node()&&t.element.node().parentNode&&t.element.node().parentNode.appendChild(t.element.node())})).style("opacity",(function(t){return t.props.hidden?0:!e||e[t.id]?1:r.highlight.opacity})),this},n.prototype.highlightEdges=function(e){var t=this;return this._edgeG.selectAll(".graphEdge").classed("graphEdge-highlighted",(function(t){return!e||e[t.id]})).style("stroke-width",(function(r){return e&&e[r.id]?t.highlight.edge:t.edgeStrokeWidth()+"px"})).transition().duration(this.transitionDuration()).style("opacity",(function(r){return r.source.props.hidden||r.target.props.hidden?0:!e||e[r.id]?1:t.highlight.opacity})),this},n.prototype.highlightVertex=function(e,t){if(this.highlightOnMouseOverVertex())if(t){var r=this.getNeighborMap(t);r.vertices[t.id]=t,this.highlightVerticies(r.vertices),this.highlightEdges(r.edges)}else this.highlightVerticies(),this.highlightEdges()},n.prototype.highlightEdge=function(e,t){if(this.highlightOnMouseOverEdge())if(t){var r={};r[t.source.id]=t.source,r[t.target.id]=t.target;var n={};n[t.id]=t,this.highlightVerticies(r),this.highlightEdges(n)}else this.highlightVerticies(),this.highlightEdges()},n.prototype.moveSubgraphPlaceholder=function(e,t){var r=this,n=this.project(e.x),o=this.project(e.y),i=this.project(e.props.width,!0),a=this.project(e.props.height,!0);return e.element&&e.element.transition().duration(t?this.transitionDuration():0).attr("transform","translate(".concat(n," ").concat(o,")")).each((function(e){r._subgraphRenderer(u(u({},e.props),{width:i,height:a}),this)})),this},n.prototype.moveEdgePlaceholder=function(e,r){var n,o=u({},this._layoutAlgo.edgePath(e,this.edgeArcDepth())),i=this;if(this._edgeRenderer&&e.element){var a=null!==(n=e.previousEdgeLayout)&&void 0!==n?n:o;e.previousEdgeLayout=o;var s=function(e,t,r){var n=W_(e),o=W_(t),i="object"===F_(r)?r:{excludeSegment:r,snapEndsToInput:!0},a=i.excludeSegment,s=i.snapEndsToInput;if(!n.length&&!o.length)return function(){return""};var u=Y_(n,o,{excludeSegment:a,snapEndsToInput:s});return function(e){if(1===e&&s)return null==t?"":t;var r,n="",o=L_(u(e));try{for(o.s();!(r=o.n()).done;)n+=H_(r.value)}catch(e){o.e(e)}finally{o.f()}return n}}(a.path,o.path),c=t.interpolateNumberArray(a.labelPos,o.labelPos);e.element.transition().duration(r?this.transitionDuration():0).tween("some.path",(function(){return function(t){var r,n,a={path:s(t),labelPos:c(t),strokeWidth:null!==(r=e.props.strokeWidth)&&void 0!==r?r:i.edgeStrokeWidth(),color:null!==(n=e.props.color)&&void 0!==n?n:i.edgeColor()};i._edgeRenderer(u(u(u({},o),e.props),a),e.element.node())}}))}return this},n.prototype.moveVertexPlaceholder=function(e,t,r){var n=this,o=this.projectPlacholder(e),i=o.x,a=o.y;return e.element&&(t?e.element.transition().duration(this.transitionDuration()):e.element).attr("transform","translate(".concat(i," ").concat(a,")")),r&&this._graphData.vertexEdges(e.id).forEach((function(e){return n.moveEdgePlaceholder(e,t)})),this},n.prototype.moveSubgraphs=function(e){var t=this;return this._graphData.allSubgraphs().forEach((function(r){return t.moveSubgraphPlaceholder(r,e)})),this},n.prototype.moveEdges=function(e){var t=this;return this._graphData.allEdges().forEach((function(r){return t.moveEdgePlaceholder(r,e)})),this},n.prototype.moveVertices=function(e){var t=this;return this._graphData.allVertices().forEach((function(r){return t.moveVertexPlaceholder(r,e,!1)})),this},n.prototype.project=function(e,t){void 0===t&&(t=!1);e=void 0!==e?e:0;var r=this._transformScale;return t&&(this._transformScale>this.maxScale()+(this._transformScale-this.maxScale())/2?r=this.maxScale()+(this._transformScale-this.maxScale())/2:(this._transformScale,this.minScale(),this._transformScale,this.minScale())),Math.round(e*r*10)/10},n.prototype.rproject=function(e){return e=void 0!==e?e:0,Math.round(e/this._transformScale*10)/10},n.prototype.projectPlacholder=function(e){return{x:this.project(void 0!==e.fx?e.fx:e.x),y:this.project(void 0!==e.fy?e.fy:e.y)}},n.prototype.categoryID=function(e,t){return void 0===t&&(t="cat"),void 0===e||""===e?"":"".concat(t).concat(this.id(),"_").concat(e)},n.prototype.updateCategories=function(){var e=this;o.render(o.Icons,{icons:this._categories.map((function(t){return u(u({},t),{id:e.categoryID(t.id),fill:t.fill||"transparent",imageCharFill:t.imageCharFill||e._catPalette(t.id)})}))},this._svgDefsCat.node())},n.prototype.updateAnnotations=function(){var e=this;o.render(o.Icons,{icons:this._annotations.map((function(t){return u(u({},t),{id:e.categoryID(t.id,"ann"),shape:t.shape||"square",height:t.height||12,fill:t.fill||e._catPalette(t.id)})}))},this._svgDefsAnn.node())},n.prototype.edgeRenderer=function(e){return arguments.length?(this._edgeRenderer=e,this):this._edgeRenderer},n.prototype.updateEdges=function(){var e=this;return this._edgeG.selectAll(".graphEdge").data(this._graphData.allEdges(),(function(e){return e.id})).join((function(r){return r.append("g").attr("class","graphEdge").on("click.selectionBag",(function(r){e._selection.click({_id:String(r.id),element:function(){return r.element}},t.d3Event()),e.selectionChanged()})).on("click",(function(t){var r=t.element.classed("selected");e.edge_click(t.props.origData||t.props,"",r)})).on("mouseover",(function(r){t.Utility.safeRaise(this),e.edge_mouseover(t.select(this),r)})).on("mouseout",(function(r){e.edge_mouseout(t.select(this),r)})).each((function(r){r.element=t.select(this),e._edgeRenderer||(r.elementPath=r.element.append("path"),r.elementText=r.element.append("text").attr("text-anchor","middle"))}))}),(function(t){return t.attr("opacity",(function(e){return e.source.props.hidden||e.target.props.hidden?0:1})).classed("hide-text",!e.showEdgeLabels())}),(function(e){return e.each((function(e){delete e.element})).remove()})),this},n.prototype.vertexRenderer=function(e){return arguments.length?(this._vertexRenderer=e,this):this._vertexRenderer},n.prototype.vertexMapper=function(e,t){var r=this;return u(u({},e),{categoryID:this.categoryID(e.categoryID),annotationIDs:e.annotationIDs?e.annotationIDs.map((function(e){return r.categoryID(e,"ann")})):[]})},n.prototype.updateVertices=function(){var e=this,r=this;return this._vertexG.selectAll(".graphVertex").data(this._graphData.allVertices(),(function(e){return e.id})).join((function(n){return n.append("g").attr("class","graphVertex").on("dblclick",(function(e){t.d3Event().stopPropagation()})).on("mousein",(function(e){t.Utility.safeRaise(this),r.highlightVertex(t.select(this),e);var n=e.element.classed("selected"),o=r.resolveEventOrigin();r.vertex_mousein(e.props.origData||e.props,"",n,o)})).on("mouseover",(function(e){t.Utility.safeRaise(this),r.highlightVertex(t.select(this),e);var n=e.element.classed("selected");e.props.tooltip&&r._tooltip.tooltipHTML(r.tooltipHTML.bind(r)).triggerElement(e.element).tooltipWidth(r.tooltipWidth()).tooltipHeight(r.tooltipHeight()).enablePointerEvents(r.enableTooltipPointerEvents()).closeDelay(r.tooltipCloseDelay()).direction("n").data(e).visible(!0).render();var o=r.resolveEventOrigin();r.vertex_mouseover(e.props.origData||e.props,"",n,o)})).on("mouseout",(function(e){r.highlightVertex(null,null);var t=e.element.classed("selected"),n=r.resolveEventOrigin();r.vertex_mouseout(e.props.origData||e.props,"",t,n),e.props.tooltip&&r._tooltip.mouseout()})).call(e._dragHandler).each((function(e){e.element=t.select(this)}))}),(function(e){return e}),(function(e){return e.each((function(e){delete e.element})).remove()})).classed("centroid",(function(e){return e.props.centroid})).attr("opacity",(function(e){return e.props.hidden?0:1})).attr("filter",(function(t){return t.props.centroid?"url(#"+e.id()+"_glow)":null})).each((function(e){var t=r.calcProps(u({showLabel:r.showVertexLabels()},r.vertexMapper(e.props,e.props.origData)));r._vertexRenderer(t,this)})),this},n.prototype.calcProps=function(e){return u({},e)},n.prototype.hasSubgraphs=function(){switch(this.layout()){case"DOT":case"Hierarchy":return!0}return!1},n.prototype.subgraphRenderer=function(e){return arguments.length?(this._subgraphRenderer=e,this):this._subgraphRenderer},n.prototype.updateSubgraphs=function(){var e=this;return this._subgraphG.selectAll(".subgraphPlaceholder").data(this.hasSubgraphs()?this._graphData.allSubgraphs():[],(function(e){return e.id})).join((function(r){return r.append("g").attr("class","subgraphPlaceholder").on("click.selectionBag",(function(r){e._selection.click({_id:String(r.id),element:function(){return r.element}},t.d3Event()),e.selectionChanged()})).on("click",(function(t){var r=t.element.classed("selected");e.subgraph_click(t.props.origData||t.props,"",r)})).on("mouseover",(function(){t.Utility.safeRaise(this)})).each((function(e){e.element=t.select(this)}))}),(function(e){return e}),(function(e){return e.each((function(e){delete e.element})).transition().style("opacity",0).remove()})).each((function(t){e.moveSubgraphPlaceholder(t,!1)})),this},n.prototype.enter=function(r,n){var o=this;e.prototype.enter.call(this,r,n);var i=this.locateSVGNode(r);this._svgDefs=t.select(i).select("defs"),this._centroidFilter=new t.SVGGlowFilter(this._svgDefs,this._id+"_glow"),this._svgDefsCat=this._svgDefs.append("g"),this._svgDefsAnn=this._svgDefs.append("g"),this._subgraphG=this._renderElement.append("g"),this._edgeG=this._renderElement.append("g"),this._vertexG=this._renderElement.append("g"),this._tooltip.target(r),this.on("startMarqueeSelection",(function(){})).on("updateMarqueeSelection",(function(e){var t=o._graphData.allVertices().filter((function(t){return t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height}));o.selection(t.map((function(e){return e.props})))})).on("endMarqueeSelection",(function(){o.selectionChanged()}))},n.prototype.forceDirectedOptions=function(){return{alpha:this.forceDirectedAlpha(),alphaMin:this.forceDirectedAlphaMin(),alphaDecay:this.forceDirectedAlphaDecay(),velocityDecay:this.forceDirectedVelocityDecay(),repulsionStrength:this.forceDirectedRepulsionStrength(),iterations:this.forceDirectedIterations(),linkDistance:this.forceDirectedLinkDistance(),linkStrength:this.forceDirectedLinkStrength(),pinCentroid:this.forceDirectedPinCentroid(),forceStrength:this.forceDirectedForceStrength(),distanceMin:this.forceDirectedMinDistance(),distanceMax:this.forceDirectedMaxDistance()}},n.prototype.layoutOptions=function(e){switch(e){case"ForceDirected":case"ForceDirected2":case"ForceDirectedHybrid":return this.forceDirectedOptions();case"Hierarchy":return{rankdir:this.hierarchyRankDirection(),nodesep:this.hierarchyNodeSeparation(),edgesep:this.hierarchyEdgeSeparation(),ranksep:this.hierarchyRankSeparation(),digraph:this.hierarchyDigraph()};case"Tree":case"Dendrogram":return{rankdir:this.treeRankDirection()};case"DOT":case"Neato":case"FDP":case"TwoPI":case"Circo":return new URL(this.wasmFolder()||Lm,document.baseURI).href;default:return}},n.prototype.updateLayout=function(){var e=this,t=this.layout(),n=this.layoutOptions(t),o=r.hashSum([t,n]);if(this._prevLayout!==o)switch(this._prevLayout=o,t){case"None":this.layoutAlgo(new cm(this));break;case"Circle":this.layoutAlgo(new X_(this));break;case"ForceDirected":this.layoutAlgo(new om(this,n));break;case"ForceDirected2":this.layoutAlgo(new im(this,n));break;case"ForceDirectedHybrid":this.layoutAlgo(new om(this,n)).then((function(){e.layoutAlgo(new im(e,n))}));break;case"Hierarchy":this.layoutAlgo(new rm(this,n));break;case"DOT":this.layoutAlgo(new um(this,"dot",n));break;case"Tree":this.layoutAlgo(new Fm(this,n));break;case"RadialTree":this.layoutAlgo(new Mm(this));break;case"Dendrogram":this.layoutAlgo(new Tm(this,n));break;case"RadialDendrogram":this.layoutAlgo(new Nm(this));break;case"Neato":this.layoutAlgo(new um(this,"neato",n));break;case"FDP":this.layoutAlgo(new um(this,"fdp",n));break;case"TwoPI":this.layoutAlgo(new um(this,"twopi",n));break;case"Circo":this.layoutAlgo(new um(this,"circo",n))}},n.prototype.update=function(t,r){e.prototype.update.call(this,t,r),this._renderElement.classed("allowDragging",this.allowDragging()),this.updateCategories(),this.updateAnnotations(),this.updateSubgraphs(),this.updateVertices(),this.updateEdges(),this.updateLayout(),this.updateIconBar()},n.prototype.exit=function(t,r){e.prototype.exit.call(this,t,r),this._tooltip.target(null)},n.prototype.render=function(t){var r=this;return this.progress("start"),e.prototype.render.call(this,(function(e){r.progress("stop"),t&&t(e)})),this},n.prototype.zoomed=function(t){e.prototype.zoomed.call(this,t);var r=this.size(),n=r.width,o=r.height;t.k<this.minScale()?(this._edgeG.attr("transform","scale(".concat(this.minScale()/t.k,")")),this._subgraphG.attr("transform","scale(".concat(this.minScale()/t.k,")")),this._vertexG.attr("transform","scale(".concat(this.minScale()/t.k,")")),this._transformScale=t.k/this.minScale()):t.k>this.maxScale()?(this._edgeG.attr("transform","scale(".concat(this.maxScale()/t.k,")")),this._subgraphG.attr("transform","scale(".concat(this.maxScale()/t.k,")")),this._vertexG.attr("transform","scale(".concat(this.maxScale()/t.k,")")),this._transformScale=t.k/this.maxScale()):(this._transformScale=1,this._edgeG.attr("transform",null),this._subgraphG.attr("transform",null),this._vertexG.attr("transform",null)),this._prevTransformScale===this._transformScale&&this._prevWidth===n&&this._prevHeight===o||(this._prevTransformScale=this._transformScale,this._prevWidth=n,this._prevHeight=o,this.moveSubgraphs(!1).moveVertices(!1).moveEdges(!1))},n.prototype.centroids=function(){return this._graphData.allVertices().filter((function(e){return!!e.props.centroid}))},n.prototype.selectionChanged=function(){var e=this;if(this.highlightSelectedPathToCentroid()){var t={};this.centroids().forEach((function(r){e.selection().forEach((function(n){var o=e._graphData.dijkstra(r.id,n.id),i=o.ids;o.len&&i.forEach((function(e){t[e]=!0}))}))})),this._edgeG.selectAll(".graphEdge")}},n.prototype.tooltipHTML=function(e){return e.props.tooltip},n.prototype.subgraph_click=function(e,t,r){},n.prototype.vertex_click=function(e,t,r,n){},n.prototype.vertex_dblclick=function(e,t,r,n){},n.prototype.vertex_mousein=function(e,t,r,n){},n.prototype.vertex_mouseover=function(e,t,r,n){},n.prototype.vertex_mouseout=function(e,t,r,n){},n.prototype.edge_click=function(e,t,r){},n.prototype.edge_mouseover=function(e,t){this.highlightEdge(e,t)},n.prototype.edge_mouseout=function(e,t){this.highlightEdge(null,null)},n.prototype.progress=function(e){},n}(t.SVGZoomWidget);zm.prototype._class+=" graph_GraphT",zm.prototype.publish("allowDragging",!0,"boolean","Allow Dragging of Vertices"),zm.prototype.publish("dragSingleNeighbors",!0,"boolean","Dragging a Vertex also moves its singleton neighbors"),zm.prototype.publish("layout","ForceDirectedHybrid","set","Default Layout",["Hierarchy","DOT","Tree","Dendrogram","RadialTree","RadialDendrogram","ForceDirected","ForceDirected2","ForceDirectedHybrid","Neato","FDP","Circle","TwoPI","Circo","None"]),zm.prototype.publish("scale","100%","set","Zoom Level",["all","width","selection","100%","90%","75%","50%","25%","10%"]),zm.prototype.publish("applyScaleOnLayout",!1,"boolean","Shrink to fit on Layout"),zm.prototype.publish("highlightOnMouseOverVertex",!0,"boolean","Highlight Vertex on Mouse Over"),zm.prototype.publish("highlightOnMouseOverEdge",!0,"boolean","Highlight Edge on Mouse Over"),zm.prototype.publish("transitionDuration",250,"number","Transition Duration"),zm.prototype.publish("showEdges",!0,"boolean","Show Edges"),zm.prototype.publish("showEdgeLabels",!0,"boolean","Show Edge labels"),zm.prototype.publish("showEdgeLabelsOnHighlight",!0,"boolean","Show Edge labels when highlighted"),zm.prototype.publish("showVertexLabels",!0,"boolean","Show Vertex labels"),zm.prototype.publish("showVertexLabelsOnHighlight",!0,"boolean","Show Vertex labels when highlighted"),zm.prototype.publish("snapToGrid",0,"number","Snap to Grid"),zm.prototype.publish("selectionClearOnBackgroundClick",!1,"boolean","Clear selection on background click"),zm.prototype.publish("edgeArcDepth",8,"number","Edge Arc Depth"),zm.prototype.publish("edgeColor",null,"html-color","Edge line stroke color",null,{optional:!0}),zm.prototype.publish("edgeStrokeWidth",1,"number","Edge line stroke width (pixels)"),zm.prototype.publish("minScale",.6,"number","Min scale size for text"),zm.prototype.publish("maxScale",1,"number","Max scale size for text"),zm.prototype.publish("tooltipWidth",256,"number","Tooltip width (pixels)"),zm.prototype.publish("tooltipHeight",128,"number","Tooltip width (pixels)"),zm.prototype.publish("enableTooltipPointerEvents",!1,"boolean","If true, tooltip will use the style: 'pointer-events: all'"),zm.prototype.publish("tooltipCloseDelay",0,"number","Number of milliseconds to wait before closing tooltip (cancelled on tooltip mouseover event)"),zm.prototype.publish("doubleClickMaxDelay",300,"number","Number of milliseconds to wait before a subsequent click is not considered a double click"),zm.prototype.publish("highlightSelectedPathToCentroid",!0,"boolean","Highlight path to Center Vertex (for selected vertices)"),zm.prototype.publish("hierarchyRankDirection","TB","set","Direction for Rank Nodes",["TB","BT","LR","RL"],{disable:function(e){return"Hierarchy"!==e.layout()}}),zm.prototype.publish("hierarchyNodeSeparation",50,"number","Number of pixels that separate nodes horizontally in the layout",null,{disable:function(e){return"Hierarchy"!==e.layout()}}),zm.prototype.publish("hierarchyEdgeSeparation",10,"number","Number of pixels that separate edges horizontally in the layout",null,{disable:function(e){return"Hierarchy"!==e.layout()}}),zm.prototype.publish("hierarchyRankSeparation",50,"number","Number of pixels between each rank in the layout",null,{disable:function(e){return"Hierarchy"!==e.layout()}}),zm.prototype.publish("hierarchyDigraph",!0,"boolean","Directional GraphBase",null,{disable:function(e){return"Hierarchy"!==e.layout()}}),zm.prototype.publish("forceDirectedAlpha",1,"number","Alpha",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),zm.prototype.publish("forceDirectedAlphaMin",.001,"number","Min Alpha",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),zm.prototype.publish("forceDirectedAlphaDecay",.0228,"number","Defaults to 1 - pow(alphaMin, 1 / 300)",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),zm.prototype.publish("forceDirectedRepulsionStrength",-350,"number","Charge strength ",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),zm.prototype.publish("forceDirectedVelocityDecay",.4,"number","Velocity Decay ",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),zm.prototype.publish("forceDirectedIterations",300,"number","Iterations",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),zm.prototype.publish("forceDirectedLinkDistance",300,"number","Target distance between linked nodes",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),zm.prototype.publish("forceDirectedLinkStrength",1,"number","Strength (rigidity) of links",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),zm.prototype.publish("forceDirectedPinCentroid",!1,"boolean","Pin centroid to center",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),zm.prototype.publish("forceDirectedForceStrength",0,"number","Strength of center force",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),zm.prototype.publish("forceDirectedMinDistance",1,"number","Min distance between nodes",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),zm.prototype.publish("forceDirectedMaxDistance",1/0,"number","Max distance between nodes",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),zm.prototype.publish("treeRankDirection","LR","set","Direction for Rank Nodes",["TB","LR"],{disable:function(e){return"Tree"!==e.layout()&&"Dendrogram"!==e.layout()}}),zm.prototype.publish("wasmFolder",null,"string","WASM Folder",null,{optional:!0,disable:function(e){return["DOT","Neato","FDP","TwoPI","Circo"].indexOf(e.layout())<0}});var Gm=zm.prototype.scale;function Um(e){return function(t,r){return o.render(e,t,r)}}zm.prototype.scale=function(e,t){var r=Gm.apply(this,arguments);return arguments.length&&this.zoomTo(e,t),r};var Hm=function(e){function t(t,r,n){return e.call(this,Um(t),Um(r),Um(n))||this}return s(t,e),t.prototype.subgraphRenderer=function(t){return arguments.length?(this._reactSubgraphRenderer=t,e.prototype.subgraphRenderer.call(this,Um(this._reactSubgraphRenderer)),this):this._reactSubgraphRenderer},t.prototype.vertexRenderer=function(t){var r=this;return arguments.length?(this._reactVertexRenderer=t,e.prototype.vertexRenderer.call(this,(function(e,t){return o.render(r._reactVertexRenderer,e,t)})),this):this._reactVertexRenderer},t.prototype.edgeRenderer=function(t){var r=this;return arguments.length?(this._reactEdgeRenderer=t,e.prototype.edgeRenderer.call(this,(function(e,t){return o.render(r._reactEdgeRenderer,e,t)})),this):this._reactEdgeRenderer},t}(zm);Hm.prototype._class+=" graph_GraphReactT";var qm=function(e){var t=e.label,r=e.labelPos,n=e.labelFill,i=void 0===n?"black":n,a=e.labelHeight,s=void 0===a?12:a,u=e.path,c=e.color,h=e.strokeWidth,l=e.strokeDasharray;return o.React.createElement(o.React.Fragment,null,o.React.createElement("path",{d:u,stroke:c,style:{strokeWidth:h,strokeDasharray:l}}),t&&r&&2===r.length?o.React.createElement("g",{transform:"translate(".concat(r[0]," ").concat(r[1],")")},o.React.createElement(o.Text,{text:t,fill:i,height:s})):void 0)},Wm=function(e){function t(){var t=e.call(this,o.Subgraph,o.Vertex,qm)||this;return t._reactCentroidRenderer=o.Vertex,t._reactVertexRenderer2=o.Vertex,e.prototype.vertexRenderer.call(t,(function(e){return e.centroid?t._reactCentroidRenderer(e):t._reactVertexRenderer2(e)})),t}return s(t,e),t.prototype.calcProps=function(t){var r=e.prototype.calcProps.call(this,t);r.icon||(r.icon={}),r.centroid?(r.textHeight=r.textHeight?r.textHeight:this.centroidTextHeight()*this.centroidScale(),r.textPadding=r.textPadding?r.textPadding:this.centroidTextPadding()*this.centroidScale(),r.textFontFamily=r.textFontFamily?r.textFontFamily:this.centroidLabelFontFamily(),r.icon.height=r.icon.height?r.icon.height:this.centroidIconHeight()*this.centroidScale(),r.icon.padding=r.icon.padding?r.icon.padding:this.centroidIconPadding()*this.centroidScale(),r.icon.strokeWidth=r.icon.strokeWidth?r.icon.strokeWidth:this.centroidIconStrokeWidth(),r.icon.imageFontFamily=r.icon.imageFontFamily?r.icon.imageFontFamily:this.centroidIconFontFamily()):(r.textHeight=r.textHeight?r.textHeight:this.vertexTextHeight(),r.textPadding=r.textPadding?r.textPadding:this.vertexTextPadding(),r.textFontFamily=r.textFontFamily?r.textFontFamily:this.vertexLabelFontFamily(),r.icon.height=r.icon.height?r.icon.height:this.vertexIconHeight(),r.icon.padding=r.icon.padding?r.icon.padding:this.vertexIconPadding(),r.icon.strokeWidth=r.icon.strokeWidth?r.icon.strokeWidth:this.vertexIconStrokeWidth(),r.icon.imageFontFamily=r.icon.imageFontFamily?r.icon.imageFontFamily:this.vertexIconFontFamily());var n=r.icon.imageChar,o=r.icon.imageFontFamily,i=r.icon.height-r.icon.padding,a=this.textRect(n,o,i);return r.icon.yOffset=-(a.top-i/2)-a.height/2+(r.icon.padding>0?i/r.icon.padding/2:0),r},t.prototype.vertexRenderer=function(e){return arguments.length?(this._reactVertexRenderer2=e,this):this._reactVertexRenderer2},t.prototype.centroidRenderer=function(e){return arguments.length?(this._reactCentroidRenderer=e,this):this._reactCentroidRenderer},t.prototype.enter=function(t,r){e.prototype.enter.call(this,t,r)},t.prototype.update=function(t,r){e.prototype.update.call(this,t,r),this._centroidFilter.update(this.centroidColor())},t}(Hm);function Ym(e,t){var r={};return t.forEach((function(t,n){return r[t]=e[n]})),r}Wm.prototype._class+=" graph_Graph2",Wm.prototype.publish("vertexTextHeight",10,"number","Vertex Text Height"),Wm.prototype.publish("vertexTextPadding",4,"number","Vertex Text Padding"),Wm.prototype.publish("vertexIconHeight",50,"number","Vertex Icon Height"),Wm.prototype.publish("vertexIconPadding",10,"number","Vertex Icon Padding"),Wm.prototype.publish("vertexIconStrokeWidth",0,"number","Vertex Icon Stroke Width"),Wm.prototype.publish("vertexIconFontFamily","FontAwesome","string","Vertex Icon Font Family"),Wm.prototype.publish("vertexLabelFontFamily","Verdana","string","Vertex Label Font Family"),Wm.prototype.publish("centroidColor","#00A000","html-color","Centroid Glow Color"),Wm.prototype.publish("centroidScale",1,"number","Centroid Scale"),Wm.prototype.publish("centroidTextHeight",12,"number","Centroid Text Height"),Wm.prototype.publish("centroidTextPadding",4,"number","Centroid Text Padding"),Wm.prototype.publish("centroidIconHeight",50,"number","Centroid Icon Height"),Wm.prototype.publish("centroidIconPadding",10,"number","Centroid Icon Padding"),Wm.prototype.publish("centroidIconStrokeWidth",4,"number","Centroid Icon Stroke Width"),Wm.prototype.publish("centroidIconFontFamily","FontAwesome","string","Centroid Icon Font Family"),Wm.prototype.publish("centroidLabelFontFamily","Verdana","string","Centroid Label Font Family");var Km=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return s(r,e),r.prototype.owner=function(e){return arguments.length?(this._owner=e,this):this._owner},r.prototype.valid=function(){return!!this.columnID()},c([t.publish("","set","Annotation column (boolean)",(function(){return this._owner.vertexColumns()})),h("design:type",Function)],r.prototype,"columnID",void 0),c([t.publish("","string","Annotation ID"),h("design:type",Function)],r.prototype,"annotationID",void 0),r}(t.PropertyExt);Km.prototype._class+=" graph_AnnotationColumn";var Zm=function(e){function n(){var t=e.call(this)||this;return t._prevSubgraphs=[],t._masterSubgraphs=[],t._masterSubgraphsMap={},t._prevVertices=[],t._masterVertices=[],t._masterVerticesMap={},t._prevEdges=[],t._masterEdges=[],t._masterEdgesMap={},t._prevHierarchy=[],t._masterHierarchy=[],t._masterHierarchyMap={},t.vertexRenderer(o.Vertex3).centroidRenderer(o.CentroidVertex3).edgeColor("#287EC4").edgeStrokeWidth(2).edgeArcDepth(0),t}return s(n,e),n.prototype.clear=function(){this._prevSubgraphs=[],this._masterSubgraphs=[],this._masterSubgraphsMap={},this._prevVertices=[],this._masterVertices=[],this._masterVerticesMap={},this._prevEdges=[],this._masterEdges=[],this._prevHierarchy=[],this._masterHierarchy=[],this._masterHierarchyMap={},this._graphData.clear(),this.resetLayout()},n.prototype.indexOf=function(e,t,r){void 0===r&&(r="");var n=e.indexOf(t);return n>=0?n:e.indexOf(r)},n.prototype.mergeSubgraphs=function(){var e=this,t=this.subgraphColumns(),n=this.indexOf(t,this.subgraphIDColumn(),"id"),o=this.indexOf(t,this.subgraphLabelColumn(),"label"),i=this.subgraphs().map((function(e){return{id:""+e[n],text:""+e[o],origData:Ym(e,t)}})),a=r.compare2(this._prevSubgraphs,i,(function(e){return e.id}));a.exit.forEach((function(t){e._masterSubgraphs=e._masterSubgraphs.filter((function(e){return e.id!==t.id})),delete e._masterSubgraphsMap[t.id]})),a.enter.forEach((function(t){e._masterSubgraphs.push(t),e._masterSubgraphsMap[t.id]=t})),a.update.forEach((function(t){e._masterSubgraphsMap[t.id].origData=t.origData})),this._prevSubgraphs=i},n.prototype.mergeVertices=function(){var e=this,t=this.vertexColumns(),n=this.vertexAnnotationColumns(),o=this.indexOf(t,this.vertexCategoryColumn(),"category"),i=this.indexOf(t,this.vertexIDColumn(),"id"),a=this.indexOf(t,this.vertexLabelColumn(),"label"),s=this.indexOf(t,this.vertexCentroidColumn(),"centroid"),u=this.indexOf(t,this.vertexFACharColumn(),"faChar"),c=this.indexOf(t,this.vertexTooltipColumn(),"tooltip"),h=n.map((function(r){return e.indexOf(t,r.columnID(),"")})),l=this.indexOf(t,this.vertexExpansionFACharColumn(),"expansionFAChar"),f=this.vertices().map((function(r){var f=h.map((function(e,t){return r[e]?n[t].annotationID():void 0})).filter((function(e){return!!e}));return{categoryID:""+r[o],id:""+r[i],text:""+r[a],tooltip:""+r[c],origData:Ym(r,t),centroid:!!r[s],icon:{imageChar:""+(r[u]||e.vertexFAChar())},annotationIDs:f,annotations:e.annotations().filter((function(e){return f.indexOf(e.id)>=0})),expansionIcon:r[l]?{imageChar:""+r[l]}:void 0}})),d=r.compare2(this._prevVertices,f,(function(e){return e.id}));d.exit.forEach((function(t){e._masterVertices=e._masterVertices.filter((function(e){return e.id!==t.id})),delete e._masterVerticesMap[t.id]})),d.enter.forEach((function(t){e._masterVertices.push(t),e._masterVerticesMap[t.id]=t})),d.update.forEach((function(t){e._masterVerticesMap[t.id].origData=t.origData})),this._prevVertices=f},n.prototype.mergeEdges=function(){var e=this,t=this.edgeColumns(),n=this.indexOf(t,this.edgeIDColumn(),"id"),o=this.indexOf(t,this.edgeSourceColumn(),"source"),i=this.indexOf(t,this.edgeTargetColumn(),"target"),a=this.indexOf(t,this.edgeLabelColumn(),"label"),s=this.indexOf(t,this.edgeWeightColumn(),"weight"),u=this.indexOf(t,this.edgeColorColumn(),"color"),c=this.edges().map((function(r){var c=e._masterVerticesMap[""+r[o]];c||console.error('Invalid edge source entity "'.concat(r[o],'" does not exist.'));var h=e._masterVerticesMap[""+r[i]];return h||console.error('Invalid edge target entity "'.concat(r[i],'" does not exist.')),{id:n>=0?""+r[n]:r[o]+"->"+r[i],source:c,target:h,weight:+r[s]||1,color:r[u],label:a>=0?""+r[a]:"",origData:Ym(r,t),labelPos:[0,0],path:""}})).filter((function(e){return e.source&&e.target})),h=r.compare2(this._masterEdges,c,(function(e){return e.id}));h.exit.forEach((function(t){e._masterEdges=e._masterEdges.filter((function(e){return e.id!==t.id})),delete e._masterEdgesMap[t.id]})),h.enter.forEach((function(t){e._masterEdges.push(t),e._masterEdgesMap[t.id]=t})),h.update.forEach((function(t){e._masterEdgesMap[t.id].origData=t.origData})),this._prevEdges=c},n.prototype.mergeHierarchy=function(){var e=this,t=this.hierarchyColumns(),n=this.indexOf(t,this.hierarchyParentIDColumn(),"parentID"),o=this.indexOf(t,this.hierarchyChildIDColumn(),"childID"),i=this.hierarchy().map((function(t){return{id:t[n]+"=>"+t[o],parent:e._masterSubgraphsMap[""+t[n]],child:e._masterSubgraphsMap[""+t[o]]||e._masterVerticesMap[""+t[o]]}})),a=r.compare2(this._prevHierarchy,i,(function(e){return e.id}));a.exit.forEach((function(t){e._masterHierarchy=e._masterHierarchy.filter((function(e){return e.id!==t.id})),delete e._masterHierarchyMap[t.id]})),a.enter.forEach((function(t){e._masterHierarchy.push(t),e._masterHierarchyMap[t.id]=t})),this._prevHierarchy=i},n.prototype.update=function(t,r){this.mergeSubgraphs(),this.mergeVertices(),this.mergeEdges(),this.mergeHierarchy(),this.data({subgraphs:this._masterSubgraphs,vertices:this._masterVertices,edges:this._masterEdges,hierarchy:this._masterHierarchy}),e.prototype.update.call(this,t,r)},n.prototype.render=function(t){return e.prototype.render.call(this,(function(e){t&&t(e)})),this},c([t.publish([],"any","Subgraph Columns",null,{internal:!0}),h("design:type",Function)],n.prototype,"subgraphColumns",void 0),c([t.publish([],"any","Subgraphs",null,{internal:!0}),h("design:type",Function)],n.prototype,"subgraphs",void 0),c([t.publish("","string","Subgraph ID column"),h("design:type",Function)],n.prototype,"subgraphIDColumn",void 0),c([t.publish("","string","Subgraph Label column"),h("design:type",Function)],n.prototype,"subgraphLabelColumn",void 0),c([t.publish([],"any","Vertex Columns",null,{internal:!0}),h("design:type",Function)],n.prototype,"vertexColumns",void 0),c([t.publish([],"any","Vertices (Nodes)",null,{internal:!0}),h("design:type",Function)],n.prototype,"vertices",void 0),c([t.publish("","set","Vertex Category ID column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexCategoryColumn",void 0),c([t.publish("","set","Vertex ID column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexIDColumn",void 0),c([t.publish("","set","Vertex label column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexLabelColumn",void 0),c([t.publish("","set","Vertex centroid column (boolean)",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexCentroidColumn",void 0),c([t.publish("?","string","Vertex default FAChar"),h("design:type",Function)],n.prototype,"vertexFAChar",void 0),c([t.publish("","set","Vertex FAChar column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexFACharColumn",void 0),c([t.publish("","set","Vertex tooltip column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexTooltipColumn",void 0),c([t.publish([],"propertyArray","Annotations",null,{autoExpand:Km}),h("design:type",Function)],n.prototype,"vertexAnnotationColumns",void 0),c([t.publish("","set","Vertex expansion FAChar column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexExpansionFACharColumn",void 0),c([t.publish([],"any","Edge columns",null,{internal:!0}),h("design:type",Function)],n.prototype,"edgeColumns",void 0),c([t.publish([],"any","Edges (Edges)",null,{internal:!0}),h("design:type",Function)],n.prototype,"edges",void 0),c([t.publish("","set","Edge ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeIDColumn",void 0),c([t.publish("","set","Edge label column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeLabelColumn",void 0),c([t.publish("","set","Edge source ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeSourceColumn",void 0),c([t.publish("","set","Edge target ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeTargetColumn",void 0),c([t.publish("","set","Edge weight column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeWeightColumn",void 0),c([t.publish("","set","Edge color column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeColorColumn",void 0),c([t.publish([],"any","Subgraph Columns"),h("design:type",Function)],n.prototype,"hierarchyColumns",void 0),c([t.publish([],"any","Subgraphs"),h("design:type",Function)],n.prototype,"hierarchy",void 0),c([t.publish("","string","Subgraph ID column"),h("design:type",Function)],n.prototype,"hierarchyParentIDColumn",void 0),c([t.publish("","string","Subgraph Label column"),h("design:type",Function)],n.prototype,"hierarchyChildIDColumn",void 0),n}(Wm);Zm.prototype._class+=" graph_DataGraph";L(".graph_SankeyGraph .node rect{fill-opacity:.9;shape-rendering:crispEdges;stroke:#a9a9a9;cursor:move}.graph_SankeyGraph .node.selected rect{stroke:red}.graph_SankeyGraph .node.over rect{stroke:orange}.graph_SankeyGraph .node.selected.over rect{stroke:red}.graph_SankeyGraph .node text{pointer-events:none;text-shadow:0 1px 0 #fff}.graph_SankeyGraph .node.selected text{fill:red}.graph_SankeyGraph .node.over text{fill:orange}.graph_SankeyGraph .node.selected.over text{fill:red}.graph_SankeyGraph .link{fill:none;stroke:#000;stroke-opacity:.2}.graph_SankeyGraph .link:hover{stroke-opacity:.5}");var $m=function(e){function n(){var r=e.call(this)||this;return r._prevVertices=[],r._masterVertices=[],r._masterVerticesMap={},r._prevEdges=[],r._masterEdges=[],t.Utility.SimpleSelectionMixin.call(r),r._drawStartPos="origin",r}return s(n,e),n.prototype.mergeVertices=function(){var e=this,t=this.vertexColumns(),n=this.vertexAnnotationColumns(),o=this.indexOf(t,this.vertexCategoryColumn(),"category"),i=this.indexOf(t,this.vertexIDColumn(),"id"),a=this.indexOf(t,this.vertexLabelColumn(),"label"),s=this.indexOf(t,this.vertexCentroidColumn(),"centroid"),u=this.indexOf(t,this.vertexTooltipColumn(),"tooltip"),c=n.map((function(r){return e.indexOf(t,r.columnID(),"")})),h=this.vertices().map((function(e){return{categoryID:""+e[o],id:""+e[i],text:""+e[a],tooltip:""+e[u],origData:Ym(e,t),centroid:!!e[s],annotationIDs:c.map((function(t,r){return e[t]?n[r].annotationID():void 0})).filter((function(e){return!!e}))}})),l=r.compare2(this._prevVertices,h,(function(e){return e.id}));l.exit.forEach((function(t){e._masterVertices=e._masterVertices.filter((function(e){return e.id!==t.id}))})),l.enter.forEach((function(t){e._masterVertices.push(t),e._masterVerticesMap[t.id]=t})),this._prevVertices=h},n.prototype.indexOf=function(e,t,r){void 0===r&&(r="");var n=e.indexOf(t);return n>=0?n:e.indexOf(r)},n.prototype.mergeEdges=function(){var e=this,t=this.edgeColumns(),n=this.indexOf(t,this.edgeIDColumn(),"id"),o=this.indexOf(t,this.edgeSourceColumn(),"source"),i=this.indexOf(t,this.edgeTargetColumn(),"target"),a=this.indexOf(t,this.edgeLabelColumn(),"label"),s=this.indexOf(t,this.edgeWeightColumn(),"weight"),u=this.edges().map((function(r){var u=e._masterVerticesMap[""+r[o]];u||console.error('Invalid edge source entity "'.concat(r[o],'" does not exist.'));var c=e._masterVerticesMap[""+r[i]];return c||console.error('Invalid edge target entity "'.concat(r[i],'" does not exist.')),{type:"edge",id:n>=0?""+r[n]:r[o]+"->"+r[i],source:u,target:c,value:+r[s]||0,label:a>=0?""+r[a]:"",origData:Ym(r,t)}})).filter((function(e){return e.source&&e.target})),c=r.compare2(this._masterEdges,u,(function(e){return e.id}));c.exit.forEach((function(t){e._masterEdges=e._masterEdges.filter((function(e){return e.id!==t.id}))})),c.enter.forEach((function(t){e._masterEdges.push(t)})),this._prevEdges=u},n.prototype.sankeyData=function(){return this.mergeVertices(),this.mergeEdges(),{vertices:this._masterVertices,edges:this._masterEdges}},n.prototype.enter=function(t,r){e.prototype.enter.call(this,t,r),this._d3Sankey=S_(),this._selection.widgetElement(r)},n.prototype.update=function(r,n){e.prototype.update.call(this,r,n),this._palette=this._palette.switch(this.paletteID());var o=this.vertexStrokeWidth(),i=this.sankeyData();this._d3Sankey.nodeId((function(e){return e.id})).extent([[0,0],[this.width(),this.height()]]),i.vertices.length>0&&this._d3Sankey({nodes:i.vertices,links:i.edges});var a=this,s=n.selectAll(".link").data(i.edges);s.enter().append("path").attr("class","link").each((function(){t.select(this).append("title")})).merge(s).attr("d",C_()).style("stroke-width",(function(e){return Math.max(1,e.width)})).select("title").text((function(e){return e.source.text+" → "+e.target.text+"\n"+e.value})),s.exit().remove();var u=n.selectAll(".node").data(i.vertices);u.enter().append("g").attr("class","node").call(this._selection.enter.bind(this._selection)).on("click",(function(e){a.click(e.origData,"",a._selection.selected(this))})).on("dblclick",(function(e){a.dblclick(e.origData,"",a._selection.selected(this))})).each((function(){var e=t.select(this);e.append("rect"),e.append("text")})).merge(u).attr("transform",(function(e){var t=0,r=0;return e.x0&&(t=e.x0),e.y0&&(r=e.y0),"translate("+(t+o)+","+(r+o)+")"})).each((function(){var e=t.select(this);e.select("rect").attr("height",(function(e){return e.y1-e.y0})).attr("width",(function(e){return e.x1-e.x0})).style("fill",(function(e){return a._palette(e.categoryID)})).style("stroke",(function(e){return a.vertexStrokeColor()})).style("stroke-width",(function(e){return o})).style("cursor",a.xAxisMovement()||a.yAxisMovement()?null:"default"),e.select("text").attr("x",-6).attr("y",(function(e){return(e.y1-e.y0)/2})).attr("dy",".35em").attr("text-anchor","end").attr("transform",null).text((function(e){return e.text})).filter((function(e){return e.x0<a.width()/2})).attr("x",6+a._d3Sankey.nodeWidth()).attr("text-anchor","start")})),u.exit().remove()},n.prototype.exit=function(t,r){e.prototype.exit.call(this,t,r)},n.prototype.click=function(e,t,r){},n.prototype.dblclick=function(e,t,r){},c([t.publish([],"any","Vertex Columns",null,{internal:!0}),h("design:type",Function)],n.prototype,"vertexColumns",void 0),c([t.publish([],"any","Vertices (Nodes)",null,{internal:!0}),h("design:type",Function)],n.prototype,"vertices",void 0),c([t.publish("","set","Vertex Category ID column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexCategoryColumn",void 0),c([t.publish("","set","Vertex ID column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexIDColumn",void 0),c([t.publish("","set","Vertex label column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexLabelColumn",void 0),c([t.publish("","set","Vertex centroid column (boolean)",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexCentroidColumn",void 0),c([t.publish("?","string","Vertex default FAChar"),h("design:type",Function)],n.prototype,"vertexFAChar",void 0),c([t.publish("","set","Vertex FAChar column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexFACharColumn",void 0),c([t.publish("","set","Vertex tooltip column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexTooltipColumn",void 0),c([t.publish([],"propertyArray","Annotations",null,{autoExpand:Km}),h("design:type",Function)],n.prototype,"vertexAnnotationColumns",void 0),c([t.publish([],"any","Edge columns",null,{internal:!0}),h("design:type",Function)],n.prototype,"edgeColumns",void 0),c([t.publish([],"any","Edges (Edges)",null,{internal:!0}),h("design:type",Function)],n.prototype,"edges",void 0),c([t.publish("","set","Edge ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeIDColumn",void 0),c([t.publish("","set","Edge label column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeLabelColumn",void 0),c([t.publish("","set","Edge source ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeSourceColumn",void 0),c([t.publish("","set","Edge target ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeTargetColumn",void 0),c([t.publish("","set","Edge target ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeWeightColumn",void 0),n}(t.SVGWidget);$m.prototype._class+=" graph_SankeyGraph",$m.prototype.mixin(t.Utility.SimpleSelectionMixin),$m.prototype._palette=t.Palette.ordinal("category10"),$m.prototype.publish("paletteID","category10","set","Color palette for this widget",$m.prototype._palette.switch()),$m.prototype.publish("vertexStrokeWidth",1,"number","Vertex Stroke Width"),$m.prototype.publish("vertexStrokeColor","darkgray","string","Vertex Stroke Color"),$m.prototype.publish("vertexWidth",36,"number","Vertex Width"),$m.prototype.publish("vertexPadding",20,"number","Vertex Padding"),$m.prototype.publish("xAxisMovement",!1,"boolean","Enable x-axis movement"),$m.prototype.publish("yAxisMovement",!1,"boolean","Enable y-axis movement");e.AdjacencyGraph=d_,e.Annotation=f_,e.AnnotationColumn=Km,e.BUILD_VERSION="2.104.9",e.BasicEdge=qm,e.BasicSubgraph=function(e){var t=e.label,r=void 0===t?"":t,n=e.labelFill,i=void 0===n?"black":n,a=e.labelHeight,s=void 0===a?12:a,u=e.width,c=void 0===u?0:u,h=e.height,l=void 0===h?0:h,f=e.rectFill,d=e.rectStroke,p=void 0===d?"#627ae7":d,g=e.rectStrokeWidth,v=void 0===g?2:g;return o.React.createElement("g",{transform:"translate(".concat(-c/2," ").concat(-l/2,")")},o.React.createElement("rect",{width:c,height:l,fill:f,stroke:p,style:{strokeWidth:v}}),o.React.createElement("g",{transform:"translate(8 ".concat(8+s,")")},o.React.createElement(o.Text,{text:r,fill:i,height:s})))},e.BasicVertex=function(e){var t=e.text,r=e.textFill,n=void 0===r?"black":r,i=e.textHeight,a=void 0===i?12:i,s=e.scale,u=void 0===s?1:s,c=e.circleRadius,h=void 0===c?16:c,l=e.circleFill,f=void 0===l?"#a2bcf9":l,d=e.circleStroke,p=void 0===d?"#627ae7":d,g=e.circleStrokeWidth,v=void 0===g?2:g;return o.React.createElement("g",{transform:"scale(".concat(u,")")},o.React.createElement("circle",{cx:"0",cy:"0",r:h,fill:f,stroke:p,style:{strokeWidth:v}}),o.React.createElement("g",{transform:"translate(0 ".concat(h+a,")")},o.React.createElement(o.Text,{text:t,fill:n,height:a})))},e.DataGraph=Zm,e.Edge=R,e.Graph=h_,e.Graph2=Wm,e.GraphReactT=Hm,e.GraphT=zm,e.PKG_NAME="@hpcc-js/graph",e.PKG_VERSION="2.84.1",e.Sankey=I_,e.SankeyColumn=O_,e.SankeyGraph=$m,e.Subgraph=u_,e.Vertex=c_,e.graphviz=function(e,t,r){return void 0===t&&(t="dot"),am({items:[],links:[],raw:e},{engine:t,wasmFolder:new URL(Lm,document.baseURI).href})},e.toJsonObj=Ym,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@hpcc-js/common"),require("@hpcc-js/util"),require("@hpcc-js/api"),require("@hpcc-js/react"),require("@hpcc-js/html")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common","@hpcc-js/util","@hpcc-js/api","@hpcc-js/react","@hpcc-js/html"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@hpcc-js/graph"]={},e["@hpcc-js/common"],e["@hpcc-js/util"],e["@hpcc-js/api"],e["@hpcc-js/react"],e["@hpcc-js/html"])}(this,(function(e,t,r,n,o,i){"use strict";var a=function(e,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},a(e,t)};function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var u=function(){return u=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},u.apply(this,arguments)};function c(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function h(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var f=Math.PI,d=2*f,p=1e-6,g=d-p;function v(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function y(){return new v}function _(e){return function(){return e}}v.prototype=y.prototype={constructor:v,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(e,t,r,n,o,i){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+o)+","+(this._y1=+i)},arcTo:function(e,t,r,n,o){e=+e,t=+t,r=+r,n=+n,o=+o;var i=this._x1,a=this._y1,s=r-e,u=n-t,c=i-e,h=a-t,l=c*c+h*h;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(l>p)if(Math.abs(h*s-u*c)>p&&o){var d=r-i,g=n-a,v=s*s+u*u,y=d*d+g*g,_=Math.sqrt(v),m=Math.sqrt(l),b=o*Math.tan((f-Math.acos((v+l-y)/(2*_*m)))/2),x=b/m,w=b/_;Math.abs(x-1)>p&&(this._+="L"+(e+x*c)+","+(t+x*h)),this._+="A"+o+","+o+",0,0,"+ +(h*d>c*g)+","+(this._x1=e+w*s)+","+(this._y1=t+w*u)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,r,n,o,i){e=+e,t=+t,i=!!i;var a=(r=+r)*Math.cos(n),s=r*Math.sin(n),u=e+a,c=t+s,h=1^i,l=i?n-o:o-n;if(r<0)throw new Error("negative radius: "+r);null===this._x1?this._+="M"+u+","+c:(Math.abs(this._x1-u)>p||Math.abs(this._y1-c)>p)&&(this._+="L"+u+","+c),r&&(l<0&&(l=l%d+d),l>g?this._+="A"+r+","+r+",0,1,"+h+","+(e-a)+","+(t-s)+"A"+r+","+r+",0,1,"+h+","+(this._x1=u)+","+(this._y1=c):l>p&&(this._+="A"+r+","+r+",0,"+ +(l>=f)+","+h+","+(this._x1=e+r*Math.cos(o))+","+(this._y1=t+r*Math.sin(o))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};function m(e){this._context=e}function b(e){return new m(e)}function x(e){return e[0]}function w(e){return e[1]}function E(){var e=x,t=w,r=_(!0),n=null,o=b,i=null;function a(a){var s,u,c,h=a.length,l=!1;for(null==n&&(i=o(c=y())),s=0;s<=h;++s)!(s<h&&r(u=a[s],s,a))===l&&((l=!l)?i.lineStart():i.lineEnd()),l&&i.point(+e(u,s,a),+t(u,s,a));if(c)return i=null,c+""||null}return a.x=function(t){return arguments.length?(e="function"==typeof t?t:_(+t),a):e},a.y=function(e){return arguments.length?(t="function"==typeof e?e:_(+e),a):t},a.defined=function(e){return arguments.length?(r="function"==typeof e?e:_(!!e),a):r},a.curve=function(e){return arguments.length?(o=e,null!=n&&(i=o(n)),a):o},a.context=function(e){return arguments.length?(null==e?n=i=null:i=o(n=e),a):n},a}m.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var k=Array.prototype.slice;function S(e){return e.source}function D(e){return e.target}function j(e,t,r,n,o){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,o,n,o)}function C(){return function(e){var t=S,r=D,n=x,o=w,i=null;function a(){var a,s=k.call(arguments),u=t.apply(this,s),c=r.apply(this,s);if(i||(i=a=y()),e(i,+n.apply(this,(s[0]=u,s)),+o.apply(this,s),+n.apply(this,(s[0]=c,s)),+o.apply(this,s)),a)return i=null,a+""||null}return a.source=function(e){return arguments.length?(t=e,a):t},a.target=function(e){return arguments.length?(r=e,a):r},a.x=function(e){return arguments.length?(n="function"==typeof e?e:_(+e),a):n},a.y=function(e){return arguments.length?(o="function"==typeof e?e:_(+e),a):o},a.context=function(e){return arguments.length?(i=null==e?null:e,a):i},a}(j)}function A(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function O(e){this._context=e}function I(e){return new O(e)}function P(e,t){this._basis=new O(e),this._beta=t}O.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:A(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:A(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},P.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var n,o=e[0],i=t[0],a=e[r]-o,s=t[r]-i,u=-1;++u<=r;)n=u/r,this._basis.point(this._beta*e[u]+(1-this._beta)*(o+n*a),this._beta*t[u]+(1-this._beta)*(i+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};(function e(t){function r(e){return 1===t?new O(e):new P(e,t)}return r.beta=function(t){return e(+t)},r})(.85);function F(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function M(e,t){this._context=e,this._k=(1-t)/6}M.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:F(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:F(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var T=function e(t){function r(e){return new M(e,t)}return r.tension=function(t){return e(+t)},r}(0);function N(e,t){this._context=e,this._alpha=t}N.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:!function(e,t,r){var n=e._x1,o=e._y1,i=e._x2,a=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,o=(o*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>1e-12){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);i=(i*c+e._x1*e._l23_2a-t*e._l12_2a)/h,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(n,o,i,a,e._x2,e._y2)}(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};(function e(t){function r(e){return t?new N(e,t):new M(e,0)}return r.alpha=function(t){return e(+t)},r})(.5);function L(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}L(".graph_Edge{fill:none;stroke:#656565;stroke-width:1px}.graph_Edge .common_TextBox .common_Text{fill:#000;stroke:none}.graph_Edge .common_TextBox .common_Shape{fill:#fff;stroke:none}.graph_Edge.selected{stroke:red!important}.graph_Edge.selected .common_Text{fill:red!important}");var B=I,R=function(e){function r(){var r=e.call(this)||this;return r._points=[],r._weight=100,r._strokeDasharray=null,r._hidden=!1,r._textBox=(new t.TextBox).padding(0),r}return s(r,e),r.prototype.graphID=function(e){return arguments.length?(this._graphID=e,this):this._graphID},r.prototype.sourceVertex=function(e){return arguments.length?(this._sourceVertex=e,this):this._sourceVertex},r.prototype.targetVertex=function(e){return arguments.length?(this._targetVertex=e,this):this._targetVertex},r.prototype.weight=function(e){return arguments.length?(this._weight=e,this):this._weight},r.prototype.points=function(e,t,r){return arguments.length?(this._points=e,this._elementPath&&this.update(null,this._element,t,r),this):this._points},r.prototype.hidden=function(e){return arguments.length?(this._hidden=e,this):this._hidden},r.prototype.text=function(e){return arguments.length?(this._textBox.text(e),this):this._textBox.text()},r.prototype.enter=function(t,r){e.prototype.enter.call(this,t,r),this._elementPath=r.append("path"),this._textBox.text()&&this._textBox.target(t).tooltip(this.tooltip()).render()},r.prototype.update=function(r,n,o,i){e.prototype.update.call(this,r,n);var a=this;t.Platform.svgMarkerGlitch&&!i&&n.transition().duration((o||0)+100).on("start",(function(){a._pushMarkers(n)})).on("end",(function(){a._popMarkers(n)}));var s=a._calculateEdgePoints(this._sourceVertex,this._targetVertex,this._points),u=n.selectAll(".point2").data(this.showControlPoints()?s:[]);u.enter().append("circle").attr("class","point2").style("stroke","red").merge(u).attr("cx",(function(e){return e.x})).attr("cy",(function(e){return e.y})).attr("r",1),u.exit().remove();var c=E().x((function(e){return e.x})).y((function(e){return e.y})).curve(B)(s),h=this._elementPath;o&&(h=h.transition().duration(o)),h.attr("opacity",this._hidden?0:1).attr("marker-start",t.Platform.svgMarkerGlitch&&i||!this.sourceMarker_exists()?null:"url(#"+this._graphID+"_"+this.sourceMarker()+"Foot)").attr("marker-end",t.Platform.svgMarkerGlitch&&i||!this.targetMarker_exists()?null:"url(#"+this._graphID+"_"+this.targetMarker()+"Head)").attr("stroke",this.strokeColor_exists()?this.strokeColor():null).attr("stroke-dasharray",this.strokeDasharray_exists()?this.strokeDasharray():null).attr("d",c),this._textBox.text()&&this._textBox.tooltip(this.tooltip()).move(this._findMidPoint(s),o)},r.prototype.exit=function(t,r){this._textBox&&this._textBox.target(null),e.prototype.exit.call(this,t,r)},r.prototype._findMidPoint=function(e){var t=e.length/2;if(e.length%2)return e[Math.floor(t)];if(e.length){var r=e[t-1],n=e[t];return{x:(r.x+n.x)/2,y:(r.y+n.y)/2}}return{x:0,y:0}},r.prototype._calculateEdgePoints=function(e,t,r){if(!e||!t)return[{x:0,y:0},{x:0,y:0}];var n=r?r.filter((function(r){return!e.contains(r)&&!t.contains(r)})):[],o=0===n.length?t.pos():n[0],i=0===n.length?e.pos():n[n.length-1];if(n.unshift(e.intersection(e._pos,o)),n.push(t.intersection(t._pos,i)),n[0]||(n[0]=e._pos),n[n.length-1]||(n[n.length-1]=t._pos),(!r||0===r.length)&&2===n.length&&n[0]&&n[1]){var a=n[0].x-n[1].x,s=n[0].y-n[1].y;if(Math.sqrt(a*a+s*s))if(this.showArc()){var u=(n[0].x+n[1].x)/2-s*this.arcDepth()/100,c=(n[0].y+n[1].y)/2+a*this.arcDepth()/100;n=[{x:n[0].x,y:n[0].y},{x:u,y:c},{x:n[1].x,y:n[1].y}]}else n=[{x:n[0].x,y:n[0].y},{x:n[1].x,y:n[1].y}]}return n},r}(t.SVGWidget);R.prototype._class+=" graph_Edge",R.prototype.publish("arcDepth",16,"number","Arc Depth",null,{tags:["Basic"]}),R.prototype.publish("showControlPoints",!1,"boolean","Show/Hide Control Points",null,{tags:["Basic"]}),R.prototype.publish("showArc",!0,"boolean","Show/Hide Arc",null,{tags:["Basic"]}),R.prototype.publish("tooltip","","string","Tooltip",null,{tags:["Private"]}),R.prototype.publish("sourceMarker","circle","set","Source Marker",["none","circle"],{optional:!0}),R.prototype.publish("targetMarker","arrow","set","Source Marker",["none","arrow","circle"],{optional:!0}),R.prototype.publish("strokeDasharray",null,"string","Stroke Dash Array",null,{optional:!0}),R.prototype.publish("strokeColor",null,"html-color","Stroke Color",null,{optional:!0}),R.prototype.publish("textColor",null,"html-color","Text Color",null,{optional:!0}),R.prototype.publishProxy("text_shape_colorFill","_textBox","shape_colorFill"),R.prototype.publishProxy("text_shape_colorStroke","_textBox","shape_colorStroke"),R.prototype.publishProxy("text_text_colorFill","_textBox","text_colorFill");var V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var z=function(){this.__data__=[],this.size=0};var G=function(e,t){return e===t||e!=e&&t!=t},U=G;var H=function(e,t){for(var r=e.length;r--;)if(U(e[r][0],t))return r;return-1},q=H,W=Array.prototype.splice;var Y=function(e){var t=this.__data__,r=q(t,e);return!(r<0)&&(r==t.length-1?t.pop():W.call(t,r,1),--this.size,!0)},K=H;var Z=function(e){var t=this.__data__,r=K(t,e);return r<0?void 0:t[r][1]},$=H;var Q=H;var X=function(e,t){var r=this.__data__,n=Q(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},J=z,ee=Y,te=Z,re=function(e){return $(this.__data__,e)>-1},ne=X;function oe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}oe.prototype.clear=J,oe.prototype.delete=ee,oe.prototype.get=te,oe.prototype.has=re,oe.prototype.set=ne;var ie=oe,ae=ie;var se=function(){this.__data__=new ae,this.size=0};var ue=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r};var ce=function(e){return this.__data__.get(e)};var he=function(e){return this.__data__.has(e)},le="object"==typeof V&&V&&V.Object===Object&&V,fe=le,de="object"==typeof self&&self&&self.Object===Object&&self,pe=fe||de||Function("return this")(),ge=pe.Symbol,ve=ge,ye=Object.prototype,_e=ye.hasOwnProperty,me=ye.toString,be=ve?ve.toStringTag:void 0;var xe=function(e){var t=_e.call(e,be),r=e[be];try{e[be]=void 0;var n=!0}catch(e){}var o=me.call(e);return n&&(t?e[be]=r:delete e[be]),o},we=Object.prototype.toString;var Ee=function(e){return we.call(e)},ke=xe,Se=Ee,De=ge?ge.toStringTag:void 0;var je=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":De&&De in Object(e)?ke(e):Se(e)};var Ce=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},Ae=je,Oe=Ce;var Ie,Pe=function(e){if(!Oe(e))return!1;var t=Ae(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Fe=pe["__core-js_shared__"],Me=(Ie=/[^.]+$/.exec(Fe&&Fe.keys&&Fe.keys.IE_PROTO||""))?"Symbol(src)_1."+Ie:"";var Te=function(e){return!!Me&&Me in e},Ne=Function.prototype.toString;var Le=function(e){if(null!=e){try{return Ne.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Be=Pe,Re=Te,Ve=Ce,ze=Le,Ge=/^\[object .+?Constructor\]$/,Ue=Function.prototype,He=Object.prototype,qe=Ue.toString,We=He.hasOwnProperty,Ye=RegExp("^"+qe.call(We).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Ke=function(e){return!(!Ve(e)||Re(e))&&(Be(e)?Ye:Ge).test(ze(e))};var Ze=Ke,$e=function(e,t){return null==e?void 0:e[t]};var Qe=function(e,t){var r=$e(e,t);return Ze(r)?r:void 0},Xe=Qe(pe,"Map"),Je=Qe(Object,"create"),et=Je;var tt=function(){this.__data__=et?et(null):{},this.size=0};var rt=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},nt=Je,ot=Object.prototype.hasOwnProperty;var it=function(e){var t=this.__data__;if(nt){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return ot.call(t,e)?t[e]:void 0},at=Je,st=Object.prototype.hasOwnProperty;var ut=Je;var ct=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ut&&void 0===t?"__lodash_hash_undefined__":t,this},ht=tt,lt=rt,ft=it,dt=function(e){var t=this.__data__;return at?void 0!==t[e]:st.call(t,e)},pt=ct;function gt(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}gt.prototype.clear=ht,gt.prototype.delete=lt,gt.prototype.get=ft,gt.prototype.has=dt,gt.prototype.set=pt;var vt=gt,yt=ie,_t=Xe;var mt=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},bt=mt;var xt=function(e,t){var r=e.__data__;return bt(t)?r["string"==typeof t?"string":"hash"]:r.map},wt=xt;var Et=xt;var kt=xt;var St=xt;var Dt=function(e,t){var r=St(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},jt=function(){this.size=0,this.__data__={hash:new vt,map:new(_t||yt),string:new vt}},Ct=function(e){var t=wt(this,e).delete(e);return this.size-=t?1:0,t},At=function(e){return Et(this,e).get(e)},Ot=function(e){return kt(this,e).has(e)},It=Dt;function Pt(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Pt.prototype.clear=jt,Pt.prototype.delete=Ct,Pt.prototype.get=At,Pt.prototype.has=Ot,Pt.prototype.set=It;var Ft=Pt,Mt=ie,Tt=Xe,Nt=Ft;var Lt=function(e,t){var r=this.__data__;if(r instanceof Mt){var n=r.__data__;if(!Tt||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Nt(n)}return r.set(e,t),this.size=r.size,this},Bt=ie,Rt=se,Vt=ue,zt=ce,Gt=he,Ut=Lt;function Ht(e){var t=this.__data__=new Bt(e);this.size=t.size}Ht.prototype.clear=Rt,Ht.prototype.delete=Vt,Ht.prototype.get=zt,Ht.prototype.has=Gt,Ht.prototype.set=Ut;var qt=Ht;var Wt=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e},Yt=Qe,Kt=function(){try{var e=Yt(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Zt=Kt;var $t=function(e,t,r){"__proto__"==t&&Zt?Zt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},Qt=$t,Xt=G,Jt=Object.prototype.hasOwnProperty;var er=function(e,t,r){var n=e[t];Jt.call(e,t)&&Xt(n,r)&&(void 0!==r||t in e)||Qt(e,t,r)},tr=er,rr=$t;var nr=function(e,t,r,n){var o=!r;r||(r={});for(var i=-1,a=t.length;++i<a;){var s=t[i],u=n?n(r[s],e[s],s,r,e):void 0;void 0===u&&(u=e[s]),o?rr(r,s,u):tr(r,s,u)}return r};var or=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n};var ir=function(e){return null!=e&&"object"==typeof e},ar=je,sr=ir;var ur=function(e){return sr(e)&&"[object Arguments]"==ar(e)},cr=ur,hr=ir,lr=Object.prototype,fr=lr.hasOwnProperty,dr=lr.propertyIsEnumerable,pr=cr(function(){return arguments}())?cr:function(e){return hr(e)&&fr.call(e,"callee")&&!dr.call(e,"callee")},gr=pr,vr=Array.isArray,yr={exports:{}};var _r=function(){return!1};!function(e,t){var r=pe,n=_r,o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?r.Buffer:void 0,s=(a?a.isBuffer:void 0)||n;e.exports=s}(yr,yr.exports);var mr=/^(?:0|[1-9]\d*)$/;var br=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&mr.test(e))&&e>-1&&e%1==0&&e<t};var xr=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},wr=je,Er=xr,kr=ir,Sr={};Sr["[object Float32Array]"]=Sr["[object Float64Array]"]=Sr["[object Int8Array]"]=Sr["[object Int16Array]"]=Sr["[object Int32Array]"]=Sr["[object Uint8Array]"]=Sr["[object Uint8ClampedArray]"]=Sr["[object Uint16Array]"]=Sr["[object Uint32Array]"]=!0,Sr["[object Arguments]"]=Sr["[object Array]"]=Sr["[object ArrayBuffer]"]=Sr["[object Boolean]"]=Sr["[object DataView]"]=Sr["[object Date]"]=Sr["[object Error]"]=Sr["[object Function]"]=Sr["[object Map]"]=Sr["[object Number]"]=Sr["[object Object]"]=Sr["[object RegExp]"]=Sr["[object Set]"]=Sr["[object String]"]=Sr["[object WeakMap]"]=!1;var Dr=function(e){return kr(e)&&Er(e.length)&&!!Sr[wr(e)]};var jr=function(e){return function(t){return e(t)}},Cr={exports:{}};!function(e,t){var r=le,n=t&&!t.nodeType&&t,o=n&&e&&!e.nodeType&&e,i=o&&o.exports===n&&r.process,a=function(){try{var e=o&&o.require&&o.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=a}(Cr,Cr.exports);var Ar=Dr,Or=jr,Ir=Cr.exports,Pr=Ir&&Ir.isTypedArray,Fr=Pr?Or(Pr):Ar,Mr=or,Tr=gr,Nr=vr,Lr=yr.exports,Br=br,Rr=Fr,Vr=Object.prototype.hasOwnProperty;var zr=function(e,t){var r=Nr(e),n=!r&&Tr(e),o=!r&&!n&&Lr(e),i=!r&&!n&&!o&&Rr(e),a=r||n||o||i,s=a?Mr(e.length,String):[],u=s.length;for(var c in e)!t&&!Vr.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Br(c,u))||s.push(c);return s},Gr=Object.prototype;var Ur=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Gr)};var Hr=function(e,t){return function(r){return e(t(r))}},qr=Hr(Object.keys,Object),Wr=Ur,Yr=qr,Kr=Object.prototype.hasOwnProperty;var Zr=function(e){if(!Wr(e))return Yr(e);var t=[];for(var r in Object(e))Kr.call(e,r)&&"constructor"!=r&&t.push(r);return t},$r=Pe,Qr=xr;var Xr=function(e){return null!=e&&Qr(e.length)&&!$r(e)},Jr=zr,en=Zr,tn=Xr;var rn=function(e){return tn(e)?Jr(e):en(e)},nn=nr,on=rn;var an=function(e,t){return e&&nn(t,on(t),e)};var sn=Ce,un=Ur,cn=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t},hn=Object.prototype.hasOwnProperty;var ln=zr,fn=function(e){if(!sn(e))return cn(e);var t=un(e),r=[];for(var n in e)("constructor"!=n||!t&&hn.call(e,n))&&r.push(n);return r},dn=Xr;var pn=function(e){return dn(e)?ln(e,!0):fn(e)},gn=nr,vn=pn;var yn=function(e,t){return e&&gn(t,vn(t),e)},_n={exports:{}};!function(e,t){var r=pe,n=t&&!t.nodeType&&t,o=n&&e&&!e.nodeType&&e,i=o&&o.exports===n?r.Buffer:void 0,a=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=a?a(r):new e.constructor(r);return e.copy(n),n}}(_n,_n.exports);var mn=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t};var bn=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i};var xn=function(){return[]},wn=bn,En=xn,kn=Object.prototype.propertyIsEnumerable,Sn=Object.getOwnPropertySymbols,Dn=Sn?function(e){return null==e?[]:(e=Object(e),wn(Sn(e),(function(t){return kn.call(e,t)})))}:En,jn=nr,Cn=Dn;var An=function(e,t){return jn(e,Cn(e),t)};var On=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e},In=Hr(Object.getPrototypeOf,Object),Pn=On,Fn=In,Mn=Dn,Tn=xn,Nn=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Pn(t,Mn(e)),e=Fn(e);return t}:Tn,Ln=nr,Bn=Nn;var Rn=function(e,t){return Ln(e,Bn(e),t)},Vn=On,zn=vr;var Gn=function(e,t,r){var n=t(e);return zn(e)?n:Vn(n,r(e))},Un=Gn,Hn=Dn,qn=rn;var Wn=function(e){return Un(e,qn,Hn)},Yn=Gn,Kn=Nn,Zn=pn;var $n=function(e){return Yn(e,Zn,Kn)},Qn=Qe(pe,"DataView"),Xn=Qe(pe,"Promise"),Jn=Qe(pe,"Set"),eo=Qn,to=Xe,ro=Xn,no=Jn,oo=Qe(pe,"WeakMap"),io=je,ao=Le,so="[object Map]",uo="[object Promise]",co="[object Set]",ho="[object WeakMap]",lo="[object DataView]",fo=ao(eo),po=ao(to),go=ao(ro),vo=ao(no),yo=ao(oo),_o=io;(eo&&_o(new eo(new ArrayBuffer(1)))!=lo||to&&_o(new to)!=so||ro&&_o(ro.resolve())!=uo||no&&_o(new no)!=co||oo&&_o(new oo)!=ho)&&(_o=function(e){var t=io(e),r="[object Object]"==t?e.constructor:void 0,n=r?ao(r):"";if(n)switch(n){case fo:return lo;case po:return so;case go:return uo;case vo:return co;case yo:return ho}return t});var mo=_o,bo=Object.prototype.hasOwnProperty;var xo=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&bo.call(e,"index")&&(r.index=e.index,r.input=e.input),r},wo=pe.Uint8Array,Eo=wo;var ko=function(e){var t=new e.constructor(e.byteLength);return new Eo(t).set(new Eo(e)),t},So=ko;var Do=function(e,t){var r=t?So(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)},jo=/\w*$/;var Co=function(e){var t=new e.constructor(e.source,jo.exec(e));return t.lastIndex=e.lastIndex,t},Ao=ge?ge.prototype:void 0,Oo=Ao?Ao.valueOf:void 0;var Io=ko;var Po=function(e,t){var r=t?Io(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)},Fo=ko,Mo=Do,To=Co,No=function(e){return Oo?Object(Oo.call(e)):{}},Lo=Po;var Bo=function(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return Fo(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return Mo(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Lo(e,r);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(e);case"[object RegExp]":return To(e);case"[object Symbol]":return No(e)}},Ro=Ce,Vo=Object.create,zo=function(){function e(){}return function(t){if(!Ro(t))return{};if(Vo)return Vo(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),Go=zo,Uo=In,Ho=Ur;var qo=function(e){return"function"!=typeof e.constructor||Ho(e)?{}:Go(Uo(e))},Wo=mo,Yo=ir;var Ko=function(e){return Yo(e)&&"[object Map]"==Wo(e)},Zo=Ko,$o=jr,Qo=Cr.exports,Xo=Qo&&Qo.isMap,Jo=Xo?$o(Xo):Zo,ei=mo,ti=ir;var ri=function(e){return ti(e)&&"[object Set]"==ei(e)},ni=ri,oi=jr,ii=Cr.exports,ai=ii&&ii.isSet,si=ai?oi(ai):ni,ui=qt,ci=Wt,hi=er,li=an,fi=yn,di=_n.exports,pi=mn,gi=An,vi=Rn,yi=Wn,_i=$n,mi=mo,bi=xo,xi=Bo,wi=qo,Ei=vr,ki=yr.exports,Si=Jo,Di=Ce,ji=si,Ci=rn,Ai=pn,Oi="[object Arguments]",Ii="[object Function]",Pi="[object Object]",Fi={};Fi[Oi]=Fi["[object Array]"]=Fi["[object ArrayBuffer]"]=Fi["[object DataView]"]=Fi["[object Boolean]"]=Fi["[object Date]"]=Fi["[object Float32Array]"]=Fi["[object Float64Array]"]=Fi["[object Int8Array]"]=Fi["[object Int16Array]"]=Fi["[object Int32Array]"]=Fi["[object Map]"]=Fi["[object Number]"]=Fi[Pi]=Fi["[object RegExp]"]=Fi["[object Set]"]=Fi["[object String]"]=Fi["[object Symbol]"]=Fi["[object Uint8Array]"]=Fi["[object Uint8ClampedArray]"]=Fi["[object Uint16Array]"]=Fi["[object Uint32Array]"]=!0,Fi["[object Error]"]=Fi[Ii]=Fi["[object WeakMap]"]=!1;var Mi=function e(t,r,n,o,i,a){var s,u=1&r,c=2&r,h=4&r;if(n&&(s=i?n(t,o,i,a):n(t)),void 0!==s)return s;if(!Di(t))return t;var l=Ei(t);if(l){if(s=bi(t),!u)return pi(t,s)}else{var f=mi(t),d=f==Ii||"[object GeneratorFunction]"==f;if(ki(t))return di(t,u);if(f==Pi||f==Oi||d&&!i){if(s=c||d?{}:wi(t),!u)return c?vi(t,fi(s,t)):gi(t,li(s,t))}else{if(!Fi[f])return i?t:{};s=xi(t,f,u)}}a||(a=new ui);var p=a.get(t);if(p)return p;a.set(t,s),ji(t)?t.forEach((function(o){s.add(e(o,r,n,o,t,a))})):Si(t)&&t.forEach((function(o,i){s.set(i,e(o,r,n,i,t,a))}));var g=l?void 0:(h?c?_i:yi:c?Ai:Ci)(t);return ci(g||t,(function(o,i){g&&(o=t[i=o]),hi(s,i,e(o,r,n,i,t,a))})),s},Ti=Mi;var Ni=function(e){return Ti(e,4)};var Li=function(e){return function(){return e}};var Bi=function(e){return function(t,r,n){for(var o=-1,i=Object(t),a=n(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===r(i[u],u,i))break}return t}},Ri=Bi(),Vi=Ri,zi=rn;var Gi=function(e,t){return e&&Vi(e,t,zi)},Ui=Xr;var Hi=function(e,t){return function(r,n){if(null==r)return r;if(!Ui(r))return e(r,n);for(var o=r.length,i=t?o:-1,a=Object(r);(t?i--:++i<o)&&!1!==n(a[i],i,a););return r}},qi=Hi(Gi);var Wi=function(e){return e},Yi=Wi;var Ki=function(e){return"function"==typeof e?e:Yi},Zi=Wt,$i=qi,Qi=Ki,Xi=vr;var Ji=function(e,t){return(Xi(e)?Zi:$i)(e,Qi(t))},ea=Ji,ta=qi;var ra=function(e,t){var r=[];return ta(e,(function(e,n,o){t(e,n,o)&&r.push(e)})),r};var na=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var oa=function(e){return this.__data__.has(e)},ia=Ft,aa=na,sa=oa;function ua(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new ia;++t<r;)this.add(e[t])}ua.prototype.add=ua.prototype.push=aa,ua.prototype.has=sa;var ca=ua;var ha=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1};var la=function(e,t){return e.has(t)},fa=ca,da=ha,pa=la;var ga=function(e,t,r,n,o,i){var a=1&r,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=i.get(e),h=i.get(t);if(c&&h)return c==t&&h==e;var l=-1,f=!0,d=2&r?new fa:void 0;for(i.set(e,t),i.set(t,e);++l<s;){var p=e[l],g=t[l];if(n)var v=a?n(g,p,l,t,e,i):n(p,g,l,e,t,i);if(void 0!==v){if(v)continue;f=!1;break}if(d){if(!da(t,(function(e,t){if(!pa(d,t)&&(p===e||o(p,e,r,n,i)))return d.push(t)}))){f=!1;break}}else if(p!==g&&!o(p,g,r,n,i)){f=!1;break}}return i.delete(e),i.delete(t),f};var va=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r};var ya=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r},_a=wo,ma=G,ba=ga,xa=va,wa=ya,Ea=ge?ge.prototype:void 0,ka=Ea?Ea.valueOf:void 0;var Sa=function(e,t,r,n,o,i,a){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new _a(e),new _a(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ma(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=xa;case"[object Set]":var u=1&n;if(s||(s=wa),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;n|=2,a.set(e,t);var h=ba(s(e),s(t),n,o,i,a);return a.delete(e),h;case"[object Symbol]":if(ka)return ka.call(e)==ka.call(t)}return!1},Da=Wn,ja=Object.prototype.hasOwnProperty;var Ca=function(e,t,r,n,o,i){var a=1&r,s=Da(e),u=s.length;if(u!=Da(t).length&&!a)return!1;for(var c=u;c--;){var h=s[c];if(!(a?h in t:ja.call(t,h)))return!1}var l=i.get(e),f=i.get(t);if(l&&f)return l==t&&f==e;var d=!0;i.set(e,t),i.set(t,e);for(var p=a;++c<u;){var g=e[h=s[c]],v=t[h];if(n)var y=a?n(v,g,h,t,e,i):n(g,v,h,e,t,i);if(!(void 0===y?g===v||o(g,v,r,n,i):y)){d=!1;break}p||(p="constructor"==h)}if(d&&!p){var _=e.constructor,m=t.constructor;_==m||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof m&&m instanceof m||(d=!1)}return i.delete(e),i.delete(t),d},Aa=qt,Oa=ga,Ia=Sa,Pa=Ca,Fa=mo,Ma=vr,Ta=yr.exports,Na=Fr,La="[object Arguments]",Ba="[object Array]",Ra="[object Object]",Va=Object.prototype.hasOwnProperty;var za=function(e,t,r,n,o,i){var a=Ma(e),s=Ma(t),u=a?Ba:Fa(e),c=s?Ba:Fa(t),h=(u=u==La?Ra:u)==Ra,l=(c=c==La?Ra:c)==Ra,f=u==c;if(f&&Ta(e)){if(!Ta(t))return!1;a=!0,h=!1}if(f&&!h)return i||(i=new Aa),a||Na(e)?Oa(e,t,r,n,o,i):Ia(e,t,u,r,n,o,i);if(!(1&r)){var d=h&&Va.call(e,"__wrapped__"),p=l&&Va.call(t,"__wrapped__");if(d||p){var g=d?e.value():e,v=p?t.value():t;return i||(i=new Aa),o(g,v,r,n,i)}}return!!f&&(i||(i=new Aa),Pa(e,t,r,n,o,i))},Ga=ir;var Ua=function e(t,r,n,o,i){return t===r||(null==t||null==r||!Ga(t)&&!Ga(r)?t!=t&&r!=r:za(t,r,n,o,e,i))},Ha=qt,qa=Ua;var Wa=function(e,t,r,n){var o=r.length,i=o,a=!n;if(null==e)return!i;for(e=Object(e);o--;){var s=r[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var u=(s=r[o])[0],c=e[u],h=s[1];if(a&&s[2]){if(void 0===c&&!(u in e))return!1}else{var l=new Ha;if(n)var f=n(c,h,u,e,t,l);if(!(void 0===f?qa(h,c,3,n,l):f))return!1}}return!0},Ya=Ce;var Ka=function(e){return e==e&&!Ya(e)},Za=Ka,$a=rn;var Qa=function(e){for(var t=$a(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Za(o)]}return t};var Xa=function(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}},Ja=Wa,es=Qa,ts=Xa;var rs=function(e){var t=es(e);return 1==t.length&&t[0][2]?ts(t[0][0],t[0][1]):function(r){return r===e||Ja(r,e,t)}},ns=je,os=ir;var is=function(e){return"symbol"==typeof e||os(e)&&"[object Symbol]"==ns(e)},as=vr,ss=is,us=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cs=/^\w*$/;var hs=function(e,t){if(as(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!ss(e))||(cs.test(e)||!us.test(e)||null!=t&&e in Object(t))},ls=Ft;function fs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(fs.Cache||ls),r}fs.Cache=ls;var ds=fs;var ps=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gs=/\\(\\)?/g,vs=function(e){var t=ds(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ps,(function(e,r,n,o){t.push(n?o.replace(gs,"$1"):r||e)})),t}));var ys=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o},_s=ys,ms=vr,bs=is,xs=ge?ge.prototype:void 0,ws=xs?xs.toString:void 0;var Es=function e(t){if("string"==typeof t)return t;if(ms(t))return _s(t,e)+"";if(bs(t))return ws?ws.call(t):"";var r=t+"";return"0"==r&&1/t==-Infinity?"-0":r},ks=Es;var Ss=function(e){return null==e?"":ks(e)},Ds=vr,js=hs,Cs=vs,As=Ss;var Os=function(e,t){return Ds(e)?e:js(e,t)?[e]:Cs(As(e))},Is=is;var Ps=function(e){if("string"==typeof e||Is(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t},Fs=Os,Ms=Ps;var Ts=function(e,t){for(var r=0,n=(t=Fs(t,e)).length;null!=e&&r<n;)e=e[Ms(t[r++])];return r&&r==n?e:void 0},Ns=Ts;var Ls=function(e,t,r){var n=null==e?void 0:Ns(e,t);return void 0===n?r:n};var Bs=Os,Rs=gr,Vs=vr,zs=br,Gs=xr,Us=Ps;var Hs=function(e,t,r){for(var n=-1,o=(t=Bs(t,e)).length,i=!1;++n<o;){var a=Us(t[n]);if(!(i=null!=e&&r(e,a)))break;e=e[a]}return i||++n!=o?i:!!(o=null==e?0:e.length)&&Gs(o)&&zs(a,o)&&(Vs(e)||Rs(e))},qs=function(e,t){return null!=e&&t in Object(e)},Ws=Hs;var Ys=function(e,t){return null!=e&&Ws(e,t,qs)},Ks=Ua,Zs=Ls,$s=Ys,Qs=hs,Xs=Ka,Js=Xa,eu=Ps;var tu=function(e,t){return Qs(e)&&Xs(t)?Js(eu(e),t):function(r){var n=Zs(r,e);return void 0===n&&n===t?$s(r,e):Ks(t,n,3)}};var ru=function(e){return function(t){return null==t?void 0:t[e]}},nu=Ts;var ou=function(e){return function(t){return nu(t,e)}},iu=ru,au=ou,su=hs,uu=Ps;var cu=function(e){return su(e)?iu(uu(e)):au(e)},hu=rs,lu=tu,fu=Wi,du=vr,pu=cu;var gu=function(e){return"function"==typeof e?e:null==e?fu:"object"==typeof e?du(e)?lu(e[0],e[1]):hu(e):pu(e)},vu=bn,yu=ra,_u=gu,mu=vr;var bu=function(e,t){return(mu(e)?vu:yu)(e,_u(t))},xu=Object.prototype.hasOwnProperty;var wu=function(e,t){return null!=e&&xu.call(e,t)},Eu=Hs;var ku=function(e,t){return null!=e&&Eu(e,t,wu)},Su=Zr,Du=mo,ju=gr,Cu=vr,Au=Xr,Ou=yr.exports,Iu=Ur,Pu=Fr,Fu=Object.prototype.hasOwnProperty;var Mu=function(e){if(null==e)return!0;if(Au(e)&&(Cu(e)||"string"==typeof e||"function"==typeof e.splice||Ou(e)||Pu(e)||ju(e)))return!e.length;var t=Du(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(Iu(e))return!Su(e).length;for(var r in e)if(Fu.call(e,r))return!1;return!0};var Tu=function(e){return void 0===e},Nu=qi,Lu=Xr;var Bu=function(e,t){var r=-1,n=Lu(e)?Array(e.length):[];return Nu(e,(function(e,o,i){n[++r]=t(e,o,i)})),n},Ru=ys,Vu=gu,zu=Bu,Gu=vr;var Uu=function(e,t){return(Gu(e)?Ru:zu)(e,Vu(t))};var Hu=function(e,t,r,n){var o=-1,i=null==e?0:e.length;for(n&&i&&(r=e[++o]);++o<i;)r=t(r,e[o],o,e);return r};var qu=function(e,t,r,n,o){return o(e,(function(e,o,i){r=n?(n=!1,e):t(r,e,o,i)})),r},Wu=Hu,Yu=qi,Ku=gu,Zu=qu,$u=vr;var Qu=function(e,t,r){var n=$u(e)?Wu:Zu,o=arguments.length<3;return n(e,Ku(t),r,o,Yu)},Xu=je,Ju=vr,ec=ir;var tc=function(e){return"string"==typeof e||!Ju(e)&&ec(e)&&"[object String]"==Xu(e)},rc=ru("length"),nc=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var oc=function(e){return nc.test(e)},ic="[\\ud800-\\udfff]",ac="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",sc="\\ud83c[\\udffb-\\udfff]",uc="[^\\ud800-\\udfff]",cc="(?:\\ud83c[\\udde6-\\uddff]){2}",hc="[\\ud800-\\udbff][\\udc00-\\udfff]",lc="(?:"+ac+"|"+sc+")"+"?",fc="[\\ufe0e\\ufe0f]?",dc=fc+lc+("(?:\\u200d(?:"+[uc,cc,hc].join("|")+")"+fc+lc+")*"),pc="(?:"+[uc+ac+"?",ac,cc,hc,ic].join("|")+")",gc=RegExp(sc+"(?="+sc+")|"+pc+dc,"g");var vc=rc,yc=oc,_c=function(e){for(var t=gc.lastIndex=0;gc.test(e);)++t;return t};var mc=Zr,bc=mo,xc=Xr,wc=tc,Ec=function(e){return yc(e)?_c(e):vc(e)};var kc=function(e){if(null==e)return 0;if(xc(e))return wc(e)?Ec(e):e.length;var t=bc(e);return"[object Map]"==t||"[object Set]"==t?e.size:mc(e).length},Sc=Wt,Dc=zo,jc=Gi,Cc=gu,Ac=In,Oc=vr,Ic=yr.exports,Pc=Pe,Fc=Ce,Mc=Fr;var Tc=function(e,t,r){var n=Oc(e),o=n||Ic(e)||Mc(e);if(t=Cc(t),null==r){var i=e&&e.constructor;r=o?n?new i:[]:Fc(e)&&Pc(i)?Dc(Ac(e)):{}}return(o?Sc:jc)(e,(function(e,n,o){return t(r,e,n,o)})),r},Nc=gr,Lc=vr,Bc=ge?ge.isConcatSpreadable:void 0;var Rc=function(e){return Lc(e)||Nc(e)||!!(Bc&&e&&e[Bc])},Vc=On,zc=Rc;var Gc=function e(t,r,n,o,i){var a=-1,s=t.length;for(n||(n=zc),i||(i=[]);++a<s;){var u=t[a];r>0&&n(u)?r>1?e(u,r-1,n,o,i):Vc(i,u):o||(i[i.length]=u)}return i};var Uc=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)},Hc=Math.max;var qc=function(e,t,r){return t=Hc(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=Hc(n.length-t,0),a=Array(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),Uc(e,this,s)}},Wc=Li,Yc=Kt,Kc=Yc?function(e,t){return Yc(e,"toString",{configurable:!0,enumerable:!1,value:Wc(t),writable:!0})}:Wi,Zc=Date.now;var $c=function(e){var t=0,r=0;return function(){var n=Zc(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},Qc=$c(Kc),Xc=Wi,Jc=qc,eh=Qc;var th=function(e,t){return eh(Jc(e,t,Xc),e+"")};var rh=function(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1};var nh=function(e){return e!=e};var oh=function(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1},ih=rh,ah=nh,sh=oh;var uh=function(e,t,r){return t==t?sh(e,t,r):ih(e,ah,r)},ch=uh;var hh=function(e,t){return!!(null==e?0:e.length)&&ch(e,t,0)>-1};var lh=function(e,t,r){for(var n=-1,o=null==e?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1};var fh=Jn,dh=function(){},ph=fh&&1/ya(new fh([,-0]))[1]==1/0?function(e){return new fh(e)}:dh,gh=ca,vh=hh,yh=lh,_h=la,mh=ph,bh=ya;var xh=function(e,t,r){var n=-1,o=vh,i=e.length,a=!0,s=[],u=s;if(r)a=!1,o=yh;else if(i>=200){var c=t?null:mh(e);if(c)return bh(c);a=!1,o=_h,u=new gh}else u=t?[]:s;e:for(;++n<i;){var h=e[n],l=t?t(h):h;if(h=r||0!==h?h:0,a&&l==l){for(var f=u.length;f--;)if(u[f]===l)continue e;t&&u.push(l),s.push(h)}else o(u,l,r)||(u!==s&&u.push(l),s.push(h))}return s},wh=Xr,Eh=ir;var kh=function(e){return Eh(e)&&wh(e)},Sh=Gc,Dh=xh,jh=kh,Ch=th((function(e){return Dh(Sh(e,1,jh,!0))})),Ah=ys;var Oh=function(e,t){return Ah(t,(function(t){return e[t]}))},Ih=rn;var Ph,Fh=function(e){return null==e?[]:Oh(e,Ih(e))};try{Ph={clone:Ni,constant:Li,each:ea,filter:bu,has:ku,isArray:vr,isEmpty:Mu,isFunction:Pe,isUndefined:Tu,keys:rn,map:Uu,reduce:Qu,size:kc,transform:Tc,union:Ch,values:Fh}}catch(e){}Ph||(Ph=window._);var Mh=Ph,Th=Mh,Nh=Bh,Lh="\0";function Bh(e){this._isDirected=!Th.has(e,"directed")||e.directed,this._isMultigraph=!!Th.has(e,"multigraph")&&e.multigraph,this._isCompound=!!Th.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=Th.constant(void 0),this._defaultEdgeLabelFn=Th.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function Rh(e,t){e[t]?e[t]++:e[t]=1}function Vh(e,t){--e[t]||delete e[t]}function zh(e,t,r,n){var o=""+t,i=""+r;if(!e&&o>i){var a=o;o=i,i=a}return o+""+i+""+(Th.isUndefined(n)?"\0":n)}function Gh(e,t,r,n){var o=""+t,i=""+r;if(!e&&o>i){var a=o;o=i,i=a}var s={v:o,w:i};return n&&(s.name=n),s}function Uh(e,t){return zh(e,t.v,t.w,t.name)}Bh.prototype._nodeCount=0,Bh.prototype._edgeCount=0,Bh.prototype.isDirected=function(){return this._isDirected},Bh.prototype.isMultigraph=function(){return this._isMultigraph},Bh.prototype.isCompound=function(){return this._isCompound},Bh.prototype.setGraph=function(e){return this._label=e,this},Bh.prototype.graph=function(){return this._label},Bh.prototype.setDefaultNodeLabel=function(e){return Th.isFunction(e)||(e=Th.constant(e)),this._defaultNodeLabelFn=e,this},Bh.prototype.nodeCount=function(){return this._nodeCount},Bh.prototype.nodes=function(){return Th.keys(this._nodes)},Bh.prototype.sources=function(){var e=this;return Th.filter(this.nodes(),(function(t){return Th.isEmpty(e._in[t])}))},Bh.prototype.sinks=function(){var e=this;return Th.filter(this.nodes(),(function(t){return Th.isEmpty(e._out[t])}))},Bh.prototype.setNodes=function(e,t){var r=arguments,n=this;return Th.each(e,(function(e){r.length>1?n.setNode(e,t):n.setNode(e)})),this},Bh.prototype.setNode=function(e,t){return Th.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=Lh,this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},Bh.prototype.node=function(e){return this._nodes[e]},Bh.prototype.hasNode=function(e){return Th.has(this._nodes,e)},Bh.prototype.removeNode=function(e){var t=this;if(Th.has(this._nodes,e)){var r=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],Th.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),Th.each(Th.keys(this._in[e]),r),delete this._in[e],delete this._preds[e],Th.each(Th.keys(this._out[e]),r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},Bh.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Th.isUndefined(t))t=Lh;else{for(var r=t+="";!Th.isUndefined(r);r=this.parent(r))if(r===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},Bh.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},Bh.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==Lh)return t}},Bh.prototype.children=function(e){if(Th.isUndefined(e)&&(e=Lh),this._isCompound){var t=this._children[e];if(t)return Th.keys(t)}else{if(e===Lh)return this.nodes();if(this.hasNode(e))return[]}},Bh.prototype.predecessors=function(e){var t=this._preds[e];if(t)return Th.keys(t)},Bh.prototype.successors=function(e){var t=this._sucs[e];if(t)return Th.keys(t)},Bh.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return Th.union(t,this.successors(e))},Bh.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},Bh.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var r=this;Th.each(this._nodes,(function(r,n){e(n)&&t.setNode(n,r)})),Th.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,r.edge(e))}));var n={};function o(e){var i=r.parent(e);return void 0===i||t.hasNode(i)?(n[e]=i,i):i in n?n[i]:o(i)}return this._isCompound&&Th.each(t.nodes(),(function(e){t.setParent(e,o(e))})),t},Bh.prototype.setDefaultEdgeLabel=function(e){return Th.isFunction(e)||(e=Th.constant(e)),this._defaultEdgeLabelFn=e,this},Bh.prototype.edgeCount=function(){return this._edgeCount},Bh.prototype.edges=function(){return Th.values(this._edgeObjs)},Bh.prototype.setPath=function(e,t){var r=this,n=arguments;return Th.reduce(e,(function(e,o){return n.length>1?r.setEdge(e,o,t):r.setEdge(e,o),o})),this},Bh.prototype.setEdge=function(){var e,t,r,n,o=!1,i=arguments[0];"object"==typeof i&&null!==i&&"v"in i?(e=i.v,t=i.w,r=i.name,2===arguments.length&&(n=arguments[1],o=!0)):(e=i,t=arguments[1],r=arguments[3],arguments.length>2&&(n=arguments[2],o=!0)),e=""+e,t=""+t,Th.isUndefined(r)||(r=""+r);var a=zh(this._isDirected,e,t,r);if(Th.has(this._edgeLabels,a))return o&&(this._edgeLabels[a]=n),this;if(!Th.isUndefined(r)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[a]=o?n:this._defaultEdgeLabelFn(e,t,r);var s=Gh(this._isDirected,e,t,r);return e=s.v,t=s.w,Object.freeze(s),this._edgeObjs[a]=s,Rh(this._preds[t],e),Rh(this._sucs[e],t),this._in[t][a]=s,this._out[e][a]=s,this._edgeCount++,this},Bh.prototype.edge=function(e,t,r){var n=1===arguments.length?Uh(this._isDirected,arguments[0]):zh(this._isDirected,e,t,r);return this._edgeLabels[n]},Bh.prototype.hasEdge=function(e,t,r){var n=1===arguments.length?Uh(this._isDirected,arguments[0]):zh(this._isDirected,e,t,r);return Th.has(this._edgeLabels,n)},Bh.prototype.removeEdge=function(e,t,r){var n=1===arguments.length?Uh(this._isDirected,arguments[0]):zh(this._isDirected,e,t,r),o=this._edgeObjs[n];return o&&(e=o.v,t=o.w,delete this._edgeLabels[n],delete this._edgeObjs[n],Vh(this._preds[t],e),Vh(this._sucs[e],t),delete this._in[t][n],delete this._out[e][n],this._edgeCount--),this},Bh.prototype.inEdges=function(e,t){var r=this._in[e];if(r){var n=Th.values(r);return t?Th.filter(n,(function(e){return e.v===t})):n}},Bh.prototype.outEdges=function(e,t){var r=this._out[e];if(r){var n=Th.values(r);return t?Th.filter(n,(function(e){return e.w===t})):n}},Bh.prototype.nodeEdges=function(e,t){var r=this.inEdges(e,t);if(r)return r.concat(this.outEdges(e,t))};var Hh={Graph:Nh,version:"2.1.8"},qh=Mh,Wh=Nh,Yh={write:function(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:Kh(e),edges:Zh(e)};qh.isUndefined(e.graph())||(t.value=qh.clone(e.graph()));return t},read:function(e){var t=new Wh(e.options).setGraph(e.value);return qh.each(e.nodes,(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)})),qh.each(e.edges,(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)})),t}};function Kh(e){return qh.map(e.nodes(),(function(t){var r=e.node(t),n=e.parent(t),o={v:t};return qh.isUndefined(r)||(o.value=r),qh.isUndefined(n)||(o.parent=n),o}))}function Zh(e){return qh.map(e.edges(),(function(t){var r=e.edge(t),n={v:t.v,w:t.w};return qh.isUndefined(t.name)||(n.name=t.name),qh.isUndefined(r)||(n.value=r),n}))}var $h=Mh,Qh=function(e){var t,r={},n=[];function o(n){$h.has(r,n)||(r[n]=!0,t.push(n),$h.each(e.successors(n),o),$h.each(e.predecessors(n),o))}return $h.each(e.nodes(),(function(e){t=[],o(e),t.length&&n.push(t)})),n};var Xh=Mh,Jh=el;function el(){this._arr=[],this._keyIndices={}}el.prototype.size=function(){return this._arr.length},el.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},el.prototype.has=function(e){return Xh.has(this._keyIndices,e)},el.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},el.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},el.prototype.add=function(e,t){var r=this._keyIndices;if(e=String(e),!Xh.has(r,e)){var n=this._arr,o=n.length;return r[e]=o,n.push({key:e,priority:t}),this._decrease(o),!0}return!1},el.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},el.prototype.decrease=function(e,t){var r=this._keyIndices[e];if(t>this._arr[r].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[r].priority+" New: "+t);this._arr[r].priority=t,this._decrease(r)},el.prototype._heapify=function(e){var t=this._arr,r=2*e,n=r+1,o=e;r<t.length&&(o=t[r].priority<t[o].priority?r:o,n<t.length&&(o=t[n].priority<t[o].priority?n:o),o!==e&&(this._swap(e,o),this._heapify(o)))},el.prototype._decrease=function(e){for(var t,r=this._arr,n=r[e].priority;0!==e&&!(r[t=e>>1].priority<n);)this._swap(e,t),e=t},el.prototype._swap=function(e,t){var r=this._arr,n=this._keyIndices,o=r[e],i=r[t];r[e]=i,r[t]=o,n[i.key]=e,n[o.key]=t};var tl=Jh,rl=function(e,t,r,n){return function(e,t,r,n){var o,i,a={},s=new tl,u=function(e){var t=e.v!==o?e.v:e.w,n=a[t],u=r(e),c=i.distance+u;if(u<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+u);c<n.distance&&(n.distance=c,n.predecessor=o,s.decrease(t,c))};e.nodes().forEach((function(e){var r=e===t?0:Number.POSITIVE_INFINITY;a[e]={distance:r},s.add(e,r)}));for(;s.size()>0&&(o=s.removeMin(),(i=a[o]).distance!==Number.POSITIVE_INFINITY);)n(o).forEach(u);return a}(e,String(t),r||nl,n||function(t){return e.outEdges(t)})},nl=Mh.constant(1);var ol=rl,il=Mh,al=function(e,t,r){return il.transform(e.nodes(),(function(n,o){n[o]=ol(e,o,t,r)}),{})};var sl=Mh,ul=function(e){var t=0,r=[],n={},o=[];function i(a){var s=n[a]={onStack:!0,lowlink:t,index:t++};if(r.push(a),e.successors(a).forEach((function(e){sl.has(n,e)?n[e].onStack&&(s.lowlink=Math.min(s.lowlink,n[e].index)):(i(e),s.lowlink=Math.min(s.lowlink,n[e].lowlink))})),s.lowlink===s.index){var u,c=[];do{u=r.pop(),n[u].onStack=!1,c.push(u)}while(a!==u);o.push(c)}}return e.nodes().forEach((function(e){sl.has(n,e)||i(e)})),o};var cl=Mh,hl=ul,ll=function(e){return cl.filter(hl(e),(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])}))};var fl=function(e,t,r){return function(e,t,r){var n={},o=e.nodes();return o.forEach((function(e){n[e]={},n[e][e]={distance:0},o.forEach((function(t){e!==t&&(n[e][t]={distance:Number.POSITIVE_INFINITY})})),r(e).forEach((function(r){var o=r.v===e?r.w:r.v,i=t(r);n[e][o]={distance:i,predecessor:e}}))})),o.forEach((function(e){var t=n[e];o.forEach((function(r){var i=n[r];o.forEach((function(r){var n=i[e],o=t[r],a=i[r],s=n.distance+o.distance;s<a.distance&&(a.distance=s,a.predecessor=o.predecessor)}))}))})),n}(e,t||dl,r||function(t){return e.outEdges(t)})},dl=Mh.constant(1);var pl=Mh,gl=vl;function vl(e){var t={},r={},n=[];if(pl.each(e.sinks(),(function o(i){if(pl.has(r,i))throw new yl;pl.has(t,i)||(r[i]=!0,t[i]=!0,pl.each(e.predecessors(i),o),delete r[i],n.push(i))})),pl.size(t)!==e.nodeCount())throw new yl;return n}function yl(){}vl.CycleException=yl,yl.prototype=new Error;var _l=gl;var ml=Mh,bl=function(e,t,r){ml.isArray(t)||(t=[t]);var n=(e.isDirected()?e.successors:e.neighbors).bind(e),o=[],i={};return ml.each(t,(function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);xl(e,t,"post"===r,i,n,o)})),o};function xl(e,t,r,n,o,i){ml.has(n,t)||(n[t]=!0,r||i.push(t),ml.each(o(t),(function(t){xl(e,t,r,n,o,i)})),r&&i.push(t))}var wl=bl;var El=bl;var kl=Mh,Sl=Nh,Dl=Jh;var jl,Cl={Graph:Hh.Graph,json:Yh,alg:{components:Qh,dijkstra:rl,dijkstraAll:al,findCycles:ll,floydWarshall:fl,isAcyclic:function(e){try{_l(e)}catch(e){if(e instanceof _l.CycleException)return!1;throw e}return!0},postorder:function(e,t){return wl(e,t,"post")},preorder:function(e,t){return El(e,t,"pre")},prim:function(e,t){var r,n=new Sl,o={},i=new Dl;function a(e){var n=e.v===r?e.w:e.v,a=i.priority(n);if(void 0!==a){var s=t(e);s<a&&(o[n]=r,i.decrease(n,s))}}if(0===e.nodeCount())return n;kl.each(e.nodes(),(function(e){i.add(e,Number.POSITIVE_INFINITY),n.setNode(e)})),i.decrease(e.nodes()[0],0);var s=!1;for(;i.size()>0;){if(r=i.removeMin(),kl.has(o,r))n.setEdge(r,o[r]);else{if(s)throw new Error("Input graph is not connected: "+e);s=!0}e.nodeEdges(r).forEach(a)}return n},tarjan:ul,topsort:gl},version:Hh.version};try{jl=Cl}catch(e){}jl||(jl=window.graphlib);var Al=jl,Ol=Mi;var Il=function(e){return Ol(e,5)},Pl=G,Fl=Xr,Ml=br,Tl=Ce;var Nl=function(e,t,r){if(!Tl(r))return!1;var n=typeof t;return!!("number"==n?Fl(r)&&Ml(t,r.length):"string"==n&&t in r)&&Pl(r[t],e)},Ll=th,Bl=G,Rl=Nl,Vl=pn,zl=Object.prototype,Gl=zl.hasOwnProperty,Ul=Ll((function(e,t){e=Object(e);var r=-1,n=t.length,o=n>2?t[2]:void 0;for(o&&Rl(t[0],t[1],o)&&(n=1);++r<n;)for(var i=t[r],a=Vl(i),s=-1,u=a.length;++s<u;){var c=a[s],h=e[c];(void 0===h||Bl(h,zl[c])&&!Gl.call(e,c))&&(e[c]=i[c])}return e})),Hl=Ul,ql=gu,Wl=Xr,Yl=rn;var Kl=function(e){return function(t,r,n){var o=Object(t);if(!Wl(t)){var i=ql(r);t=Yl(t),r=function(e){return i(o[e],e,o)}}var a=e(t,r,n);return a>-1?o[i?t[a]:a]:void 0}},Zl=/\s/;var $l=function(e){for(var t=e.length;t--&&Zl.test(e.charAt(t)););return t},Ql=$l,Xl=/^\s+/;var Jl=function(e){return e?e.slice(0,Ql(e)+1).replace(Xl,""):e},ef=Ce,tf=is,rf=/^[-+]0x[0-9a-f]+$/i,nf=/^0b[01]+$/i,of=/^0o[0-7]+$/i,af=parseInt;var sf=function(e){if("number"==typeof e)return e;if(tf(e))return NaN;if(ef(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ef(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Jl(e);var r=nf.test(e);return r||of.test(e)?af(e.slice(2),r?2:8):rf.test(e)?NaN:+e},uf=sf,cf=1/0;var hf=function(e){return e?(e=uf(e))===cf||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0},lf=hf;var ff=function(e){var t=lf(e),r=t%1;return t==t?r?t-r:t:0},df=rh,pf=gu,gf=ff,vf=Math.max;var yf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:gf(r);return o<0&&(o=vf(n+o,0)),df(e,pf(t),o)},_f=Kl(yf),mf=Gc;var bf=function(e){return(null==e?0:e.length)?mf(e,1):[]},xf=Ri,wf=Ki,Ef=pn;var kf=function(e,t){return null==e?e:xf(e,wf(t),Ef)};var Sf=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0},Df=$t,jf=Gi,Cf=gu;var Af=function(e,t){var r={};return t=Cf(t),jf(e,(function(e,n,o){Df(r,n,t(e,n,o))})),r},Of=is;var If=function(e,t,r){for(var n=-1,o=e.length;++n<o;){var i=e[n],a=t(i);if(null!=a&&(void 0===s?a==a&&!Of(a):r(a,s)))var s=a,u=i}return u};var Pf=function(e,t){return e>t},Ff=If,Mf=Pf,Tf=Wi;var Nf=function(e){return e&&e.length?Ff(e,Tf,Mf):void 0},Lf=$t,Bf=G;var Rf=function(e,t,r){(void 0!==r&&!Bf(e[t],r)||void 0===r&&!(t in e))&&Lf(e,t,r)},Vf=je,zf=In,Gf=ir,Uf=Function.prototype,Hf=Object.prototype,qf=Uf.toString,Wf=Hf.hasOwnProperty,Yf=qf.call(Object);var Kf=function(e){if(!Gf(e)||"[object Object]"!=Vf(e))return!1;var t=zf(e);if(null===t)return!0;var r=Wf.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&qf.call(r)==Yf};var Zf=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},$f=nr,Qf=pn;var Xf=function(e){return $f(e,Qf(e))},Jf=Rf,ed=_n.exports,td=Po,rd=mn,nd=qo,od=gr,id=vr,ad=kh,sd=yr.exports,ud=Pe,cd=Ce,hd=Kf,ld=Fr,fd=Zf,dd=Xf;var pd=qt,gd=Rf,vd=Ri,yd=function(e,t,r,n,o,i,a){var s=fd(e,r),u=fd(t,r),c=a.get(u);if(c)Jf(e,r,c);else{var h=i?i(s,u,r+"",e,t,a):void 0,l=void 0===h;if(l){var f=id(u),d=!f&&sd(u),p=!f&&!d&&ld(u);h=u,f||d||p?id(s)?h=s:ad(s)?h=rd(s):d?(l=!1,h=ed(u,!0)):p?(l=!1,h=td(u,!0)):h=[]:hd(u)||od(u)?(h=s,od(s)?h=dd(s):cd(s)&&!ud(s)||(h=nd(u))):l=!1}l&&(a.set(u,h),o(h,u,n,i,a),a.delete(u)),Jf(e,r,h)}},_d=Ce,md=pn,bd=Zf;var xd=function e(t,r,n,o,i){t!==r&&vd(r,(function(a,s){if(i||(i=new pd),_d(a))yd(t,r,s,n,e,o,i);else{var u=o?o(bd(t,s),a,s+"",t,r,i):void 0;void 0===u&&(u=a),gd(t,s,u)}}),md)},wd=th,Ed=Nl;var kd=function(e){return wd((function(t,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&Ed(r[0],r[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,i)}return t}))},Sd=xd,Dd=kd((function(e,t,r){Sd(e,t,r)}));var jd=function(e,t){return e<t},Cd=If,Ad=jd,Od=Wi;var Id=function(e){return e&&e.length?Cd(e,Od,Ad):void 0},Pd=If,Fd=gu,Md=jd;var Td=function(e,t){return e&&e.length?Pd(e,Fd(t),Md):void 0},Nd=pe,Ld=function(){return Nd.Date.now()},Bd=er,Rd=Os,Vd=br,zd=Ce,Gd=Ps;var Ud=function(e,t,r,n){if(!zd(e))return e;for(var o=-1,i=(t=Rd(t,e)).length,a=i-1,s=e;null!=s&&++o<i;){var u=Gd(t[o]),c=r;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(o!=a){var h=s[u];void 0===(c=n?n(h,u,s):void 0)&&(c=zd(h)?h:Vd(t[o+1])?[]:{})}Bd(s,u,c),s=s[u]}return e},Hd=Ts,qd=Ud,Wd=Os;var Yd=function(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],s=Hd(e,a);r(s,a)&&qd(i,Wd(a,e),s)}return i},Kd=Yd,Zd=Ys;var $d=function(e,t){return Kd(e,t,(function(t,r){return Zd(e,r)}))},Qd=bf,Xd=qc,Jd=Qc;var ep=$d,tp=function(e){return Jd(Xd(e,void 0,Qd),e+"")}((function(e,t){return null==e?{}:ep(e,t)})),rp=Math.ceil,np=Math.max;var op=function(e,t,r,n){for(var o=-1,i=np(rp((t-e)/(r||1)),0),a=Array(i);i--;)a[n?i:++o]=e,e+=r;return a},ip=op,ap=Nl,sp=hf;var up=function(e){return function(t,r,n){return n&&"number"!=typeof n&&ap(t,r,n)&&(r=n=void 0),t=sp(t),void 0===r?(r=t,t=0):r=sp(r),n=void 0===n?t<r?1:-1:sp(n),ip(t,r,n,e)}}();var cp=is;var hp=function(e,t){if(e!==t){var r=void 0!==e,n=null===e,o=e==e,i=cp(e),a=void 0!==t,s=null===t,u=t==t,c=cp(t);if(!s&&!c&&!i&&e>t||i&&a&&u&&!s&&!c||n&&a&&u||!r&&u||!o)return 1;if(!n&&!i&&!c&&e<t||c&&r&&o&&!n&&!i||s&&r&&o||!a&&o||!u)return-1}return 0},lp=hp;var fp=function(e,t,r){for(var n=-1,o=e.criteria,i=t.criteria,a=o.length,s=r.length;++n<a;){var u=lp(o[n],i[n]);if(u)return n>=s?u:u*("desc"==r[n]?-1:1)}return e.index-t.index},dp=ys,pp=Ts,gp=gu,vp=Bu,yp=function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e},_p=jr,mp=fp,bp=Wi,xp=vr;var wp=function(e,t,r){t=t.length?dp(t,(function(e){return xp(e)?function(t){return pp(t,1===e.length?e[0]:e)}:e})):[bp];var n=-1;t=dp(t,_p(gp));var o=vp(e,(function(e,r,o){return{criteria:dp(t,(function(t){return t(e)})),index:++n,value:e}}));return yp(o,(function(e,t){return mp(e,t,r)}))},Ep=Gc,kp=wp,Sp=Nl,Dp=th((function(e,t){if(null==e)return[];var r=t.length;return r>1&&Sp(e,t[0],t[1])?t=[]:r>2&&Sp(t[0],t[1],t[2])&&(t=[t[0]]),kp(e,Ep(t,1),[])})),jp=Ss,Cp=0;var Ap=function(e){var t=++Cp;return jp(e)+t};var Op=function(e,t,r){for(var n=-1,o=e.length,i=t.length,a={};++n<o;){var s=n<i?t[n]:void 0;r(a,e[n],s)}return a},Ip=er,Pp=Op;var Fp,Mp=function(e,t){return Pp(e||[],t||[],Ip)};try{Fp={cloneDeep:Il,constant:Li,defaults:Hl,each:ea,filter:bu,find:_f,flatten:bf,forEach:Ji,forIn:kf,has:ku,isUndefined:Tu,last:Sf,map:Uu,mapValues:Af,max:Nf,merge:Dd,min:Id,minBy:Td,now:Ld,pick:tp,range:up,reduce:Qu,sortBy:Dp,uniqueId:Ap,values:Fh,zipObject:Mp}}catch(e){}Fp||(Fp=window._);var Tp=Fp,Np=Lp;function Lp(){var e={};e._next=e._prev=e,this._sentinel=e}function Bp(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Rp(e,t){if("_next"!==e&&"_prev"!==e)return t}Lp.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return Bp(t),t},Lp.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&Bp(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},Lp.prototype.toString=function(){for(var e=[],t=this._sentinel,r=t._prev;r!==t;)e.push(JSON.stringify(r,Rp)),r=r._prev;return"["+e.join(", ")+"]"};var Vp=Tp,zp=Al.Graph,Gp=Np,Up=function(e,t){if(e.nodeCount()<=1)return[];var r=function(e,t){var r=new zp,n=0,o=0;Vp.forEach(e.nodes(),(function(e){r.setNode(e,{v:e,in:0,out:0})})),Vp.forEach(e.edges(),(function(e){var i=r.edge(e.v,e.w)||0,a=t(e),s=i+a;r.setEdge(e.v,e.w,s),o=Math.max(o,r.node(e.v).out+=a),n=Math.max(n,r.node(e.w).in+=a)}));var i=Vp.range(o+n+3).map((function(){return new Gp})),a=n+1;return Vp.forEach(r.nodes(),(function(e){Wp(i,a,r.node(e))})),{graph:r,buckets:i,zeroIdx:a}}(e,t||Hp),n=function(e,t,r){var n,o=[],i=t[t.length-1],a=t[0];for(;e.nodeCount();){for(;n=a.dequeue();)qp(e,t,r,n);for(;n=i.dequeue();)qp(e,t,r,n);if(e.nodeCount())for(var s=t.length-2;s>0;--s)if(n=t[s].dequeue()){o=o.concat(qp(e,t,r,n,!0));break}}return o}(r.graph,r.buckets,r.zeroIdx);return Vp.flatten(Vp.map(n,(function(t){return e.outEdges(t.v,t.w)})),!0)},Hp=Vp.constant(1);function qp(e,t,r,n,o){var i=o?[]:void 0;return Vp.forEach(e.inEdges(n.v),(function(n){var a=e.edge(n),s=e.node(n.v);o&&i.push({v:n.v,w:n.w}),s.out-=a,Wp(t,r,s)})),Vp.forEach(e.outEdges(n.v),(function(n){var o=e.edge(n),i=n.w,a=e.node(i);a.in-=o,Wp(t,r,a)})),e.removeNode(n.v),i}function Wp(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}var Yp=Tp,Kp=Up,Zp={run:function(e){var t="greedy"===e.graph().acyclicer?Kp(e,function(e){return function(t){return e.edge(t).weight}}(e)):function(e){var t=[],r={},n={};function o(i){Yp.has(n,i)||(n[i]=!0,r[i]=!0,Yp.forEach(e.outEdges(i),(function(e){Yp.has(r,e.w)?t.push(e):o(e.w)})),delete r[i])}return Yp.forEach(e.nodes(),o),t}(e);Yp.forEach(t,(function(t){var r=e.edge(t);e.removeEdge(t),r.forwardName=t.name,r.reversed=!0,e.setEdge(t.w,t.v,r,Yp.uniqueId("rev"))}))},undo:function(e){Yp.forEach(e.edges(),(function(t){var r=e.edge(t);if(r.reversed){e.removeEdge(t);var n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}}))}};var $p=Tp,Qp=Al.Graph,Xp={addDummyNode:Jp,simplify:function(e){var t=(new Qp).setGraph(e.graph());return $p.forEach(e.nodes(),(function(r){t.setNode(r,e.node(r))})),$p.forEach(e.edges(),(function(r){var n=t.edge(r.v,r.w)||{weight:0,minlen:1},o=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+o.weight,minlen:Math.max(n.minlen,o.minlen)})})),t},asNonCompoundGraph:function(e){var t=new Qp({multigraph:e.isMultigraph()}).setGraph(e.graph());return $p.forEach(e.nodes(),(function(r){e.children(r).length||t.setNode(r,e.node(r))})),$p.forEach(e.edges(),(function(r){t.setEdge(r,e.edge(r))})),t},successorWeights:function(e){var t=$p.map(e.nodes(),(function(t){var r={};return $p.forEach(e.outEdges(t),(function(t){r[t.w]=(r[t.w]||0)+e.edge(t).weight})),r}));return $p.zipObject(e.nodes(),t)},predecessorWeights:function(e){var t=$p.map(e.nodes(),(function(t){var r={};return $p.forEach(e.inEdges(t),(function(t){r[t.v]=(r[t.v]||0)+e.edge(t).weight})),r}));return $p.zipObject(e.nodes(),t)},intersectRect:function(e,t){var r,n,o=e.x,i=e.y,a=t.x-o,s=t.y-i,u=e.width/2,c=e.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(s)*u>Math.abs(a)*c?(s<0&&(c=-c),r=c*a/s,n=c):(a<0&&(u=-u),r=u,n=u*s/a);return{x:o+r,y:i+n}},buildLayerMatrix:function(e){var t=$p.map($p.range(eg(e)+1),(function(){return[]}));return $p.forEach(e.nodes(),(function(r){var n=e.node(r),o=n.rank;$p.isUndefined(o)||(t[o][n.order]=r)})),t},normalizeRanks:function(e){var t=$p.min($p.map(e.nodes(),(function(t){return e.node(t).rank})));$p.forEach(e.nodes(),(function(r){var n=e.node(r);$p.has(n,"rank")&&(n.rank-=t)}))},removeEmptyRanks:function(e){var t=$p.min($p.map(e.nodes(),(function(t){return e.node(t).rank}))),r=[];$p.forEach(e.nodes(),(function(n){var o=e.node(n).rank-t;r[o]||(r[o]=[]),r[o].push(n)}));var n=0,o=e.graph().nodeRankFactor;$p.forEach(r,(function(t,r){$p.isUndefined(t)&&r%o!=0?--n:n&&$p.forEach(t,(function(t){e.node(t).rank+=n}))}))},addBorderNode:function(e,t,r,n){var o={width:0,height:0};arguments.length>=4&&(o.rank=r,o.order=n);return Jp(e,"border",o,t)},maxRank:eg,partition:function(e,t){var r={lhs:[],rhs:[]};return $p.forEach(e,(function(e){t(e)?r.lhs.push(e):r.rhs.push(e)})),r},time:function(e,t){var r=$p.now();try{return t()}finally{console.log(e+" time: "+($p.now()-r)+"ms")}},notime:function(e,t){return t()}};function Jp(e,t,r,n){var o;do{o=$p.uniqueId(n)}while(e.hasNode(o));return r.dummy=t,e.setNode(o,r),o}function eg(e){return $p.max($p.map(e.nodes(),(function(t){var r=e.node(t).rank;if(!$p.isUndefined(r))return r})))}var tg=Tp,rg=Xp,ng={run:function(e){e.graph().dummyChains=[],tg.forEach(e.edges(),(function(t){!function(e,t){var r,n,o,i=t.v,a=e.node(i).rank,s=t.w,u=e.node(s).rank,c=t.name,h=e.edge(t),l=h.labelRank;if(u===a+1)return;for(e.removeEdge(t),o=0,++a;a<u;++o,++a)h.points=[],n={width:0,height:0,edgeLabel:h,edgeObj:t,rank:a},r=rg.addDummyNode(e,"edge",n,"_d"),a===l&&(n.width=h.width,n.height=h.height,n.dummy="edge-label",n.labelpos=h.labelpos),e.setEdge(i,r,{weight:h.weight},c),0===o&&e.graph().dummyChains.push(r),i=r;e.setEdge(i,s,{weight:h.weight},c)}(e,t)}))},undo:function(e){tg.forEach(e.graph().dummyChains,(function(t){var r,n=e.node(t),o=n.edgeLabel;for(e.setEdge(n.edgeObj,o);n.dummy;)r=e.successors(t)[0],e.removeNode(t),o.points.push({x:n.x,y:n.y}),"edge-label"===n.dummy&&(o.x=n.x,o.y=n.y,o.width=n.width,o.height=n.height),t=r,n=e.node(t)}))}};var og=Tp,ig={longestPath:function(e){var t={};og.forEach(e.sources(),(function r(n){var o=e.node(n);if(og.has(t,n))return o.rank;t[n]=!0;var i=og.min(og.map(e.outEdges(n),(function(t){return r(t.w)-e.edge(t).minlen})));return i!==Number.POSITIVE_INFINITY&&null!=i||(i=0),o.rank=i}))},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}};var ag=Tp,sg=Al.Graph,ug=ig.slack,cg=function(e){var t,r,n=new sg({directed:!1}),o=e.nodes()[0],i=e.nodeCount();n.setNode(o,{});for(;hg(n,e)<i;)t=lg(n,e),r=n.hasNode(t.v)?ug(e,t):-ug(e,t),fg(n,e,r);return n};function hg(e,t){return ag.forEach(e.nodes(),(function r(n){ag.forEach(t.nodeEdges(n),(function(o){var i=o.v,a=n===i?o.w:i;e.hasNode(a)||ug(t,o)||(e.setNode(a,{}),e.setEdge(n,a,{}),r(a))}))})),e.nodeCount()}function lg(e,t){return ag.minBy(t.edges(),(function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return ug(t,r)}))}function fg(e,t,r){ag.forEach(e.nodes(),(function(e){t.node(e).rank+=r}))}var dg=Tp,pg=cg,gg=ig.slack,vg=ig.longestPath,yg=Al.alg.preorder,_g=Al.alg.postorder,mg=Xp.simplify,bg=xg;function xg(e){e=mg(e),vg(e);var t,r=pg(e);for(kg(r),wg(r,e);t=Dg(r);)Cg(r,e,t,jg(r,e,t))}function wg(e,t){var r=_g(e,e.nodes());r=r.slice(0,r.length-1),dg.forEach(r,(function(r){!function(e,t,r){var n=e.node(r).parent;e.edge(r,n).cutvalue=Eg(e,t,r)}(e,t,r)}))}function Eg(e,t,r){var n=e.node(r).parent,o=!0,i=t.edge(r,n),a=0;return i||(o=!1,i=t.edge(n,r)),a=i.weight,dg.forEach(t.nodeEdges(r),(function(i){var s=i.v===r,u=s?i.w:i.v;if(u!==n){var c=s===o,h=t.edge(i).weight;if(a+=c?h:-h,function(e,t,r){return e.hasEdge(t,r)}(e,r,u)){var l=e.edge(r,u).cutvalue;a+=c?-l:l}}})),a}function kg(e,t){arguments.length<2&&(t=e.nodes()[0]),Sg(e,{},1,t)}function Sg(e,t,r,n,o){var i=r,a=e.node(n);return t[n]=!0,dg.forEach(e.neighbors(n),(function(o){dg.has(t,o)||(r=Sg(e,t,r,o,n))})),a.low=i,a.lim=r++,o?a.parent=o:delete a.parent,r}function Dg(e){return dg.find(e.edges(),(function(t){return e.edge(t).cutvalue<0}))}function jg(e,t,r){var n=r.v,o=r.w;t.hasEdge(n,o)||(n=r.w,o=r.v);var i=e.node(n),a=e.node(o),s=i,u=!1;i.lim>a.lim&&(s=a,u=!0);var c=dg.filter(t.edges(),(function(t){return u===Ag(e,e.node(t.v),s)&&u!==Ag(e,e.node(t.w),s)}));return dg.minBy(c,(function(e){return gg(t,e)}))}function Cg(e,t,r,n){var o=r.v,i=r.w;e.removeEdge(o,i),e.setEdge(n.v,n.w,{}),kg(e),wg(e,t),function(e,t){var r=dg.find(e.nodes(),(function(e){return!t.node(e).parent})),n=yg(e,r);n=n.slice(1),dg.forEach(n,(function(r){var n=e.node(r).parent,o=t.edge(r,n),i=!1;o||(o=t.edge(n,r),i=!0),t.node(r).rank=t.node(n).rank+(i?o.minlen:-o.minlen)}))}(e,t)}function Ag(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}xg.initLowLimValues=kg,xg.initCutValues=wg,xg.calcCutValue=Eg,xg.leaveEdge=Dg,xg.enterEdge=jg,xg.exchangeEdges=Cg;var Og=ig.longestPath,Ig=cg,Pg=bg,Fg=function(e){switch(e.graph().ranker){case"network-simplex":default:Tg(e);break;case"tight-tree":!function(e){Og(e),Ig(e)}(e);break;case"longest-path":Mg(e)}};var Mg=Og;function Tg(e){Pg(e)}var Ng=Tp,Lg=function(e){var t=function(e){var t={},r=0;function n(o){var i=r;Ng.forEach(e.children(o),n),t[o]={low:i,lim:r++}}return Ng.forEach(e.children(),n),t}(e);Ng.forEach(e.graph().dummyChains,(function(r){for(var n=e.node(r),o=n.edgeObj,i=function(e,t,r,n){var o,i,a=[],s=[],u=Math.min(t[r].low,t[n].low),c=Math.max(t[r].lim,t[n].lim);o=r;do{o=e.parent(o),a.push(o)}while(o&&(t[o].low>u||c>t[o].lim));i=o,o=n;for(;(o=e.parent(o))!==i;)s.push(o);return{path:a.concat(s.reverse()),lca:i}}(e,t,o.v,o.w),a=i.path,s=i.lca,u=0,c=a[u],h=!0;r!==o.w;){if(n=e.node(r),h){for(;(c=a[u])!==s&&e.node(c).maxRank<n.rank;)u++;c===s&&(h=!1)}if(!h){for(;u<a.length-1&&e.node(c=a[u+1]).minRank<=n.rank;)u++;c=a[u]}e.setParent(r,c),r=e.successors(r)[0]}}))};var Bg=Tp,Rg=Xp,Vg={run:function(e){var t=Rg.addDummyNode(e,"root",{},"_root"),r=function(e){var t={};function r(n,o){var i=e.children(n);i&&i.length&&Bg.forEach(i,(function(e){r(e,o+1)})),t[n]=o}return Bg.forEach(e.children(),(function(e){r(e,1)})),t}(e),n=Bg.max(Bg.values(r))-1,o=2*n+1;e.graph().nestingRoot=t,Bg.forEach(e.edges(),(function(t){e.edge(t).minlen*=o}));var i=function(e){return Bg.reduce(e.edges(),(function(t,r){return t+e.edge(r).weight}),0)}(e)+1;Bg.forEach(e.children(),(function(a){zg(e,t,o,i,n,r,a)})),e.graph().nodeRankFactor=o},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,Bg.forEach(e.edges(),(function(t){e.edge(t).nestingEdge&&e.removeEdge(t)}))}};function zg(e,t,r,n,o,i,a){var s=e.children(a);if(s.length){var u=Rg.addBorderNode(e,"_bt"),c=Rg.addBorderNode(e,"_bb"),h=e.node(a);e.setParent(u,a),h.borderTop=u,e.setParent(c,a),h.borderBottom=c,Bg.forEach(s,(function(s){zg(e,t,r,n,o,i,s);var h=e.node(s),l=h.borderTop?h.borderTop:s,f=h.borderBottom?h.borderBottom:s,d=h.borderTop?n:2*n,p=l!==f?1:o-i[a]+1;e.setEdge(u,l,{weight:d,minlen:p,nestingEdge:!0}),e.setEdge(f,c,{weight:d,minlen:p,nestingEdge:!0})})),e.parent(a)||e.setEdge(t,u,{weight:0,minlen:o+i[a]})}else a!==t&&e.setEdge(t,a,{weight:0,minlen:r})}var Gg=Tp,Ug=Xp,Hg=function(e){Gg.forEach(e.children(),(function t(r){var n=e.children(r),o=e.node(r);if(n.length&&Gg.forEach(n,t),Gg.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var i=o.minRank,a=o.maxRank+1;i<a;++i)qg(e,"borderLeft","_bl",r,o,i),qg(e,"borderRight","_br",r,o,i)}}))};function qg(e,t,r,n,o,i){var a={width:0,height:0,rank:i,borderType:t},s=o[t][i-1],u=Ug.addDummyNode(e,"border",a,r);o[t][i]=u,e.setParent(u,n),s&&e.setEdge(s,u,{weight:1})}var Wg=Tp,Yg={adjust:function(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||Kg(e)},undo:function(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||function(e){Wg.forEach(e.nodes(),(function(t){$g(e.node(t))})),Wg.forEach(e.edges(),(function(t){var r=e.edge(t);Wg.forEach(r.points,$g),Wg.has(r,"y")&&$g(r)}))}(e);"lr"!==t&&"rl"!==t||(!function(e){Wg.forEach(e.nodes(),(function(t){Qg(e.node(t))})),Wg.forEach(e.edges(),(function(t){var r=e.edge(t);Wg.forEach(r.points,Qg),Wg.has(r,"x")&&Qg(r)}))}(e),Kg(e))}};function Kg(e){Wg.forEach(e.nodes(),(function(t){Zg(e.node(t))})),Wg.forEach(e.edges(),(function(t){Zg(e.edge(t))}))}function Zg(e){var t=e.width;e.width=e.height,e.height=t}function $g(e){e.y=-e.y}function Qg(e){var t=e.x;e.x=e.y,e.y=t}var Xg=Tp,Jg=function(e){var t={},r=Xg.filter(e.nodes(),(function(t){return!e.children(t).length})),n=Xg.max(Xg.map(r,(function(t){return e.node(t).rank}))),o=Xg.map(Xg.range(n+1),(function(){return[]}));function i(r){if(!Xg.has(t,r)){t[r]=!0;var n=e.node(r);o[n.rank].push(r),Xg.forEach(e.successors(r),i)}}var a=Xg.sortBy(r,(function(t){return e.node(t).rank}));return Xg.forEach(a,i),o};var ev=Tp,tv=function(e,t){for(var r=0,n=1;n<t.length;++n)r+=rv(e,t[n-1],t[n]);return r};function rv(e,t,r){for(var n=ev.zipObject(r,ev.map(r,(function(e,t){return t}))),o=ev.flatten(ev.map(t,(function(t){return ev.sortBy(ev.map(e.outEdges(t),(function(t){return{pos:n[t.w],weight:e.edge(t).weight}})),"pos")})),!0),i=1;i<r.length;)i<<=1;var a=2*i-1;i-=1;var s=ev.map(new Array(a),(function(){return 0})),u=0;return ev.forEach(o.forEach((function(e){var t=e.pos+i;s[t]+=e.weight;for(var r=0;t>0;)t%2&&(r+=s[t+1]),s[t=t-1>>1]+=e.weight;u+=e.weight*r}))),u}var nv=Tp;var ov=Tp;var iv=Tp,av=Xp;function sv(e,t,r){for(var n;t.length&&(n=iv.last(t)).i<=r;)t.pop(),e.push(n.vs),r++;return r}var uv=Tp,cv=function(e,t){return nv.map(t,(function(t){var r=e.inEdges(t);if(r.length){var n=nv.reduce(r,(function(t,r){var n=e.edge(r),o=e.node(r.v);return{sum:t.sum+n.weight*o.order,weight:t.weight+n.weight}}),{sum:0,weight:0});return{v:t,barycenter:n.sum/n.weight,weight:n.weight}}return{v:t}}))},hv=function(e,t){var r={};return ov.forEach(e,(function(e,t){var n=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};ov.isUndefined(e.barycenter)||(n.barycenter=e.barycenter,n.weight=e.weight)})),ov.forEach(t.edges(),(function(e){var t=r[e.v],n=r[e.w];ov.isUndefined(t)||ov.isUndefined(n)||(n.indegree++,t.out.push(r[e.w]))})),function(e){var t=[];function r(e){return function(t){t.merged||(ov.isUndefined(t.barycenter)||ov.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&function(e,t){var r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight);t.weight&&(r+=t.barycenter*t.weight,n+=t.weight);e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}function n(t){return function(r){r.in.push(t),0==--r.indegree&&e.push(r)}}for(;e.length;){var o=e.pop();t.push(o),ov.forEach(o.in.reverse(),r(o)),ov.forEach(o.out,n(o))}return ov.map(ov.filter(t,(function(e){return!e.merged})),(function(e){return ov.pick(e,["vs","i","barycenter","weight"])}))}(ov.filter(r,(function(e){return!e.indegree})))},lv=function(e,t){var r=av.partition(e,(function(e){return iv.has(e,"barycenter")})),n=r.lhs,o=iv.sortBy(r.rhs,(function(e){return-e.i})),i=[],a=0,s=0,u=0;n.sort((c=!!t,function(e,t){return e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:c?t.i-e.i:e.i-t.i})),u=sv(i,o,u),iv.forEach(n,(function(e){u+=e.vs.length,i.push(e.vs),a+=e.barycenter*e.weight,s+=e.weight,u=sv(i,o,u)}));var c;var h={vs:iv.flatten(i,!0)};s&&(h.barycenter=a/s,h.weight=s);return h},fv=function e(t,r,n,o){var i=t.children(r),a=t.node(r),s=a?a.borderLeft:void 0,u=a?a.borderRight:void 0,c={};s&&(i=uv.filter(i,(function(e){return e!==s&&e!==u})));var h=cv(t,i);uv.forEach(h,(function(r){if(t.children(r.v).length){var i=e(t,r.v,n,o);c[r.v]=i,uv.has(i,"barycenter")&&(a=r,s=i,uv.isUndefined(a.barycenter)?(a.barycenter=s.barycenter,a.weight=s.weight):(a.barycenter=(a.barycenter*a.weight+s.barycenter*s.weight)/(a.weight+s.weight),a.weight+=s.weight))}var a,s}));var l=hv(h,n);!function(e,t){uv.forEach(e,(function(e){e.vs=uv.flatten(e.vs.map((function(e){return t[e]?t[e].vs:e})),!0)}))}(l,c);var f=lv(l,o);if(s&&(f.vs=uv.flatten([s,f.vs,u],!0),t.predecessors(s).length)){var d=t.node(t.predecessors(s)[0]),p=t.node(t.predecessors(u)[0]);uv.has(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+d.order+p.order)/(f.weight+2),f.weight+=2}return f};var dv=Tp,pv=Al.Graph,gv=function(e,t,r){var n=function(e){var t;for(;e.hasNode(t=dv.uniqueId("_root")););return t}(e),o=new pv({compound:!0}).setGraph({root:n}).setDefaultNodeLabel((function(t){return e.node(t)}));return dv.forEach(e.nodes(),(function(i){var a=e.node(i),s=e.parent(i);(a.rank===t||a.minRank<=t&&t<=a.maxRank)&&(o.setNode(i),o.setParent(i,s||n),dv.forEach(e[r](i),(function(t){var r=t.v===i?t.w:t.v,n=o.edge(r,i),a=dv.isUndefined(n)?0:n.weight;o.setEdge(r,i,{weight:e.edge(t).weight+a})})),dv.has(a,"minRank")&&o.setNode(i,{borderLeft:a.borderLeft[t],borderRight:a.borderRight[t]}))})),o};var vv=Tp;var yv=Tp,_v=Jg,mv=tv,bv=fv,xv=gv,wv=function(e,t,r){var n,o={};vv.forEach(r,(function(r){for(var i,a,s=e.parent(r);s;){if((i=e.parent(s))?(a=o[i],o[i]=s):(a=n,n=s),a&&a!==s)return void t.setEdge(a,s);s=i}}))},Ev=Al.Graph,kv=Xp,Sv=function(e){var t=kv.maxRank(e),r=Dv(e,yv.range(1,t+1),"inEdges"),n=Dv(e,yv.range(t-1,-1,-1),"outEdges"),o=_v(e);Cv(e,o);for(var i,a=Number.POSITIVE_INFINITY,s=0,u=0;u<4;++s,++u){jv(s%2?r:n,s%4>=2),o=kv.buildLayerMatrix(e);var c=mv(e,o);c<a&&(u=0,i=yv.cloneDeep(o),a=c)}Cv(e,i)};function Dv(e,t,r){return yv.map(t,(function(t){return xv(e,t,r)}))}function jv(e,t){var r=new Ev;yv.forEach(e,(function(e){var n=e.graph().root,o=bv(e,n,r,t);yv.forEach(o.vs,(function(t,r){e.node(t).order=r})),wv(e,r,o.vs)}))}function Cv(e,t){yv.forEach(t,(function(t){yv.forEach(t,(function(t,r){e.node(t).order=r}))}))}var Av=Tp,Ov=Al.Graph,Iv=Xp,Pv=function(e){var t,r=Iv.buildLayerMatrix(e),n=Av.merge(Fv(e,r),Mv(e,r)),o={};Av.forEach(["u","d"],(function(i){t="u"===i?r:Av.values(r).reverse(),Av.forEach(["l","r"],(function(r){"r"===r&&(t=Av.map(t,(function(e){return Av.values(e).reverse()})));var a=("u"===i?e.predecessors:e.successors).bind(e),s=Lv(e,t,n,a),u=Bv(e,t,s.root,s.align,"r"===r);"r"===r&&(u=Av.mapValues(u,(function(e){return-e}))),o[i+r]=u}))}));var i=Rv(e,o);return Vv(o,i),zv(o,e.graph().align)};function Fv(e,t){var r={};return Av.reduce(t,(function(t,n){var o=0,i=0,a=t.length,s=Av.last(n);return Av.forEach(n,(function(t,u){var c=function(e,t){if(e.node(t).dummy)return Av.find(e.predecessors(t),(function(t){return e.node(t).dummy}))}(e,t),h=c?e.node(c).order:a;(c||t===s)&&(Av.forEach(n.slice(i,u+1),(function(t){Av.forEach(e.predecessors(t),(function(n){var i=e.node(n),a=i.order;!(a<o||h<a)||i.dummy&&e.node(t).dummy||Tv(r,n,t)}))})),i=u+1,o=h)})),n})),r}function Mv(e,t){var r={};function n(t,n,o,i,a){var s;Av.forEach(Av.range(n,o),(function(n){s=t[n],e.node(s).dummy&&Av.forEach(e.predecessors(s),(function(t){var n=e.node(t);n.dummy&&(n.order<i||n.order>a)&&Tv(r,t,s)}))}))}return Av.reduce(t,(function(t,r){var o,i=-1,a=0;return Av.forEach(r,(function(s,u){if("border"===e.node(s).dummy){var c=e.predecessors(s);c.length&&(o=e.node(c[0]).order,n(r,a,u,i,o),a=u,i=o)}n(r,a,r.length,o,t.length)})),r})),r}function Tv(e,t,r){if(t>r){var n=t;t=r,r=n}var o=e[t];o||(e[t]=o={}),o[r]=!0}function Nv(e,t,r){if(t>r){var n=t;t=r,r=n}return Av.has(e[t],r)}function Lv(e,t,r,n){var o={},i={},a={};return Av.forEach(t,(function(e){Av.forEach(e,(function(e,t){o[e]=e,i[e]=e,a[e]=t}))})),Av.forEach(t,(function(e){var t=-1;Av.forEach(e,(function(e){var s=n(e);if(s.length){s=Av.sortBy(s,(function(e){return a[e]}));for(var u=(s.length-1)/2,c=Math.floor(u),h=Math.ceil(u);c<=h;++c){var l=s[c];i[e]===e&&t<a[l]&&!Nv(r,e,l)&&(i[l]=e,i[e]=o[e]=o[l],t=a[l])}}}))})),{root:o,align:i}}function Bv(e,t,r,n,o){var i={},a=function(e,t,r,n){var o=new Ov,i=e.graph(),a=function(e,t,r){return function(n,o,i){var a,s=n.node(o),u=n.node(i),c=0;if(c+=s.width/2,Av.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":a=-s.width/2;break;case"r":a=s.width/2}if(a&&(c+=r?a:-a),a=0,c+=(s.dummy?t:e)/2,c+=(u.dummy?t:e)/2,c+=u.width/2,Av.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":a=u.width/2;break;case"r":a=-u.width/2}return a&&(c+=r?a:-a),a=0,c}}(i.nodesep,i.edgesep,n);return Av.forEach(t,(function(t){var n;Av.forEach(t,(function(t){var i=r[t];if(o.setNode(i),n){var s=r[n],u=o.edge(s,i);o.setEdge(s,i,Math.max(a(e,t,n),u||0))}n=t}))})),o}(e,t,r,o),s=o?"borderLeft":"borderRight";function u(e,t){for(var r=a.nodes(),n=r.pop(),o={};n;)o[n]?e(n):(o[n]=!0,r.push(n),r=r.concat(t(n))),n=r.pop()}return u((function(e){i[e]=a.inEdges(e).reduce((function(e,t){return Math.max(e,i[t.v]+a.edge(t))}),0)}),a.predecessors.bind(a)),u((function(t){var r=a.outEdges(t).reduce((function(e,t){return Math.min(e,i[t.w]-a.edge(t))}),Number.POSITIVE_INFINITY),n=e.node(t);r!==Number.POSITIVE_INFINITY&&n.borderType!==s&&(i[t]=Math.max(i[t],r))}),a.successors.bind(a)),Av.forEach(n,(function(e){i[e]=i[r[e]]})),i}function Rv(e,t){return Av.minBy(Av.values(t),(function(t){var r=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY;return Av.forIn(t,(function(t,o){var i=function(e,t){return e.node(t).width}(e,o)/2;r=Math.max(t+i,r),n=Math.min(t-i,n)})),r-n}))}function Vv(e,t){var r=Av.values(t),n=Av.min(r),o=Av.max(r);Av.forEach(["u","d"],(function(r){Av.forEach(["l","r"],(function(i){var a,s=r+i,u=e[s];if(u!==t){var c=Av.values(u);(a="l"===i?n-Av.min(c):o-Av.max(c))&&(e[s]=Av.mapValues(u,(function(e){return e+a})))}}))}))}function zv(e,t){return Av.mapValues(e.ul,(function(r,n){if(t)return e[t.toLowerCase()][n];var o=Av.sortBy(Av.map(e,n));return(o[1]+o[2])/2}))}var Gv=Tp,Uv=Xp,Hv=Pv,qv=function(e){(function(e){var t=Uv.buildLayerMatrix(e),r=e.graph().ranksep,n=0;Gv.forEach(t,(function(t){var o=Gv.max(Gv.map(t,(function(t){return e.node(t).height})));Gv.forEach(t,(function(t){e.node(t).y=n+o/2})),n+=o+r}))})(e=Uv.asNonCompoundGraph(e)),Gv.forEach(Hv(e),(function(t,r){e.node(r).x=t}))};var Wv=Tp,Yv=Zp,Kv=ng,Zv=Fg,$v=Xp.normalizeRanks,Qv=Lg,Xv=Xp.removeEmptyRanks,Jv=Vg,ey=Hg,ty=Yg,ry=Sv,ny=qv,oy=Xp,iy=Al.Graph,ay=function(e,t){var r=t&&t.debugTiming?oy.time:oy.notime;r("layout",(function(){var t=r(" buildLayoutGraph",(function(){return function(e){var t=new iy({multigraph:!0,compound:!0}),r=vy(e.graph());return t.setGraph(Wv.merge({},uy,gy(r,sy),Wv.pick(r,cy))),Wv.forEach(e.nodes(),(function(r){var n=vy(e.node(r));t.setNode(r,Wv.defaults(gy(n,hy),ly)),t.setParent(r,e.parent(r))})),Wv.forEach(e.edges(),(function(r){var n=vy(e.edge(r));t.setEdge(r,Wv.merge({},dy,gy(n,fy),Wv.pick(n,py)))})),t}(e)}));r(" runLayout",(function(){!function(e,t){t(" makeSpaceForEdgeLabels",(function(){!function(e){var t=e.graph();t.ranksep/=2,Wv.forEach(e.edges(),(function(r){var n=e.edge(r);n.minlen*=2,"c"!==n.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?n.width+=n.labeloffset:n.height+=n.labeloffset)}))}(e)})),t(" removeSelfEdges",(function(){!function(e){Wv.forEach(e.edges(),(function(t){if(t.v===t.w){var r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}}))}(e)})),t(" acyclic",(function(){Yv.run(e)})),t(" nestingGraph.run",(function(){Jv.run(e)})),t(" rank",(function(){Zv(oy.asNonCompoundGraph(e))})),t(" injectEdgeLabelProxies",(function(){!function(e){Wv.forEach(e.edges(),(function(t){var r=e.edge(t);if(r.width&&r.height){var n=e.node(t.v),o={rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t};oy.addDummyNode(e,"edge-proxy",o,"_ep")}}))}(e)})),t(" removeEmptyRanks",(function(){Xv(e)})),t(" nestingGraph.cleanup",(function(){Jv.cleanup(e)})),t(" normalizeRanks",(function(){$v(e)})),t(" assignRankMinMax",(function(){!function(e){var t=0;Wv.forEach(e.nodes(),(function(r){var n=e.node(r);n.borderTop&&(n.minRank=e.node(n.borderTop).rank,n.maxRank=e.node(n.borderBottom).rank,t=Wv.max(t,n.maxRank))})),e.graph().maxRank=t}(e)})),t(" removeEdgeLabelProxies",(function(){!function(e){Wv.forEach(e.nodes(),(function(t){var r=e.node(t);"edge-proxy"===r.dummy&&(e.edge(r.e).labelRank=r.rank,e.removeNode(t))}))}(e)})),t(" normalize.run",(function(){Kv.run(e)})),t(" parentDummyChains",(function(){Qv(e)})),t(" addBorderSegments",(function(){ey(e)})),t(" order",(function(){ry(e)})),t(" insertSelfEdges",(function(){!function(e){var t=oy.buildLayerMatrix(e);Wv.forEach(t,(function(t){var r=0;Wv.forEach(t,(function(t,n){var o=e.node(t);o.order=n+r,Wv.forEach(o.selfEdges,(function(t){oy.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:o.rank,order:n+ ++r,e:t.e,label:t.label},"_se")})),delete o.selfEdges}))}))}(e)})),t(" adjustCoordinateSystem",(function(){ty.adjust(e)})),t(" position",(function(){ny(e)})),t(" positionSelfEdges",(function(){!function(e){Wv.forEach(e.nodes(),(function(t){var r=e.node(t);if("selfedge"===r.dummy){var n=e.node(r.e.v),o=n.x+n.width/2,i=n.y,a=r.x-o,s=n.height/2;e.setEdge(r.e,r.label),e.removeNode(t),r.label.points=[{x:o+2*a/3,y:i-s},{x:o+5*a/6,y:i-s},{x:o+a,y:i},{x:o+5*a/6,y:i+s},{x:o+2*a/3,y:i+s}],r.label.x=r.x,r.label.y=r.y}}))}(e)})),t(" removeBorderNodes",(function(){!function(e){Wv.forEach(e.nodes(),(function(t){if(e.children(t).length){var r=e.node(t),n=e.node(r.borderTop),o=e.node(r.borderBottom),i=e.node(Wv.last(r.borderLeft)),a=e.node(Wv.last(r.borderRight));r.width=Math.abs(a.x-i.x),r.height=Math.abs(o.y-n.y),r.x=i.x+r.width/2,r.y=n.y+r.height/2}})),Wv.forEach(e.nodes(),(function(t){"border"===e.node(t).dummy&&e.removeNode(t)}))}(e)})),t(" normalize.undo",(function(){Kv.undo(e)})),t(" fixupEdgeLabelCoords",(function(){!function(e){Wv.forEach(e.edges(),(function(t){var r=e.edge(t);if(Wv.has(r,"x"))switch("l"!==r.labelpos&&"r"!==r.labelpos||(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}}))}(e)})),t(" undoCoordinateSystem",(function(){ty.undo(e)})),t(" translateGraph",(function(){!function(e){var t=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,o=0,i=e.graph(),a=i.marginx||0,s=i.marginy||0;function u(e){var i=e.x,a=e.y,s=e.width,u=e.height;t=Math.min(t,i-s/2),r=Math.max(r,i+s/2),n=Math.min(n,a-u/2),o=Math.max(o,a+u/2)}Wv.forEach(e.nodes(),(function(t){u(e.node(t))})),Wv.forEach(e.edges(),(function(t){var r=e.edge(t);Wv.has(r,"x")&&u(r)})),t-=a,n-=s,Wv.forEach(e.nodes(),(function(r){var o=e.node(r);o.x-=t,o.y-=n})),Wv.forEach(e.edges(),(function(r){var o=e.edge(r);Wv.forEach(o.points,(function(e){e.x-=t,e.y-=n})),Wv.has(o,"x")&&(o.x-=t),Wv.has(o,"y")&&(o.y-=n)})),i.width=r-t+a,i.height=o-n+s}(e)})),t(" assignNodeIntersects",(function(){!function(e){Wv.forEach(e.edges(),(function(t){var r,n,o=e.edge(t),i=e.node(t.v),a=e.node(t.w);o.points?(r=o.points[0],n=o.points[o.points.length-1]):(o.points=[],r=a,n=i),o.points.unshift(oy.intersectRect(i,r)),o.points.push(oy.intersectRect(a,n))}))}(e)})),t(" reversePoints",(function(){!function(e){Wv.forEach(e.edges(),(function(t){var r=e.edge(t);r.reversed&&r.points.reverse()}))}(e)})),t(" acyclic.undo",(function(){Yv.undo(e)}))}(t,r)})),r(" updateInputGraph",(function(){!function(e,t){Wv.forEach(e.nodes(),(function(r){var n=e.node(r),o=t.node(r);n&&(n.x=o.x,n.y=o.y,t.children(r).length&&(n.width=o.width,n.height=o.height))})),Wv.forEach(e.edges(),(function(r){var n=e.edge(r),o=t.edge(r);n.points=o.points,Wv.has(o,"x")&&(n.x=o.x,n.y=o.y)})),e.graph().width=t.graph().width,e.graph().height=t.graph().height}(e,t)}))}))};var sy=["nodesep","edgesep","ranksep","marginx","marginy"],uy={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},cy=["acyclicer","ranker","rankdir","align"],hy=["width","height"],ly={width:0,height:0},fy=["minlen","weight","width","height","labeloffset"],dy={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},py=["labelpos"];function gy(e,t){return Wv.mapValues(Wv.pick(e,t),Number)}function vy(e){var t={};return Wv.forEach(e,(function(e,r){t[r.toLowerCase()]=e})),t}var yy=Tp,_y=Xp,my=Al.Graph;var by={graphlib:Al,layout:ay,debug:{debugOrdering:function(e){var t=_y.buildLayerMatrix(e),r=new my({compound:!0,multigraph:!0}).setGraph({});return yy.forEach(e.nodes(),(function(t){r.setNode(t,{label:t}),r.setParent(t,"layer"+e.node(t).rank)})),yy.forEach(e.edges(),(function(e){r.setEdge(e.v,e.w,{},e.name)})),yy.forEach(t,(function(e,t){var n="layer"+t;r.setNode(n,{rank:"same"}),yy.reduce(e,(function(e,t){return r.setEdge(e,t,{style:"invis"}),t}))})),r}},util:{time:Xp.time,notime:Xp.notime},version:"0.8.5"},xy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t}(by.graphlib.Graph),wy=function(){function e(){this._g=new xy({multigraph:!0,compound:!0}),this._g.setGraph({}),this._g.setDefaultNodeLabel((function(){return{debug:"error"}})),this._g.setDefaultEdgeLabel((function(){return{debug:"error"}}))}return e.prototype.parent=function(e){return this._g.parent(e)},e.prototype.filterNodes=function(e){var t=[];return this.eachNode((function(r){e(r)&&t.push(r)})),t},e.prototype.eachNode=function(e){this._g.nodes().forEach((function(t){e(t,this.node(t))}),this)},e.prototype.filterEdges=function(e){var t=[];return this.eachEdge((function(r){e(r)&&t.push(r)})),t},e.prototype.eachEdge=function(e){this._g.edges().forEach((function(t){e(t,t.v,t.w,this.edge(t))}),this)},e.prototype.setData=function(e,t,r,n,o){for(var i=this,a={addedVertices:[],addedEdges:[]},s=e.concat(t),u=0;u<s.length;++u){var c=s[u];o&&this._g.hasNode(c._id)||(this._g.setNode(c._id,c),a.addedVertices.push(c))}for(u=0;u<r.length;++u){var h=r[u];o&&this._g.hasEdge(h._id)||(h._sourceVertex&&h._targetVertex?(this._g.setEdge(h._sourceVertex._id,h._targetVertex._id,h,h._id),a.addedEdges.push(h)):console.warn("Bad edge definition"))}if(n)for(u=0;u<n.length;++u)this._g.setParent(n[u].child._id,n[u].parent._id);if(o){var l=r.map((function(e){return e._id}));this.filterEdges((function(e){return l.indexOf(e.name)<0})).forEach((function(e){return i._g.removeEdge(e.v,e.w)}));var f=s.map((function(e){return e._id}));this.filterNodes((function(e){return f.indexOf(e)<0})).forEach((function(e){return i._g.removeNode(e)}))}return a},e.prototype.node=function(e){return this._g.node(e)},e.prototype.nodeCount=function(){return this._g.nodeCount()},e.prototype.nodes=function(){var e=this;return this._g.nodes().map((function(t){return e._g.node(t)}))},e.prototype.nodeEdges=function(e){return this._g.nodeEdges(e)},e.prototype.edge=function(e){return this._g.edge(e)},e.prototype.edges=function(){var e=this;return this._g.edges().map((function(t){return e._g.edge(t)}))},e.prototype.neighbors=function(e){var t=this;return this._g.neighbors(e).map((function(e){return t._g.node(e)}))},e.prototype.singleNeighbors=function(e){var t=this;return this._g.neighbors(e).filter((function(e){return 1===t._g.neighbors(e).length})).map((function(e){return t._g.node(e)}))},e.prototype.gatherShortestPath=function(e,t){for(var r=[],n=t,o=e[n];o;){if(o.distance<1/0&&o.predecessor){var i=this._g.nodeEdges(n,o.predecessor)[0];r.push(this._g.edge(i))}o=e[n=o.predecessor]}return r},e.prototype.shortestPath=function(e,t){return this.gatherShortestPath(by.graphlib.alg.dijkstra(this._g,e),t)},e.prototype.undirectedShortestPath=function(e,t){var r=this;return this.gatherShortestPath(by.graphlib.alg.dijkstra(this._g,e,null,(function(e){return r._g.nodeEdges(e)})),t)},e.prototype.getJSON=function(){var e=by.graphlib.json.write(this._g);return JSON.stringify(e,(function(e,t){return"value"===e?t._text&&t._text._text?t._text._text:t._id:t})," ")},e}();function Ey(e,t){var r;function n(){var n,o,i=r.length,a=0,s=0;for(n=0;n<i;++n)a+=(o=r[n]).x,s+=o.y;for(a=a/i-e,s=s/i-t,n=0;n<i;++n)(o=r[n]).x-=a,o.y-=s}return null==e&&(e=0),null==t&&(t=0),n.initialize=function(e){r=e},n.x=function(t){return arguments.length?(e=+t,n):e},n.y=function(e){return arguments.length?(t=+e,n):t},n}function ky(e){return function(){return e}}function Sy(){return 1e-6*(Math.random()-.5)}function Dy(e,t,r,n){if(isNaN(t)||isNaN(r))return e;var o,i,a,s,u,c,h,l,f,d=e._root,p={data:n},g=e._x0,v=e._y0,y=e._x1,_=e._y1;if(!d)return e._root=p,e;for(;d.length;)if((c=t>=(i=(g+y)/2))?g=i:y=i,(h=r>=(a=(v+_)/2))?v=a:_=a,o=d,!(d=d[l=h<<1|c]))return o[l]=p,e;if(s=+e._x.call(null,d.data),u=+e._y.call(null,d.data),t===s&&r===u)return p.next=d,o?o[l]=p:e._root=p,e;do{o=o?o[l]=new Array(4):e._root=new Array(4),(c=t>=(i=(g+y)/2))?g=i:y=i,(h=r>=(a=(v+_)/2))?v=a:_=a}while((l=h<<1|c)==(f=(u>=a)<<1|s>=i));return o[f]=d,o[l]=p,e}function jy(e,t,r,n,o){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=o}function Cy(e){return e[0]}function Ay(e){return e[1]}function Oy(e,t,r){var n=new Iy(null==t?Cy:t,null==r?Ay:r,NaN,NaN,NaN,NaN);return null==e?n:n.addAll(e)}function Iy(e,t,r,n,o,i){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=o,this._y1=i,this._root=void 0}function Py(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var Fy=Oy.prototype=Iy.prototype;function My(e){return e.index}function Ty(e,t){var r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function Ny(e){var r,n,o,i,a,s=My,u=function(e){return 1/Math.min(i[e.source.index],i[e.target.index])},c=ky(30),h=1;function l(t){for(var o=0,i=e.length;o<h;++o)for(var s,u,c,l,f,d,p,g=0;g<i;++g)u=(s=e[g]).source,l=(c=s.target).x+c.vx-u.x-u.vx||Sy(),f=c.y+c.vy-u.y-u.vy||Sy(),l*=d=((d=Math.sqrt(l*l+f*f))-n[g])/d*t*r[g],f*=d,c.vx-=l*(p=a[g]),c.vy-=f*p,u.vx+=l*(p=1-p),u.vy+=f*p}function f(){if(o){var u,c,h=o.length,l=e.length,f=t.map(o,s);for(u=0,i=new Array(h);u<l;++u)(c=e[u]).index=u,"object"!=typeof c.source&&(c.source=Ty(f,c.source)),"object"!=typeof c.target&&(c.target=Ty(f,c.target)),i[c.source.index]=(i[c.source.index]||0)+1,i[c.target.index]=(i[c.target.index]||0)+1;for(u=0,a=new Array(l);u<l;++u)c=e[u],a[u]=i[c.source.index]/(i[c.source.index]+i[c.target.index]);r=new Array(l),d(),n=new Array(l),p()}}function d(){if(o)for(var t=0,n=e.length;t<n;++t)r[t]=+u(e[t],t,e)}function p(){if(o)for(var t=0,r=e.length;t<r;++t)n[t]=+c(e[t],t,e)}return null==e&&(e=[]),l.initialize=function(e){o=e,f()},l.links=function(t){return arguments.length?(e=t,f(),l):e},l.id=function(e){return arguments.length?(s=e,l):s},l.iterations=function(e){return arguments.length?(h=+e,l):h},l.strength=function(e){return arguments.length?(u="function"==typeof e?e:ky(+e),d(),l):u},l.distance=function(e){return arguments.length?(c="function"==typeof e?e:ky(+e),p(),l):c},l}Fy.copy=function(){var e,t,r=new Iy(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return r;if(!n.length)return r._root=Py(n),r;for(e=[{source:n,target:r._root=new Array(4)}];n=e.pop();)for(var o=0;o<4;++o)(t=n.source[o])&&(t.length?e.push({source:t,target:n.target[o]=new Array(4)}):n.target[o]=Py(t));return r},Fy.add=function(e){var t=+this._x.call(null,e),r=+this._y.call(null,e);return Dy(this.cover(t,r),t,r,e)},Fy.addAll=function(e){var t,r,n,o,i=e.length,a=new Array(i),s=new Array(i),u=1/0,c=1/0,h=-1/0,l=-1/0;for(r=0;r<i;++r)isNaN(n=+this._x.call(null,t=e[r]))||isNaN(o=+this._y.call(null,t))||(a[r]=n,s[r]=o,n<u&&(u=n),n>h&&(h=n),o<c&&(c=o),o>l&&(l=o));if(u>h||c>l)return this;for(this.cover(u,c).cover(h,l),r=0;r<i;++r)Dy(this,a[r],s[r],e[r]);return this},Fy.cover=function(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var r=this._x0,n=this._y0,o=this._x1,i=this._y1;if(isNaN(r))o=(r=Math.floor(e))+1,i=(n=Math.floor(t))+1;else{for(var a,s,u=o-r,c=this._root;r>e||e>=o||n>t||t>=i;)switch(s=(t<n)<<1|e<r,(a=new Array(4))[s]=c,c=a,u*=2,s){case 0:o=r+u,i=n+u;break;case 1:r=o-u,i=n+u;break;case 2:o=r+u,n=i-u;break;case 3:r=o-u,n=i-u}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=n,this._x1=o,this._y1=i,this},Fy.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},Fy.extent=function(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Fy.find=function(e,t,r){var n,o,i,a,s,u,c,h=this._x0,l=this._y0,f=this._x1,d=this._y1,p=[],g=this._root;for(g&&p.push(new jy(g,h,l,f,d)),null==r?r=1/0:(h=e-r,l=t-r,f=e+r,d=t+r,r*=r);u=p.pop();)if(!(!(g=u.node)||(o=u.x0)>f||(i=u.y0)>d||(a=u.x1)<h||(s=u.y1)<l))if(g.length){var v=(o+a)/2,y=(i+s)/2;p.push(new jy(g[3],v,y,a,s),new jy(g[2],o,y,v,s),new jy(g[1],v,i,a,y),new jy(g[0],o,i,v,y)),(c=(t>=y)<<1|e>=v)&&(u=p[p.length-1],p[p.length-1]=p[p.length-1-c],p[p.length-1-c]=u)}else{var _=e-+this._x.call(null,g.data),m=t-+this._y.call(null,g.data),b=_*_+m*m;if(b<r){var x=Math.sqrt(r=b);h=e-x,l=t-x,f=e+x,d=t+x,n=g.data}}return n},Fy.remove=function(e){if(isNaN(i=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e)))return this;var t,r,n,o,i,a,s,u,c,h,l,f,d=this._root,p=this._x0,g=this._y0,v=this._x1,y=this._y1;if(!d)return this;if(d.length)for(;;){if((c=i>=(s=(p+v)/2))?p=s:v=s,(h=a>=(u=(g+y)/2))?g=u:y=u,t=d,!(d=d[l=h<<1|c]))return this;if(!d.length)break;(t[l+1&3]||t[l+2&3]||t[l+3&3])&&(r=t,f=l)}for(;d.data!==e;)if(n=d,!(d=d.next))return this;return(o=d.next)&&delete d.next,n?(o?n.next=o:delete n.next,this):t?(o?t[l]=o:delete t[l],(d=t[0]||t[1]||t[2]||t[3])&&d===(t[3]||t[2]||t[1]||t[0])&&!d.length&&(r?r[f]=d:this._root=d),this):(this._root=o,this)},Fy.removeAll=function(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this},Fy.root=function(){return this._root},Fy.size=function(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e},Fy.visit=function(e){var t,r,n,o,i,a,s=[],u=this._root;for(u&&s.push(new jy(u,this._x0,this._y0,this._x1,this._y1));t=s.pop();)if(!e(u=t.node,n=t.x0,o=t.y0,i=t.x1,a=t.y1)&&u.length){var c=(n+i)/2,h=(o+a)/2;(r=u[3])&&s.push(new jy(r,c,h,i,a)),(r=u[2])&&s.push(new jy(r,n,h,c,a)),(r=u[1])&&s.push(new jy(r,c,o,i,h)),(r=u[0])&&s.push(new jy(r,n,o,c,h))}return this},Fy.visitAfter=function(e){var t,r=[],n=[];for(this._root&&r.push(new jy(this._root,this._x0,this._y0,this._x1,this._y1));t=r.pop();){var o=t.node;if(o.length){var i,a=t.x0,s=t.y0,u=t.x1,c=t.y1,h=(a+u)/2,l=(s+c)/2;(i=o[0])&&r.push(new jy(i,a,s,h,l)),(i=o[1])&&r.push(new jy(i,h,s,u,l)),(i=o[2])&&r.push(new jy(i,a,l,h,c)),(i=o[3])&&r.push(new jy(i,h,l,u,c))}n.push(t)}for(;t=n.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this},Fy.x=function(e){return arguments.length?(this._x=e,this):this._x},Fy.y=function(e){return arguments.length?(this._y=e,this):this._y};var Ly,By,Ry=0,Vy=0,zy=0,Gy=0,Uy=0,Hy=0,qy="object"==typeof performance&&performance.now?performance:Date,Wy="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Yy(){return Uy||(Wy(Ky),Uy=qy.now()+Hy)}function Ky(){Uy=0}function Zy(){this._call=this._time=this._next=null}function $y(e,t,r){var n=new Zy;return n.restart(e,t,r),n}function Qy(){Uy=(Gy=qy.now())+Hy,Ry=Vy=0;try{!function(){Yy(),++Ry;for(var e,t=Ly;t;)(e=Uy-t._time)>=0&&t._call.call(null,e),t=t._next;--Ry}()}finally{Ry=0,function(){var e,t,r=Ly,n=1/0;for(;r;)r._call?(n>r._time&&(n=r._time),e=r,r=r._next):(t=r._next,r._next=null,r=e?e._next=t:Ly=t);By=e,Jy(n)}(),Uy=0}}function Xy(){var e=qy.now(),t=e-Gy;t>1e3&&(Hy-=t,Gy=e)}function Jy(e){Ry||(Vy&&(Vy=clearTimeout(Vy)),e-Uy>24?(e<1/0&&(Vy=setTimeout(Qy,e-qy.now()-Hy)),zy&&(zy=clearInterval(zy))):(zy||(Gy=qy.now(),zy=setInterval(Xy,1e3)),Ry=1,Wy(Qy)))}function e_(e){return e.x}function t_(e){return e.y}Zy.prototype=$y.prototype={constructor:Zy,restart:function(e,t,r){if("function"!=typeof e)throw new TypeError("callback is not a function");r=(null==r?Yy():+r)+(null==t?0:+t),this._next||By===this||(By?By._next=this:Ly=this,By=this),this._call=e,this._time=r,Jy()},stop:function(){this._call&&(this._call=null,this._time=1/0,Jy())}};var r_=Math.PI*(3-Math.sqrt(5));function n_(e){var r,n=1,o=.001,i=1-Math.pow(o,1/300),a=0,s=.6,u=t.map(),c=$y(l),h=t.dispatch("tick","end");function l(){f(),h.call("tick",r),n<o&&(c.stop(),h.call("end",r))}function f(t){var o,c,h=e.length;void 0===t&&(t=1);for(var l=0;l<t;++l)for(n+=(a-n)*i,u.each((function(e){e(n)})),o=0;o<h;++o)null==(c=e[o]).fx?c.x+=c.vx*=s:(c.x=c.fx,c.vx=0),null==c.fy?c.y+=c.vy*=s:(c.y=c.fy,c.vy=0);return r}function d(){for(var t,r=0,n=e.length;r<n;++r){if((t=e[r]).index=r,null!=t.fx&&(t.x=t.fx),null!=t.fy&&(t.y=t.fy),isNaN(t.x)||isNaN(t.y)){var o=10*Math.sqrt(r),i=r*r_;t.x=o*Math.cos(i),t.y=o*Math.sin(i)}(isNaN(t.vx)||isNaN(t.vy))&&(t.vx=t.vy=0)}}function p(t){return t.initialize&&t.initialize(e),t}return null==e&&(e=[]),d(),r={tick:f,restart:function(){return c.restart(l),r},stop:function(){return c.stop(),r},nodes:function(t){return arguments.length?(e=t,d(),u.each(p),r):e},alpha:function(e){return arguments.length?(n=+e,r):n},alphaMin:function(e){return arguments.length?(o=+e,r):o},alphaDecay:function(e){return arguments.length?(i=+e,r):+i},alphaTarget:function(e){return arguments.length?(a=+e,r):a},velocityDecay:function(e){return arguments.length?(s=1-e,r):1-s},force:function(e,t){return arguments.length>1?(null==t?u.remove(e):u.set(e,p(t)),r):u.get(e)},find:function(t,r,n){var o,i,a,s,u,c=0,h=e.length;for(null==n?n=1/0:n*=n,c=0;c<h;++c)(a=(o=t-(s=e[c]).x)*o+(i=r-s.y)*i)<n&&(u=s,n=a);return u},on:function(e,t){return arguments.length>1?(h.on(e,t),r):h.on(e)}}}function o_(){var e,t,r,n,o=ky(-30),i=1,a=1/0,s=.81;function u(n){var o,i=e.length,a=Oy(e,e_,t_).visitAfter(h);for(r=n,o=0;o<i;++o)t=e[o],a.visit(l)}function c(){if(e){var t,r,i=e.length;for(n=new Array(i),t=0;t<i;++t)r=e[t],n[r.index]=+o(r,t,e)}}function h(e){var t,r,o,i,a,s=0,u=0;if(e.length){for(o=i=a=0;a<4;++a)(t=e[a])&&(r=Math.abs(t.value))&&(s+=t.value,u+=r,o+=r*t.x,i+=r*t.y);e.x=o/u,e.y=i/u}else{(t=e).x=t.data.x,t.y=t.data.y;do{s+=n[t.data.index]}while(t=t.next)}e.value=s}function l(e,o,u,c){if(!e.value)return!0;var h=e.x-t.x,l=e.y-t.y,f=c-o,d=h*h+l*l;if(f*f/s<d)return d<a&&(0===h&&(d+=(h=Sy())*h),0===l&&(d+=(l=Sy())*l),d<i&&(d=Math.sqrt(i*d)),t.vx+=h*e.value*r/d,t.vy+=l*e.value*r/d),!0;if(!(e.length||d>=a)){(e.data!==t||e.next)&&(0===h&&(d+=(h=Sy())*h),0===l&&(d+=(l=Sy())*l),d<i&&(d=Math.sqrt(i*d)));do{e.data!==t&&(f=n[e.data.index]*r/d,t.vx+=h*f,t.vy+=l*f)}while(e=e.next)}}return u.initialize=function(t){e=t,c()},u.strength=function(e){return arguments.length?(o="function"==typeof e?e:ky(+e),c(),u):o},u.distanceMin=function(e){return arguments.length?(i=e*e,u):Math.sqrt(i)},u.distanceMax=function(e){return arguments.length?(a=e*e,u):Math.sqrt(a)},u.theta=function(e){return arguments.length?(s=e*e,u):Math.sqrt(s)},u}function i_(e,t,r,n){var o=this;this.pos={};n=n||(t<r?t-0:r-0)/2;var i=e.nodeCount(),a=-Math.PI/2,s=2*Math.PI/i;e.eachNode((function(e,i){var u=i.getBBox();o.pos[e]={x:i.fixed?i.x:t/2+Math.cos(a)*(n-0),y:i.fixed?i.y:r/2+Math.sin(a)*(n-0),width:u.width,height:u.height},a+=s}))}function a_(e,t,r,n){n=n||{};var o=this;this.pos={},this.vertices=[],this.vertexMap={},e.eachNode((function(t){var r=e.node(t),n=r.getBBox(),i={id:t,x:r.pos().x,y:r.pos().y,width:n.width,height:n.height,value:r};o.vertices.push(i),o.vertexMap[t]=i})),this.edges=[],e.eachEdge((function(e,t,r){o.edges.push({source:t,target:r})}));var i=Ny().id((function(e){return e.id})).distance(n.linkDistance).strength(n.linkStrength),a=o_().strength((function(e){var t=e.value.getBBox();return n.charge*Math.max(t.width,t.height)}));if(this.force=n_().force("link",i).force("charge",a).force("center",Ey(t/2,r/2)).velocityDecay(n.oneShot?.1:n.friction).nodes(this.vertices),i.links(this.edges),n.oneShot){this.force.restart();var s=e.nodeCount();s=Math.min(s*s,500);for(var u=0;u<s;++u)this.force.tick();this.force.stop()}}function s_(e,t,r,n){var o=new by.graphlib.Graph({multigraph:!0,compound:!0}).setGraph(n).setDefaultNodeLabel((function(){return{}})).setDefaultEdgeLabel((function(){return{}}));e.eachNode((function(t){var r=e.node(t).getBBox();o.setNode(t,{width:r.width,height:r.height})})),e.eachEdge((function(t,r,i){var a=e.edge(t);o.setEdge(r,i,{weight:a.weight()},a._id),n.digraph||o.setEdge(i,r,{weight:a.weight()},a._id)})),e.eachNode((function(t){o.setParent(t,e.parent(t))})),this.dagreLayout=by.layout(o,{debugTiming:!1});var i=-o.graph().width/2,a=-o.graph().height/2;o.nodes().forEach((function(e){var n=o.node(e);n.x+=i+t/2,n.y+=a+r/2})),o.edges().forEach((function(e){for(var n=o.edge(e),s=0;s<n.points.length;++s)n.points[s].x+=i+t/2,n.points[s].y+=a+r/2})),this.digraph=o}i_.prototype.nodePos=function(e){return this.pos[e]},i_.prototype.edgePoints=function(e){return[]},a_.prototype.nodePos=function(e){return this.vertexMap[e]},a_.prototype.edgePoints=function(e){return[]},s_.prototype.nodePos=function(e){return this.digraph.node(e)},s_.prototype.edgePoints=function(e){return this.digraph.edge(e._sourceVertex.id(),e._targetVertex.id(),e._id).points};L(".graph_Subgraph .border{fill:none;stroke:#1f77b4;stroke-width:1px;pointer-events:none}.graph_Subgraph.selected>rect{stroke:red!important}");var u_=function(e){function r(){var r=e.call(this)||this;return r._textWidget=(new t.Text).anchor("start").fontSize(14),r._buttonMin=(new t.Icon).diameter(18).shape_colorStroke("#1f77b4").shape_colorFill("#dcf1ff").image_colorFill("#1f77b4").on("click",(function(){r.minClick()}),!0).on("dblclick",(function(){}),!0),r._minState="normal",r}return s(r,e),r.prototype.minState=function(e){return arguments.length?(this._minState=e,this):this._minState},r.prototype.calcIcon=function(){switch(this._minState){case"normal":return"";case"partial":return""}},r.prototype.getBBox=function(e,t){var r=this.width(),n=this.height();return{x:-r/2,y:-n/2-14,width:r,height:n}},r.prototype.enter=function(t,r){e.prototype.enter.call(this,t,r),this._border=r.append("rect").attr("class","border"),this._textWidget.target(t),this._buttonMin.target(t)},r.prototype.update=function(r,n){e.prototype.update.call(this,r,n);var o=this.getBBox();this._border.attr("x",o.x).attr("y",o.y).attr("width",o.width).attr("height",o.height).style("fill",this.border_colorFill()).style("stroke",this.border_colorStroke()),this.border_colorFill_exists()&&!this.title_colorFill_exists()&&this.title_colorFill(t.Palette.textColor(this.border_colorFill())),this._textWidget.pos({x:o.x+4,y:o.y+14}).width(this.width()-8).text(this.showTitle()?this.title():"").render(),this._buttonMin.visible(this.showMinMax()).pos({x:o.x+o.width-13,y:o.y+13}).faChar(this.calcIcon()).render()},r.prototype.exit=function(t,r){this._buttonMin.target(null),this._textWidget.target(null),this._border.remove(),e.prototype.exit.call(this,t,r)},r.prototype.intersection=function(e,t){var r=null;return[].forEach((function(e){(null===r||r.d>e.d)&&(r=e)})),r&&r.i?r.i:null},r.prototype.click=function(e){},r.prototype.minClick=function(){switch(this._minState){case"normal":this._minState="partial";break;case"partial":this._minState="normal"}this._buttonMin.faChar(this.calcIcon()).render()},r}(t.SVGWidget);u_.prototype._class+=" graph_Subgraph",u_.prototype.publish("border_colorStroke",null,"html-color","Stroke Color",null,{optional:!0}),u_.prototype.publish("border_colorFill",null,"html-color","Fill Color",null,{optional:!0}),u_.prototype.publish("showTitle",!0,"boolean","Show Title",null,{tags:["Basic"]}),u_.prototype.publish("title","","string","Title",null,{tags:["Basic"]}),u_.prototype.publishProxy("titleFontSize","_textWidget","fontSize"),u_.prototype.publishProxy("title_colorFill","_textWidget","colorFill"),u_.prototype.publish("showMinMax",!1,"boolean","Show Min/Max",null,{tags:["Basic"]});L(".graph_Vertex.selected .common_Shape{stroke:red!important}");var c_=function(e){function r(){var r=e.call(this)||this;return r._icon=new t.Icon,r._textBox=new t.TextBox,r._annotationWidgets={},r.pos({x:void 0,y:void 0}),r}return s(r,e),r.prototype.getIconBBox=function(){var e=this._icon.getBBox(!0),t=this._textBox.getBBox(!0);switch(this.iconAnchor()){case"start":return{x:-t.width/2+e.width/3,y:-t.height/2-e.height/3,width:e.width,height:e.height};case"middle":return{x:0,y:-t.height/2-e.height/3,width:e.width,height:e.height};case"end":return{x:t.width/2-e.width/3,y:-t.height/2-e.height/3,width:e.width,height:e.height};case"left":return{x:-t.width/2-e.width/2,y:0,width:e.width,height:e.height}}return{x:0,y:0,width:e.width,height:e.height}},r.prototype.getBBox=function(e,t){var r=this.getIconBBox(),n=this._textBox.getBBox(!0),o=Math.min(r.x,n.x),i=Math.min(r.y,n.y);return{x:o,y:i,width:Math.max(r.x+r.width,n.x+n.width)-o,height:Math.max(r.y+r.height,n.y+n.height)-i}},r.prototype.enter=function(t,r){var n=this;e.prototype.enter.call(this,t,r),delete this._prevHash,this._icon.target(t),this._textBox.target(t),r.on("mouseover",(function(e){return n.mouseover(e.data())})).on("mouseout",(function(e){return n.mouseout(e.data())}))},r.prototype.update=function(r,n){e.prototype.update.call(this,r,n);var o=this.hashSum();if(this._prevHash!==o){this._prevHash=o,n.classed("centroid",this.centroid()),n.style("filter",this.centroid()?"url(#"+this._graphID+"_glow)":null),this._icon.tooltip(this.iconTooltip()?this.iconTooltip():this.tooltip()).render(),this._textBox.tooltip(this.tooltip()).render();var i=this.getIconBBox();this._icon.move(i);var a=this,s=n.selectAll(".annotation").data(this.annotationIcons()),u=s.enter().append("g").attr("class","annotation").each((function(e,r){a._annotationWidgets[r]=(new t.Icon).target(this).shape("square")})),c=this._textBox.getBBox(!0),h=c.width/2,l=c.height/2;u.merge(s).each((function(e,t){var r=a._annotationWidgets[t];for(var n in r.diameter(a.annotationDiameter()).shape_colorFill(a.textbox_shape_colorFill()).shape_colorStroke(a.textbox_shape_colorStroke()),e)r[n]?r[n](e[n]):globalThis.__hpcc_debug&&console.warn("Invalid annotation property: "+n);r.render();var o=r.getBBox(!0);r.move({x:h-o.width/2+4,y:l+o.height/2-4}),h-=o.width+a.annotationSpacing()})),s.exit().each((function(e,r){var n=t.select(this);a._annotationWidgets[r].target(null),delete a._annotationWidgets[r],n.remove()}))}},r.prototype.exit=function(t,r){for(var n in this._annotationWidgets)this._annotationWidgets[n].target(null);this._icon.target(null),this._textBox.target(null),e.prototype.exit.call(this,t,r)},r.prototype.contains=function(e){return this._icon.contains(e)||this._textBox.contains(e)},r.prototype.intersection=function(e,t){var r=this._icon.intersection(e,t),n=this._textBox.intersection(e,t);return r&&n?this.distance(r,t)<this.distance(n,t)?r:n:r||n},r.prototype.mouseover=function(e){},r.prototype.mouseout=function(e){},r}(t.SVGWidget);c_.prototype._class+=" graph_Vertex",c_.prototype.publishProxy("faChar","_icon"),c_.prototype.publishProxy("imageUrl","_icon"),c_.prototype.publishProxy("icon_diameter","_icon","diameter"),c_.prototype.publishProxy("icon_paddingPercent","_icon","paddingPercent"),c_.prototype.publishProxy("icon_shape_colorFill","_icon","shape_colorFill"),c_.prototype.publishProxy("icon_shape_colorStroke","_icon","shape_colorStroke"),c_.prototype.publishProxy("icon_image_colorFill","_icon","image_colorFill"),c_.prototype.publishProxy("icon_fontFamily","_icon","fontFamily"),c_.prototype.publish("centroid",!1,"boolean","Centroid Vertex"),c_.prototype.publishProxy("text","_textBox"),c_.prototype.publishProxy("anchor","_textBox"),c_.prototype.publishProxy("textbox_shape_colorStroke","_textBox","shape_colorStroke"),c_.prototype.publishProxy("textbox_shape_colorFill","_textBox","shape_colorFill"),c_.prototype.publishProxy("textbox_text_colorFill","_textBox","text_colorFill"),c_.prototype.publishProxy("textbox_text_fontFamily","_textBox","text_fontFamily"),c_.prototype.publish("iconAnchor","start","set","Horizontal anchor position of icon",["","start","middle","end","left"],{tags:["Basic"]}),c_.prototype.publish("iconTooltip","","string","iconTooltip",null,{tags:["Private"]}),c_.prototype.publish("tooltip","","string","Tooltip",null,{tags:["Private"]}),c_.prototype.publish("annotationDiameter",14,"number","Annotation Diameter",null,{tags:["Private"]}),c_.prototype.publish("annotationSpacing",3,"number","Annotation Spacing",null,{tags:["Private"]}),c_.prototype.publish("annotationIcons",[],"array","Annotations",null,{tags:["Private"]});L(".graph_Graph .marker{fill:#656565;stroke:none;stroke-width:1px}.graph_Graph .zoom{fill:none;pointer-events:all}.graph_Graph .selectionBrush{fill:none;stroke:#a9a9a9}.graph_Graph .graphEdge.shortest-path .graph_Edge{stroke:red}");var h_=function(e){function r(){var r=e.call(this)||this;r._toggleHierarchy=(new t.ToggleButton).faChar("fa-sitemap").tooltip("Hierarchy").on("click",(function(){return r.layoutClick("Hierarchy")})),r._toggleForceDirected=(new t.ToggleButton).faChar("fa-expand").tooltip("Force Directed").on("click",(function(){return r.layoutClick("ForceDirected")})),r._toggleForceDirected2=(new t.ToggleButton).faChar("fa-arrows").tooltip("Spring").on("click",(function(){return r.layoutClick("ForceDirected2")})),r._toggleCircle=(new t.ToggleButton).faChar("fa-circle-o").tooltip("Circle").on("click",(function(){return r.layoutClick("Circle")})),r._dataHash=0,r._neighborOffsets=[],n.IGraph.call(r),n.ITooltip.call(r),r.tooltipHTML((function(e){var t;return e instanceof u_?t=e.title().replace(/\n/g,"<br>"):(e instanceof c_||e instanceof R)&&(t=e.text().replace(/\n/g,"<br>")),t?'<p style="text-align:center">'.concat(t,"</p>"):null})),r._drawStartPos="origin";var o=[r._toggleHierarchy,r._toggleForceDirected,r._toggleForceDirected2,r._toggleCircle,new t.Spacer];return r._iconBar.buttons(o.concat(r._iconBar.buttons())),r._graphData=new wy,r.highlight={zoom:1.1,opacity:.33,edge:"1.25px"},r._selection=new t.Utility.Selection(r),r.zoomToFitLimit(1),r}return s(r,e),r.prototype.iconBarButtons=function(){return this._iconBar.buttons()},r.prototype.layoutClick=function(e){var t=this;this.layout(e),"ForceDirected2"!==e&&this.applyScaleOnLayout(!0),this.layout(e).render((function(e){t.applyScaleOnLayout(!1)}))},r.prototype.getOffsetPos=function(){return{x:0,y:0}},r.prototype.size=function(t){var r=e.prototype.size.apply(this,arguments);return r},r.prototype.clear=function(){this.data({subgraphs:[],vertices:[],edges:[],hierarchy:[]},!1)},r.prototype.data=function(t,r){var n=e.prototype.data.apply(this,arguments);if(arguments.length){r||(this._graphData=new wy,this._renderCount=0);var o=this._graphData.setData(t.subgraphs||[],t.vertices||[],t.edges||[],t.hierarchy||[],r||!1);o.addedVertices.length&&this._dataHash++;var i=this;o.addedVertices.forEach((function(e){e._graphID=i._id})),o.addedEdges.forEach((function(e){e._graphID=i._id}));var a={};this._graphData.edges().forEach((function(e){a[e._sourceVertex._id]||(a[e._sourceVertex._id]={}),a[e._sourceVertex._id][e._targetVertex._id]||(a[e._sourceVertex._id][e._targetVertex._id]=0);var t=++a[e._sourceVertex._id][e._targetVertex._id];e.arcDepth(16*t)}))}return n},r.prototype.graphData=function(){return this._graphData},r.prototype.selection=function(e){return arguments.length?(this._selection.set(e),this):this._selection.get()},r.prototype.linkcolor_default=function(e){return arguments.length?(this._linkcolor=e,this):this._linkcolor},r.prototype.linktooltip_default=function(e){return arguments.length?(this._linktooltip=e,this):this._linktooltip},r.prototype.dragstart=function(e){var r=this;if(this.allowDragging()){var n=t.d3Event();if(n.sourceEvent.stopPropagation(),e.__drag_dx=n.x-e.x(),e.__drag_dy=n.y-e.y(),this._dragging=!0,this.forceLayout){n.active||this.forceLayout.force.alphaTarget(.3).restart();var o=this.forceLayout.vertexMap[e.id()];o.fixed=!0,o.fx=o.x,o.fy=o.y}this._neighborOffsets=[],this.dragSingleNeighbors()&&(this._neighborOffsets=this._graphData.singleNeighbors(e.id()).map((function(r){return t.select(r.target()).raise(),{neighbor:r,offsetX:e.x()-r.x(),offsetY:e.y()-r.y()}})));for(var i=e.target(),a=i.nextSibling;a;)i.parentNode.insertBefore(a,i),a=i.nextSibling;t.Platform.svgMarkerGlitch&&this._graphData.nodeEdges(e.id()).forEach((function(e){var t=r._graphData.edge(e);r._pushMarkers(t.element())}))}},r.prototype.dragging=function(e){var r=this;if(this.allowDragging()){var n=t.d3Event();if(n.sourceEvent.stopPropagation(),e.move({x:n.x-e.__drag_dx,y:n.y-e.__drag_dy}),this.forceLayout){var o=this.forceLayout.vertexMap[e.id()];o.fixed=!0,o.fx=n.x-e.__drag_dx,o.fy=n.y-e.__drag_dy}this._neighborOffsets.forEach((function(t){var o=n.x-e.__drag_dx-t.offsetX,i=n.y-e.__drag_dy-t.offsetY;if(r.forceLayout){var a=r.forceLayout.vertexMap[t.neighbor.id()];a.fixed=!0,a.fx=o,a.fy=i}t.neighbor.move({x:o,y:i})})),this.refreshIncidentEdges(e,!0)}},r.prototype.dragend=function(e){var r=this;if(this.allowDragging()){if(t.d3Event().sourceEvent.stopPropagation(),this._dragging=!1,this.snapToGrid()){var n=e.calcSnap(this.snapToGrid());e.move(n[0]),this.refreshIncidentEdges(e,!0)}if(this.forceLayout){var o=this.forceLayout.vertexMap[e.id()];o.fixed=!1,o.fx=null,o.fy=null,this._neighborOffsets.forEach((function(e){var t=r.forceLayout.vertexMap[e.neighbor.id()];t.fixed=!1,t.fx=null,t.fy=null}))}this._neighborOffsets=[],t.Platform.svgMarkerGlitch&&this._graphData.nodeEdges(e.id()).forEach((function(e){var t=this._graphData.edge(e);this._popMarkers(t.element())}))}},r.prototype.enter=function(r,n){var o=this;e.prototype.enter.call(this,r,n),this._zoomGrab.on("click.clear",(function(){o.selectionClearOnBackgroundClick()&&o._selection.clear()})),this._d3Drag=t.drag().on("start",(function(e){return o.dragstart(e)})).on("end",(function(e){return o.dragend(e)})).on("drag",(function(e){return o.dragging(e)})),this.defs=this._renderElement.append("defs"),this.addMarkers(),this._centroidFilter=new t.SVGGlowFilter(this.defs,this._id+"_glow"),this.svg=this._renderElement.append("svg:g"),this.svgC=this.svg.append("g").attr("id",this._id+"C"),this.svgE=this.svg.append("g").attr("id",this._id+"E"),this.svgV=this.svg.append("g").attr("id",this._id+"V")},r.prototype.getBounds=function(e,t){var r=[[null,null],[null,null]];return e.forEach((function(e){var n=t?t.nodePos(e._id):{x:e.x(),y:e.y(),width:e.width(),height:e.height()},o=n.x-n.width/2,i=n.x+n.width/2,a=n.y-n.height/2,s=n.y+n.height/2;(null===r[0][0]||r[0][0]>o)&&(r[0][0]=o),(null===r[0][1]||r[0][1]>a)&&(r[0][1]=a),(null===r[1][0]||r[1][0]<i)&&(r[1][0]=i),(null===r[1][1]||r[1][1]<s)&&(r[1][1]=s)})),r},r.prototype.getVertexBounds=function(e){return this.getBounds(this._graphData.nodes(),e)},r.prototype.getSelectionBounds=function(e){return this.getBounds(this._selection.get(),e)},r.prototype.centerOnItem=function(e){var t=e.getBBox(!0),r=t.x+t.width/2,n=t.y+t.height/2,o={x:e.x()+r-t.width/2,y:e.y()+n-t.height/2,width:t.width,height:t.height};this.centerOnBBox(o)},r.prototype.zoomToItem=function(e){var t=e.getBBox(!0),r=t.x+t.width/2,n=t.y+t.height/2,o={x:e.x()+r-t.width/2,y:e.y()+n-t.height/2,width:t.width,height:t.height};this.zoomToBBox(o)},r.prototype.updateVertices=function(e,r,n){var o=this.width(),i=this.height(),a=this,s=e.selectAll("#"+this._id+r+" > .graphVertex").data(n,(function(e){return e.id()}));s.enter().append("g").attr("class","graphVertex").style("opacity",1e-6).on("click.selectionBag",(function(e){a._selection.click(e,t.d3Event()),a.selectionChanged()})).on("click",(function(e){var r=t.select(this).select(".graph_Vertex"),n=!1;r.empty()||(n=r.classed("selected")),a.vertex_click(a.rowToObj(e.data()),"",n,{vertex:e})})).on("dblclick",(function(e){t.d3Event().stopPropagation();var r=t.select(this).select(".graph_Vertex"),n=!1;r.empty()||(n=r.classed("selected")),a.vertex_dblclick(a.rowToObj(e.data()),"",n,{vertex:e})})).on("contextmenu",(function(e){var r=t.select(this).select(".graph_Vertex"),n=!1;r.empty()||(n=r.classed("selected")),a.vertex_contextmenu(a.rowToObj(e.data()),"",n,{vertex:e})})).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).on("mouseover",(function(e){a._dragging||a.vertex_mouseover(t.select(this),e)})).on("mouseout",(function(e){a._dragging||a.vertex_mouseout(t.select(this),e)})).each((function(e){t.select(this).style("cursor",a.allowDragging()?"move":"pointer"),e.target(this).pos({x:e.x()||o/2,y:e.y()||i/2}).animationFrameRender(),a.allowDragging()&&t.select(this).call(a._d3Drag);e.dispatch&&(e.dispatch.on("sizestart",(function(e){e.allowResize(a.allowDragging()),a.allowDragging()&&(a._dragging=!0)})),e.dispatch.on("size",(function(e){a.refreshIncidentEdges(e,!1)})),e.dispatch.on("sizeend",(function(e){if(a._dragging=!1,a.snapToGrid()){var t=e.calcSnap(a.snapToGrid());e.pos(t[0]).size(t[1]).render(),a.refreshIncidentEdges(e,!1)}})))})).transition().duration(750).style("opacity",1),s.each((function(e){e.animationFrameRender()})),s.exit().each((function(e){e.target(null)})).remove(),s.order()},r.prototype.update=function(r,n){var o=this;e.prototype.update.call(this,r,n),this.tooltip.hide(),this._centroidFilter.update(this.centroidColor());var i=this.layout();this._toggleHierarchy.selected("Hierarchy"===i).render(),this._toggleForceDirected.selected("ForceDirected"===i).render(),this._toggleForceDirected2.selected("ForceDirected2"===i).render(),this._toggleCircle.selected("Circle"===i).render();var a=this;this.updateVertices(this.svgC,"C",this._graphData.nodes().filter((function(e){return"Hierarchy"===o.layout()&&e instanceof u_}))),this.updateVertices(this.svgV,"V",this._graphData.nodes().filter((function(e){return!(e instanceof u_)})));var s=this.svgE.selectAll("#"+this._id+"E > .graphEdge").data(this.showEdges()?this._graphData.edges():[],(function(e){return e.id()}));s.enter().append("g").attr("class","graphEdge").style("opacity",1e-6).on("click.selectionBag",(function(e){a._selection.click(e,t.d3Event())})).on("click",(function(e){var r=t.select(this).select(".graph_Edge"),n=!1;r.empty()||(n=r.classed("selected")),a.edge_click(a.rowToObj(e.data()),"",n,{edge:e})})).on("dblclick",(function(e){var r=t.select(this).select(".graph_Edge"),n=!1;r.empty()||(n=r.classed("selected")),a.edge_dblclick(a.rowToObj(e.data()),"",n,{edge:e})})).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).on("mouseover",(function(e){a._dragging||a.edge_mouseover(t.select(this),e)})).on("mouseout",(function(e){a._dragging||a.edge_mouseout(t.select(this),e)})).each((function(e){e.target(this).animationFrameRender()})).transition().duration(750).style("opacity",1),s.each((function(e){e.animationFrameRender()})),s.exit().each((function(e){e.target(null)})).remove(),this._renderCount||(this._renderCount++,this.layout(this.layout()))},r.prototype.exit=function(t,r){this._graphData.nodes().forEach((function(e){return e.target(null)})),this._graphData.edges().forEach((function(e){return e.target(null)})),e.prototype.exit.call(this,t,r)},r.prototype.render=function(t){var r=this;return this.progress("start"),e.prototype.render.call(this,(function(e){r.doLayout().then((function(){r.progress("end"),t&&t(e)}))})),this},r.prototype.doLayout=function(e){var t=this;return void 0===e&&(e=0),new Promise((function(r,n){requestAnimationFrame((function(){t._prevLayout!==t.layout()||t._prevDataHash!==t._dataHash?(t._prevLayout=t.layout(),t._prevDataHash=t._dataHash,t._doLayout(e).then((function(){r()}))):r()}))}))},r.prototype._doLayout=function(e){var t=this;return void 0===e&&(e=0),new Promise((function(n,o){t.progress("layout-start"),t.forceLayout&&(t.forceLayout.force.stop(),t.forceLayout=null);var i=t,a=t.getLayoutEngine();"ForceDirected2"===t.layout()?(t.forceLayout=a,t.forceLayout.force.on("tick",(function(){i.progress("layout-tick"),a.vertices.forEach((function(e){if(e.fixed);else{var t=i._graphData.node(e.id);t&&t.move({x:e.x,y:e.y})}})),i._graphData.edges().forEach((function(e){e.points([],!1,!1)})),i.applyScaleOnLayout()})).on("end",(function(){i.progress("layout-end")})),t.forceLayout.force.restart(),n()):a&&(t.forceLayout=null,i._dragging=!0,i._graphData.nodes().forEach((function(e){var t=a.nodePos(e.id());e instanceof r.Subgraph?e.pos({x:t.x,y:t.y}).size({width:t.width,height:t.height}).animationFrameRender():e.move({x:t.x,y:t.y},0)})),i._graphData.edges().forEach((function(t){var r=a.edgePoints(t);t.points(r,e)})),i.applyScaleOnLayout()&&requestAnimationFrame((function(){i.zoomToFit(),n()})),t._fixIEMarkers(),setTimeout((function(){i._dragging=!1}),e?e+50:50),t.progress("layout-end"),i.applyScaleOnLayout()||n())}))},r.prototype.getLayoutEngine=function(){switch(this.layout()){case"Circle":return new i_(this._graphData,this._size.width,this._size.height);case"ForceDirected":return new a_(this._graphData,this._size.width,this._size.height,{oneShot:!0,linkDistance:this.forceDirectedLinkDistance(),linkStrength:this.forceDirectedLinkStrength(),friction:this.forceDirectedFriction(),charge:this.forceDirectedCharge(),chargeDistance:this.forceDirectedChargeDistance(),theta:this.forceDirectedTheta(),gravity:this.forceDirectedGravity()});case"ForceDirected2":return new a_(this._graphData,this._size.width,this._size.height,{linkDistance:this.forceDirectedLinkDistance(),linkStrength:this.forceDirectedLinkStrength(),friction:this.forceDirectedFriction(),charge:this.forceDirectedCharge(),chargeDistance:this.forceDirectedChargeDistance(),theta:this.forceDirectedTheta(),gravity:this.forceDirectedGravity()});case"Hierarchy":return new s_(this._graphData,this._size.width,this._size.height,{rankdir:this.hierarchyRankDirection(),nodesep:this.hierarchyNodeSeparation(),edgesep:this.hierarchyEdgeSeparation(),ranksep:this.hierarchyRankSeparation(),digraph:this.hierarchyDigraph()})}return null},r.prototype.getNeighborMap=function(e){var t={},r={};if(e)for(var n=this._graphData.nodeEdges(e.id()),o=0;o<n.length;++o){var i=this._graphData.edge(n[o]);r[i.id()]=i,i._sourceVertex.id()!==e.id()&&(t[i._sourceVertex.id()]=i._sourceVertex),i._targetVertex.id()!==e.id()&&(t[i._targetVertex.id()]=i._targetVertex)}return{vertices:t,edges:r}},r.prototype.highlightVerticies=function(e){var t=this,r=this;return this.svgV.selectAll(".graphVertex").classed("graphVertex-highlighted",(function(t){return!e||e[t.id()]})).style("filter",(function(r){return e&&e[r.id()]?"url(#"+t.id()+"_glow)":null})).transition().duration(this.transitionDuration()).on("end",(function(t){e&&e[t.id()]&&t._placeholderElement.node()&&t._placeholderElement.node().parentNode&&t._placeholderElement.node().parentNode.appendChild(t._placeholderElement.node())})).style("opacity",(function(t){return!e||e[t.id()]?1:r.highlight.opacity})),this},r.prototype.highlightEdges=function(e){var t=this;return this.svgE.selectAll(".graphEdge").classed("graphEdge-highlighted",(function(t){return!e||e[t.id()]})).style("stroke-width",(function(r){return e&&e[r.id()]?t.highlight.edge:"1px"})).transition().duration(this.transitionDuration()).style("opacity",(function(r){return!e||e[r.id()]?1:t.highlight.opacity})),this},r.prototype.highlightVertex=function(e,t){if(this.highlightOnMouseOverVertex())if(t){var r=this.getNeighborMap(t);r.vertices[t.id()]=t,this.highlightVerticies(r.vertices),this.highlightEdges(r.edges)}else this.highlightVerticies(null),this.highlightEdges(null)},r.prototype.highlightEdge=function(e,t){if(this.highlightOnMouseOverEdge())if(t){var r={};r[t._sourceVertex.id()]=t._sourceVertex,r[t._targetVertex.id()]=t._targetVertex;var n={};n[t.id()]=t,this.highlightVerticies(r),this.highlightEdges(n)}else this.highlightVerticies(null),this.highlightEdges(null)},r.prototype.refreshIncidentEdges=function(e,t){var r=this;this._graphData.nodeEdges(e.id()).forEach((function(e){r._graphData.edge(e).points([],!1,t)}))},r.prototype.centroids=function(){return this._graphData.nodes().filter((function(e){return e.centroid()}))},r.prototype.selectionChanged=function(){var e=this;if(this.highlightSelectedPathToCentroid()){var t={};this.centroids().forEach((function(r){e.selection().forEach((function(n){e._graphData.undirectedShortestPath(r.id(),n.id()).forEach((function(e){t[e.id()]=!0}))}))})),this.svgE.selectAll(".graphEdge").classed("shortest-path",(function(e){return!0===t[e.id()]}))}},r.prototype.vertex_click=function(e,t,r,o){o&&o.vertex&&o.vertex._placeholderElement.node().parentNode.appendChild(o.vertex._placeholderElement.node()),n.IGraph.prototype.vertex_click.apply(this,arguments)},r.prototype.vertex_dblclick=function(e,t,r,n){},r.prototype.vertex_contextmenu=function(e,t,r,n){},r.prototype.vertex_mouseover=function(e,t){this.highlightVertex(e,t)},r.prototype.vertex_mouseout=function(e,t){this.highlightVertex(null,null)},r.prototype.edge_mouseover=function(e,t){this.highlightEdge(e,t)},r.prototype.edge_mouseout=function(e,t){this.highlightEdge(null,null)},r.prototype.addMarkers=function(e){void 0===e&&(e=!1),e&&(this.defs.select("#"+this._id+"_arrowHead").remove(),this.defs.select("#"+this._id+"_circleFoot").remove(),this.defs.select("#"+this._id+"_circleHead").remove(),this.defs.select("#"+this._id+"_glow").remove()),this.defs.append("marker").attr("class","marker").attr("id",this._id+"_arrowHead").attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerWidth",8).attr("markerHeight",8).attr("markerUnits","strokeWidth").attr("orient","auto").append("polyline").attr("points","0,0 10,5 0,10 1,5"),this.defs.append("marker").attr("class","marker").attr("id",this._id+"_circleFoot").attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",7).attr("markerHeight",7).attr("markerUnits","strokeWidth").attr("orient","auto").append("circle").attr("cx",5).attr("cy",5).attr("r",4),this.defs.append("marker").attr("class","marker").attr("id",this._id+"_circleHead").attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",7).attr("markerHeight",7).attr("markerUnits","strokeWidth").attr("orient","auto").append("circle").attr("cx",5).attr("cy",5).attr("r",4)},r.prototype.progress=function(e){},r.Subgraph=u_,r.Vertex=c_,r.Edge=R,r.profileID=0,r}(t.SVGZoomWidget);h_.prototype._class+=" graph_Graph",h_.prototype.implements(n.IGraph.prototype),h_.prototype.implements(n.ITooltip.prototype),h_.prototype.publish("allowDragging",!0,"boolean","Allow Dragging of Vertices",null,{tags:["Advanced"]}),h_.prototype.publish("dragSingleNeighbors",!1,"boolean","Dragging a Vertex also moves its singleton neighbors",null,{tags:["Advanced"]}),h_.prototype.publish("layout","Circle","set","Default Layout",["Circle","ForceDirected","ForceDirected2","Hierarchy","None"],{tags:["Basic"]}),h_.prototype.publish("scale","100%","set","Zoom Level",["all","width","selection","100%","90%","75%","50%","25%","10%"],{tags:["Basic"]}),h_.prototype.publish("applyScaleOnLayout",!1,"boolean","Shrink to fit on Layout",null,{tags:["Basic"]}),h_.prototype.publish("highlightOnMouseOverVertex",!1,"boolean","Highlight Vertex on Mouse Over",null,{tags:["Basic"]}),h_.prototype.publish("highlightOnMouseOverEdge",!1,"boolean","Highlight Edge on Mouse Over",null,{tags:["Basic"]}),h_.prototype.publish("transitionDuration",250,"number","Transition Duration",null,{tags:["Intermediate"]}),h_.prototype.publish("showEdges",!0,"boolean","Show Edges",null,{tags:["Intermediate"]}),h_.prototype.publish("snapToGrid",0,"number","Snap to Grid",null,{tags:["Private"]}),h_.prototype.publish("selectionClearOnBackgroundClick",!1,"boolean","Clear selection on background click"),h_.prototype.publish("centroidColor","#00A000","html-color","Centroid Color",null,{tags:["Basic"]}),h_.prototype.publish("highlightSelectedPathToCentroid",!1,"boolean","Highlight path to Center Vertex (for selected vertices)",null,{tags:["Basic"]}),h_.prototype.publish("hierarchyRankDirection","TB","set","Direction for Rank Nodes",["TB","BT","LR","RL"],{tags:["Advanced"]}),h_.prototype.publish("hierarchyNodeSeparation",50,"number","Number of pixels that separate nodes horizontally in the layout",null,{tags:["Advanced"]}),h_.prototype.publish("hierarchyEdgeSeparation",10,"number","Number of pixels that separate edges horizontally in the layout",null,{tags:["Advanced"]}),h_.prototype.publish("hierarchyRankSeparation",50,"number","Number of pixels between each rank in the layout",null,{tags:["Advanced"]}),h_.prototype.publish("hierarchyDigraph",!0,"boolean","Directional Graph",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedLinkDistance",300,"number","Target distance between linked nodes",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedLinkStrength",1,"number","Strength (rigidity) of links",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedFriction",.9,"number","Friction coefficient",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedCharge",-25,"number","Charge strength ",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedChargeDistance",1e4,"number","Maximum distance over which charge forces are applied",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedTheta",.8,"number","Barnes–Hut approximation criterion",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedGravity",.1,"number","Gravitational strength",null,{tags:["Advanced"]});var l_=h_.prototype.scale;h_.prototype.scale=function(e,t){var r=l_.apply(this,arguments);return arguments.length&&this.zoomTo(e,t),r};var f_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.owner=function(e){return arguments.length?(this._owner=e,this):this._owner},t.prototype.valid=function(){return!!this.iconColumn()},t.prototype.indexes=function(){var e=this._owner.columns();return{iconCol:e.indexOf(this.iconColumn()),iconFillCol:e.indexOf(this.iconFillColumn()),tooltipCol:e.indexOf(this.tooltipColumn()),shapeStrokeCol:e.indexOf(this.shapeStrokeColumn()),shapeFillCol:e.indexOf(this.shapeFillColumn())}},t.prototype.mapper=function(){var e=this,t=this.indexes();return function(r){return{faChar:r[t.iconCol],tooltip:r[t.tooltipCol],shape_colorFill:r[t.shapeFillCol]||e.shapeFillDefault(),shape_colorStroke:r[t.shapeStrokeCol]||e.shapeStrokeDefault(),image_colorFill:r[t.iconFillCol]||e.iconFillDefault()}}},t}(t.PropertyExt);f_.prototype._class+=" graph_Annotation",f_.prototype.publish("iconColumn","","set","Icon column",(function(){return this._owner.columns()}),{optional:!0}),f_.prototype.publish("iconFillDefault","white","html-color","Icon fill default color"),f_.prototype.publish("iconFillColumn","","set","Icon fill color column",(function(){return this._owner.columns()}),{optional:!0}),f_.prototype.publish("tooltipColumn","","set","Tooltip column",(function(){return this._owner.columns()}),{optional:!0}),f_.prototype.publish("shapeStrokeDefault","darkred","html-color","Shape stroke default color"),f_.prototype.publish("shapeStrokeColumn","","set","Shape stroke color column",(function(){return this._owner.columns()}),{optional:!0}),f_.prototype.publish("shapeFillDefault","red","html-color","Shape fill default color"),f_.prototype.publish("shapeFillColumn","","set","Shape fill color column",(function(){return this._owner.columns()}),{optional:!0});var d_=function(e){function t(){var t=e.call(this)||this;return t._vertexMap={},t._edgeMap={},t._merge=!1,t._adjacencyData=[],t}return s(t,e),t.prototype.linksColumns=function(){var e=this.columns().indexOf(this.linksColumn()),t=this._db.field(e);return t?t.children().map((function(e){return e.label()})):[]},t.prototype.validAnnotations=function(){return this.annotations().filter((function(e){return e.valid()}))},t.prototype.updateData=function(){var t=this,n=r.hashSum([this._adjacencyData,this.uidColumn(),this.labelColumn(),this.iconColumn(),this.linksColumn(),this.linkUidColumn(),this.linkLabelColumn(),this.validAnnotations().map((function(e){return e.hashSum()}))]);if(this._prevAdjacencyDataHash!==n){this._prevAdjacencyDataHash=n;for(var o=this.columns(),i=o.indexOf(this.uidColumn()),a=o.indexOf(this.labelColumn()),s=o.indexOf(this.iconColumn()),u=o.indexOf(this.linksColumn()),c=this.linksColumns(),h=c.indexOf(this.linkUidColumn()),l=c.indexOf(this.linkLabelColumn()),f=this.validAnnotations().map((function(e){return e.mapper()})),d={},p={},g={vertices:this._adjacencyData.map((function(e){var r=e[i];if(void 0!==r){var n=d[r]||t._vertexMap[r];return n||(n=new c_),d[r]=n,n.text(e[a]).data(e).faChar(e[s]).annotationIcons(f.map((function(t){return t(e)}))),n}})).filter((function(e){return!!e})),edges:[]},v=0,y=this._adjacencyData;v<y.length;v++){var _=y[v],m=_[i],b=_[u];if(void 0!==m&&void 0!==b)for(var x=0,w=b;x<w.length;x++){var E=w[x],k=E[h],S=E[l],D="".concat(m,"->").concat(k),j=p[D]||this._edgeMap[D];j||(d[m]&&d[k]?j=(new R).sourceVertex(d[m]).targetVertex(d[k]).data(E):console.warn("Missing vertices for edge: "+D)),j&&(j.text(S),p[D]=j,g.edges.push(j))}}this._vertexMap=d,this._edgeMap=p,e.prototype.data.call(this,g,this._merge)}},t.prototype.data=function(e,t){if(!arguments.length)return this._adjacencyData;if(e instanceof Array)return this._merge=t,this._adjacencyData=e,this;throw new Error("Invalid data shape.")},t.prototype.update=function(t,r){this.updateData(),e.prototype.update.call(this,t,r)},t.prototype.click=function(e,t,r){},t}(h_);function p_(e,t){return e.sourceLinks.length?e.depth:t-1}function g_(e){return function(){return e}}function v_(e,t){return __(e.source,t.source)||e.index-t.index}function y_(e,t){return __(e.target,t.target)||e.index-t.index}function __(e,t){return e.y0-t.y0}function m_(e){return e.value}function b_(e){return e.index}function x_(e){return e.nodes}function w_(e){return e.links}function E_(e,t){const r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function k_({nodes:e}){for(const t of e){let e=t.y0,r=e;for(const r of t.sourceLinks)r.y0=e+r.width/2,e+=r.width;for(const e of t.targetLinks)e.y1=r+e.width/2,r+=e.width}}function S_(){let e,r,n,o=0,i=0,a=1,s=1,u=24,c=8,h=b_,l=p_,f=x_,d=w_,p=6;function g(){const e={nodes:f.apply(null,arguments),links:d.apply(null,arguments)};return v(e),y(e),_(e),m(e),b(e),k_(e),e}function v({nodes:e,links:t}){for(const[t,r]of e.entries())r.index=t,r.sourceLinks=[],r.targetLinks=[];const r=new Map(e.map(((t,r)=>[h(t,r,e),t])));for(const[e,n]of t.entries()){n.index=e;let{source:t,target:o}=n;"object"!=typeof t&&(t=n.source=E_(r,t)),"object"!=typeof o&&(o=n.target=E_(r,o)),t.sourceLinks.push(n),o.targetLinks.push(n)}if(null!=n)for(const{sourceLinks:t,targetLinks:r}of e)t.sort(n),r.sort(n)}function y({nodes:e}){for(const r of e)r.value=void 0===r.fixedValue?Math.max(t.sum(r.sourceLinks,m_),t.sum(r.targetLinks,m_)):r.fixedValue}function _({nodes:e}){const t=e.length;let r=new Set(e),n=new Set,o=0;for(;r.size;){for(const e of r){e.depth=o;for(const{target:t}of e.sourceLinks)n.add(t)}if(++o>t)throw new Error("circular link");r=n,n=new Set}}function m({nodes:e}){const t=e.length;let r=new Set(e),n=new Set,o=0;for(;r.size;){for(const e of r){e.height=o;for(const{source:t}of e.targetLinks)n.add(t)}if(++o>t)throw new Error("circular link");r=n,n=new Set}}function b(n){const h=function({nodes:e}){const n=t.max(e,(e=>e.depth))+1,i=(a-o-u)/(n-1),s=new Array(n);for(const t of e){const e=Math.max(0,Math.min(n-1,Math.floor(l.call(null,t,n))));t.layer=e,t.x0=o+e*i,t.x1=t.x0+u,s[e]?s[e].push(t):s[e]=[t]}if(r)for(const e of s)e.sort(r);return s}(n);e=Math.min(c,(s-i)/(t.max(h,(e=>e.length))-1)),function(r){const n=t.min(r,(r=>(s-i-(r.length-1)*e)/t.sum(r,m_)));for(const t of r){let r=i;for(const o of t){o.y0=r,o.y1=r+o.value*n,r=o.y1+e;for(const e of o.sourceLinks)e.width=e.value*n}r=(s-r+e)/(t.length+1);for(let e=0;e<t.length;++e){const n=t[e];n.y0+=r*(e+1),n.y1+=r*(e+1)}j(t)}}(h);for(let e=0;e<p;++e){const t=Math.pow(.99,e),r=Math.max(1-t,(e+1)/p);w(h,t,r),x(h,t,r)}}function x(e,t,n){for(let o=1,i=e.length;o<i;++o){const i=e[o];for(const e of i){let r=0,n=0;for(const{source:t,value:o}of e.targetLinks){let i=o*(e.layer-t.layer);r+=C(t,e)*i,n+=i}if(!(n>0))continue;let o=(r/n-e.y0)*t;e.y0+=o,e.y1+=o,D(e)}void 0===r&&i.sort(__),E(i,n)}}function w(e,t,n){for(let o=e.length-2;o>=0;--o){const i=e[o];for(const e of i){let r=0,n=0;for(const{target:t,value:o}of e.sourceLinks){let i=o*(t.layer-e.layer);r+=A(e,t)*i,n+=i}if(!(n>0))continue;let o=(r/n-e.y0)*t;e.y0+=o,e.y1+=o,D(e)}void 0===r&&i.sort(__),E(i,n)}}function E(t,r){const n=t.length>>1,o=t[n];S(t,o.y0-e,n-1,r),k(t,o.y1+e,n+1,r),S(t,s,t.length-1,r),k(t,i,0,r)}function k(t,r,n,o){for(;n<t.length;++n){const i=t[n],a=(r-i.y0)*o;a>1e-6&&(i.y0+=a,i.y1+=a),r=i.y1+e}}function S(t,r,n,o){for(;n>=0;--n){const i=t[n],a=(i.y1-r)*o;a>1e-6&&(i.y0-=a,i.y1-=a),r=i.y0-e}}function D({sourceLinks:e,targetLinks:t}){if(void 0===n){for(const{source:{sourceLinks:e}}of t)e.sort(y_);for(const{target:{targetLinks:t}}of e)t.sort(v_)}}function j(e){if(void 0===n)for(const{sourceLinks:t,targetLinks:r}of e)t.sort(y_),r.sort(v_)}function C(t,r){let n=t.y0-(t.sourceLinks.length-1)*e/2;for(const{target:o,width:i}of t.sourceLinks){if(o===r)break;n+=i+e}for(const{source:e,width:o}of r.targetLinks){if(e===t)break;n-=o}return n}function A(t,r){let n=r.y0-(r.targetLinks.length-1)*e/2;for(const{source:o,width:i}of r.targetLinks){if(o===t)break;n+=i+e}for(const{target:e,width:o}of t.sourceLinks){if(e===r)break;n-=o}return n}return g.update=function(e){return k_(e),e},g.nodeId=function(e){return arguments.length?(h="function"==typeof e?e:g_(e),g):h},g.nodeAlign=function(e){return arguments.length?(l="function"==typeof e?e:g_(e),g):l},g.nodeSort=function(e){return arguments.length?(r=e,g):r},g.nodeWidth=function(e){return arguments.length?(u=+e,g):u},g.nodePadding=function(t){return arguments.length?(c=e=+t,g):c},g.nodes=function(e){return arguments.length?(f="function"==typeof e?e:g_(e),g):f},g.links=function(e){return arguments.length?(d="function"==typeof e?e:g_(e),g):d},g.linkSort=function(e){return arguments.length?(n=e,g):n},g.size=function(e){return arguments.length?(o=i=0,a=+e[0],s=+e[1],g):[a-o,s-i]},g.extent=function(e){return arguments.length?(o=+e[0][0],a=+e[1][0],i=+e[0][1],s=+e[1][1],g):[[o,i],[a,s]]},g.iterations=function(e){return arguments.length?(p=+e,g):p},g}function D_(e){return[e.source.x1,e.y0]}function j_(e){return[e.target.x0,e.y1]}function C_(){return C().source(D_).target(j_)}d_.prototype._class+=" graph_AdjacencyGraph",d_.prototype.publish("uidColumn","","set","UID column",(function(){return this.columns()}),{optional:!0}),d_.prototype.publish("labelColumn","","set","Label column",(function(){return this.columns()}),{optional:!0}),d_.prototype.publish("iconColumn","","set","Icon column",(function(){return this.columns()}),{optional:!0}),d_.prototype.publish("linksColumn","","set","Links column",(function(){return this.columns()}),{optional:!0}),d_.prototype.publish("linkUidColumn","","set","Link UID column",(function(){return this.linksColumns()}),{optional:!0}),d_.prototype.publish("linkLabelColumn","","set","Link Label column",(function(){return this.linksColumns()}),{optional:!0}),d_.prototype.publish("annotations",[],"propertyArray","Annotations",null,{autoExpand:f_});L(".graph_Sankey .node rect{fill-opacity:.9;shape-rendering:crispEdges;stroke:#a9a9a9;cursor:move}.graph_Sankey .node.selected rect{stroke:red}.graph_Sankey .node.over rect{stroke:orange}.graph_Sankey .node.selected.over rect{stroke:red}.graph_Sankey .node text{pointer-events:none;text-shadow:0 1px 0 #fff}.graph_Sankey .node.selected text{fill:red}.graph_Sankey .node.over text{fill:orange}.graph_Sankey .node.selected.over text{fill:red}.graph_Sankey .link{fill:none;stroke:#000;stroke-opacity:.2}.graph_Sankey .link:hover{stroke-opacity:.5}");var A_={mean:t.mean,median:t.median,min:t.min,max:t.max,sum:t.sum},O_=function(e){function t(){return e.call(this)||this}return s(t,e),t.prototype.owner=function(e){return arguments.length?(this._owner=e,this):this._owner},t.prototype.valid=function(){return!!this.column()},t.prototype.aggregate=function(e){switch(this.aggrType()){case null:case void 0:case"":return e.length;default:var t=this._owner.columns().indexOf(this.aggrColumn());return A_[this.aggrType()](e,(function(e){return+e[t]}))}},t}(t.PropertyExt);O_.prototype._class+=" graph_Sankey.SankeyColumn",O_.prototype.publish("column",null,"set","Field",(function(){return this._owner?this._owner.columns():[]}),{optional:!0}),O_.prototype.publish("aggrType",null,"set","Aggregation Type",[null,"mean","median","sum","min","max"],{optional:!0,disable:function(e){return!e._owner||0===e._owner.mappings().indexOf(e)}}),O_.prototype.publish("aggrColumn",null,"set","Aggregation Field",(function(){return this._owner?this._owner.columns():[]}),{optional:!0,disable:function(e){return!e._owner||!e.aggrType()||0===e._owner.mappings().indexOf(e)}});var I_=function(e){function r(){var r=e.call(this)||this;return t.Utility.SimpleSelectionMixin.call(r),r._drawStartPos="origin",r}return s(r,e),r.prototype.sankeyData=function(){var e={vertices:[],edges:[]};if(0===this.data().length)return e;var t={},r=this.mappings().filter((function(e){return e.valid()}));return r.forEach((function(r,n){this._db.rollupView([r.column()]).entries().forEach((function(o){var i=r.column()+":"+n+":"+o.key;t[i]||(e.vertices.push({__id:i,__category:r.column(),name:o.key,origRow:o.value,value:o.value[n][2]}),t[i]=e.vertices.length-1)}),this)}),this),r.forEach((function(n,o){if(o<r.length-1){var i=r[o+1];this._db.rollupView([n.column(),i.column()]).entries().forEach((function(r){var a=n.column()+":"+o+":"+r.key;r.values.forEach((function(r){var n=i.column()+":"+(o+1)+":"+r.key;e.edges.push({__id:a+"_"+n,source:t[a],target:t[n],value:r.value[0][2]})}))}))}}),this),e},r.prototype.enter=function(t,r){e.prototype.enter.call(this,t,r),this._d3Sankey=new S_,this._selection.widgetElement(r)},r.prototype.update=function(r,n){e.prototype.update.call(this,r,n),this._palette=this._palette.switch(this.paletteID());var o=this.vertexStrokeWidth(),i=this.sankeyData(),a=2*o;this._d3Sankey.extent([[o,o],[this.width()-a,this.height()-a]]).nodeWidth(this.vertexWidth()).nodePadding(this.vertexPadding()),this._d3Sankey({nodes:i.vertices,links:i.edges});var s=this,u=n.selectAll(".link").data(i.edges);u.enter().append("path").attr("class","link").each((function(){t.select(this).append("title")})).merge(u).attr("d",C_()).style("stroke-width",(function(e){return Math.max(1,e.width)})).sort((function(e,t){return t.width-e.width})).select("title").text((function(e){return e.source.name+" → "+e.target.name+"\n"+e.value})),u.exit().remove();var c=n.selectAll(".node").data(i.vertices);c.enter().append("g").attr("class","node").call(this._selection.enter.bind(this._selection)).on("click",(function(e){s.click(s.rowToObj(e.origRow[0]),"",s._selection.selected(this))})).on("dblclick",(function(e){s.dblclick(s.rowToObj(e.origRow[0]),"",s._selection.selected(this))})).each((function(){var e=t.select(this);e.append("rect"),e.append("text")})).merge(c).attr("transform",(function(e){var t=0,r=0;return e.x0&&(t=e.x0),e.y0&&(r=e.y0),"translate("+(t+o)+","+(r+o)+")"})).each((function(){var e=t.select(this);e.select("rect").attr("height",(function(e){return e.y1-e.y0})).attr("width",s._d3Sankey.nodeWidth()).style("fill",(function(e){return s._palette(e.name)})).style("stroke",(function(e){return s.vertexStrokeColor()})).style("stroke-width",(function(e){return o})).style("cursor",s.xAxisMovement()||s.yAxisMovement()?null:"default"),e.select("text").attr("x",-6).attr("y",(function(e){return(e.y1-e.y0)/2})).attr("dy",".35em").attr("text-anchor","end").attr("transform",null).text((function(e){return e.name})).filter((function(e){return e.x0<s.width()/2})).attr("x",6+s._d3Sankey.nodeWidth()).attr("text-anchor","start")})),c.exit().remove()},r.prototype.exit=function(t,r){e.prototype.exit.call(this,t,r)},r.prototype.click=function(e,t,r){},r.prototype.dblclick=function(e,t,r){},r}(t.SVGWidget);function P_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function F_(e){return F_="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},F_(e)}function M_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T_(){return T_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},T_.apply(this,arguments)}function N_(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function L_(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return N_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?N_(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function B_(e,t){var r=[],n=[];return e.length&&function e(t,o){if(1===t.length)r.push(t[0]),n.push(t[0]);else{for(var i=Array(t.length-1),a=0;a<i.length;a++)0===a&&r.push(t[0]),a===i.length-1&&n.push(t[a+1]),i[a]=[(1-o)*t[a][0]+o*t[a+1][0],(1-o)*t[a][1]+o*t[a+1][1]];e(i,o)}}(e,t),{left:r,right:n.reverse()}}function R_(e){var t={};return 4===e.length&&(t.x2=e[2][0],t.y2=e[2][1]),e.length>=3&&(t.x1=e[1][0],t.y1=e[1][1]),t.x=e[e.length-1][0],t.y=e[e.length-1][1],4===e.length?t.type="C":3===e.length?t.type="Q":t.type="L",t}function V_(e,t,r){var n=[[e.x,e.y]];return null!=t.x1&&n.push([t.x1,t.y1]),null!=t.x2&&n.push([t.x2,t.y2]),n.push([t.x,t.y]),function(e,t){for(var r=[],n=e,o=1/(t=t||2),i=0;i<t-1;i++){var a=B_(n,o/(1-o*i));r.push(a.left),n=a.right}return r.push(n),r}(n,r).map(R_)}I_.prototype._class+=" graph_Sankey",I_.prototype.Column=O_,I_.prototype.mixin(t.Utility.SimpleSelectionMixin),I_.prototype._palette=t.Palette.ordinal("default"),I_.prototype.publish("paletteID","default","set","Color palette for this widget",I_.prototype._palette.switch()),I_.prototype.publish("mappings",[],"propertyArray","Source Columns",null,{autoExpand:O_}),I_.prototype.publish("vertexStrokeWidth",1,"number","Vertex Stroke Width"),I_.prototype.publish("vertexStrokeColor","darkgray","string","Vertex Stroke Color"),I_.prototype.publish("vertexWidth",36,"number","Vertex Width"),I_.prototype.publish("vertexPadding",40,"number","Vertex Padding"),I_.prototype.publish("xAxisMovement",!1,"boolean","Enable x-axis movement"),I_.prototype.publish("yAxisMovement",!1,"boolean","Enable y-axis movement");var z_=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,G_={M:["x","y"],L:["x","y"],H:["x"],V:["y"],C:["x1","y1","x2","y2","x","y"],S:["x2","y2","x","y"],Q:["x1","y1","x","y"],T:["x","y"],A:["rx","ry","xAxisRotation","largeArcFlag","sweepFlag","x","y"],Z:[]};function U_(e,t){for(var r=Array(e),n=0;n<e;n++)r[n]=t;return r}function H_(e){return"".concat(e.type).concat(G_[e.type].map((function(t){return e[t]})).join(","))}function q_(e,t,r){var n=e.length-1,o=t.length-1,i=n/o,a=U_(o).reduce((function(t,n,o){var a=Math.floor(i*o);if(r&&a<e.length-1&&r(e[a],e[a+1])){var s=i*o%1<.5;t[a]&&(s?a>0?a-=1:a<e.length-1&&(a+=1):a<e.length-1?a+=1:a>0&&(a-=1))}return t[a]=(t[a]||0)+1,t}),[]).reduce((function(t,r,n){if(n===e.length-1){var o=U_(r,T_({},e[e.length-1]));return"M"===o[0].type&&o.forEach((function(e){e.type="L"})),t.concat(o)}return t.concat(function(e,t,r){var n=[];if("L"===t.type||"Q"===t.type||"C"===t.type)n=n.concat(V_(e,t,r));else{var o=T_({},e);"M"===o.type&&(o.type="L"),(n=n.concat(U_(r-1).map((function(){return o})))).push(t)}return n}(e[n],e[n+1],r))}),[]);return a.unshift(e[0]),a}function W_(e){for(var t,r,n=(e||"").match(z_)||[],o=[],i=0;i<n.length;++i)if(t=G_[n[i]]){r={type:n[i]};for(var a=0;a<t.length;++a)r[t[a]]=+n[i+a+1];i+=t.length,o.push(r)}return o}function Y_(e,t,r){var n=null==e?[]:e.slice(),o=null==t?[]:t.slice(),i="object"===F_(r)?r:{excludeSegment:r,snapEndsToInput:!0},a=i.excludeSegment,s=i.snapEndsToInput;if(!n.length&&!o.length)return function(){return[]};var u=!(0!==n.length&&"Z"!==n[n.length-1].type||0!==o.length&&"Z"!==o[o.length-1].type);n.length>0&&"Z"===n[n.length-1].type&&n.pop(),o.length>0&&"Z"===o[o.length-1].type&&o.pop(),n.length?o.length||o.push(n[0]):n.push(o[0]),0!==Math.abs(o.length-n.length)&&(o.length>n.length?n=q_(n,o,a):o.length<n.length&&(o=q_(o,n,a)));var c=(n=n.map((function(e,t){return function(e,t){var r={x1:"x",y1:"y",x2:"x",y2:"y"},n=["xAxisRotation","largeArcFlag","sweepFlag"];if(e.type!==t.type&&"M"!==t.type.toUpperCase()){var o={};Object.keys(t).forEach((function(i){var a=t[i],s=e[i];void 0===s&&(n.includes(i)?s=a:(void 0===s&&r[i]&&(s=e[r[i]]),void 0===s&&(s=0))),o[i]=s})),o.type=t.type,e=o}return e}(e,o[t])}))).map((function(e){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P_(Object(r),!0).forEach((function(t){M_(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e)}));return u&&(c.push({type:"Z"}),n.push({type:"Z"})),function(e){if(1===e&&s)return null==t?[]:t;if(0===e)return n;for(var r=0;r<c.length;++r){var i,a=n[r],u=o[r],h=c[r],l=L_(G_[h.type]);try{for(l.s();!(i=l.n()).done;){var f=i.value;h[f]=(1-e)*a[f]+e*u[f],"largeArcFlag"!==f&&"sweepFlag"!==f||(h[f]=Math.round(h[f]))}}catch(e){l.e(e)}finally{l.f()}}return c}}Object.keys(G_).forEach((function(e){G_[e.toLowerCase()]=G_[e]}));var K_=E().x((function(e){return e[0]})).y((function(e){return e[1]})).curve(I),Z_=E().x((function(e){return e[0]})).y((function(e){return e[1]})).curve(T),$_=function(){function e(e){this._running=!1,this._graph=e}return e.prototype.start=function(){return this._running=!0,this._graph.progress("layout-start"),Promise.resolve(this)},e.prototype.stop=function(){return this._running=!1,this._graph.progress("layout-stop"),this},e.prototype.running=function(){return this._running},e.prototype.center=function(e){if(e.length%2==1)return e[Math.floor(e.length/2)];var t=e[e.length/2-1],r=e[e.length/2];return[(t[0]+r[0])/2,(t[1]+r[1])/2]},e.prototype.edgePath=function(e,t){var r=this._graph.projectPlacholder(e.source),n=this._graph.projectPlacholder(e.target),o=[[r.x,r.y],[n.x,n.y]];if(t){var i=o[0][0]-o[1][0],a=o[0][1]-o[1][1];if(Math.sqrt(i*i+a*a)){var s=(o[0][0]+o[1][0])/2-a*t/100,u=(o[0][1]+o[1][1])/2+i*t/100;return{path:Z_([o[0],[s,u],o[1]]),labelPos:[s,u]}}}return{path:K_(o),labelPos:this.center(o)}},e}(),Q_=function(e){return e*Math.PI/180},X_=function(e){function t(t,r){void 0===r&&(r=60);var n=e.call(this,t)||this;return n.sideLength=r,n}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=t._graph.size(),r=t._graph.graphData(),n=r.allVertices();r.allEdges().forEach((function(e){return delete e.points}));var o,i=(o=n.length,t.sideLength/(2*Math.sin(Q_(180/o)))),a=360/n.length;return n.forEach((function(t,r){delete t.fx,delete t.fy,t.x=e.width/2+Math.cos(Q_(r*a))*i,t.y=e.height/2+Math.sin(Q_(r*a))*i})),t._graph.moveVertices(!0).moveEdges(!0),t.stop(),t._running=!1,t}))},t}($_);var J_=E().x((function(e){return e[0]})).y((function(e){return e[1]})).curve(I),em=function(e){return"cluster_".concat(e)};function tm(e,t,r,n){var o=e-r,i=t-n;return Math.sqrt(o*o+i*i)}var rm=function(e){function t(t,r){var n=e.call(this,t)||this;return n._options=r,n}return s(t,e),t.prototype.start=function(){var t=this;e.prototype.start.call(this);var r=this._graph.size(),n=this._graph.graphData();return function(e,t){var r=new Blob(['!function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){throw new Error(\'Could not dynamically require "\'+e+\'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.\')}var n={exports:{}};n.exports=function(){function e(n,r,o){function i(s,u){if(!r[s]){if(!n[s]){if(!u&&t)return t(s);if(a)return a(s,!0);var c=new Error("Cannot find module \'"+s+"\'");throw c.code="MODULE_NOT_FOUND",c}var f=r[s]={exports:{}};n[s][0].call(f.exports,(function(e){return i(n[s][1][e]||e)}),f,f.exports,e,n,r,o)}return r[s].exports}for(var a=t,s=0;s<o.length;s++)i(o[s]);return i}return e}()({1:[function(e,t,n){t.exports={graphlib:e("./lib/graphlib"),layout:e("./lib/layout"),debug:e("./lib/debug"),util:{time:e("./lib/util").time,notime:e("./lib/util").notime},version:e("./lib/version")}},{"./lib/debug":6,"./lib/graphlib":7,"./lib/layout":9,"./lib/util":29,"./lib/version":30}],2:[function(e,t,n){var r=e("./lodash"),o=e("./greedy-fas");function i(e){var t="greedy"===e.graph().acyclicer?o(e,n(e)):a(e);function n(e){return function(t){return e.edge(t).weight}}r.forEach(t,(function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,r.uniqueId("rev"))}))}function a(e){var t=[],n={},o={};function i(a){r.has(o,a)||(o[a]=!0,n[a]=!0,r.forEach(e.outEdges(a),(function(e){r.has(n,e.w)?t.push(e):i(e.w)})),delete n[a])}return r.forEach(e.nodes(),i),t}function s(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}}))}t.exports={run:i,undo:s}},{"./greedy-fas":8,"./lodash":10}],3:[function(e,t,n){var r=e("./lodash"),o=e("./util");function i(e){function t(n){var o=e.children(n),i=e.node(n);if(o.length&&r.forEach(o,t),r.has(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var s=i.minRank,u=i.maxRank+1;s<u;++s)a(e,"borderLeft","_bl",n,i,s),a(e,"borderRight","_br",n,i,s)}}r.forEach(e.children(),t)}function a(e,t,n,r,i,a){var s={width:0,height:0,rank:a,borderType:t},u=i[t][a-1],c=o.addDummyNode(e,"border",s,n);i[t][a]=c,e.setParent(c,r),u&&e.setEdge(u,c,{weight:1})}t.exports=i},{"./lodash":10,"./util":29}],4:[function(e,t,n){var r=e("./lodash");function o(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||a(e)}function i(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||u(e),"lr"!==t&&"rl"!==t||(f(e),a(e))}function a(e){r.forEach(e.nodes(),(function(t){s(e.node(t))})),r.forEach(e.edges(),(function(t){s(e.edge(t))}))}function s(e){var t=e.width;e.width=e.height,e.height=t}function u(e){r.forEach(e.nodes(),(function(t){c(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.forEach(n.points,c),r.has(n,"y")&&c(n)}))}function c(e){e.y=-e.y}function f(e){r.forEach(e.nodes(),(function(t){d(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.forEach(n.points,d),r.has(n,"x")&&d(n)}))}function d(e){var t=e.x;e.x=e.y,e.y=t}t.exports={adjust:o,undo:i}},{"./lodash":10}],5:[function(e,t,n){function r(){var e={};e._next=e._prev=e,this._sentinel=e}function o(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function i(e,t){if("_next"!==e&&"_prev"!==e)return t}t.exports=r,r.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return o(t),t},r.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&o(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},r.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,i)),n=n._prev;return"["+e.join(", ")+"]"}},{}],6:[function(e,t,n){var r=e("./lodash"),o=e("./util"),i=e("./graphlib").Graph;function a(e){var t=o.buildLayerMatrix(e),n=new i({compound:!0,multigraph:!0}).setGraph({});return r.forEach(e.nodes(),(function(t){n.setNode(t,{label:t}),n.setParent(t,"layer"+e.node(t).rank)})),r.forEach(e.edges(),(function(e){n.setEdge(e.v,e.w,{},e.name)})),r.forEach(t,(function(e,t){var o="layer"+t;n.setNode(o,{rank:"same"}),r.reduce(e,(function(e,t){return n.setEdge(e,t,{style:"invis"}),t}))})),n}t.exports={debugOrdering:a}},{"./graphlib":7,"./lodash":10,"./util":29}],7:[function(e,t,n){var r;if("function"==typeof e)try{r=e("graphlib")}catch(e){}r||(r=window.graphlib),t.exports=r},{graphlib:31}],8:[function(e,t,n){var r=e("./lodash"),o=e("./graphlib").Graph,i=e("./data/list");t.exports=s;var a=r.constant(1);function s(e,t){if(e.nodeCount()<=1)return[];var n=f(e,t||a),o=u(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(o,(function(t){return e.outEdges(t.v,t.w)})),!0)}function u(e,t,n){for(var r,o=[],i=t[t.length-1],a=t[0];e.nodeCount();){for(;r=a.dequeue();)c(e,t,n,r);for(;r=i.dequeue();)c(e,t,n,r);if(e.nodeCount())for(var s=t.length-2;s>0;--s)if(r=t[s].dequeue()){o=o.concat(c(e,t,n,r,!0));break}}return o}function c(e,t,n,o,i){var a=i?[]:void 0;return r.forEach(e.inEdges(o.v),(function(r){var o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,d(t,n,s)})),r.forEach(e.outEdges(o.v),(function(r){var o=e.edge(r),i=r.w,a=e.node(i);a.in-=o,d(t,n,a)})),e.removeNode(o.v),a}function f(e,t){var n=new o,a=0,s=0;r.forEach(e.nodes(),(function(e){n.setNode(e,{v:e,in:0,out:0})})),r.forEach(e.edges(),(function(e){var r=n.edge(e.v,e.w)||0,o=t(e),i=r+o;n.setEdge(e.v,e.w,i),s=Math.max(s,n.node(e.v).out+=o),a=Math.max(a,n.node(e.w).in+=o)}));var u=r.range(s+a+3).map((function(){return new i})),c=a+1;return r.forEach(n.nodes(),(function(e){d(u,c,n.node(e))})),{graph:n,buckets:u,zeroIdx:c}}function d(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}},{"./data/list":5,"./graphlib":7,"./lodash":10}],9:[function(e,t,n){var r=e("./lodash"),o=e("./acyclic"),i=e("./normalize"),a=e("./rank"),s=e("./util").normalizeRanks,u=e("./parent-dummy-chains"),c=e("./util").removeEmptyRanks,f=e("./nesting-graph"),d=e("./add-border-segments"),h=e("./coordinate-system"),l=e("./order"),p=e("./position"),v=e("./util"),_=e("./graphlib").Graph;function y(e,t){var n=t&&t.debugTiming?v.time:v.notime;n("layout",(function(){var t=n(" buildLayoutGraph",(function(){return I(e)}));n(" runLayout",(function(){g(t,n)})),n(" updateInputGraph",(function(){b(e,t)}))}))}function g(e,t){t(" makeSpaceForEdgeLabels",(function(){S(e)})),t(" removeSelfEdges",(function(){B(e)})),t(" acyclic",(function(){o.run(e)})),t(" nestingGraph.run",(function(){f.run(e)})),t(" rank",(function(){a(v.asNonCompoundGraph(e))})),t(" injectEdgeLabelProxies",(function(){C(e)})),t(" removeEmptyRanks",(function(){c(e)})),t(" nestingGraph.cleanup",(function(){f.cleanup(e)})),t(" normalizeRanks",(function(){s(e)})),t(" assignRankMinMax",(function(){N(e)})),t(" removeEdgeLabelProxies",(function(){T(e)})),t(" normalize.run",(function(){i.run(e)})),t(" parentDummyChains",(function(){u(e)})),t(" addBorderSegments",(function(){d(e)})),t(" order",(function(){l(e)})),t(" insertSelfEdges",(function(){G(e)})),t(" adjustCoordinateSystem",(function(){h.adjust(e)})),t(" position",(function(){p(e)})),t(" positionSelfEdges",(function(){R(e)})),t(" removeBorderNodes",(function(){D(e)})),t(" normalize.undo",(function(){i.undo(e)})),t(" fixupEdgeLabelCoords",(function(){P(e)})),t(" undoCoordinateSystem",(function(){h.undo(e)})),t(" translateGraph",(function(){M(e)})),t(" assignNodeIntersects",(function(){L(e)})),t(" reversePoints",(function(){F(e)})),t(" acyclic.undo",(function(){o.undo(e)}))}function b(e,t){r.forEach(e.nodes(),(function(n){var r=e.node(n),o=t.node(n);r&&(r.x=o.x,r.y=o.y,t.children(n).length&&(r.width=o.width,r.height=o.height))})),r.forEach(e.edges(),(function(n){var o=e.edge(n),i=t.edge(n);o.points=i.points,r.has(i,"x")&&(o.x=i.x,o.y=i.y)})),e.graph().width=t.graph().width,e.graph().height=t.graph().height}t.exports=y;var m=["nodesep","edgesep","ranksep","marginx","marginy"],x={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},w=["acyclicer","ranker","rankdir","align"],E=["width","height"],j={width:0,height:0},k=["minlen","weight","width","height","labeloffset"],A={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},O=["labelpos"];function I(e){var t=new _({multigraph:!0,compound:!0}),n=z(e.graph());return t.setGraph(r.merge({},x,U(n,m),r.pick(n,w))),r.forEach(e.nodes(),(function(n){var o=z(e.node(n));t.setNode(n,r.defaults(U(o,E),j)),t.setParent(n,e.parent(n))})),r.forEach(e.edges(),(function(n){var o=z(e.edge(n));t.setEdge(n,r.merge({},A,U(o,k),r.pick(o,O)))})),t}function S(e){var t=e.graph();t.ranksep/=2,r.forEach(e.edges(),(function(n){var r=e.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}function C(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),o={rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t};v.addDummyNode(e,"edge-proxy",o,"_ep")}}))}function N(e){var t=0;r.forEach(e.nodes(),(function(n){var o=e.node(n);o.borderTop&&(o.minRank=e.node(o.borderTop).rank,o.maxRank=e.node(o.borderBottom).rank,t=r.max(t,o.maxRank))})),e.graph().maxRank=t}function T(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))}))}function M(e){var t=Number.POSITIVE_INFINITY,n=0,o=Number.POSITIVE_INFINITY,i=0,a=e.graph(),s=a.marginx||0,u=a.marginy||0;function c(e){var r=e.x,a=e.y,s=e.width,u=e.height;t=Math.min(t,r-s/2),n=Math.max(n,r+s/2),o=Math.min(o,a-u/2),i=Math.max(i,a+u/2)}r.forEach(e.nodes(),(function(t){c(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.has(n,"x")&&c(n)})),t-=s,o-=u,r.forEach(e.nodes(),(function(n){var r=e.node(n);r.x-=t,r.y-=o})),r.forEach(e.edges(),(function(n){var i=e.edge(n);r.forEach(i.points,(function(e){e.x-=t,e.y-=o})),r.has(i,"x")&&(i.x-=t),r.has(i,"y")&&(i.y-=o)})),a.width=n-t+s,a.height=i-o+u}function L(e){r.forEach(e.edges(),(function(t){var n,r,o=e.edge(t),i=e.node(t.v),a=e.node(t.w);o.points?(n=o.points[0],r=o.points[o.points.length-1]):(o.points=[],n=a,r=i),o.points.unshift(v.intersectRect(i,n)),o.points.push(v.intersectRect(a,r))}))}function P(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}function F(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);n.reversed&&n.points.reverse()}))}function D(e){r.forEach(e.nodes(),(function(t){if(e.children(t).length){var n=e.node(t),o=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(r.last(n.borderLeft)),s=e.node(r.last(n.borderRight));n.width=Math.abs(s.x-a.x),n.height=Math.abs(i.y-o.y),n.x=a.x+n.width/2,n.y=o.y+n.height/2}})),r.forEach(e.nodes(),(function(t){"border"===e.node(t).dummy&&e.removeNode(t)}))}function B(e){r.forEach(e.edges(),(function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}}))}function G(e){var t=v.buildLayerMatrix(e);r.forEach(t,(function(t){var n=0;r.forEach(t,(function(t,o){var i=e.node(t);i.order=o+n,r.forEach(i.selfEdges,(function(t){v.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:i.rank,order:o+ ++n,e:t.e,label:t.label},"_se")})),delete i.selfEdges}))}))}function R(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);if("selfedge"===n.dummy){var r=e.node(n.e.v),o=r.x+r.width/2,i=r.y,a=n.x-o,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:o+2*a/3,y:i-s},{x:o+5*a/6,y:i-s},{x:o+a,y:i},{x:o+5*a/6,y:i+s},{x:o+2*a/3,y:i+s}],n.label.x=n.x,n.label.y=n.y}}))}function U(e,t){return r.mapValues(r.pick(e,t),Number)}function z(e){var t={};return r.forEach(e,(function(e,n){t[n.toLowerCase()]=e})),t}},{"./acyclic":2,"./add-border-segments":3,"./coordinate-system":4,"./graphlib":7,"./lodash":10,"./nesting-graph":11,"./normalize":12,"./order":17,"./parent-dummy-chains":22,"./position":24,"./rank":26,"./util":29}],10:[function(e,t,n){var r;if("function"==typeof e)try{r={cloneDeep:e("lodash/cloneDeep"),constant:e("lodash/constant"),defaults:e("lodash/defaults"),each:e("lodash/each"),filter:e("lodash/filter"),find:e("lodash/find"),flatten:e("lodash/flatten"),forEach:e("lodash/forEach"),forIn:e("lodash/forIn"),has:e("lodash/has"),isUndefined:e("lodash/isUndefined"),last:e("lodash/last"),map:e("lodash/map"),mapValues:e("lodash/mapValues"),max:e("lodash/max"),merge:e("lodash/merge"),min:e("lodash/min"),minBy:e("lodash/minBy"),now:e("lodash/now"),pick:e("lodash/pick"),range:e("lodash/range"),reduce:e("lodash/reduce"),sortBy:e("lodash/sortBy"),uniqueId:e("lodash/uniqueId"),values:e("lodash/values"),zipObject:e("lodash/zipObject")}}catch(e){}r||(r=window._),t.exports=r},{"lodash/cloneDeep":227,"lodash/constant":228,"lodash/defaults":229,"lodash/each":230,"lodash/filter":232,"lodash/find":233,"lodash/flatten":235,"lodash/forEach":236,"lodash/forIn":237,"lodash/has":239,"lodash/isUndefined":258,"lodash/last":261,"lodash/map":262,"lodash/mapValues":263,"lodash/max":264,"lodash/merge":266,"lodash/min":267,"lodash/minBy":268,"lodash/now":270,"lodash/pick":271,"lodash/range":273,"lodash/reduce":274,"lodash/sortBy":276,"lodash/uniqueId":286,"lodash/values":287,"lodash/zipObject":288}],11:[function(e,t,n){var r=e("./lodash"),o=e("./util");function i(e){var t=o.addDummyNode(e,"root",{},"_root"),n=s(e),i=r.max(r.values(n))-1,c=2*i+1;e.graph().nestingRoot=t,r.forEach(e.edges(),(function(t){e.edge(t).minlen*=c}));var f=u(e)+1;r.forEach(e.children(),(function(r){a(e,t,c,f,i,n,r)})),e.graph().nodeRankFactor=c}function a(e,t,n,i,s,u,c){var f=e.children(c);if(f.length){var d=o.addBorderNode(e,"_bt"),h=o.addBorderNode(e,"_bb"),l=e.node(c);e.setParent(d,c),l.borderTop=d,e.setParent(h,c),l.borderBottom=h,r.forEach(f,(function(r){a(e,t,n,i,s,u,r);var o=e.node(r),f=o.borderTop?o.borderTop:r,l=o.borderBottom?o.borderBottom:r,p=o.borderTop?i:2*i,v=f!==l?1:s-u[c]+1;e.setEdge(d,f,{weight:p,minlen:v,nestingEdge:!0}),e.setEdge(l,h,{weight:p,minlen:v,nestingEdge:!0})})),e.parent(c)||e.setEdge(t,d,{weight:0,minlen:s+u[c]})}else c!==t&&e.setEdge(t,c,{weight:0,minlen:n})}function s(e){var t={};function n(o,i){var a=e.children(o);a&&a.length&&r.forEach(a,(function(e){n(e,i+1)})),t[o]=i}return r.forEach(e.children(),(function(e){n(e,1)})),t}function u(e){return r.reduce(e.edges(),(function(t,n){return t+e.edge(n).weight}),0)}function c(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,r.forEach(e.edges(),(function(t){e.edge(t).nestingEdge&&e.removeEdge(t)}))}t.exports={run:i,cleanup:c}},{"./lodash":10,"./util":29}],12:[function(e,t,n){var r=e("./lodash"),o=e("./util");function i(e){e.graph().dummyChains=[],r.forEach(e.edges(),(function(t){a(e,t)}))}function a(e,t){var n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,s=t.name,u=e.edge(t),c=u.labelRank;if(a!==r+1){var f,d,h;for(e.removeEdge(t),h=0,++r;r<a;++h,++r)u.points=[],d={width:0,height:0,edgeLabel:u,edgeObj:t,rank:r},f=o.addDummyNode(e,"edge",d,"_d"),r===c&&(d.width=u.width,d.height=u.height,d.dummy="edge-label",d.labelpos=u.labelpos),e.setEdge(n,f,{weight:u.weight},s),0===h&&e.graph().dummyChains.push(f),n=f;e.setEdge(n,i,{weight:u.weight},s)}}function s(e){r.forEach(e.graph().dummyChains,(function(t){var n,r=e.node(t),o=r.edgeLabel;for(e.setEdge(r.edgeObj,o);r.dummy;)n=e.successors(t)[0],e.removeNode(t),o.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(o.x=r.x,o.y=r.y,o.width=r.width,o.height=r.height),t=n,r=e.node(t)}))}t.exports={run:i,undo:s}},{"./lodash":10,"./util":29}],13:[function(e,t,n){var r=e("../lodash");function o(e,t,n){var o,i={};r.forEach(n,(function(n){for(var r,a,s=e.parent(n);s;){if((r=e.parent(s))?(a=i[r],i[r]=s):(a=o,o=s),a&&a!==s)return void t.setEdge(a,s);s=r}}))}t.exports=o},{"../lodash":10}],14:[function(e,t,n){var r=e("../lodash");function o(e,t){return r.map(t,(function(t){var n=e.inEdges(t);if(n.length){var o=r.reduce(n,(function(t,n){var r=e.edge(n),o=e.node(n.v);return{sum:t.sum+r.weight*o.order,weight:t.weight+r.weight}}),{sum:0,weight:0});return{v:t,barycenter:o.sum/o.weight,weight:o.weight}}return{v:t}}))}t.exports=o},{"../lodash":10}],15:[function(e,t,n){var r=e("../lodash"),o=e("../graphlib").Graph;function i(e,t,n){var i=a(e),s=new o({compound:!0}).setGraph({root:i}).setDefaultNodeLabel((function(t){return e.node(t)}));return r.forEach(e.nodes(),(function(o){var a=e.node(o),u=e.parent(o);(a.rank===t||a.minRank<=t&&t<=a.maxRank)&&(s.setNode(o),s.setParent(o,u||i),r.forEach(e[n](o),(function(t){var n=t.v===o?t.w:t.v,i=s.edge(n,o),a=r.isUndefined(i)?0:i.weight;s.setEdge(n,o,{weight:e.edge(t).weight+a})})),r.has(a,"minRank")&&s.setNode(o,{borderLeft:a.borderLeft[t],borderRight:a.borderRight[t]}))})),s}function a(e){for(var t;e.hasNode(t=r.uniqueId("_root")););return t}t.exports=i},{"../graphlib":7,"../lodash":10}],16:[function(e,t,n){var r=e("../lodash");function o(e,t){for(var n=0,r=1;r<t.length;++r)n+=i(e,t[r-1],t[r]);return n}function i(e,t,n){for(var o=r.zipObject(n,r.map(n,(function(e,t){return t}))),i=r.flatten(r.map(t,(function(t){return r.sortBy(r.map(e.outEdges(t),(function(t){return{pos:o[t.w],weight:e.edge(t).weight}})),"pos")})),!0),a=1;a<n.length;)a<<=1;var s=2*a-1;a-=1;var u=r.map(new Array(s),(function(){return 0})),c=0;return r.forEach(i.forEach((function(e){var t=e.pos+a;u[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=u[t+1]),u[t=t-1>>1]+=e.weight;c+=e.weight*n}))),c}t.exports=o},{"../lodash":10}],17:[function(e,t,n){var r=e("../lodash"),o=e("./init-order"),i=e("./cross-count"),a=e("./sort-subgraph"),s=e("./build-layer-graph"),u=e("./add-subgraph-constraints"),c=e("../graphlib").Graph,f=e("../util");function d(e){var t=f.maxRank(e),n=h(e,r.range(1,t+1),"inEdges"),a=h(e,r.range(t-1,-1,-1),"outEdges"),s=o(e);p(e,s);for(var u,c=Number.POSITIVE_INFINITY,d=0,v=0;v<4;++d,++v){l(d%2?n:a,d%4>=2),s=f.buildLayerMatrix(e);var _=i(e,s);_<c&&(v=0,u=r.cloneDeep(s),c=_)}p(e,u)}function h(e,t,n){return r.map(t,(function(t){return s(e,t,n)}))}function l(e,t){var n=new c;r.forEach(e,(function(e){var o=e.graph().root,i=a(e,o,n,t);r.forEach(i.vs,(function(t,n){e.node(t).order=n})),u(e,n,i.vs)}))}function p(e,t){r.forEach(t,(function(t){r.forEach(t,(function(t,n){e.node(t).order=n}))}))}t.exports=d},{"../graphlib":7,"../lodash":10,"../util":29,"./add-subgraph-constraints":13,"./build-layer-graph":15,"./cross-count":16,"./init-order":18,"./sort-subgraph":20}],18:[function(e,t,n){var r=e("../lodash");function o(e){var t={},n=r.filter(e.nodes(),(function(t){return!e.children(t).length})),o=r.max(r.map(n,(function(t){return e.node(t).rank}))),i=r.map(r.range(o+1),(function(){return[]}));function a(n){if(!r.has(t,n)){t[n]=!0;var o=e.node(n);i[o.rank].push(n),r.forEach(e.successors(n),a)}}var s=r.sortBy(n,(function(t){return e.node(t).rank}));return r.forEach(s,a),i}t.exports=o},{"../lodash":10}],19:[function(e,t,n){var r=e("../lodash");function o(e,t){var n={};return r.forEach(e,(function(e,t){var o=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};r.isUndefined(e.barycenter)||(o.barycenter=e.barycenter,o.weight=e.weight)})),r.forEach(t.edges(),(function(e){var t=n[e.v],o=n[e.w];r.isUndefined(t)||r.isUndefined(o)||(o.indegree++,t.out.push(n[e.w]))})),i(r.filter(n,(function(e){return!e.indegree})))}function i(e){var t=[];function n(e){return function(t){t.merged||(r.isUndefined(t.barycenter)||r.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&a(e,t)}}function o(t){return function(n){n.in.push(t),0==--n.indegree&&e.push(n)}}for(;e.length;){var i=e.pop();t.push(i),r.forEach(i.in.reverse(),n(i)),r.forEach(i.out,o(i))}return r.map(r.filter(t,(function(e){return!e.merged})),(function(e){return r.pick(e,["vs","i","barycenter","weight"])}))}function a(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}t.exports=o},{"../lodash":10}],20:[function(e,t,n){var r=e("../lodash"),o=e("./barycenter"),i=e("./resolve-conflicts"),a=e("./sort");function s(e,t,n,f){var d=e.children(t),h=e.node(t),l=h?h.borderLeft:void 0,p=h?h.borderRight:void 0,v={};l&&(d=r.filter(d,(function(e){return e!==l&&e!==p})));var _=o(e,d);r.forEach(_,(function(t){if(e.children(t.v).length){var o=s(e,t.v,n,f);v[t.v]=o,r.has(o,"barycenter")&&c(t,o)}}));var y=i(_,n);u(y,v);var g=a(y,f);if(l&&(g.vs=r.flatten([l,g.vs,p],!0),e.predecessors(l).length)){var b=e.node(e.predecessors(l)[0]),m=e.node(e.predecessors(p)[0]);r.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+b.order+m.order)/(g.weight+2),g.weight+=2}return g}function u(e,t){r.forEach(e,(function(e){e.vs=r.flatten(e.vs.map((function(e){return t[e]?t[e].vs:e})),!0)}))}function c(e,t){r.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}t.exports=s},{"../lodash":10,"./barycenter":14,"./resolve-conflicts":19,"./sort":21}],21:[function(e,t,n){var r=e("../lodash"),o=e("../util");function i(e,t){var n=o.partition(e,(function(e){return r.has(e,"barycenter")})),i=n.lhs,u=r.sortBy(n.rhs,(function(e){return-e.i})),c=[],f=0,d=0,h=0;i.sort(s(!!t)),h=a(c,u,h),r.forEach(i,(function(e){h+=e.vs.length,c.push(e.vs),f+=e.barycenter*e.weight,d+=e.weight,h=a(c,u,h)}));var l={vs:r.flatten(c,!0)};return d&&(l.barycenter=f/d,l.weight=d),l}function a(e,t,n){for(var o;t.length&&(o=r.last(t)).i<=n;)t.pop(),e.push(o.vs),n++;return n}function s(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}t.exports=i},{"../lodash":10,"../util":29}],22:[function(e,t,n){var r=e("./lodash");function o(e){var t=a(e);r.forEach(e.graph().dummyChains,(function(n){for(var r=e.node(n),o=r.edgeObj,a=i(e,t,o.v,o.w),s=a.path,u=a.lca,c=0,f=s[c],d=!0;n!==o.w;){if(r=e.node(n),d){for(;(f=s[c])!==u&&e.node(f).maxRank<r.rank;)c++;f===u&&(d=!1)}if(!d){for(;c<s.length-1&&e.node(f=s[c+1]).minRank<=r.rank;)c++;f=s[c]}e.setParent(n,f),n=e.successors(n)[0]}}))}function i(e,t,n,r){var o,i,a=[],s=[],u=Math.min(t[n].low,t[r].low),c=Math.max(t[n].lim,t[r].lim);o=n;do{o=e.parent(o),a.push(o)}while(o&&(t[o].low>u||c>t[o].lim));for(i=o,o=r;(o=e.parent(o))!==i;)s.push(o);return{path:a.concat(s.reverse()),lca:i}}function a(e){var t={},n=0;function o(i){var a=n;r.forEach(e.children(i),o),t[i]={low:a,lim:n++}}return r.forEach(e.children(),o),t}t.exports=o},{"./lodash":10}],23:[function(e,t,n){var r=e("../lodash"),o=e("../graphlib").Graph,i=e("../util");function a(e,t){var n={};function o(t,o){var i=0,a=0,s=t.length,f=r.last(o);return r.forEach(o,(function(t,d){var h=u(e,t),l=h?e.node(h).order:s;(h||t===f)&&(r.forEach(o.slice(a,d+1),(function(t){r.forEach(e.predecessors(t),(function(r){var o=e.node(r),a=o.order;!(a<i||l<a)||o.dummy&&e.node(t).dummy||c(n,r,t)}))})),a=d+1,i=l)})),o}return r.reduce(t,o),n}function s(e,t){var n={};function o(t,o,i,a,s){var u;r.forEach(r.range(o,i),(function(o){u=t[o],e.node(u).dummy&&r.forEach(e.predecessors(u),(function(t){var r=e.node(t);r.dummy&&(r.order<a||r.order>s)&&c(n,t,u)}))}))}function i(t,n){var i,a=-1,s=0;return r.forEach(n,(function(r,u){if("border"===e.node(r).dummy){var c=e.predecessors(r);c.length&&(i=e.node(c[0]).order,o(n,s,u,a,i),s=u,a=i)}o(n,s,n.length,i,t.length)})),n}return r.reduce(t,i),n}function u(e,t){if(e.node(t).dummy)return r.find(e.predecessors(t),(function(t){return e.node(t).dummy}))}function c(e,t,n){if(t>n){var r=t;t=n,n=r}var o=e[t];o||(e[t]=o={}),o[n]=!0}function f(e,t,n){if(t>n){var o=t;t=n,n=o}return r.has(e[t],n)}function d(e,t,n,o){var i={},a={},s={};return r.forEach(t,(function(e){r.forEach(e,(function(e,t){i[e]=e,a[e]=e,s[e]=t}))})),r.forEach(t,(function(e){var t=-1;r.forEach(e,(function(e){var u=o(e);if(u.length){u=r.sortBy(u,(function(e){return s[e]}));for(var c=(u.length-1)/2,d=Math.floor(c),h=Math.ceil(c);d<=h;++d){var l=u[d];a[e]===e&&t<s[l]&&!f(n,e,l)&&(a[l]=e,a[e]=i[e]=i[l],t=s[l])}}}))})),{root:i,align:a}}function h(e,t,n,o,i){var a={},s=l(e,t,n,i),u=i?"borderLeft":"borderRight";function c(e,t){for(var n=s.nodes(),r=n.pop(),o={};r;)o[r]?e(r):(o[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}function f(e){a[e]=s.inEdges(e).reduce((function(e,t){return Math.max(e,a[t.v]+s.edge(t))}),0)}function d(t){var n=s.outEdges(t).reduce((function(e,t){return Math.min(e,a[t.w]-s.edge(t))}),Number.POSITIVE_INFINITY),r=e.node(t);n!==Number.POSITIVE_INFINITY&&r.borderType!==u&&(a[t]=Math.max(a[t],n))}return c(f,s.predecessors.bind(s)),c(d,s.successors.bind(s)),r.forEach(o,(function(e){a[e]=a[n[e]]})),a}function l(e,t,n,i){var a=new o,s=e.graph(),u=g(s.nodesep,s.edgesep,i);return r.forEach(t,(function(t){var o;r.forEach(t,(function(t){var r=n[t];if(a.setNode(r),o){var i=n[o],s=a.edge(i,r);a.setEdge(i,r,Math.max(u(e,t,o),s||0))}o=t}))})),a}function p(e,t){return r.minBy(r.values(t),(function(t){var n=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;return r.forIn(t,(function(t,r){var i=b(e,r)/2;n=Math.max(t+i,n),o=Math.min(t-i,o)})),n-o}))}function v(e,t){var n=r.values(t),o=r.min(n),i=r.max(n);r.forEach(["u","d"],(function(n){r.forEach(["l","r"],(function(a){var s,u=n+a,c=e[u];if(c!==t){var f=r.values(c);(s="l"===a?o-r.min(f):i-r.max(f))&&(e[u]=r.mapValues(c,(function(e){return e+s})))}}))}))}function _(e,t){return r.mapValues(e.ul,(function(n,o){if(t)return e[t.toLowerCase()][o];var i=r.sortBy(r.map(e,o));return(i[1]+i[2])/2}))}function y(e){var t,n=i.buildLayerMatrix(e),o=r.merge(a(e,n),s(e,n)),u={};r.forEach(["u","d"],(function(i){t="u"===i?n:r.values(n).reverse(),r.forEach(["l","r"],(function(n){"r"===n&&(t=r.map(t,(function(e){return r.values(e).reverse()})));var a=("u"===i?e.predecessors:e.successors).bind(e),s=d(e,t,o,a),c=h(e,t,s.root,s.align,"r"===n);"r"===n&&(c=r.mapValues(c,(function(e){return-e}))),u[i+n]=c}))}));var c=p(e,u);return v(u,c),_(u,e.graph().align)}function g(e,t,n){return function(o,i,a){var s,u=o.node(i),c=o.node(a),f=0;if(f+=u.width/2,r.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=-u.width/2;break;case"r":s=u.width/2}if(s&&(f+=n?s:-s),s=0,f+=(u.dummy?t:e)/2,f+=(c.dummy?t:e)/2,f+=c.width/2,r.has(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":s=c.width/2;break;case"r":s=-c.width/2}return s&&(f+=n?s:-s),s=0,f}}function b(e,t){return e.node(t).width}t.exports={positionX:y,findType1Conflicts:a,findType2Conflicts:s,addConflict:c,hasConflict:f,verticalAlignment:d,horizontalCompaction:h,alignCoordinates:v,findSmallestWidthAlignment:p,balance:_}},{"../graphlib":7,"../lodash":10,"../util":29}],24:[function(e,t,n){var r=e("../lodash"),o=e("../util"),i=e("./bk").positionX;function a(e){s(e=o.asNonCompoundGraph(e)),r.forEach(i(e),(function(t,n){e.node(n).x=t}))}function s(e){var t=o.buildLayerMatrix(e),n=e.graph().ranksep,i=0;r.forEach(t,(function(t){var o=r.max(r.map(t,(function(t){return e.node(t).height})));r.forEach(t,(function(t){e.node(t).y=i+o/2})),i+=o+n}))}t.exports=a},{"../lodash":10,"../util":29,"./bk":23}],25:[function(e,t,n){var r=e("../lodash"),o=e("../graphlib").Graph,i=e("./util").slack;function a(e){var t,n,r=new o({directed:!1}),a=e.nodes()[0],f=e.nodeCount();for(r.setNode(a,{});s(r,e)<f;)t=u(r,e),n=r.hasNode(t.v)?i(e,t):-i(e,t),c(r,e,n);return r}function s(e,t){function n(o){r.forEach(t.nodeEdges(o),(function(r){var a=r.v,s=o===a?r.w:a;e.hasNode(s)||i(t,r)||(e.setNode(s,{}),e.setEdge(o,s,{}),n(s))}))}return r.forEach(e.nodes(),n),e.nodeCount()}function u(e,t){return r.minBy(t.edges(),(function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return i(t,n)}))}function c(e,t,n){r.forEach(e.nodes(),(function(e){t.node(e).rank+=n}))}t.exports=a},{"../graphlib":7,"../lodash":10,"./util":28}],26:[function(e,t,n){var r=e("./util").longestPath,o=e("./feasible-tree"),i=e("./network-simplex");function a(e){switch(e.graph().ranker){case"network-simplex":default:c(e);break;case"tight-tree":u(e);break;case"longest-path":s(e)}}t.exports=a;var s=r;function u(e){r(e),o(e)}function c(e){i(e)}},{"./feasible-tree":25,"./network-simplex":27,"./util":28}],27:[function(e,t,n){var r=e("../lodash"),o=e("./feasible-tree"),i=e("./util").slack,a=e("./util").longestPath,s=e("../graphlib").alg.preorder,u=e("../graphlib").alg.postorder,c=e("../util").simplify;function f(e){e=c(e),a(e);var t,n=o(e);for(p(n),d(n,e);t=_(n);)g(n,e,t,y(n,e,t))}function d(e,t){var n=u(e,e.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){h(e,t,n)}))}function h(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=l(e,t,n)}function l(e,t,n){var o=e.node(n).parent,i=!0,a=t.edge(n,o),s=0;return a||(i=!1,a=t.edge(o,n)),s=a.weight,r.forEach(t.nodeEdges(n),(function(r){var a=r.v===n,u=a?r.w:r.v;if(u!==o){var c=a===i,f=t.edge(r).weight;if(s+=c?f:-f,m(e,n,u)){var d=e.edge(n,u).cutvalue;s+=c?-d:d}}})),s}function p(e,t){arguments.length<2&&(t=e.nodes()[0]),v(e,{},1,t)}function v(e,t,n,o,i){var a=n,s=e.node(o);return t[o]=!0,r.forEach(e.neighbors(o),(function(i){r.has(t,i)||(n=v(e,t,n,i,o))})),s.low=a,s.lim=n++,i?s.parent=i:delete s.parent,n}function _(e){return r.find(e.edges(),(function(t){return e.edge(t).cutvalue<0}))}function y(e,t,n){var o=n.v,a=n.w;t.hasEdge(o,a)||(o=n.w,a=n.v);var s=e.node(o),u=e.node(a),c=s,f=!1;s.lim>u.lim&&(c=u,f=!0);var d=r.filter(t.edges(),(function(t){return f===x(e,e.node(t.v),c)&&f!==x(e,e.node(t.w),c)}));return r.minBy(d,(function(e){return i(t,e)}))}function g(e,t,n,r){var o=n.v,i=n.w;e.removeEdge(o,i),e.setEdge(r.v,r.w,{}),p(e),d(e,t),b(e,t)}function b(e,t){var n=r.find(e.nodes(),(function(e){return!t.node(e).parent})),o=s(e,n);o=o.slice(1),r.forEach(o,(function(n){var r=e.node(n).parent,o=t.edge(n,r),i=!1;o||(o=t.edge(r,n),i=!0),t.node(n).rank=t.node(r).rank+(i?o.minlen:-o.minlen)}))}function m(e,t,n){return e.hasEdge(t,n)}function x(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}t.exports=f,f.initLowLimValues=p,f.initCutValues=d,f.calcCutValue=l,f.leaveEdge=_,f.enterEdge=y,f.exchangeEdges=g},{"../graphlib":7,"../lodash":10,"../util":29,"./feasible-tree":25,"./util":28}],28:[function(e,t,n){var r=e("../lodash");function o(e){var t={};function n(o){var i=e.node(o);if(r.has(t,o))return i.rank;t[o]=!0;var a=r.min(r.map(e.outEdges(o),(function(t){return n(t.w)-e.edge(t).minlen})));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),i.rank=a}r.forEach(e.sources(),n)}function i(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}t.exports={longestPath:o,slack:i}},{"../lodash":10}],29:[function(e,t,n){var r=e("./lodash"),o=e("./graphlib").Graph;function i(e,t,n,o){var i;do{i=r.uniqueId(o)}while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function a(e){var t=(new o).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},o=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})})),t}function s(e){var t=new o({multigraph:e.isMultigraph()}).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){e.children(n).length||t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){t.setEdge(n,e.edge(n))})),t}function u(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.outEdges(t),(function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)}function c(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.inEdges(t),(function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)}function f(e,t){var n,r,o=e.x,i=e.y,a=t.x-o,s=t.y-i,u=e.width/2,c=e.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*u>Math.abs(a)*c?(s<0&&(c=-c),n=c*a/s,r=c):(a<0&&(u=-u),n=u,r=u*s/a),{x:o+n,y:i+r}}function d(e){var t=r.map(r.range(v(e)+1),(function(){return[]}));return r.forEach(e.nodes(),(function(n){var o=e.node(n),i=o.rank;r.isUndefined(i)||(t[i][o.order]=n)})),t}function h(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank})));r.forEach(e.nodes(),(function(n){var o=e.node(n);r.has(o,"rank")&&(o.rank-=t)}))}function l(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank}))),n=[];r.forEach(e.nodes(),(function(r){var o=e.node(r).rank-t;n[o]||(n[o]=[]),n[o].push(r)}));var o=0,i=e.graph().nodeRankFactor;r.forEach(n,(function(t,n){r.isUndefined(t)&&n%i!=0?--o:o&&r.forEach(t,(function(t){e.node(t).rank+=o}))}))}function p(e,t,n,r){var o={width:0,height:0};return arguments.length>=4&&(o.rank=n,o.order=r),i(e,"border",o,t)}function v(e){return r.max(r.map(e.nodes(),(function(t){var n=e.node(t).rank;if(!r.isUndefined(n))return n})))}function _(e,t){var n={lhs:[],rhs:[]};return r.forEach(e,(function(e){t(e)?n.lhs.push(e):n.rhs.push(e)})),n}function y(e,t){var n=r.now();try{return t()}finally{console.log(e+" time: "+(r.now()-n)+"ms")}}function g(e,t){return t()}t.exports={addDummyNode:i,simplify:a,asNonCompoundGraph:s,successorWeights:u,predecessorWeights:c,intersectRect:f,buildLayerMatrix:d,normalizeRanks:h,removeEmptyRanks:l,addBorderNode:p,maxRank:v,partition:_,time:y,notime:g}},{"./graphlib":7,"./lodash":10}],30:[function(e,t,n){t.exports="0.8.5"},{}],31:[function(e,t,n){var r=e("./lib");t.exports={Graph:r.Graph,json:e("./lib/json"),alg:e("./lib/alg"),version:r.version}},{"./lib":47,"./lib/alg":38,"./lib/json":48}],32:[function(e,t,n){var r=e("../lodash");function o(e){var t,n={},o=[];function i(o){r.has(n,o)||(n[o]=!0,t.push(o),r.each(e.successors(o),i),r.each(e.predecessors(o),i))}return r.each(e.nodes(),(function(e){t=[],i(e),t.length&&o.push(t)})),o}t.exports=o},{"../lodash":49}],33:[function(e,t,n){var r=e("../lodash");function o(e,t,n){r.isArray(t)||(t=[t]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),a=[],s={};return r.each(t,(function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);i(e,t,"post"===n,s,o,a)})),a}function i(e,t,n,o,a,s){r.has(o,t)||(o[t]=!0,n||s.push(t),r.each(a(t),(function(t){i(e,t,n,o,a,s)})),n&&s.push(t))}t.exports=o},{"../lodash":49}],34:[function(e,t,n){var r=e("./dijkstra"),o=e("../lodash");function i(e,t,n){return o.transform(e.nodes(),(function(o,i){o[i]=r(e,i,t,n)}),{})}t.exports=i},{"../lodash":49,"./dijkstra":35}],35:[function(e,t,n){var r=e("../lodash"),o=e("../data/priority-queue");t.exports=a;var i=r.constant(1);function a(e,t,n,r){return s(e,String(t),n||i,r||function(t){return e.outEdges(t)})}function s(e,t,n,r){var i,a,s={},u=new o,c=function(e){var t=e.v!==i?e.v:e.w,r=s[t],o=n(e),c=a.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);c<r.distance&&(r.distance=c,r.predecessor=i,u.decrease(t,c))};for(e.nodes().forEach((function(e){var n=e===t?0:Number.POSITIVE_INFINITY;s[e]={distance:n},u.add(e,n)}));u.size()>0&&(i=u.removeMin(),(a=s[i]).distance!==Number.POSITIVE_INFINITY);)r(i).forEach(c);return s}},{"../data/priority-queue":45,"../lodash":49}],36:[function(e,t,n){var r=e("../lodash"),o=e("./tarjan");function i(e){return r.filter(o(e),(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])}))}t.exports=i},{"../lodash":49,"./tarjan":43}],37:[function(e,t,n){var r=e("../lodash");t.exports=i;var o=r.constant(1);function i(e,t,n){return a(e,t||o,n||function(t){return e.outEdges(t)})}function a(e,t,n){var r={},o=e.nodes();return o.forEach((function(e){r[e]={},r[e][e]={distance:0},o.forEach((function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})})),n(e).forEach((function(n){var o=n.v===e?n.w:n.v,i=t(n);r[e][o]={distance:i,predecessor:e}}))})),o.forEach((function(e){var t=r[e];o.forEach((function(n){var i=r[n];o.forEach((function(n){var r=i[e],o=t[n],a=i[n],s=r.distance+o.distance;s<a.distance&&(a.distance=s,a.predecessor=o.predecessor)}))}))})),r}},{"../lodash":49}],38:[function(e,t,n){t.exports={components:e("./components"),dijkstra:e("./dijkstra"),dijkstraAll:e("./dijkstra-all"),findCycles:e("./find-cycles"),floydWarshall:e("./floyd-warshall"),isAcyclic:e("./is-acyclic"),postorder:e("./postorder"),preorder:e("./preorder"),prim:e("./prim"),tarjan:e("./tarjan"),topsort:e("./topsort")}},{"./components":32,"./dijkstra":35,"./dijkstra-all":34,"./find-cycles":36,"./floyd-warshall":37,"./is-acyclic":39,"./postorder":40,"./preorder":41,"./prim":42,"./tarjan":43,"./topsort":44}],39:[function(e,t,n){var r=e("./topsort");function o(e){try{r(e)}catch(e){if(e instanceof r.CycleException)return!1;throw e}return!0}t.exports=o},{"./topsort":44}],40:[function(e,t,n){var r=e("./dfs");function o(e,t){return r(e,t,"post")}t.exports=o},{"./dfs":33}],41:[function(e,t,n){var r=e("./dfs");function o(e,t){return r(e,t,"pre")}t.exports=o},{"./dfs":33}],42:[function(e,t,n){var r=e("../lodash"),o=e("../graph"),i=e("../data/priority-queue");function a(e,t){var n,a=new o,s={},u=new i;function c(e){var r=e.v===n?e.w:e.v,o=u.priority(r);if(void 0!==o){var i=t(e);i<o&&(s[r]=n,u.decrease(r,i))}}if(0===e.nodeCount())return a;r.each(e.nodes(),(function(e){u.add(e,Number.POSITIVE_INFINITY),a.setNode(e)})),u.decrease(e.nodes()[0],0);for(var f=!1;u.size()>0;){if(n=u.removeMin(),r.has(s,n))a.setEdge(n,s[n]);else{if(f)throw new Error("Input graph is not connected: "+e);f=!0}e.nodeEdges(n).forEach(c)}return a}t.exports=a},{"../data/priority-queue":45,"../graph":46,"../lodash":49}],43:[function(e,t,n){var r=e("../lodash");function o(e){var t=0,n=[],o={},i=[];function a(s){var u=o[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach((function(e){r.has(o,e)?o[e].onStack&&(u.lowlink=Math.min(u.lowlink,o[e].index)):(a(e),u.lowlink=Math.min(u.lowlink,o[e].lowlink))})),u.lowlink===u.index){var c,f=[];do{c=n.pop(),o[c].onStack=!1,f.push(c)}while(s!==c);i.push(f)}}return e.nodes().forEach((function(e){r.has(o,e)||a(e)})),i}t.exports=o},{"../lodash":49}],44:[function(e,t,n){var r=e("../lodash");function o(e){var t={},n={},o=[];function a(s){if(r.has(n,s))throw new i;r.has(t,s)||(n[s]=!0,t[s]=!0,r.each(e.predecessors(s),a),delete n[s],o.push(s))}if(r.each(e.sinks(),a),r.size(t)!==e.nodeCount())throw new i;return o}function i(){}t.exports=o,o.CycleException=i,i.prototype=new Error},{"../lodash":49}],45:[function(e,t,n){var r=e("../lodash");function o(){this._arr=[],this._keyIndices={}}t.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},o.prototype.has=function(e){return r.has(this._keyIndices,e)},o.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},o.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var o=this._arr,i=o.length;return n[e]=i,o.push({key:e,priority:t}),this._decrease(i),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},o.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},o.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,o=e;n<t.length&&(o=t[n].priority<t[o].priority?n:o,r<t.length&&(o=t[r].priority<t[o].priority?r:o),o!==e&&(this._swap(e,o),this._heapify(o)))},o.prototype._decrease=function(e){for(var t,n=this._arr,r=n[e].priority;0!==e&&!(n[t=e>>1].priority<r);)this._swap(e,t),e=t},o.prototype._swap=function(e,t){var n=this._arr,r=this._keyIndices,o=n[e],i=n[t];n[e]=i,n[t]=o,r[i.key]=e,r[o.key]=t}},{"../lodash":49}],46:[function(e,t,n){var r=e("./lodash");t.exports=s;var o="\\0",i="\\0",a="";function s(e){this._isDirected=!r.has(e,"directed")||e.directed,this._isMultigraph=!!r.has(e,"multigraph")&&e.multigraph,this._isCompound=!!r.has(e,"compound")&&e.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[i]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function u(e,t){e[t]?e[t]++:e[t]=1}function c(e,t){--e[t]||delete e[t]}function f(e,t,n,i){var s=""+t,u=""+n;if(!e&&s>u){var c=s;s=u,u=c}return s+a+u+a+(r.isUndefined(i)?o:i)}function d(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var a=o;o=i,i=a}var s={v:o,w:i};return r&&(s.name=r),s}function h(e,t){return f(e,t.v,t.w,t.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(e){return this._label=e,this},s.prototype.graph=function(){return this._label},s.prototype.setDefaultNodeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultNodeLabelFn=e,this},s.prototype.nodeCount=function(){return this._nodeCount},s.prototype.nodes=function(){return r.keys(this._nodes)},s.prototype.sources=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._in[t])}))},s.prototype.sinks=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._out[t])}))},s.prototype.setNodes=function(e,t){var n=arguments,o=this;return r.each(e,(function(e){n.length>1?o.setNode(e,t):o.setNode(e)})),this},s.prototype.setNode=function(e,t){return r.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=i,this._children[e]={},this._children[i][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},s.prototype.node=function(e){return this._nodes[e]},s.prototype.hasNode=function(e){return r.has(this._nodes,e)},s.prototype.removeNode=function(e){var t=this;if(r.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],r.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),r.each(r.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],r.each(r.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},s.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(t))t=i;else{for(var n=t+="";!r.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},s.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},s.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==i)return t}},s.prototype.children=function(e){if(r.isUndefined(e)&&(e=i),this._isCompound){var t=this._children[e];if(t)return r.keys(t)}else{if(e===i)return this.nodes();if(this.hasNode(e))return[]}},s.prototype.predecessors=function(e){var t=this._preds[e];if(t)return r.keys(t)},s.prototype.successors=function(e){var t=this._sucs[e];if(t)return r.keys(t)},s.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return r.union(t,this.successors(e))},s.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},s.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){e(r)&&t.setNode(r,n)})),r.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))}));var o={};function i(e){var r=n.parent(e);return void 0===r||t.hasNode(r)?(o[e]=r,r):r in o?o[r]:i(r)}return this._isCompound&&r.each(t.nodes(),(function(e){t.setParent(e,i(e))})),t},s.prototype.setDefaultEdgeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultEdgeLabelFn=e,this},s.prototype.edgeCount=function(){return this._edgeCount},s.prototype.edges=function(){return r.values(this._edgeObjs)},s.prototype.setPath=function(e,t){var n=this,o=arguments;return r.reduce(e,(function(e,r){return o.length>1?n.setEdge(e,r,t):n.setEdge(e,r),r})),this},s.prototype.setEdge=function(){var e,t,n,o,i=!1,a=arguments[0];"object"==typeof a&&null!==a&&"v"in a?(e=a.v,t=a.w,n=a.name,2===arguments.length&&(o=arguments[1],i=!0)):(e=a,t=arguments[1],n=arguments[3],arguments.length>2&&(o=arguments[2],i=!0)),e=""+e,t=""+t,r.isUndefined(n)||(n=""+n);var s=f(this._isDirected,e,t,n);if(r.has(this._edgeLabels,s))return i&&(this._edgeLabels[s]=o),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[s]=i?o:this._defaultEdgeLabelFn(e,t,n);var c=d(this._isDirected,e,t,n);return e=c.v,t=c.w,Object.freeze(c),this._edgeObjs[s]=c,u(this._preds[t],e),u(this._sucs[e],t),this._in[t][s]=c,this._out[e][s]=c,this._edgeCount++,this},s.prototype.edge=function(e,t,n){var r=1===arguments.length?h(this._isDirected,arguments[0]):f(this._isDirected,e,t,n);return this._edgeLabels[r]},s.prototype.hasEdge=function(e,t,n){var o=1===arguments.length?h(this._isDirected,arguments[0]):f(this._isDirected,e,t,n);return r.has(this._edgeLabels,o)},s.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?h(this._isDirected,arguments[0]):f(this._isDirected,e,t,n),o=this._edgeObjs[r];return o&&(e=o.v,t=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],c(this._preds[t],e),c(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},s.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var o=r.values(n);return t?r.filter(o,(function(e){return e.v===t})):o}},s.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var o=r.values(n);return t?r.filter(o,(function(e){return e.w===t})):o}},s.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},{"./lodash":49}],47:[function(e,t,n){t.exports={Graph:e("./graph"),version:e("./version")}},{"./graph":46,"./version":50}],48:[function(e,t,n){var r=e("./lodash"),o=e("./graph");function i(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:a(e),edges:s(e)};return r.isUndefined(e.graph())||(t.value=r.clone(e.graph())),t}function a(e){return r.map(e.nodes(),(function(t){var n=e.node(t),o=e.parent(t),i={v:t};return r.isUndefined(n)||(i.value=n),r.isUndefined(o)||(i.parent=o),i}))}function s(e){return r.map(e.edges(),(function(t){var n=e.edge(t),o={v:t.v,w:t.w};return r.isUndefined(t.name)||(o.name=t.name),r.isUndefined(n)||(o.value=n),o}))}function u(e){var t=new o(e.options).setGraph(e.value);return r.each(e.nodes,(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)})),r.each(e.edges,(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)})),t}t.exports={write:i,read:u}},{"./graph":46,"./lodash":49}],49:[function(e,t,n){var r;if("function"==typeof e)try{r={clone:e("lodash/clone"),constant:e("lodash/constant"),each:e("lodash/each"),filter:e("lodash/filter"),has:e("lodash/has"),isArray:e("lodash/isArray"),isEmpty:e("lodash/isEmpty"),isFunction:e("lodash/isFunction"),isUndefined:e("lodash/isUndefined"),keys:e("lodash/keys"),map:e("lodash/map"),reduce:e("lodash/reduce"),size:e("lodash/size"),transform:e("lodash/transform"),union:e("lodash/union"),values:e("lodash/values")}}catch(e){}r||(r=window._),t.exports=r},{"lodash/clone":226,"lodash/constant":228,"lodash/each":230,"lodash/filter":232,"lodash/has":239,"lodash/isArray":243,"lodash/isEmpty":247,"lodash/isFunction":248,"lodash/isUndefined":258,"lodash/keys":259,"lodash/map":262,"lodash/reduce":274,"lodash/size":275,"lodash/transform":284,"lodash/union":285,"lodash/values":287}],50:[function(e,t,n){t.exports="2.1.8"},{}],51:[function(e,t,n){var r=e("./_getNative")(e("./_root"),"DataView");t.exports=r},{"./_getNative":163,"./_root":208}],52:[function(e,t,n){var r=e("./_hashClear"),o=e("./_hashDelete"),i=e("./_hashGet"),a=e("./_hashHas"),s=e("./_hashSet");function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,t.exports=u},{"./_hashClear":172,"./_hashDelete":173,"./_hashGet":174,"./_hashHas":175,"./_hashSet":176}],53:[function(e,t,n){var r=e("./_listCacheClear"),o=e("./_listCacheDelete"),i=e("./_listCacheGet"),a=e("./_listCacheHas"),s=e("./_listCacheSet");function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,t.exports=u},{"./_listCacheClear":188,"./_listCacheDelete":189,"./_listCacheGet":190,"./_listCacheHas":191,"./_listCacheSet":192}],54:[function(e,t,n){var r=e("./_getNative")(e("./_root"),"Map");t.exports=r},{"./_getNative":163,"./_root":208}],55:[function(e,t,n){var r=e("./_mapCacheClear"),o=e("./_mapCacheDelete"),i=e("./_mapCacheGet"),a=e("./_mapCacheHas"),s=e("./_mapCacheSet");function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,t.exports=u},{"./_mapCacheClear":193,"./_mapCacheDelete":194,"./_mapCacheGet":195,"./_mapCacheHas":196,"./_mapCacheSet":197}],56:[function(e,t,n){var r=e("./_getNative")(e("./_root"),"Promise");t.exports=r},{"./_getNative":163,"./_root":208}],57:[function(e,t,n){var r=e("./_getNative")(e("./_root"),"Set");t.exports=r},{"./_getNative":163,"./_root":208}],58:[function(e,t,n){var r=e("./_MapCache"),o=e("./_setCacheAdd"),i=e("./_setCacheHas");function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,t.exports=a},{"./_MapCache":55,"./_setCacheAdd":210,"./_setCacheHas":211}],59:[function(e,t,n){var r=e("./_ListCache"),o=e("./_stackClear"),i=e("./_stackDelete"),a=e("./_stackGet"),s=e("./_stackHas"),u=e("./_stackSet");function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,t.exports=c},{"./_ListCache":53,"./_stackClear":215,"./_stackDelete":216,"./_stackGet":217,"./_stackHas":218,"./_stackSet":219}],60:[function(e,t,n){var r=e("./_root").Symbol;t.exports=r},{"./_root":208}],61:[function(e,t,n){var r=e("./_root").Uint8Array;t.exports=r},{"./_root":208}],62:[function(e,t,n){var r=e("./_getNative")(e("./_root"),"WeakMap");t.exports=r},{"./_getNative":163,"./_root":208}],63:[function(e,t,n){function r(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}t.exports=r},{}],64:[function(e,t,n){function r(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}t.exports=r},{}],65:[function(e,t,n){function r(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}t.exports=r},{}],66:[function(e,t,n){var r=e("./_baseIndexOf");function o(e,t){return!(null==e||!e.length)&&r(e,t,0)>-1}t.exports=o},{"./_baseIndexOf":95}],67:[function(e,t,n){function r(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}t.exports=r},{}],68:[function(e,t,n){var r=e("./_baseTimes"),o=e("./isArguments"),i=e("./isArray"),a=e("./isBuffer"),s=e("./_isIndex"),u=e("./isTypedArray"),c=Object.prototype.hasOwnProperty;function f(e,t){var n=i(e),f=!n&&o(e),d=!n&&!f&&a(e),h=!n&&!f&&!d&&u(e),l=n||f||d||h,p=l?r(e.length,String):[],v=p.length;for(var _ in e)!t&&!c.call(e,_)||l&&("length"==_||d&&("offset"==_||"parent"==_)||h&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||s(_,v))||p.push(_);return p}t.exports=f},{"./_baseTimes":125,"./_isIndex":181,"./isArguments":242,"./isArray":243,"./isBuffer":246,"./isTypedArray":257}],69:[function(e,t,n){function r(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}t.exports=r},{}],70:[function(e,t,n){function r(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}t.exports=r},{}],71:[function(e,t,n){function r(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}t.exports=r},{}],72:[function(e,t,n){function r(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}t.exports=r},{}],73:[function(e,t,n){var r=e("./_baseProperty")("length");t.exports=r},{"./_baseProperty":117}],74:[function(e,t,n){var r=e("./_baseAssignValue"),o=e("./eq");function i(e,t,n){(void 0!==n&&!o(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}t.exports=i},{"./_baseAssignValue":79,"./eq":231}],75:[function(e,t,n){var r=e("./_baseAssignValue"),o=e("./eq"),i=Object.prototype.hasOwnProperty;function a(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}t.exports=a},{"./_baseAssignValue":79,"./eq":231}],76:[function(e,t,n){var r=e("./eq");function o(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}t.exports=o},{"./eq":231}],77:[function(e,t,n){var r=e("./_copyObject"),o=e("./keys");function i(e,t){return e&&r(t,o(t),e)}t.exports=i},{"./_copyObject":143,"./keys":259}],78:[function(e,t,n){var r=e("./_copyObject"),o=e("./keysIn");function i(e,t){return e&&r(t,o(t),e)}t.exports=i},{"./_copyObject":143,"./keysIn":260}],79:[function(e,t,n){var r=e("./_defineProperty");function o(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}t.exports=o},{"./_defineProperty":153}],80:[function(e,t,n){var r=e("./_Stack"),o=e("./_arrayEach"),i=e("./_assignValue"),a=e("./_baseAssign"),s=e("./_baseAssignIn"),u=e("./_cloneBuffer"),c=e("./_copyArray"),f=e("./_copySymbols"),d=e("./_copySymbolsIn"),h=e("./_getAllKeys"),l=e("./_getAllKeysIn"),p=e("./_getTag"),v=e("./_initCloneArray"),_=e("./_initCloneByTag"),y=e("./_initCloneObject"),g=e("./isArray"),b=e("./isBuffer"),m=e("./isMap"),x=e("./isObject"),w=e("./isSet"),E=e("./keys"),j=1,k=2,A=4,O="[object Arguments]",I="[object Array]",S="[object Boolean]",C="[object Date]",N="[object Error]",T="[object Function]",M="[object GeneratorFunction]",L="[object Map]",P="[object Number]",F="[object Object]",D="[object RegExp]",B="[object Set]",G="[object String]",R="[object Symbol]",U="[object WeakMap]",z="[object ArrayBuffer]",V="[object DataView]",q="[object Float32Array]",K="[object Float64Array]",H="[object Int8Array]",Y="[object Int16Array]",$="[object Int32Array]",W="[object Uint8Array]",J="[object Uint8ClampedArray]",X="[object Uint16Array]",Z="[object Uint32Array]",Q={};function ee(e,t,n,I,S,C){var N,L=t&j,P=t&k,D=t&A;if(n&&(N=S?n(e,I,S,C):n(e)),void 0!==N)return N;if(!x(e))return e;var B=g(e);if(B){if(N=v(e),!L)return c(e,N)}else{var G=p(e),R=G==T||G==M;if(b(e))return u(e,L);if(G==F||G==O||R&&!S){if(N=P||R?{}:y(e),!L)return P?d(e,s(N,e)):f(e,a(N,e))}else{if(!Q[G])return S?e:{};N=_(e,G,L)}}C||(C=new r);var U=C.get(e);if(U)return U;C.set(e,N),w(e)?e.forEach((function(r){N.add(ee(r,t,n,r,e,C))})):m(e)&&e.forEach((function(r,o){N.set(o,ee(r,t,n,o,e,C))}));var z=D?P?l:h:P?keysIn:E,V=B?void 0:z(e);return o(V||e,(function(r,o){V&&(r=e[o=r]),i(N,o,ee(r,t,n,o,e,C))})),N}Q[O]=Q[I]=Q[z]=Q[V]=Q[S]=Q[C]=Q[q]=Q[K]=Q[H]=Q[Y]=Q[$]=Q[L]=Q[P]=Q[F]=Q[D]=Q[B]=Q[G]=Q[R]=Q[W]=Q[J]=Q[X]=Q[Z]=!0,Q[N]=Q[T]=Q[U]=!1,t.exports=ee},{"./_Stack":59,"./_arrayEach":64,"./_assignValue":75,"./_baseAssign":77,"./_baseAssignIn":78,"./_cloneBuffer":135,"./_copyArray":142,"./_copySymbols":144,"./_copySymbolsIn":145,"./_getAllKeys":159,"./_getAllKeysIn":160,"./_getTag":168,"./_initCloneArray":177,"./_initCloneByTag":178,"./_initCloneObject":179,"./isArray":243,"./isBuffer":246,"./isMap":250,"./isObject":251,"./isSet":254,"./keys":259}],81:[function(e,t,n){var r=e("./isObject"),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();t.exports=i},{"./isObject":251}],82:[function(e,t,n){var r=e("./_baseForOwn"),o=e("./_createBaseEach")(r);t.exports=o},{"./_baseForOwn":88,"./_createBaseEach":148}],83:[function(e,t,n){var r=e("./isSymbol");function o(e,t,n){for(var o=-1,i=e.length;++o<i;){var a=e[o],s=t(a);if(null!=s&&(void 0===u?s==s&&!r(s):n(s,u)))var u=s,c=a}return c}t.exports=o},{"./isSymbol":256}],84:[function(e,t,n){var r=e("./_baseEach");function o(e,t){var n=[];return r(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}t.exports=o},{"./_baseEach":82}],85:[function(e,t,n){function r(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}t.exports=r},{}],86:[function(e,t,n){var r=e("./_arrayPush"),o=e("./_isFlattenable");function i(e,t,n,a,s){var u=-1,c=e.length;for(n||(n=o),s||(s=[]);++u<c;){var f=e[u];t>0&&n(f)?t>1?i(f,t-1,n,a,s):r(s,f):a||(s[s.length]=f)}return s}t.exports=i},{"./_arrayPush":70,"./_isFlattenable":180}],87:[function(e,t,n){var r=e("./_createBaseFor")();t.exports=r},{"./_createBaseFor":149}],88:[function(e,t,n){var r=e("./_baseFor"),o=e("./keys");function i(e,t){return e&&r(e,t,o)}t.exports=i},{"./_baseFor":87,"./keys":259}],89:[function(e,t,n){var r=e("./_castPath"),o=e("./_toKey");function i(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n<i;)e=e[o(t[n++])];return n&&n==i?e:void 0}t.exports=i},{"./_castPath":133,"./_toKey":223}],90:[function(e,t,n){var r=e("./_arrayPush"),o=e("./isArray");function i(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}t.exports=i},{"./_arrayPush":70,"./isArray":243}],91:[function(e,t,n){var r=e("./_Symbol"),o=e("./_getRawTag"),i=e("./_objectToString"),a="[object Null]",s="[object Undefined]",u=r?r.toStringTag:void 0;function c(e){return null==e?void 0===e?s:a:u&&u in Object(e)?o(e):i(e)}t.exports=c},{"./_Symbol":60,"./_getRawTag":165,"./_objectToString":205}],92:[function(e,t,n){function r(e,t){return e>t}t.exports=r},{}],93:[function(e,t,n){var r=Object.prototype.hasOwnProperty;function o(e,t){return null!=e&&r.call(e,t)}t.exports=o},{}],94:[function(e,t,n){function r(e,t){return null!=e&&t in Object(e)}t.exports=r},{}],95:[function(e,t,n){var r=e("./_baseFindIndex"),o=e("./_baseIsNaN"),i=e("./_strictIndexOf");function a(e,t,n){return t==t?i(e,t,n):r(e,o,n)}t.exports=a},{"./_baseFindIndex":85,"./_baseIsNaN":101,"./_strictIndexOf":220}],96:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./isObjectLike"),i="[object Arguments]";function a(e){return o(e)&&r(e)==i}t.exports=a},{"./_baseGetTag":91,"./isObjectLike":252}],97:[function(e,t,n){var r=e("./_baseIsEqualDeep"),o=e("./isObjectLike");function i(e,t,n,a,s){return e===t||(null==e||null==t||!o(e)&&!o(t)?e!=e&&t!=t:r(e,t,n,a,i,s))}t.exports=i},{"./_baseIsEqualDeep":98,"./isObjectLike":252}],98:[function(e,t,n){var r=e("./_Stack"),o=e("./_equalArrays"),i=e("./_equalByTag"),a=e("./_equalObjects"),s=e("./_getTag"),u=e("./isArray"),c=e("./isBuffer"),f=e("./isTypedArray"),d=1,h="[object Arguments]",l="[object Array]",p="[object Object]",v=Object.prototype.hasOwnProperty;function _(e,t,n,_,y,g){var b=u(e),m=u(t),x=b?l:s(e),w=m?l:s(t),E=(x=x==h?p:x)==p,j=(w=w==h?p:w)==p,k=x==w;if(k&&c(e)){if(!c(t))return!1;b=!0,E=!1}if(k&&!E)return g||(g=new r),b||f(e)?o(e,t,n,_,y,g):i(e,t,x,n,_,y,g);if(!(n&d)){var A=E&&v.call(e,"__wrapped__"),O=j&&v.call(t,"__wrapped__");if(A||O){var I=A?e.value():e,S=O?t.value():t;return g||(g=new r),y(I,S,n,_,g)}}return!!k&&(g||(g=new r),a(e,t,n,_,y,g))}t.exports=_},{"./_Stack":59,"./_equalArrays":154,"./_equalByTag":155,"./_equalObjects":156,"./_getTag":168,"./isArray":243,"./isBuffer":246,"./isTypedArray":257}],99:[function(e,t,n){var r=e("./_getTag"),o=e("./isObjectLike"),i="[object Map]";function a(e){return o(e)&&r(e)==i}t.exports=a},{"./_getTag":168,"./isObjectLike":252}],100:[function(e,t,n){var r=e("./_Stack"),o=e("./_baseIsEqual"),i=1,a=2;function s(e,t,n,s){var u=n.length,c=u,f=!s;if(null==e)return!c;for(e=Object(e);u--;){var d=n[u];if(f&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++u<c;){var h=(d=n[u])[0],l=e[h],p=d[1];if(f&&d[2]){if(void 0===l&&!(h in e))return!1}else{var v=new r;if(s)var _=s(l,p,h,e,t,v);if(!(void 0===_?o(p,l,i|a,s,v):_))return!1}}return!0}t.exports=s},{"./_Stack":59,"./_baseIsEqual":97}],101:[function(e,t,n){function r(e){return e!=e}t.exports=r},{}],102:[function(e,t,n){var r=e("./isFunction"),o=e("./_isMasked"),i=e("./isObject"),a=e("./_toSource"),s=/[\\\\^$.*+?()[\\]{}|]/g,u=/^\\[object .+?Constructor\\]$/,c=Function.prototype,f=Object.prototype,d=c.toString,h=f.hasOwnProperty,l=RegExp("^"+d.call(h).replace(s,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$");function p(e){return!(!i(e)||o(e))&&(r(e)?l:u).test(a(e))}t.exports=p},{"./_isMasked":185,"./_toSource":224,"./isFunction":248,"./isObject":251}],103:[function(e,t,n){var r=e("./_getTag"),o=e("./isObjectLike"),i="[object Set]";function a(e){return o(e)&&r(e)==i}t.exports=a},{"./_getTag":168,"./isObjectLike":252}],104:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./isLength"),i=e("./isObjectLike"),a="[object Arguments]",s="[object Array]",u="[object Boolean]",c="[object Date]",f="[object Error]",d="[object Function]",h="[object Map]",l="[object Number]",p="[object Object]",v="[object RegExp]",_="[object Set]",y="[object String]",g="[object WeakMap]",b="[object ArrayBuffer]",m="[object DataView]",x="[object Float64Array]",w="[object Int8Array]",E="[object Int16Array]",j="[object Int32Array]",k="[object Uint8Array]",A="[object Uint8ClampedArray]",O="[object Uint16Array]",I="[object Uint32Array]",S={};function C(e){return i(e)&&o(e.length)&&!!S[r(e)]}S["[object Float32Array]"]=S[x]=S[w]=S[E]=S[j]=S[k]=S[A]=S[O]=S[I]=!0,S[a]=S[s]=S[b]=S[u]=S[m]=S[c]=S[f]=S[d]=S[h]=S[l]=S[p]=S[v]=S[_]=S[y]=S[g]=!1,t.exports=C},{"./_baseGetTag":91,"./isLength":249,"./isObjectLike":252}],105:[function(e,t,n){var r=e("./_baseMatches"),o=e("./_baseMatchesProperty"),i=e("./identity"),a=e("./isArray"),s=e("./property");function u(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):r(e):s(e)}t.exports=u},{"./_baseMatches":110,"./_baseMatchesProperty":111,"./identity":241,"./isArray":243,"./property":272}],106:[function(e,t,n){var r=e("./_isPrototype"),o=e("./_nativeKeys"),i=Object.prototype.hasOwnProperty;function a(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}t.exports=a},{"./_isPrototype":186,"./_nativeKeys":202}],107:[function(e,t,n){var r=e("./isObject"),o=e("./_isPrototype"),i=e("./_nativeKeysIn"),a=Object.prototype.hasOwnProperty;function s(e){if(!r(e))return i(e);var t=o(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}t.exports=s},{"./_isPrototype":186,"./_nativeKeysIn":203,"./isObject":251}],108:[function(e,t,n){function r(e,t){return e<t}t.exports=r},{}],109:[function(e,t,n){var r=e("./_baseEach"),o=e("./isArrayLike");function i(e,t){var n=-1,i=o(e)?Array(e.length):[];return r(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}t.exports=i},{"./_baseEach":82,"./isArrayLike":244}],110:[function(e,t,n){var r=e("./_baseIsMatch"),o=e("./_getMatchData"),i=e("./_matchesStrictComparable");function a(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}t.exports=a},{"./_baseIsMatch":100,"./_getMatchData":162,"./_matchesStrictComparable":199}],111:[function(e,t,n){var r=e("./_baseIsEqual"),o=e("./get"),i=e("./hasIn"),a=e("./_isKey"),s=e("./_isStrictComparable"),u=e("./_matchesStrictComparable"),c=e("./_toKey"),f=1,d=2;function h(e,t){return a(e)&&s(t)?u(c(e),t):function(n){var a=o(n,e);return void 0===a&&a===t?i(n,e):r(t,a,f|d)}}t.exports=h},{"./_baseIsEqual":97,"./_isKey":183,"./_isStrictComparable":187,"./_matchesStrictComparable":199,"./_toKey":223,"./get":238,"./hasIn":240}],112:[function(e,t,n){var r=e("./_Stack"),o=e("./_assignMergeValue"),i=e("./_baseFor"),a=e("./_baseMergeDeep"),s=e("./isObject"),u=e("./keysIn"),c=e("./_safeGet");function f(e,t,n,d,h){e!==t&&i(t,(function(i,u){if(h||(h=new r),s(i))a(e,t,u,n,f,d,h);else{var l=d?d(c(e,u),i,u+"",e,t,h):void 0;void 0===l&&(l=i),o(e,u,l)}}),u)}t.exports=f},{"./_Stack":59,"./_assignMergeValue":74,"./_baseFor":87,"./_baseMergeDeep":113,"./_safeGet":209,"./isObject":251,"./keysIn":260}],113:[function(e,t,n){var r=e("./_assignMergeValue"),o=e("./_cloneBuffer"),i=e("./_cloneTypedArray"),a=e("./_copyArray"),s=e("./_initCloneObject"),u=e("./isArguments"),c=e("./isArray"),f=e("./isArrayLikeObject"),d=e("./isBuffer"),h=e("./isFunction"),l=e("./isObject"),p=e("./isPlainObject"),v=e("./isTypedArray"),_=e("./_safeGet"),y=e("./toPlainObject");function g(e,t,n,g,b,m,x){var w=_(e,n),E=_(t,n),j=x.get(E);if(j)r(e,n,j);else{var k=m?m(w,E,n+"",e,t,x):void 0,A=void 0===k;if(A){var O=c(E),I=!O&&d(E),S=!O&&!I&&v(E);k=E,O||I||S?c(w)?k=w:f(w)?k=a(w):I?(A=!1,k=o(E,!0)):S?(A=!1,k=i(E,!0)):k=[]:p(E)||u(E)?(k=w,u(w)?k=y(w):l(w)&&!h(w)||(k=s(E))):A=!1}A&&(x.set(E,k),b(k,E,g,m,x),x.delete(E)),r(e,n,k)}}t.exports=g},{"./_assignMergeValue":74,"./_cloneBuffer":135,"./_cloneTypedArray":139,"./_copyArray":142,"./_initCloneObject":179,"./_safeGet":209,"./isArguments":242,"./isArray":243,"./isArrayLikeObject":245,"./isBuffer":246,"./isFunction":248,"./isObject":251,"./isPlainObject":253,"./isTypedArray":257,"./toPlainObject":282}],114:[function(e,t,n){var r=e("./_arrayMap"),o=e("./_baseIteratee"),i=e("./_baseMap"),a=e("./_baseSortBy"),s=e("./_baseUnary"),u=e("./_compareMultiple"),c=e("./identity");function f(e,t,n){var f=-1;t=r(t.length?t:[c],s(o));var d=i(e,(function(e,n,o){return{criteria:r(t,(function(t){return t(e)})),index:++f,value:e}}));return a(d,(function(e,t){return u(e,t,n)}))}t.exports=f},{"./_arrayMap":69,"./_baseIteratee":105,"./_baseMap":109,"./_baseSortBy":124,"./_baseUnary":127,"./_compareMultiple":141,"./identity":241}],115:[function(e,t,n){var r=e("./_basePickBy"),o=e("./hasIn");function i(e,t){return r(e,t,(function(t,n){return o(e,n)}))}t.exports=i},{"./_basePickBy":116,"./hasIn":240}],116:[function(e,t,n){var r=e("./_baseGet"),o=e("./_baseSet"),i=e("./_castPath");function a(e,t,n){for(var a=-1,s=t.length,u={};++a<s;){var c=t[a],f=r(e,c);n(f,c)&&o(u,i(c,e),f)}return u}t.exports=a},{"./_baseGet":89,"./_baseSet":122,"./_castPath":133}],117:[function(e,t,n){function r(e){return function(t){return null==t?void 0:t[e]}}t.exports=r},{}],118:[function(e,t,n){var r=e("./_baseGet");function o(e){return function(t){return r(t,e)}}t.exports=o},{"./_baseGet":89}],119:[function(e,t,n){var r=Math.ceil,o=Math.max;function i(e,t,n,i){for(var a=-1,s=o(r((t-e)/(n||1)),0),u=Array(s);s--;)u[i?s:++a]=e,e+=n;return u}t.exports=i},{}],120:[function(e,t,n){function r(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}t.exports=r},{}],121:[function(e,t,n){var r=e("./identity"),o=e("./_overRest"),i=e("./_setToString");function a(e,t){return i(o(e,t,r),e+"")}t.exports=a},{"./_overRest":207,"./_setToString":213,"./identity":241}],122:[function(e,t,n){var r=e("./_assignValue"),o=e("./_castPath"),i=e("./_isIndex"),a=e("./isObject"),s=e("./_toKey");function u(e,t,n,u){if(!a(e))return e;for(var c=-1,f=(t=o(t,e)).length,d=f-1,h=e;null!=h&&++c<f;){var l=s(t[c]),p=n;if(c!=d){var v=h[l];void 0===(p=u?u(v,l,h):void 0)&&(p=a(v)?v:i(t[c+1])?[]:{})}r(h,l,p),h=h[l]}return e}t.exports=u},{"./_assignValue":75,"./_castPath":133,"./_isIndex":181,"./_toKey":223,"./isObject":251}],123:[function(e,t,n){var r=e("./constant"),o=e("./_defineProperty"),i=e("./identity"),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:i;t.exports=a},{"./_defineProperty":153,"./constant":228,"./identity":241}],124:[function(e,t,n){function r(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}t.exports=r},{}],125:[function(e,t,n){function r(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}t.exports=r},{}],126:[function(e,t,n){var r=e("./_Symbol"),o=e("./_arrayMap"),i=e("./isArray"),a=e("./isSymbol"),s=1/0,u=r?r.prototype:void 0,c=u?u.toString:void 0;function f(e){if("string"==typeof e)return e;if(i(e))return o(e,f)+"";if(a(e))return c?c.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}t.exports=f},{"./_Symbol":60,"./_arrayMap":69,"./isArray":243,"./isSymbol":256}],127:[function(e,t,n){function r(e){return function(t){return e(t)}}t.exports=r},{}],128:[function(e,t,n){var r=e("./_SetCache"),o=e("./_arrayIncludes"),i=e("./_arrayIncludesWith"),a=e("./_cacheHas"),s=e("./_createSet"),u=e("./_setToArray"),c=200;function f(e,t,n){var f=-1,d=o,h=e.length,l=!0,p=[],v=p;if(n)l=!1,d=i;else if(h>=c){var _=t?null:s(e);if(_)return u(_);l=!1,d=a,v=new r}else v=t?[]:p;e:for(;++f<h;){var y=e[f],g=t?t(y):y;if(y=n||0!==y?y:0,l&&g==g){for(var b=v.length;b--;)if(v[b]===g)continue e;t&&v.push(g),p.push(y)}else d(v,g,n)||(v!==p&&v.push(g),p.push(y))}return p}t.exports=f},{"./_SetCache":58,"./_arrayIncludes":66,"./_arrayIncludesWith":67,"./_cacheHas":131,"./_createSet":152,"./_setToArray":212}],129:[function(e,t,n){var r=e("./_arrayMap");function o(e,t){return r(t,(function(t){return e[t]}))}t.exports=o},{"./_arrayMap":69}],130:[function(e,t,n){function r(e,t,n){for(var r=-1,o=e.length,i=t.length,a={};++r<o;){var s=r<i?t[r]:void 0;n(a,e[r],s)}return a}t.exports=r},{}],131:[function(e,t,n){function r(e,t){return e.has(t)}t.exports=r},{}],132:[function(e,t,n){var r=e("./identity");function o(e){return"function"==typeof e?e:r}t.exports=o},{"./identity":241}],133:[function(e,t,n){var r=e("./isArray"),o=e("./_isKey"),i=e("./_stringToPath"),a=e("./toString");function s(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}t.exports=s},{"./_isKey":183,"./_stringToPath":222,"./isArray":243,"./toString":283}],134:[function(e,t,n){var r=e("./_Uint8Array");function o(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}t.exports=o},{"./_Uint8Array":61}],135:[function(e,t,n){var r=e("./_root"),o="object"==typeof n&&n&&!n.nodeType&&n,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;function u(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}t.exports=u},{"./_root":208}],136:[function(e,t,n){var r=e("./_cloneArrayBuffer");function o(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}t.exports=o},{"./_cloneArrayBuffer":134}],137:[function(e,t,n){var r=/\\w*$/;function o(e){var t=new e.constructor(e.source,r.exec(e));return t.lastIndex=e.lastIndex,t}t.exports=o},{}],138:[function(e,t,n){var r=e("./_Symbol"),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;function a(e){return i?Object(i.call(e)):{}}t.exports=a},{"./_Symbol":60}],139:[function(e,t,n){var r=e("./_cloneArrayBuffer");function o(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}t.exports=o},{"./_cloneArrayBuffer":134}],140:[function(e,t,n){var r=e("./isSymbol");function o(e,t){if(e!==t){var n=void 0!==e,o=null===e,i=e==e,a=r(e),s=void 0!==t,u=null===t,c=t==t,f=r(t);if(!u&&!f&&!a&&e>t||a&&s&&c&&!u&&!f||o&&s&&c||!n&&c||!i)return 1;if(!o&&!a&&!f&&e<t||f&&n&&i&&!o&&!a||u&&n&&i||!s&&i||!c)return-1}return 0}t.exports=o},{"./isSymbol":256}],141:[function(e,t,n){var r=e("./_compareAscending");function o(e,t,n){for(var o=-1,i=e.criteria,a=t.criteria,s=i.length,u=n.length;++o<s;){var c=r(i[o],a[o]);if(c)return o>=u?c:c*("desc"==n[o]?-1:1)}return e.index-t.index}t.exports=o},{"./_compareAscending":140}],142:[function(e,t,n){function r(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}t.exports=r},{}],143:[function(e,t,n){var r=e("./_assignValue"),o=e("./_baseAssignValue");function i(e,t,n,i){var a=!n;n||(n={});for(var s=-1,u=t.length;++s<u;){var c=t[s],f=i?i(n[c],e[c],c,n,e):void 0;void 0===f&&(f=e[c]),a?o(n,c,f):r(n,c,f)}return n}t.exports=i},{"./_assignValue":75,"./_baseAssignValue":79}],144:[function(e,t,n){var r=e("./_copyObject"),o=e("./_getSymbols");function i(e,t){return r(e,o(e),t)}t.exports=i},{"./_copyObject":143,"./_getSymbols":166}],145:[function(e,t,n){var r=e("./_copyObject"),o=e("./_getSymbolsIn");function i(e,t){return r(e,o(e),t)}t.exports=i},{"./_copyObject":143,"./_getSymbolsIn":167}],146:[function(e,t,n){var r=e("./_root")["__core-js_shared__"];t.exports=r},{"./_root":208}],147:[function(e,t,n){var r=e("./_baseRest"),o=e("./_isIterateeCall");function i(e){return r((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var u=n[r];u&&e(t,u,r,a)}return t}))}t.exports=i},{"./_baseRest":121,"./_isIterateeCall":182}],148:[function(e,t,n){var r=e("./isArrayLike");function o(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var i=n.length,a=t?i:-1,s=Object(n);(t?a--:++a<i)&&!1!==o(s[a],a,s););return n}}t.exports=o},{"./isArrayLike":244}],149:[function(e,t,n){function r(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===n(i[u],u,i))break}return t}}t.exports=r},{}],150:[function(e,t,n){var r=e("./_baseIteratee"),o=e("./isArrayLike"),i=e("./keys");function a(e){return function(t,n,a){var s=Object(t);if(!o(t)){var u=r(n,3);t=i(t),n=function(e){return u(s[e],e,s)}}var c=e(t,n,a);return c>-1?s[u?t[c]:c]:void 0}}t.exports=a},{"./_baseIteratee":105,"./isArrayLike":244,"./keys":259}],151:[function(e,t,n){var r=e("./_baseRange"),o=e("./_isIterateeCall"),i=e("./toFinite");function a(e){return function(t,n,a){return a&&"number"!=typeof a&&o(t,n,a)&&(n=a=void 0),t=i(t),void 0===n?(n=t,t=0):n=i(n),a=void 0===a?t<n?1:-1:i(a),r(t,n,a,e)}}t.exports=a},{"./_baseRange":119,"./_isIterateeCall":182,"./toFinite":279}],152:[function(e,t,n){var r=e("./_Set"),o=e("./noop"),i=e("./_setToArray"),a=1/0,s=r&&1/i(new r([,-0]))[1]==a?function(e){return new r(e)}:o;t.exports=s},{"./_Set":57,"./_setToArray":212,"./noop":269}],153:[function(e,t,n){var r=e("./_getNative"),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();t.exports=o},{"./_getNative":163}],154:[function(e,t,n){var r=e("./_SetCache"),o=e("./_arraySome"),i=e("./_cacheHas"),a=1,s=2;function u(e,t,n,u,c,f){var d=n&a,h=e.length,l=t.length;if(h!=l&&!(d&&l>h))return!1;var p=f.get(e);if(p&&f.get(t))return p==t;var v=-1,_=!0,y=n&s?new r:void 0;for(f.set(e,t),f.set(t,e);++v<h;){var g=e[v],b=t[v];if(u)var m=d?u(b,g,v,t,e,f):u(g,b,v,e,t,f);if(void 0!==m){if(m)continue;_=!1;break}if(y){if(!o(t,(function(e,t){if(!i(y,t)&&(g===e||c(g,e,n,u,f)))return y.push(t)}))){_=!1;break}}else if(g!==b&&!c(g,b,n,u,f)){_=!1;break}}return f.delete(e),f.delete(t),_}t.exports=u},{"./_SetCache":58,"./_arraySome":72,"./_cacheHas":131}],155:[function(e,t,n){var r=e("./_Symbol"),o=e("./_Uint8Array"),i=e("./eq"),a=e("./_equalArrays"),s=e("./_mapToArray"),u=e("./_setToArray"),c=1,f=2,d="[object Boolean]",h="[object Date]",l="[object Error]",p="[object Map]",v="[object Number]",_="[object RegExp]",y="[object Set]",g="[object String]",b="[object Symbol]",m="[object ArrayBuffer]",x="[object DataView]",w=r?r.prototype:void 0,E=w?w.valueOf:void 0;function j(e,t,n,r,w,j,k){switch(n){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case m:return!(e.byteLength!=t.byteLength||!j(new o(e),new o(t)));case d:case h:case v:return i(+e,+t);case l:return e.name==t.name&&e.message==t.message;case _:case g:return e==t+"";case p:var A=s;case y:var O=r&c;if(A||(A=u),e.size!=t.size&&!O)return!1;var I=k.get(e);if(I)return I==t;r|=f,k.set(e,t);var S=a(A(e),A(t),r,w,j,k);return k.delete(e),S;case b:if(E)return E.call(e)==E.call(t)}return!1}t.exports=j},{"./_Symbol":60,"./_Uint8Array":61,"./_equalArrays":154,"./_mapToArray":198,"./_setToArray":212,"./eq":231}],156:[function(e,t,n){var r=e("./_getAllKeys"),o=1,i=Object.prototype.hasOwnProperty;function a(e,t,n,a,s,u){var c=n&o,f=r(e),d=f.length;if(d!=r(t).length&&!c)return!1;for(var h=d;h--;){var l=f[h];if(!(c?l in t:i.call(t,l)))return!1}var p=u.get(e);if(p&&u.get(t))return p==t;var v=!0;u.set(e,t),u.set(t,e);for(var _=c;++h<d;){var y=e[l=f[h]],g=t[l];if(a)var b=c?a(g,y,l,t,e,u):a(y,g,l,e,t,u);if(!(void 0===b?y===g||s(y,g,n,a,u):b)){v=!1;break}_||(_="constructor"==l)}if(v&&!_){var m=e.constructor,x=t.constructor;m==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof x&&x instanceof x||(v=!1)}return u.delete(e),u.delete(t),v}t.exports=a},{"./_getAllKeys":159}],157:[function(e,t,n){var r=e("./flatten"),o=e("./_overRest"),i=e("./_setToString");function a(e){return i(o(e,void 0,r),e+"")}t.exports=a},{"./_overRest":207,"./_setToString":213,"./flatten":235}],158:[function(t,n,r){(function(e){var t="object"==typeof e&&e&&e.Object===Object&&e;n.exports=t}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],159:[function(e,t,n){var r=e("./_baseGetAllKeys"),o=e("./_getSymbols"),i=e("./keys");function a(e){return r(e,i,o)}t.exports=a},{"./_baseGetAllKeys":90,"./_getSymbols":166,"./keys":259}],160:[function(e,t,n){var r=e("./_baseGetAllKeys"),o=e("./_getSymbolsIn"),i=e("./keysIn");function a(e){return r(e,i,o)}t.exports=a},{"./_baseGetAllKeys":90,"./_getSymbolsIn":167,"./keysIn":260}],161:[function(e,t,n){var r=e("./_isKeyable");function o(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}t.exports=o},{"./_isKeyable":184}],162:[function(e,t,n){var r=e("./_isStrictComparable"),o=e("./keys");function i(e){for(var t=o(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,r(a)]}return t}t.exports=i},{"./_isStrictComparable":187,"./keys":259}],163:[function(e,t,n){var r=e("./_baseIsNative"),o=e("./_getValue");function i(e,t){var n=o(e,t);return r(n)?n:void 0}t.exports=i},{"./_baseIsNative":102,"./_getValue":169}],164:[function(e,t,n){var r=e("./_overArg")(Object.getPrototypeOf,Object);t.exports=r},{"./_overArg":206}],165:[function(e,t,n){var r=e("./_Symbol"),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;function u(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}t.exports=u},{"./_Symbol":60}],166:[function(e,t,n){var r=e("./_arrayFilter"),o=e("./stubArray"),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o;t.exports=s},{"./_arrayFilter":65,"./stubArray":277}],167:[function(e,t,n){var r=e("./_arrayPush"),o=e("./_getPrototype"),i=e("./_getSymbols"),a=e("./stubArray"),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;t.exports=s},{"./_arrayPush":70,"./_getPrototype":164,"./_getSymbols":166,"./stubArray":277}],168:[function(e,t,n){var r=e("./_DataView"),o=e("./_Map"),i=e("./_Promise"),a=e("./_Set"),s=e("./_WeakMap"),u=e("./_baseGetTag"),c=e("./_toSource"),f="[object Map]",d="[object Object]",h="[object Promise]",l="[object Set]",p="[object WeakMap]",v="[object DataView]",_=c(r),y=c(o),g=c(i),b=c(a),m=c(s),x=u;(r&&x(new r(new ArrayBuffer(1)))!=v||o&&x(new o)!=f||i&&x(i.resolve())!=h||a&&x(new a)!=l||s&&x(new s)!=p)&&(x=function(e){var t=u(e),n=t==d?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case _:return v;case y:return f;case g:return h;case b:return l;case m:return p}return t}),t.exports=x},{"./_DataView":51,"./_Map":54,"./_Promise":56,"./_Set":57,"./_WeakMap":62,"./_baseGetTag":91,"./_toSource":224}],169:[function(e,t,n){function r(e,t){return null==e?void 0:e[t]}t.exports=r},{}],170:[function(e,t,n){var r=e("./_castPath"),o=e("./isArguments"),i=e("./isArray"),a=e("./_isIndex"),s=e("./isLength"),u=e("./_toKey");function c(e,t,n){for(var c=-1,f=(t=r(t,e)).length,d=!1;++c<f;){var h=u(t[c]);if(!(d=null!=e&&n(e,h)))break;e=e[h]}return d||++c!=f?d:!!(f=null==e?0:e.length)&&s(f)&&a(h,f)&&(i(e)||o(e))}t.exports=c},{"./_castPath":133,"./_isIndex":181,"./_toKey":223,"./isArguments":242,"./isArray":243,"./isLength":249}],171:[function(e,t,n){var r=RegExp("[\\\\u200d\\\\ud800-\\\\udfff\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff\\\\ufe0e\\\\ufe0f]");function o(e){return r.test(e)}t.exports=o},{}],172:[function(e,t,n){var r=e("./_nativeCreate");function o(){this.__data__=r?r(null):{},this.size=0}t.exports=o},{"./_nativeCreate":201}],173:[function(e,t,n){function r(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}t.exports=r},{}],174:[function(e,t,n){var r=e("./_nativeCreate"),o="__lodash_hash_undefined__",i=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;if(r){var n=t[e];return n===o?void 0:n}return i.call(t,e)?t[e]:void 0}t.exports=a},{"./_nativeCreate":201}],175:[function(e,t,n){var r=e("./_nativeCreate"),o=Object.prototype.hasOwnProperty;function i(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}t.exports=i},{"./_nativeCreate":201}],176:[function(e,t,n){var r=e("./_nativeCreate"),o="__lodash_hash_undefined__";function i(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?o:t,this}t.exports=i},{"./_nativeCreate":201}],177:[function(e,t,n){var r=Object.prototype.hasOwnProperty;function o(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&r.call(e,"index")&&(n.index=e.index,n.input=e.input),n}t.exports=o},{}],178:[function(e,t,n){var r=e("./_cloneArrayBuffer"),o=e("./_cloneDataView"),i=e("./_cloneRegExp"),a=e("./_cloneSymbol"),s=e("./_cloneTypedArray"),u="[object Boolean]",c="[object Date]",f="[object Map]",d="[object Number]",h="[object RegExp]",l="[object Set]",p="[object String]",v="[object Symbol]",_="[object ArrayBuffer]",y="[object DataView]",g="[object Float32Array]",b="[object Float64Array]",m="[object Int8Array]",x="[object Int16Array]",w="[object Int32Array]",E="[object Uint8Array]",j="[object Uint8ClampedArray]",k="[object Uint16Array]",A="[object Uint32Array]";function O(e,t,n){var O=e.constructor;switch(t){case _:return r(e);case u:case c:return new O(+e);case y:return o(e,n);case g:case b:case m:case x:case w:case E:case j:case k:case A:return s(e,n);case f:return new O;case d:case p:return new O(e);case h:return i(e);case l:return new O;case v:return a(e)}}t.exports=O},{"./_cloneArrayBuffer":134,"./_cloneDataView":136,"./_cloneRegExp":137,"./_cloneSymbol":138,"./_cloneTypedArray":139}],179:[function(e,t,n){var r=e("./_baseCreate"),o=e("./_getPrototype"),i=e("./_isPrototype");function a(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}t.exports=a},{"./_baseCreate":81,"./_getPrototype":164,"./_isPrototype":186}],180:[function(e,t,n){var r=e("./_Symbol"),o=e("./isArguments"),i=e("./isArray"),a=r?r.isConcatSpreadable:void 0;function s(e){return i(e)||o(e)||!!(a&&e&&e[a])}t.exports=s},{"./_Symbol":60,"./isArguments":242,"./isArray":243}],181:[function(e,t,n){var r=9007199254740991,o=/^(?:0|[1-9]\\d*)$/;function i(e,t){var n=typeof e;return!!(t=null==t?r:t)&&("number"==n||"symbol"!=n&&o.test(e))&&e>-1&&e%1==0&&e<t}t.exports=i},{}],182:[function(e,t,n){var r=e("./eq"),o=e("./isArrayLike"),i=e("./_isIndex"),a=e("./isObject");function s(e,t,n){if(!a(n))return!1;var s=typeof t;return!!("number"==s?o(n)&&i(t,n.length):"string"==s&&t in n)&&r(n[t],e)}t.exports=s},{"./_isIndex":181,"./eq":231,"./isArrayLike":244,"./isObject":251}],183:[function(e,t,n){var r=e("./isArray"),o=e("./isSymbol"),i=/\\.|\\[(?:[^[\\]]*|(["\'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,a=/^\\w*$/;function s(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||a.test(e)||!i.test(e)||null!=t&&e in Object(t)}t.exports=s},{"./isArray":243,"./isSymbol":256}],184:[function(e,t,n){function r(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}t.exports=r},{}],185:[function(e,t,n){var r,o=e("./_coreJsData"),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";function a(e){return!!i&&i in e}t.exports=a},{"./_coreJsData":146}],186:[function(e,t,n){var r=Object.prototype;function o(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}t.exports=o},{}],187:[function(e,t,n){var r=e("./isObject");function o(e){return e==e&&!r(e)}t.exports=o},{"./isObject":251}],188:[function(e,t,n){function r(){this.__data__=[],this.size=0}t.exports=r},{}],189:[function(e,t,n){var r=e("./_assocIndexOf"),o=Array.prototype.splice;function i(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))}t.exports=i},{"./_assocIndexOf":76}],190:[function(e,t,n){var r=e("./_assocIndexOf");function o(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}t.exports=o},{"./_assocIndexOf":76}],191:[function(e,t,n){var r=e("./_assocIndexOf");function o(e){return r(this.__data__,e)>-1}t.exports=o},{"./_assocIndexOf":76}],192:[function(e,t,n){var r=e("./_assocIndexOf");function o(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}t.exports=o},{"./_assocIndexOf":76}],193:[function(e,t,n){var r=e("./_Hash"),o=e("./_ListCache"),i=e("./_Map");function a(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}t.exports=a},{"./_Hash":52,"./_ListCache":53,"./_Map":54}],194:[function(e,t,n){var r=e("./_getMapData");function o(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}t.exports=o},{"./_getMapData":161}],195:[function(e,t,n){var r=e("./_getMapData");function o(e){return r(this,e).get(e)}t.exports=o},{"./_getMapData":161}],196:[function(e,t,n){var r=e("./_getMapData");function o(e){return r(this,e).has(e)}t.exports=o},{"./_getMapData":161}],197:[function(e,t,n){var r=e("./_getMapData");function o(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}t.exports=o},{"./_getMapData":161}],198:[function(e,t,n){function r(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}t.exports=r},{}],199:[function(e,t,n){function r(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}t.exports=r},{}],200:[function(e,t,n){var r=e("./memoize"),o=500;function i(e){var t=r(e,(function(e){return n.size===o&&n.clear(),e})),n=t.cache;return t}t.exports=i},{"./memoize":265}],201:[function(e,t,n){var r=e("./_getNative")(Object,"create");t.exports=r},{"./_getNative":163}],202:[function(e,t,n){var r=e("./_overArg")(Object.keys,Object);t.exports=r},{"./_overArg":206}],203:[function(e,t,n){function r(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}t.exports=r},{}],204:[function(e,t,n){var r=e("./_freeGlobal"),o="object"==typeof n&&n&&!n.nodeType&&n,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o&&r.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();t.exports=s},{"./_freeGlobal":158}],205:[function(e,t,n){var r=Object.prototype.toString;function o(e){return r.call(e)}t.exports=o},{}],206:[function(e,t,n){function r(e,t){return function(n){return e(t(n))}}t.exports=r},{}],207:[function(e,t,n){var r=e("./_apply"),o=Math.max;function i(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),u=Array(s);++a<s;)u[a]=i[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=i[a];return c[t]=n(u),r(e,this,c)}}t.exports=i},{"./_apply":63}],208:[function(e,t,n){var r=e("./_freeGlobal"),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},{"./_freeGlobal":158}],209:[function(e,t,n){function r(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}t.exports=r},{}],210:[function(e,t,n){var r="__lodash_hash_undefined__";function o(e){return this.__data__.set(e,r),this}t.exports=o},{}],211:[function(e,t,n){function r(e){return this.__data__.has(e)}t.exports=r},{}],212:[function(e,t,n){function r(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}t.exports=r},{}],213:[function(e,t,n){var r=e("./_baseSetToString"),o=e("./_shortOut")(r);t.exports=o},{"./_baseSetToString":123,"./_shortOut":214}],214:[function(e,t,n){var r=800,o=16,i=Date.now;function a(e){var t=0,n=0;return function(){var a=i(),s=o-(a-n);if(n=a,s>0){if(++t>=r)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}t.exports=a},{}],215:[function(e,t,n){var r=e("./_ListCache");function o(){this.__data__=new r,this.size=0}t.exports=o},{"./_ListCache":53}],216:[function(e,t,n){function r(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}t.exports=r},{}],217:[function(e,t,n){function r(e){return this.__data__.get(e)}t.exports=r},{}],218:[function(e,t,n){function r(e){return this.__data__.has(e)}t.exports=r},{}],219:[function(e,t,n){var r=e("./_ListCache"),o=e("./_Map"),i=e("./_MapCache"),a=200;function s(e,t){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!o||s.length<a-1)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(s)}return n.set(e,t),this.size=n.size,this}t.exports=s},{"./_ListCache":53,"./_Map":54,"./_MapCache":55}],220:[function(e,t,n){function r(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}t.exports=r},{}],221:[function(e,t,n){var r=e("./_asciiSize"),o=e("./_hasUnicode"),i=e("./_unicodeSize");function a(e){return o(e)?i(e):r(e)}t.exports=a},{"./_asciiSize":73,"./_hasUnicode":171,"./_unicodeSize":225}],222:[function(e,t,n){var r=e("./_memoizeCapped"),o=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,i=/\\\\(\\\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)})),t}));t.exports=a},{"./_memoizeCapped":200}],223:[function(e,t,n){var r=e("./isSymbol"),o=1/0;function i(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-o?"-0":t}t.exports=i},{"./isSymbol":256}],224:[function(e,t,n){var r=Function.prototype.toString;function o(e){if(null!=e){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}t.exports=o},{}],225:[function(e,t,n){var r="\\\\ud800-\\\\udfff",o="["+r+"]",i="[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]",a="\\\\ud83c[\\\\udffb-\\\\udfff]",s="[^"+r+"]",u="(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}",c="[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]",f="(?:"+i+"|"+a+")?",d="[\\\\ufe0e\\\\ufe0f]?",h=d+f+"(?:\\\\u200d(?:"+[s,u,c].join("|")+")"+d+f+")*",l="(?:"+[s+i+"?",i,u,c,o].join("|")+")",p=RegExp(a+"(?="+a+")|"+l+h,"g");function v(e){for(var t=p.lastIndex=0;p.test(e);)++t;return t}t.exports=v},{}],226:[function(e,t,n){var r=e("./_baseClone"),o=4;function i(e){return r(e,o)}t.exports=i},{"./_baseClone":80}],227:[function(e,t,n){var r=e("./_baseClone"),o=1,i=4;function a(e){return r(e,o|i)}t.exports=a},{"./_baseClone":80}],228:[function(e,t,n){function r(e){return function(){return e}}t.exports=r},{}],229:[function(e,t,n){var r=e("./_baseRest"),o=e("./eq"),i=e("./_isIterateeCall"),a=e("./keysIn"),s=Object.prototype,u=s.hasOwnProperty,c=r((function(e,t){e=Object(e);var n=-1,r=t.length,c=r>2?t[2]:void 0;for(c&&i(t[0],t[1],c)&&(r=1);++n<r;)for(var f=t[n],d=a(f),h=-1,l=d.length;++h<l;){var p=d[h],v=e[p];(void 0===v||o(v,s[p])&&!u.call(e,p))&&(e[p]=f[p])}return e}));t.exports=c},{"./_baseRest":121,"./_isIterateeCall":182,"./eq":231,"./keysIn":260}],230:[function(e,t,n){t.exports=e("./forEach")},{"./forEach":236}],231:[function(e,t,n){function r(e,t){return e===t||e!=e&&t!=t}t.exports=r},{}],232:[function(e,t,n){var r=e("./_arrayFilter"),o=e("./_baseFilter"),i=e("./_baseIteratee"),a=e("./isArray");function s(e,t){return(a(e)?r:o)(e,i(t,3))}t.exports=s},{"./_arrayFilter":65,"./_baseFilter":84,"./_baseIteratee":105,"./isArray":243}],233:[function(e,t,n){var r=e("./_createFind")(e("./findIndex"));t.exports=r},{"./_createFind":150,"./findIndex":234}],234:[function(e,t,n){var r=e("./_baseFindIndex"),o=e("./_baseIteratee"),i=e("./toInteger"),a=Math.max;function s(e,t,n){var s=null==e?0:e.length;if(!s)return-1;var u=null==n?0:i(n);return u<0&&(u=a(s+u,0)),r(e,o(t,3),u)}t.exports=s},{"./_baseFindIndex":85,"./_baseIteratee":105,"./toInteger":280}],235:[function(e,t,n){var r=e("./_baseFlatten");function o(e){return null!=e&&e.length?r(e,1):[]}t.exports=o},{"./_baseFlatten":86}],236:[function(e,t,n){var r=e("./_arrayEach"),o=e("./_baseEach"),i=e("./_castFunction"),a=e("./isArray");function s(e,t){return(a(e)?r:o)(e,i(t))}t.exports=s},{"./_arrayEach":64,"./_baseEach":82,"./_castFunction":132,"./isArray":243}],237:[function(e,t,n){var r=e("./_baseFor"),o=e("./_castFunction"),i=e("./keysIn");function a(e,t){return null==e?e:r(e,o(t),i)}t.exports=a},{"./_baseFor":87,"./_castFunction":132,"./keysIn":260}],238:[function(e,t,n){var r=e("./_baseGet");function o(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}t.exports=o},{"./_baseGet":89}],239:[function(e,t,n){var r=e("./_baseHas"),o=e("./_hasPath");function i(e,t){return null!=e&&o(e,t,r)}t.exports=i},{"./_baseHas":93,"./_hasPath":170}],240:[function(e,t,n){var r=e("./_baseHasIn"),o=e("./_hasPath");function i(e,t){return null!=e&&o(e,t,r)}t.exports=i},{"./_baseHasIn":94,"./_hasPath":170}],241:[function(e,t,n){function r(e){return e}t.exports=r},{}],242:[function(e,t,n){var r=e("./_baseIsArguments"),o=e("./isObjectLike"),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};t.exports=u},{"./_baseIsArguments":96,"./isObjectLike":252}],243:[function(e,t,n){var r=Array.isArray;t.exports=r},{}],244:[function(e,t,n){var r=e("./isFunction"),o=e("./isLength");function i(e){return null!=e&&o(e.length)&&!r(e)}t.exports=i},{"./isFunction":248,"./isLength":249}],245:[function(e,t,n){var r=e("./isArrayLike"),o=e("./isObjectLike");function i(e){return o(e)&&r(e)}t.exports=i},{"./isArrayLike":244,"./isObjectLike":252}],246:[function(e,t,n){var r=e("./_root"),o=e("./stubFalse"),i="object"==typeof n&&n&&!n.nodeType&&n,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===i?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||o;t.exports=u},{"./_root":208,"./stubFalse":278}],247:[function(e,t,n){var r=e("./_baseKeys"),o=e("./_getTag"),i=e("./isArguments"),a=e("./isArray"),s=e("./isArrayLike"),u=e("./isBuffer"),c=e("./_isPrototype"),f=e("./isTypedArray"),d="[object Map]",h="[object Set]",l=Object.prototype.hasOwnProperty;function p(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||f(e)||i(e)))return!e.length;var t=o(e);if(t==d||t==h)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(l.call(e,n))return!1;return!0}t.exports=p},{"./_baseKeys":106,"./_getTag":168,"./_isPrototype":186,"./isArguments":242,"./isArray":243,"./isArrayLike":244,"./isBuffer":246,"./isTypedArray":257}],248:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./isObject"),i="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",u="[object Proxy]";function c(e){if(!o(e))return!1;var t=r(e);return t==a||t==s||t==i||t==u}t.exports=c},{"./_baseGetTag":91,"./isObject":251}],249:[function(e,t,n){var r=9007199254740991;function o(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}t.exports=o},{}],250:[function(e,t,n){var r=e("./_baseIsMap"),o=e("./_baseUnary"),i=e("./_nodeUtil"),a=i&&i.isMap,s=a?o(a):r;t.exports=s},{"./_baseIsMap":99,"./_baseUnary":127,"./_nodeUtil":204}],251:[function(e,t,n){function r(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}t.exports=r},{}],252:[function(e,t,n){function r(e){return null!=e&&"object"==typeof e}t.exports=r},{}],253:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./_getPrototype"),i=e("./isObjectLike"),a="[object Object]",s=Function.prototype,u=Object.prototype,c=s.toString,f=u.hasOwnProperty,d=c.call(Object);function h(e){if(!i(e)||r(e)!=a)return!1;var t=o(e);if(null===t)return!0;var n=f.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==d}t.exports=h},{"./_baseGetTag":91,"./_getPrototype":164,"./isObjectLike":252}],254:[function(e,t,n){var r=e("./_baseIsSet"),o=e("./_baseUnary"),i=e("./_nodeUtil"),a=i&&i.isSet,s=a?o(a):r;t.exports=s},{"./_baseIsSet":103,"./_baseUnary":127,"./_nodeUtil":204}],255:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./isArray"),i=e("./isObjectLike"),a="[object String]";function s(e){return"string"==typeof e||!o(e)&&i(e)&&r(e)==a}t.exports=s},{"./_baseGetTag":91,"./isArray":243,"./isObjectLike":252}],256:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./isObjectLike"),i="[object Symbol]";function a(e){return"symbol"==typeof e||o(e)&&r(e)==i}t.exports=a},{"./_baseGetTag":91,"./isObjectLike":252}],257:[function(e,t,n){var r=e("./_baseIsTypedArray"),o=e("./_baseUnary"),i=e("./_nodeUtil"),a=i&&i.isTypedArray,s=a?o(a):r;t.exports=s},{"./_baseIsTypedArray":104,"./_baseUnary":127,"./_nodeUtil":204}],258:[function(e,t,n){function r(e){return void 0===e}t.exports=r},{}],259:[function(e,t,n){var r=e("./_arrayLikeKeys"),o=e("./_baseKeys"),i=e("./isArrayLike");function a(e){return i(e)?r(e):o(e)}t.exports=a},{"./_arrayLikeKeys":68,"./_baseKeys":106,"./isArrayLike":244}],260:[function(e,t,n){var r=e("./_arrayLikeKeys"),o=e("./_baseKeysIn"),i=e("./isArrayLike");function a(e){return i(e)?r(e,!0):o(e)}t.exports=a},{"./_arrayLikeKeys":68,"./_baseKeysIn":107,"./isArrayLike":244}],261:[function(e,t,n){function r(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}t.exports=r},{}],262:[function(e,t,n){var r=e("./_arrayMap"),o=e("./_baseIteratee"),i=e("./_baseMap"),a=e("./isArray");function s(e,t){return(a(e)?r:i)(e,o(t,3))}t.exports=s},{"./_arrayMap":69,"./_baseIteratee":105,"./_baseMap":109,"./isArray":243}],263:[function(e,t,n){var r=e("./_baseAssignValue"),o=e("./_baseForOwn"),i=e("./_baseIteratee");function a(e,t){var n={};return t=i(t,3),o(e,(function(e,o,i){r(n,o,t(e,o,i))})),n}t.exports=a},{"./_baseAssignValue":79,"./_baseForOwn":88,"./_baseIteratee":105}],264:[function(e,t,n){var r=e("./_baseExtremum"),o=e("./_baseGt"),i=e("./identity");function a(e){return e&&e.length?r(e,i,o):void 0}t.exports=a},{"./_baseExtremum":83,"./_baseGt":92,"./identity":241}],265:[function(e,t,n){var r=e("./_MapCache"),o="Expected a function";function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(o);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},{"./_MapCache":55}],266:[function(e,t,n){var r=e("./_baseMerge"),o=e("./_createAssigner")((function(e,t,n){r(e,t,n)}));t.exports=o},{"./_baseMerge":112,"./_createAssigner":147}],267:[function(e,t,n){var r=e("./_baseExtremum"),o=e("./_baseLt"),i=e("./identity");function a(e){return e&&e.length?r(e,i,o):void 0}t.exports=a},{"./_baseExtremum":83,"./_baseLt":108,"./identity":241}],268:[function(e,t,n){var r=e("./_baseExtremum"),o=e("./_baseIteratee"),i=e("./_baseLt");function a(e,t){return e&&e.length?r(e,o(t,2),i):void 0}t.exports=a},{"./_baseExtremum":83,"./_baseIteratee":105,"./_baseLt":108}],269:[function(e,t,n){function r(){}t.exports=r},{}],270:[function(e,t,n){var r=e("./_root"),o=function(){return r.Date.now()};t.exports=o},{"./_root":208}],271:[function(e,t,n){var r=e("./_basePick"),o=e("./_flatRest")((function(e,t){return null==e?{}:r(e,t)}));t.exports=o},{"./_basePick":115,"./_flatRest":157}],272:[function(e,t,n){var r=e("./_baseProperty"),o=e("./_basePropertyDeep"),i=e("./_isKey"),a=e("./_toKey");function s(e){return i(e)?r(a(e)):o(e)}t.exports=s},{"./_baseProperty":117,"./_basePropertyDeep":118,"./_isKey":183,"./_toKey":223}],273:[function(e,t,n){var r=e("./_createRange")();t.exports=r},{"./_createRange":151}],274:[function(e,t,n){var r=e("./_arrayReduce"),o=e("./_baseEach"),i=e("./_baseIteratee"),a=e("./_baseReduce"),s=e("./isArray");function u(e,t,n){var u=s(e)?r:a,c=arguments.length<3;return u(e,i(t,4),n,c,o)}t.exports=u},{"./_arrayReduce":71,"./_baseEach":82,"./_baseIteratee":105,"./_baseReduce":120,"./isArray":243}],275:[function(e,t,n){var r=e("./_baseKeys"),o=e("./_getTag"),i=e("./isArrayLike"),a=e("./isString"),s=e("./_stringSize"),u="[object Map]",c="[object Set]";function f(e){if(null==e)return 0;if(i(e))return a(e)?s(e):e.length;var t=o(e);return t==u||t==c?e.size:r(e).length}t.exports=f},{"./_baseKeys":106,"./_getTag":168,"./_stringSize":221,"./isArrayLike":244,"./isString":255}],276:[function(e,t,n){var r=e("./_baseFlatten"),o=e("./_baseOrderBy"),i=e("./_baseRest"),a=e("./_isIterateeCall"),s=i((function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),o(e,r(t,1),[])}));t.exports=s},{"./_baseFlatten":86,"./_baseOrderBy":114,"./_baseRest":121,"./_isIterateeCall":182}],277:[function(e,t,n){function r(){return[]}t.exports=r},{}],278:[function(e,t,n){function r(){return!1}t.exports=r},{}],279:[function(e,t,n){var r=e("./toNumber"),o=1/0,i=17976931348623157e292;function a(e){return e?(e=r(e))===o||e===-o?(e<0?-1:1)*i:e==e?e:0:0===e?e:0}t.exports=a},{"./toNumber":281}],280:[function(e,t,n){var r=e("./toFinite");function o(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}t.exports=o},{"./toFinite":279}],281:[function(e,t,n){var r=e("./isObject"),o=e("./isSymbol"),i=NaN,a=/^\\s+|\\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,f=parseInt;function d(e){if("number"==typeof e)return e;if(o(e))return i;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var n=u.test(e);return n||c.test(e)?f(e.slice(2),n?2:8):s.test(e)?i:+e}t.exports=d},{"./isObject":251,"./isSymbol":256}],282:[function(e,t,n){var r=e("./_copyObject"),o=e("./keysIn");function i(e){return r(e,o(e))}t.exports=i},{"./_copyObject":143,"./keysIn":260}],283:[function(e,t,n){var r=e("./_baseToString");function o(e){return null==e?"":r(e)}t.exports=o},{"./_baseToString":126}],284:[function(e,t,n){var r=e("./_arrayEach"),o=e("./_baseCreate"),i=e("./_baseForOwn"),a=e("./_baseIteratee"),s=e("./_getPrototype"),u=e("./isArray"),c=e("./isBuffer"),f=e("./isFunction"),d=e("./isObject"),h=e("./isTypedArray");function l(e,t,n){var l=u(e),p=l||c(e)||h(e);if(t=a(t,4),null==n){var v=e&&e.constructor;n=p?l?new v:[]:d(e)&&f(v)?o(s(e)):{}}return(p?r:i)(e,(function(e,r,o){return t(n,e,r,o)})),n}t.exports=l},{"./_arrayEach":64,"./_baseCreate":81,"./_baseForOwn":88,"./_baseIteratee":105,"./_getPrototype":164,"./isArray":243,"./isBuffer":246,"./isFunction":248,"./isObject":251,"./isTypedArray":257}],285:[function(e,t,n){var r=e("./_baseFlatten"),o=e("./_baseRest"),i=e("./_baseUniq"),a=e("./isArrayLikeObject"),s=o((function(e){return i(r(e,1,a,!0))}));t.exports=s},{"./_baseFlatten":86,"./_baseRest":121,"./_baseUniq":128,"./isArrayLikeObject":245}],286:[function(e,t,n){var r=e("./toString"),o=0;function i(e){var t=++o;return r(e)+t}t.exports=i},{"./toString":283}],287:[function(e,t,n){var r=e("./_baseValues"),o=e("./keys");function i(e){return null==e?[]:r(e,o(e))}t.exports=i},{"./_baseValues":129,"./keys":259}],288:[function(e,t,n){var r=e("./_assignValue"),o=e("./_baseZipObject");function i(e,t){return o(e||[],t||[],r)}t.exports=i},{"./_assignValue":75,"./_baseZipObject":130}]},{},[1])(1);var r={exports:{}};\n/*!\n\t * @overview es6-promise - a tiny implementation of Promises/A+.\n\t * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n\t * @license Licensed under MIT license\n\t * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n\t * @version v4.2.8+1e68dce6\n\t */function o(e,t){var r=e.subgraphs,o=e.nodes,i=e.links,a=e.hierarchy,s=new n.exports.graphlib.Graph({multigraph:!0,compound:!0,directed:!1!==t.digraph}).setGraph(t).setDefaultNodeLabel((function(){return{}})).setDefaultEdgeLabel((function(){return{}}));r.forEach((function(e){s.setNode(e.id,e)})),o.forEach((function(e){s.setNode(e.id,e)})),i.forEach((function(e){s.setEdge(e.source.id,e.target.id,e,e.id)})),a.forEach((function(e){s.setParent(e.child,e.parent)})),n.exports.layout(s,{debugTiming:!1});var u=-s.graph().width/2||0,c=-s.graph().height/2;return s.nodes().forEach((function(e){var t=s.node(e);t.x+=u,t.y+=c})),s.edges().forEach((function(e){var t=s.edge(e);t.points=t.points.map((function(e){return[e.x+u,e.y+c]}))})),{subgraphs:r,nodes:o,links:i}}!function(t,n){t.exports=function(){function t(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}function n(e){return"function"==typeof e}var r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=0,i=void 0,a=void 0,s=function(e,t){m[o]=e,m[o+1]=t,2===(o+=2)&&(a?a(x):E())};function u(e){a=e}function c(e){s=e}var f="undefined"!=typeof window?window:void 0,d=f||{},h=d.MutationObserver||d.WebKitMutationObserver,l="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),p="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function v(){return function(){return process.nextTick(x)}}function _(){return void 0!==i?function(){i(x)}:b()}function y(){var e=0,t=new h(x),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function g(){var e=new MessageChannel;return e.port1.onmessage=x,function(){return e.port2.postMessage(0)}}function b(){var e=setTimeout;return function(){return e(x,1)}}var m=new Array(1e3);function x(){for(var e=0;e<o;e+=2)(0,m[e])(m[e+1]),m[e]=void 0,m[e+1]=void 0;o=0}function w(){try{var e=Function("return this")().require("vertx");return i=e.runOnLoop||e.runOnContext,_()}catch(e){return b()}}var E=void 0;function j(e,t){var n=this,r=new this.constructor(O);void 0===r[A]&&Y(r);var o=n._state;if(o){var i=arguments[o-1];s((function(){return V(o,r,i,n._result)}))}else U(n,r,e,t);return r}function k(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(O);return D(n,e),n}E=l?v():h?y():p?g():void 0===f?w():b();var A=Math.random().toString(36).substring(2);function O(){}var I=void 0,S=1,C=2;function N(){return new TypeError("You cannot resolve a promise with itself")}function T(){return new TypeError("A promises callback cannot return that same promise.")}function M(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}function L(e,t,n){s((function(e){var r=!1,o=M(n,t,(function(n){r||(r=!0,t!==n?D(e,n):G(e,n))}),(function(t){r||(r=!0,R(e,t))}),"Settle: "+(e._label||" unknown promise"));!r&&o&&(r=!0,R(e,o))}),e)}function P(e,t){t._state===S?G(e,t._result):t._state===C?R(e,t._result):U(t,void 0,(function(t){return D(e,t)}),(function(t){return R(e,t)}))}function F(e,t,r){t.constructor===e.constructor&&r===j&&t.constructor.resolve===k?P(e,t):void 0===r?G(e,t):n(r)?L(e,t,r):G(e,t)}function D(e,n){if(e===n)R(e,N());else if(t(n)){var r=void 0;try{r=n.then}catch(t){return void R(e,t)}F(e,n,r)}else G(e,n)}function B(e){e._onerror&&e._onerror(e._result),z(e)}function G(e,t){e._state===I&&(e._result=t,e._state=S,0!==e._subscribers.length&&s(z,e))}function R(e,t){e._state===I&&(e._state=C,e._result=t,s(B,e))}function U(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+S]=n,o[i+C]=r,0===i&&e._state&&s(z,e)}function z(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,o=void 0,i=e._result,a=0;a<t.length;a+=3)r=t[a],o=t[a+n],r?V(n,r,o,i):o(i);e._subscribers.length=0}}function V(e,t,r,o){var i=n(r),a=void 0,s=void 0,u=!0;if(i){try{a=r(o)}catch(e){u=!1,s=e}if(t===a)return void R(t,T())}else a=o;t._state!==I||(i&&u?D(t,a):!1===u?R(t,s):e===S?G(t,a):e===C&&R(t,a))}function q(e,t){try{t((function(t){D(e,t)}),(function(t){R(e,t)}))}catch(t){R(e,t)}}var K=0;function H(){return K++}function Y(e){e[A]=K++,e._state=void 0,e._result=void 0,e._subscribers=[]}function $(){return new Error("Array Methods must be provided an Array")}var W=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(O),this.promise[A]||Y(this.promise),r(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?G(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&G(this.promise,this._result))):R(this.promise,$())}return e.prototype._enumerate=function(e){for(var t=0;this._state===I&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===k){var o=void 0,i=void 0,a=!1;try{o=e.then}catch(e){a=!0,i=e}if(o===j&&e._state!==I)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===te){var s=new n(O);a?R(s,i):F(s,e,o),this._willSettleAt(s,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},e.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===I&&(this._remaining--,e===C?R(r,n):this._result[t]=n),0===this._remaining&&G(r,this._result)},e.prototype._willSettleAt=function(e,t){var n=this;U(e,void 0,(function(e){return n._settledAt(S,t,e)}),(function(e){return n._settledAt(C,t,e)}))},e}();function J(e){return new W(this,e).promise}function X(e){var t=this;return r(e)?new t((function(n,r){for(var o=e.length,i=0;i<o;i++)t.resolve(e[i]).then(n,r)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))}function Z(e){var t=new this(O);return R(t,e),t}function Q(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function ee(){throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.")}var te=function(){function e(t){this[A]=H(),this._result=this._state=void 0,this._subscribers=[],O!==t&&("function"!=typeof t&&Q(),this instanceof e?q(this,t):ee())}return e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(e){var t=this,r=t.constructor;return n(e)?t.then((function(t){return r.resolve(e()).then((function(){return t}))}),(function(t){return r.resolve(e()).then((function(){throw t}))})):t.then(e,e)},e}();function ne(){var t=void 0;if(void 0!==e)t=e;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=te}return te.prototype.then=j,te.all=J,te.race=X,te.resolve=k,te.reject=Z,te._setScheduler=u,te._setAsap=c,te._asap=s,te.polyfill=ne,te.Promise=te,te}()}(r),r.exports.polyfill(),self.onmessage=function(e){var t=o.apply(void 0,e.data);self.postMessage(t)}}();'],{type:"application/javascript"}),n=URL.createObjectURL(r),o=new Worker(n);return{terminate:function(){return o.terminate()},response:new Promise((function(r){o.onmessage=function(e){r(e.data),o.terminate(),URL.revokeObjectURL(n)},o.postMessage([e,t])}))}}({subgraphs:n.allSubgraphs().map((function(e){return u(u({},e.props),{id:em(e.id)})})),nodes:n.allVertices().map((function(e){delete e.fx,delete e.fy;var t=e.element.node().getBBox();return u(u({width:t.width,height:t.height},e.props),{id:String(e.id)})})),links:n.allEdges().map((function(e){return{id:String(e.props.id),source:{id:String(e.source.props.id),text:e.source.props.text},target:{id:String(e.target.props.id),text:e.target.props.text}}})),hierarchy:l(l([],n.allSubgraphs().filter((function(e){return!!n.subgraphParent(e.id)})).map((function(e){return{parent:em(n.subgraphParent(e.id).props.id),child:em(e.id)}})),!0),n.allVertices().filter((function(e){return void 0!==n.vertexParent(e.id)})).map((function(e){return{parent:em(n.vertexParent(e.id).props.id),child:String(e.id)}})),!0)},this._options).response.then((function(e){return t.running()&&(e.subgraphs.forEach((function(e){var t=n.subgraph(e.id.substring(8));t.x=e.x+r.width/2,t.y=e.y+r.height/2,t.props.width=e.width,t.props.height=e.height})),e.nodes.forEach((function(e){var t=n.vertex(e.id);t.x=e.x+r.width/2,t.y=e.y+r.height/2})),e.links.forEach((function(e){var t=n.edge(e.id),o=tm(t.source.x,t.source.y,e.points[0][0]+r.width/2,e.points[0][1]+r.height/2),i=tm(t.target.x,t.target.y,e.points[0][0]+r.width/2,e.points[0][1]+r.height/2);t.points=l(l([o<i?[t.source.x,t.source.y]:[t.target.x,t.target.y]],e.points.map((function(e){return[e[0]+r.width/2,e[1]+r.height/2]})),!0),[o<i?[t.target.x,t.target.y]:[t.source.x,t.source.y]],!1)})),t._graph.moveVertices(!0).moveSubgraphs(!0).moveEdges(!0),t.stop()),t}))},t.prototype.edgePath=function(t,r){var n=this,o=[],i=!1;return t.points&&(o=t.points.map((function(e){var t=n._graph.project(e[0],!1),r=n._graph.project(e[1],!1);return(isNaN(t)||isNaN(r))&&(i=!0),[t,r]}))),i||o.length<2?e.prototype.edgePath.call(this,t,r):{path:J_(o),labelPos:this.center(o)}},t}($_),nm=function(e){function t(t,r){var n=e.call(this,t)||this;return n._options=r,n}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=t._graph.size(),r=t._graph.graphData(),n=r.allVertices(),o=r.allEdges();o.forEach((function(e){return delete e.points})),t._links=Ny(o).id((function(e){return e.id})).distance(t._options.linkDistance).strength(t._options.linkStrength),t._charge=o_().strength(t._options.repulsionStrength).distanceMin(t._options.distanceMin).distanceMax(t._options.distanceMax),t._center=Ey(e.width/2,e.height/2);var i=function(e){var t,r,n,o=ky(.1);function i(e){for(var o,i=0,a=t.length;i<a;++i)(o=t[i]).vx+=(n[i]-o.x)*r[i]*e}function a(){if(t){var i,a=t.length;for(r=new Array(a),n=new Array(a),i=0;i<a;++i)r[i]=isNaN(n[i]=+e(t[i],i,t))?0:+o(t[i],i,t)}}return"function"!=typeof e&&(e=ky(null==e?0:+e)),i.initialize=function(e){t=e,a()},i.strength=function(e){return arguments.length?(o="function"==typeof e?e:ky(+e),a(),i):o},i.x=function(t){return arguments.length?(e="function"==typeof t?t:ky(+t),a(),i):e},i}().strength(t._options.forceStrength),a=function(e){var t,r,n,o=ky(.1);function i(e){for(var o,i=0,a=t.length;i<a;++i)(o=t[i]).vy+=(n[i]-o.y)*r[i]*e}function a(){if(t){var i,a=t.length;for(r=new Array(a),n=new Array(a),i=0;i<a;++i)r[i]=isNaN(n[i]=+e(t[i],i,t))?0:+o(t[i],i,t)}}return"function"!=typeof e&&(e=ky(null==e?0:+e)),i.initialize=function(e){t=e,a()},i.strength=function(e){return arguments.length?(o="function"==typeof e?e:ky(+e),a(),i):o},i.y=function(t){return arguments.length?(e="function"==typeof t?t:ky(+t),a(),i):e},i}().strength(t._options.forceStrength);return t._simulation=n_(n.map((function(r){var n=r.element.node().getBBox(),o=n.width,i=n.height;return r.fx=t._options.pinCentroid&&r.props.centroid?e.width/2:void 0,r.fy=t._options.pinCentroid&&r.props.centroid?e.height/2:void 0,r.width=o,r.height=i,r}))).force("link",t._links).force("charge",t._charge).force("center",t._center).force("x",i).force("y",a).alpha(t._options.alpha/2).alphaMin(t._options.alphaMin).alphaDecay(t._options.alphaDecay).velocityDecay(t._options.velocityDecay).stop(),t}))},t.prototype.stop=function(){return this._simulation.stop(),e.prototype.stop.call(this)},t}($_),om=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){return t._simulation.tick(t._options.iterations),t.stop(),t._graph.moveVertices(!1).moveEdges(!1),t}))},t}(nm),im=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){return new Promise((function(e){t._simulation.on("tick",(function(){t._graph.moveVertices(!1).moveEdges(!1),t._graph.progress("layout-tick")})).on("end",(function(){t._running=!1,e(t)})).restart()}))}))},t}(nm);function am(e,t){var r=new Blob(['!function(){"use strict";function r(r,e,t){if(t||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return r.concat(n||Array.prototype.slice.call(e))}"undefined"!=typeof document&&document.currentScript&&document.currentScript.src;let e=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}().__hpcc_wasmFolder||void 0;let t="undefined"!=typeof document&&document.currentScript?document.currentScript.src:"undefined"!=typeof __filename?__filename:"undefined"!=typeof document&&document.currentScript?document.currentScript.src:"";t=t.substr(0,t.replace(/[?#].*/,"").lastIndexOf("/")+1);const n={};async function o(r,e,t){const n=r.default||r;return t||(t=await async function(r){return fetch(r,{credentials:"same-origin"}).then((e=>{if(!e.ok)throw"failed to load wasm binary file at \'"+r+"\'";return e.arrayBuffer()})).catch((r=>{throw r}))}(e)),await n({wasmBinary:t})}async function i(r,i,a,s){const u=`${function(r,e){for(;r.charAt(r.length-1)===e;)r=r.substring(0,r.length-1);return r}(a||function(r){if(!arguments.length)return e;const t=e;return e=r,t}()||t||".","/")}/${function(r,e){for(;r.charAt(0)===e;)r=r.substring(1);return r}(`${i}.wasm`,"/")}`;return n[u]||(n[u]=o(r,u,s)),n[u]}var a=(()=>{var r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return function(e){var t,n,o=void 0!==(e=e||{})?e:{};o.ready=new Promise((function(r,e){t=r,n=e}));var i,a,s=Object.assign({},o),u="./this.program",c=(r,e)=>{throw e},l="";"undefined"!=typeof document&&document.currentScript&&(l=document.currentScript.src),r&&(l=r),l=0!==l.indexOf("blob:")?l.substr(0,l.replace(/[?#].*/,"").lastIndexOf("/")+1):"",i=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.send(null),e.responseText},a=(r,e,t)=>{var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):t()},n.onerror=t,n.send(null)};var f,d=o.print||console.log.bind(console),p=o.printErr||console.warn.bind(console);Object.assign(o,s),s=null,o.arguments&&o.arguments,o.thisProgram&&(u=o.thisProgram),o.quit&&(c=o.quit),o.wasmBinary&&(f=o.wasmBinary);var h,m=o.noExitRuntime||!0;"object"!=typeof WebAssembly&&C("no native wasm support detected");var v=!1;function w(r,e){r||C(e)}var y,_,g,E,b,k,S,D="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function A(r,e,t){for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.buffer&&D)return D.decode(r.subarray(e,o));for(var i="";e<o;){var a=r[e++];if(128&a){var s=63&r[e++];if(192!=(224&a)){var u=63&r[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&r[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function F(r,e){return r?A(g,r,e):""}function M(r,e,t,n){if(!(n>0))return 0;for(var o=t,i=t+n-1,a=0;a<r.length;++a){var s=r.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&r.charCodeAt(++a);if(s<=127){if(t>=i)break;e[t++]=s}else if(s<=2047){if(t+1>=i)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=i)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=i)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o}function P(r){for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++t):e+=3}return e}function x(r){y=r,o.HEAP8=_=new Int8Array(r),o.HEAP16=E=new Int16Array(r),o.HEAP32=b=new Int32Array(r),o.HEAPU8=g=new Uint8Array(r),o.HEAPU16=new Uint16Array(r),o.HEAPU32=k=new Uint32Array(r),o.HEAPF32=new Float32Array(r),o.HEAPF64=S=new Float64Array(r)}o.INITIAL_MEMORY;var j=[],z=[],T=[];var R=0,B=null;function N(r){R++,o.monitorRunDependencies&&o.monitorRunDependencies(R)}function O(r){if(R--,o.monitorRunDependencies&&o.monitorRunDependencies(R),0==R&&B){var e=B;B=null,e()}}function C(r){o.onAbort&&o.onAbort(r),p(r="Aborted("+r+")"),v=!0,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw n(e),e}var L,I,G,U;function H(r){return r.startsWith("data:application/octet-stream;base64,")}function q(r){try{if(r==L&&f)return new Uint8Array(f);throw"both async and sync fetching of the wasm failed"}catch(r){C(r)}}H(L="graphvizlib.wasm")||(I=L,L=o.locateFile?o.locateFile(I,l):l+I);var V={163264:(r,e)=>{var t=F(r),n=F(e);rr.createPath("/",Y.dirname(t)),rr.writeFile(Y.join("/",t),n)}};function W(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function X(r){for(;r.length>0;)r.shift()(o)}var Y={isAbs:r=>"/"===r.charAt(0),splitPath:r=>/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/.exec(r).slice(1),normalizeArray:(r,e)=>{for(var t=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift("..");return r},normalize:r=>{var e=Y.isAbs(r),t="/"===r.substr(-1);return(r=Y.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"))||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:r=>{var e=Y.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:r=>{if("/"===r)return"/";var e=(r=(r=Y.normalize(r)).replace(/\\/$/,"")).lastIndexOf("/");return-1===e?r:r.substr(e+1)},join:function(){var r=Array.prototype.slice.call(arguments);return Y.normalize(r.join("/"))},join2:(r,e)=>Y.normalize(r+"/"+e)};var $={resolve:function(){for(var r="",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:rr.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,e=Y.isAbs(n)}return(e?"/":"")+(r=Y.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"))||"."},relative:(r,e)=>{function t(r){for(var e=0;e<r.length&&""===r[e];e++);for(var t=r.length-1;t>=0&&""===r[t];t--);return e>t?[]:r.slice(e,t-e+1)}r=$.resolve(r).substr(1),e=$.resolve(e).substr(1);for(var n=t(r.split("/")),o=t(e.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(a))).join("/")}};function K(r,e,t){var n=t>0?t:P(r)+1,o=new Array(n),i=M(r,o,0,o.length);return e&&(o.length=i),o}var J={ttys:[],init:function(){},shutdown:function(){},register:function(r,e){J.ttys[r]={input:[],output:[],ops:e},rr.registerDevice(r,J.stream_ops)},stream_ops:{open:function(r){var e=J.ttys[r.node.rdev];if(!e)throw new rr.ErrnoError(43);r.tty=e,r.seekable=!1},close:function(r){r.tty.ops.fsync(r.tty)},fsync:function(r){r.tty.ops.fsync(r.tty)},read:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new rr.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(r){throw new rr.ErrnoError(29)}if(void 0===s&&0===i)throw new rr.ErrnoError(6);if(null==s)break;i++,e[t+a]=s}return i&&(r.node.timestamp=Date.now()),i},write:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new rr.ErrnoError(60);try{for(var i=0;i<n;i++)r.tty.ops.put_char(r.tty,e[t+i])}catch(r){throw new rr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(r){if(!r.input.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\\n"),!e)return null;r.input=K(e,!0)}return r.input.shift()},put_char:function(r,e){null===e||10===e?(d(A(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},fsync:function(r){r.output&&r.output.length>0&&(d(A(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,e){null===e||10===e?(p(A(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},fsync:function(r){r.output&&r.output.length>0&&(p(A(r.output,0)),r.output=[])}}};function Q(r){r=function(r,e){return Math.ceil(r/e)*e}(r,65536);var e=Er(65536,r);return e?function(r,e){return g.fill(0,r,r+e),r}(e,r):0}var Z={ops_table:null,mount:function(r){return Z.createNode(null,"/",16895,0)},createNode:function(r,e,t,n){if(rr.isBlkdev(t)||rr.isFIFO(t))throw new rr.ErrnoError(63);Z.ops_table||(Z.ops_table={dir:{node:{getattr:Z.node_ops.getattr,setattr:Z.node_ops.setattr,lookup:Z.node_ops.lookup,mknod:Z.node_ops.mknod,rename:Z.node_ops.rename,unlink:Z.node_ops.unlink,rmdir:Z.node_ops.rmdir,readdir:Z.node_ops.readdir,symlink:Z.node_ops.symlink},stream:{llseek:Z.stream_ops.llseek}},file:{node:{getattr:Z.node_ops.getattr,setattr:Z.node_ops.setattr},stream:{llseek:Z.stream_ops.llseek,read:Z.stream_ops.read,write:Z.stream_ops.write,allocate:Z.stream_ops.allocate,mmap:Z.stream_ops.mmap,msync:Z.stream_ops.msync}},link:{node:{getattr:Z.node_ops.getattr,setattr:Z.node_ops.setattr,readlink:Z.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Z.node_ops.getattr,setattr:Z.node_ops.setattr},stream:rr.chrdev_stream_ops}});var o=rr.createNode(r,e,t,n);return rr.isDir(o.mode)?(o.node_ops=Z.ops_table.dir.node,o.stream_ops=Z.ops_table.dir.stream,o.contents={}):rr.isFile(o.mode)?(o.node_ops=Z.ops_table.file.node,o.stream_ops=Z.ops_table.file.stream,o.usedBytes=0,o.contents=null):rr.isLink(o.mode)?(o.node_ops=Z.ops_table.link.node,o.stream_ops=Z.ops_table.link.stream):rr.isChrdev(o.mode)&&(o.node_ops=Z.ops_table.chrdev.node,o.stream_ops=Z.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[e]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){e=Math.max(e,t*(t<1048576?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));var n=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,e){if(r.usedBytes!=e)if(0==e)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr:function(r){var e={};return e.dev=rr.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,rr.isDir(r.mode)?e.size=4096:rr.isFile(r.mode)?e.size=r.usedBytes:rr.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(r,e){void 0!==e.mode&&(r.mode=e.mode),void 0!==e.timestamp&&(r.timestamp=e.timestamp),void 0!==e.size&&Z.resizeFileStorage(r,e.size)},lookup:function(r,e){throw rr.genericErrors[44]},mknod:function(r,e,t,n){return Z.createNode(r,e,t,n)},rename:function(r,e,t){if(rr.isDir(r.mode)){var n;try{n=rr.lookupNode(e,t)}catch(r){}if(n)for(var o in n.contents)throw new rr.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp,r.parent=e},unlink:function(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir:function(r,e){var t=rr.lookupNode(r,e);for(var n in t.contents)throw new rr.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir:function(r){var e=[".",".."];for(var t in r.contents)r.contents.hasOwnProperty(t)&&e.push(t);return e},symlink:function(r,e,t){var n=Z.createNode(r,e,41471,0);return n.link=t,n},readlink:function(r){if(!rr.isLink(r.mode))throw new rr.ErrnoError(28);return r.link}},stream_ops:{read:function(r,e,t,n,o){var i=r.node.contents;if(o>=r.node.usedBytes)return 0;var a=Math.min(r.node.usedBytes-o,n);if(a>8&&i.subarray)e.set(i.subarray(o,o+a),t);else for(var s=0;s<a;s++)e[t+s]=i[o+s];return a},write:function(r,e,t,n,o,i){if(e.buffer===_.buffer&&(i=!1),!n)return 0;var a=r.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=e.subarray(t,t+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=e.slice(t,t+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(e.subarray(t,t+n),o),n}if(Z.expandFileStorage(a,o+n),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(t,t+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=e[t+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&rr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new rr.ErrnoError(28);return n},allocate:function(r,e,t){Z.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap:function(r,e,t,n,o){if(!rr.isFile(r.node.mode))throw new rr.ErrnoError(43);var i,a,s=r.node.contents;if(2&o||s.buffer!==y){if((t>0||t+e<s.length)&&(s=s.subarray?s.subarray(t,t+e):Array.prototype.slice.call(s,t,t+e)),a=!0,!(i=Q(e)))throw new rr.ErrnoError(48);_.set(s,i)}else a=!1,i=s.byteOffset;return{ptr:i,allocated:a}},msync:function(r,e,t,n,o){if(!rr.isFile(r.node.mode))throw new rr.ErrnoError(43);return 2&o||Z.stream_ops.write(r,e,0,n,t,!1),0}}};var rr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(r,e={})=>{if(!(r=$.resolve(rr.cwd(),r)))return{path:"",node:null};if((e=Object.assign({follow_mount:!0,recurse_count:0},e)).recurse_count>8)throw new rr.ErrnoError(32);for(var t=Y.normalizeArray(r.split("/").filter((r=>!!r)),!1),n=rr.root,o="/",i=0;i<t.length;i++){var a=i===t.length-1;if(a&&e.parent)break;if(n=rr.lookupNode(n,t[i]),o=Y.join2(o,t[i]),rr.isMountpoint(n)&&(!a||a&&e.follow_mount)&&(n=n.mounted.root),!a||e.follow)for(var s=0;rr.isLink(n.mode);){var u=rr.readlink(o);if(o=$.resolve(Y.dirname(o),u),n=rr.lookupPath(o,{recurse_count:e.recurse_count+1}).node,s++>40)throw new rr.ErrnoError(32)}}return{path:o,node:n}},getPath:r=>{for(var e;;){if(rr.isRoot(r)){var t=r.mount.mountpoint;return e?"/"!==t[t.length-1]?t+"/"+e:t+e:t}e=e?r.name+"/"+e:r.name,r=r.parent}},hashName:(r,e)=>{for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%rr.nameTable.length},hashAddNode:r=>{var e=rr.hashName(r.parent.id,r.name);r.name_next=rr.nameTable[e],rr.nameTable[e]=r},hashRemoveNode:r=>{var e=rr.hashName(r.parent.id,r.name);if(rr.nameTable[e]===r)rr.nameTable[e]=r.name_next;else for(var t=rr.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode:(r,e)=>{var t=rr.mayLookup(r);if(t)throw new rr.ErrnoError(t,r);for(var n=rr.hashName(r.id,e),o=rr.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===r.id&&i===e)return o}return rr.lookup(r,e)},createNode:(r,e,t,n)=>{var o=new rr.FSNode(r,e,t,n);return rr.hashAddNode(o),o},destroyNode:r=>{rr.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>49152==(49152&r),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:r=>{var e=rr.flagModes[r];if(void 0===e)throw new Error("Unknown file open mode: "+r);return e},flagsToPermissionString:r=>{var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:(r,e)=>rr.ignorePermissions||(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2,mayLookup:r=>{var e=rr.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate:(r,e)=>{try{rr.lookupNode(r,e);return 20}catch(r){}return rr.nodePermissions(r,"wx")},mayDelete:(r,e,t)=>{var n;try{n=rr.lookupNode(r,e)}catch(r){return r.errno}var o=rr.nodePermissions(r,"wx");if(o)return o;if(t){if(!rr.isDir(n.mode))return 54;if(rr.isRoot(n)||rr.getPath(n)===rr.cwd())return 10}else if(rr.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?rr.isLink(r.mode)?32:rr.isDir(r.mode)&&("r"!==rr.flagsToPermissionString(e)||512&e)?31:rr.nodePermissions(r,rr.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,e=rr.MAX_OPEN_FDS)=>{for(var t=r;t<=e;t++)if(!rr.streams[t])return t;throw new rr.ErrnoError(33)},getStream:r=>rr.streams[r],createStream:(r,e,t)=>{rr.FSStream||(rr.FSStream=function(){this.shared={}},rr.FSStream.prototype={},Object.defineProperties(rr.FSStream.prototype,{object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(r){this.shared.flags=r}},position:{get:function(){return this.shared.position},set:function(r){this.shared.position=r}}})),r=Object.assign(new rr.FSStream,r);var n=rr.nextfd(e,t);return r.fd=n,rr.streams[n]=r,r},closeStream:r=>{rr.streams[r]=null},chrdev_stream_ops:{open:r=>{var e=rr.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new rr.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice:(r,e)=>{rr.devices[r]={stream_ops:e}},getDevice:r=>rr.devices[r],getMounts:r=>{for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push.apply(t,n.mounts)}return e},syncfs:(r,e)=>{"function"==typeof r&&(e=r,r=!1),rr.syncFSRequests++,rr.syncFSRequests>1&&p("warning: "+rr.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=rr.getMounts(rr.root.mount),n=0;function o(r){return rr.syncFSRequests--,e(r)}function i(r){if(r)return i.errored?void 0:(i.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach((e=>{if(!e.type.syncfs)return i(null);e.type.syncfs(e,r,i)}))},mount:(r,e,t)=>{var n,o="/"===t,i=!t;if(o&&rr.root)throw new rr.ErrnoError(10);if(!o&&!i){var a=rr.lookupPath(t,{follow_mount:!1});if(t=a.path,n=a.node,rr.isMountpoint(n))throw new rr.ErrnoError(10);if(!rr.isDir(n.mode))throw new rr.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?rr.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:r=>{var e=rr.lookupPath(r,{follow_mount:!1});if(!rr.isMountpoint(e.node))throw new rr.ErrnoError(28);var t=e.node,n=t.mounted,o=rr.getMounts(n);Object.keys(rr.nameTable).forEach((r=>{for(var e=rr.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&rr.destroyNode(e),e=t}})),t.mounted=null;var i=t.mount.mounts.indexOf(n);t.mount.mounts.splice(i,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod:(r,e,t)=>{var n=rr.lookupPath(r,{parent:!0}).node,o=Y.basename(r);if(!o||"."===o||".."===o)throw new rr.ErrnoError(28);var i=rr.mayCreate(n,o);if(i)throw new rr.ErrnoError(i);if(!n.node_ops.mknod)throw new rr.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},create:(r,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,rr.mknod(r,e,0)),mkdir:(r,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,rr.mknod(r,e,0)),mkdirTree:(r,e)=>{for(var t=r.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{rr.mkdir(n,e)}catch(r){if(20!=r.errno)throw r}}},mkdev:(r,e,t)=>(void 0===t&&(t=e,e=438),e|=8192,rr.mknod(r,e,t)),symlink:(r,e)=>{if(!$.resolve(r))throw new rr.ErrnoError(44);var t=rr.lookupPath(e,{parent:!0}).node;if(!t)throw new rr.ErrnoError(44);var n=Y.basename(e),o=rr.mayCreate(t,n);if(o)throw new rr.ErrnoError(o);if(!t.node_ops.symlink)throw new rr.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename:(r,e)=>{var t,n,o=Y.dirname(r),i=Y.dirname(e),a=Y.basename(r),s=Y.basename(e);if(t=rr.lookupPath(r,{parent:!0}).node,n=rr.lookupPath(e,{parent:!0}).node,!t||!n)throw new rr.ErrnoError(44);if(t.mount!==n.mount)throw new rr.ErrnoError(75);var u,c=rr.lookupNode(t,a),l=$.relative(r,i);if("."!==l.charAt(0))throw new rr.ErrnoError(28);if("."!==(l=$.relative(e,o)).charAt(0))throw new rr.ErrnoError(55);try{u=rr.lookupNode(n,s)}catch(r){}if(c!==u){var f=rr.isDir(c.mode),d=rr.mayDelete(t,a,f);if(d)throw new rr.ErrnoError(d);if(d=u?rr.mayDelete(n,s,f):rr.mayCreate(n,s))throw new rr.ErrnoError(d);if(!t.node_ops.rename)throw new rr.ErrnoError(63);if(rr.isMountpoint(c)||u&&rr.isMountpoint(u))throw new rr.ErrnoError(10);if(n!==t&&(d=rr.nodePermissions(t,"w")))throw new rr.ErrnoError(d);rr.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(r){throw r}finally{rr.hashAddNode(c)}}},rmdir:r=>{var e=rr.lookupPath(r,{parent:!0}).node,t=Y.basename(r),n=rr.lookupNode(e,t),o=rr.mayDelete(e,t,!0);if(o)throw new rr.ErrnoError(o);if(!e.node_ops.rmdir)throw new rr.ErrnoError(63);if(rr.isMountpoint(n))throw new rr.ErrnoError(10);e.node_ops.rmdir(e,t),rr.destroyNode(n)},readdir:r=>{var e=rr.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new rr.ErrnoError(54);return e.node_ops.readdir(e)},unlink:r=>{var e=rr.lookupPath(r,{parent:!0}).node;if(!e)throw new rr.ErrnoError(44);var t=Y.basename(r),n=rr.lookupNode(e,t),o=rr.mayDelete(e,t,!1);if(o)throw new rr.ErrnoError(o);if(!e.node_ops.unlink)throw new rr.ErrnoError(63);if(rr.isMountpoint(n))throw new rr.ErrnoError(10);e.node_ops.unlink(e,t),rr.destroyNode(n)},readlink:r=>{var e=rr.lookupPath(r).node;if(!e)throw new rr.ErrnoError(44);if(!e.node_ops.readlink)throw new rr.ErrnoError(28);return $.resolve(rr.getPath(e.parent),e.node_ops.readlink(e))},stat:(r,e)=>{var t=rr.lookupPath(r,{follow:!e}).node;if(!t)throw new rr.ErrnoError(44);if(!t.node_ops.getattr)throw new rr.ErrnoError(63);return t.node_ops.getattr(t)},lstat:r=>rr.stat(r,!0),chmod:(r,e,t)=>{var n;"string"==typeof r?n=rr.lookupPath(r,{follow:!t}).node:n=r;if(!n.node_ops.setattr)throw new rr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:(r,e)=>{rr.chmod(r,e,!0)},fchmod:(r,e)=>{var t=rr.getStream(r);if(!t)throw new rr.ErrnoError(8);rr.chmod(t.node,e)},chown:(r,e,t,n)=>{var o;"string"==typeof r?o=rr.lookupPath(r,{follow:!n}).node:o=r;if(!o.node_ops.setattr)throw new rr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,e,t)=>{rr.chown(r,e,t,!0)},fchown:(r,e,t)=>{var n=rr.getStream(r);if(!n)throw new rr.ErrnoError(8);rr.chown(n.node,e,t)},truncate:(r,e)=>{if(e<0)throw new rr.ErrnoError(28);var t;"string"==typeof r?t=rr.lookupPath(r,{follow:!0}).node:t=r;if(!t.node_ops.setattr)throw new rr.ErrnoError(63);if(rr.isDir(t.mode))throw new rr.ErrnoError(31);if(!rr.isFile(t.mode))throw new rr.ErrnoError(28);var n=rr.nodePermissions(t,"w");if(n)throw new rr.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate:(r,e)=>{var t=rr.getStream(r);if(!t)throw new rr.ErrnoError(8);if(0==(2097155&t.flags))throw new rr.ErrnoError(28);rr.truncate(t.node,e)},utime:(r,e,t)=>{var n=rr.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,t)})},open:(r,e,t)=>{if(""===r)throw new rr.ErrnoError(44);var n;if(t=void 0===t?438:t,t=64&(e="string"==typeof e?rr.modeStringToFlags(e):e)?4095&t|32768:0,"object"==typeof r)n=r;else{r=Y.normalize(r);try{n=rr.lookupPath(r,{follow:!(131072&e)}).node}catch(r){}}var i=!1;if(64&e)if(n){if(128&e)throw new rr.ErrnoError(20)}else n=rr.mknod(r,t,0),i=!0;if(!n)throw new rr.ErrnoError(44);if(rr.isChrdev(n.mode)&&(e&=-513),65536&e&&!rr.isDir(n.mode))throw new rr.ErrnoError(54);if(!i){var a=rr.mayOpen(n,e);if(a)throw new rr.ErrnoError(a)}512&e&&!i&&rr.truncate(n,0),e&=-131713;var s=rr.createStream({node:n,path:rr.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!o.logReadFiles||1&e||(rr.readFiles||(rr.readFiles={}),r in rr.readFiles||(rr.readFiles[r]=1)),s},close:r=>{if(rr.isClosed(r))throw new rr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{rr.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek:(r,e,t)=>{if(rr.isClosed(r))throw new rr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new rr.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new rr.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read:(r,e,t,n,o)=>{if(n<0||o<0)throw new rr.ErrnoError(28);if(rr.isClosed(r))throw new rr.ErrnoError(8);if(1==(2097155&r.flags))throw new rr.ErrnoError(8);if(rr.isDir(r.node.mode))throw new rr.ErrnoError(31);if(!r.stream_ops.read)throw new rr.ErrnoError(28);var i=void 0!==o;if(i){if(!r.seekable)throw new rr.ErrnoError(70)}else o=r.position;var a=r.stream_ops.read(r,e,t,n,o);return i||(r.position+=a),a},write:(r,e,t,n,o,i)=>{if(n<0||o<0)throw new rr.ErrnoError(28);if(rr.isClosed(r))throw new rr.ErrnoError(8);if(0==(2097155&r.flags))throw new rr.ErrnoError(8);if(rr.isDir(r.node.mode))throw new rr.ErrnoError(31);if(!r.stream_ops.write)throw new rr.ErrnoError(28);r.seekable&&1024&r.flags&&rr.llseek(r,0,2);var a=void 0!==o;if(a){if(!r.seekable)throw new rr.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,i);return a||(r.position+=s),s},allocate:(r,e,t)=>{if(rr.isClosed(r))throw new rr.ErrnoError(8);if(e<0||t<=0)throw new rr.ErrnoError(28);if(0==(2097155&r.flags))throw new rr.ErrnoError(8);if(!rr.isFile(r.node.mode)&&!rr.isDir(r.node.mode))throw new rr.ErrnoError(43);if(!r.stream_ops.allocate)throw new rr.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap:(r,e,t,n,o)=>{if(0!=(2&n)&&0==(2&o)&&2!=(2097155&r.flags))throw new rr.ErrnoError(2);if(1==(2097155&r.flags))throw new rr.ErrnoError(2);if(!r.stream_ops.mmap)throw new rr.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o)},msync:(r,e,t,n,o)=>r&&r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0,munmap:r=>0,ioctl:(r,e,t)=>{if(!r.stream_ops.ioctl)throw new rr.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile:(r,e={})=>{if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error(\'Invalid encoding type "\'+e.encoding+\'"\');var t,n=rr.open(r,e.flags),o=rr.stat(r).size,i=new Uint8Array(o);return rr.read(n,i,0,o,0),"utf8"===e.encoding?t=A(i,0):"binary"===e.encoding&&(t=i),rr.close(n),t},writeFile:(r,e,t={})=>{t.flags=t.flags||577;var n=rr.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(P(e)+1),i=M(e,o,0,o.length);rr.write(n,o,0,i,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");rr.write(n,e,0,e.byteLength,void 0,t.canOwn)}rr.close(n)},cwd:()=>rr.currentPath,chdir:r=>{var e=rr.lookupPath(r,{follow:!0});if(null===e.node)throw new rr.ErrnoError(44);if(!rr.isDir(e.node.mode))throw new rr.ErrnoError(54);var t=rr.nodePermissions(e.node,"x");if(t)throw new rr.ErrnoError(t);rr.currentPath=e.path},createDefaultDirectories:()=>{rr.mkdir("/tmp"),rr.mkdir("/home"),rr.mkdir("/home/web_user")},createDefaultDevices:()=>{rr.mkdir("/dev"),rr.registerDevice(rr.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n}),rr.mkdev("/dev/null",rr.makedev(1,3)),J.register(rr.makedev(5,0),J.default_tty_ops),J.register(rr.makedev(6,0),J.default_tty1_ops),rr.mkdev("/dev/tty",rr.makedev(5,0)),rr.mkdev("/dev/tty1",rr.makedev(6,0));var r=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return()=>(crypto.getRandomValues(r),r[0])}return()=>C("randomDevice")}();rr.createDevice("/dev","random",r),rr.createDevice("/dev","urandom",r),rr.mkdir("/dev/shm"),rr.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{rr.mkdir("/proc");var r=rr.mkdir("/proc/self");rr.mkdir("/proc/self/fd"),rr.mount({mount:()=>{var e=rr.createNode(r,"fd",16895,73);return e.node_ops={lookup:(r,e)=>{var t=+e,n=rr.getStream(t);if(!n)throw new rr.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams:()=>{o.stdin?rr.createDevice("/dev","stdin",o.stdin):rr.symlink("/dev/tty","/dev/stdin"),o.stdout?rr.createDevice("/dev","stdout",null,o.stdout):rr.symlink("/dev/tty","/dev/stdout"),o.stderr?rr.createDevice("/dev","stderr",null,o.stderr):rr.symlink("/dev/tty1","/dev/stderr"),rr.open("/dev/stdin",0),rr.open("/dev/stdout",1),rr.open("/dev/stderr",1)},ensureErrnoError:()=>{rr.ErrnoError||(rr.ErrnoError=function(r,e){this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},rr.ErrnoError.prototype=new Error,rr.ErrnoError.prototype.constructor=rr.ErrnoError,[44].forEach((r=>{rr.genericErrors[r]=new rr.ErrnoError(r),rr.genericErrors[r].stack="<generic error, no stack>"})))},staticInit:()=>{rr.ensureErrnoError(),rr.nameTable=new Array(4096),rr.mount(Z,{},"/"),rr.createDefaultDirectories(),rr.createDefaultDevices(),rr.createSpecialDirectories(),rr.filesystems={MEMFS:Z}},init:(r,e,t)=>{rr.init.initialized=!0,rr.ensureErrnoError(),o.stdin=r||o.stdin,o.stdout=e||o.stdout,o.stderr=t||o.stderr,rr.createStandardStreams()},quit:()=>{rr.init.initialized=!1;for(var r=0;r<rr.streams.length;r++){var e=rr.streams[r];e&&rr.close(e)}},getMode:(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},findObject:(r,e)=>{var t=rr.analyzePath(r,e);return t.exists?t.object:null},analyzePath:(r,e)=>{try{r=(n=rr.lookupPath(r,{follow:!e})).path}catch(r){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=rr.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=Y.basename(r),n=rr.lookupPath(r,{follow:!e}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(r){t.error=r.errno}return t},createPath:(r,e,t,n)=>{r="string"==typeof r?r:rr.getPath(r);for(var o=e.split("/").reverse();o.length;){var i=o.pop();if(i){var a=Y.join2(r,i);try{rr.mkdir(a)}catch(r){}r=a}}return a},createFile:(r,e,t,n,o)=>{var i=Y.join2("string"==typeof r?r:rr.getPath(r),e),a=rr.getMode(n,o);return rr.create(i,a)},createDataFile:(r,e,t,n,o,i)=>{var a=e;r&&(r="string"==typeof r?r:rr.getPath(r),a=e?Y.join2(r,e):r);var s=rr.getMode(n,o),u=rr.create(a,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),l=0,f=t.length;l<f;++l)c[l]=t.charCodeAt(l);t=c}rr.chmod(u,146|s);var d=rr.open(u,577);rr.write(d,t,0,t.length,0,i),rr.close(d),rr.chmod(u,s)}return u},createDevice:(r,e,t,n)=>{var o=Y.join2("string"==typeof r?r:rr.getPath(r),e),i=rr.getMode(!!t,!!n);rr.createDevice.major||(rr.createDevice.major=64);var a=rr.makedev(rr.createDevice.major++,0);return rr.registerDevice(a,{open:r=>{r.seekable=!1},close:r=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(r,e,n,o,i)=>{for(var a=0,s=0;s<o;s++){var u;try{u=t()}catch(r){throw new rr.ErrnoError(29)}if(void 0===u&&0===a)throw new rr.ErrnoError(6);if(null==u)break;a++,e[n+s]=u}return a&&(r.node.timestamp=Date.now()),a},write:(r,e,t,o,i)=>{for(var a=0;a<o;a++)try{n(e[t+a])}catch(r){throw new rr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),a}}),rr.mkdev(o,i,a)},forceLoadFile:r=>{if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!i)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=K(i(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new rr.ErrnoError(29)}},createLazyFile:(r,e,t,n,o)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(r){if(!(r>this.length-1||r<0)){var e=r%this.chunkSize,t=r/this.chunkSize|0;return this.getter(t)[e]}},i.prototype.setDataGetter=function(r){this.getter=r},i.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn\'t load "+t+". Status: "+r.status);var e,n=Number(r.getResponseHeader("Content-length")),o=(e=r.getResponseHeader("Accept-Ranges"))&&"bytes"===e,i=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;o||(a=n);var s=this;s.setDataGetter((r=>{var e=r*a,o=(r+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=((r,e)=>{if(r>e)throw new Error("invalid range ("+r+", "+e+") or no bytes requested!");if(e>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==a&&o.setRequestHeader("Range","bytes="+r+"-"+e),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn\'t load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):K(o.responseText||"",!0)})(e,o)),void 0===s.chunks[r])throw new Error("doXHR failed!");return s.chunks[r]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,d("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a={isDevice:!1,url:t},s=rr.createFile(r,e,a,n,o);a.contents?s.contents=a.contents:a.url&&(s.contents=null,s.url=a.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};function c(r,e,t,n,o){var i=r.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var s=0;s<a;s++)e[t+s]=i[o+s];else for(s=0;s<a;s++)e[t+s]=i.get(o+s);return a}return Object.keys(s.stream_ops).forEach((r=>{var e=s.stream_ops[r];u[r]=function(){return rr.forceLoadFile(s),e.apply(null,arguments)}})),u.read=(r,e,t,n,o)=>(rr.forceLoadFile(s),c(r,e,t,n,o)),u.mmap=(r,e,t,n,o)=>{rr.forceLoadFile(s);var i=Q(e);if(!i)throw new rr.ErrnoError(48);return c(r,_,i,e,t),{ptr:i,allocated:!0}},s.stream_ops=u,s},createPreloadedFile:(r,e,t,n,o,i,s,u,c,l)=>{var f=e?$.resolve(Y.join2(r,e)):r;function d(t){function a(t){l&&l(),u||rr.createDataFile(r,e,t,n,o,c),i&&i(),O()}Browser.handledByPreloadPlugin(t,f,a,(()=>{s&&s(),O()}))||a(t)}N(),"string"==typeof t?function(r,e,t,n){var o=n?"":"al "+r;a(r,(t=>{w(t,\'Loading data file "\'+r+\'" failed (no arrayBuffer).\'),e(new Uint8Array(t)),o&&O()}),(e=>{if(!t)throw\'Loading data file "\'+r+\'" failed.\';t()})),o&&N()}(t,(r=>d(r)),s):d(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=rr.indexedDB();try{var o=n.open(rr.DB_NAME(),rr.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=()=>{d("creating db"),o.result.createObjectStore(rr.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([rr.DB_STORE_NAME],"readwrite"),i=n.objectStore(rr.DB_STORE_NAME),a=0,s=0,u=r.length;function c(){0==s?e():t()}r.forEach((r=>{var e=i.put(rr.analyzePath(r).object.contents,r);e.onsuccess=()=>{++a+s==u&&c()},e.onerror=()=>{s++,a+s==u&&c()}})),n.onerror=t},o.onerror=t},loadFilesFromDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=rr.indexedDB();try{var o=n.open(rr.DB_NAME(),rr.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([rr.DB_STORE_NAME],"readonly")}catch(r){return void t(r)}var a=i.objectStore(rr.DB_STORE_NAME),s=0,u=0,c=r.length;function l(){0==u?e():t()}r.forEach((r=>{var e=a.get(r);e.onsuccess=()=>{rr.analyzePath(r).exists&&rr.unlink(r),rr.createDataFile(Y.dirname(r),Y.basename(r),e.result,!0,!0,!0),++s+u==c&&l()},e.onerror=()=>{u++,s+u==c&&l()}})),i.onerror=t},o.onerror=t}},er={DEFAULT_POLLMASK:5,calculateAt:function(r,e,t){if(Y.isAbs(e))return e;var n;-100===r?n=rr.cwd():n=er.getStreamFromFD(r).path;if(0==e.length){if(!t)throw new rr.ErrnoError(44);return n}return Y.join2(n,e)},doStat:function(r,e,t){try{var n=r(e)}catch(r){if(r&&r.node&&Y.normalize(e)!==Y.normalize(rr.getPath(r.node)))return-54;throw r}return b[t>>2]=n.dev,b[t+8>>2]=n.ino,b[t+12>>2]=n.mode,k[t+16>>2]=n.nlink,b[t+20>>2]=n.uid,b[t+24>>2]=n.gid,b[t+28>>2]=n.rdev,U=[n.size>>>0,(G=n.size,+Math.abs(G)>=1?G>0?(0|Math.min(+Math.floor(G/4294967296),4294967295))>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],b[t+40>>2]=U[0],b[t+44>>2]=U[1],b[t+48>>2]=4096,b[t+52>>2]=n.blocks,U=[Math.floor(n.atime.getTime()/1e3)>>>0,(G=Math.floor(n.atime.getTime()/1e3),+Math.abs(G)>=1?G>0?(0|Math.min(+Math.floor(G/4294967296),4294967295))>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],b[t+56>>2]=U[0],b[t+60>>2]=U[1],k[t+64>>2]=0,U=[Math.floor(n.mtime.getTime()/1e3)>>>0,(G=Math.floor(n.mtime.getTime()/1e3),+Math.abs(G)>=1?G>0?(0|Math.min(+Math.floor(G/4294967296),4294967295))>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],b[t+72>>2]=U[0],b[t+76>>2]=U[1],k[t+80>>2]=0,U=[Math.floor(n.ctime.getTime()/1e3)>>>0,(G=Math.floor(n.ctime.getTime()/1e3),+Math.abs(G)>=1?G>0?(0|Math.min(+Math.floor(G/4294967296),4294967295))>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],b[t+88>>2]=U[0],b[t+92>>2]=U[1],k[t+96>>2]=0,U=[n.ino>>>0,(G=n.ino,+Math.abs(G)>=1?G>0?(0|Math.min(+Math.floor(G/4294967296),4294967295))>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],b[t+104>>2]=U[0],b[t+108>>2]=U[1],0},doMsync:function(r,e,t,n,o){var i=g.slice(r,r+t);rr.msync(e,i,o,t,n)},varargs:void 0,get:function(){return er.varargs+=4,b[er.varargs-4>>2]},getStr:function(r){return F(r)},getStreamFromFD:function(r){var e=rr.getStream(r);if(!e)throw new rr.ErrnoError(8);return e}};var tr=[];function nr(r){try{return h.grow(r-y.byteLength+65535>>>16),x(h.buffer),1}catch(r){}}var or={};function ir(){if(!ir.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:u||"./this.program"};for(var e in or)void 0===or[e]?delete r[e]:r[e]=or[e];var t=[];for(var e in r)t.push(e+"="+r[e]);ir.strings=t}return ir.strings}function ar(r){m||(o.onExit&&o.onExit(r),v=!0),c(r,new W(r))}var sr=function(r,e){ar(r)};var ur=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=rr.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},cr=365,lr=146;Object.defineProperties(ur.prototype,{read:{get:function(){return(this.mode&cr)===cr},set:function(r){r?this.mode|=cr:this.mode&=-366}},write:{get:function(){return(this.mode&lr)===lr},set:function(r){r?this.mode|=lr:this.mode&=-147}},isFolder:{get:function(){return rr.isDir(this.mode)}},isDevice:{get:function(){return rr.isChrdev(this.mode)}}}),rr.FSNode=ur,rr.staticInit();var fr={k:function(r,e,t,n){try{if(e=er.getStr(e),e=er.calculateAt(r,e),-8&t)return-28;var o=rr.lookupPath(e,{follow:!0}).node;if(!o)return-44;var i="";return 4&t&&(i+="r"),2&t&&(i+="w"),1&t&&(i+="x"),i&&rr.nodePermissions(o,i)?-2:0}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return-r.errno}},f:function(r,e,t){er.varargs=t;try{var n=er.getStreamFromFD(r);switch(e){case 0:return(o=er.get())<0?-28:rr.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=er.get();return n.flags|=o,0;case 5:o=er.get();return E[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return i=28,b[gr()>>2]=i,-1}}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return-r.errno}var i},u:function(r,e){try{var t=er.getStreamFromFD(r);return er.doStat(rr.stat,t.path,e)}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return-r.errno}},v:function(r,e,t){er.varargs=t;try{var n=er.getStreamFromFD(r);switch(e){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=er.get();return b[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:o=er.get();return rr.ioctl(n,e,o);default:return-28}}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return-r.errno}},s:function(r,e,t,n){try{e=er.getStr(e);var o=256&n,i=4096&n;return n&=-4353,e=er.calculateAt(r,e,i),er.doStat(o?rr.lstat:rr.stat,e,t)}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return-r.errno}},c:function(r,e,t,n){er.varargs=n;try{e=er.getStr(e),e=er.calculateAt(r,e);var o=n?er.get():0;return rr.open(e,t,o).fd}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return-r.errno}},t:function(r,e){try{return r=er.getStr(r),er.doStat(rr.stat,r,e)}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return-r.errno}},n:function(r,e,t){try{return e=er.getStr(e),e=er.calculateAt(r,e),0===t?rr.unlink(e):512===t?rr.rmdir(e):C("Invalid flags passed to unlinkat"),0}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return-r.errno}},d:function(){return Date.now()},i:function(){return true},o:function(r,e,t,n,o,i){try{var a=er.getStreamFromFD(n),s=rr.mmap(a,r,o,e,t),u=s.ptr;return b[i>>2]=s.allocated,u}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return-r.errno}},p:function(r,e,t,n,o,i){try{var a=er.getStreamFromFD(o);2&t&&er.doMsync(r,a,e,n,i),rr.munmap(a)}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return-r.errno}},a:function(){C("")},w:function(r,e,t){var n=function(r,e){var t;for(tr.length=0,e>>=2;t=g[r++];)e+=105!=t&e,tr.push(105==t?b[e]:S[e++>>1]),++e;return tr}(e,t);return V[r].apply(null,n)},j:function(r,e,t){g.copyWithin(r,e,e+t)},m:function(r){var e,t,n=g.length,o=2147483648;if((r>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,r+100663296),nr(Math.min(o,(e=Math.max(r,a))+((t=65536)-e%t)%t)))return!0}return!1},q:function(r,e){var t=0;return ir().forEach((function(n,o){var i=e+t;k[r+4*o>>2]=i,function(r,e,t){for(var n=0;n<r.length;++n)_[e++>>0]=r.charCodeAt(n);t||(_[e>>0]=0)}(n,i),t+=n.length+1})),0},r:function(r,e){var t=ir();k[r>>2]=t.length;var n=0;return t.forEach((function(r){n+=r.length+1})),k[e>>2]=n,0},e:sr,b:function(r){try{var e=er.getStreamFromFD(r);return rr.close(e),0}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return r.errno}},g:function(r,e,t,n){try{var o=function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=k[e>>2],s=k[e+4>>2];e+=8;var u=rr.read(r,_,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o}(er.getStreamFromFD(r),e,t);return k[n>>2]=o,0}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return r.errno}},l:function(r,e,t,n,o){try{var i=(u=t)+2097152>>>0<4194305-!!(s=e)?(s>>>0)+4294967296*u:NaN;if(isNaN(i))return 61;var a=er.getStreamFromFD(r);return rr.llseek(a,i,n),U=[a.position>>>0,(G=a.position,+Math.abs(G)>=1?G>0?(0|Math.min(+Math.floor(G/4294967296),4294967295))>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],b[o>>2]=U[0],b[o+4>>2]=U[1],a.getdents&&0===i&&0===n&&(a.getdents=null),0}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return r.errno}var s,u},h:function(r,e,t,n){try{var o=function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=k[e>>2],s=k[e+4>>2];e+=8;var u=rr.write(r,_,a,s,n);if(u<0)return-1;o+=u}return o}(er.getStreamFromFD(r),e,t);return k[n>>2]=o,0}catch(r){if(void 0===rr||!(r instanceof rr.ErrnoError))throw r;return r.errno}}};!function(){var r={a:fr};function e(r,e){var t,n=r.exports;o.asm=n,x((h=o.asm.x).buffer),o.asm.G,t=o.asm.y,z.unshift(t),O()}function t(r){e(r.instance)}function i(e){return(f||"function"!=typeof fetch?Promise.resolve().then((function(){return q(L)})):fetch(L,{credentials:"same-origin"}).then((function(r){if(!r.ok)throw"failed to load wasm binary file at \'"+L+"\'";return r.arrayBuffer()})).catch((function(){return q(L)}))).then((function(e){return WebAssembly.instantiate(e,r)})).then((function(r){return r})).then(e,(function(r){p("failed to asynchronously prepare wasm: "+r),C(r)}))}if(N(),o.instantiateWasm)try{return o.instantiateWasm(r,e)}catch(r){return p("Module.instantiateWasm callback failed with error: "+r),!1}(f||"function"!=typeof WebAssembly.instantiateStreaming||H(L)||"function"!=typeof fetch?i(t):fetch(L,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,r).then(t,(function(r){return p("wasm streaming compile failed: "+r),p("falling back to ArrayBuffer instantiation"),i(t)}))}))).catch(n)}(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.y).apply(null,arguments)};var dr=o._emscripten_bind_VoidPtr___destroy___0=function(){return(dr=o._emscripten_bind_VoidPtr___destroy___0=o.asm.z).apply(null,arguments)},pr=o._emscripten_bind_Graphviz_Graphviz_2=function(){return(pr=o._emscripten_bind_Graphviz_Graphviz_2=o.asm.A).apply(null,arguments)},hr=o._emscripten_bind_Graphviz_version_0=function(){return(hr=o._emscripten_bind_Graphviz_version_0=o.asm.B).apply(null,arguments)},mr=o._emscripten_bind_Graphviz_lastError_0=function(){return(mr=o._emscripten_bind_Graphviz_lastError_0=o.asm.C).apply(null,arguments)},vr=o._emscripten_bind_Graphviz_layout_3=function(){return(vr=o._emscripten_bind_Graphviz_layout_3=o.asm.D).apply(null,arguments)},wr=o._emscripten_bind_Graphviz_createFile_2=function(){return(wr=o._emscripten_bind_Graphviz_createFile_2=o.asm.E).apply(null,arguments)},yr=o._emscripten_bind_Graphviz___destroy___0=function(){return(yr=o._emscripten_bind_Graphviz___destroy___0=o.asm.F).apply(null,arguments)};o._free=function(){return(o._free=o.asm.H).apply(null,arguments)},o._malloc=function(){return(o._malloc=o.asm.I).apply(null,arguments)};var _r,gr=o.___errno_location=function(){return(gr=o.___errno_location=o.asm.J).apply(null,arguments)},Er=o._emscripten_builtin_memalign=function(){return(Er=o._emscripten_builtin_memalign=o.asm.K).apply(null,arguments)};function br(r){function e(){_r||(_r=!0,o.calledRun=!0,v||(o.noFSInit||rr.init.initialized||rr.init(),rr.ignorePermissions=!1,X(z),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)r=o.postRun.shift(),T.unshift(r);var r;X(T)}()))}R>0||(!function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)r=o.preRun.shift(),j.unshift(r);var r;X(j)}(),R>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e()))}if(o.___start_em_js=163408,o.___stop_em_js=163506,B=function r(){_r||br(),_r||(B=r)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function kr(){}function Sr(r){return(r||kr).__cache__}function Dr(r,e){var t=Sr(e),n=t[r];return n||((n=Object.create((e||kr).prototype)).ptr=r,t[r]=n)}br(),kr.prototype=Object.create(kr.prototype),kr.prototype.constructor=kr,kr.prototype.__class__=kr,kr.__cache__={},o.WrapperObject=kr,o.getCache=Sr,o.wrapPointer=Dr,o.castObject=function(r,e){return Dr(r.ptr,e)},o.NULL=Dr(0),o.destroy=function(r){if(!r.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";r.__destroy__(),delete Sr(r.__class__)[r.ptr]},o.compare=function(r,e){return r.ptr===e.ptr},o.getPointer=function(r){return r.ptr},o.getClass=function(r){return r.__class__};var Ar={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(Ar.needed){for(var r=0;r<Ar.temps.length;r++)o._free(Ar.temps[r]);Ar.temps.length=0,o._free(Ar.buffer),Ar.buffer=0,Ar.size+=Ar.needed,Ar.needed=0}Ar.buffer||(Ar.size+=128,Ar.buffer=o._malloc(Ar.size),w(Ar.buffer)),Ar.pos=0},alloc:function(r,e){w(Ar.buffer);var t,n=e.BYTES_PER_ELEMENT,i=r.length*n;return i=i+7&-8,Ar.pos+i>=Ar.size?(w(i>0),Ar.needed+=i,t=o._malloc(i),Ar.temps.push(t)):(t=Ar.buffer+Ar.pos,Ar.pos+=i),t},copy:function(r,e,t){switch(t>>>=0,e.BYTES_PER_ELEMENT){case 2:t>>>=1;break;case 4:t>>>=2;break;case 8:t>>>=3}for(var n=0;n<r.length;n++)e[t+n]=r[n]}};function Fr(r){if("string"==typeof r){var e=K(r),t=Ar.alloc(e,_);return Ar.copy(e,_,t),t}return r}function Mr(){throw"cannot construct a VoidPtr, no constructor in IDL"}function Pr(r,e){r&&"object"==typeof r&&(r=r.ptr),e&&"object"==typeof e&&(e=e.ptr),this.ptr=pr(r,e),Sr(Pr)[this.ptr]=this}return Mr.prototype=Object.create(kr.prototype),Mr.prototype.constructor=Mr,Mr.prototype.__class__=Mr,Mr.__cache__={},o.VoidPtr=Mr,Mr.prototype.__destroy__=Mr.prototype.__destroy__=function(){var r=this.ptr;dr(r)},Pr.prototype=Object.create(kr.prototype),Pr.prototype.constructor=Pr,Pr.prototype.__class__=Pr,Pr.__cache__={},o.Graphviz=Pr,Pr.prototype.version=Pr.prototype.version=function(){var r=this.ptr;return F(hr(r))},Pr.prototype.lastError=Pr.prototype.lastError=function(){var r=this.ptr;return F(mr(r))},Pr.prototype.layout=Pr.prototype.layout=function(r,e,t){var n=this.ptr;return Ar.prepare(),r=r&&"object"==typeof r?r.ptr:Fr(r),e=e&&"object"==typeof e?e.ptr:Fr(e),t=t&&"object"==typeof t?t.ptr:Fr(t),F(vr(n,r,e,t))},Pr.prototype.createFile=Pr.prototype.createFile=function(r,e){var t=this.ptr;Ar.prepare(),r=r&&"object"==typeof r?r.ptr:Fr(r),e=e&&"object"==typeof e?e.ptr:Fr(e),wr(t,r,e)},Pr.prototype.__destroy__=Pr.prototype.__destroy__=function(){var r=this.ptr;yr(r)},e.ready}})(),s=Object.freeze({__proto__:null,default:a});function u(r){return{path:r.path,data:`<?xml version="1.0" encoding="UTF-8" standalone="no"?>\\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\\n<svg width="${r.width}" height="${r.height}"></svg>`}}const c={layout:(r,e="svg",t="dot",n)=>r?i(s,"graphvizlib",null==n?void 0:n.wasmFolder,null==n?void 0:n.wasmBinary).then((o=>{const i=new o.Graphviz((null==n?void 0:n.yInvert)?1:0,(null==n?void 0:n.nop)?null==n?void 0:n.nop:0);!function(r,e){const t={images:[],files:[],...e};var n;[...t.files,...(n=t.images,n.map(u))].forEach((e=>r.createFile(e.path,e.data)))}(i,n);const a=i.layout(r,e,t);if(o.destroy(i),!a)throw new Error(o.Graphviz.prototype.lastError());return a})):Promise.resolve(""),circo(r,e="svg",t){return this.layout(r,e,"circo",t)},dot(r,e="svg",t){return this.layout(r,e,"dot",t)},fdp(r,e="svg",t){return this.layout(r,e,"fdp",t)},sfdp(r,e="svg",t){return this.layout(r,e,"sfdp",t)},neato(r,e="svg",t){return this.layout(r,e,"neato",t)},osage(r,e="svg",t){return this.layout(r,e,"osage",t)},patchwork(r,e="svg",t){return this.layout(r,e,"patchwork",t)},twopi(r,e="svg",t){return this.layout(r,e,"twopi",t)}};var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var f={exports:{}};\n/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.8+1e68dce6\n */function d(r){return void 0!==r.children}f.exports=function(){function r(r){var e=typeof r;return null!==r&&("object"===e||"function"===e)}function e(r){return"function"==typeof r}var t=Array.isArray?Array.isArray:function(r){return"[object Array]"===Object.prototype.toString.call(r)},n=0,o=void 0,i=void 0,a=function(r,e){g[n]=r,g[n+1]=e,2===(n+=2)&&(i?i(E):k())};function s(r){i=r}function u(r){a=r}var c="undefined"!=typeof window?window:void 0,f=c||{},d=f.MutationObserver||f.WebKitMutationObserver,p="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function m(){return function(){return process.nextTick(E)}}function v(){return void 0!==o?function(){o(E)}:_()}function w(){var r=0,e=new d(E),t=document.createTextNode("");return e.observe(t,{characterData:!0}),function(){t.data=r=++r%2}}function y(){var r=new MessageChannel;return r.port1.onmessage=E,function(){return r.port2.postMessage(0)}}function _(){var r=setTimeout;return function(){return r(E,1)}}var g=new Array(1e3);function E(){for(var r=0;r<n;r+=2)(0,g[r])(g[r+1]),g[r]=void 0,g[r+1]=void 0;n=0}function b(){try{var r=Function("return this")().require("vertx");return o=r.runOnLoop||r.runOnContext,v()}catch(r){return _()}}var k=void 0;function S(r,e){var t=this,n=new this.constructor(F);void 0===n[A]&&X(n);var o=t._state;if(o){var i=arguments[o-1];a((function(){return H(o,n,i,t._result)}))}else G(t,n,r,e);return n}function D(r){var e=this;if(r&&"object"==typeof r&&r.constructor===e)return r;var t=new e(F);return O(t,r),t}k=p?m():d?w():h?y():void 0===c?b():_();var A=Math.random().toString(36).substring(2);function F(){}var M=void 0,P=1,x=2;function j(){return new TypeError("You cannot resolve a promise with itself")}function z(){return new TypeError("A promises callback cannot return that same promise.")}function T(r,e,t,n){try{r.call(e,t,n)}catch(r){return r}}function R(r,e,t){a((function(r){var n=!1,o=T(t,e,(function(t){n||(n=!0,e!==t?O(r,t):L(r,t))}),(function(e){n||(n=!0,I(r,e))}),"Settle: "+(r._label||" unknown promise"));!n&&o&&(n=!0,I(r,o))}),r)}function B(r,e){e._state===P?L(r,e._result):e._state===x?I(r,e._result):G(e,void 0,(function(e){return O(r,e)}),(function(e){return I(r,e)}))}function N(r,t,n){t.constructor===r.constructor&&n===S&&t.constructor.resolve===D?B(r,t):void 0===n?L(r,t):e(n)?R(r,t,n):L(r,t)}function O(e,t){if(e===t)I(e,j());else if(r(t)){var n=void 0;try{n=t.then}catch(r){return void I(e,r)}N(e,t,n)}else L(e,t)}function C(r){r._onerror&&r._onerror(r._result),U(r)}function L(r,e){r._state===M&&(r._result=e,r._state=P,0!==r._subscribers.length&&a(U,r))}function I(r,e){r._state===M&&(r._state=x,r._result=e,a(C,r))}function G(r,e,t,n){var o=r._subscribers,i=o.length;r._onerror=null,o[i]=e,o[i+P]=t,o[i+x]=n,0===i&&r._state&&a(U,r)}function U(r){var e=r._subscribers,t=r._state;if(0!==e.length){for(var n=void 0,o=void 0,i=r._result,a=0;a<e.length;a+=3)n=e[a],o=e[a+t],n?H(t,n,o,i):o(i);r._subscribers.length=0}}function H(r,t,n,o){var i=e(n),a=void 0,s=void 0,u=!0;if(i){try{a=n(o)}catch(r){u=!1,s=r}if(t===a)return void I(t,z())}else a=o;t._state!==M||(i&&u?O(t,a):!1===u?I(t,s):r===P?L(t,a):r===x&&I(t,a))}function q(r,e){try{e((function(e){O(r,e)}),(function(e){I(r,e)}))}catch(e){I(r,e)}}var V=0;function W(){return V++}function X(r){r[A]=V++,r._state=void 0,r._result=void 0,r._subscribers=[]}function Y(){return new Error("Array Methods must be provided an Array")}var $=function(){function r(r,e){this._instanceConstructor=r,this.promise=new r(F),this.promise[A]||X(this.promise),t(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?L(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&L(this.promise,this._result))):I(this.promise,Y())}return r.prototype._enumerate=function(r){for(var e=0;this._state===M&&e<r.length;e++)this._eachEntry(r[e],e)},r.prototype._eachEntry=function(r,e){var t=this._instanceConstructor,n=t.resolve;if(n===D){var o=void 0,i=void 0,a=!1;try{o=r.then}catch(r){a=!0,i=r}if(o===S&&r._state!==M)this._settledAt(r._state,e,r._result);else if("function"!=typeof o)this._remaining--,this._result[e]=r;else if(t===er){var s=new t(F);a?I(s,i):N(s,r,o),this._willSettleAt(s,e)}else this._willSettleAt(new t((function(e){return e(r)})),e)}else this._willSettleAt(n(r),e)},r.prototype._settledAt=function(r,e,t){var n=this.promise;n._state===M&&(this._remaining--,r===x?I(n,t):this._result[e]=t),0===this._remaining&&L(n,this._result)},r.prototype._willSettleAt=function(r,e){var t=this;G(r,void 0,(function(r){return t._settledAt(P,e,r)}),(function(r){return t._settledAt(x,e,r)}))},r}();function K(r){return new $(this,r).promise}function J(r){var e=this;return t(r)?new e((function(t,n){for(var o=r.length,i=0;i<o;i++)e.resolve(r[i]).then(t,n)})):new e((function(r,e){return e(new TypeError("You must pass an array to race."))}))}function Q(r){var e=new this(F);return I(e,r),e}function Z(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function rr(){throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.")}var er=function(){function r(e){this[A]=W(),this._result=this._state=void 0,this._subscribers=[],F!==e&&("function"!=typeof e&&Z(),this instanceof r?q(this,e):rr())}return r.prototype.catch=function(r){return this.then(null,r)},r.prototype.finally=function(r){var t=this,n=t.constructor;return e(r)?t.then((function(e){return n.resolve(r()).then((function(){return e}))}),(function(e){return n.resolve(r()).then((function(){throw e}))})):t.then(r,r)},r}();function tr(){var r=void 0;if(void 0!==l)r=l;else if("undefined"!=typeof self)r=self;else try{r=Function("return this")()}catch(r){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=r.Promise;if(e){var t=null;try{t=Object.prototype.toString.call(e.resolve())}catch(r){}if("[object Promise]"===t&&!e.cast)return}r.Promise=er}return er.prototype.then=S,er.all=K,er.race=J,er.resolve=D,er.reject=Q,er._setScheduler=s,er._setAsap=u,er._asap=a,er.polyfill=tr,er.Promise=er,er}(),f.exports.polyfill();var p=function(r){var e=[];return r.children.forEach((function(r){d(r)?e.push(p(r)):e.push(h(r))})),"subgraph cluster_".concat(r.id,\' {\\nid="\').concat(r.id,\'";\\nlabel="\').concat(r.text,\'";\\nmargin=16;\\n\').concat(e.join("\\n"),"\\n}")},h=function(r){return"".concat(r.id,\' [id="\').concat(r.id,\'" label="\').concat(r.text,\'" width=\').concat(w(r.width)," height=").concat(w(r.height),"]")},m=function(r){return 96*r/72},v=function(r){return 96*r},w=function(r){return r/96};function y(r){var e=r?r.split(",").map((function(r){return m(+r)})):[0,0,0,0],t=e[0],n=e[1],o=e[2]-t,i=e[3]-n;return{x:t-o/2,y:n-i/2,width:o,height:i}}function _(r,e){var t=r.split(",").map((function(r){return m(+r)})),n=t[0],o=t[1];return{x:-n+e.width,y:-o+e.height}}function g(r,e,t,n){return c[r]&&c[r](e,t,{wasmFolder:n.wasmFolder}).then((function(r){return"json"===t?JSON.parse(r):r}))}function E(e,t){if(e.raw)return g(t.engine,e.raw,"svg",t);var n={},o=[],i=[],a={},s=[],u=[],c={},l=[],f=[];function m(r,e){d(r)?(n[r.id]=r,o.push(r),r.children.forEach((function(r){return m(r,!1)})),e&&i.push(p(r))):(a[r.id]=r,s.push(r),e&&u.push(h(r)))}return e.items.forEach((function(r){return m(r,!0)})),e.links.forEach((function(r){var e,t,n,o;c[r.id]=r,l.push(r),f.push((e=r.source.id,t=r.target.id,n=r.id,o=r.text,"".concat(e," -> ").concat(t,\' [id="\').concat(n,\'", label="\').concat(o,\'"]\')))})),g(t.engine,"digraph G {\\n graph [fontname=Verdana,fontsize=11.0];\\n graph [rankdir=TB];\\n node [shape=rect,fontname=Verdana,fontsize=11.0,fixedsize=true];\\n edge [fontname=Verdana,fontsize=11.0];\\n\\n".concat(i.join("\\n"),"\\n\\n").concat(f.join("\\n"),"\\n\\n").concat(u.join("\\n"),"\\n}"),"json",t).then((function(e){var t=y(e.bb);return e.objects&&e.objects.forEach((function(r){if(r.nodes){var e=function(r,e){var t=y(r);return{x:-t.x+e.width,y:-t.y+e.height,width:t.width,height:t.height}}(r.bb,t),o=n[r.id];o.x=e.x-t.width/2,o.y=e.y-t.height/2,o.width=e.width,o.height=e.height}else{var i=(u=r.pos,c=r.width,l=r.height,f=_(u,t),d=v(+c),p=v(+l),{x:f.x,y:f.y,width:d,height:p}),s=a[r.id];s&&(s.x=i.x-t.width/2,s.y=i.y-t.height/2)}var u,c,l,f,d,p})),e.edges&&e.edges.forEach((function(e){var n=c[e.id];n&&(n.points=function(e,t){if(e.pos){var n=e.pos.substr(2).split(" ").map((function(r){return _(r,t)})).map((function(r){return[r.x-t.width/2,r.y-t.height/2]})),o=n.shift();return r(r([],n,!0),[o],!1)}return[]}(e,t))})),{clusters:o,nodes:s,links:l}}))}self.onmessage=function(r){E.apply(void 0,r.data).then((function(r){self.postMessage(r)}))}}();'],{type:"application/javascript"}),n=URL.createObjectURL(r),o=new Worker(n);return{terminate:function(){return o.terminate()},response:new Promise((function(r){o.onmessage=function(e){r(e.data),o.terminate(),URL.revokeObjectURL(n)},o.postMessage([e,t])}))}}var sm=E().x((function(e){return e[0]})).y((function(e){return e[1]})).curve(I),um=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o._engine=r,o._wasmFolder=n,o}return s(t,e),t.prototype.start=function(){var t=this;e.prototype.start.call(this);var r=this._graph.size(),n=this._graph.graphData(),o={};return am({items:n.hierarchy((function(e,t,r){switch(e){case"subgraph":return{id:t.id,text:t.props.text,children:r};case"vertex":delete t.fx,delete t.fy;var n=t.element.node().getBBox(),i={id:t.id,text:t.props.text,width:n.width,height:n.height};return o[i.id]=i,i}})),links:n.allEdges().map((function(e){return{id:String(e.props.id),source:o[e.source.id],target:o[e.target.id],text:e.props.label||""}})),raw:""},{engine:this._engine,wasmFolder:this._wasmFolder}).response.then((function(e){return t.running()&&(e.clusters.forEach((function(e){var t=n.subgraph(e.id);t.x=e.x+r.width/2-e.width,t.y=e.y+r.height/2-e.height,t.props.width=e.width,t.props.height=e.height})),e.nodes.forEach((function(e){var t=n.vertex(e.id);t.x=e.x+r.width/2,t.y=e.y+r.height/2})),e.links.forEach((function(e){var t=n.edge(e.id);t.points=l(l([[t.source.x,t.source.y]],void 0!==e.points?e.points.map((function(e){return[e[0]+r.width/2,e[1]+r.height/2]})):[],!0),[[t.target.x,t.target.y]],!1)})),t._graph.moveSubgraphs(!0).moveVertices(!0).moveEdges(!0),t.stop()),t}))},t.prototype.edgePath=function(t,r){var n=this,o=[],i=!1;return t.points&&(o=t.points.map((function(e){var t=n._graph.project(e[0],!1),r=n._graph.project(e[1],!1);return(isNaN(t)||isNaN(r))&&(i=!0),[t,r]}))),i||o.length<2?e.prototype.edgePath.call(this,t,r):{path:sm(o),labelPos:this.center(o)}},t}($_),cm=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){return t.stop(),t}))},t}($_);function hm(e){return void 0!==e.id&&void 0!==e.props&&void 0!==e.source&&void 0!==e.target}function lm(e,t){return e.parent===t.parent?1:2}function fm(e,t){return e+t.x}function dm(e,t){return Math.max(e,t.y)}function pm(){var e=lm,t=1,r=1,n=!1;function o(o){var i,a=0;o.eachAfter((function(t){var r=t.children;r?(t.x=function(e){return e.reduce(fm,0)/e.length}(r),t.y=function(e){return 1+e.reduce(dm,0)}(r)):(t.x=i?a+=e(t,i):0,t.y=0,i=t)}));var s=function(e){for(var t;t=e.children;)e=t[0];return e}(o),u=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(o),c=s.x-e(s,u)/2,h=u.x+e(u,s)/2;return o.eachAfter(n?function(e){e.x=(e.x-o.x)*t,e.y=(o.y-e.y)*r}:function(e){e.x=(e.x-c)/(h-c)*t,e.y=(1-(o.y?e.y/o.y:1))*r})}return o.separation=function(t){return arguments.length?(e=t,o):e},o.size=function(e){return arguments.length?(n=!1,t=+e[0],r=+e[1],o):n?null:[t,r]},o.nodeSize=function(e){return arguments.length?(n=!0,t=+e[0],r=+e[1],o):n?[t,r]:null},o}function gm(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;--n>=0;)t+=r[n].value;else t=1;e.value=t}function vm(e,t){var r,n,o,i,a,s=new bm(e),u=+e.value&&(s.value=e.value),c=[s];for(null==t&&(t=ym);r=c.pop();)if(u&&(r.value=+r.data.value),(o=t(r.data))&&(a=o.length))for(r.children=new Array(a),i=a-1;i>=0;--i)c.push(n=r.children[i]=new bm(o[i])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(mm)}function ym(e){return e.children}function _m(e){e.data=e.data.data}function mm(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function bm(e){this.data=e,this.depth=this.height=0,this.parent=null}function xm(e,t){return e.parent===t.parent?1:2}function wm(e){var t=e.children;return t?t[0]:e.t}function Em(e){var t=e.children;return t?t[t.length-1]:e.t}function km(e,t,r){var n=r/(t.i-e.i);t.c-=n,t.s+=r,e.c+=n,t.z+=r,t.m+=r}function Sm(e,t,r){return e.a.parent===t.parent?e.a:r}function Dm(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function jm(){var e=xm,t=1,r=1,n=null;function o(o){var u=function(e){for(var t,r,n,o,i,a=new Dm(e,0),s=[a];t=s.pop();)if(n=t._.children)for(t.children=new Array(i=n.length),o=i-1;o>=0;--o)s.push(r=t.children[o]=new Dm(n[o],o)),r.parent=t;return(a.parent=new Dm(null,0)).children=[a],a}(o);if(u.eachAfter(i),u.parent.m=-u.z,u.eachBefore(a),n)o.eachBefore(s);else{var c=o,h=o,l=o;o.eachBefore((function(e){e.x<c.x&&(c=e),e.x>h.x&&(h=e),e.depth>l.depth&&(l=e)}));var f=c===h?1:e(c,h)/2,d=f-c.x,p=t/(h.x+f+d),g=r/(l.depth||1);o.eachBefore((function(e){e.x=(e.x+d)*p,e.y=e.depth*g}))}return o}function i(t){var r=t.children,n=t.parent.children,o=t.i?n[t.i-1]:null;if(r){!function(e){for(var t,r=0,n=0,o=e.children,i=o.length;--i>=0;)(t=o[i]).z+=r,t.m+=r,r+=t.s+(n+=t.c)}(t);var i=(r[0].z+r[r.length-1].z)/2;o?(t.z=o.z+e(t._,o._),t.m=t.z-i):t.z=i}else o&&(t.z=o.z+e(t._,o._));t.parent.A=function(t,r,n){if(r){for(var o,i=t,a=t,s=r,u=i.parent.children[0],c=i.m,h=a.m,l=s.m,f=u.m;s=Em(s),i=wm(i),s&&i;)u=wm(u),(a=Em(a)).a=t,(o=s.z+l-i.z-c+e(s._,i._))>0&&(km(Sm(s,t,n),t,o),c+=o,h+=o),l+=s.m,c+=i.m,f+=u.m,h+=a.m;s&&!Em(a)&&(a.t=s,a.m+=l-h),i&&!wm(u)&&(u.t=i,u.m+=c-f,n=t)}return n}(t,o,t.parent.A||n[0])}function a(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=t,e.y=e.depth*r}return o.separation=function(t){return arguments.length?(e=t,o):e},o.size=function(e){return arguments.length?(n=!1,t=+e[0],r=+e[1],o):n?null:[t,r]},o.nodeSize=function(e){return arguments.length?(n=!0,t=+e[0],r=+e[1],o):n?[t,r]:null},o}!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=t._graph.size(),r=t._graph.graphData();return r.allEdges().forEach((function(e){return delete e.points})),r.allVertices().forEach((function(t){delete t.fx,delete t.fy,t.x=e.width/2+5*Math.random()-2.5,t.y=e.height/2+5*Math.random()-2.5})),t._graph.moveVertices(!0).moveEdges(!0),t.stop(),t}))}}($_),bm.prototype=vm.prototype={constructor:bm,count:function(){return this.eachAfter(gm)},each:function(e){var t,r,n,o,i=this,a=[i];do{for(t=a.reverse(),a=[];i=t.pop();)if(e(i),r=i.children)for(n=0,o=r.length;n<o;++n)a.push(r[n])}while(a.length);return this},eachAfter:function(e){for(var t,r,n,o=this,i=[o],a=[];o=i.pop();)if(a.push(o),t=o.children)for(r=0,n=t.length;r<n;++r)i.push(t[r]);for(;o=a.pop();)e(o);return this},eachBefore:function(e){for(var t,r,n=this,o=[n];n=o.pop();)if(e(n),t=n.children)for(r=t.length-1;r>=0;--r)o.push(t[r]);return this},sum:function(e){return this.eachAfter((function(t){for(var r=+e(t.data)||0,n=t.children,o=n&&n.length;--o>=0;)r+=n[o].value;t.value=r}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),o=null;e=r.pop(),t=n.pop();for(;e===t;)o=e,e=r.pop(),t=n.pop();return o}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var o=n.length;e!==r;)n.splice(o,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(r){r!==e&&t.push({source:r.parent,target:r})})),t},copy:function(){return vm(this).eachBefore(_m)}},Dm.prototype=Object.create(bm.prototype);var Cm,Am,Om,Im=C().x((function(e){return e.x})).y((function(e){return e.y})),Pm=function(){function e(e,t,r,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=e),void 0===n&&(n=t),this.x1=e,this.y1=t,this.x2=r,this.y2=n}return Object.defineProperty(e.prototype,"x",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.x2-this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.y2-this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"center",{get:function(){return{x:this.x1+this.width/2,y:this.y1+this.height/2}},enumerable:!1,configurable:!0}),e.prototype.reset=function(e,t){this.x1=e,this.x2=e,this.y1=t,this.y2=t},e.prototype.expand=function(e,t){this.x1>e?this.x1=e:this.x2<e&&(this.x2=e),this.y1>t?this.y1=t:this.y2<t&&(this.y2=t)},e}(),Fm=function(e){function t(t,r){var n=e.call(this,t)||this;return n.options=r,n._visited={},n}return s(t,e),t.prototype.sortTree=function(e,t){var r=this;t||(t=this._tree),t.children.sort((function(t,r){return e.neighbors(r.origData.id).length-e.neighbors(t.origData.id).length}));var n=[];t.children.forEach((function(e,t){t%2==0?n.push(e):n.unshift(e)})),t.children=n,t.children.forEach((function(t){return r.sortTree(e,t)}))},t.prototype.depthFirst=function(e,t,r){var n=this;if(void 0===r&&(this._visited={},this._tree=void 0),!this._visited[t.id]){this._visited[t.id]=t;var o={origData:t,children:[]};void 0===r?this._tree=o:r.children.push(o),e.neighbors(t.id).forEach((function(t){return n.depthFirst(e,t,o)}))}},t.prototype.breadthFirst=function(e,t){var r=this;this._visited={},this._visited[t.id]=t,this._tree={origData:t,children:[]};var n=[];n.push(this._tree);for(var o=function(){var t=n.shift();e.neighbors(t.origData.id).forEach((function(e){if(!r._visited[e.id]){r._visited[e.id]=e;var o={origData:e,children:[]};t.children.push(o),n.push(o)}}))};n.length;)o();this.sortTree(e)},t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){for(var e,r=t._graph.graphData(),n=0,o=r.allVertices();n<o.length;n++){var i=o[n];if(delete i.fx,delete i.fy,void 0===e&&(e=i),i.props.centroid){e=i;break}}return r.allEdges().forEach((function(e){return delete e.points})),t.breadthFirst(r,e),t._d3Hierarchy=vm(t._tree),t}))},t.prototype.finalize=function(e){var t=this._graph.size(),r=new Pm;e.forEach((function(e,t){0===t?r.reset(e.origData.x,e.origData.y):r.expand(e.origData.x,e.origData.y)}));var n=t.width/2-r.center.x,o=t.height/2-r.center.y;e.forEach((function(e){e.origData.x+=n,e.origData.y+=o})),this._graph.moveVertices(!0).moveEdges(!0),this.stop()},t}($_),Mm=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.options=r,n}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=jm().nodeSize(["TB"===t.options.rankdir?200:100,"TB"===t.options.rankdir?100:200])(t._d3Hierarchy).descendants().map((function(e){return e.data.origData.x="TB"===t.options.rankdir?e.x:e.y,e.data.origData.y="TB"===t.options.rankdir?e.y:e.x,e.data}));return t.finalize(e),t}))},t.prototype.edgePath=function(e,t){var r=this._graph.projectPlacholder(e.source),n=this._graph.projectPlacholder(e.target);return{path:Im({source:r,target:n}),labelPos:this.center([[r.x,r.y],[n.x,n.y]])}},t}(Fm),Tm=function(e){function t(t){return e.call(this,t,{})||this}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=jm().size([2*Math.PI,512]).separation((function(e,t){return(e.parent==t.parent?1:2)/e.depth}))(t._d3Hierarchy).descendants().map((function(e){return e.data.origData.angle=e.x,e.data.origData.radius=e.y,e.data.origData.x=Math.sin(e.x)*e.y,e.data.origData.y=Math.cos(e.x)*e.y,e.data}));return t.finalize(e),t}))},t}(Fm),Nm=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.options=r,n}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=pm().nodeSize(["TB"===t.options.rankdir?200:100,"TB"===t.options.rankdir?100:200])(t._d3Hierarchy).descendants().map((function(e){return e.data.origData.x="TB"===t.options.rankdir?e.x:e.y,e.data.origData.y="TB"===t.options.rankdir?e.y:e.x,e.data}));return t.finalize(e),t}))},t.prototype.edgePath=function(e,t){var r=this._graph.projectPlacholder(e.source),n=this._graph.projectPlacholder(e.target);return{path:Im({source:r,target:n}),labelPos:this.center([[r.x,r.y],[n.x,n.y]])}},t}(Fm),Lm=function(e){function t(t){return e.call(this,t,{})||this}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=pm().size([2*Math.PI,512]).separation((function(e,t){return(e.parent==t.parent?1:2)/e.depth}))(t._d3Hierarchy).descendants().map((function(e){return e.data.origData.x=Math.sin(e.x)*e.y,e.data.origData.y=Math.cos(e.x)*e.y,e.data}));return t.finalize(e),t}))},t}(Fm);L(".graph_Graph2 .allowDragging .graphVertex,.graph_Graph2 .graphVertex{cursor:pointer}.graph_Graph2 .allowDragging .graphVertex.grabbed{cursor:grabbing}.graph_Graph2 .graphEdge{stroke:#a9a9a9;fill:none}.graph_Graph2 .graphEdge>text{stroke:none;fill:#000}.graph_Graph2 .graphEdge.hide-text>text{display:none}.graph_Graph2 g.selected circle,.graph_Graph2 g.selected rect{stroke:red!important}");var Bm=null!==(Om=null===(Am=null===(Cm=null===globalThis||void 0===globalThis?void 0:globalThis.document)||void 0===Cm?void 0:Cm.currentScript)||void 0===Am?void 0:Am.src)&&void 0!==Om?Om:"./dummy.js";Bm=Bm.substring(0,Bm.replace(/[?#].*/,"").lastIndexOf("/")+1);function Rm(e){e.fx=e.sx=e.x,e.fy=e.sy=e.y}function Vm(e,t){e.fx=e.sx+t.fx-t.sx,e.fy=e.sy+t.fy-t.sy}function zm(e){e.x=e.fx,e.y=e.fy,e.fx=e.sx=void 0,e.fy=e.sy=void 0}var Gm=function(e){function n(n,o,a){var s=e.call(this)||this;s._toggleHierarchy=(new t.ToggleButton).faChar("fa-sitemap").tooltip("Hierarchy").on("click",(function(){return s.layoutClick("Hierarchy")})),s._toggleForceDirected=(new t.ToggleButton).faChar("fa-expand").tooltip("Force Directed").on("click",(function(){return s.layoutClick("ForceDirected")})),s._toggleForceDirected2=(new t.ToggleButton).faChar("fa-arrows").tooltip("Spring").on("click",(function(){return s.layoutClick("ForceDirected2")})),s._toggleCircle=(new t.ToggleButton).faChar("fa-circle-o").tooltip("Circle").on("click",(function(){return s.layoutClick("Circle")})),s._toggleDot=(new t.ToggleButton).faChar("fa-angle-double-down").tooltip("DOT").on("click",(function(){return s.layoutClick("DOT")})),s._toggleNeato=(new t.ToggleButton).faChar("fa-sun-o").tooltip("Neato").on("click",(function(){return s.layoutClick("Neato")})),s._toggleFDP=(new t.ToggleButton).faChar("fa-asterisk").tooltip("FDP").on("click",(function(){return s.layoutClick("FDP")})),s._toggleTwoPI=(new t.ToggleButton).faChar("fa-bullseye").tooltip("TwoPI").on("click",(function(){return s.layoutClick("TwoPI")})),s._toggleCirco=(new t.ToggleButton).faChar("fa-cogs").tooltip("Circo").on("click",(function(){return s.layoutClick("Circo")})),s._toggleT=(new t.ToggleButton).faChar("fa-sitemap fa-rotate-270").tooltip("Tree").on("click",(function(){return s.layoutClick("Tree")})),s._toggleRT=(new t.ToggleButton).faChar("fa-sun-o").tooltip("Radial Tree").on("click",(function(){return s.layoutClick("RadialTree")})),s._toggleD=(new t.ToggleButton).faChar("fa-sitemap fa-rotate-270").tooltip("Dendrogram").on("click",(function(){return s.layoutClick("Dendrogram")})),s._toggleRD=(new t.ToggleButton).faChar("fa-asterisk").tooltip("Radial Dendrogram").on("click",(function(){return s.layoutClick("RadialDendrogram")})),s._graphData=(new r.Graph2).idFunc((function(e){return e.id})).sourceFunc((function(e){return e.source.id})).targetFunc((function(e){return e.target.id})).updateFunc((function(e,t){return e.props=t.props,hm(t)&&hm(e)&&(e.source=t.source,e.target=t.target),e})),s._prevDoClickTime=0,s._tooltip=new i.HTMLTooltip,s._selection=new t.Utility.Selection(s),s._dragHandler=t.drag(),s._catPalette=t.Palette.ordinal("hpcc10"),s._categories=[],s._annotations=[],s._origData={subgraphs:[],vertices:[],edges:[],hierarchy:[]},s._layoutAlgo=new cm(s),s.highlight={zoom:1.1,opacity:.33,edge:"1.25px"},s._transformScale=1,s._subgraphRenderer=n,s._vertexRenderer=o,s._edgeRenderer=a;var u=s;s._drawStartPos="origin";var c=[s._toggleHierarchy,s._toggleForceDirected,s._toggleForceDirected2,s._toggleCircle,new t.Spacer,s._toggleDot,s._toggleNeato,s._toggleFDP,s._toggleTwoPI,s._toggleCirco,new t.Spacer,s._toggleT,s._toggleRT,s._toggleD,s._toggleRD,new t.Spacer];return s._iconBar.buttons(c.concat(s._iconBar.buttons())),s._dragHandler.on("start",(function(e){if(u.allowDragging()){t.select(this).classed("grabbed",!0),Rm(e),t.Utility.safeRaise(this),u.moveVertexPlaceholder(e,!1,!0);var r=u.selection();u.selected(e.props,r)?r.filter((function(t){return t.id!==e.props.id})).forEach((function(e){Rm(u._graphData.vertex(e.id))})):u.dragSingleNeighbors()&&u._graphData.singleNeighbors(e.id).forEach((function(e){Rm(e)}))}})).on("drag",(function(e){if(u.allowDragging()){e.fx=e.sx+u.rproject(t.d3Event().x-e.sx),e.fy=e.sy+u.rproject(t.d3Event().y-e.sy),u._graphData.vertexEdges(e.id).forEach((function(e){return delete e.points})),u.moveVertexPlaceholder(e,!1,!0);var r=u.selection();u.selected(e.props,r)?r.filter((function(t){return t.id!==e.props.id})).forEach((function(t){var r=u._graphData.vertex(t.id);Vm(r,e),u.moveVertexPlaceholder(r,!1,!0)})):u.dragSingleNeighbors()&&u._graphData.singleNeighbors(e.id).forEach((function(t){Vm(t,e),u.moveVertexPlaceholder(t,!1,!0)}))}})).on("end",(function(e){var r=!0;if(u.allowDragging()){r=Math.abs(e.sx-e.fx)<1&&Math.abs(e.sy-e.fy)<1,zm(e);var n=u.selection();u.selected(e.props,n)?n.filter((function(t){return t.id!==e.props.id})).forEach((function(e){zm(u._graphData.vertex(e.id))})):u.dragSingleNeighbors()&&u._graphData.singleNeighbors(e.id).forEach(zm),t.select(this).classed("grabbed",!1)}if(r){u._selection.click({_id:String(e.id),element:function(){return e.element}},t.d3Event().sourceEvent),u.selectionChanged();var o=e.element.classed("selected"),i=u.resolveEventOrigin();u.vertex_click(e.props.origData||e.props,"",o,i);var a=Date.now();a-u._prevDoClickTime<u.doubleClickMaxDelay()&&u.vertex_dblclick(e.props.origData||e.props,"",o,i),u._prevDoClickTime=a}})).filter((function(){return!0})),s}return s(n,e),n.prototype.resolveEventOrigin=function(){var e,r,n=t.d3Event(),o=(null!==(r=null===(e=null==n?void 0:n.sourceEvent)||void 0===e?void 0:e.path)&&void 0!==r?r:null==n?void 0:n.path).find((function(e){return(null==e?void 0:e.hasAttribute)&&(null==e?void 0:e.hasAttribute("data-click"))})),i=o?o.getAttribute("data-click"):"",a=o?o.getAttribute("data-click-data"):"",s=void 0;if(a)try{s=JSON.parse(a)}catch(e){console.warn("Unexpected annotation data:",a)}return{origin:i,data:s}},n.prototype.iconBarButtons=function(){return this._iconBar.buttons()},n.prototype.categories=function(e){return void 0===e?this._categories:(this._categories=e,this)},n.prototype.annotations=function(e){return void 0===e?this._annotations:(this._annotations=e,this)},n.prototype.data=function(e,t){var r=this;return void 0===e?this._origData:(this._origData=e,this._graphData.mergeSubgraphs((e.subgraphs||[]).map((function(e){return{id:e.id,props:e}}))),this._graphData.mergeVertices((e.vertices||[]).map((function(e){return{id:e.id,centroid:e.centroid,props:e}}))),this._graphData.mergeEdges((e.edges||[]).filter((function(e){return r._graphData.vertexExists(e.source.id)&&r._graphData.vertexExists(e.target.id)})).map((function(e){return{id:e.id,props:e,source:r._graphData.vertex(e.source.id),target:r._graphData.vertex(e.target.id)}}))),this._graphData.clearParents(),(e.hierarchy?e.hierarchy:[]).forEach((function(e){r._graphData.subgraphExists(e.child.id)?r._graphData.subgraphParent(e.child.id,e.parent.id):r._graphData.vertexExists(e.child.id)&&r._graphData.vertexParent(e.child.id,e.parent.id)})),this)},n.prototype.selected=function(e,t){return(t||this.selection()).some((function(t){return t.id===e.id}))},n.prototype.selection=function(e){var t=this;return arguments.length?(this._selection.set(e.map((function(e){var r=t._graphData.item(e.id);return{_id:String(r.id),element:function(){return r.element}}}))),this):this._selection.get().map((function(e){return t._graphData.item(e._id).props}))},n.prototype.graphData=function(){return this._graphData},n.prototype.resetLayout=function(){return delete this._prevLayout,this},n.prototype.layoutRunning=function(){return this._layoutAlgo&&this._layoutAlgo.running()},n.prototype.layoutAlgo=function(e){var t=this;return this._layoutAlgo&&this._layoutAlgo.stop(),this._layoutAlgo=e,this._layoutAlgo.start().then((function(){t.updateIconBar(),t.applyScaleOnLayout()&&setTimeout((function(){t.zoomToFit(t.transitionDuration())}),t.transitionDuration())}))},n.prototype.layoutClick=function(e){this.layoutRunning()?(this._layoutAlgo.stop(),this.updateIconBar()):(delete this._prevLayout,this.layout(e).render())},n.prototype.updateIconBarItem=function(e,t){var r=this.layout(),n=this._layoutAlgo&&this._layoutAlgo.running();e.enabled(!n||r===t).selected(n&&r===t).render()},n.prototype.updateIconBar=function(){e.prototype.updateIconBar.call(this),this.updateIconBarItem(this._toggleHierarchy,"Hierarchy"),this.updateIconBarItem(this._toggleDot,"DOT"),this.updateIconBarItem(this._toggleForceDirected,"ForceDirected"),this.updateIconBarItem(this._toggleNeato,"Neato"),this.updateIconBarItem(this._toggleFDP,"FDP"),this.updateIconBarItem(this._toggleForceDirected2,"ForceDirected2"),this.updateIconBarItem(this._toggleCircle,"Circle"),this.updateIconBarItem(this._toggleTwoPI,"TwoPI"),this.updateIconBarItem(this._toggleCirco,"Circo"),this.updateIconBarItem(this._toggleT,"Tree"),this.updateIconBarItem(this._toggleRT,"RadialTree"),this.updateIconBarItem(this._toggleD,"Dendrogram"),this.updateIconBarItem(this._toggleRD,"RadialDendrogram")},n.prototype.getNeighborMap=function(e){var t={},r={};if(e)for(var n=this._graphData.vertexEdges(e.id),o=0;o<n.length;++o){var i=this._graphData.edge(n[o].id);r[i.id]=i,i.source.id!==e.id&&(t[i.source.id]=i.source),i.target.id!==e.id&&(t[i.target.id]=i.target)}return{vertices:t,edges:r}},n.prototype.centerOnItem=function(e){var t,r,n,o=this._graphData.item(e);if((this._graphData.isSubgraph(o)||this._graphData.isVertex(o))&&(r=o.x,n=o.y),this._graphData.isEdge(o)&&(r=(t=[0,0])[0],n=t[1]),void 0!==r&&void 0!==n){var i=o.element.node().getBBox();if(this._graphData.isVertex(o)){var a=this.projectPlacholder(o);r=a.x,n=a.y}else this._graphData.isSubgraph(o)&&(r=this.project(o.x),n=this.project(o.y));var s=i.x+i.width/2,u=i.y+i.height/2,c={x:r+s-i.width/2,y:n+u-i.height/2,width:i.width,height:i.height};this.centerOnBBox(c)}},n.prototype.hideVertex=function(e){var t=this._graphData.item(e);return this._graphData.isVertex(t)&&(t.props.hidden=!0),this},n.prototype.showVertex=function(e){var t=this._graphData.item(e);return this._graphData.isVertex(t)&&(t.props.hidden=!1),this},n.prototype.highlightVerticies=function(e){var t=this,r=this,n=this._vertexG.selectAll(".graphVertex"),o=!r.showVertexLabels()&&r.showVertexLabelsOnHighlight();return n.classed("graphVertex-highlighted",(function(t){return!e||e[t.id]})).style("filter",(function(r){return e&&e[r.id]?"url(#"+t.id()+"_glow)":null})).each((function(t){if(o){var n=r.calcProps(u({showLabel:!(!e||!e[t.id])},r.vertexMapper(t.props,t.props.origData)));r._vertexRenderer(n,this)}})).transition().duration(this.transitionDuration()).on("end",(function(t){e&&e[t.id]&&t.element.node()&&t.element.node().parentNode&&t.element.node().parentNode.appendChild(t.element.node())})).style("opacity",(function(t){return t.props.hidden?0:!e||e[t.id]?1:r.highlight.opacity})),this},n.prototype.highlightEdges=function(e){var t=this;return this._edgeG.selectAll(".graphEdge").classed("graphEdge-highlighted",(function(t){return!e||e[t.id]})).style("stroke-width",(function(r){return e&&e[r.id]?t.highlight.edge:t.edgeStrokeWidth()+"px"})).transition().duration(this.transitionDuration()).style("opacity",(function(r){return r.source.props.hidden||r.target.props.hidden?0:!e||e[r.id]?1:t.highlight.opacity})),this},n.prototype.highlightVertex=function(e,t){if(this.highlightOnMouseOverVertex())if(t){var r=this.getNeighborMap(t);r.vertices[t.id]=t,this.highlightVerticies(r.vertices),this.highlightEdges(r.edges)}else this.highlightVerticies(),this.highlightEdges()},n.prototype.highlightEdge=function(e,t){if(this.highlightOnMouseOverEdge())if(t){var r={};r[t.source.id]=t.source,r[t.target.id]=t.target;var n={};n[t.id]=t,this.highlightVerticies(r),this.highlightEdges(n)}else this.highlightVerticies(),this.highlightEdges()},n.prototype.moveSubgraphPlaceholder=function(e,t){var r=this,n=this.project(e.x),o=this.project(e.y),i=this.project(e.props.width,!0),a=this.project(e.props.height,!0);return e.element&&e.element.transition().duration(t?this.transitionDuration():0).attr("transform","translate(".concat(n," ").concat(o,")")).each((function(e){r._subgraphRenderer(u(u({},e.props),{width:i,height:a}),this)})),this},n.prototype.moveEdgePlaceholder=function(e,r){var n,o=u({},this._layoutAlgo.edgePath(e,this.edgeArcDepth())),i=this;if(this._edgeRenderer&&e.element){var a=null!==(n=e.previousEdgeLayout)&&void 0!==n?n:o;e.previousEdgeLayout=o;var s=function(e,t,r){var n=W_(e),o=W_(t),i="object"===F_(r)?r:{excludeSegment:r,snapEndsToInput:!0},a=i.excludeSegment,s=i.snapEndsToInput;if(!n.length&&!o.length)return function(){return""};var u=Y_(n,o,{excludeSegment:a,snapEndsToInput:s});return function(e){if(1===e&&s)return null==t?"":t;var r,n="",o=L_(u(e));try{for(o.s();!(r=o.n()).done;)n+=H_(r.value)}catch(e){o.e(e)}finally{o.f()}return n}}(a.path,o.path),c=t.interpolateNumberArray(a.labelPos,o.labelPos);e.element.transition().duration(r?this.transitionDuration():0).tween("some.path",(function(){return function(t){var r,n,a={path:s(t),labelPos:c(t),strokeWidth:null!==(r=e.props.strokeWidth)&&void 0!==r?r:i.edgeStrokeWidth(),color:null!==(n=e.props.color)&&void 0!==n?n:i.edgeColor()};i._edgeRenderer(u(u(u({},o),e.props),a),e.element.node())}}))}return this},n.prototype.moveVertexPlaceholder=function(e,t,r){var n=this,o=this.projectPlacholder(e),i=o.x,a=o.y;return e.element&&(t?e.element.transition().duration(this.transitionDuration()):e.element).attr("transform","translate(".concat(i," ").concat(a,")")),r&&this._graphData.vertexEdges(e.id).forEach((function(e){return n.moveEdgePlaceholder(e,t)})),this},n.prototype.moveSubgraphs=function(e){var t=this;return this._graphData.allSubgraphs().forEach((function(r){return t.moveSubgraphPlaceholder(r,e)})),this},n.prototype.moveEdges=function(e){var t=this;return this._graphData.allEdges().forEach((function(r){return t.moveEdgePlaceholder(r,e)})),this},n.prototype.moveVertices=function(e){var t=this;return this._graphData.allVertices().forEach((function(r){return t.moveVertexPlaceholder(r,e,!1)})),this},n.prototype.project=function(e,t){void 0===t&&(t=!1);e=void 0!==e?e:0;var r=this._transformScale;return t&&(this._transformScale>this.maxScale()+(this._transformScale-this.maxScale())/2?r=this.maxScale()+(this._transformScale-this.maxScale())/2:(this._transformScale,this.minScale(),this._transformScale,this.minScale())),Math.round(e*r*10)/10},n.prototype.rproject=function(e){return e=void 0!==e?e:0,Math.round(e/this._transformScale*10)/10},n.prototype.projectPlacholder=function(e){return{x:this.project(void 0!==e.fx?e.fx:e.x),y:this.project(void 0!==e.fy?e.fy:e.y)}},n.prototype.categoryID=function(e,t){return void 0===t&&(t="cat"),void 0===e||""===e?"":"".concat(t).concat(this.id(),"_").concat(e)},n.prototype.updateCategories=function(){var e=this;o.render(o.Icons,{icons:this._categories.map((function(t){return u(u({},t),{id:e.categoryID(t.id),fill:t.fill||"transparent",imageCharFill:t.imageCharFill||e._catPalette(t.id)})}))},this._svgDefsCat.node())},n.prototype.updateAnnotations=function(){var e=this;o.render(o.Icons,{icons:this._annotations.map((function(t){return u(u({},t),{id:e.categoryID(t.id,"ann"),shape:t.shape||"square",height:t.height||12,fill:t.fill||e._catPalette(t.id)})}))},this._svgDefsAnn.node())},n.prototype.edgeRenderer=function(e){return arguments.length?(this._edgeRenderer=e,this):this._edgeRenderer},n.prototype.updateEdges=function(){var e=this;return this._edgeG.selectAll(".graphEdge").data(this._graphData.allEdges(),(function(e){return e.id})).join((function(r){return r.append("g").attr("class","graphEdge").on("click.selectionBag",(function(r){e._selection.click({_id:String(r.id),element:function(){return r.element}},t.d3Event()),e.selectionChanged()})).on("click",(function(t){var r=t.element.classed("selected");e.edge_click(t.props.origData||t.props,"",r)})).on("mouseover",(function(r){t.Utility.safeRaise(this),e.edge_mouseover(t.select(this),r)})).on("mouseout",(function(r){e.edge_mouseout(t.select(this),r)})).each((function(r){r.element=t.select(this),e._edgeRenderer||(r.elementPath=r.element.append("path"),r.elementText=r.element.append("text").attr("text-anchor","middle"))}))}),(function(t){return t.attr("opacity",(function(e){return e.source.props.hidden||e.target.props.hidden?0:1})).classed("hide-text",!e.showEdgeLabels())}),(function(e){return e.each((function(e){delete e.element})).remove()})),this},n.prototype.vertexRenderer=function(e){return arguments.length?(this._vertexRenderer=e,this):this._vertexRenderer},n.prototype.vertexMapper=function(e,t){var r=this;return u(u({},e),{categoryID:this.categoryID(e.categoryID),annotationIDs:e.annotationIDs?e.annotationIDs.map((function(e){return r.categoryID(e,"ann")})):[]})},n.prototype.updateVertices=function(){var e=this,r=this;return this._vertexG.selectAll(".graphVertex").data(this._graphData.allVertices(),(function(e){return e.id})).join((function(n){return n.append("g").attr("class","graphVertex").on("dblclick",(function(e){t.d3Event().stopPropagation()})).on("mousein",(function(e){t.Utility.safeRaise(this),r.highlightVertex(t.select(this),e);var n=e.element.classed("selected"),o=r.resolveEventOrigin();r.vertex_mousein(e.props.origData||e.props,"",n,o)})).on("mouseover",(function(e){t.Utility.safeRaise(this),r.highlightVertex(t.select(this),e);var n=e.element.classed("selected");e.props.tooltip&&r._tooltip.tooltipHTML(r.tooltipHTML.bind(r)).triggerElement(e.element).tooltipWidth(r.tooltipWidth()).tooltipHeight(r.tooltipHeight()).enablePointerEvents(r.enableTooltipPointerEvents()).closeDelay(r.tooltipCloseDelay()).direction("n").data(e).visible(!0).render();var o=r.resolveEventOrigin();r.vertex_mouseover(e.props.origData||e.props,"",n,o)})).on("mouseout",(function(e){r.highlightVertex(null,null);var t=e.element.classed("selected"),n=r.resolveEventOrigin();r.vertex_mouseout(e.props.origData||e.props,"",t,n),e.props.tooltip&&r._tooltip.mouseout()})).call(e._dragHandler).each((function(e){e.element=t.select(this)}))}),(function(e){return e}),(function(e){return e.each((function(e){delete e.element})).remove()})).classed("centroid",(function(e){return e.props.centroid})).attr("opacity",(function(e){return e.props.hidden?0:1})).attr("filter",(function(t){return t.props.centroid?"url(#"+e.id()+"_glow)":null})).each((function(e){var t=r.calcProps(u({showLabel:r.showVertexLabels()},r.vertexMapper(e.props,e.props.origData)));r._vertexRenderer(t,this)})),this},n.prototype.calcProps=function(e){return u({},e)},n.prototype.hasSubgraphs=function(){switch(this.layout()){case"DOT":case"Hierarchy":return!0}return!1},n.prototype.subgraphRenderer=function(e){return arguments.length?(this._subgraphRenderer=e,this):this._subgraphRenderer},n.prototype.updateSubgraphs=function(){var e=this;return this._subgraphG.selectAll(".subgraphPlaceholder").data(this.hasSubgraphs()?this._graphData.allSubgraphs():[],(function(e){return e.id})).join((function(r){return r.append("g").attr("class","subgraphPlaceholder").on("click.selectionBag",(function(r){e._selection.click({_id:String(r.id),element:function(){return r.element}},t.d3Event()),e.selectionChanged()})).on("click",(function(t){var r=t.element.classed("selected");e.subgraph_click(t.props.origData||t.props,"",r)})).on("mouseover",(function(){t.Utility.safeRaise(this)})).each((function(e){e.element=t.select(this)}))}),(function(e){return e}),(function(e){return e.each((function(e){delete e.element})).transition().style("opacity",0).remove()})).each((function(t){e.moveSubgraphPlaceholder(t,!1)})),this},n.prototype.enter=function(r,n){var o=this;e.prototype.enter.call(this,r,n);var i=this.locateSVGNode(r);this._svgDefs=t.select(i).select("defs"),this._centroidFilter=new t.SVGGlowFilter(this._svgDefs,this._id+"_glow"),this._svgDefsCat=this._svgDefs.append("g"),this._svgDefsAnn=this._svgDefs.append("g"),this._subgraphG=this._renderElement.append("g"),this._edgeG=this._renderElement.append("g"),this._vertexG=this._renderElement.append("g"),this._tooltip.target(r),this.on("startMarqueeSelection",(function(){})).on("updateMarqueeSelection",(function(e){var t=o._graphData.allVertices().filter((function(t){return t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height}));o.selection(t.map((function(e){return e.props})))})).on("endMarqueeSelection",(function(){o.selectionChanged()}))},n.prototype.forceDirectedOptions=function(){return{alpha:this.forceDirectedAlpha(),alphaMin:this.forceDirectedAlphaMin(),alphaDecay:this.forceDirectedAlphaDecay(),velocityDecay:this.forceDirectedVelocityDecay(),repulsionStrength:this.forceDirectedRepulsionStrength(),iterations:this.forceDirectedIterations(),linkDistance:this.forceDirectedLinkDistance(),linkStrength:this.forceDirectedLinkStrength(),pinCentroid:this.forceDirectedPinCentroid(),forceStrength:this.forceDirectedForceStrength(),distanceMin:this.forceDirectedMinDistance(),distanceMax:this.forceDirectedMaxDistance()}},n.prototype.layoutOptions=function(e){switch(e){case"ForceDirected":case"ForceDirected2":case"ForceDirectedHybrid":return this.forceDirectedOptions();case"Hierarchy":return{rankdir:this.hierarchyRankDirection(),nodesep:this.hierarchyNodeSeparation(),edgesep:this.hierarchyEdgeSeparation(),ranksep:this.hierarchyRankSeparation(),digraph:this.hierarchyDigraph()};case"Tree":case"Dendrogram":return{rankdir:this.treeRankDirection()};case"DOT":case"Neato":case"FDP":case"TwoPI":case"Circo":return new URL(this.wasmFolder()||Bm,document.baseURI).href;default:return}},n.prototype.updateLayout=function(){var e=this,t=this.layout(),n=this.layoutOptions(t),o=r.hashSum([t,n]);if(this._prevLayout!==o)switch(this._prevLayout=o,t){case"None":this.layoutAlgo(new cm(this));break;case"Circle":this.layoutAlgo(new X_(this));break;case"ForceDirected":this.layoutAlgo(new om(this,n));break;case"ForceDirected2":this.layoutAlgo(new im(this,n));break;case"ForceDirectedHybrid":this.layoutAlgo(new om(this,n)).then((function(){e.layoutAlgo(new im(e,n))}));break;case"Hierarchy":this.layoutAlgo(new rm(this,n));break;case"DOT":this.layoutAlgo(new um(this,"dot",n));break;case"Tree":this.layoutAlgo(new Mm(this,n));break;case"RadialTree":this.layoutAlgo(new Tm(this));break;case"Dendrogram":this.layoutAlgo(new Nm(this,n));break;case"RadialDendrogram":this.layoutAlgo(new Lm(this));break;case"Neato":this.layoutAlgo(new um(this,"neato",n));break;case"FDP":this.layoutAlgo(new um(this,"fdp",n));break;case"TwoPI":this.layoutAlgo(new um(this,"twopi",n));break;case"Circo":this.layoutAlgo(new um(this,"circo",n))}},n.prototype.update=function(t,r){e.prototype.update.call(this,t,r),this._renderElement.classed("allowDragging",this.allowDragging()),this.updateCategories(),this.updateAnnotations(),this.updateSubgraphs(),this.updateVertices(),this.updateEdges(),this.moveEdges(!1),this.updateLayout(),this.updateIconBar()},n.prototype.exit=function(t,r){e.prototype.exit.call(this,t,r),this._tooltip.target(null)},n.prototype.render=function(t){var r=this;return this.progress("start"),e.prototype.render.call(this,(function(e){r.progress("stop"),t&&t(e)})),this},n.prototype.zoomed=function(t){e.prototype.zoomed.call(this,t);var r=this.size(),n=r.width,o=r.height;t.k<this.minScale()?(this._edgeG.attr("transform","scale(".concat(this.minScale()/t.k,")")),this._subgraphG.attr("transform","scale(".concat(this.minScale()/t.k,")")),this._vertexG.attr("transform","scale(".concat(this.minScale()/t.k,")")),this._transformScale=t.k/this.minScale()):t.k>this.maxScale()?(this._edgeG.attr("transform","scale(".concat(this.maxScale()/t.k,")")),this._subgraphG.attr("transform","scale(".concat(this.maxScale()/t.k,")")),this._vertexG.attr("transform","scale(".concat(this.maxScale()/t.k,")")),this._transformScale=t.k/this.maxScale()):(this._transformScale=1,this._edgeG.attr("transform",null),this._subgraphG.attr("transform",null),this._vertexG.attr("transform",null)),this._prevTransformScale===this._transformScale&&this._prevWidth===n&&this._prevHeight===o||(this._prevTransformScale=this._transformScale,this._prevWidth=n,this._prevHeight=o,this.moveSubgraphs(!1).moveVertices(!1).moveEdges(!1))},n.prototype.centroids=function(){return this._graphData.allVertices().filter((function(e){return!!e.props.centroid}))},n.prototype.selectionChanged=function(){var e=this;if(this.highlightSelectedPathToCentroid()){var t={};this.centroids().forEach((function(r){e.selection().forEach((function(n){var o=e._graphData.dijkstra(r.id,n.id),i=o.ids;o.len&&i.forEach((function(e){t[e]=!0}))}))})),this._edgeG.selectAll(".graphEdge")}},n.prototype.tooltipHTML=function(e){return e.props.tooltip},n.prototype.subgraph_click=function(e,t,r){},n.prototype.vertex_click=function(e,t,r,n){},n.prototype.vertex_dblclick=function(e,t,r,n){},n.prototype.vertex_mousein=function(e,t,r,n){},n.prototype.vertex_mouseover=function(e,t,r,n){},n.prototype.vertex_mouseout=function(e,t,r,n){},n.prototype.edge_click=function(e,t,r){},n.prototype.edge_mouseover=function(e,t){this.highlightEdge(e,t)},n.prototype.edge_mouseout=function(e,t){this.highlightEdge(null,null)},n.prototype.progress=function(e){},n}(t.SVGZoomWidget);Gm.prototype._class+=" graph_GraphT",Gm.prototype.publish("allowDragging",!0,"boolean","Allow Dragging of Vertices"),Gm.prototype.publish("dragSingleNeighbors",!0,"boolean","Dragging a Vertex also moves its singleton neighbors"),Gm.prototype.publish("layout","ForceDirectedHybrid","set","Default Layout",["Hierarchy","DOT","Tree","Dendrogram","RadialTree","RadialDendrogram","ForceDirected","ForceDirected2","ForceDirectedHybrid","Neato","FDP","Circle","TwoPI","Circo","None"]),Gm.prototype.publish("scale","100%","set","Zoom Level",["all","width","selection","100%","90%","75%","50%","25%","10%"]),Gm.prototype.publish("applyScaleOnLayout",!1,"boolean","Shrink to fit on Layout"),Gm.prototype.publish("highlightOnMouseOverVertex",!0,"boolean","Highlight Vertex on Mouse Over"),Gm.prototype.publish("highlightOnMouseOverEdge",!0,"boolean","Highlight Edge on Mouse Over"),Gm.prototype.publish("transitionDuration",250,"number","Transition Duration"),Gm.prototype.publish("showEdges",!0,"boolean","Show Edges"),Gm.prototype.publish("showEdgeLabels",!0,"boolean","Show Edge labels"),Gm.prototype.publish("showEdgeLabelsOnHighlight",!0,"boolean","Show Edge labels when highlighted"),Gm.prototype.publish("showVertexLabels",!0,"boolean","Show Vertex labels"),Gm.prototype.publish("showVertexLabelsOnHighlight",!0,"boolean","Show Vertex labels when highlighted"),Gm.prototype.publish("snapToGrid",0,"number","Snap to Grid"),Gm.prototype.publish("selectionClearOnBackgroundClick",!1,"boolean","Clear selection on background click"),Gm.prototype.publish("edgeArcDepth",8,"number","Edge Arc Depth"),Gm.prototype.publish("edgeColor",null,"html-color","Edge line stroke color",null,{optional:!0}),Gm.prototype.publish("edgeStrokeWidth",1,"number","Edge line stroke width (pixels)"),Gm.prototype.publish("minScale",.6,"number","Min scale size for text"),Gm.prototype.publish("maxScale",1,"number","Max scale size for text"),Gm.prototype.publish("tooltipWidth",256,"number","Tooltip width (pixels)"),Gm.prototype.publish("tooltipHeight",128,"number","Tooltip width (pixels)"),Gm.prototype.publish("enableTooltipPointerEvents",!1,"boolean","If true, tooltip will use the style: 'pointer-events: all'"),Gm.prototype.publish("tooltipCloseDelay",0,"number","Number of milliseconds to wait before closing tooltip (cancelled on tooltip mouseover event)"),Gm.prototype.publish("doubleClickMaxDelay",300,"number","Number of milliseconds to wait before a subsequent click is not considered a double click"),Gm.prototype.publish("highlightSelectedPathToCentroid",!0,"boolean","Highlight path to Center Vertex (for selected vertices)"),Gm.prototype.publish("hierarchyRankDirection","TB","set","Direction for Rank Nodes",["TB","BT","LR","RL"],{disable:function(e){return"Hierarchy"!==e.layout()}}),Gm.prototype.publish("hierarchyNodeSeparation",50,"number","Number of pixels that separate nodes horizontally in the layout",null,{disable:function(e){return"Hierarchy"!==e.layout()}}),Gm.prototype.publish("hierarchyEdgeSeparation",10,"number","Number of pixels that separate edges horizontally in the layout",null,{disable:function(e){return"Hierarchy"!==e.layout()}}),Gm.prototype.publish("hierarchyRankSeparation",50,"number","Number of pixels between each rank in the layout",null,{disable:function(e){return"Hierarchy"!==e.layout()}}),Gm.prototype.publish("hierarchyDigraph",!0,"boolean","Directional GraphBase",null,{disable:function(e){return"Hierarchy"!==e.layout()}}),Gm.prototype.publish("forceDirectedAlpha",1,"number","Alpha",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),Gm.prototype.publish("forceDirectedAlphaMin",.001,"number","Min Alpha",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),Gm.prototype.publish("forceDirectedAlphaDecay",.0228,"number","Defaults to 1 - pow(alphaMin, 1 / 300)",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),Gm.prototype.publish("forceDirectedRepulsionStrength",-350,"number","Charge strength ",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),Gm.prototype.publish("forceDirectedVelocityDecay",.4,"number","Velocity Decay ",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),Gm.prototype.publish("forceDirectedIterations",300,"number","Iterations",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),Gm.prototype.publish("forceDirectedLinkDistance",300,"number","Target distance between linked nodes",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),Gm.prototype.publish("forceDirectedLinkStrength",1,"number","Strength (rigidity) of links",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),Gm.prototype.publish("forceDirectedPinCentroid",!1,"boolean","Pin centroid to center",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),Gm.prototype.publish("forceDirectedForceStrength",0,"number","Strength of center force",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),Gm.prototype.publish("forceDirectedMinDistance",1,"number","Min distance between nodes",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),Gm.prototype.publish("forceDirectedMaxDistance",1/0,"number","Max distance between nodes",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),Gm.prototype.publish("treeRankDirection","LR","set","Direction for Rank Nodes",["TB","LR"],{disable:function(e){return"Tree"!==e.layout()&&"Dendrogram"!==e.layout()}}),Gm.prototype.publish("wasmFolder",null,"string","WASM Folder",null,{optional:!0,disable:function(e){return["DOT","Neato","FDP","TwoPI","Circo"].indexOf(e.layout())<0}});var Um=Gm.prototype.scale;function Hm(e){return function(t,r){return o.render(e,t,r)}}Gm.prototype.scale=function(e,t){var r=Um.apply(this,arguments);return arguments.length&&this.zoomTo(e,t),r};var qm=function(e){function t(t,r,n){return e.call(this,Hm(t),Hm(r),Hm(n))||this}return s(t,e),t.prototype.subgraphRenderer=function(t){return arguments.length?(this._reactSubgraphRenderer=t,e.prototype.subgraphRenderer.call(this,Hm(this._reactSubgraphRenderer)),this):this._reactSubgraphRenderer},t.prototype.vertexRenderer=function(t){var r=this;return arguments.length?(this._reactVertexRenderer=t,e.prototype.vertexRenderer.call(this,(function(e,t){return o.render(r._reactVertexRenderer,e,t)})),this):this._reactVertexRenderer},t.prototype.edgeRenderer=function(t){var r=this;return arguments.length?(this._reactEdgeRenderer=t,e.prototype.edgeRenderer.call(this,(function(e,t){return o.render(r._reactEdgeRenderer,e,t)})),this):this._reactEdgeRenderer},t}(Gm);qm.prototype._class+=" graph_GraphReactT";var Wm=function(e){var t=e.label,r=e.labelPos,n=e.labelFill,i=void 0===n?"black":n,a=e.labelHeight,s=void 0===a?12:a,u=e.path,c=e.color,h=e.strokeWidth,l=e.strokeDasharray;return o.React.createElement(o.React.Fragment,null,o.React.createElement("path",{d:u,stroke:c,style:{strokeWidth:h,strokeDasharray:l}}),t&&r&&2===r.length?o.React.createElement("g",{transform:"translate(".concat(r[0]," ").concat(r[1],")")},o.React.createElement(o.Text,{text:t,fill:i,height:s})):void 0)},Ym=function(e){function t(){var t=e.call(this,o.Subgraph,o.Vertex,Wm)||this;return t._reactCentroidRenderer=o.Vertex,t._reactVertexRenderer2=o.Vertex,e.prototype.vertexRenderer.call(t,(function(e){return e.centroid?t._reactCentroidRenderer(e):t._reactVertexRenderer2(e)})),t}return s(t,e),t.prototype.calcProps=function(t){var r=e.prototype.calcProps.call(this,t);r.icon||(r.icon={}),r.centroid?(r.textHeight=r.textHeight?r.textHeight:this.centroidTextHeight()*this.centroidScale(),r.textPadding=r.textPadding?r.textPadding:this.centroidTextPadding()*this.centroidScale(),r.textFontFamily=r.textFontFamily?r.textFontFamily:this.centroidLabelFontFamily(),r.icon.height=r.icon.height?r.icon.height:this.centroidIconHeight()*this.centroidScale(),r.icon.padding=r.icon.padding?r.icon.padding:this.centroidIconPadding()*this.centroidScale(),r.icon.strokeWidth=r.icon.strokeWidth?r.icon.strokeWidth:this.centroidIconStrokeWidth(),r.icon.imageFontFamily=r.icon.imageFontFamily?r.icon.imageFontFamily:this.centroidIconFontFamily()):(r.textHeight=r.textHeight?r.textHeight:this.vertexTextHeight(),r.textPadding=r.textPadding?r.textPadding:this.vertexTextPadding(),r.textFontFamily=r.textFontFamily?r.textFontFamily:this.vertexLabelFontFamily(),r.icon.height=r.icon.height?r.icon.height:this.vertexIconHeight(),r.icon.padding=r.icon.padding?r.icon.padding:this.vertexIconPadding(),r.icon.strokeWidth=r.icon.strokeWidth?r.icon.strokeWidth:this.vertexIconStrokeWidth(),r.icon.imageFontFamily=r.icon.imageFontFamily?r.icon.imageFontFamily:this.vertexIconFontFamily());var n=r.icon.imageChar,o=r.icon.imageFontFamily,i=r.icon.height-r.icon.padding,a=this.textRect(n,o,i);return r.icon.yOffset=-(a.top-i/2)-a.height/2+(r.icon.padding>0?i/r.icon.padding/2:0),r},t.prototype.vertexRenderer=function(e){return arguments.length?(this._reactVertexRenderer2=e,this):this._reactVertexRenderer2},t.prototype.centroidRenderer=function(e){return arguments.length?(this._reactCentroidRenderer=e,this):this._reactCentroidRenderer},t.prototype.enter=function(t,r){e.prototype.enter.call(this,t,r)},t.prototype.update=function(t,r){e.prototype.update.call(this,t,r),this._centroidFilter.update(this.centroidColor())},t}(qm);function Km(e,t){var r={};return t.forEach((function(t,n){return r[t]=e[n]})),r}Ym.prototype._class+=" graph_Graph2",Ym.prototype.publish("vertexTextHeight",10,"number","Vertex Text Height"),Ym.prototype.publish("vertexTextPadding",4,"number","Vertex Text Padding"),Ym.prototype.publish("vertexIconHeight",50,"number","Vertex Icon Height"),Ym.prototype.publish("vertexIconPadding",10,"number","Vertex Icon Padding"),Ym.prototype.publish("vertexIconStrokeWidth",0,"number","Vertex Icon Stroke Width"),Ym.prototype.publish("vertexIconFontFamily","FontAwesome","string","Vertex Icon Font Family"),Ym.prototype.publish("vertexLabelFontFamily","Verdana","string","Vertex Label Font Family"),Ym.prototype.publish("centroidColor","#00A000","html-color","Centroid Glow Color"),Ym.prototype.publish("centroidScale",1,"number","Centroid Scale"),Ym.prototype.publish("centroidTextHeight",12,"number","Centroid Text Height"),Ym.prototype.publish("centroidTextPadding",4,"number","Centroid Text Padding"),Ym.prototype.publish("centroidIconHeight",50,"number","Centroid Icon Height"),Ym.prototype.publish("centroidIconPadding",10,"number","Centroid Icon Padding"),Ym.prototype.publish("centroidIconStrokeWidth",4,"number","Centroid Icon Stroke Width"),Ym.prototype.publish("centroidIconFontFamily","FontAwesome","string","Centroid Icon Font Family"),Ym.prototype.publish("centroidLabelFontFamily","Verdana","string","Centroid Label Font Family");var Zm=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return s(r,e),r.prototype.owner=function(e){return arguments.length?(this._owner=e,this):this._owner},r.prototype.valid=function(){return!!this.columnID()},c([t.publish("","set","Annotation column (boolean)",(function(){return this._owner.vertexColumns()})),h("design:type",Function)],r.prototype,"columnID",void 0),c([t.publish("","string","Annotation ID"),h("design:type",Function)],r.prototype,"annotationID",void 0),r}(t.PropertyExt);Zm.prototype._class+=" graph_AnnotationColumn";var $m=function(e){function n(){var t=e.call(this)||this;return t._prevSubgraphs=[],t._masterSubgraphs=[],t._masterSubgraphsMap={},t._prevVertices=[],t._masterVertices=[],t._masterVerticesMap={},t._prevEdges=[],t._masterEdges=[],t._masterEdgesMap={},t._prevHierarchy=[],t._masterHierarchy=[],t._masterHierarchyMap={},t.vertexRenderer(o.Vertex3).centroidRenderer(o.CentroidVertex3).edgeColor("#287EC4").edgeStrokeWidth(2).edgeArcDepth(0),t}return s(n,e),n.prototype.clear=function(){this._prevSubgraphs=[],this._masterSubgraphs=[],this._masterSubgraphsMap={},this._prevVertices=[],this._masterVertices=[],this._masterVerticesMap={},this._prevEdges=[],this._masterEdges=[],this._prevHierarchy=[],this._masterHierarchy=[],this._masterHierarchyMap={},this._graphData.clear(),this.resetLayout()},n.prototype.indexOf=function(e,t,r){void 0===r&&(r="");var n=e.indexOf(t);return n>=0?n:e.indexOf(r)},n.prototype.mergeSubgraphs=function(){var e=this,t=this.subgraphColumns(),n=this.indexOf(t,this.subgraphIDColumn(),"id"),o=this.indexOf(t,this.subgraphLabelColumn(),"label"),i=this.subgraphs().map((function(e){return{id:""+e[n],text:""+e[o],origData:Km(e,t)}})),a=r.compare2(this._prevSubgraphs,i,(function(e){return e.id}));a.exit.forEach((function(t){e._masterSubgraphs=e._masterSubgraphs.filter((function(e){return e.id!==t.id})),delete e._masterSubgraphsMap[t.id]})),a.enter.forEach((function(t){e._masterSubgraphs.push(t),e._masterSubgraphsMap[t.id]=t})),a.update.forEach((function(t){e._masterSubgraphsMap[t.id].origData=t.origData})),this._prevSubgraphs=i},n.prototype.mergeVertices=function(){var e=this,t=this.vertexColumns(),n=this.vertexAnnotationColumns(),o=this.indexOf(t,this.vertexCategoryColumn(),"category"),i=this.indexOf(t,this.vertexIDColumn(),"id"),a=this.indexOf(t,this.vertexLabelColumn(),"label"),s=this.indexOf(t,this.vertexCentroidColumn(),"centroid"),u=this.indexOf(t,this.vertexFACharColumn(),"faChar"),c=this.indexOf(t,this.vertexTooltipColumn(),"tooltip"),h=n.map((function(r){return e.indexOf(t,r.columnID(),"")})),l=this.indexOf(t,this.vertexExpansionFACharColumn(),"expansionFAChar"),f=this.vertices().map((function(r){var f=h.map((function(e,t){return r[e]?n[t].annotationID():void 0})).filter((function(e){return!!e}));return{categoryID:""+r[o],id:""+r[i],text:""+r[a],tooltip:""+r[c],origData:Km(r,t),centroid:!!r[s],icon:{imageChar:""+(r[u]||e.vertexFAChar())},annotationIDs:f,annotations:e.annotations().filter((function(e){return f.indexOf(e.id)>=0})),expansionIcon:r[l]?{imageChar:""+r[l]}:void 0}})),d=r.compare2(this._prevVertices,f,(function(e){return e.id}));d.exit.forEach((function(t){e._masterVertices=e._masterVertices.filter((function(e){return e.id!==t.id})),delete e._masterVerticesMap[t.id]})),d.enter.forEach((function(t){e._masterVertices.push(t),e._masterVerticesMap[t.id]=t})),d.update.forEach((function(t){e._masterVerticesMap[t.id].origData=t.origData})),this._prevVertices=f},n.prototype.mergeEdges=function(){var e=this,t=this.edgeColumns(),n=this.indexOf(t,this.edgeIDColumn(),"id"),o=this.indexOf(t,this.edgeSourceColumn(),"source"),i=this.indexOf(t,this.edgeTargetColumn(),"target"),a=this.indexOf(t,this.edgeLabelColumn(),"label"),s=this.indexOf(t,this.edgeWeightColumn(),"weight"),u=this.indexOf(t,this.edgeColorColumn(),"color"),c=this.edges().map((function(r){var c=e._masterVerticesMap[""+r[o]];c||console.error('Invalid edge source entity "'.concat(r[o],'" does not exist.'));var h=e._masterVerticesMap[""+r[i]];return h||console.error('Invalid edge target entity "'.concat(r[i],'" does not exist.')),{id:n>=0?""+r[n]:r[o]+"->"+r[i],source:c,target:h,weight:+r[s]||1,color:r[u],label:a>=0?""+r[a]:"",origData:Km(r,t),labelPos:[0,0],path:""}})).filter((function(e){return e.source&&e.target})),h=r.compare2(this._masterEdges,c,(function(e){return e.id}));h.exit.forEach((function(t){e._masterEdges=e._masterEdges.filter((function(e){return e.id!==t.id})),delete e._masterEdgesMap[t.id]})),h.enter.forEach((function(t){e._masterEdges.push(t),e._masterEdgesMap[t.id]=t})),h.update.forEach((function(t){e._masterEdgesMap[t.id].origData=t.origData})),this._prevEdges=c},n.prototype.mergeHierarchy=function(){var e=this,t=this.hierarchyColumns(),n=this.indexOf(t,this.hierarchyParentIDColumn(),"parentID"),o=this.indexOf(t,this.hierarchyChildIDColumn(),"childID"),i=this.hierarchy().map((function(t){return{id:t[n]+"=>"+t[o],parent:e._masterSubgraphsMap[""+t[n]],child:e._masterSubgraphsMap[""+t[o]]||e._masterVerticesMap[""+t[o]]}})),a=r.compare2(this._prevHierarchy,i,(function(e){return e.id}));a.exit.forEach((function(t){e._masterHierarchy=e._masterHierarchy.filter((function(e){return e.id!==t.id})),delete e._masterHierarchyMap[t.id]})),a.enter.forEach((function(t){e._masterHierarchy.push(t),e._masterHierarchyMap[t.id]=t})),this._prevHierarchy=i},n.prototype.update=function(t,r){this.mergeSubgraphs(),this.mergeVertices(),this.mergeEdges(),this.mergeHierarchy(),this.data({subgraphs:this._masterSubgraphs,vertices:this._masterVertices,edges:this._masterEdges,hierarchy:this._masterHierarchy}),e.prototype.update.call(this,t,r)},n.prototype.render=function(t){return e.prototype.render.call(this,(function(e){t&&t(e)})),this},c([t.publish([],"any","Subgraph Columns",null,{internal:!0}),h("design:type",Function)],n.prototype,"subgraphColumns",void 0),c([t.publish([],"any","Subgraphs",null,{internal:!0}),h("design:type",Function)],n.prototype,"subgraphs",void 0),c([t.publish("","string","Subgraph ID column"),h("design:type",Function)],n.prototype,"subgraphIDColumn",void 0),c([t.publish("","string","Subgraph Label column"),h("design:type",Function)],n.prototype,"subgraphLabelColumn",void 0),c([t.publish([],"any","Vertex Columns",null,{internal:!0}),h("design:type",Function)],n.prototype,"vertexColumns",void 0),c([t.publish([],"any","Vertices (Nodes)",null,{internal:!0}),h("design:type",Function)],n.prototype,"vertices",void 0),c([t.publish("","set","Vertex Category ID column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexCategoryColumn",void 0),c([t.publish("","set","Vertex ID column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexIDColumn",void 0),c([t.publish("","set","Vertex label column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexLabelColumn",void 0),c([t.publish("","set","Vertex centroid column (boolean)",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexCentroidColumn",void 0),c([t.publish("?","string","Vertex default FAChar"),h("design:type",Function)],n.prototype,"vertexFAChar",void 0),c([t.publish("","set","Vertex FAChar column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexFACharColumn",void 0),c([t.publish("","set","Vertex tooltip column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexTooltipColumn",void 0),c([t.publish([],"propertyArray","Annotations",null,{autoExpand:Zm}),h("design:type",Function)],n.prototype,"vertexAnnotationColumns",void 0),c([t.publish("","set","Vertex expansion FAChar column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexExpansionFACharColumn",void 0),c([t.publish([],"any","Edge columns",null,{internal:!0}),h("design:type",Function)],n.prototype,"edgeColumns",void 0),c([t.publish([],"any","Edges (Edges)",null,{internal:!0}),h("design:type",Function)],n.prototype,"edges",void 0),c([t.publish("","set","Edge ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeIDColumn",void 0),c([t.publish("","set","Edge label column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeLabelColumn",void 0),c([t.publish("","set","Edge source ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeSourceColumn",void 0),c([t.publish("","set","Edge target ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeTargetColumn",void 0),c([t.publish("","set","Edge weight column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeWeightColumn",void 0),c([t.publish("","set","Edge color column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeColorColumn",void 0),c([t.publish([],"any","Subgraph Columns"),h("design:type",Function)],n.prototype,"hierarchyColumns",void 0),c([t.publish([],"any","Subgraphs"),h("design:type",Function)],n.prototype,"hierarchy",void 0),c([t.publish("","string","Subgraph ID column"),h("design:type",Function)],n.prototype,"hierarchyParentIDColumn",void 0),c([t.publish("","string","Subgraph Label column"),h("design:type",Function)],n.prototype,"hierarchyChildIDColumn",void 0),n}(Ym);$m.prototype._class+=" graph_DataGraph";L(".graph_SankeyGraph .node rect{fill-opacity:.9;shape-rendering:crispEdges;stroke:#a9a9a9;cursor:move}.graph_SankeyGraph .node.selected rect{stroke:red}.graph_SankeyGraph .node.over rect{stroke:orange}.graph_SankeyGraph .node.selected.over rect{stroke:red}.graph_SankeyGraph .node text{pointer-events:none;text-shadow:0 1px 0 #fff}.graph_SankeyGraph .node.selected text{fill:red}.graph_SankeyGraph .node.over text{fill:orange}.graph_SankeyGraph .node.selected.over text{fill:red}.graph_SankeyGraph .link{fill:none;stroke:#000;stroke-opacity:.2}.graph_SankeyGraph .link:hover{stroke-opacity:.5}");var Qm=function(e){function n(){var r=e.call(this)||this;return r._prevVertices=[],r._masterVertices=[],r._masterVerticesMap={},r._prevEdges=[],r._masterEdges=[],t.Utility.SimpleSelectionMixin.call(r),r._drawStartPos="origin",r}return s(n,e),n.prototype.mergeVertices=function(){var e=this,t=this.vertexColumns(),n=this.vertexAnnotationColumns(),o=this.indexOf(t,this.vertexCategoryColumn(),"category"),i=this.indexOf(t,this.vertexIDColumn(),"id"),a=this.indexOf(t,this.vertexLabelColumn(),"label"),s=this.indexOf(t,this.vertexCentroidColumn(),"centroid"),u=this.indexOf(t,this.vertexTooltipColumn(),"tooltip"),c=n.map((function(r){return e.indexOf(t,r.columnID(),"")})),h=this.vertices().map((function(e){return{categoryID:""+e[o],id:""+e[i],text:""+e[a],tooltip:""+e[u],origData:Km(e,t),centroid:!!e[s],annotationIDs:c.map((function(t,r){return e[t]?n[r].annotationID():void 0})).filter((function(e){return!!e}))}})),l=r.compare2(this._prevVertices,h,(function(e){return e.id}));l.exit.forEach((function(t){e._masterVertices=e._masterVertices.filter((function(e){return e.id!==t.id}))})),l.enter.forEach((function(t){e._masterVertices.push(t),e._masterVerticesMap[t.id]=t})),this._prevVertices=h},n.prototype.indexOf=function(e,t,r){void 0===r&&(r="");var n=e.indexOf(t);return n>=0?n:e.indexOf(r)},n.prototype.mergeEdges=function(){var e=this,t=this.edgeColumns(),n=this.indexOf(t,this.edgeIDColumn(),"id"),o=this.indexOf(t,this.edgeSourceColumn(),"source"),i=this.indexOf(t,this.edgeTargetColumn(),"target"),a=this.indexOf(t,this.edgeLabelColumn(),"label"),s=this.indexOf(t,this.edgeWeightColumn(),"weight"),u=this.edges().map((function(r){var u=e._masterVerticesMap[""+r[o]];u||console.error('Invalid edge source entity "'.concat(r[o],'" does not exist.'));var c=e._masterVerticesMap[""+r[i]];return c||console.error('Invalid edge target entity "'.concat(r[i],'" does not exist.')),{type:"edge",id:n>=0?""+r[n]:r[o]+"->"+r[i],source:u,target:c,value:+r[s]||0,label:a>=0?""+r[a]:"",origData:Km(r,t)}})).filter((function(e){return e.source&&e.target})),c=r.compare2(this._masterEdges,u,(function(e){return e.id}));c.exit.forEach((function(t){e._masterEdges=e._masterEdges.filter((function(e){return e.id!==t.id}))})),c.enter.forEach((function(t){e._masterEdges.push(t)})),this._prevEdges=u},n.prototype.sankeyData=function(){return this.mergeVertices(),this.mergeEdges(),{vertices:this._masterVertices,edges:this._masterEdges}},n.prototype.enter=function(t,r){e.prototype.enter.call(this,t,r),this._d3Sankey=S_(),this._selection.widgetElement(r)},n.prototype.update=function(r,n){e.prototype.update.call(this,r,n),this._palette=this._palette.switch(this.paletteID());var o=this.vertexStrokeWidth(),i=this.sankeyData();this._d3Sankey.nodeId((function(e){return e.id})).extent([[0,0],[this.width(),this.height()]]),i.vertices.length>0&&this._d3Sankey({nodes:i.vertices,links:i.edges});var a=this,s=n.selectAll(".link").data(i.edges);s.enter().append("path").attr("class","link").each((function(){t.select(this).append("title")})).merge(s).attr("d",C_()).style("stroke-width",(function(e){return Math.max(1,e.width)})).select("title").text((function(e){return e.source.text+" → "+e.target.text+"\n"+e.value})),s.exit().remove();var u=n.selectAll(".node").data(i.vertices);u.enter().append("g").attr("class","node").call(this._selection.enter.bind(this._selection)).on("click",(function(e){a.click(e.origData,"",a._selection.selected(this))})).on("dblclick",(function(e){a.dblclick(e.origData,"",a._selection.selected(this))})).each((function(){var e=t.select(this);e.append("rect"),e.append("text")})).merge(u).attr("transform",(function(e){var t=0,r=0;return e.x0&&(t=e.x0),e.y0&&(r=e.y0),"translate("+(t+o)+","+(r+o)+")"})).each((function(){var e=t.select(this);e.select("rect").attr("height",(function(e){return e.y1-e.y0})).attr("width",(function(e){return e.x1-e.x0})).style("fill",(function(e){return a._palette(e.categoryID)})).style("stroke",(function(e){return a.vertexStrokeColor()})).style("stroke-width",(function(e){return o})).style("cursor",a.xAxisMovement()||a.yAxisMovement()?null:"default"),e.select("text").attr("x",-6).attr("y",(function(e){return(e.y1-e.y0)/2})).attr("dy",".35em").attr("text-anchor","end").attr("transform",null).text((function(e){return e.text})).filter((function(e){return e.x0<a.width()/2})).attr("x",6+a._d3Sankey.nodeWidth()).attr("text-anchor","start")})),u.exit().remove()},n.prototype.exit=function(t,r){e.prototype.exit.call(this,t,r)},n.prototype.click=function(e,t,r){},n.prototype.dblclick=function(e,t,r){},c([t.publish([],"any","Vertex Columns",null,{internal:!0}),h("design:type",Function)],n.prototype,"vertexColumns",void 0),c([t.publish([],"any","Vertices (Nodes)",null,{internal:!0}),h("design:type",Function)],n.prototype,"vertices",void 0),c([t.publish("","set","Vertex Category ID column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexCategoryColumn",void 0),c([t.publish("","set","Vertex ID column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexIDColumn",void 0),c([t.publish("","set","Vertex label column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexLabelColumn",void 0),c([t.publish("","set","Vertex centroid column (boolean)",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexCentroidColumn",void 0),c([t.publish("?","string","Vertex default FAChar"),h("design:type",Function)],n.prototype,"vertexFAChar",void 0),c([t.publish("","set","Vertex FAChar column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexFACharColumn",void 0),c([t.publish("","set","Vertex tooltip column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexTooltipColumn",void 0),c([t.publish([],"propertyArray","Annotations",null,{autoExpand:Zm}),h("design:type",Function)],n.prototype,"vertexAnnotationColumns",void 0),c([t.publish([],"any","Edge columns",null,{internal:!0}),h("design:type",Function)],n.prototype,"edgeColumns",void 0),c([t.publish([],"any","Edges (Edges)",null,{internal:!0}),h("design:type",Function)],n.prototype,"edges",void 0),c([t.publish("","set","Edge ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeIDColumn",void 0),c([t.publish("","set","Edge label column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeLabelColumn",void 0),c([t.publish("","set","Edge source ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeSourceColumn",void 0),c([t.publish("","set","Edge target ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeTargetColumn",void 0),c([t.publish("","set","Edge target ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeWeightColumn",void 0),n}(t.SVGWidget);Qm.prototype._class+=" graph_SankeyGraph",Qm.prototype.mixin(t.Utility.SimpleSelectionMixin),Qm.prototype._palette=t.Palette.ordinal("category10"),Qm.prototype.publish("paletteID","category10","set","Color palette for this widget",Qm.prototype._palette.switch()),Qm.prototype.publish("vertexStrokeWidth",1,"number","Vertex Stroke Width"),Qm.prototype.publish("vertexStrokeColor","darkgray","string","Vertex Stroke Color"),Qm.prototype.publish("vertexWidth",36,"number","Vertex Width"),Qm.prototype.publish("vertexPadding",20,"number","Vertex Padding"),Qm.prototype.publish("xAxisMovement",!1,"boolean","Enable x-axis movement"),Qm.prototype.publish("yAxisMovement",!1,"boolean","Enable y-axis movement");e.AdjacencyGraph=d_,e.Annotation=f_,e.AnnotationColumn=Zm,e.BUILD_VERSION="2.104.11",e.BasicEdge=Wm,e.BasicSubgraph=function(e){var t=e.label,r=void 0===t?"":t,n=e.labelFill,i=void 0===n?"black":n,a=e.labelHeight,s=void 0===a?12:a,u=e.width,c=void 0===u?0:u,h=e.height,l=void 0===h?0:h,f=e.rectFill,d=e.rectStroke,p=void 0===d?"#627ae7":d,g=e.rectStrokeWidth,v=void 0===g?2:g;return o.React.createElement("g",{transform:"translate(".concat(-c/2," ").concat(-l/2,")")},o.React.createElement("rect",{width:c,height:l,fill:f,stroke:p,style:{strokeWidth:v}}),o.React.createElement("g",{transform:"translate(8 ".concat(8+s,")")},o.React.createElement(o.Text,{text:r,fill:i,height:s})))},e.BasicVertex=function(e){var t=e.text,r=e.textFill,n=void 0===r?"black":r,i=e.textHeight,a=void 0===i?12:i,s=e.scale,u=void 0===s?1:s,c=e.circleRadius,h=void 0===c?16:c,l=e.circleFill,f=void 0===l?"#a2bcf9":l,d=e.circleStroke,p=void 0===d?"#627ae7":d,g=e.circleStrokeWidth,v=void 0===g?2:g;return o.React.createElement("g",{transform:"scale(".concat(u,")")},o.React.createElement("circle",{cx:"0",cy:"0",r:h,fill:f,stroke:p,style:{strokeWidth:v}}),o.React.createElement("g",{transform:"translate(0 ".concat(h+a,")")},o.React.createElement(o.Text,{text:t,fill:n,height:a})))},e.DataGraph=$m,e.Edge=R,e.Graph=h_,e.Graph2=Ym,e.GraphReactT=qm,e.GraphT=Gm,e.PKG_NAME="@hpcc-js/graph",e.PKG_VERSION="2.84.2",e.Sankey=I_,e.SankeyColumn=O_,e.SankeyGraph=Qm,e.Subgraph=u_,e.Vertex=c_,e.graphviz=function(e,t,r){return void 0===t&&(t="dot"),am({items:[],links:[],raw:e},{engine:t,wasmFolder:new URL(Bm,document.baseURI).href})},e.toJsonObj=Km,Object.defineProperty(e,"__esModule",{value:!0})}));
2
2
  //# sourceMappingURL=index.min.js.map