@marimo-team/frontend 0.14.11-dev7 → 0.14.11-dev72
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.
- package/dist/assets/{ConnectedDataExplorerComponent-C0P31a5y.js → ConnectedDataExplorerComponent-QNSg3r9O.js} +3 -3
- package/dist/assets/{ImageComparisonComponent-DXDeGx2f.js → ImageComparisonComponent-CP5Cy_nl.js} +1 -1
- package/dist/assets/{VegaLite-CUqFyetE.js → VegaLite-Dfe0Urmt.js} +8 -8
- package/dist/assets/_baseEach-Oq1b6Vj7.js +1 -0
- package/dist/assets/_baseMap-NO7KiGEP.js +1 -0
- package/dist/assets/_baseUniq-B_mvr7GI.js +1 -0
- package/dist/assets/{_createAggregator-SoA2y5HH.js → _createAggregator-DYHbrJKw.js} +1 -1
- package/dist/assets/{any-language-editor-Bw2cdBsS.js → any-language-editor-Bz6ZWwU_.js} +1 -1
- package/dist/assets/arc-ZB5pDULS.js +1 -0
- package/dist/assets/architectureDiagram-NQ2NVSRB-dvHYur4M.js +36 -0
- package/dist/assets/blockDiagram-PHRCVELO-DuGlfCPb.js +122 -0
- package/dist/assets/{c4Diagram-VJAJSXHY-BHtN7uMz.js → c4Diagram-6F6E4RAY-C1bcLnUs.js} +2 -2
- package/dist/assets/channel-DO4c6oXE.js +1 -0
- package/dist/assets/{chunk-4BMEZGHF-BO5DiwLV.js → chunk-353BL4L5-Z9QK1Sy2.js} +1 -1
- package/dist/assets/{chunk-D6G4REZN-CbYGlbyQ.js → chunk-67H74DCK-BfbQjnIB.js} +1 -1
- package/dist/assets/chunk-6OLS64BW-DwBkid2_.js +220 -0
- package/dist/assets/{chunk-XZIHB7SX-COKmet6t.js → chunk-AACKK3MU-EMbcCDOG.js} +1 -1
- package/dist/assets/chunk-BFAMUDN2-Smdd-nnU.js +1 -0
- package/dist/assets/chunk-E2GYISFI-CkjiRzlT.js +15 -0
- package/dist/assets/{chunk-A2AXSNBT-B07L-F60.js → chunk-QEP2MXWD-DXF9XFhg.js} +4 -3
- package/dist/assets/chunk-SKB7J2MH-amgUtKom.js +1 -0
- package/dist/assets/{circle-play-DSXPiHO0.js → circle-play-DXMV_zw8.js} +2 -2
- package/dist/assets/classDiagram-BGRH5UQR-CqrI7fcr.js +1 -0
- package/dist/assets/classDiagram-v2-O24JOBDK-CqrI7fcr.js +1 -0
- package/dist/assets/clone-DmicZLVp.js +1 -0
- package/dist/assets/compile-OQmqyn3d.js +10 -0
- package/dist/assets/dagre-FFZHY6LT-Dm7KedkK.js +4 -0
- package/dist/assets/data-grid-overlay-editor-0MMb3ORz.js +1 -0
- package/dist/assets/diagram-3EMPZRKU-D4ptO8ZX.js +24 -0
- package/dist/assets/diagram-5UYTHUR4-DBDXUsko.js +24 -0
- package/dist/assets/diagram-ZTM2IBQH-DwVHm-a7.js +43 -0
- package/dist/assets/edit-page-rhiVKwbK.js +148 -0
- package/dist/assets/{erDiagram-Q7BY3M3F-l-V_9Yws.js → erDiagram-R3QVA2FD-CF2j_ghF.js} +1 -1
- package/dist/assets/flowDiagram-PKI6S5ZS-J8Af8aQY.js +162 -0
- package/dist/assets/ganttDiagram-EK5VF46D-BvmXCoQK.js +267 -0
- package/dist/assets/gitGraphDiagram-GW3U2K7C-Cr7iejkN.js +65 -0
- package/dist/assets/glide-data-editor-DcmjcDkq.css +1 -0
- package/dist/assets/glide-data-editor-dRdzyJuS.js +132 -0
- package/dist/assets/{graph-DpLAfWzk.js → graph-DQMI2Eqq.js} +1 -1
- package/dist/assets/home-page-DnThjRcD.js +9 -0
- package/dist/assets/{index-Bz3Lb65G.js → index-8OV_Dw5k.js} +1 -1
- package/dist/assets/{index-CxQo8Qlm.js → index-8PMBSacA.js} +1 -1
- package/dist/assets/{index-DAMc4rP9.js → index-B7HBR2mZ.js} +1 -1
- package/dist/assets/{index-C9EbJL5c.js → index-BDA641Ri.js} +1 -1
- package/dist/assets/index-BEQfoZiP.js +1 -0
- package/dist/assets/{index-DP4HiwTU.js → index-BRkwCtw_.js} +1 -1
- package/dist/assets/index-BYFCOF0M.js +1 -0
- package/dist/assets/{index-Cs9jrmWP.js → index-BgVLJCds.js} +1 -1
- package/dist/assets/{index-DQwFB8dN.js → index-C1UTJg_P.js} +2 -2
- package/dist/assets/{index-DZWCSqpf.js → index-C75-E0Wz.js} +1 -1
- package/dist/assets/index-CfmtzcxT.js +1 -0
- package/dist/assets/index-Cj-dQTQ3.js +1 -0
- package/dist/assets/{index-DbunLlvf.js → index-Cn4DIfCi.js} +1 -1
- package/dist/assets/index-CsdFJkJw.css +1 -0
- package/dist/assets/index-D6n-fNiw.js +1 -0
- package/dist/assets/{index-Czo055fo.js → index-DMYp6bTi.js} +1 -1
- package/dist/assets/index-DUfE3Ygv.js +507 -0
- package/dist/assets/{index-Cig6xGYH.js → index-DcLIgqZD.js} +1 -1
- package/dist/assets/index-DntrNFd9.js +1 -0
- package/dist/assets/{index-CmVTfWOx.js → index-T57zmtXp.js} +1 -1
- package/dist/assets/{index-N67HDT2u.js → index-nJgUkZhZ.js} +1 -1
- package/dist/assets/infoDiagram-RLU2ROGC-6ayEwNHi.js +2 -0
- package/dist/assets/journeyDiagram-EWQZEKCU-CufyRuPd.js +139 -0
- package/dist/assets/{kanban-definition-NDS4AKOZ-Cw4Vh4wD.js → kanban-definition-ILFWEQ3N-BMVZp5Z-.js} +9 -8
- package/dist/assets/{layout-DodQLUx6.js → layout-D6cZFix-.js} +1 -1
- package/dist/assets/linear-CwIDADia.js +1 -0
- package/dist/assets/links-BNNDBIJj.js +17 -0
- package/dist/assets/loro_wasm_bg-bPYKkGLG.wasm +0 -0
- package/dist/assets/mermaid-Bhkvxu54.js +152 -0
- package/dist/assets/min-BCL-6Bwx.js +1 -0
- package/dist/assets/{mindmap-definition-ALO5MXBD-C0KGo_i_.js → mindmap-definition-CZNETY7S-C_MYXj4X.js} +4 -4
- package/dist/assets/number-overlay-editor-Df2FevAR.js +9 -0
- package/dist/assets/{pieDiagram-IB7DONF6-DCnELF9y.js → pieDiagram-NIOCPIFQ-Bk9T2le2.js} +1 -1
- package/dist/assets/{quadrantDiagram-7GDLP6J5-D0cP5ixt.js → quadrantDiagram-2OG54O6I-NgH_B06m.js} +1 -1
- package/dist/assets/{react-plotly-BmDAcz3M.js → react-plotly-CXOmDiE0.js} +1 -1
- package/dist/assets/{requirementDiagram-KVF5MWMF-BTksN04O.js → requirementDiagram-SO3GGRV7-HvEJIPC2.js} +3 -3
- package/dist/assets/run-page-Mq0VpxGL.js +1 -0
- package/dist/assets/{sankeyDiagram-QLVOVGJD-DECOJIMC.js → sankeyDiagram-4UZDY2LN-CBGiR7n-.js} +4 -4
- package/dist/assets/save-worker-B8gk1S9x.js +1 -0
- package/dist/assets/sequenceDiagram-ZIKVLSP4-C7hXviAB.js +122 -0
- package/dist/assets/slides-component-1Y9n5Gm1.js +1 -0
- package/dist/assets/sortBy-DvcUtmWI.js +1 -0
- package/dist/assets/stateDiagram-XX37X6EN-BDbxDzSy.js +1 -0
- package/dist/assets/stateDiagram-v2-GD6S3NHB-omlXEd8A.js +1 -0
- package/dist/assets/storage-lmv2DjR1.js +25 -0
- package/dist/assets/{terminal-MtCDBvKs.js → terminal-DKZoyrP7.js} +1 -1
- package/dist/assets/{time-BoP93jle.js → time-y8i94pyX.js} +1 -1
- package/dist/assets/timeline-definition-RI47OAVP-DYNkDwyx.js +61 -0
- package/dist/assets/tracing-DGevMtzp.js +2 -0
- package/dist/assets/trash-CtRVuIVX.js +6 -0
- package/dist/assets/treemap-FKARHQ26-BVbfYHyM.js +126 -0
- package/dist/assets/vega-component-DQf7Z9TU.js +1 -0
- package/dist/assets/worker-BYA2ASe8.js +1 -0
- package/dist/assets/worker-Ch6cKXnI.js +1 -0
- package/dist/assets/xychartDiagram-H2YORKM3-BZbRNiRy.js +7 -0
- package/dist/index.html +4 -2
- package/package.json +45 -44
- package/dist/assets/_baseEach-BHb51vC7.js +0 -1
- package/dist/assets/_baseMap--rH4lBFQ.js +0 -1
- package/dist/assets/_baseUniq-CABXtSlj.js +0 -1
- package/dist/assets/arc-CfyY4LWz.js +0 -1
- package/dist/assets/architectureDiagram-IEHRJDOE-rGoAHYH8.js +0 -36
- package/dist/assets/blockDiagram-JOT3LUYC-ZBJWq8Z_.js +0 -121
- package/dist/assets/channel-C96bdTqW.js +0 -1
- package/dist/assets/chunk-AEK57VVT-DN2-tsCz.js +0 -220
- package/dist/assets/chunk-RZ5BOZE2-DVex9AD8.js +0 -1
- package/dist/assets/classDiagram-GIVACNV2-CehC5H1T.js +0 -1
- package/dist/assets/classDiagram-v2-COTLJTTW-CehC5H1T.js +0 -1
- package/dist/assets/clone-H0gxlZXI.js +0 -1
- package/dist/assets/compile-DEz1Y6_F.js +0 -10
- package/dist/assets/dagre-OKDRZEBW-CymbL2JX.js +0 -4
- package/dist/assets/data-editor-CTGVBJdC.js +0 -142
- package/dist/assets/diagram-SSKATNLV-DY5vs_Bj.js +0 -43
- package/dist/assets/diagram-VNBRO52H-ZuQiOKh8.js +0 -24
- package/dist/assets/edit-page-DcQ6ZhfW.js +0 -144
- package/dist/assets/flowDiagram-4HSFHLVR-BsHIJJTe.js +0 -161
- package/dist/assets/ganttDiagram-APWFNJXF-2gy5YbWU.js +0 -257
- package/dist/assets/gitGraphDiagram-7IBYFJ6S-B_ELHLbw.js +0 -65
- package/dist/assets/home-page-6auHzaGk.js +0 -9
- package/dist/assets/index-8IZtaDUn.css +0 -1
- package/dist/assets/index-B-mClP__.js +0 -1
- package/dist/assets/index-BuqjbKw0.js +0 -1
- package/dist/assets/index-C9EPiaCd.js +0 -1
- package/dist/assets/index-DDVWq6NK.js +0 -501
- package/dist/assets/index-FYYNNs_X.js +0 -1
- package/dist/assets/index-kmp97oxc.js +0 -1
- package/dist/assets/infoDiagram-PH2N3AL5-BwbaSo89.js +0 -2
- package/dist/assets/journeyDiagram-U35MCT3I-NKSvtlZA.js +0 -138
- package/dist/assets/linear-B_OPGLLI.js +0 -1
- package/dist/assets/loro_wasm_bg-DHBNbovs.wasm +0 -0
- package/dist/assets/mermaid-CVRC4Ruz.js +0 -152
- package/dist/assets/min-VmgWsmJ_.js +0 -1
- package/dist/assets/radar-MK3ICKWK-D8LhkSau.js +0 -126
- package/dist/assets/run-page-17VQxU3e.js +0 -1
- package/dist/assets/save-worker-DZnx0AG9.js +0 -1
- package/dist/assets/sequenceDiagram-X6HHIX6F-C5eDWwoH.js +0 -122
- package/dist/assets/shutdown-button-QvkERkPd.js +0 -17
- package/dist/assets/slides-component-DchvPU9C.js +0 -1
- package/dist/assets/sortBy-7ke7bFD2.js +0 -1
- package/dist/assets/stateDiagram-DGXRK772-D6Kwy963.js +0 -1
- package/dist/assets/stateDiagram-v2-YXO3MK2T-Bk10XR94.js +0 -1
- package/dist/assets/storage-BeNhlsrY.js +0 -27
- package/dist/assets/timeline-definition-BDJGKUSR-T1la59d1.js +0 -61
- package/dist/assets/tracing-CCltm96L.js +0 -2
- package/dist/assets/vega-component-j1BDb2QJ.js +0 -1
- package/dist/assets/worker-BbdB3qWL.js +0 -1
- package/dist/assets/worker-CnoOKJWk.js +0 -1
- package/dist/assets/xychartDiagram-VJFVF3MP-CoJqer7_.js +0 -7
- /package/dist/assets/{shutdown-button-C1rhMrxo.css → links-C1rhMrxo.css} +0 -0
- /package/dist/assets/{transform-DetRMEbJ.js → transform-CDNfLgV5.js} +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
import{J as b,aD as d,bV as g,bW as O,x as y,Q as j,bX as x,az as w,S as P,bY as M,ay as V,aB as W}from"./index-DUfE3Ygv.js";import{a as v}from"./_baseEach-Oq1b6Vj7.js";import{d as z}from"./_baseUniq-B_mvr7GI.js";import{b as B}from"./_baseMap-NO7KiGEP.js";var c=Object.prototype,D=c.hasOwnProperty,J=b(function(a,n){a=Object(a);var u=-1,t=n.length,r=t>2?n[2]:void 0;for(r&&d(n[0],n[1],r)&&(t=1);++u<t;)for(var s=n[u],o=g(s),i=-1,l=o.length;++i<l;){var e=o[i],f=a[e];(f===void 0||O(f,c[e])&&!D.call(a,e))&&(a[e]=s[e])}return a});function Q(a){var n=a==null?0:a.length;return n?a[n-1]:void 0}var S=Math.max,p,X=(p=function(a,n,u){var t=a==null?0:a.length;if(!t)return-1;var r=u==null?0:x(u);return r<0&&(r=S(t+r,0)),z(a,v(n),r)},function(a,n,u){var t=Object(a);if(!y(a)){var r=v(n);a=j(a),n=function(o){return r(t[o],o,t)}}var s=p(a,n,u);return s>-1?t[r?a[s]:s]:void 0});function Y(a,n){return(P(a)?w:B)(a,v(n))}var _=Object.prototype.hasOwnProperty;function k(a,n){return a!=null&&_.call(a,n)}function q(a,n){return a!=null&&M(a,n,k)}function h(a,n){return a<n}function m(a,n,u){for(var t=-1,r=a.length;++t<r;){var s=a[t],o=n(s);if(o!=null&&(i===void 0?o==o&&!V(o):u(o,i)))var i=o,l=s}return l}function A(a){return a&&a.length?m(a,W,h):void 0}export{h as a,m as b,A as c,J as d,X as f,q as h,Q as l,Y as m};
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import{_ as x,l as j,c as J,I as mt,S as _t,G as Q,h as K,T as vt,V as Nt,W as At,a3 as Tt,O as Lt}from"./mermaid-CVRC4Ruz.js";import{c as ot}from"./cytoscape.esm-UYyVlru8.js";import{y as Ot}from"./index-DDVWq6NK.js";import{s as Dt}from"./transform-DetRMEbJ.js";import"./step-BwsUM5iJ.js";import"./timer-Bqd5yn_a.js";var st,at={exports:{}},ht={exports:{}},lt={exports:{}};function It(){return st?lt.exports:(st=1,N=function(){return function(A){var f={};function p(e){if(f[e])return f[e].exports;var t=f[e]={i:e,l:!1,exports:{}};return A[e].call(t.exports,t,t.exports,p),t.l=!0,t.exports}return p.m=A,p.c=f,p.i=function(e){return e},p.d=function(e,t,i){p.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},p.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(t,"a",t),t},p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p.p="",p(p.s=26)}([function(A,f,p){function e(){}e.QUALITY=1,e.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,e.DEFAULT_INCREMENTAL=!1,e.DEFAULT_ANIMATION_ON_LAYOUT=!0,e.DEFAULT_ANIMATION_DURING_LAYOUT=!1,e.DEFAULT_ANIMATION_PERIOD=50,e.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,e.DEFAULT_GRAPH_MARGIN=15,e.NODE_DIMENSIONS_INCLUDE_LABELS=!1,e.SIMPLE_NODE_SIZE=40,e.SIMPLE_NODE_HALF_SIZE=e.SIMPLE_NODE_SIZE/2,e.EMPTY_COMPOUND_NODE_SIZE=40,e.MIN_EDGE_LENGTH=1,e.WORLD_BOUNDARY=1e6,e.INITIAL_WORLD_BOUNDARY=e.WORLD_BOUNDARY/1e3,e.WORLD_CENTER_X=1200,e.WORLD_CENTER_Y=900,A.exports=e},function(A,f,p){var e=p(2),t=p(8),i=p(9);function r(o,h,a){e.call(this,a),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=a,this.bendpoints=[],this.source=o,this.target=h}for(var n in r.prototype=Object.create(e.prototype),e)r[n]=e[n];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(o){if(this.source===o)return this.target;if(this.target===o)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(o,h){for(var a=this.getOtherEnd(o),l=h.getGraphManager().getRoot();;){if(a.getOwner()==h)return a;if(a.getOwner()==l)break;a=a.getOwner().getParent()}return null},r.prototype.updateLength=function(){var o=new Array(4);this.isOverlapingSourceAndTarget=t.getIntersection(this.target.getRect(),this.source.getRect(),o),this.isOverlapingSourceAndTarget||(this.lengthX=o[0]-o[2],this.lengthY=o[1]-o[3],Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},A.exports=r},function(A,f,p){A.exports=function(e){this.vGraphObject=e}},function(A,f,p){var e=p(2),t=p(10),i=p(13),r=p(0),n=p(16),o=p(4);function h(l,E,m,g){m==null&&g==null&&(g=E),e.call(this,g),l.graphManager!=null&&(l=l.graphManager),this.estimatedSize=t.MIN_VALUE,this.inclusionTreeDepth=t.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=l,this.rect=m!=null&&E!=null?new i(E.x,E.y,m.width,m.height):new i}for(var a in h.prototype=Object.create(e.prototype),e)h[a]=e[a];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(l){this.rect.width=l},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(l){this.rect.height=l},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new o(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new o(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},h.prototype.setRect=function(l,E){this.rect.x=l.x,this.rect.y=l.y,this.rect.width=E.width,this.rect.height=E.height},h.prototype.setCenter=function(l,E){this.rect.x=l-this.rect.width/2,this.rect.y=E-this.rect.height/2},h.prototype.setLocation=function(l,E){this.rect.x=l,this.rect.y=E},h.prototype.moveBy=function(l,E){this.rect.x+=l,this.rect.y+=E},h.prototype.getEdgeListToNode=function(l){var E=[],m=this;return m.edges.forEach(function(g){if(g.target==l){if(g.source!=m)throw"Incorrect edge source!";E.push(g)}}),E},h.prototype.getEdgesBetween=function(l){var E=[],m=this;return m.edges.forEach(function(g){if(g.source!=m&&g.target!=m)throw"Incorrect edge source and/or target";g.target!=l&&g.source!=l||E.push(g)}),E},h.prototype.getNeighborsList=function(){var l=new Set,E=this;return E.edges.forEach(function(m){if(m.source==E)l.add(m.target);else{if(m.target!=E)throw"Incorrect incidency!";l.add(m.source)}}),l},h.prototype.withChildren=function(){var l=new Set;if(l.add(this),this.child!=null)for(var E=this.child.getNodes(),m=0;m<E.length;m++)E[m].withChildren().forEach(function(g){l.add(g)});return l},h.prototype.getNoOfChildren=function(){var l=0;if(this.child==null)l=1;else for(var E=this.child.getNodes(),m=0;m<E.length;m++)l+=E[m].getNoOfChildren();return l==0&&(l=1),l},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==t.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},h.prototype.scatter=function(){var l,E,m=-r.INITIAL_WORLD_BOUNDARY,g=r.INITIAL_WORLD_BOUNDARY;l=r.WORLD_CENTER_X+n.nextDouble()*(g-m)+m;var _=-r.INITIAL_WORLD_BOUNDARY,L=r.INITIAL_WORLD_BOUNDARY;E=r.WORLD_CENTER_Y+n.nextDouble()*(L-_)+_,this.rect.x=l,this.rect.y=E},h.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var l=this.getChild();if(l.updateBounds(!0),this.rect.x=l.getLeft(),this.rect.y=l.getTop(),this.setWidth(l.getRight()-l.getLeft()),this.setHeight(l.getBottom()-l.getTop()),r.NODE_DIMENSIONS_INCLUDE_LABELS){var E=l.getRight()-l.getLeft(),m=l.getBottom()-l.getTop();this.labelWidth>E&&(this.rect.x-=(this.labelWidth-E)/2,this.setWidth(this.labelWidth)),this.labelHeight>m&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-m)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-m),this.setHeight(this.labelHeight))}}},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==t.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(l){var E=this.rect.x;E>r.WORLD_BOUNDARY?E=r.WORLD_BOUNDARY:E<-r.WORLD_BOUNDARY&&(E=-r.WORLD_BOUNDARY);var m=this.rect.y;m>r.WORLD_BOUNDARY?m=r.WORLD_BOUNDARY:m<-r.WORLD_BOUNDARY&&(m=-r.WORLD_BOUNDARY);var g=new o(E,m),_=l.inverseTransformPoint(g);this.setLocation(_.x,_.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=h},function(A,f,p){function e(t,i){t==null&&i==null?(this.x=0,this.y=0):(this.x=t,this.y=i)}e.prototype.getX=function(){return this.x},e.prototype.getY=function(){return this.y},e.prototype.setX=function(t){this.x=t},e.prototype.setY=function(t){this.y=t},e.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},e.prototype.getCopy=function(){return new e(this.x,this.y)},e.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},A.exports=e},function(A,f,p){var e=p(2),t=p(10),i=p(0),r=p(6),n=p(3),o=p(1),h=p(13),a=p(12),l=p(11);function E(g,_,L){e.call(this,L),this.estimatedSize=t.MIN_VALUE,this.margin=i.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,_!=null&&_ instanceof r?this.graphManager=_:_!=null&&_ instanceof Layout&&(this.graphManager=_.graphManager)}for(var m in E.prototype=Object.create(e.prototype),e)E[m]=e[m];E.prototype.getNodes=function(){return this.nodes},E.prototype.getEdges=function(){return this.edges},E.prototype.getGraphManager=function(){return this.graphManager},E.prototype.getParent=function(){return this.parent},E.prototype.getLeft=function(){return this.left},E.prototype.getRight=function(){return this.right},E.prototype.getTop=function(){return this.top},E.prototype.getBottom=function(){return this.bottom},E.prototype.isConnected=function(){return this.isConnected},E.prototype.add=function(g,_,L){if(_==null&&L==null){var v=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(v)>-1)throw"Node already in graph!";return v.owner=this,this.getNodes().push(v),v}var T=g;if(!(this.getNodes().indexOf(_)>-1&&this.getNodes().indexOf(L)>-1))throw"Source or target not in graph!";if(_.owner!=L.owner||_.owner!=this)throw"Both owners must be this graph!";return _.owner!=L.owner?null:(T.source=_,T.target=L,T.isInterGraph=!1,this.getEdges().push(T),_.edges.push(T),L!=_&&L.edges.push(T),T)},E.prototype.remove=function(g){var _=g;if(g instanceof n){if(_==null)throw"Node is null!";if(_.owner==null||_.owner!=this)throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var L=_.edges.slice(),v=L.length,T=0;T<v;T++)(u=L[T]).isInterGraph?this.graphManager.remove(u):u.source.owner.remove(u);if((I=this.nodes.indexOf(_))==-1)throw"Node not in owner node list!";this.nodes.splice(I,1)}else if(g instanceof o){var u;if((u=g)==null)throw"Edge is null!";if(u.source==null||u.target==null)throw"Source and/or target is null!";if(u.source.owner==null||u.target.owner==null||u.source.owner!=this||u.target.owner!=this)throw"Source and/or target owner is invalid!";var I,s=u.source.edges.indexOf(u),c=u.target.edges.indexOf(u);if(!(s>-1&&c>-1))throw"Source and/or target doesn't know this edge!";if(u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(c,1),(I=u.source.owner.getEdges().indexOf(u))==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(I,1)}},E.prototype.updateLeftTop=function(){for(var g,_,L,v=t.MAX_VALUE,T=t.MAX_VALUE,u=this.getNodes(),I=u.length,s=0;s<I;s++){var c=u[s];v>(g=c.getTop())&&(v=g),T>(_=c.getLeft())&&(T=_)}return v==t.MAX_VALUE?null:(L=u[0].getParent().paddingLeft!=null?u[0].getParent().paddingLeft:this.margin,this.left=T-L,this.top=v-L,new a(this.left,this.top))},E.prototype.updateBounds=function(g){for(var _,L,v,T,u,I=t.MAX_VALUE,s=-t.MAX_VALUE,c=t.MAX_VALUE,d=-t.MAX_VALUE,y=this.nodes,O=y.length,D=0;D<O;D++){var w=y[D];g&&w.child!=null&&w.updateBounds(),I>(_=w.getLeft())&&(I=_),s<(L=w.getRight())&&(s=L),c>(v=w.getTop())&&(c=v),d<(T=w.getBottom())&&(d=T)}var R=new h(I,c,s-I,d-c);I==t.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),u=y[0].getParent().paddingLeft!=null?y[0].getParent().paddingLeft:this.margin,this.left=R.x-u,this.right=R.x+R.width+u,this.top=R.y-u,this.bottom=R.y+R.height+u},E.calculateBounds=function(g){for(var _,L,v,T,u=t.MAX_VALUE,I=-t.MAX_VALUE,s=t.MAX_VALUE,c=-t.MAX_VALUE,d=g.length,y=0;y<d;y++){var O=g[y];u>(_=O.getLeft())&&(u=_),I<(L=O.getRight())&&(I=L),s>(v=O.getTop())&&(s=v),c<(T=O.getBottom())&&(c=T)}return new h(u,s,I-u,c-s)},E.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},E.prototype.getEstimatedSize=function(){if(this.estimatedSize==t.MIN_VALUE)throw"assert failed";return this.estimatedSize},E.prototype.calcEstimatedSize=function(){for(var g=0,_=this.nodes,L=_.length,v=0;v<L;v++)g+=_[v].calcEstimatedSize();return this.estimatedSize=g==0?i.EMPTY_COMPOUND_NODE_SIZE:g/Math.sqrt(this.nodes.length),this.estimatedSize},E.prototype.updateConnected=function(){var g=this;if(this.nodes.length!=0){var _,L,v=new l,T=new Set,u=this.nodes[0];for(u.withChildren().forEach(function(d){v.push(d),T.add(d)});v.length!==0;)for(var I=(_=(u=v.shift()).getEdges()).length,s=0;s<I;s++)(L=_[s].getOtherEndInGraph(u,this))==null||T.has(L)||L.withChildren().forEach(function(d){v.push(d),T.add(d)});if(this.isConnected=!1,T.size>=this.nodes.length){var c=0;T.forEach(function(d){d.owner==g&&c++}),c==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},A.exports=E},function(A,f,p){var e,t=p(1);function i(r){e=p(5),this.layout=r,this.graphs=[],this.edges=[]}i.prototype.addRoot=function(){var r=this.layout.newGraph(),n=this.layout.newNode(null),o=this.add(r,n);return this.setRootGraph(o),this.rootGraph},i.prototype.add=function(r,n,o,h,a){if(o==null&&h==null&&a==null){if(r==null)throw"Graph is null!";if(n==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(n.child!=null)throw"Already has a child!";return r.parent=n,n.child=r,r}a=o,o=r;var l=(h=n).getOwner(),E=a.getOwner();if(l==null||l.getGraphManager()!=this)throw"Source not in this graph mgr!";if(E==null||E.getGraphManager()!=this)throw"Target not in this graph mgr!";if(l==E)return o.isInterGraph=!1,l.add(o,h,a);if(o.isInterGraph=!0,o.source=h,o.target=a,this.edges.indexOf(o)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(o),o.source==null||o.target==null)throw"Edge source and/or target is null!";if(o.source.edges.indexOf(o)!=-1||o.target.edges.indexOf(o)!=-1)throw"Edge already in source and/or target incidency list!";return o.source.edges.push(o),o.target.edges.push(o),o},i.prototype.remove=function(r){if(r instanceof e){var n=r;if(n.getGraphManager()!=this)throw"Graph not in this graph mgr";if(n!=this.rootGraph&&(n.parent==null||n.parent.graphManager!=this))throw"Invalid parent node!";for(var o,h=[],a=(h=h.concat(n.getEdges())).length,l=0;l<a;l++)o=h[l],n.remove(o);var E,m=[];for(a=(m=m.concat(n.getNodes())).length,l=0;l<a;l++)E=m[l],n.remove(E);n==this.rootGraph&&this.setRootGraph(null);var g=this.graphs.indexOf(n);this.graphs.splice(g,1),n.parent=null}else if(r instanceof t){if((o=r)==null)throw"Edge is null!";if(!o.isInterGraph)throw"Not an inter-graph edge!";if(o.source==null||o.target==null)throw"Source and/or target is null!";if(o.source.edges.indexOf(o)==-1||o.target.edges.indexOf(o)==-1)throw"Source and/or target doesn't know this edge!";if(g=o.source.edges.indexOf(o),o.source.edges.splice(g,1),g=o.target.edges.indexOf(o),o.target.edges.splice(g,1),o.source.owner==null||o.source.owner.getGraphManager()==null)throw"Edge owner graph or owner graph manager is null!";if(o.source.owner.getGraphManager().edges.indexOf(o)==-1)throw"Not in owner graph manager's edge list!";g=o.source.owner.getGraphManager().edges.indexOf(o),o.source.owner.getGraphManager().edges.splice(g,1)}},i.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},i.prototype.getGraphs=function(){return this.graphs},i.prototype.getAllNodes=function(){if(this.allNodes==null){for(var r=[],n=this.getGraphs(),o=n.length,h=0;h<o;h++)r=r.concat(n[h].getNodes());this.allNodes=r}return this.allNodes},i.prototype.resetAllNodes=function(){this.allNodes=null},i.prototype.resetAllEdges=function(){this.allEdges=null},i.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},i.prototype.getAllEdges=function(){if(this.allEdges==null){var r=[],n=this.getGraphs();n.length;for(var o=0;o<n.length;o++)r=r.concat(n[o].getEdges());r=r.concat(this.edges),this.allEdges=r}return this.allEdges},i.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},i.prototype.setAllNodesToApplyGravitation=function(r){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=r},i.prototype.getRoot=function(){return this.rootGraph},i.prototype.setRootGraph=function(r){if(r.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=r,r.parent==null&&(r.parent=this.layout.newNode("Root node"))},i.prototype.getLayout=function(){return this.layout},i.prototype.isOneAncestorOfOther=function(r,n){if(r==null||n==null)throw"assert failed";if(r==n)return!0;for(var o,h=r.getOwner();(o=h.getParent())!=null;){if(o==n)return!0;if((h=o.getOwner())==null)break}for(h=n.getOwner();(o=h.getParent())!=null;){if(o==r)return!0;if((h=o.getOwner())==null)break}return!1},i.prototype.calcLowestCommonAncestors=function(){for(var r,n,o,h,a,l=this.getAllEdges(),E=l.length,m=0;m<E;m++)if(n=(r=l[m]).source,o=r.target,r.lca=null,r.sourceInLca=n,r.targetInLca=o,n!=o){for(h=n.getOwner();r.lca==null;){for(r.targetInLca=o,a=o.getOwner();r.lca==null;){if(a==h){r.lca=a;break}if(a==this.rootGraph)break;if(r.lca!=null)throw"assert failed";r.targetInLca=a.getParent(),a=r.targetInLca.getOwner()}if(h==this.rootGraph)break;r.lca==null&&(r.sourceInLca=h.getParent(),h=r.sourceInLca.getOwner())}if(r.lca==null)throw"assert failed"}else r.lca=n.getOwner()},i.prototype.calcLowestCommonAncestor=function(r,n){if(r==n)return r.getOwner();for(var o=r.getOwner();o!=null;){for(var h=n.getOwner();h!=null;){if(h==o)return h;h=h.getParent().getOwner()}o=o.getParent().getOwner()}return o},i.prototype.calcInclusionTreeDepths=function(r,n){var o;r==null&&n==null&&(r=this.rootGraph,n=1);for(var h=r.getNodes(),a=h.length,l=0;l<a;l++)(o=h[l]).inclusionTreeDepth=n,o.child!=null&&this.calcInclusionTreeDepths(o.child,n+1)},i.prototype.includesInvalidEdge=function(){for(var r,n=this.edges.length,o=0;o<n;o++)if(r=this.edges[o],this.isOneAncestorOfOther(r.source,r.target))return!0;return!1},A.exports=i},function(A,f,p){var e=p(0);function t(){}for(var i in e)t[i]=e[i];t.MAX_ITERATIONS=2500,t.DEFAULT_EDGE_LENGTH=50,t.DEFAULT_SPRING_STRENGTH=.45,t.DEFAULT_REPULSION_STRENGTH=4500,t.DEFAULT_GRAVITY_STRENGTH=.4,t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,t.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,t.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,t.COOLING_ADAPTATION_FACTOR=.33,t.ADAPTATION_LOWER_NODE_LIMIT=1e3,t.ADAPTATION_UPPER_NODE_LIMIT=5e3,t.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,t.MAX_NODE_DISPLACEMENT=3*t.MAX_NODE_DISPLACEMENT_INCREMENTAL,t.MIN_REPULSION_DIST=t.DEFAULT_EDGE_LENGTH/10,t.CONVERGENCE_CHECK_PERIOD=100,t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,t.MIN_EDGE_LENGTH=1,t.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=t},function(A,f,p){var e=p(12);function t(){}t.calcSeparationAmount=function(i,r,n,o){if(!i.intersects(r))throw"assert failed";var h=new Array(2);this.decideDirectionsForOverlappingNodes(i,r,h),n[0]=Math.min(i.getRight(),r.getRight())-Math.max(i.x,r.x),n[1]=Math.min(i.getBottom(),r.getBottom())-Math.max(i.y,r.y),i.getX()<=r.getX()&&i.getRight()>=r.getRight()?n[0]+=Math.min(r.getX()-i.getX(),i.getRight()-r.getRight()):r.getX()<=i.getX()&&r.getRight()>=i.getRight()&&(n[0]+=Math.min(i.getX()-r.getX(),r.getRight()-i.getRight())),i.getY()<=r.getY()&&i.getBottom()>=r.getBottom()?n[1]+=Math.min(r.getY()-i.getY(),i.getBottom()-r.getBottom()):r.getY()<=i.getY()&&r.getBottom()>=i.getBottom()&&(n[1]+=Math.min(i.getY()-r.getY(),r.getBottom()-i.getBottom()));var a=Math.abs((r.getCenterY()-i.getCenterY())/(r.getCenterX()-i.getCenterX()));r.getCenterY()===i.getCenterY()&&r.getCenterX()===i.getCenterX()&&(a=1);var l=a*n[0],E=n[1]/a;n[0]<E?E=n[0]:l=n[1],n[0]=-1*h[0]*(E/2+o),n[1]=-1*h[1]*(l/2+o)},t.decideDirectionsForOverlappingNodes=function(i,r,n){i.getCenterX()<r.getCenterX()?n[0]=-1:n[0]=1,i.getCenterY()<r.getCenterY()?n[1]=-1:n[1]=1},t.getIntersection2=function(i,r,n){var o=i.getCenterX(),h=i.getCenterY(),a=r.getCenterX(),l=r.getCenterY();if(i.intersects(r))return n[0]=o,n[1]=h,n[2]=a,n[3]=l,!0;var E=i.getX(),m=i.getY(),g=i.getRight(),_=i.getX(),L=i.getBottom(),v=i.getRight(),T=i.getWidthHalf(),u=i.getHeightHalf(),I=r.getX(),s=r.getY(),c=r.getRight(),d=r.getX(),y=r.getBottom(),O=r.getRight(),D=r.getWidthHalf(),w=r.getHeightHalf(),R=!1,C=!1;if(o===a){if(h>l)return n[0]=o,n[1]=m,n[2]=a,n[3]=y,!1;if(h<l)return n[0]=o,n[1]=L,n[2]=a,n[3]=s,!1}else if(h===l){if(o>a)return n[0]=E,n[1]=h,n[2]=c,n[3]=l,!1;if(o<a)return n[0]=g,n[1]=h,n[2]=I,n[3]=l,!1}else{var M=i.height/i.width,S=r.height/r.width,G=(l-h)/(a-o),Y=void 0,F=void 0,P=void 0,b=void 0,k=void 0,U=void 0;if(-M===G?o>a?(n[0]=_,n[1]=L,R=!0):(n[0]=g,n[1]=m,R=!0):M===G&&(o>a?(n[0]=E,n[1]=m,R=!0):(n[0]=v,n[1]=L,R=!0)),-S===G?a>o?(n[2]=d,n[3]=y,C=!0):(n[2]=c,n[3]=s,C=!0):S===G&&(a>o?(n[2]=I,n[3]=s,C=!0):(n[2]=O,n[3]=y,C=!0)),R&&C)return!1;if(o>a?h>l?(Y=this.getCardinalDirection(M,G,4),F=this.getCardinalDirection(S,G,2)):(Y=this.getCardinalDirection(-M,G,3),F=this.getCardinalDirection(-S,G,1)):h>l?(Y=this.getCardinalDirection(-M,G,1),F=this.getCardinalDirection(-S,G,3)):(Y=this.getCardinalDirection(M,G,2),F=this.getCardinalDirection(S,G,4)),!R)switch(Y){case 1:b=m,P=o+-u/G,n[0]=P,n[1]=b;break;case 2:P=v,b=h+T*G,n[0]=P,n[1]=b;break;case 3:b=L,P=o+u/G,n[0]=P,n[1]=b;break;case 4:P=_,b=h+-T*G,n[0]=P,n[1]=b}if(!C)switch(F){case 1:U=s,k=a+-w/G,n[2]=k,n[3]=U;break;case 2:k=O,U=l+D*G,n[2]=k,n[3]=U;break;case 3:U=y,k=a+w/G,n[2]=k,n[3]=U;break;case 4:k=d,U=l+-D*G,n[2]=k,n[3]=U}}return!1},t.getCardinalDirection=function(i,r,n){return i>r?n:1+n%4},t.getIntersection=function(i,r,n,o){if(o==null)return this.getIntersection2(i,r,n);var h,a,l,E,m,g,_,L=i.x,v=i.y,T=r.x,u=r.y,I=n.x,s=n.y,c=o.x,d=o.y;return(_=(h=u-v)*(E=I-c)-(a=d-s)*(l=L-T))===0?null:new e((l*(g=c*s-I*d)-E*(m=T*v-L*u))/_,(a*m-h*g)/_)},t.angleOfVector=function(i,r,n,o){var h=void 0;return i!==n?(h=Math.atan((o-r)/(n-i)),n<i?h+=Math.PI:o<r&&(h+=this.TWO_PI)):h=o<r?this.ONE_AND_HALF_PI:this.HALF_PI,h},t.doIntersect=function(i,r,n,o){var h=i.x,a=i.y,l=r.x,E=r.y,m=n.x,g=n.y,_=o.x,L=o.y,v=(l-h)*(L-g)-(_-m)*(E-a);if(v===0)return!1;var T=((L-g)*(_-h)+(m-_)*(L-a))/v,u=((a-E)*(_-h)+(l-h)*(L-a))/v;return 0<T&&T<1&&0<u&&u<1},t.HALF_PI=.5*Math.PI,t.ONE_AND_HALF_PI=1.5*Math.PI,t.TWO_PI=2*Math.PI,t.THREE_PI=3*Math.PI,A.exports=t},function(A,f,p){function e(){}e.sign=function(t){return t>0?1:t<0?-1:0},e.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},e.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},A.exports=e},function(A,f,p){function e(){}e.MAX_VALUE=2147483647,e.MIN_VALUE=-2147483648,A.exports=e},function(A,f,p){var e=function(){function o(h,a){for(var l=0;l<a.length;l++){var E=a[l];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(h,E.key,E)}}return function(h,a,l){return a&&o(h.prototype,a),l&&o(h,l),h}}(),t=function(o){return{value:o,next:null,prev:null}},i=function(o,h,a,l){return o!==null?o.next=h:l.head=h,a!==null?a.prev=h:l.tail=h,h.prev=o,h.next=a,l.length++,h},r=function(o,h){var a=o.prev,l=o.next;return a!==null?a.next=l:h.head=l,l!==null?l.prev=a:h.tail=a,o.prev=o.next=null,h.length--,o},n=function(){function o(h){var a=this;(function(l,E){if(!(l instanceof E))throw new TypeError("Cannot call a class as a function")})(this,o),this.length=0,this.head=null,this.tail=null,h!=null&&h.forEach(function(l){return a.push(l)})}return e(o,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(h,a){return i(a.prev,t(h),a,this)}},{key:"insertAfter",value:function(h,a){return i(a,t(h),a.next,this)}},{key:"insertNodeBefore",value:function(h,a){return i(a.prev,h,a,this)}},{key:"insertNodeAfter",value:function(h,a){return i(a,h,a.next,this)}},{key:"push",value:function(h){return i(this.tail,t(h),null,this)}},{key:"unshift",value:function(h){return i(null,t(h),this.head,this)}},{key:"remove",value:function(h){return r(h,this)}},{key:"pop",value:function(){return r(this.tail,this).value}},{key:"popNode",value:function(){return r(this.tail,this)}},{key:"shift",value:function(){return r(this.head,this).value}},{key:"shiftNode",value:function(){return r(this.head,this)}},{key:"get_object_at",value:function(h){if(h<=this.length()){for(var a=1,l=this.head;a<h;)l=l.next,a++;return l.value}}},{key:"set_object_at",value:function(h,a){if(h<=this.length()){for(var l=1,E=this.head;l<h;)E=E.next,l++;E.value=a}}}]),o}();A.exports=n},function(A,f,p){function e(t,i,r){this.x=null,this.y=null,t==null&&i==null&&r==null?(this.x=0,this.y=0):typeof t=="number"&&typeof i=="number"&&r==null?(this.x=t,this.y=i):t.constructor.name=="Point"&&i==null&&r==null&&(r=t,this.x=r.x,this.y=r.y)}e.prototype.getX=function(){return this.x},e.prototype.getY=function(){return this.y},e.prototype.getLocation=function(){return new e(this.x,this.y)},e.prototype.setLocation=function(t,i,r){t.constructor.name=="Point"&&i==null&&r==null?(r=t,this.setLocation(r.x,r.y)):typeof t=="number"&&typeof i=="number"&&r==null&&(parseInt(t)==t&&parseInt(i)==i?this.move(t,i):(this.x=Math.floor(t+.5),this.y=Math.floor(i+.5)))},e.prototype.move=function(t,i){this.x=t,this.y=i},e.prototype.translate=function(t,i){this.x+=t,this.y+=i},e.prototype.equals=function(t){if(t.constructor.name=="Point"){var i=t;return this.x==i.x&&this.y==i.y}return this==t},e.prototype.toString=function(){return new e().constructor.name+"[x="+this.x+",y="+this.y+"]"},A.exports=e},function(A,f,p){function e(t,i,r,n){this.x=0,this.y=0,this.width=0,this.height=0,t!=null&&i!=null&&r!=null&&n!=null&&(this.x=t,this.y=i,this.width=r,this.height=n)}e.prototype.getX=function(){return this.x},e.prototype.setX=function(t){this.x=t},e.prototype.getY=function(){return this.y},e.prototype.setY=function(t){this.y=t},e.prototype.getWidth=function(){return this.width},e.prototype.setWidth=function(t){this.width=t},e.prototype.getHeight=function(){return this.height},e.prototype.setHeight=function(t){this.height=t},e.prototype.getRight=function(){return this.x+this.width},e.prototype.getBottom=function(){return this.y+this.height},e.prototype.intersects=function(t){return!(this.getRight()<t.x||this.getBottom()<t.y||t.getRight()<this.x||t.getBottom()<this.y)},e.prototype.getCenterX=function(){return this.x+this.width/2},e.prototype.getMinX=function(){return this.getX()},e.prototype.getMaxX=function(){return this.getX()+this.width},e.prototype.getCenterY=function(){return this.y+this.height/2},e.prototype.getMinY=function(){return this.getY()},e.prototype.getMaxY=function(){return this.getY()+this.height},e.prototype.getWidthHalf=function(){return this.width/2},e.prototype.getHeightHalf=function(){return this.height/2},A.exports=e},function(A,f,p){var e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i};function t(){}t.lastID=0,t.createID=function(i){return t.isPrimitive(i)?i:(i.uniqueID!=null||(i.uniqueID=t.getString(),t.lastID++),i.uniqueID)},t.getString=function(i){return i==null&&(i=t.lastID),"Object#"+i},t.isPrimitive=function(i){var r=i===void 0?"undefined":e(i);return i==null||r!="object"&&r!="function"},A.exports=t},function(A,f,p){function e(m){if(Array.isArray(m)){for(var g=0,_=Array(m.length);g<m.length;g++)_[g]=m[g];return _}return Array.from(m)}var t=p(0),i=p(6),r=p(3),n=p(1),o=p(5),h=p(4),a=p(17),l=p(27);function E(m){l.call(this),this.layoutQuality=t.QUALITY,this.createBendsAsNeeded=t.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=t.DEFAULT_INCREMENTAL,this.animationOnLayout=t.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=t.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=t.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=t.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new i(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,m!=null&&(this.isRemoteUse=m)}E.RANDOM_SEED=1,E.prototype=Object.create(l.prototype),E.prototype.getGraphManager=function(){return this.graphManager},E.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},E.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},E.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},E.prototype.newGraphManager=function(){var m=new i(this);return this.graphManager=m,m},E.prototype.newGraph=function(m){return new o(null,this.graphManager,m)},E.prototype.newNode=function(m){return new r(this.graphManager,m)},E.prototype.newEdge=function(m){return new n(null,null,m)},E.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},E.prototype.runLayout=function(){var m;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),m=!this.checkLayoutSuccess()&&this.layout(),t.ANIMATE!=="during"&&(m&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,m)},E.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},E.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var m=this.graphManager.getAllEdges(),g=0;g<m.length;g++)m[g];var _=this.graphManager.getRoot().getNodes();for(g=0;g<_.length;g++)_[g];this.update(this.graphManager.getRoot())}},E.prototype.update=function(m){if(m==null)this.update2();else if(m instanceof r){var g=m;if(g.getChild()!=null)for(var _=g.getChild().getNodes(),L=0;L<_.length;L++)update(_[L]);g.vGraphObject!=null&&g.vGraphObject.update(g)}else if(m instanceof n){var v=m;v.vGraphObject!=null&&v.vGraphObject.update(v)}else if(m instanceof o){var T=m;T.vGraphObject!=null&&T.vGraphObject.update(T)}},E.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=t.QUALITY,this.animationDuringLayout=t.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=t.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=t.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=t.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=t.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=t.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},E.prototype.transform=function(m){if(m==null)this.transform(new h(0,0));else{var g=new a,_=this.graphManager.getRoot().updateLeftTop();if(_!=null){g.setWorldOrgX(m.x),g.setWorldOrgY(m.y),g.setDeviceOrgX(_.x),g.setDeviceOrgY(_.y);for(var L=this.getAllNodes(),v=0;v<L.length;v++)L[v].transform(g)}}},E.prototype.positionNodesRandomly=function(m){if(m==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var g,_,L=m.getNodes(),v=0;v<L.length;v++)(_=(g=L[v]).getChild())==null||_.getNodes().length==0?g.scatter():(this.positionNodesRandomly(_),g.updateBounds())},E.prototype.getFlatForest=function(){for(var m=[],g=!0,_=this.graphManager.getRoot().getNodes(),L=!0,v=0;v<_.length;v++)_[v].getChild()!=null&&(L=!1);if(!L)return m;var T=new Set,u=[],I=new Map,s=[];for(s=s.concat(_);s.length>0&&g;){for(u.push(s[0]);u.length>0&&g;){var c=u[0];u.splice(0,1),T.add(c);var d=c.getEdges();for(v=0;v<d.length;v++){var y=d[v].getOtherEnd(c);if(I.get(c)!=y){if(T.has(y)){g=!1;break}u.push(y),I.set(y,c)}}}if(g){var O=[].concat(e(T));for(m.push(O),v=0;v<O.length;v++){var D=O[v],w=s.indexOf(D);w>-1&&s.splice(w,1)}T=new Set,I=new Map}else m=[]}return m},E.prototype.createDummyNodesForBendpoints=function(m){for(var g=[],_=m.source,L=this.graphManager.calcLowestCommonAncestor(m.source,m.target),v=0;v<m.bendpoints.length;v++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),L.add(T);var u=this.newEdge(null);this.graphManager.add(u,_,T),g.add(T),_=T}return u=this.newEdge(null),this.graphManager.add(u,_,m.target),this.edgeToDummyNodes.set(m,g),m.isInterGraph()?this.graphManager.remove(m):L.remove(m),g},E.prototype.createBendpointsFromDummyNodes=function(){var m=[];m=m.concat(this.graphManager.getAllEdges()),m=[].concat(e(this.edgeToDummyNodes.keys())).concat(m);for(var g=0;g<m.length;g++){var _=m[g];if(_.bendpoints.length>0){for(var L=this.edgeToDummyNodes.get(_),v=0;v<L.length;v++){var T=L[v],u=new h(T.getCenterX(),T.getCenterY()),I=_.bendpoints.get(v);I.x=u.x,I.y=u.y,T.getOwner().remove(T)}this.graphManager.add(_,_.source,_.target)}}},E.transform=function(m,g,_,L){if(_!=null&&L!=null){var v=g;return m<=50?v-=(g-g/_)/50*(50-m):v+=(g*L-g)/50*(m-50),v}var T,u;return m<=50?(T=9*g/500,u=g/10):(T=9*g/50,u=-8*g),T*m+u},E.findCenterOfTree=function(m){var g=[];g=g.concat(m);var _=[],L=new Map,v=!1,T=null;g.length!=1&&g.length!=2||(v=!0,T=g[0]);for(var u=0;u<g.length;u++){var I=(d=g[u]).getNeighborsList().size;L.set(d,d.getNeighborsList().size),I==1&&_.push(d)}var s=[];for(s=s.concat(_);!v;){var c=[];for(c=c.concat(s),s=[],u=0;u<g.length;u++){var d=g[u],y=g.indexOf(d);y>=0&&g.splice(y,1),d.getNeighborsList().forEach(function(O){if(_.indexOf(O)<0){var D=L.get(O)-1;D==1&&s.push(O),L.set(O,D)}})}_=_.concat(s),g.length!=1&&g.length!=2||(v=!0,T=g[0])}return T},E.prototype.setGraphManager=function(m){this.graphManager=m},A.exports=E},function(A,f,p){function e(){}e.seed=1,e.x=0,e.nextDouble=function(){return e.x=1e4*Math.sin(e.seed++),e.x-Math.floor(e.x)},A.exports=e},function(A,f,p){var e=p(4);function t(i,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}t.prototype.getWorldOrgX=function(){return this.lworldOrgX},t.prototype.setWorldOrgX=function(i){this.lworldOrgX=i},t.prototype.getWorldOrgY=function(){return this.lworldOrgY},t.prototype.setWorldOrgY=function(i){this.lworldOrgY=i},t.prototype.getWorldExtX=function(){return this.lworldExtX},t.prototype.setWorldExtX=function(i){this.lworldExtX=i},t.prototype.getWorldExtY=function(){return this.lworldExtY},t.prototype.setWorldExtY=function(i){this.lworldExtY=i},t.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},t.prototype.setDeviceOrgX=function(i){this.ldeviceOrgX=i},t.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},t.prototype.setDeviceOrgY=function(i){this.ldeviceOrgY=i},t.prototype.getDeviceExtX=function(){return this.ldeviceExtX},t.prototype.setDeviceExtX=function(i){this.ldeviceExtX=i},t.prototype.getDeviceExtY=function(){return this.ldeviceExtY},t.prototype.setDeviceExtY=function(i){this.ldeviceExtY=i},t.prototype.transformX=function(i){var r=0,n=this.lworldExtX;return n!=0&&(r=this.ldeviceOrgX+(i-this.lworldOrgX)*this.ldeviceExtX/n),r},t.prototype.transformY=function(i){var r=0,n=this.lworldExtY;return n!=0&&(r=this.ldeviceOrgY+(i-this.lworldOrgY)*this.ldeviceExtY/n),r},t.prototype.inverseTransformX=function(i){var r=0,n=this.ldeviceExtX;return n!=0&&(r=this.lworldOrgX+(i-this.ldeviceOrgX)*this.lworldExtX/n),r},t.prototype.inverseTransformY=function(i){var r=0,n=this.ldeviceExtY;return n!=0&&(r=this.lworldOrgY+(i-this.ldeviceOrgY)*this.lworldExtY/n),r},t.prototype.inverseTransformPoint=function(i){return new e(this.inverseTransformX(i.x),this.inverseTransformY(i.y))},A.exports=t},function(A,f,p){var e=p(15),t=p(7),i=p(0),r=p(8),n=p(9);function o(){e.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}for(var h in o.prototype=Object.create(e.prototype),e)o[h]=e[h];o.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},o.prototype.calcIdealEdgeLengths=function(){for(var a,l,E,m,g,_,L=this.getGraphManager().getAllEdges(),v=0;v<L.length;v++)(a=L[v]).idealLength=this.idealEdgeLength,a.isInterGraph&&(E=a.getSource(),m=a.getTarget(),g=a.getSourceInLca().getEstimatedSize(),_=a.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(a.idealLength+=g+_-2*i.SIMPLE_NODE_SIZE),l=a.getLca().getInclusionTreeDepth(),a.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(E.getInclusionTreeDepth()+m.getInclusionTreeDepth()-2*l))},o.prototype.initSpringEmbedder=function(){var a=this.getAllNodes().length;this.incremental?(a>t.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(a-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(a>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(a-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},o.prototype.calcSpringForces=function(){for(var a,l=this.getAllEdges(),E=0;E<l.length;E++)a=l[E],this.calcSpringForce(a,a.idealLength)},o.prototype.calcRepulsionForces=function(){var a,l,E,m,g,_=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],L=arguments.length>1&&arguments[1]!==void 0&&arguments[1],v=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&_&&this.updateGrid(),g=new Set,a=0;a<v.length;a++)E=v[a],this.calculateRepulsionForceOfANode(E,g,_,L),g.add(E);else for(a=0;a<v.length;a++)for(E=v[a],l=a+1;l<v.length;l++)m=v[l],E.getOwner()==m.getOwner()&&this.calcRepulsionForce(E,m)},o.prototype.calcGravitationalForces=function(){for(var a,l=this.getAllNodesToApplyGravitation(),E=0;E<l.length;E++)a=l[E],this.calcGravitationalForce(a)},o.prototype.moveNodes=function(){for(var a=this.getAllNodes(),l=0;l<a.length;l++)a[l].move()},o.prototype.calcSpringForce=function(a,l){var E,m,g,_,L=a.getSource(),v=a.getTarget();if(this.uniformLeafNodeSizes&&L.getChild()==null&&v.getChild()==null)a.updateLengthSimple();else if(a.updateLength(),a.isOverlapingSourceAndTarget)return;(E=a.getLength())!=0&&(g=(m=this.springConstant*(E-l))*(a.lengthX/E),_=m*(a.lengthY/E),L.springForceX+=g,L.springForceY+=_,v.springForceX-=g,v.springForceY-=_)},o.prototype.calcRepulsionForce=function(a,l){var E,m,g,_,L,v,T,u=a.getRect(),I=l.getRect(),s=new Array(2),c=new Array(4);if(u.intersects(I)){r.calcSeparationAmount(u,I,s,t.DEFAULT_EDGE_LENGTH/2),v=2*s[0],T=2*s[1];var d=a.noOfChildren*l.noOfChildren/(a.noOfChildren+l.noOfChildren);a.repulsionForceX-=d*v,a.repulsionForceY-=d*T,l.repulsionForceX+=d*v,l.repulsionForceY+=d*T}else this.uniformLeafNodeSizes&&a.getChild()==null&&l.getChild()==null?(E=I.getCenterX()-u.getCenterX(),m=I.getCenterY()-u.getCenterY()):(r.getIntersection(u,I,c),E=c[2]-c[0],m=c[3]-c[1]),Math.abs(E)<t.MIN_REPULSION_DIST&&(E=n.sign(E)*t.MIN_REPULSION_DIST),Math.abs(m)<t.MIN_REPULSION_DIST&&(m=n.sign(m)*t.MIN_REPULSION_DIST),g=E*E+m*m,_=Math.sqrt(g),v=(L=this.repulsionConstant*a.noOfChildren*l.noOfChildren/g)*E/_,T=L*m/_,a.repulsionForceX-=v,a.repulsionForceY-=T,l.repulsionForceX+=v,l.repulsionForceY+=T},o.prototype.calcGravitationalForce=function(a){var l,E,m,g,_,L,v,T;E=((l=a.getOwner()).getRight()+l.getLeft())/2,m=(l.getTop()+l.getBottom())/2,g=a.getCenterX()-E,_=a.getCenterY()-m,L=Math.abs(g)+a.getWidth()/2,v=Math.abs(_)+a.getHeight()/2,a.getOwner()==this.graphManager.getRoot()?(L>(T=l.getEstimatedSize()*this.gravityRangeFactor)||v>T)&&(a.gravitationForceX=-this.gravityConstant*g,a.gravitationForceY=-this.gravityConstant*_):(L>(T=l.getEstimatedSize()*this.compoundGravityRangeFactor)||v>T)&&(a.gravitationForceX=-this.gravityConstant*g*this.compoundGravityConstant,a.gravitationForceY=-this.gravityConstant*_*this.compoundGravityConstant)},o.prototype.isConverged=function(){var a,l=!1;return this.totalIterations>this.maxIterations/3&&(l=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),a=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,a||l},o.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},o.prototype.calcNoOfChildrenForAllNodes=function(){for(var a,l=this.graphManager.getAllNodes(),E=0;E<l.length;E++)(a=l[E]).noOfChildren=a.getNoOfChildren()},o.prototype.calcGrid=function(a){var l,E;l=parseInt(Math.ceil((a.getRight()-a.getLeft())/this.repulsionRange)),E=parseInt(Math.ceil((a.getBottom()-a.getTop())/this.repulsionRange));for(var m=new Array(l),g=0;g<l;g++)m[g]=new Array(E);for(g=0;g<l;g++)for(var _=0;_<E;_++)m[g][_]=new Array;return m},o.prototype.addNodeToGrid=function(a,l,E){var m,g,_,L;m=parseInt(Math.floor((a.getRect().x-l)/this.repulsionRange)),g=parseInt(Math.floor((a.getRect().width+a.getRect().x-l)/this.repulsionRange)),_=parseInt(Math.floor((a.getRect().y-E)/this.repulsionRange)),L=parseInt(Math.floor((a.getRect().height+a.getRect().y-E)/this.repulsionRange));for(var v=m;v<=g;v++)for(var T=_;T<=L;T++)this.grid[v][T].push(a),a.setGridCoordinates(m,g,_,L)},o.prototype.updateGrid=function(){var a,l,E=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),a=0;a<E.length;a++)l=E[a],this.addNodeToGrid(l,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},o.prototype.calculateRepulsionForceOfANode=function(a,l,E,m){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&E||m){var g,_=new Set;a.surrounding=new Array;for(var L=this.grid,v=a.startX-1;v<a.finishX+2;v++)for(var T=a.startY-1;T<a.finishY+2;T++)if(!(v<0||T<0||v>=L.length||T>=L[0].length)){for(var u=0;u<L[v][T].length;u++)if(g=L[v][T][u],a.getOwner()==g.getOwner()&&a!=g&&!l.has(g)&&!_.has(g)){var I=Math.abs(a.getCenterX()-g.getCenterX())-(a.getWidth()/2+g.getWidth()/2),s=Math.abs(a.getCenterY()-g.getCenterY())-(a.getHeight()/2+g.getHeight()/2);I<=this.repulsionRange&&s<=this.repulsionRange&&_.add(g)}}a.surrounding=[].concat(function(c){if(Array.isArray(c)){for(var d=0,y=Array(c.length);d<c.length;d++)y[d]=c[d];return y}return Array.from(c)}(_))}for(v=0;v<a.surrounding.length;v++)this.calcRepulsionForce(a,a.surrounding[v])},o.prototype.calcRepulsionRange=function(){return 0},A.exports=o},function(A,f,p){var e=p(1),t=p(7);function i(n,o,h){e.call(this,n,o,h),this.idealLength=t.DEFAULT_EDGE_LENGTH}for(var r in i.prototype=Object.create(e.prototype),e)i[r]=e[r];A.exports=i},function(A,f,p){var e=p(3);function t(r,n,o,h){e.call(this,r,n,o,h),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var i in t.prototype=Object.create(e.prototype),e)t[i]=e[i];t.prototype.setGridCoordinates=function(r,n,o,h){this.startX=r,this.finishX=n,this.startY=o,this.finishY=h},A.exports=t},function(A,f,p){function e(t,i){this.width=0,this.height=0,t!==null&&i!==null&&(this.height=i,this.width=t)}e.prototype.getWidth=function(){return this.width},e.prototype.setWidth=function(t){this.width=t},e.prototype.getHeight=function(){return this.height},e.prototype.setHeight=function(t){this.height=t},A.exports=e},function(A,f,p){var e=p(14);function t(){this.map={},this.keys=[]}t.prototype.put=function(i,r){var n=e.createID(i);this.contains(n)||(this.map[n]=r,this.keys.push(i))},t.prototype.contains=function(i){return e.createID(i),this.map[i]!=null},t.prototype.get=function(i){var r=e.createID(i);return this.map[r]},t.prototype.keySet=function(){return this.keys},A.exports=t},function(A,f,p){var e=p(14);function t(){this.set={}}t.prototype.add=function(i){var r=e.createID(i);this.contains(r)||(this.set[r]=i)},t.prototype.remove=function(i){delete this.set[e.createID(i)]},t.prototype.clear=function(){this.set={}},t.prototype.contains=function(i){return this.set[e.createID(i)]==i},t.prototype.isEmpty=function(){return this.size()===0},t.prototype.size=function(){return Object.keys(this.set).length},t.prototype.addAllTo=function(i){for(var r=Object.keys(this.set),n=r.length,o=0;o<n;o++)i.push(this.set[r[o]])},t.prototype.size=function(){return Object.keys(this.set).length},t.prototype.addAll=function(i){for(var r=i.length,n=0;n<r;n++){var o=i[n];this.add(o)}},A.exports=t},function(A,f,p){var e=function(){function r(n,o){for(var h=0;h<o.length;h++){var a=o[h];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(n,a.key,a)}}return function(n,o,h){return o&&r(n.prototype,o),h&&r(n,h),n}}(),t=p(11),i=function(){function r(n,o){(function(a,l){if(!(a instanceof l))throw new TypeError("Cannot call a class as a function")})(this,r),o===null&&o===void 0||(this.compareFunction=this._defaultCompareFunction);var h=void 0;h=n instanceof t?n.size():n.length,this._quicksort(n,0,h-1)}return e(r,[{key:"_quicksort",value:function(n,o,h){if(o<h){var a=this._partition(n,o,h);this._quicksort(n,o,a),this._quicksort(n,a+1,h)}}},{key:"_partition",value:function(n,o,h){for(var a=this._get(n,o),l=o,E=h;;){for(;this.compareFunction(a,this._get(n,E));)E--;for(;this.compareFunction(this._get(n,l),a);)l++;if(!(l<E))return E;this._swap(n,l,E),l++,E--}}},{key:"_get",value:function(n,o){return n instanceof t?n.get_object_at(o):n[o]}},{key:"_set",value:function(n,o,h){n instanceof t?n.set_object_at(o,h):n[o]=h}},{key:"_swap",value:function(n,o,h){var a=this._get(n,o);this._set(n,o,this._get(n,h)),this._set(n,h,a)}},{key:"_defaultCompareFunction",value:function(n,o){return o>n}}]),r}();A.exports=i},function(A,f,p){var e=function(){function i(r,n){for(var o=0;o<n.length;o++){var h=n[o];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(r,h.key,h)}}return function(r,n,o){return n&&i(r.prototype,n),o&&i(r,o),r}}(),t=function(){function i(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;(function(_,L){if(!(_ instanceof L))throw new TypeError("Cannot call a class as a function")})(this,i),this.sequence1=r,this.sequence2=n,this.match_score=o,this.mismatch_penalty=h,this.gap_penalty=a,this.iMax=r.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var l=0;l<this.iMax;l++){this.grid[l]=new Array(this.jMax);for(var E=0;E<this.jMax;E++)this.grid[l][E]=0}this.tracebackGrid=new Array(this.iMax);for(var m=0;m<this.iMax;m++){this.tracebackGrid[m]=new Array(this.jMax);for(var g=0;g<this.jMax;g++)this.tracebackGrid[m][g]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return e(i,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var r=1;r<this.jMax;r++)this.grid[0][r]=this.grid[0][r-1]+this.gap_penalty,this.tracebackGrid[0][r]=[!1,!1,!0];for(var n=1;n<this.iMax;n++)this.grid[n][0]=this.grid[n-1][0]+this.gap_penalty,this.tracebackGrid[n][0]=[!1,!0,!1];for(var o=1;o<this.iMax;o++)for(var h=1;h<this.jMax;h++){var a=[this.sequence1[o-1]===this.sequence2[h-1]?this.grid[o-1][h-1]+this.match_score:this.grid[o-1][h-1]+this.mismatch_penalty,this.grid[o-1][h]+this.gap_penalty,this.grid[o][h-1]+this.gap_penalty],l=this.arrayAllMaxIndexes(a);this.grid[o][h]=a[l[0]],this.tracebackGrid[o][h]=[l.includes(0),l.includes(1),l.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var r=[];for(r.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});r[0];){var n=r[0],o=this.tracebackGrid[n.pos[0]][n.pos[1]];o[0]&&r.push({pos:[n.pos[0]-1,n.pos[1]-1],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),o[1]&&r.push({pos:[n.pos[0]-1,n.pos[1]],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:"-"+n.seq2}),o[2]&&r.push({pos:[n.pos[0],n.pos[1]-1],seq1:"-"+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),n.pos[0]===0&&n.pos[1]===0&&this.alignments.push({sequence1:n.seq1,sequence2:n.seq2}),r.shift()}return this.alignments}},{key:"getAllIndexes",value:function(r,n){for(var o=[],h=-1;(h=r.indexOf(n,h+1))!==-1;)o.push(h);return o}},{key:"arrayAllMaxIndexes",value:function(r){return this.getAllIndexes(r,Math.max.apply(null,r))}}]),i}();A.exports=t},function(A,f,p){var e=function(){};e.FDLayout=p(18),e.FDLayoutConstants=p(7),e.FDLayoutEdge=p(19),e.FDLayoutNode=p(20),e.DimensionD=p(21),e.HashMap=p(22),e.HashSet=p(23),e.IGeometry=p(8),e.IMath=p(9),e.Integer=p(10),e.Point=p(12),e.PointD=p(4),e.RandomSeed=p(16),e.RectangleD=p(13),e.Transform=p(17),e.UniqueIDGeneretor=p(14),e.Quicksort=p(24),e.LinkedList=p(11),e.LGraphObject=p(2),e.LGraph=p(5),e.LEdge=p(1),e.LGraphManager=p(6),e.LNode=p(3),e.Layout=p(15),e.LayoutConstants=p(0),e.NeedlemanWunsch=p(25),A.exports=e},function(A,f,p){function e(){this.listeners=[]}var t=e.prototype;t.addListener=function(i,r){this.listeners.push({event:i,callback:r})},t.removeListener=function(i,r){for(var n=this.listeners.length;n>=0;n--){var o=this.listeners[n];o.event===i&&o.callback===r&&this.listeners.splice(n,1)}},t.emit=function(i,r){for(var n=0;n<this.listeners.length;n++){var o=this.listeners[n];i===o.event&&o.callback(r)}},A.exports=e}])},lt.exports=N());var N}var gt,ct,ut,wt=(ct||(ct=1,ut=function(N){return function(A){var f={};function p(e){if(f[e])return f[e].exports;var t=f[e]={i:e,l:!1,exports:{}};return A[e].call(t.exports,t,t.exports,p),t.l=!0,t.exports}return p.m=A,p.c=f,p.i=function(e){return e},p.d=function(e,t,i){p.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},p.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(t,"a",t),t},p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p.p="",p(p.s=1)}([function(A,f){A.exports=N},function(A,f,p){var e=p(0).layoutBase.LayoutConstants,t=p(0).layoutBase.FDLayoutConstants,i=p(0).CoSEConstants,r=p(0).CoSELayout,n=p(0).CoSENode,o=p(0).layoutBase.PointD,h=p(0).layoutBase.DimensionD,a={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function l(g){this.options=function(_,L){var v={};for(var T in _)v[T]=_[T];for(var T in L)v[T]=L[T];return v}(a,g),E(this.options)}var E=function(g){g.nodeRepulsion!=null&&(i.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=g.nodeRepulsion),g.idealEdgeLength!=null&&(i.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=g.idealEdgeLength),g.edgeElasticity!=null&&(i.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=g.edgeElasticity),g.nestingFactor!=null&&(i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.nestingFactor),g.gravity!=null&&(i.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=g.gravity),g.numIter!=null&&(i.MAX_ITERATIONS=t.MAX_ITERATIONS=g.numIter),g.gravityRange!=null&&(i.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=g.gravityRange),g.gravityCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.gravityCompound),g.gravityRangeCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.gravityRangeCompound),g.initialEnergyOnIncremental!=null&&(i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.initialEnergyOnIncremental),g.quality=="draft"?e.QUALITY=0:g.quality=="proof"?e.QUALITY=2:e.QUALITY=1,i.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=e.NODE_DIMENSIONS_INCLUDE_LABELS=g.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=e.DEFAULT_INCREMENTAL=!g.randomize,i.ANIMATE=t.ANIMATE=e.ANIMATE=g.animate,i.TILE=g.tile,i.TILING_PADDING_VERTICAL=typeof g.tilingPaddingVertical=="function"?g.tilingPaddingVertical.call():g.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof g.tilingPaddingHorizontal=="function"?g.tilingPaddingHorizontal.call():g.tilingPaddingHorizontal};l.prototype.run=function(){var g,_,L=this.options;this.idToLNode={};var v=this.layout=new r,T=this;T.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var u=v.newGraphManager();this.gm=u;var I=this.options.eles.nodes(),s=this.options.eles.edges();this.root=u.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(I),v);for(var c=0;c<s.length;c++){var d=s[c],y=this.idToLNode[d.data("source")],O=this.idToLNode[d.data("target")];y!==O&&y.getEdgesBetween(O).length==0&&(u.add(v.newEdge(),y,O).id=d.id())}var D=function(R,C){typeof R=="number"&&(R=C);var M=R.data("id"),S=T.idToLNode[M];return{x:S.getRect().getCenterX(),y:S.getRect().getCenterY()}},w=function R(){for(var C,M=function(){L.fit&&L.cy.fit(L.eles,L.padding),g||(g=!0,T.cy.one("layoutready",L.ready),T.cy.trigger({type:"layoutready",layout:T}))},S=T.options.refresh,G=0;G<S&&!C;G++)C=T.stopped||T.layout.tick();if(C)return v.checkLayoutSuccess()&&!v.isSubLayout&&v.doPostLayout(),v.tilingPostLayout&&v.tilingPostLayout(),v.isLayoutFinished=!0,T.options.eles.nodes().positions(D),M(),T.cy.one("layoutstop",T.options.stop),T.cy.trigger({type:"layoutstop",layout:T}),_&&cancelAnimationFrame(_),void(g=!1);var Y=T.layout.getPositionsData();L.eles.nodes().positions(function(F,P){if(typeof F=="number"&&(F=P),!F.isParent()){for(var b=F.id(),k=Y[b],U=F;k==null&&(k=Y[U.data("parent")]||Y["DummyCompound_"+U.data("parent")],Y[b]=k,(U=U.parent()[0])!=null););return k!=null?{x:k.x,y:k.y}:{x:F.position("x"),y:F.position("y")}}}),M(),_=requestAnimationFrame(R)};return v.addListener("layoutstarted",function(){T.options.animate==="during"&&(_=requestAnimationFrame(w))}),v.runLayout(),this.options.animate!=="during"&&(T.options.eles.nodes().not(":parent").layoutPositions(T,T.options,D),g=!1),this},l.prototype.getTopMostNodes=function(g){for(var _={},L=0;L<g.length;L++)_[g[L].id()]=!0;var v=g.filter(function(T,u){typeof T=="number"&&(T=u);for(var I=T.parent()[0];I!=null;){if(_[I.id()])return!1;I=I.parent()[0]}return!0});return v},l.prototype.processChildrenList=function(g,_,L){for(var v=_.length,T=0;T<v;T++){var u,I,s=_[T],c=s.children(),d=s.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if((u=s.outerWidth()!=null&&s.outerHeight()!=null?g.add(new n(L.graphManager,new o(s.position("x")-d.w/2,s.position("y")-d.h/2),new h(parseFloat(d.w),parseFloat(d.h)))):g.add(new n(this.graphManager))).id=s.data("id"),u.paddingLeft=parseInt(s.css("padding")),u.paddingTop=parseInt(s.css("padding")),u.paddingRight=parseInt(s.css("padding")),u.paddingBottom=parseInt(s.css("padding")),this.options.nodeDimensionsIncludeLabels&&s.isParent()){var y=s.boundingBox({includeLabels:!0,includeNodes:!1}).w,O=s.boundingBox({includeLabels:!0,includeNodes:!1}).h,D=s.css("text-halign");u.labelWidth=y,u.labelHeight=O,u.labelPos=D}this.idToLNode[s.data("id")]=u,isNaN(u.rect.x)&&(u.rect.x=0),isNaN(u.rect.y)&&(u.rect.y=0),c!=null&&c.length>0&&(I=L.getGraphManager().add(L.newGraph(),u),this.processChildrenList(I,c,L))}},l.prototype.stop=function(){return this.stopped=!0,this};var m=function(g){g("layout","cose-bilkent",l)};typeof cytoscape<"u"&&m(cytoscape),A.exports=m}])},at.exports=ut(function(){return gt?ht.exports:(gt=1,N=function(A){return function(f){var p={};function e(t){if(p[t])return p[t].exports;var i=p[t]={i:t,l:!1,exports:{}};return f[t].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=f,e.c=p,e.i=function(t){return t},e.d=function(t,i,r){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},e.p="",e(e.s=7)}([function(f,p){f.exports=A},function(f,p,e){var t=e(0).FDLayoutConstants;function i(){}for(var r in t)i[r]=t[r];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=t.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,f.exports=i},function(f,p,e){var t=e(0).FDLayoutEdge;function i(n,o,h){t.call(this,n,o,h)}for(var r in i.prototype=Object.create(t.prototype),t)i[r]=t[r];f.exports=i},function(f,p,e){var t=e(0).LGraph;function i(n,o,h){t.call(this,n,o,h)}for(var r in i.prototype=Object.create(t.prototype),t)i[r]=t[r];f.exports=i},function(f,p,e){var t=e(0).LGraphManager;function i(n){t.call(this,n)}for(var r in i.prototype=Object.create(t.prototype),t)i[r]=t[r];f.exports=i},function(f,p,e){var t=e(0).FDLayoutNode,i=e(0).IMath;function r(o,h,a,l){t.call(this,o,h,a,l)}for(var n in r.prototype=Object.create(t.prototype),t)r[n]=t[n];r.prototype.move=function(){var o=this.graphManager.getLayout();this.displacementX=o.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=o.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>o.coolingFactor*o.maxNodeDisplacement&&(this.displacementX=o.coolingFactor*o.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>o.coolingFactor*o.maxNodeDisplacement&&(this.displacementY=o.coolingFactor*o.maxNodeDisplacement*i.sign(this.displacementY)),this.child==null||this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),o.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},r.prototype.propogateDisplacementToChildren=function(o,h){for(var a,l=this.getChild().getNodes(),E=0;E<l.length;E++)(a=l[E]).getChild()==null?(a.moveBy(o,h),a.displacementX+=o,a.displacementY+=h):a.propogateDisplacementToChildren(o,h)},r.prototype.setPred1=function(o){this.pred1=o},r.prototype.getPred1=function(){return pred1},r.prototype.getPred2=function(){return pred2},r.prototype.setNext=function(o){this.next=o},r.prototype.getNext=function(){return next},r.prototype.setProcessed=function(o){this.processed=o},r.prototype.isProcessed=function(){return processed},f.exports=r},function(f,p,e){var t=e(0).FDLayout,i=e(4),r=e(3),n=e(5),o=e(2),h=e(1),a=e(0).FDLayoutConstants,l=e(0).LayoutConstants,E=e(0).Point,m=e(0).PointD,g=e(0).Layout,_=e(0).Integer,L=e(0).IGeometry,v=e(0).LGraph,T=e(0).Transform;function u(){t.call(this),this.toBeTiled={}}for(var I in u.prototype=Object.create(t.prototype),t)u[I]=t[I];u.prototype.newGraphManager=function(){var s=new i(this);return this.graphManager=s,s},u.prototype.newGraph=function(s){return new r(null,this.graphManager,s)},u.prototype.newNode=function(s){return new n(this.graphManager,s)},u.prototype.newEdge=function(s){return new o(null,null,s)},u.prototype.initParameters=function(){t.prototype.initParameters.call(this,arguments),this.isSubLayout||(h.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=h.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=a.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=a.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/a.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=a.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},u.prototype.layout=function(){return l.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},u.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental)h.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),c=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(y){return c.has(y)}),this.graphManager.setAllNodesToApplyGravitation(d));else{var s=this.getFlatForest();if(s.length>0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var c=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(y){return c.has(y)});this.graphManager.setAllNodesToApplyGravitation(d),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},u.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%a.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(O){return s.has(O)});this.graphManager.setAllNodesToApplyGravitation(c),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var d=!this.isTreeGrowing&&!this.isGrowthFinished,y=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(d,y),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},u.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),c={},d=0;d<s.length;d++){var y=s[d].rect,O=s[d].id;c[O]={id:O,x:y.getCenterX(),y:y.getCenterY(),w:y.width,h:y.height}}return c},u.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(a.ANIMATE==="during")this.emit("layoutstarted");else{for(;!s;)s=this.tick();this.graphManager.updateBounds()}},u.prototype.calculateNodesToApplyGravitationTo=function(){var s,c,d=[],y=this.graphManager.getGraphs(),O=y.length;for(c=0;c<O;c++)(s=y[c]).updateConnected(),s.isConnected||(d=d.concat(s.getNodes()));return d},u.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var c,d=new Set;for(c=0;c<s.length;c++){var y=s[c];if(!d.has(y)){var O=y.getSource(),D=y.getTarget();if(O==D)y.getBendpoints().push(new m),y.getBendpoints().push(new m),this.createDummyNodesForBendpoints(y),d.add(y);else{var w=[];if(w=(w=w.concat(O.getEdgeListToNode(D))).concat(D.getEdgeListToNode(O)),!d.has(w[0])){var R;if(w.length>1)for(R=0;R<w.length;R++){var C=w[R];C.getBendpoints().push(new m),this.createDummyNodesForBendpoints(C)}w.forEach(function(M){d.add(M)})}}}if(d.size==s.length)break}},u.prototype.positionNodesRadially=function(s){for(var c=new E(0,0),d=Math.ceil(Math.sqrt(s.length)),y=0,O=0,D=0,w=new m(0,0),R=0;R<s.length;R++){R%d==0&&(D=0,O=y,R!=0&&(O+=h.DEFAULT_COMPONENT_SEPERATION),y=0);var C=s[R],M=g.findCenterOfTree(C);c.x=D,c.y=O,(w=u.radialLayout(C,M,c)).y>y&&(y=Math.floor(w.y)),D=Math.floor(w.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new m(l.WORLD_CENTER_X-w.x/2,l.WORLD_CENTER_Y-w.y/2))},u.radialLayout=function(s,c,d){var y=Math.max(this.maxDiagonalInTree(s),h.DEFAULT_RADIAL_SEPARATION);u.branchRadialLayout(c,null,0,359,0,y);var O=v.calculateBounds(s),D=new T;D.setDeviceOrgX(O.getMinX()),D.setDeviceOrgY(O.getMinY()),D.setWorldOrgX(d.x),D.setWorldOrgY(d.y);for(var w=0;w<s.length;w++)s[w].transform(D);var R=new m(O.getMaxX(),O.getMaxY());return D.inverseTransformPoint(R)},u.branchRadialLayout=function(s,c,d,y,O,D){var w=(y-d+1)/2;w<0&&(w+=180);var R=(w+d)%360*L.TWO_PI/360,C=O*Math.cos(R),M=O*Math.sin(R);s.setCenter(C,M);var S=[],G=(S=S.concat(s.getEdges())).length;c!=null&&G--;for(var Y,F=0,P=S.length,b=s.getEdgesBetween(c);b.length>1;){var k=b[0];b.splice(0,1);var U=S.indexOf(k);U>=0&&S.splice(U,1),P--,G--}Y=c!=null?(S.indexOf(b[0])+1)%P:0;for(var q=Math.abs(y-d)/G,W=Y;F!=G;W=++W%P){var B=S[W].getOtherEnd(s);if(B!=c){var Z=(d+F*q)%360,V=(Z+q)%360;u.branchRadialLayout(B,s,Z,V,O+D,D),F++}}},u.maxDiagonalInTree=function(s){for(var c=_.MIN_VALUE,d=0;d<s.length;d++){var y=s[d].getDiagonal();y>c&&(c=y)}return c},u.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},u.prototype.groupZeroDegreeMembers=function(){var s=this,c={};this.memberGroups={},this.idToDummyNode={};for(var d=[],y=this.graphManager.getAllNodes(),O=0;O<y.length;O++){var D=(w=y[O]).getParent();this.getNodeDegreeWithChildren(w)!==0||D.id!=null&&this.getToBeTiled(D)||d.push(w)}for(O=0;O<d.length;O++){var w,R=(w=d[O]).getParent().id;c[R]===void 0&&(c[R]=[]),c[R]=c[R].concat(w)}Object.keys(c).forEach(function(C){if(c[C].length>1){var M="DummyCompound_"+C;s.memberGroups[M]=c[C];var S=c[C][0].getParent(),G=new n(s.graphManager);G.id=M,G.paddingLeft=S.paddingLeft||0,G.paddingRight=S.paddingRight||0,G.paddingBottom=S.paddingBottom||0,G.paddingTop=S.paddingTop||0,s.idToDummyNode[M]=G;var Y=s.getGraphManager().add(s.newGraph(),G),F=S.getChild();F.add(G);for(var P=0;P<c[C].length;P++){var b=c[C][P];F.remove(b),Y.add(b)}}})},u.prototype.clearCompounds=function(){var s={},c={};this.performDFSOnCompounds();for(var d=0;d<this.compoundOrder.length;d++)c[this.compoundOrder[d].id]=this.compoundOrder[d],s[this.compoundOrder[d].id]=[].concat(this.compoundOrder[d].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[d].getChild()),this.compoundOrder[d].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,c)},u.prototype.clearZeroDegreeMembers=function(){var s=this,c=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(d){var y=s.idToDummyNode[d];c[d]=s.tileNodes(s.memberGroups[d],y.paddingLeft+y.paddingRight),y.rect.width=c[d].width,y.rect.height=c[d].height})},u.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var c=this.compoundOrder[s],d=c.id,y=c.paddingLeft,O=c.paddingTop;this.adjustLocations(this.tiledMemberPack[d],c.rect.x,c.rect.y,y,O)}},u.prototype.repopulateZeroDegreeMembers=function(){var s=this,c=this.tiledZeroDegreePack;Object.keys(c).forEach(function(d){var y=s.idToDummyNode[d],O=y.paddingLeft,D=y.paddingTop;s.adjustLocations(c[d],y.rect.x,y.rect.y,O,D)})},u.prototype.getToBeTiled=function(s){var c=s.id;if(this.toBeTiled[c]!=null)return this.toBeTiled[c];var d=s.getChild();if(d==null)return this.toBeTiled[c]=!1,!1;for(var y=d.getNodes(),O=0;O<y.length;O++){var D=y[O];if(this.getNodeDegree(D)>0)return this.toBeTiled[c]=!1,!1;if(D.getChild()!=null){if(!this.getToBeTiled(D))return this.toBeTiled[c]=!1,!1}else this.toBeTiled[D.id]=!1}return this.toBeTiled[c]=!0,!0},u.prototype.getNodeDegree=function(s){s.id;for(var c=s.getEdges(),d=0,y=0;y<c.length;y++){var O=c[y];O.getSource().id!==O.getTarget().id&&(d+=1)}return d},u.prototype.getNodeDegreeWithChildren=function(s){var c=this.getNodeDegree(s);if(s.getChild()==null)return c;for(var d=s.getChild().getNodes(),y=0;y<d.length;y++){var O=d[y];c+=this.getNodeDegreeWithChildren(O)}return c},u.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},u.prototype.fillCompexOrderByDFS=function(s){for(var c=0;c<s.length;c++){var d=s[c];d.getChild()!=null&&this.fillCompexOrderByDFS(d.getChild().getNodes()),this.getToBeTiled(d)&&this.compoundOrder.push(d)}},u.prototype.adjustLocations=function(s,c,d,y,O){d+=O;for(var D=c+=y,w=0;w<s.rows.length;w++){var R=s.rows[w];c=D;for(var C=0,M=0;M<R.length;M++){var S=R[M];S.rect.x=c,S.rect.y=d,c+=S.rect.width+s.horizontalPadding,S.rect.height>C&&(C=S.rect.height)}d+=C+s.verticalPadding}},u.prototype.tileCompoundMembers=function(s,c){var d=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(y){var O=c[y];d.tiledMemberPack[y]=d.tileNodes(s[y],O.paddingLeft+O.paddingRight),O.rect.width=d.tiledMemberPack[y].width,O.rect.height=d.tiledMemberPack[y].height})},u.prototype.tileNodes=function(s,c){var d={rows:[],rowWidth:[],rowHeight:[],width:0,height:c,verticalPadding:h.TILING_PADDING_VERTICAL,horizontalPadding:h.TILING_PADDING_HORIZONTAL};s.sort(function(D,w){return D.rect.width*D.rect.height>w.rect.width*w.rect.height?-1:D.rect.width*D.rect.height<w.rect.width*w.rect.height?1:0});for(var y=0;y<s.length;y++){var O=s[y];d.rows.length==0?this.insertNodeToRow(d,O,0,c):this.canAddHorizontal(d,O.rect.width,O.rect.height)?this.insertNodeToRow(d,O,this.getShortestRowIndex(d),c):this.insertNodeToRow(d,O,d.rows.length,c),this.shiftToLastRow(d)}return d},u.prototype.insertNodeToRow=function(s,c,d,y){var O=y;d==s.rows.length&&(s.rows.push([]),s.rowWidth.push(O),s.rowHeight.push(0));var D=s.rowWidth[d]+c.rect.width;s.rows[d].length>0&&(D+=s.horizontalPadding),s.rowWidth[d]=D,s.width<D&&(s.width=D);var w=c.rect.height;d>0&&(w+=s.verticalPadding);var R=0;w>s.rowHeight[d]&&(R=s.rowHeight[d],s.rowHeight[d]=w,R=s.rowHeight[d]-R),s.height+=R,s.rows[d].push(c)},u.prototype.getShortestRowIndex=function(s){for(var c=-1,d=Number.MAX_VALUE,y=0;y<s.rows.length;y++)s.rowWidth[y]<d&&(c=y,d=s.rowWidth[y]);return c},u.prototype.getLongestRowIndex=function(s){for(var c=-1,d=Number.MIN_VALUE,y=0;y<s.rows.length;y++)s.rowWidth[y]>d&&(c=y,d=s.rowWidth[y]);return c},u.prototype.canAddHorizontal=function(s,c,d){var y=this.getShortestRowIndex(s);if(y<0)return!0;var O=s.rowWidth[y];if(O+s.horizontalPadding+c<=s.width)return!0;var D,w,R=0;return s.rowHeight[y]<d&&y>0&&(R=d+s.verticalPadding-s.rowHeight[y]),D=s.width-O>=c+s.horizontalPadding?(s.height+R)/(O+c+s.horizontalPadding):(s.height+R)/s.width,R=d+s.verticalPadding,(w=s.width<c?(s.height+R)/c:(s.height+R)/s.width)<1&&(w=1/w),D<1&&(D=1/D),D<w},u.prototype.shiftToLastRow=function(s){var c=this.getLongestRowIndex(s),d=s.rowWidth.length-1,y=s.rows[c],O=y[y.length-1],D=O.width+s.horizontalPadding;if(s.width-s.rowWidth[d]>D&&c!=d){y.splice(-1,1),s.rows[d].push(O),s.rowWidth[c]=s.rowWidth[c]-D,s.rowWidth[d]=s.rowWidth[d]+D,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var w=Number.MIN_VALUE,R=0;R<y.length;R++)y[R].height>w&&(w=y[R].height);c>0&&(w+=s.verticalPadding);var C=s.rowHeight[c]+s.rowHeight[d];s.rowHeight[c]=w,s.rowHeight[d]<O.height+s.verticalPadding&&(s.rowHeight[d]=O.height+s.verticalPadding);var M=s.rowHeight[c]+s.rowHeight[d];s.height+=M-C,this.shiftToLastRow(s)}},u.prototype.tilingPreLayout=function(){h.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},u.prototype.tilingPostLayout=function(){h.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},u.prototype.reduceTrees=function(){for(var s,c=[],d=!0;d;){var y=this.graphManager.getAllNodes(),O=[];d=!1;for(var D=0;D<y.length;D++)(s=y[D]).getEdges().length!=1||s.getEdges()[0].isInterGraph||s.getChild()!=null||(O.push([s,s.getEdges()[0],s.getOwner()]),d=!0);if(d==1){for(var w=[],R=0;R<O.length;R++)O[R][0].getEdges().length==1&&(w.push(O[R]),O[R][0].getOwner().remove(O[R][0]));c.push(w),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=c},u.prototype.growTree=function(s){for(var c,d=s[s.length-1],y=0;y<d.length;y++)c=d[y],this.findPlaceforPrunedNode(c),c[2].add(c[0]),c[2].add(c[1],c[1].source,c[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},u.prototype.findPlaceforPrunedNode=function(s){var c,d,y=s[0],O=(d=y==s[1].source?s[1].target:s[1].source).startX,D=d.finishX,w=d.startY,R=d.finishY,C=[0,0,0,0];if(w>0)for(var M=O;M<=D;M++)C[0]+=this.grid[M][w-1].length+this.grid[M][w].length-1;if(D<this.grid.length-1)for(M=w;M<=R;M++)C[1]+=this.grid[D+1][M].length+this.grid[D][M].length-1;if(R<this.grid[0].length-1)for(M=O;M<=D;M++)C[2]+=this.grid[M][R+1].length+this.grid[M][R].length-1;if(O>0)for(M=w;M<=R;M++)C[3]+=this.grid[O-1][M].length+this.grid[O][M].length-1;for(var S,G,Y=_.MAX_VALUE,F=0;F<C.length;F++)C[F]<Y?(Y=C[F],S=1,G=F):C[F]==Y&&S++;if(S==3&&Y==0)C[0]==0&&C[1]==0&&C[2]==0?c=1:C[0]==0&&C[1]==0&&C[3]==0?c=0:C[0]==0&&C[2]==0&&C[3]==0?c=3:C[1]==0&&C[2]==0&&C[3]==0&&(c=2);else if(S==2&&Y==0){var P=Math.floor(2*Math.random());c=C[0]==0&&C[1]==0?P==0?0:1:C[0]==0&&C[2]==0?P==0?0:2:C[0]==0&&C[3]==0?P==0?0:3:C[1]==0&&C[2]==0?P==0?1:2:C[1]==0&&C[3]==0?P==0?1:3:P==0?2:3}else c=S==4&&Y==0?P=Math.floor(4*Math.random()):G;c==0?y.setCenter(d.getCenterX(),d.getCenterY()-d.getHeight()/2-a.DEFAULT_EDGE_LENGTH-y.getHeight()/2):c==1?y.setCenter(d.getCenterX()+d.getWidth()/2+a.DEFAULT_EDGE_LENGTH+y.getWidth()/2,d.getCenterY()):c==2?y.setCenter(d.getCenterX(),d.getCenterY()+d.getHeight()/2+a.DEFAULT_EDGE_LENGTH+y.getHeight()/2):y.setCenter(d.getCenterX()-d.getWidth()/2-a.DEFAULT_EDGE_LENGTH-y.getWidth()/2,d.getCenterY())},f.exports=u},function(f,p,e){var t={};t.layoutBase=e(0),t.CoSEConstants=e(1),t.CoSEEdge=e(2),t.CoSEGraph=e(3),t.CoSEGraphManager=e(4),t.CoSELayout=e(6),t.CoSENode=e(5),f.exports=t}])},ht.exports=N(It()));var N}())),at.exports);const Rt=Ot(wt);var tt=function(){var N=x(function(u,I,s,c){for(s=s||{},c=u.length;c--;s[u[c]]=I);return s},"o"),A=[1,4],f=[1,13],p=[1,12],e=[1,15],t=[1,16],i=[1,20],r=[1,19],n=[6,7,8],o=[1,26],h=[1,24],a=[1,25],l=[6,7,11],E=[1,6,13,15,16,19,22],m=[1,33],g=[1,34],_=[1,6,7,11,13,15,16,19,22],L={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:x(function(u,I,s,c,d,y,O){var D=y.length-1;switch(d){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",y[D].id),c.addNode(y[D-1].length,y[D].id,y[D].descr,y[D].type);break;case 16:c.getLogger().trace("Icon: ",y[D]),c.decorateNode({icon:y[D]});break;case 17:case 21:c.decorateNode({class:y[D]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",y[D].id),c.addNode(0,y[D].id,y[D].descr,y[D].type);break;case 20:c.decorateNode({icon:y[D]});break;case 25:c.getLogger().trace("node found ..",y[D-2]),this.$={id:y[D-1],descr:y[D-1],type:c.getType(y[D-2],y[D])};break;case 26:this.$={id:y[D],descr:y[D],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",y[D-3]),this.$={id:y[D-3],descr:y[D-1],type:c.getType(y[D-2],y[D])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:A},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:A},{6:f,7:[1,10],9:9,12:11,13:p,14:14,15:e,16:t,17:17,18:18,19:i,22:r},N(n,[2,3]),{1:[2,2]},N(n,[2,4]),N(n,[2,5]),{1:[2,6],6:f,12:21,13:p,14:14,15:e,16:t,17:17,18:18,19:i,22:r},{6:f,9:22,12:11,13:p,14:14,15:e,16:t,17:17,18:18,19:i,22:r},{6:o,7:h,10:23,11:a},N(l,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:i,22:r}),N(l,[2,18]),N(l,[2,19]),N(l,[2,20]),N(l,[2,21]),N(l,[2,23]),N(l,[2,24]),N(l,[2,26],{19:[1,30]}),{20:[1,31]},{6:o,7:h,10:32,11:a},{1:[2,7],6:f,12:21,13:p,14:14,15:e,16:t,17:17,18:18,19:i,22:r},N(E,[2,14],{7:m,11:g}),N(_,[2,8]),N(_,[2,9]),N(_,[2,10]),N(l,[2,15]),N(l,[2,16]),N(l,[2,17]),{20:[1,35]},{21:[1,36]},N(E,[2,13],{7:m,11:g}),N(_,[2,11]),N(_,[2,12]),{21:[1,37]},N(l,[2,25]),N(l,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:x(function(u,I){if(!I.recoverable){var s=new Error(u);throw s.hash=I,s}this.trace(u)},"parseError"),parse:x(function(u){var I=this,s=[0],c=[],d=[null],y=[],O=this.table,D="",w=0,R=0,C=y.slice.call(arguments,1),M=Object.create(this.lexer),S={yy:{}};for(var G in this.yy)Object.prototype.hasOwnProperty.call(this.yy,G)&&(S.yy[G]=this.yy[G]);M.setInput(u,S.yy),S.yy.lexer=M,S.yy.parser=this,M.yylloc===void 0&&(M.yylloc={});var Y=M.yylloc;y.push(Y);var F=M.options&&M.options.ranges;function P(){var $;return typeof($=c.pop()||M.lex()||1)!="number"&&($ instanceof Array&&($=(c=$).pop()),$=I.symbols_[$]||$),$}typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,x(function($){s.length=s.length-2*$,d.length=d.length-$,y.length=y.length-$},"popStack"),x(P,"lex");for(var b,k,U,q,W,B,Z,V,z={};;){if(k=s[s.length-1],this.defaultActions[k]?U=this.defaultActions[k]:(b==null&&(b=P()),U=O[k]&&O[k][b]),U===void 0||!U.length||!U[0]){var nt="";for(W in V=[],O[k])this.terminals_[W]&&W>2&&V.push("'"+this.terminals_[W]+"'");nt=M.showPosition?"Parse error on line "+(w+1)+`:
|
1
|
+
import{_ as x,l as j,c as J,I as mt,T as _t,G as Q,h as K,V as vt,W as Nt,X as At,a4 as Tt,O as Lt}from"./mermaid-Bhkvxu54.js";import{c as ot}from"./cytoscape.esm-UYyVlru8.js";import{z as Ot}from"./index-DUfE3Ygv.js";import{s as Dt}from"./transform-CDNfLgV5.js";import"./step-BwsUM5iJ.js";import"./timer-Bqd5yn_a.js";var st,at={exports:{}},ht={exports:{}},lt={exports:{}};function It(){return st?lt.exports:(st=1,N=function(){return function(A){var f={};function p(e){if(f[e])return f[e].exports;var t=f[e]={i:e,l:!1,exports:{}};return A[e].call(t.exports,t,t.exports,p),t.l=!0,t.exports}return p.m=A,p.c=f,p.i=function(e){return e},p.d=function(e,t,i){p.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},p.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(t,"a",t),t},p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p.p="",p(p.s=26)}([function(A,f,p){function e(){}e.QUALITY=1,e.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,e.DEFAULT_INCREMENTAL=!1,e.DEFAULT_ANIMATION_ON_LAYOUT=!0,e.DEFAULT_ANIMATION_DURING_LAYOUT=!1,e.DEFAULT_ANIMATION_PERIOD=50,e.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,e.DEFAULT_GRAPH_MARGIN=15,e.NODE_DIMENSIONS_INCLUDE_LABELS=!1,e.SIMPLE_NODE_SIZE=40,e.SIMPLE_NODE_HALF_SIZE=e.SIMPLE_NODE_SIZE/2,e.EMPTY_COMPOUND_NODE_SIZE=40,e.MIN_EDGE_LENGTH=1,e.WORLD_BOUNDARY=1e6,e.INITIAL_WORLD_BOUNDARY=e.WORLD_BOUNDARY/1e3,e.WORLD_CENTER_X=1200,e.WORLD_CENTER_Y=900,A.exports=e},function(A,f,p){var e=p(2),t=p(8),i=p(9);function r(o,h,a){e.call(this,a),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=a,this.bendpoints=[],this.source=o,this.target=h}for(var n in r.prototype=Object.create(e.prototype),e)r[n]=e[n];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(o){if(this.source===o)return this.target;if(this.target===o)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(o,h){for(var a=this.getOtherEnd(o),l=h.getGraphManager().getRoot();;){if(a.getOwner()==h)return a;if(a.getOwner()==l)break;a=a.getOwner().getParent()}return null},r.prototype.updateLength=function(){var o=new Array(4);this.isOverlapingSourceAndTarget=t.getIntersection(this.target.getRect(),this.source.getRect(),o),this.isOverlapingSourceAndTarget||(this.lengthX=o[0]-o[2],this.lengthY=o[1]-o[3],Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},A.exports=r},function(A,f,p){A.exports=function(e){this.vGraphObject=e}},function(A,f,p){var e=p(2),t=p(10),i=p(13),r=p(0),n=p(16),o=p(4);function h(l,E,m,g){m==null&&g==null&&(g=E),e.call(this,g),l.graphManager!=null&&(l=l.graphManager),this.estimatedSize=t.MIN_VALUE,this.inclusionTreeDepth=t.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=l,this.rect=m!=null&&E!=null?new i(E.x,E.y,m.width,m.height):new i}for(var a in h.prototype=Object.create(e.prototype),e)h[a]=e[a];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(l){this.rect.width=l},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(l){this.rect.height=l},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new o(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new o(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},h.prototype.setRect=function(l,E){this.rect.x=l.x,this.rect.y=l.y,this.rect.width=E.width,this.rect.height=E.height},h.prototype.setCenter=function(l,E){this.rect.x=l-this.rect.width/2,this.rect.y=E-this.rect.height/2},h.prototype.setLocation=function(l,E){this.rect.x=l,this.rect.y=E},h.prototype.moveBy=function(l,E){this.rect.x+=l,this.rect.y+=E},h.prototype.getEdgeListToNode=function(l){var E=[],m=this;return m.edges.forEach(function(g){if(g.target==l){if(g.source!=m)throw"Incorrect edge source!";E.push(g)}}),E},h.prototype.getEdgesBetween=function(l){var E=[],m=this;return m.edges.forEach(function(g){if(g.source!=m&&g.target!=m)throw"Incorrect edge source and/or target";g.target!=l&&g.source!=l||E.push(g)}),E},h.prototype.getNeighborsList=function(){var l=new Set,E=this;return E.edges.forEach(function(m){if(m.source==E)l.add(m.target);else{if(m.target!=E)throw"Incorrect incidency!";l.add(m.source)}}),l},h.prototype.withChildren=function(){var l=new Set;if(l.add(this),this.child!=null)for(var E=this.child.getNodes(),m=0;m<E.length;m++)E[m].withChildren().forEach(function(g){l.add(g)});return l},h.prototype.getNoOfChildren=function(){var l=0;if(this.child==null)l=1;else for(var E=this.child.getNodes(),m=0;m<E.length;m++)l+=E[m].getNoOfChildren();return l==0&&(l=1),l},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==t.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},h.prototype.scatter=function(){var l,E,m=-r.INITIAL_WORLD_BOUNDARY,g=r.INITIAL_WORLD_BOUNDARY;l=r.WORLD_CENTER_X+n.nextDouble()*(g-m)+m;var _=-r.INITIAL_WORLD_BOUNDARY,L=r.INITIAL_WORLD_BOUNDARY;E=r.WORLD_CENTER_Y+n.nextDouble()*(L-_)+_,this.rect.x=l,this.rect.y=E},h.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var l=this.getChild();if(l.updateBounds(!0),this.rect.x=l.getLeft(),this.rect.y=l.getTop(),this.setWidth(l.getRight()-l.getLeft()),this.setHeight(l.getBottom()-l.getTop()),r.NODE_DIMENSIONS_INCLUDE_LABELS){var E=l.getRight()-l.getLeft(),m=l.getBottom()-l.getTop();this.labelWidth>E&&(this.rect.x-=(this.labelWidth-E)/2,this.setWidth(this.labelWidth)),this.labelHeight>m&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-m)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-m),this.setHeight(this.labelHeight))}}},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==t.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(l){var E=this.rect.x;E>r.WORLD_BOUNDARY?E=r.WORLD_BOUNDARY:E<-r.WORLD_BOUNDARY&&(E=-r.WORLD_BOUNDARY);var m=this.rect.y;m>r.WORLD_BOUNDARY?m=r.WORLD_BOUNDARY:m<-r.WORLD_BOUNDARY&&(m=-r.WORLD_BOUNDARY);var g=new o(E,m),_=l.inverseTransformPoint(g);this.setLocation(_.x,_.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=h},function(A,f,p){function e(t,i){t==null&&i==null?(this.x=0,this.y=0):(this.x=t,this.y=i)}e.prototype.getX=function(){return this.x},e.prototype.getY=function(){return this.y},e.prototype.setX=function(t){this.x=t},e.prototype.setY=function(t){this.y=t},e.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},e.prototype.getCopy=function(){return new e(this.x,this.y)},e.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},A.exports=e},function(A,f,p){var e=p(2),t=p(10),i=p(0),r=p(6),n=p(3),o=p(1),h=p(13),a=p(12),l=p(11);function E(g,_,L){e.call(this,L),this.estimatedSize=t.MIN_VALUE,this.margin=i.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,_!=null&&_ instanceof r?this.graphManager=_:_!=null&&_ instanceof Layout&&(this.graphManager=_.graphManager)}for(var m in E.prototype=Object.create(e.prototype),e)E[m]=e[m];E.prototype.getNodes=function(){return this.nodes},E.prototype.getEdges=function(){return this.edges},E.prototype.getGraphManager=function(){return this.graphManager},E.prototype.getParent=function(){return this.parent},E.prototype.getLeft=function(){return this.left},E.prototype.getRight=function(){return this.right},E.prototype.getTop=function(){return this.top},E.prototype.getBottom=function(){return this.bottom},E.prototype.isConnected=function(){return this.isConnected},E.prototype.add=function(g,_,L){if(_==null&&L==null){var v=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(v)>-1)throw"Node already in graph!";return v.owner=this,this.getNodes().push(v),v}var T=g;if(!(this.getNodes().indexOf(_)>-1&&this.getNodes().indexOf(L)>-1))throw"Source or target not in graph!";if(_.owner!=L.owner||_.owner!=this)throw"Both owners must be this graph!";return _.owner!=L.owner?null:(T.source=_,T.target=L,T.isInterGraph=!1,this.getEdges().push(T),_.edges.push(T),L!=_&&L.edges.push(T),T)},E.prototype.remove=function(g){var _=g;if(g instanceof n){if(_==null)throw"Node is null!";if(_.owner==null||_.owner!=this)throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var L=_.edges.slice(),v=L.length,T=0;T<v;T++)(u=L[T]).isInterGraph?this.graphManager.remove(u):u.source.owner.remove(u);if((I=this.nodes.indexOf(_))==-1)throw"Node not in owner node list!";this.nodes.splice(I,1)}else if(g instanceof o){var u;if((u=g)==null)throw"Edge is null!";if(u.source==null||u.target==null)throw"Source and/or target is null!";if(u.source.owner==null||u.target.owner==null||u.source.owner!=this||u.target.owner!=this)throw"Source and/or target owner is invalid!";var I,s=u.source.edges.indexOf(u),c=u.target.edges.indexOf(u);if(!(s>-1&&c>-1))throw"Source and/or target doesn't know this edge!";if(u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(c,1),(I=u.source.owner.getEdges().indexOf(u))==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(I,1)}},E.prototype.updateLeftTop=function(){for(var g,_,L,v=t.MAX_VALUE,T=t.MAX_VALUE,u=this.getNodes(),I=u.length,s=0;s<I;s++){var c=u[s];v>(g=c.getTop())&&(v=g),T>(_=c.getLeft())&&(T=_)}return v==t.MAX_VALUE?null:(L=u[0].getParent().paddingLeft!=null?u[0].getParent().paddingLeft:this.margin,this.left=T-L,this.top=v-L,new a(this.left,this.top))},E.prototype.updateBounds=function(g){for(var _,L,v,T,u,I=t.MAX_VALUE,s=-t.MAX_VALUE,c=t.MAX_VALUE,d=-t.MAX_VALUE,y=this.nodes,O=y.length,D=0;D<O;D++){var w=y[D];g&&w.child!=null&&w.updateBounds(),I>(_=w.getLeft())&&(I=_),s<(L=w.getRight())&&(s=L),c>(v=w.getTop())&&(c=v),d<(T=w.getBottom())&&(d=T)}var R=new h(I,c,s-I,d-c);I==t.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),u=y[0].getParent().paddingLeft!=null?y[0].getParent().paddingLeft:this.margin,this.left=R.x-u,this.right=R.x+R.width+u,this.top=R.y-u,this.bottom=R.y+R.height+u},E.calculateBounds=function(g){for(var _,L,v,T,u=t.MAX_VALUE,I=-t.MAX_VALUE,s=t.MAX_VALUE,c=-t.MAX_VALUE,d=g.length,y=0;y<d;y++){var O=g[y];u>(_=O.getLeft())&&(u=_),I<(L=O.getRight())&&(I=L),s>(v=O.getTop())&&(s=v),c<(T=O.getBottom())&&(c=T)}return new h(u,s,I-u,c-s)},E.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},E.prototype.getEstimatedSize=function(){if(this.estimatedSize==t.MIN_VALUE)throw"assert failed";return this.estimatedSize},E.prototype.calcEstimatedSize=function(){for(var g=0,_=this.nodes,L=_.length,v=0;v<L;v++)g+=_[v].calcEstimatedSize();return this.estimatedSize=g==0?i.EMPTY_COMPOUND_NODE_SIZE:g/Math.sqrt(this.nodes.length),this.estimatedSize},E.prototype.updateConnected=function(){var g=this;if(this.nodes.length!=0){var _,L,v=new l,T=new Set,u=this.nodes[0];for(u.withChildren().forEach(function(d){v.push(d),T.add(d)});v.length!==0;)for(var I=(_=(u=v.shift()).getEdges()).length,s=0;s<I;s++)(L=_[s].getOtherEndInGraph(u,this))==null||T.has(L)||L.withChildren().forEach(function(d){v.push(d),T.add(d)});if(this.isConnected=!1,T.size>=this.nodes.length){var c=0;T.forEach(function(d){d.owner==g&&c++}),c==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},A.exports=E},function(A,f,p){var e,t=p(1);function i(r){e=p(5),this.layout=r,this.graphs=[],this.edges=[]}i.prototype.addRoot=function(){var r=this.layout.newGraph(),n=this.layout.newNode(null),o=this.add(r,n);return this.setRootGraph(o),this.rootGraph},i.prototype.add=function(r,n,o,h,a){if(o==null&&h==null&&a==null){if(r==null)throw"Graph is null!";if(n==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(n.child!=null)throw"Already has a child!";return r.parent=n,n.child=r,r}a=o,o=r;var l=(h=n).getOwner(),E=a.getOwner();if(l==null||l.getGraphManager()!=this)throw"Source not in this graph mgr!";if(E==null||E.getGraphManager()!=this)throw"Target not in this graph mgr!";if(l==E)return o.isInterGraph=!1,l.add(o,h,a);if(o.isInterGraph=!0,o.source=h,o.target=a,this.edges.indexOf(o)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(o),o.source==null||o.target==null)throw"Edge source and/or target is null!";if(o.source.edges.indexOf(o)!=-1||o.target.edges.indexOf(o)!=-1)throw"Edge already in source and/or target incidency list!";return o.source.edges.push(o),o.target.edges.push(o),o},i.prototype.remove=function(r){if(r instanceof e){var n=r;if(n.getGraphManager()!=this)throw"Graph not in this graph mgr";if(n!=this.rootGraph&&(n.parent==null||n.parent.graphManager!=this))throw"Invalid parent node!";for(var o,h=[],a=(h=h.concat(n.getEdges())).length,l=0;l<a;l++)o=h[l],n.remove(o);var E,m=[];for(a=(m=m.concat(n.getNodes())).length,l=0;l<a;l++)E=m[l],n.remove(E);n==this.rootGraph&&this.setRootGraph(null);var g=this.graphs.indexOf(n);this.graphs.splice(g,1),n.parent=null}else if(r instanceof t){if((o=r)==null)throw"Edge is null!";if(!o.isInterGraph)throw"Not an inter-graph edge!";if(o.source==null||o.target==null)throw"Source and/or target is null!";if(o.source.edges.indexOf(o)==-1||o.target.edges.indexOf(o)==-1)throw"Source and/or target doesn't know this edge!";if(g=o.source.edges.indexOf(o),o.source.edges.splice(g,1),g=o.target.edges.indexOf(o),o.target.edges.splice(g,1),o.source.owner==null||o.source.owner.getGraphManager()==null)throw"Edge owner graph or owner graph manager is null!";if(o.source.owner.getGraphManager().edges.indexOf(o)==-1)throw"Not in owner graph manager's edge list!";g=o.source.owner.getGraphManager().edges.indexOf(o),o.source.owner.getGraphManager().edges.splice(g,1)}},i.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},i.prototype.getGraphs=function(){return this.graphs},i.prototype.getAllNodes=function(){if(this.allNodes==null){for(var r=[],n=this.getGraphs(),o=n.length,h=0;h<o;h++)r=r.concat(n[h].getNodes());this.allNodes=r}return this.allNodes},i.prototype.resetAllNodes=function(){this.allNodes=null},i.prototype.resetAllEdges=function(){this.allEdges=null},i.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},i.prototype.getAllEdges=function(){if(this.allEdges==null){var r=[],n=this.getGraphs();n.length;for(var o=0;o<n.length;o++)r=r.concat(n[o].getEdges());r=r.concat(this.edges),this.allEdges=r}return this.allEdges},i.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},i.prototype.setAllNodesToApplyGravitation=function(r){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=r},i.prototype.getRoot=function(){return this.rootGraph},i.prototype.setRootGraph=function(r){if(r.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=r,r.parent==null&&(r.parent=this.layout.newNode("Root node"))},i.prototype.getLayout=function(){return this.layout},i.prototype.isOneAncestorOfOther=function(r,n){if(r==null||n==null)throw"assert failed";if(r==n)return!0;for(var o,h=r.getOwner();(o=h.getParent())!=null;){if(o==n)return!0;if((h=o.getOwner())==null)break}for(h=n.getOwner();(o=h.getParent())!=null;){if(o==r)return!0;if((h=o.getOwner())==null)break}return!1},i.prototype.calcLowestCommonAncestors=function(){for(var r,n,o,h,a,l=this.getAllEdges(),E=l.length,m=0;m<E;m++)if(n=(r=l[m]).source,o=r.target,r.lca=null,r.sourceInLca=n,r.targetInLca=o,n!=o){for(h=n.getOwner();r.lca==null;){for(r.targetInLca=o,a=o.getOwner();r.lca==null;){if(a==h){r.lca=a;break}if(a==this.rootGraph)break;if(r.lca!=null)throw"assert failed";r.targetInLca=a.getParent(),a=r.targetInLca.getOwner()}if(h==this.rootGraph)break;r.lca==null&&(r.sourceInLca=h.getParent(),h=r.sourceInLca.getOwner())}if(r.lca==null)throw"assert failed"}else r.lca=n.getOwner()},i.prototype.calcLowestCommonAncestor=function(r,n){if(r==n)return r.getOwner();for(var o=r.getOwner();o!=null;){for(var h=n.getOwner();h!=null;){if(h==o)return h;h=h.getParent().getOwner()}o=o.getParent().getOwner()}return o},i.prototype.calcInclusionTreeDepths=function(r,n){var o;r==null&&n==null&&(r=this.rootGraph,n=1);for(var h=r.getNodes(),a=h.length,l=0;l<a;l++)(o=h[l]).inclusionTreeDepth=n,o.child!=null&&this.calcInclusionTreeDepths(o.child,n+1)},i.prototype.includesInvalidEdge=function(){for(var r,n=this.edges.length,o=0;o<n;o++)if(r=this.edges[o],this.isOneAncestorOfOther(r.source,r.target))return!0;return!1},A.exports=i},function(A,f,p){var e=p(0);function t(){}for(var i in e)t[i]=e[i];t.MAX_ITERATIONS=2500,t.DEFAULT_EDGE_LENGTH=50,t.DEFAULT_SPRING_STRENGTH=.45,t.DEFAULT_REPULSION_STRENGTH=4500,t.DEFAULT_GRAVITY_STRENGTH=.4,t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,t.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,t.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,t.COOLING_ADAPTATION_FACTOR=.33,t.ADAPTATION_LOWER_NODE_LIMIT=1e3,t.ADAPTATION_UPPER_NODE_LIMIT=5e3,t.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,t.MAX_NODE_DISPLACEMENT=3*t.MAX_NODE_DISPLACEMENT_INCREMENTAL,t.MIN_REPULSION_DIST=t.DEFAULT_EDGE_LENGTH/10,t.CONVERGENCE_CHECK_PERIOD=100,t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,t.MIN_EDGE_LENGTH=1,t.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=t},function(A,f,p){var e=p(12);function t(){}t.calcSeparationAmount=function(i,r,n,o){if(!i.intersects(r))throw"assert failed";var h=new Array(2);this.decideDirectionsForOverlappingNodes(i,r,h),n[0]=Math.min(i.getRight(),r.getRight())-Math.max(i.x,r.x),n[1]=Math.min(i.getBottom(),r.getBottom())-Math.max(i.y,r.y),i.getX()<=r.getX()&&i.getRight()>=r.getRight()?n[0]+=Math.min(r.getX()-i.getX(),i.getRight()-r.getRight()):r.getX()<=i.getX()&&r.getRight()>=i.getRight()&&(n[0]+=Math.min(i.getX()-r.getX(),r.getRight()-i.getRight())),i.getY()<=r.getY()&&i.getBottom()>=r.getBottom()?n[1]+=Math.min(r.getY()-i.getY(),i.getBottom()-r.getBottom()):r.getY()<=i.getY()&&r.getBottom()>=i.getBottom()&&(n[1]+=Math.min(i.getY()-r.getY(),r.getBottom()-i.getBottom()));var a=Math.abs((r.getCenterY()-i.getCenterY())/(r.getCenterX()-i.getCenterX()));r.getCenterY()===i.getCenterY()&&r.getCenterX()===i.getCenterX()&&(a=1);var l=a*n[0],E=n[1]/a;n[0]<E?E=n[0]:l=n[1],n[0]=-1*h[0]*(E/2+o),n[1]=-1*h[1]*(l/2+o)},t.decideDirectionsForOverlappingNodes=function(i,r,n){i.getCenterX()<r.getCenterX()?n[0]=-1:n[0]=1,i.getCenterY()<r.getCenterY()?n[1]=-1:n[1]=1},t.getIntersection2=function(i,r,n){var o=i.getCenterX(),h=i.getCenterY(),a=r.getCenterX(),l=r.getCenterY();if(i.intersects(r))return n[0]=o,n[1]=h,n[2]=a,n[3]=l,!0;var E=i.getX(),m=i.getY(),g=i.getRight(),_=i.getX(),L=i.getBottom(),v=i.getRight(),T=i.getWidthHalf(),u=i.getHeightHalf(),I=r.getX(),s=r.getY(),c=r.getRight(),d=r.getX(),y=r.getBottom(),O=r.getRight(),D=r.getWidthHalf(),w=r.getHeightHalf(),R=!1,C=!1;if(o===a){if(h>l)return n[0]=o,n[1]=m,n[2]=a,n[3]=y,!1;if(h<l)return n[0]=o,n[1]=L,n[2]=a,n[3]=s,!1}else if(h===l){if(o>a)return n[0]=E,n[1]=h,n[2]=c,n[3]=l,!1;if(o<a)return n[0]=g,n[1]=h,n[2]=I,n[3]=l,!1}else{var M=i.height/i.width,G=r.height/r.width,S=(l-h)/(a-o),Y=void 0,F=void 0,P=void 0,b=void 0,k=void 0,U=void 0;if(-M===S?o>a?(n[0]=_,n[1]=L,R=!0):(n[0]=g,n[1]=m,R=!0):M===S&&(o>a?(n[0]=E,n[1]=m,R=!0):(n[0]=v,n[1]=L,R=!0)),-G===S?a>o?(n[2]=d,n[3]=y,C=!0):(n[2]=c,n[3]=s,C=!0):G===S&&(a>o?(n[2]=I,n[3]=s,C=!0):(n[2]=O,n[3]=y,C=!0)),R&&C)return!1;if(o>a?h>l?(Y=this.getCardinalDirection(M,S,4),F=this.getCardinalDirection(G,S,2)):(Y=this.getCardinalDirection(-M,S,3),F=this.getCardinalDirection(-G,S,1)):h>l?(Y=this.getCardinalDirection(-M,S,1),F=this.getCardinalDirection(-G,S,3)):(Y=this.getCardinalDirection(M,S,2),F=this.getCardinalDirection(G,S,4)),!R)switch(Y){case 1:b=m,P=o+-u/S,n[0]=P,n[1]=b;break;case 2:P=v,b=h+T*S,n[0]=P,n[1]=b;break;case 3:b=L,P=o+u/S,n[0]=P,n[1]=b;break;case 4:P=_,b=h+-T*S,n[0]=P,n[1]=b}if(!C)switch(F){case 1:U=s,k=a+-w/S,n[2]=k,n[3]=U;break;case 2:k=O,U=l+D*S,n[2]=k,n[3]=U;break;case 3:U=y,k=a+w/S,n[2]=k,n[3]=U;break;case 4:k=d,U=l+-D*S,n[2]=k,n[3]=U}}return!1},t.getCardinalDirection=function(i,r,n){return i>r?n:1+n%4},t.getIntersection=function(i,r,n,o){if(o==null)return this.getIntersection2(i,r,n);var h,a,l,E,m,g,_,L=i.x,v=i.y,T=r.x,u=r.y,I=n.x,s=n.y,c=o.x,d=o.y;return(_=(h=u-v)*(E=I-c)-(a=d-s)*(l=L-T))===0?null:new e((l*(g=c*s-I*d)-E*(m=T*v-L*u))/_,(a*m-h*g)/_)},t.angleOfVector=function(i,r,n,o){var h=void 0;return i!==n?(h=Math.atan((o-r)/(n-i)),n<i?h+=Math.PI:o<r&&(h+=this.TWO_PI)):h=o<r?this.ONE_AND_HALF_PI:this.HALF_PI,h},t.doIntersect=function(i,r,n,o){var h=i.x,a=i.y,l=r.x,E=r.y,m=n.x,g=n.y,_=o.x,L=o.y,v=(l-h)*(L-g)-(_-m)*(E-a);if(v===0)return!1;var T=((L-g)*(_-h)+(m-_)*(L-a))/v,u=((a-E)*(_-h)+(l-h)*(L-a))/v;return 0<T&&T<1&&0<u&&u<1},t.HALF_PI=.5*Math.PI,t.ONE_AND_HALF_PI=1.5*Math.PI,t.TWO_PI=2*Math.PI,t.THREE_PI=3*Math.PI,A.exports=t},function(A,f,p){function e(){}e.sign=function(t){return t>0?1:t<0?-1:0},e.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},e.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},A.exports=e},function(A,f,p){function e(){}e.MAX_VALUE=2147483647,e.MIN_VALUE=-2147483648,A.exports=e},function(A,f,p){var e=function(){function o(h,a){for(var l=0;l<a.length;l++){var E=a[l];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(h,E.key,E)}}return function(h,a,l){return a&&o(h.prototype,a),l&&o(h,l),h}}(),t=function(o){return{value:o,next:null,prev:null}},i=function(o,h,a,l){return o!==null?o.next=h:l.head=h,a!==null?a.prev=h:l.tail=h,h.prev=o,h.next=a,l.length++,h},r=function(o,h){var a=o.prev,l=o.next;return a!==null?a.next=l:h.head=l,l!==null?l.prev=a:h.tail=a,o.prev=o.next=null,h.length--,o},n=function(){function o(h){var a=this;(function(l,E){if(!(l instanceof E))throw new TypeError("Cannot call a class as a function")})(this,o),this.length=0,this.head=null,this.tail=null,h!=null&&h.forEach(function(l){return a.push(l)})}return e(o,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(h,a){return i(a.prev,t(h),a,this)}},{key:"insertAfter",value:function(h,a){return i(a,t(h),a.next,this)}},{key:"insertNodeBefore",value:function(h,a){return i(a.prev,h,a,this)}},{key:"insertNodeAfter",value:function(h,a){return i(a,h,a.next,this)}},{key:"push",value:function(h){return i(this.tail,t(h),null,this)}},{key:"unshift",value:function(h){return i(null,t(h),this.head,this)}},{key:"remove",value:function(h){return r(h,this)}},{key:"pop",value:function(){return r(this.tail,this).value}},{key:"popNode",value:function(){return r(this.tail,this)}},{key:"shift",value:function(){return r(this.head,this).value}},{key:"shiftNode",value:function(){return r(this.head,this)}},{key:"get_object_at",value:function(h){if(h<=this.length()){for(var a=1,l=this.head;a<h;)l=l.next,a++;return l.value}}},{key:"set_object_at",value:function(h,a){if(h<=this.length()){for(var l=1,E=this.head;l<h;)E=E.next,l++;E.value=a}}}]),o}();A.exports=n},function(A,f,p){function e(t,i,r){this.x=null,this.y=null,t==null&&i==null&&r==null?(this.x=0,this.y=0):typeof t=="number"&&typeof i=="number"&&r==null?(this.x=t,this.y=i):t.constructor.name=="Point"&&i==null&&r==null&&(r=t,this.x=r.x,this.y=r.y)}e.prototype.getX=function(){return this.x},e.prototype.getY=function(){return this.y},e.prototype.getLocation=function(){return new e(this.x,this.y)},e.prototype.setLocation=function(t,i,r){t.constructor.name=="Point"&&i==null&&r==null?(r=t,this.setLocation(r.x,r.y)):typeof t=="number"&&typeof i=="number"&&r==null&&(parseInt(t)==t&&parseInt(i)==i?this.move(t,i):(this.x=Math.floor(t+.5),this.y=Math.floor(i+.5)))},e.prototype.move=function(t,i){this.x=t,this.y=i},e.prototype.translate=function(t,i){this.x+=t,this.y+=i},e.prototype.equals=function(t){if(t.constructor.name=="Point"){var i=t;return this.x==i.x&&this.y==i.y}return this==t},e.prototype.toString=function(){return new e().constructor.name+"[x="+this.x+",y="+this.y+"]"},A.exports=e},function(A,f,p){function e(t,i,r,n){this.x=0,this.y=0,this.width=0,this.height=0,t!=null&&i!=null&&r!=null&&n!=null&&(this.x=t,this.y=i,this.width=r,this.height=n)}e.prototype.getX=function(){return this.x},e.prototype.setX=function(t){this.x=t},e.prototype.getY=function(){return this.y},e.prototype.setY=function(t){this.y=t},e.prototype.getWidth=function(){return this.width},e.prototype.setWidth=function(t){this.width=t},e.prototype.getHeight=function(){return this.height},e.prototype.setHeight=function(t){this.height=t},e.prototype.getRight=function(){return this.x+this.width},e.prototype.getBottom=function(){return this.y+this.height},e.prototype.intersects=function(t){return!(this.getRight()<t.x||this.getBottom()<t.y||t.getRight()<this.x||t.getBottom()<this.y)},e.prototype.getCenterX=function(){return this.x+this.width/2},e.prototype.getMinX=function(){return this.getX()},e.prototype.getMaxX=function(){return this.getX()+this.width},e.prototype.getCenterY=function(){return this.y+this.height/2},e.prototype.getMinY=function(){return this.getY()},e.prototype.getMaxY=function(){return this.getY()+this.height},e.prototype.getWidthHalf=function(){return this.width/2},e.prototype.getHeightHalf=function(){return this.height/2},A.exports=e},function(A,f,p){var e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i};function t(){}t.lastID=0,t.createID=function(i){return t.isPrimitive(i)?i:(i.uniqueID!=null||(i.uniqueID=t.getString(),t.lastID++),i.uniqueID)},t.getString=function(i){return i==null&&(i=t.lastID),"Object#"+i},t.isPrimitive=function(i){var r=i===void 0?"undefined":e(i);return i==null||r!="object"&&r!="function"},A.exports=t},function(A,f,p){function e(m){if(Array.isArray(m)){for(var g=0,_=Array(m.length);g<m.length;g++)_[g]=m[g];return _}return Array.from(m)}var t=p(0),i=p(6),r=p(3),n=p(1),o=p(5),h=p(4),a=p(17),l=p(27);function E(m){l.call(this),this.layoutQuality=t.QUALITY,this.createBendsAsNeeded=t.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=t.DEFAULT_INCREMENTAL,this.animationOnLayout=t.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=t.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=t.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=t.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new i(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,m!=null&&(this.isRemoteUse=m)}E.RANDOM_SEED=1,E.prototype=Object.create(l.prototype),E.prototype.getGraphManager=function(){return this.graphManager},E.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},E.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},E.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},E.prototype.newGraphManager=function(){var m=new i(this);return this.graphManager=m,m},E.prototype.newGraph=function(m){return new o(null,this.graphManager,m)},E.prototype.newNode=function(m){return new r(this.graphManager,m)},E.prototype.newEdge=function(m){return new n(null,null,m)},E.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},E.prototype.runLayout=function(){var m;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),m=!this.checkLayoutSuccess()&&this.layout(),t.ANIMATE!=="during"&&(m&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,m)},E.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},E.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var m=this.graphManager.getAllEdges(),g=0;g<m.length;g++)m[g];var _=this.graphManager.getRoot().getNodes();for(g=0;g<_.length;g++)_[g];this.update(this.graphManager.getRoot())}},E.prototype.update=function(m){if(m==null)this.update2();else if(m instanceof r){var g=m;if(g.getChild()!=null)for(var _=g.getChild().getNodes(),L=0;L<_.length;L++)update(_[L]);g.vGraphObject!=null&&g.vGraphObject.update(g)}else if(m instanceof n){var v=m;v.vGraphObject!=null&&v.vGraphObject.update(v)}else if(m instanceof o){var T=m;T.vGraphObject!=null&&T.vGraphObject.update(T)}},E.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=t.QUALITY,this.animationDuringLayout=t.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=t.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=t.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=t.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=t.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=t.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},E.prototype.transform=function(m){if(m==null)this.transform(new h(0,0));else{var g=new a,_=this.graphManager.getRoot().updateLeftTop();if(_!=null){g.setWorldOrgX(m.x),g.setWorldOrgY(m.y),g.setDeviceOrgX(_.x),g.setDeviceOrgY(_.y);for(var L=this.getAllNodes(),v=0;v<L.length;v++)L[v].transform(g)}}},E.prototype.positionNodesRandomly=function(m){if(m==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var g,_,L=m.getNodes(),v=0;v<L.length;v++)(_=(g=L[v]).getChild())==null||_.getNodes().length==0?g.scatter():(this.positionNodesRandomly(_),g.updateBounds())},E.prototype.getFlatForest=function(){for(var m=[],g=!0,_=this.graphManager.getRoot().getNodes(),L=!0,v=0;v<_.length;v++)_[v].getChild()!=null&&(L=!1);if(!L)return m;var T=new Set,u=[],I=new Map,s=[];for(s=s.concat(_);s.length>0&&g;){for(u.push(s[0]);u.length>0&&g;){var c=u[0];u.splice(0,1),T.add(c);var d=c.getEdges();for(v=0;v<d.length;v++){var y=d[v].getOtherEnd(c);if(I.get(c)!=y){if(T.has(y)){g=!1;break}u.push(y),I.set(y,c)}}}if(g){var O=[].concat(e(T));for(m.push(O),v=0;v<O.length;v++){var D=O[v],w=s.indexOf(D);w>-1&&s.splice(w,1)}T=new Set,I=new Map}else m=[]}return m},E.prototype.createDummyNodesForBendpoints=function(m){for(var g=[],_=m.source,L=this.graphManager.calcLowestCommonAncestor(m.source,m.target),v=0;v<m.bendpoints.length;v++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),L.add(T);var u=this.newEdge(null);this.graphManager.add(u,_,T),g.add(T),_=T}return u=this.newEdge(null),this.graphManager.add(u,_,m.target),this.edgeToDummyNodes.set(m,g),m.isInterGraph()?this.graphManager.remove(m):L.remove(m),g},E.prototype.createBendpointsFromDummyNodes=function(){var m=[];m=m.concat(this.graphManager.getAllEdges()),m=[].concat(e(this.edgeToDummyNodes.keys())).concat(m);for(var g=0;g<m.length;g++){var _=m[g];if(_.bendpoints.length>0){for(var L=this.edgeToDummyNodes.get(_),v=0;v<L.length;v++){var T=L[v],u=new h(T.getCenterX(),T.getCenterY()),I=_.bendpoints.get(v);I.x=u.x,I.y=u.y,T.getOwner().remove(T)}this.graphManager.add(_,_.source,_.target)}}},E.transform=function(m,g,_,L){if(_!=null&&L!=null){var v=g;return m<=50?v-=(g-g/_)/50*(50-m):v+=(g*L-g)/50*(m-50),v}var T,u;return m<=50?(T=9*g/500,u=g/10):(T=9*g/50,u=-8*g),T*m+u},E.findCenterOfTree=function(m){var g=[];g=g.concat(m);var _=[],L=new Map,v=!1,T=null;g.length!=1&&g.length!=2||(v=!0,T=g[0]);for(var u=0;u<g.length;u++){var I=(d=g[u]).getNeighborsList().size;L.set(d,d.getNeighborsList().size),I==1&&_.push(d)}var s=[];for(s=s.concat(_);!v;){var c=[];for(c=c.concat(s),s=[],u=0;u<g.length;u++){var d=g[u],y=g.indexOf(d);y>=0&&g.splice(y,1),d.getNeighborsList().forEach(function(O){if(_.indexOf(O)<0){var D=L.get(O)-1;D==1&&s.push(O),L.set(O,D)}})}_=_.concat(s),g.length!=1&&g.length!=2||(v=!0,T=g[0])}return T},E.prototype.setGraphManager=function(m){this.graphManager=m},A.exports=E},function(A,f,p){function e(){}e.seed=1,e.x=0,e.nextDouble=function(){return e.x=1e4*Math.sin(e.seed++),e.x-Math.floor(e.x)},A.exports=e},function(A,f,p){var e=p(4);function t(i,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}t.prototype.getWorldOrgX=function(){return this.lworldOrgX},t.prototype.setWorldOrgX=function(i){this.lworldOrgX=i},t.prototype.getWorldOrgY=function(){return this.lworldOrgY},t.prototype.setWorldOrgY=function(i){this.lworldOrgY=i},t.prototype.getWorldExtX=function(){return this.lworldExtX},t.prototype.setWorldExtX=function(i){this.lworldExtX=i},t.prototype.getWorldExtY=function(){return this.lworldExtY},t.prototype.setWorldExtY=function(i){this.lworldExtY=i},t.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},t.prototype.setDeviceOrgX=function(i){this.ldeviceOrgX=i},t.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},t.prototype.setDeviceOrgY=function(i){this.ldeviceOrgY=i},t.prototype.getDeviceExtX=function(){return this.ldeviceExtX},t.prototype.setDeviceExtX=function(i){this.ldeviceExtX=i},t.prototype.getDeviceExtY=function(){return this.ldeviceExtY},t.prototype.setDeviceExtY=function(i){this.ldeviceExtY=i},t.prototype.transformX=function(i){var r=0,n=this.lworldExtX;return n!=0&&(r=this.ldeviceOrgX+(i-this.lworldOrgX)*this.ldeviceExtX/n),r},t.prototype.transformY=function(i){var r=0,n=this.lworldExtY;return n!=0&&(r=this.ldeviceOrgY+(i-this.lworldOrgY)*this.ldeviceExtY/n),r},t.prototype.inverseTransformX=function(i){var r=0,n=this.ldeviceExtX;return n!=0&&(r=this.lworldOrgX+(i-this.ldeviceOrgX)*this.lworldExtX/n),r},t.prototype.inverseTransformY=function(i){var r=0,n=this.ldeviceExtY;return n!=0&&(r=this.lworldOrgY+(i-this.ldeviceOrgY)*this.lworldExtY/n),r},t.prototype.inverseTransformPoint=function(i){return new e(this.inverseTransformX(i.x),this.inverseTransformY(i.y))},A.exports=t},function(A,f,p){var e=p(15),t=p(7),i=p(0),r=p(8),n=p(9);function o(){e.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}for(var h in o.prototype=Object.create(e.prototype),e)o[h]=e[h];o.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},o.prototype.calcIdealEdgeLengths=function(){for(var a,l,E,m,g,_,L=this.getGraphManager().getAllEdges(),v=0;v<L.length;v++)(a=L[v]).idealLength=this.idealEdgeLength,a.isInterGraph&&(E=a.getSource(),m=a.getTarget(),g=a.getSourceInLca().getEstimatedSize(),_=a.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(a.idealLength+=g+_-2*i.SIMPLE_NODE_SIZE),l=a.getLca().getInclusionTreeDepth(),a.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(E.getInclusionTreeDepth()+m.getInclusionTreeDepth()-2*l))},o.prototype.initSpringEmbedder=function(){var a=this.getAllNodes().length;this.incremental?(a>t.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(a-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(a>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(a-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},o.prototype.calcSpringForces=function(){for(var a,l=this.getAllEdges(),E=0;E<l.length;E++)a=l[E],this.calcSpringForce(a,a.idealLength)},o.prototype.calcRepulsionForces=function(){var a,l,E,m,g,_=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],L=arguments.length>1&&arguments[1]!==void 0&&arguments[1],v=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&_&&this.updateGrid(),g=new Set,a=0;a<v.length;a++)E=v[a],this.calculateRepulsionForceOfANode(E,g,_,L),g.add(E);else for(a=0;a<v.length;a++)for(E=v[a],l=a+1;l<v.length;l++)m=v[l],E.getOwner()==m.getOwner()&&this.calcRepulsionForce(E,m)},o.prototype.calcGravitationalForces=function(){for(var a,l=this.getAllNodesToApplyGravitation(),E=0;E<l.length;E++)a=l[E],this.calcGravitationalForce(a)},o.prototype.moveNodes=function(){for(var a=this.getAllNodes(),l=0;l<a.length;l++)a[l].move()},o.prototype.calcSpringForce=function(a,l){var E,m,g,_,L=a.getSource(),v=a.getTarget();if(this.uniformLeafNodeSizes&&L.getChild()==null&&v.getChild()==null)a.updateLengthSimple();else if(a.updateLength(),a.isOverlapingSourceAndTarget)return;(E=a.getLength())!=0&&(g=(m=this.springConstant*(E-l))*(a.lengthX/E),_=m*(a.lengthY/E),L.springForceX+=g,L.springForceY+=_,v.springForceX-=g,v.springForceY-=_)},o.prototype.calcRepulsionForce=function(a,l){var E,m,g,_,L,v,T,u=a.getRect(),I=l.getRect(),s=new Array(2),c=new Array(4);if(u.intersects(I)){r.calcSeparationAmount(u,I,s,t.DEFAULT_EDGE_LENGTH/2),v=2*s[0],T=2*s[1];var d=a.noOfChildren*l.noOfChildren/(a.noOfChildren+l.noOfChildren);a.repulsionForceX-=d*v,a.repulsionForceY-=d*T,l.repulsionForceX+=d*v,l.repulsionForceY+=d*T}else this.uniformLeafNodeSizes&&a.getChild()==null&&l.getChild()==null?(E=I.getCenterX()-u.getCenterX(),m=I.getCenterY()-u.getCenterY()):(r.getIntersection(u,I,c),E=c[2]-c[0],m=c[3]-c[1]),Math.abs(E)<t.MIN_REPULSION_DIST&&(E=n.sign(E)*t.MIN_REPULSION_DIST),Math.abs(m)<t.MIN_REPULSION_DIST&&(m=n.sign(m)*t.MIN_REPULSION_DIST),g=E*E+m*m,_=Math.sqrt(g),v=(L=this.repulsionConstant*a.noOfChildren*l.noOfChildren/g)*E/_,T=L*m/_,a.repulsionForceX-=v,a.repulsionForceY-=T,l.repulsionForceX+=v,l.repulsionForceY+=T},o.prototype.calcGravitationalForce=function(a){var l,E,m,g,_,L,v,T;E=((l=a.getOwner()).getRight()+l.getLeft())/2,m=(l.getTop()+l.getBottom())/2,g=a.getCenterX()-E,_=a.getCenterY()-m,L=Math.abs(g)+a.getWidth()/2,v=Math.abs(_)+a.getHeight()/2,a.getOwner()==this.graphManager.getRoot()?(L>(T=l.getEstimatedSize()*this.gravityRangeFactor)||v>T)&&(a.gravitationForceX=-this.gravityConstant*g,a.gravitationForceY=-this.gravityConstant*_):(L>(T=l.getEstimatedSize()*this.compoundGravityRangeFactor)||v>T)&&(a.gravitationForceX=-this.gravityConstant*g*this.compoundGravityConstant,a.gravitationForceY=-this.gravityConstant*_*this.compoundGravityConstant)},o.prototype.isConverged=function(){var a,l=!1;return this.totalIterations>this.maxIterations/3&&(l=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),a=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,a||l},o.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},o.prototype.calcNoOfChildrenForAllNodes=function(){for(var a,l=this.graphManager.getAllNodes(),E=0;E<l.length;E++)(a=l[E]).noOfChildren=a.getNoOfChildren()},o.prototype.calcGrid=function(a){var l,E;l=parseInt(Math.ceil((a.getRight()-a.getLeft())/this.repulsionRange)),E=parseInt(Math.ceil((a.getBottom()-a.getTop())/this.repulsionRange));for(var m=new Array(l),g=0;g<l;g++)m[g]=new Array(E);for(g=0;g<l;g++)for(var _=0;_<E;_++)m[g][_]=new Array;return m},o.prototype.addNodeToGrid=function(a,l,E){var m,g,_,L;m=parseInt(Math.floor((a.getRect().x-l)/this.repulsionRange)),g=parseInt(Math.floor((a.getRect().width+a.getRect().x-l)/this.repulsionRange)),_=parseInt(Math.floor((a.getRect().y-E)/this.repulsionRange)),L=parseInt(Math.floor((a.getRect().height+a.getRect().y-E)/this.repulsionRange));for(var v=m;v<=g;v++)for(var T=_;T<=L;T++)this.grid[v][T].push(a),a.setGridCoordinates(m,g,_,L)},o.prototype.updateGrid=function(){var a,l,E=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),a=0;a<E.length;a++)l=E[a],this.addNodeToGrid(l,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},o.prototype.calculateRepulsionForceOfANode=function(a,l,E,m){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&E||m){var g,_=new Set;a.surrounding=new Array;for(var L=this.grid,v=a.startX-1;v<a.finishX+2;v++)for(var T=a.startY-1;T<a.finishY+2;T++)if(!(v<0||T<0||v>=L.length||T>=L[0].length)){for(var u=0;u<L[v][T].length;u++)if(g=L[v][T][u],a.getOwner()==g.getOwner()&&a!=g&&!l.has(g)&&!_.has(g)){var I=Math.abs(a.getCenterX()-g.getCenterX())-(a.getWidth()/2+g.getWidth()/2),s=Math.abs(a.getCenterY()-g.getCenterY())-(a.getHeight()/2+g.getHeight()/2);I<=this.repulsionRange&&s<=this.repulsionRange&&_.add(g)}}a.surrounding=[].concat(function(c){if(Array.isArray(c)){for(var d=0,y=Array(c.length);d<c.length;d++)y[d]=c[d];return y}return Array.from(c)}(_))}for(v=0;v<a.surrounding.length;v++)this.calcRepulsionForce(a,a.surrounding[v])},o.prototype.calcRepulsionRange=function(){return 0},A.exports=o},function(A,f,p){var e=p(1),t=p(7);function i(n,o,h){e.call(this,n,o,h),this.idealLength=t.DEFAULT_EDGE_LENGTH}for(var r in i.prototype=Object.create(e.prototype),e)i[r]=e[r];A.exports=i},function(A,f,p){var e=p(3);function t(r,n,o,h){e.call(this,r,n,o,h),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var i in t.prototype=Object.create(e.prototype),e)t[i]=e[i];t.prototype.setGridCoordinates=function(r,n,o,h){this.startX=r,this.finishX=n,this.startY=o,this.finishY=h},A.exports=t},function(A,f,p){function e(t,i){this.width=0,this.height=0,t!==null&&i!==null&&(this.height=i,this.width=t)}e.prototype.getWidth=function(){return this.width},e.prototype.setWidth=function(t){this.width=t},e.prototype.getHeight=function(){return this.height},e.prototype.setHeight=function(t){this.height=t},A.exports=e},function(A,f,p){var e=p(14);function t(){this.map={},this.keys=[]}t.prototype.put=function(i,r){var n=e.createID(i);this.contains(n)||(this.map[n]=r,this.keys.push(i))},t.prototype.contains=function(i){return e.createID(i),this.map[i]!=null},t.prototype.get=function(i){var r=e.createID(i);return this.map[r]},t.prototype.keySet=function(){return this.keys},A.exports=t},function(A,f,p){var e=p(14);function t(){this.set={}}t.prototype.add=function(i){var r=e.createID(i);this.contains(r)||(this.set[r]=i)},t.prototype.remove=function(i){delete this.set[e.createID(i)]},t.prototype.clear=function(){this.set={}},t.prototype.contains=function(i){return this.set[e.createID(i)]==i},t.prototype.isEmpty=function(){return this.size()===0},t.prototype.size=function(){return Object.keys(this.set).length},t.prototype.addAllTo=function(i){for(var r=Object.keys(this.set),n=r.length,o=0;o<n;o++)i.push(this.set[r[o]])},t.prototype.size=function(){return Object.keys(this.set).length},t.prototype.addAll=function(i){for(var r=i.length,n=0;n<r;n++){var o=i[n];this.add(o)}},A.exports=t},function(A,f,p){var e=function(){function r(n,o){for(var h=0;h<o.length;h++){var a=o[h];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(n,a.key,a)}}return function(n,o,h){return o&&r(n.prototype,o),h&&r(n,h),n}}(),t=p(11),i=function(){function r(n,o){(function(a,l){if(!(a instanceof l))throw new TypeError("Cannot call a class as a function")})(this,r),o===null&&o===void 0||(this.compareFunction=this._defaultCompareFunction);var h=void 0;h=n instanceof t?n.size():n.length,this._quicksort(n,0,h-1)}return e(r,[{key:"_quicksort",value:function(n,o,h){if(o<h){var a=this._partition(n,o,h);this._quicksort(n,o,a),this._quicksort(n,a+1,h)}}},{key:"_partition",value:function(n,o,h){for(var a=this._get(n,o),l=o,E=h;;){for(;this.compareFunction(a,this._get(n,E));)E--;for(;this.compareFunction(this._get(n,l),a);)l++;if(!(l<E))return E;this._swap(n,l,E),l++,E--}}},{key:"_get",value:function(n,o){return n instanceof t?n.get_object_at(o):n[o]}},{key:"_set",value:function(n,o,h){n instanceof t?n.set_object_at(o,h):n[o]=h}},{key:"_swap",value:function(n,o,h){var a=this._get(n,o);this._set(n,o,this._get(n,h)),this._set(n,h,a)}},{key:"_defaultCompareFunction",value:function(n,o){return o>n}}]),r}();A.exports=i},function(A,f,p){var e=function(){function i(r,n){for(var o=0;o<n.length;o++){var h=n[o];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(r,h.key,h)}}return function(r,n,o){return n&&i(r.prototype,n),o&&i(r,o),r}}(),t=function(){function i(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;(function(_,L){if(!(_ instanceof L))throw new TypeError("Cannot call a class as a function")})(this,i),this.sequence1=r,this.sequence2=n,this.match_score=o,this.mismatch_penalty=h,this.gap_penalty=a,this.iMax=r.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var l=0;l<this.iMax;l++){this.grid[l]=new Array(this.jMax);for(var E=0;E<this.jMax;E++)this.grid[l][E]=0}this.tracebackGrid=new Array(this.iMax);for(var m=0;m<this.iMax;m++){this.tracebackGrid[m]=new Array(this.jMax);for(var g=0;g<this.jMax;g++)this.tracebackGrid[m][g]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return e(i,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var r=1;r<this.jMax;r++)this.grid[0][r]=this.grid[0][r-1]+this.gap_penalty,this.tracebackGrid[0][r]=[!1,!1,!0];for(var n=1;n<this.iMax;n++)this.grid[n][0]=this.grid[n-1][0]+this.gap_penalty,this.tracebackGrid[n][0]=[!1,!0,!1];for(var o=1;o<this.iMax;o++)for(var h=1;h<this.jMax;h++){var a=[this.sequence1[o-1]===this.sequence2[h-1]?this.grid[o-1][h-1]+this.match_score:this.grid[o-1][h-1]+this.mismatch_penalty,this.grid[o-1][h]+this.gap_penalty,this.grid[o][h-1]+this.gap_penalty],l=this.arrayAllMaxIndexes(a);this.grid[o][h]=a[l[0]],this.tracebackGrid[o][h]=[l.includes(0),l.includes(1),l.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var r=[];for(r.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});r[0];){var n=r[0],o=this.tracebackGrid[n.pos[0]][n.pos[1]];o[0]&&r.push({pos:[n.pos[0]-1,n.pos[1]-1],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),o[1]&&r.push({pos:[n.pos[0]-1,n.pos[1]],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:"-"+n.seq2}),o[2]&&r.push({pos:[n.pos[0],n.pos[1]-1],seq1:"-"+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),n.pos[0]===0&&n.pos[1]===0&&this.alignments.push({sequence1:n.seq1,sequence2:n.seq2}),r.shift()}return this.alignments}},{key:"getAllIndexes",value:function(r,n){for(var o=[],h=-1;(h=r.indexOf(n,h+1))!==-1;)o.push(h);return o}},{key:"arrayAllMaxIndexes",value:function(r){return this.getAllIndexes(r,Math.max.apply(null,r))}}]),i}();A.exports=t},function(A,f,p){var e=function(){};e.FDLayout=p(18),e.FDLayoutConstants=p(7),e.FDLayoutEdge=p(19),e.FDLayoutNode=p(20),e.DimensionD=p(21),e.HashMap=p(22),e.HashSet=p(23),e.IGeometry=p(8),e.IMath=p(9),e.Integer=p(10),e.Point=p(12),e.PointD=p(4),e.RandomSeed=p(16),e.RectangleD=p(13),e.Transform=p(17),e.UniqueIDGeneretor=p(14),e.Quicksort=p(24),e.LinkedList=p(11),e.LGraphObject=p(2),e.LGraph=p(5),e.LEdge=p(1),e.LGraphManager=p(6),e.LNode=p(3),e.Layout=p(15),e.LayoutConstants=p(0),e.NeedlemanWunsch=p(25),A.exports=e},function(A,f,p){function e(){this.listeners=[]}var t=e.prototype;t.addListener=function(i,r){this.listeners.push({event:i,callback:r})},t.removeListener=function(i,r){for(var n=this.listeners.length;n>=0;n--){var o=this.listeners[n];o.event===i&&o.callback===r&&this.listeners.splice(n,1)}},t.emit=function(i,r){for(var n=0;n<this.listeners.length;n++){var o=this.listeners[n];i===o.event&&o.callback(r)}},A.exports=e}])},lt.exports=N());var N}var gt,ct,ut,wt=(ct||(ct=1,ut=function(N){return function(A){var f={};function p(e){if(f[e])return f[e].exports;var t=f[e]={i:e,l:!1,exports:{}};return A[e].call(t.exports,t,t.exports,p),t.l=!0,t.exports}return p.m=A,p.c=f,p.i=function(e){return e},p.d=function(e,t,i){p.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},p.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(t,"a",t),t},p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p.p="",p(p.s=1)}([function(A,f){A.exports=N},function(A,f,p){var e=p(0).layoutBase.LayoutConstants,t=p(0).layoutBase.FDLayoutConstants,i=p(0).CoSEConstants,r=p(0).CoSELayout,n=p(0).CoSENode,o=p(0).layoutBase.PointD,h=p(0).layoutBase.DimensionD,a={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function l(g){this.options=function(_,L){var v={};for(var T in _)v[T]=_[T];for(var T in L)v[T]=L[T];return v}(a,g),E(this.options)}var E=function(g){g.nodeRepulsion!=null&&(i.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=g.nodeRepulsion),g.idealEdgeLength!=null&&(i.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=g.idealEdgeLength),g.edgeElasticity!=null&&(i.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=g.edgeElasticity),g.nestingFactor!=null&&(i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.nestingFactor),g.gravity!=null&&(i.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=g.gravity),g.numIter!=null&&(i.MAX_ITERATIONS=t.MAX_ITERATIONS=g.numIter),g.gravityRange!=null&&(i.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=g.gravityRange),g.gravityCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.gravityCompound),g.gravityRangeCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.gravityRangeCompound),g.initialEnergyOnIncremental!=null&&(i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.initialEnergyOnIncremental),g.quality=="draft"?e.QUALITY=0:g.quality=="proof"?e.QUALITY=2:e.QUALITY=1,i.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=e.NODE_DIMENSIONS_INCLUDE_LABELS=g.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=e.DEFAULT_INCREMENTAL=!g.randomize,i.ANIMATE=t.ANIMATE=e.ANIMATE=g.animate,i.TILE=g.tile,i.TILING_PADDING_VERTICAL=typeof g.tilingPaddingVertical=="function"?g.tilingPaddingVertical.call():g.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof g.tilingPaddingHorizontal=="function"?g.tilingPaddingHorizontal.call():g.tilingPaddingHorizontal};l.prototype.run=function(){var g,_,L=this.options;this.idToLNode={};var v=this.layout=new r,T=this;T.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var u=v.newGraphManager();this.gm=u;var I=this.options.eles.nodes(),s=this.options.eles.edges();this.root=u.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(I),v);for(var c=0;c<s.length;c++){var d=s[c],y=this.idToLNode[d.data("source")],O=this.idToLNode[d.data("target")];y!==O&&y.getEdgesBetween(O).length==0&&(u.add(v.newEdge(),y,O).id=d.id())}var D=function(R,C){typeof R=="number"&&(R=C);var M=R.data("id"),G=T.idToLNode[M];return{x:G.getRect().getCenterX(),y:G.getRect().getCenterY()}},w=function R(){for(var C,M=function(){L.fit&&L.cy.fit(L.eles,L.padding),g||(g=!0,T.cy.one("layoutready",L.ready),T.cy.trigger({type:"layoutready",layout:T}))},G=T.options.refresh,S=0;S<G&&!C;S++)C=T.stopped||T.layout.tick();if(C)return v.checkLayoutSuccess()&&!v.isSubLayout&&v.doPostLayout(),v.tilingPostLayout&&v.tilingPostLayout(),v.isLayoutFinished=!0,T.options.eles.nodes().positions(D),M(),T.cy.one("layoutstop",T.options.stop),T.cy.trigger({type:"layoutstop",layout:T}),_&&cancelAnimationFrame(_),void(g=!1);var Y=T.layout.getPositionsData();L.eles.nodes().positions(function(F,P){if(typeof F=="number"&&(F=P),!F.isParent()){for(var b=F.id(),k=Y[b],U=F;k==null&&(k=Y[U.data("parent")]||Y["DummyCompound_"+U.data("parent")],Y[b]=k,(U=U.parent()[0])!=null););return k!=null?{x:k.x,y:k.y}:{x:F.position("x"),y:F.position("y")}}}),M(),_=requestAnimationFrame(R)};return v.addListener("layoutstarted",function(){T.options.animate==="during"&&(_=requestAnimationFrame(w))}),v.runLayout(),this.options.animate!=="during"&&(T.options.eles.nodes().not(":parent").layoutPositions(T,T.options,D),g=!1),this},l.prototype.getTopMostNodes=function(g){for(var _={},L=0;L<g.length;L++)_[g[L].id()]=!0;var v=g.filter(function(T,u){typeof T=="number"&&(T=u);for(var I=T.parent()[0];I!=null;){if(_[I.id()])return!1;I=I.parent()[0]}return!0});return v},l.prototype.processChildrenList=function(g,_,L){for(var v=_.length,T=0;T<v;T++){var u,I,s=_[T],c=s.children(),d=s.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if((u=s.outerWidth()!=null&&s.outerHeight()!=null?g.add(new n(L.graphManager,new o(s.position("x")-d.w/2,s.position("y")-d.h/2),new h(parseFloat(d.w),parseFloat(d.h)))):g.add(new n(this.graphManager))).id=s.data("id"),u.paddingLeft=parseInt(s.css("padding")),u.paddingTop=parseInt(s.css("padding")),u.paddingRight=parseInt(s.css("padding")),u.paddingBottom=parseInt(s.css("padding")),this.options.nodeDimensionsIncludeLabels&&s.isParent()){var y=s.boundingBox({includeLabels:!0,includeNodes:!1}).w,O=s.boundingBox({includeLabels:!0,includeNodes:!1}).h,D=s.css("text-halign");u.labelWidth=y,u.labelHeight=O,u.labelPos=D}this.idToLNode[s.data("id")]=u,isNaN(u.rect.x)&&(u.rect.x=0),isNaN(u.rect.y)&&(u.rect.y=0),c!=null&&c.length>0&&(I=L.getGraphManager().add(L.newGraph(),u),this.processChildrenList(I,c,L))}},l.prototype.stop=function(){return this.stopped=!0,this};var m=function(g){g("layout","cose-bilkent",l)};typeof cytoscape<"u"&&m(cytoscape),A.exports=m}])},at.exports=ut(function(){return gt?ht.exports:(gt=1,N=function(A){return function(f){var p={};function e(t){if(p[t])return p[t].exports;var i=p[t]={i:t,l:!1,exports:{}};return f[t].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=f,e.c=p,e.i=function(t){return t},e.d=function(t,i,r){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},e.p="",e(e.s=7)}([function(f,p){f.exports=A},function(f,p,e){var t=e(0).FDLayoutConstants;function i(){}for(var r in t)i[r]=t[r];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=t.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,f.exports=i},function(f,p,e){var t=e(0).FDLayoutEdge;function i(n,o,h){t.call(this,n,o,h)}for(var r in i.prototype=Object.create(t.prototype),t)i[r]=t[r];f.exports=i},function(f,p,e){var t=e(0).LGraph;function i(n,o,h){t.call(this,n,o,h)}for(var r in i.prototype=Object.create(t.prototype),t)i[r]=t[r];f.exports=i},function(f,p,e){var t=e(0).LGraphManager;function i(n){t.call(this,n)}for(var r in i.prototype=Object.create(t.prototype),t)i[r]=t[r];f.exports=i},function(f,p,e){var t=e(0).FDLayoutNode,i=e(0).IMath;function r(o,h,a,l){t.call(this,o,h,a,l)}for(var n in r.prototype=Object.create(t.prototype),t)r[n]=t[n];r.prototype.move=function(){var o=this.graphManager.getLayout();this.displacementX=o.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=o.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>o.coolingFactor*o.maxNodeDisplacement&&(this.displacementX=o.coolingFactor*o.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>o.coolingFactor*o.maxNodeDisplacement&&(this.displacementY=o.coolingFactor*o.maxNodeDisplacement*i.sign(this.displacementY)),this.child==null||this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),o.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},r.prototype.propogateDisplacementToChildren=function(o,h){for(var a,l=this.getChild().getNodes(),E=0;E<l.length;E++)(a=l[E]).getChild()==null?(a.moveBy(o,h),a.displacementX+=o,a.displacementY+=h):a.propogateDisplacementToChildren(o,h)},r.prototype.setPred1=function(o){this.pred1=o},r.prototype.getPred1=function(){return pred1},r.prototype.getPred2=function(){return pred2},r.prototype.setNext=function(o){this.next=o},r.prototype.getNext=function(){return next},r.prototype.setProcessed=function(o){this.processed=o},r.prototype.isProcessed=function(){return processed},f.exports=r},function(f,p,e){var t=e(0).FDLayout,i=e(4),r=e(3),n=e(5),o=e(2),h=e(1),a=e(0).FDLayoutConstants,l=e(0).LayoutConstants,E=e(0).Point,m=e(0).PointD,g=e(0).Layout,_=e(0).Integer,L=e(0).IGeometry,v=e(0).LGraph,T=e(0).Transform;function u(){t.call(this),this.toBeTiled={}}for(var I in u.prototype=Object.create(t.prototype),t)u[I]=t[I];u.prototype.newGraphManager=function(){var s=new i(this);return this.graphManager=s,s},u.prototype.newGraph=function(s){return new r(null,this.graphManager,s)},u.prototype.newNode=function(s){return new n(this.graphManager,s)},u.prototype.newEdge=function(s){return new o(null,null,s)},u.prototype.initParameters=function(){t.prototype.initParameters.call(this,arguments),this.isSubLayout||(h.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=h.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=a.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=a.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/a.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=a.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},u.prototype.layout=function(){return l.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},u.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental)h.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),c=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(y){return c.has(y)}),this.graphManager.setAllNodesToApplyGravitation(d));else{var s=this.getFlatForest();if(s.length>0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var c=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(y){return c.has(y)});this.graphManager.setAllNodesToApplyGravitation(d),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},u.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%a.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(O){return s.has(O)});this.graphManager.setAllNodesToApplyGravitation(c),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var d=!this.isTreeGrowing&&!this.isGrowthFinished,y=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(d,y),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},u.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),c={},d=0;d<s.length;d++){var y=s[d].rect,O=s[d].id;c[O]={id:O,x:y.getCenterX(),y:y.getCenterY(),w:y.width,h:y.height}}return c},u.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(a.ANIMATE==="during")this.emit("layoutstarted");else{for(;!s;)s=this.tick();this.graphManager.updateBounds()}},u.prototype.calculateNodesToApplyGravitationTo=function(){var s,c,d=[],y=this.graphManager.getGraphs(),O=y.length;for(c=0;c<O;c++)(s=y[c]).updateConnected(),s.isConnected||(d=d.concat(s.getNodes()));return d},u.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var c,d=new Set;for(c=0;c<s.length;c++){var y=s[c];if(!d.has(y)){var O=y.getSource(),D=y.getTarget();if(O==D)y.getBendpoints().push(new m),y.getBendpoints().push(new m),this.createDummyNodesForBendpoints(y),d.add(y);else{var w=[];if(w=(w=w.concat(O.getEdgeListToNode(D))).concat(D.getEdgeListToNode(O)),!d.has(w[0])){var R;if(w.length>1)for(R=0;R<w.length;R++){var C=w[R];C.getBendpoints().push(new m),this.createDummyNodesForBendpoints(C)}w.forEach(function(M){d.add(M)})}}}if(d.size==s.length)break}},u.prototype.positionNodesRadially=function(s){for(var c=new E(0,0),d=Math.ceil(Math.sqrt(s.length)),y=0,O=0,D=0,w=new m(0,0),R=0;R<s.length;R++){R%d==0&&(D=0,O=y,R!=0&&(O+=h.DEFAULT_COMPONENT_SEPERATION),y=0);var C=s[R],M=g.findCenterOfTree(C);c.x=D,c.y=O,(w=u.radialLayout(C,M,c)).y>y&&(y=Math.floor(w.y)),D=Math.floor(w.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new m(l.WORLD_CENTER_X-w.x/2,l.WORLD_CENTER_Y-w.y/2))},u.radialLayout=function(s,c,d){var y=Math.max(this.maxDiagonalInTree(s),h.DEFAULT_RADIAL_SEPARATION);u.branchRadialLayout(c,null,0,359,0,y);var O=v.calculateBounds(s),D=new T;D.setDeviceOrgX(O.getMinX()),D.setDeviceOrgY(O.getMinY()),D.setWorldOrgX(d.x),D.setWorldOrgY(d.y);for(var w=0;w<s.length;w++)s[w].transform(D);var R=new m(O.getMaxX(),O.getMaxY());return D.inverseTransformPoint(R)},u.branchRadialLayout=function(s,c,d,y,O,D){var w=(y-d+1)/2;w<0&&(w+=180);var R=(w+d)%360*L.TWO_PI/360,C=O*Math.cos(R),M=O*Math.sin(R);s.setCenter(C,M);var G=[],S=(G=G.concat(s.getEdges())).length;c!=null&&S--;for(var Y,F=0,P=G.length,b=s.getEdgesBetween(c);b.length>1;){var k=b[0];b.splice(0,1);var U=G.indexOf(k);U>=0&&G.splice(U,1),P--,S--}Y=c!=null?(G.indexOf(b[0])+1)%P:0;for(var q=Math.abs(y-d)/S,W=Y;F!=S;W=++W%P){var B=G[W].getOtherEnd(s);if(B!=c){var Z=(d+F*q)%360,V=(Z+q)%360;u.branchRadialLayout(B,s,Z,V,O+D,D),F++}}},u.maxDiagonalInTree=function(s){for(var c=_.MIN_VALUE,d=0;d<s.length;d++){var y=s[d].getDiagonal();y>c&&(c=y)}return c},u.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},u.prototype.groupZeroDegreeMembers=function(){var s=this,c={};this.memberGroups={},this.idToDummyNode={};for(var d=[],y=this.graphManager.getAllNodes(),O=0;O<y.length;O++){var D=(w=y[O]).getParent();this.getNodeDegreeWithChildren(w)!==0||D.id!=null&&this.getToBeTiled(D)||d.push(w)}for(O=0;O<d.length;O++){var w,R=(w=d[O]).getParent().id;c[R]===void 0&&(c[R]=[]),c[R]=c[R].concat(w)}Object.keys(c).forEach(function(C){if(c[C].length>1){var M="DummyCompound_"+C;s.memberGroups[M]=c[C];var G=c[C][0].getParent(),S=new n(s.graphManager);S.id=M,S.paddingLeft=G.paddingLeft||0,S.paddingRight=G.paddingRight||0,S.paddingBottom=G.paddingBottom||0,S.paddingTop=G.paddingTop||0,s.idToDummyNode[M]=S;var Y=s.getGraphManager().add(s.newGraph(),S),F=G.getChild();F.add(S);for(var P=0;P<c[C].length;P++){var b=c[C][P];F.remove(b),Y.add(b)}}})},u.prototype.clearCompounds=function(){var s={},c={};this.performDFSOnCompounds();for(var d=0;d<this.compoundOrder.length;d++)c[this.compoundOrder[d].id]=this.compoundOrder[d],s[this.compoundOrder[d].id]=[].concat(this.compoundOrder[d].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[d].getChild()),this.compoundOrder[d].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,c)},u.prototype.clearZeroDegreeMembers=function(){var s=this,c=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(d){var y=s.idToDummyNode[d];c[d]=s.tileNodes(s.memberGroups[d],y.paddingLeft+y.paddingRight),y.rect.width=c[d].width,y.rect.height=c[d].height})},u.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var c=this.compoundOrder[s],d=c.id,y=c.paddingLeft,O=c.paddingTop;this.adjustLocations(this.tiledMemberPack[d],c.rect.x,c.rect.y,y,O)}},u.prototype.repopulateZeroDegreeMembers=function(){var s=this,c=this.tiledZeroDegreePack;Object.keys(c).forEach(function(d){var y=s.idToDummyNode[d],O=y.paddingLeft,D=y.paddingTop;s.adjustLocations(c[d],y.rect.x,y.rect.y,O,D)})},u.prototype.getToBeTiled=function(s){var c=s.id;if(this.toBeTiled[c]!=null)return this.toBeTiled[c];var d=s.getChild();if(d==null)return this.toBeTiled[c]=!1,!1;for(var y=d.getNodes(),O=0;O<y.length;O++){var D=y[O];if(this.getNodeDegree(D)>0)return this.toBeTiled[c]=!1,!1;if(D.getChild()!=null){if(!this.getToBeTiled(D))return this.toBeTiled[c]=!1,!1}else this.toBeTiled[D.id]=!1}return this.toBeTiled[c]=!0,!0},u.prototype.getNodeDegree=function(s){s.id;for(var c=s.getEdges(),d=0,y=0;y<c.length;y++){var O=c[y];O.getSource().id!==O.getTarget().id&&(d+=1)}return d},u.prototype.getNodeDegreeWithChildren=function(s){var c=this.getNodeDegree(s);if(s.getChild()==null)return c;for(var d=s.getChild().getNodes(),y=0;y<d.length;y++){var O=d[y];c+=this.getNodeDegreeWithChildren(O)}return c},u.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},u.prototype.fillCompexOrderByDFS=function(s){for(var c=0;c<s.length;c++){var d=s[c];d.getChild()!=null&&this.fillCompexOrderByDFS(d.getChild().getNodes()),this.getToBeTiled(d)&&this.compoundOrder.push(d)}},u.prototype.adjustLocations=function(s,c,d,y,O){d+=O;for(var D=c+=y,w=0;w<s.rows.length;w++){var R=s.rows[w];c=D;for(var C=0,M=0;M<R.length;M++){var G=R[M];G.rect.x=c,G.rect.y=d,c+=G.rect.width+s.horizontalPadding,G.rect.height>C&&(C=G.rect.height)}d+=C+s.verticalPadding}},u.prototype.tileCompoundMembers=function(s,c){var d=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(y){var O=c[y];d.tiledMemberPack[y]=d.tileNodes(s[y],O.paddingLeft+O.paddingRight),O.rect.width=d.tiledMemberPack[y].width,O.rect.height=d.tiledMemberPack[y].height})},u.prototype.tileNodes=function(s,c){var d={rows:[],rowWidth:[],rowHeight:[],width:0,height:c,verticalPadding:h.TILING_PADDING_VERTICAL,horizontalPadding:h.TILING_PADDING_HORIZONTAL};s.sort(function(D,w){return D.rect.width*D.rect.height>w.rect.width*w.rect.height?-1:D.rect.width*D.rect.height<w.rect.width*w.rect.height?1:0});for(var y=0;y<s.length;y++){var O=s[y];d.rows.length==0?this.insertNodeToRow(d,O,0,c):this.canAddHorizontal(d,O.rect.width,O.rect.height)?this.insertNodeToRow(d,O,this.getShortestRowIndex(d),c):this.insertNodeToRow(d,O,d.rows.length,c),this.shiftToLastRow(d)}return d},u.prototype.insertNodeToRow=function(s,c,d,y){var O=y;d==s.rows.length&&(s.rows.push([]),s.rowWidth.push(O),s.rowHeight.push(0));var D=s.rowWidth[d]+c.rect.width;s.rows[d].length>0&&(D+=s.horizontalPadding),s.rowWidth[d]=D,s.width<D&&(s.width=D);var w=c.rect.height;d>0&&(w+=s.verticalPadding);var R=0;w>s.rowHeight[d]&&(R=s.rowHeight[d],s.rowHeight[d]=w,R=s.rowHeight[d]-R),s.height+=R,s.rows[d].push(c)},u.prototype.getShortestRowIndex=function(s){for(var c=-1,d=Number.MAX_VALUE,y=0;y<s.rows.length;y++)s.rowWidth[y]<d&&(c=y,d=s.rowWidth[y]);return c},u.prototype.getLongestRowIndex=function(s){for(var c=-1,d=Number.MIN_VALUE,y=0;y<s.rows.length;y++)s.rowWidth[y]>d&&(c=y,d=s.rowWidth[y]);return c},u.prototype.canAddHorizontal=function(s,c,d){var y=this.getShortestRowIndex(s);if(y<0)return!0;var O=s.rowWidth[y];if(O+s.horizontalPadding+c<=s.width)return!0;var D,w,R=0;return s.rowHeight[y]<d&&y>0&&(R=d+s.verticalPadding-s.rowHeight[y]),D=s.width-O>=c+s.horizontalPadding?(s.height+R)/(O+c+s.horizontalPadding):(s.height+R)/s.width,R=d+s.verticalPadding,(w=s.width<c?(s.height+R)/c:(s.height+R)/s.width)<1&&(w=1/w),D<1&&(D=1/D),D<w},u.prototype.shiftToLastRow=function(s){var c=this.getLongestRowIndex(s),d=s.rowWidth.length-1,y=s.rows[c],O=y[y.length-1],D=O.width+s.horizontalPadding;if(s.width-s.rowWidth[d]>D&&c!=d){y.splice(-1,1),s.rows[d].push(O),s.rowWidth[c]=s.rowWidth[c]-D,s.rowWidth[d]=s.rowWidth[d]+D,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var w=Number.MIN_VALUE,R=0;R<y.length;R++)y[R].height>w&&(w=y[R].height);c>0&&(w+=s.verticalPadding);var C=s.rowHeight[c]+s.rowHeight[d];s.rowHeight[c]=w,s.rowHeight[d]<O.height+s.verticalPadding&&(s.rowHeight[d]=O.height+s.verticalPadding);var M=s.rowHeight[c]+s.rowHeight[d];s.height+=M-C,this.shiftToLastRow(s)}},u.prototype.tilingPreLayout=function(){h.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},u.prototype.tilingPostLayout=function(){h.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},u.prototype.reduceTrees=function(){for(var s,c=[],d=!0;d;){var y=this.graphManager.getAllNodes(),O=[];d=!1;for(var D=0;D<y.length;D++)(s=y[D]).getEdges().length!=1||s.getEdges()[0].isInterGraph||s.getChild()!=null||(O.push([s,s.getEdges()[0],s.getOwner()]),d=!0);if(d==1){for(var w=[],R=0;R<O.length;R++)O[R][0].getEdges().length==1&&(w.push(O[R]),O[R][0].getOwner().remove(O[R][0]));c.push(w),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=c},u.prototype.growTree=function(s){for(var c,d=s[s.length-1],y=0;y<d.length;y++)c=d[y],this.findPlaceforPrunedNode(c),c[2].add(c[0]),c[2].add(c[1],c[1].source,c[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},u.prototype.findPlaceforPrunedNode=function(s){var c,d,y=s[0],O=(d=y==s[1].source?s[1].target:s[1].source).startX,D=d.finishX,w=d.startY,R=d.finishY,C=[0,0,0,0];if(w>0)for(var M=O;M<=D;M++)C[0]+=this.grid[M][w-1].length+this.grid[M][w].length-1;if(D<this.grid.length-1)for(M=w;M<=R;M++)C[1]+=this.grid[D+1][M].length+this.grid[D][M].length-1;if(R<this.grid[0].length-1)for(M=O;M<=D;M++)C[2]+=this.grid[M][R+1].length+this.grid[M][R].length-1;if(O>0)for(M=w;M<=R;M++)C[3]+=this.grid[O-1][M].length+this.grid[O][M].length-1;for(var G,S,Y=_.MAX_VALUE,F=0;F<C.length;F++)C[F]<Y?(Y=C[F],G=1,S=F):C[F]==Y&&G++;if(G==3&&Y==0)C[0]==0&&C[1]==0&&C[2]==0?c=1:C[0]==0&&C[1]==0&&C[3]==0?c=0:C[0]==0&&C[2]==0&&C[3]==0?c=3:C[1]==0&&C[2]==0&&C[3]==0&&(c=2);else if(G==2&&Y==0){var P=Math.floor(2*Math.random());c=C[0]==0&&C[1]==0?P==0?0:1:C[0]==0&&C[2]==0?P==0?0:2:C[0]==0&&C[3]==0?P==0?0:3:C[1]==0&&C[2]==0?P==0?1:2:C[1]==0&&C[3]==0?P==0?1:3:P==0?2:3}else c=G==4&&Y==0?P=Math.floor(4*Math.random()):S;c==0?y.setCenter(d.getCenterX(),d.getCenterY()-d.getHeight()/2-a.DEFAULT_EDGE_LENGTH-y.getHeight()/2):c==1?y.setCenter(d.getCenterX()+d.getWidth()/2+a.DEFAULT_EDGE_LENGTH+y.getWidth()/2,d.getCenterY()):c==2?y.setCenter(d.getCenterX(),d.getCenterY()+d.getHeight()/2+a.DEFAULT_EDGE_LENGTH+y.getHeight()/2):y.setCenter(d.getCenterX()-d.getWidth()/2-a.DEFAULT_EDGE_LENGTH-y.getWidth()/2,d.getCenterY())},f.exports=u},function(f,p,e){var t={};t.layoutBase=e(0),t.CoSEConstants=e(1),t.CoSEEdge=e(2),t.CoSEGraph=e(3),t.CoSEGraphManager=e(4),t.CoSELayout=e(6),t.CoSENode=e(5),f.exports=t}])},ht.exports=N(It()));var N}())),at.exports);const Rt=Ot(wt);var tt=function(){var N=x(function(u,I,s,c){for(s=s||{},c=u.length;c--;s[u[c]]=I);return s},"o"),A=[1,4],f=[1,13],p=[1,12],e=[1,15],t=[1,16],i=[1,20],r=[1,19],n=[6,7,8],o=[1,26],h=[1,24],a=[1,25],l=[6,7,11],E=[1,6,13,15,16,19,22],m=[1,33],g=[1,34],_=[1,6,7,11,13,15,16,19,22],L={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:x(function(u,I,s,c,d,y,O){var D=y.length-1;switch(d){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",y[D].id),c.addNode(y[D-1].length,y[D].id,y[D].descr,y[D].type);break;case 16:c.getLogger().trace("Icon: ",y[D]),c.decorateNode({icon:y[D]});break;case 17:case 21:c.decorateNode({class:y[D]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",y[D].id),c.addNode(0,y[D].id,y[D].descr,y[D].type);break;case 20:c.decorateNode({icon:y[D]});break;case 25:c.getLogger().trace("node found ..",y[D-2]),this.$={id:y[D-1],descr:y[D-1],type:c.getType(y[D-2],y[D])};break;case 26:this.$={id:y[D],descr:y[D],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",y[D-3]),this.$={id:y[D-3],descr:y[D-1],type:c.getType(y[D-2],y[D])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:A},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:A},{6:f,7:[1,10],9:9,12:11,13:p,14:14,15:e,16:t,17:17,18:18,19:i,22:r},N(n,[2,3]),{1:[2,2]},N(n,[2,4]),N(n,[2,5]),{1:[2,6],6:f,12:21,13:p,14:14,15:e,16:t,17:17,18:18,19:i,22:r},{6:f,9:22,12:11,13:p,14:14,15:e,16:t,17:17,18:18,19:i,22:r},{6:o,7:h,10:23,11:a},N(l,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:i,22:r}),N(l,[2,18]),N(l,[2,19]),N(l,[2,20]),N(l,[2,21]),N(l,[2,23]),N(l,[2,24]),N(l,[2,26],{19:[1,30]}),{20:[1,31]},{6:o,7:h,10:32,11:a},{1:[2,7],6:f,12:21,13:p,14:14,15:e,16:t,17:17,18:18,19:i,22:r},N(E,[2,14],{7:m,11:g}),N(_,[2,8]),N(_,[2,9]),N(_,[2,10]),N(l,[2,15]),N(l,[2,16]),N(l,[2,17]),{20:[1,35]},{21:[1,36]},N(E,[2,13],{7:m,11:g}),N(_,[2,11]),N(_,[2,12]),{21:[1,37]},N(l,[2,25]),N(l,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:x(function(u,I){if(!I.recoverable){var s=new Error(u);throw s.hash=I,s}this.trace(u)},"parseError"),parse:x(function(u){var I=this,s=[0],c=[],d=[null],y=[],O=this.table,D="",w=0,R=0,C=y.slice.call(arguments,1),M=Object.create(this.lexer),G={yy:{}};for(var S in this.yy)Object.prototype.hasOwnProperty.call(this.yy,S)&&(G.yy[S]=this.yy[S]);M.setInput(u,G.yy),G.yy.lexer=M,G.yy.parser=this,M.yylloc===void 0&&(M.yylloc={});var Y=M.yylloc;y.push(Y);var F=M.options&&M.options.ranges;function P(){var $;return typeof($=c.pop()||M.lex()||1)!="number"&&($ instanceof Array&&($=(c=$).pop()),$=I.symbols_[$]||$),$}typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,x(function($){s.length=s.length-2*$,d.length=d.length-$,y.length=y.length-$},"popStack"),x(P,"lex");for(var b,k,U,q,W,B,Z,V,z={};;){if(k=s[s.length-1],this.defaultActions[k]?U=this.defaultActions[k]:(b==null&&(b=P()),U=O[k]&&O[k][b]),U===void 0||!U.length||!U[0]){var nt="";for(W in V=[],O[k])this.terminals_[W]&&W>2&&V.push("'"+this.terminals_[W]+"'");nt=M.showPosition?"Parse error on line "+(w+1)+`:
|
2
2
|
`+M.showPosition()+`
|
3
|
-
Expecting `+V.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(w+1)+": Unexpected "+(b==1?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(nt,{text:M.match,token:this.terminals_[b]||b,line:M.yylineno,loc:Y,expected:V})}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+b);switch(U[0]){case 1:s.push(b),d.push(M.yytext),y.push(M.yylloc),s.push(U[1]),b=null,R=M.yyleng,D=M.yytext,w=M.yylineno,Y=M.yylloc;break;case 2:if(B=this.productions_[U[1]][1],z.$=d[d.length-B],z._$={first_line:y[y.length-(B||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(B||1)].first_column,last_column:y[y.length-1].last_column},F&&(z._$.range=[y[y.length-(B||1)].range[0],y[y.length-1].range[1]]),(q=this.performAction.apply(z,[D,R,w,
|
3
|
+
Expecting `+V.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(w+1)+": Unexpected "+(b==1?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(nt,{text:M.match,token:this.terminals_[b]||b,line:M.yylineno,loc:Y,expected:V})}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+b);switch(U[0]){case 1:s.push(b),d.push(M.yytext),y.push(M.yylloc),s.push(U[1]),b=null,R=M.yyleng,D=M.yytext,w=M.yylineno,Y=M.yylloc;break;case 2:if(B=this.productions_[U[1]][1],z.$=d[d.length-B],z._$={first_line:y[y.length-(B||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(B||1)].first_column,last_column:y[y.length-1].last_column},F&&(z._$.range=[y[y.length-(B||1)].range[0],y[y.length-1].range[1]]),(q=this.performAction.apply(z,[D,R,w,G.yy,U[1],d,y].concat(C)))!==void 0)return q;B&&(s=s.slice(0,-1*B*2),d=d.slice(0,-1*B),y=y.slice(0,-1*B)),s.push(this.productions_[U[1]][0]),d.push(z.$),y.push(z._$),Z=O[s[s.length-2]][s[s.length-1]],s.push(Z);break;case 3:return!0}}return!0},"parse")},v=function(){return{EOF:1,parseError:x(function(u,I){if(!this.yy.parser)throw new Error(u);this.yy.parser.parseError(u,I)},"parseError"),setInput:x(function(u,I){return this.yy=I||this.yy||{},this._input=u,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var u=this._input[0];return this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u,u.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},"input"),unput:x(function(u){var I=u.length,s=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-I),this.offset-=I;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===c.length?this.yylloc.first_column:0)+c[c.length-s.length].length-s[0].length:this.yylloc.first_column-I},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-I]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:x(function(u){this.unput(this.match.slice(u))},"less"),pastInput:x(function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var u=this.pastInput(),I=new Array(u.length+1).join("-");return u+this.upcomingInput()+`
|
5
5
|
`+I+"^"},"showPosition"),test_match:x(function(u,I){var s,c,d;if(this.options.backtrack_lexer&&(d={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(d.yylloc.range=this.yylloc.range.slice(0))),(c=u[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=c.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(u[0].length),this.matched+=u[0],s=this.performAction.call(this,this.yy,this,I,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var y in d)this[y]=d[y];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;var u,I,s,c;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),y=0;y<d.length;y++)if((s=this._input.match(this.rules[d[y]]))&&(!I||s[0].length>I[0].length)){if(I=s,c=y,this.options.backtrack_lexer){if((u=this.test_match(s,d[y]))!==!1)return u;if(this._backtrack){I=!1;continue}return!1}if(!this.options.flex)break}return I?(u=this.test_match(I,d[c]))!==!1&&u:this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var u=this.next();return u||this.lex()},"lex"),begin:x(function(u){this.conditionStack.push(u)},"begin"),popState:x(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(u){return(u=this.conditionStack.length-1-Math.abs(u||0))>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:x(function(u){this.begin(u)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(u,I,s,c){switch(s){case 0:return u.getLogger().trace("Found comment",I.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:u.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return u.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:u.getLogger().trace("end icon"),this.popState();break;case 10:return u.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return u.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return u.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return u.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:u.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return u.getLogger().trace("description:",I.yytext),"NODE_DESCR";case 27:return this.popState(),u.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),u.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),u.getLogger().trace("node end ...",I.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),u.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),u.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return u.getLogger().trace("Long description:",I.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}}}();function T(){this.yy={}}return L.lexer=v,x(T,"Parser"),T.prototype=L,L.Parser=T,new T}();tt.parser=tt;var Ct=tt,H=[],dt=0,et={},Mt=x(()=>{H=[],dt=0,et={}},"clear"),xt=x(function(N){for(let A=H.length-1;A>=0;A--)if(H[A].level<N)return H[A];return null},"getParent"),
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var u=this.next();return u||this.lex()},"lex"),begin:x(function(u){this.conditionStack.push(u)},"begin"),popState:x(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(u){return(u=this.conditionStack.length-1-Math.abs(u||0))>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:x(function(u){this.begin(u)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(u,I,s,c){switch(s){case 0:return u.getLogger().trace("Found comment",I.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:u.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return u.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:u.getLogger().trace("end icon"),this.popState();break;case 10:return u.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return u.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return u.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return u.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:u.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return u.getLogger().trace("description:",I.yytext),"NODE_DESCR";case 27:return this.popState(),u.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),u.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),u.getLogger().trace("node end ...",I.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),u.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),u.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return u.getLogger().trace("Long description:",I.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}}}();function T(){this.yy={}}return L.lexer=v,x(T,"Parser"),T.prototype=L,L.Parser=T,new T}();tt.parser=tt;var Ct=tt,H=[],dt=0,et={},Mt=x(()=>{H=[],dt=0,et={}},"clear"),xt=x(function(N){for(let A=H.length-1;A>=0;A--)if(H[A].level<N)return H[A];return null},"getParent"),Gt=x(()=>H.length>0?H[0]:null,"getMindmap"),St=x((N,A,f,p)=>{var n,o;j.info("addNode",N,A,f,p);const e=J();let t=((n=e.mindmap)==null?void 0:n.padding)??Q.mindmap.padding;switch(p){case X.ROUNDED_RECT:case X.RECT:case X.HEXAGON:t*=2}const i={id:dt++,nodeId:K(A,e),level:N,descr:K(f,e),type:p,children:[],width:((o=e.mindmap)==null?void 0:o.maxNodeWidth)??Q.mindmap.maxNodeWidth,padding:t},r=xt(N);if(r)r.children.push(i),H.push(i);else{if(H.length!==0)throw new Error('There can be only one root. No parent could be found for ("'+i.descr+'")');H.push(i)}},"addNode"),X={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},bt={clear:Mt,addNode:St,getMindmap:Gt,nodeType:X,getType:x((N,A)=>{switch(j.debug("In get type",N,A),N){case"[":return X.RECT;case"(":return A===")"?X.ROUNDED_RECT:X.CLOUD;case"((":return X.CIRCLE;case")":return X.CLOUD;case"))":return X.BANG;case"{{":return X.HEXAGON;default:return X.DEFAULT}},"getType"),setElementForId:x((N,A)=>{et[N]=A},"setElementForId"),decorateNode:x(N=>{if(!N)return;const A=J(),f=H[H.length-1];N.icon&&(f.icon=K(N.icon,A)),N.class&&(f.class=K(N.class,A))},"decorateNode"),type2Str:x(N=>{switch(N){case X.DEFAULT:return"no-border";case X.RECT:return"rect";case X.ROUNDED_RECT:return"rounded-rect";case X.CIRCLE:return"circle";case X.CLOUD:return"cloud";case X.BANG:return"bang";case X.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:x(()=>j,"getLogger"),getElementById:x(N=>et[N],"getElementById")},Ft=x(function(N,A,f,p){A.append("path").attr("id","node-"+f.id).attr("class","node-bkg node-"+N.type2Str(f.type)).attr("d",`M0 ${f.height-5} v${10-f.height} q0,-5 5,-5 h${f.width-10} q5,0 5,5 v${f.height-5} H0 Z`),A.append("line").attr("class","node-line-"+p).attr("x1",0).attr("y1",f.height).attr("x2",f.width).attr("y2",f.height)},"defaultBkg"),Pt=x(function(N,A,f){A.append("rect").attr("id","node-"+f.id).attr("class","node-bkg node-"+N.type2Str(f.type)).attr("height",f.height).attr("width",f.width)},"rectBkg"),Ut=x(function(N,A,f){const p=f.width,e=f.height,t=.15*p,i=.25*p,r=.35*p,n=.2*p;A.append("path").attr("id","node-"+f.id).attr("class","node-bkg node-"+N.type2Str(f.type)).attr("d",`M0 0 a${t},${t} 0 0,1 ${.25*p},${-1*p*.1}
|
7
7
|
a${r},${r} 1 0,1 ${.4*p},${-1*p*.1}
|
8
8
|
a${i},${i} 1 0,1 ${.35*p},${1*p*.2}
|
9
9
|
|
@@ -36,7 +36,7 @@ Expecting `+V.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on l
|
|
36
36
|
a${t},${t} 1 0,0 ${.1*p},${-1*e*.33}
|
37
37
|
|
38
38
|
H0 V0 Z`)},"bangBkg"),kt=x(function(N,A,f){A.append("circle").attr("id","node-"+f.id).attr("class","node-bkg node-"+N.type2Str(f.type)).attr("r",f.width/2)},"circleBkg");function pt(N,A,f,p,e){return N.insert("polygon",":first-child").attr("points",p.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+(e.width-A)/2+", "+f+")")}x(pt,"insertPolygonShape");var Xt=x(function(N,A,f){const p=f.height,e=p/4,t=f.width-f.padding+2*e;pt(A,t,p,[{x:e,y:0},{x:t-e,y:0},{x:t,y:-p/2},{x:t-e,y:-p},{x:e,y:-p},{x:0,y:-p/2}],f)},"hexagonBkg"),Bt=x(function(N,A,f){A.append("rect").attr("id","node-"+f.id).attr("class","node-bkg node-"+N.type2Str(f.type)).attr("height",f.height).attr("rx",f.padding).attr("ry",f.padding).attr("width",f.width)},"roundedRectBkg"),$t=x(async function(N,A,f,p,e){const t=e.htmlLabels,i=p%11,r=A.append("g");f.section=i;let n="section-"+i;i<0&&(n+=" section-root"),r.attr("class",(f.class?f.class+" ":"")+"mindmap-node "+n);const o=r.append("g"),h=r.append("g"),a=f.descr.replace(/(<br\/*>)/g,`
|
39
|
-
`);await Tt(h,a,{useHtmlLabels:t,width:f.width,classes:"mindmap-node-label"},e),t||h.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");const l=h.node().getBBox(),[E]=Lt(e.fontSize);if(f.height=l.height+1.1*E*.5+f.padding,f.width=l.width+2*f.padding,f.icon)if(f.type===N.nodeType.CIRCLE)f.height+=50,f.width+=50,r.append("foreignObject").attr("height","50px").attr("width",f.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+i+" "+f.icon),h.attr("transform","translate("+f.width/2+", "+(f.height/2-1.5*f.padding)+")");else{f.width+=50;const m=f.height;f.height=Math.max(m,60);const g=Math.abs(f.height-m);r.append("foreignObject").attr("width","60px").attr("height",f.height).attr("style","text-align: center;margin-top:"+g/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+i+" "+f.icon),h.attr("transform","translate("+(25+f.width/2)+", "+(g/2+f.padding/2)+")")}else if(t){const m=(f.width-l.width)/2,g=(f.height-l.height)/2;h.attr("transform","translate("+m+", "+g+")")}else{const m=f.width/2,g=f.padding/2;h.attr("transform","translate("+m+", "+g+")")}switch(f.type){case N.nodeType.DEFAULT:Ft(N,o,f,i);break;case N.nodeType.ROUNDED_RECT:Bt(N,o,f,i);break;case N.nodeType.RECT:Pt(N,o,f,i);break;case N.nodeType.CIRCLE:o.attr("transform","translate("+f.width/2+", "+ +f.height/2+")"),kt(N,o,f,i);break;case N.nodeType.CLOUD:Ut(N,o,f,i);break;case N.nodeType.BANG:Yt(N,o,f,i);break;case N.nodeType.HEXAGON:Xt(N,o,f,i)}return N.setElementForId(f.id,r),f.height},"drawNode"),Ht=x(function(N,A){const f=N.getElementById(A.id),p=A.x||0,e=A.y||0;f.attr("transform","translate("+p+","+e+")")},"positionNode");async function it(N,A,f,p,e){await $t(N,A,f,p,e),f.children&&await Promise.all(f.children.map((t,i)=>it(N,A,t,p<0?i:p,e)))}function ft(N,A){A.edges().map((f,p)=>{const e=f.data();if(f[0]._private.bodyBounds){const t=f[0]._private.rscratch;j.trace("Edge: ",p,e),N.insert("path").attr("d",`M ${t.startX},${t.startY} L ${t.midX},${t.midY} L${t.endX},${t.endY} `).attr("class","edge section-edge-"+e.section+" edge-depth-"+e.depth)}})}function rt(N,A,f,p){A.add({group:"nodes",data:{id:N.id.toString(),labelText:N.descr,height:N.height,width:N.width,level:p,nodeId:N.id,padding:N.padding,type:N.type},position:{x:N.x,y:N.y}}),N.children&&N.children.forEach(e=>{rt(e,A,f,p+1),A.add({group:"edges",data:{id:`${N.id}_${e.id}`,source:N.id,target:e.id,depth:p,section:e.section}})})}function yt(N,A){return new Promise(f=>{const p=Dt("body").append("div").attr("id","cy").attr("style","display:none"),e=ot({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});p.remove(),rt(N,e,A,0),e.nodes().forEach(function(t){t.layoutDimensions=()=>{const i=t.data();return{w:i.width,h:i.height}}}),e.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),e.ready(t=>{j.info("Ready",t),f(e)})})}function Et(N,A){A.nodes().map((f,p)=>{const e=f.data();e.x=f.position().x,e.y=f.position().y,Ht(N,e);const t=N.getElementById(e.nodeId);j.info("
|
39
|
+
`);await Tt(h,a,{useHtmlLabels:t,width:f.width,classes:"mindmap-node-label"},e),t||h.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");const l=h.node().getBBox(),[E]=Lt(e.fontSize);if(f.height=l.height+1.1*E*.5+f.padding,f.width=l.width+2*f.padding,f.icon)if(f.type===N.nodeType.CIRCLE)f.height+=50,f.width+=50,r.append("foreignObject").attr("height","50px").attr("width",f.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+i+" "+f.icon),h.attr("transform","translate("+f.width/2+", "+(f.height/2-1.5*f.padding)+")");else{f.width+=50;const m=f.height;f.height=Math.max(m,60);const g=Math.abs(f.height-m);r.append("foreignObject").attr("width","60px").attr("height",f.height).attr("style","text-align: center;margin-top:"+g/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+i+" "+f.icon),h.attr("transform","translate("+(25+f.width/2)+", "+(g/2+f.padding/2)+")")}else if(t){const m=(f.width-l.width)/2,g=(f.height-l.height)/2;h.attr("transform","translate("+m+", "+g+")")}else{const m=f.width/2,g=f.padding/2;h.attr("transform","translate("+m+", "+g+")")}switch(f.type){case N.nodeType.DEFAULT:Ft(N,o,f,i);break;case N.nodeType.ROUNDED_RECT:Bt(N,o,f,i);break;case N.nodeType.RECT:Pt(N,o,f,i);break;case N.nodeType.CIRCLE:o.attr("transform","translate("+f.width/2+", "+ +f.height/2+")"),kt(N,o,f,i);break;case N.nodeType.CLOUD:Ut(N,o,f,i);break;case N.nodeType.BANG:Yt(N,o,f,i);break;case N.nodeType.HEXAGON:Xt(N,o,f,i)}return N.setElementForId(f.id,r),f.height},"drawNode"),Ht=x(function(N,A){const f=N.getElementById(A.id),p=A.x||0,e=A.y||0;f.attr("transform","translate("+p+","+e+")")},"positionNode");async function it(N,A,f,p,e){await $t(N,A,f,p,e),f.children&&await Promise.all(f.children.map((t,i)=>it(N,A,t,p<0?i:p,e)))}function ft(N,A){A.edges().map((f,p)=>{const e=f.data();if(f[0]._private.bodyBounds){const t=f[0]._private.rscratch;j.trace("Edge: ",p,e),N.insert("path").attr("d",`M ${t.startX},${t.startY} L ${t.midX},${t.midY} L${t.endX},${t.endY} `).attr("class","edge section-edge-"+e.section+" edge-depth-"+e.depth)}})}function rt(N,A,f,p){A.add({group:"nodes",data:{id:N.id.toString(),labelText:N.descr,height:N.height,width:N.width,level:p,nodeId:N.id,padding:N.padding,type:N.type},position:{x:N.x,y:N.y}}),N.children&&N.children.forEach(e=>{rt(e,A,f,p+1),A.add({group:"edges",data:{id:`${N.id}_${e.id}`,source:N.id,target:e.id,depth:p,section:e.section}})})}function yt(N,A){return new Promise(f=>{const p=Dt("body").append("div").attr("id","cy").attr("style","display:none"),e=ot({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});p.remove(),rt(N,e,A,0),e.nodes().forEach(function(t){t.layoutDimensions=()=>{const i=t.data();return{w:i.width,h:i.height}}}),e.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),e.ready(t=>{j.info("Ready",t),f(e)})})}function Et(N,A){A.nodes().map((f,p)=>{const e=f.data();e.x=f.position().x,e.y=f.position().y,Ht(N,e);const t=N.getElementById(e.nodeId);j.info("id:",p,"Position: (",f.position().x,", ",f.position().y,")",e),t.attr("transform",`translate(${f.position().x-e.width/2}, ${f.position().y-e.height/2})`),t.attr("attr",`apa-${p})`)})}ot.use(Rt),x(it,"drawNodes"),x(ft,"drawEdges"),x(rt,"addNodes"),x(yt,"layoutMindmap"),x(Et,"positionNodes");var Wt={draw:x(async(N,A,f,p)=>{var a,l;j.debug(`Rendering mindmap diagram
|
40
40
|
`+N);const e=p.db,t=e.getMindmap();if(!t)return;const i=J();i.htmlLabels=!1;const r=mt(A),n=r.append("g");n.attr("class","mindmap-edges");const o=r.append("g");o.attr("class","mindmap-nodes"),await it(e,o,t,-1,i);const h=await yt(t,i);ft(n,h),Et(e,h),_t(void 0,r,((a=i.mindmap)==null?void 0:a.padding)??Q.mindmap.padding,((l=i.mindmap)==null?void 0:l.useMaxWidth)??Q.mindmap.useMaxWidth)},"draw")},jt=x(N=>{let A="";for(let f=0;f<N.THEME_COLOR_LIMIT;f++)N["lineColor"+f]=N["lineColor"+f]||N["cScaleInv"+f],vt(N["lineColor"+f])?N["lineColor"+f]=Nt(N["lineColor"+f],20):N["lineColor"+f]=At(N["lineColor"+f],20);for(let f=0;f<N.THEME_COLOR_LIMIT;f++){const p=""+(17-3*f);A+=`
|
41
41
|
.section-${f-1} rect, .section-${f-1} path, .section-${f-1} circle, .section-${f-1} polygon, .section-${f-1} path {
|
42
42
|
fill: ${N["cScale"+f]};
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import{b as ut,W as j}from"./index-DUfE3Ygv.js";import{s as Gt}from"./glide-data-editor-dRdzyJuS.js";import"./trash-CtRVuIVX.js";const Ut=Gt("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function wt(t,e){var r={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&e.indexOf(a)<0&&(r[a]=t[a]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function"){var n=0;for(a=Object.getOwnPropertySymbols(t);n<a.length;n++)e.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(t,a[n])&&(r[a[n]]=t[a[n]])}return r}var lt;function et(){}function ct(t){return!!(t||"").match(/\d/)}function it(t){return t==null}function Nt(t){return it(t)||function(e){return typeof e=="number"&&isNaN(e)}(t)||typeof t=="number"&&!isFinite(t)}function Dt(t){return t.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function bt(t,e){e===void 0&&(e=!0);var r=t[0]==="-",a=r&&e,n=(t=t.replace("-","")).split(".");return{beforeDecimal:n[0],afterDecimal:n[1]||"",hasNegation:r,addNegation:a}}function Ot(t,e,r){for(var a="",n=r?"0":"",l=0;l<=e-1;l++)a+=t[l]||n;return a}function Et(t,e){return Array(e+1).join(t)}function It(t){var e=t+"",r=e[0]==="-"?"-":"";r&&(e=e.substring(1));var a=e.split(/[eE]/g),n=a[0],l=a[1];if(!(l=Number(l)))return r+n;var f=1+l,d=(n=n.replace(".","")).length;return f<0?n="0."+Et("0",Math.abs(f))+n:f>=d?n+=Et("0",f-d):n=(n.substring(0,f)||"0")+"."+n.substring(f),r+n}function Tt(t,e,r){if(["","-"].indexOf(t)!==-1)return t;var a=(t.indexOf(".")!==-1||r)&&e,n=bt(t),l=n.beforeDecimal,f=n.afterDecimal,d=n.hasNegation,D=parseFloat("0."+(f||"0")),y=(f.length<=e?"0."+f:D.toFixed(e)).split("."),h=l;return l&&Number(y[0])&&(h=l.split("").reverse().reduce(function(v,I,g){return v.length>g?(Number(v[0])+Number(I)).toString()+v.substring(1,v.length):I+v},y[0])),(d?"-":"")+h+(a?".":"")+Ot(y[1]||"",e,r)}function ot(t,e){if(t.value=t.value,t!==null){if(t.createTextRange){var r=t.createTextRange();return r.move("character",e),r.select(),!0}return t.selectionStart||t.selectionStart===0?(t.focus(),t.setSelectionRange(e,e),!0):(t.focus(),!1)}}(function(t){t.event="event",t.props="prop"})(lt||(lt={}));var Ct,dt,yt,jt=(Ct=function(t,e){for(var r=0,a=0,n=t.length,l=e.length;t[r]===e[r]&&r<n;)r++;for(;t[n-1-a]===e[l-1-a]&&l-a>r&&n-a>r;)a++;return{from:{start:r,end:n-a},to:{start:r,end:l-a}}},yt=void 0,function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return dt&&t.length===dt.length&&t.every(function(r,a){return r===dt[a]})?yt:(dt=t,yt=Ct.apply(void 0,t))});function Vt(t){return Math.max(t.selectionStart,t.selectionEnd)}function $t(t){var e=t.currentValue,r=t.formattedValue,a=t.currentValueIndex,n=t.formattedValueIndex;return e[a]===r[n]}function At(t,e,r,a){var n,l,f,d=t.length;if(n=e,l=0,f=d,e=Math.min(Math.max(n,l),f),a==="left"){for(;e>=0&&!r[e];)e--;e===-1&&(e=r.indexOf(!0))}else{for(;e<=d&&!r[e];)e++;e>d&&(e=r.lastIndexOf(!0))}return e===-1&&(e=d),e}function Zt(t){for(var e=Array.from({length:t.length+1}).map(function(){return!0}),r=0,a=e.length;r<a;r++)e[r]=!!(ct(t[r])||ct(t[r-1]));return e}function Rt(t,e,r,a,n,l){l===void 0&&(l=et);var f=function(g){var w=j.useRef(g);w.current=g;var C=j.useRef(function(){for(var p=[],R=arguments.length;R--;)p[R]=arguments[R];return w.current.apply(w,p)});return C.current}(function(g,w){var C,p;return Nt(g)?(p="",C=""):typeof g=="number"||w?(p=typeof g=="number"?It(g):g,C=a(p)):(p=n(g,void 0),C=a(p)),{formattedValue:C,numAsString:p}}),d=j.useState(function(){return f(it(t)?e:t,r)}),D=d[0],y=d[1],h=t,v=r;it(t)&&(h=D.numAsString,v=!0);var I=f(h,v);return j.useMemo(function(){y(I)},[I.formattedValue]),[D,function(g,w){g.formattedValue!==D.formattedValue&&y({formattedValue:g.formattedValue,numAsString:g.value}),l(g,w)}]}function qt(t){return t.replace(/[^0-9]/g,"")}function zt(t){return t}function Ht(t){var e=t.type;e===void 0&&(e="text");var r=t.displayType;r===void 0&&(r="input");var a=t.customInput,n=t.renderText,l=t.getInputRef,f=t.format;f===void 0&&(f=zt);var d=t.removeFormatting;d===void 0&&(d=qt);var D=t.defaultValue,y=t.valueIsNumericString,h=t.onValueChange,v=t.isAllowed,I=t.onChange;I===void 0&&(I=et);var g=t.onKeyDown;g===void 0&&(g=et);var w=t.onMouseUp;w===void 0&&(w=et);var C=t.onFocus;C===void 0&&(C=et);var p=t.onBlur;p===void 0&&(p=et);var R=t.value,$=t.getCaretBoundary;$===void 0&&($=Zt);var K=t.isValidInputCharacter;K===void 0&&(K=ct);var G=t.isCharacterSame,M=wt(t,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),rt=Rt(R,D,!!y,f,d,h),Y=rt[0],V=Y.formattedValue,Z=Y.numAsString,at=rt[1],H=j.useRef(),c=j.useRef({formattedValue:V,numAsString:Z}),s=function(o,u){c.current={formattedValue:o.formattedValue,numAsString:o.value},at(o,u)},S=j.useState(!1),m=S[0],O=S[1],i=j.useRef(null),E=j.useRef({setCaretTimeout:null,focusTimeout:null});j.useEffect(function(){return O(!0),function(){clearTimeout(E.current.setCaretTimeout),clearTimeout(E.current.focusTimeout)}},[]);var B=f,A=function(o,u){var b=parseFloat(u);return{formattedValue:o,value:u,floatValue:isNaN(b)?void 0:b}},k=function(o,u,b){o.selectionStart===0&&o.selectionEnd===o.value.length||(ot(o,u),E.current.setCaretTimeout=setTimeout(function(){o.value===b&&o.selectionStart!==u&&ot(o,u)},0))},F=function(o,u,b){return At(o,u,$(o),b)},mt=function(o,u,b){var x=$(u),W=function(T,N,L,q,_,ht,U){U===void 0&&(U=$t);var z=_.findIndex(function(Kt){return Kt}),J=T.slice(0,z);N||L.startsWith(J)||(N=J,L=J+L,q+=J.length);for(var Q=L.length,st=T.length,ft={},X=new Array(Q),nt=0;nt<Q;nt++){X[nt]=-1;for(var tt=0,Pt=st;tt<Pt;tt++)if(U({currentValue:L,lastValue:N,formattedValue:T,currentValueIndex:nt,formattedValueIndex:tt})&&ft[tt]!==!0){X[nt]=tt,ft[tt]=!0;break}}for(var P=q;P<Q&&(X[P]===-1||!ht(L[P]));)P++;var vt=P===Q||X[P]===-1?st:X[P];for(P=q-1;P>0&&X[P]===-1;)P--;var St=P===-1||X[P]===-1?0:X[P]+1;return St>vt?vt:q-St<vt-q?St:vt}(u,V,o,b,x,K,G);return W=At(u,W,x)};j.useEffect(function(){var o=c.current,u=o.formattedValue,b=o.numAsString;V===u&&Z===b||s(A(V,Z),{event:void 0,source:lt.props})},[V,Z]);var Mt=i.current?Vt(i.current):void 0;(typeof window<"u"?j.useLayoutEffect:j.useEffect)(function(){var o=i.current;if(V!==c.current.formattedValue&&o){var u=mt(c.current.formattedValue,V,Mt);o.value=V,k(o,u,V)}},[V]);var kt=function(o,u,b){var x=u.target,W=H.current?function(U,z){var J=Math.min(U.selectionStart,z);return{from:{start:J,end:U.selectionEnd},to:{start:J,end:z}}}(H.current,x.selectionEnd):jt(V,o),T=Object.assign(Object.assign({},W),{lastValue:V}),N=d(o,T),L=B(N);if(N=d(L,void 0),v&&!v(A(L,N))){var q=u.target,_=Vt(q),ht=mt(o,V,_);return q.value=V,k(q,ht,V),!1}return function(U){var z=U.formattedValue;z===void 0&&(z="");var J,Q=U.input,st=U.source,ft=U.event,X=U.numAsString;if(Q){var nt=U.inputValue||Q.value,tt=Vt(Q);Q.value=z,(J=mt(nt,z,tt))!==void 0&&k(Q,J,z)}z!==V&&s(A(z,X),{event:ft,source:st})}({formattedValue:L,numAsString:N,inputValue:o,event:u,source:b,input:u.target}),!0},pt=function(o,u){u===void 0&&(u=0);var b=o.selectionStart,x=o.selectionEnd;H.current={selectionStart:b,selectionEnd:x+u}},Wt=!m||typeof navigator>"u"||navigator.platform&&/iPhone|iPod/.test(navigator.platform)?void 0:"numeric",xt=Object.assign({inputMode:Wt},M,{type:e,value:V,onChange:function(o){var u=o.target.value;kt(u,o,lt.event)&&I(o),H.current=void 0},onKeyDown:function(o){var u,b=o.target,x=o.key,W=b.selectionStart,T=b.selectionEnd,N=b.value;N===void 0&&(N=""),x==="ArrowLeft"||x==="Backspace"?u=Math.max(W-1,0):x==="ArrowRight"?u=Math.min(W+1,N.length):x==="Delete"&&(u=W);var L=0;x==="Delete"&&W===T&&(L=1);var q=x==="ArrowLeft"||x==="ArrowRight";if(u===void 0||W!==T&&!q)return g(o),void pt(b,L);var _=u;q?(_=F(N,u,x==="ArrowLeft"?"left":"right"))!==u&&o.preventDefault():x!=="Delete"||K(N[u])?x!=="Backspace"||K(N[u])||(_=F(N,u,"left")):_=F(N,u,"right"),_!==u&&k(b,_,N),g(o),pt(b,L)},onMouseUp:function(o){var u=o.target,b=function(){var x=u.selectionStart,W=u.selectionEnd,T=u.value;if(T===void 0&&(T=""),x===W){var N=F(T,x);N!==x&&k(u,N,T)}};b(),requestAnimationFrame(function(){b()}),w(o),pt(u)},onFocus:function(o){o.persist&&o.persist();var u=o.target,b=o.currentTarget;i.current=u,E.current.focusTimeout=setTimeout(function(){var x=u.selectionStart,W=u.selectionEnd,T=u.value;T===void 0&&(T="");var N=F(T,x);N===x||x===0&&W===T.length||k(u,N,T),C(Object.assign(Object.assign({},o),{currentTarget:b}))},0)},onBlur:function(o){i.current=null,clearTimeout(E.current.focusTimeout),clearTimeout(E.current.setCaretTimeout),p(o)}});if(r==="text")return n?ut.createElement(ut.Fragment,null,n(V,M)||null):ut.createElement("span",Object.assign({},M,{ref:l}),V);if(a){var Lt=a;return ut.createElement(Lt,Object.assign({},xt,{ref:l}))}return ut.createElement("input",Object.assign({},xt,{ref:l}))}function Bt(t,e){var r=e.decimalScale,a=e.fixedDecimalScale,n=e.prefix;n===void 0&&(n="");var l=e.suffix;l===void 0&&(l="");var f=e.allowNegative,d=e.thousandsGroupStyle;if(d===void 0&&(d="thousand"),t===""||t==="-")return t;var D=gt(e),y=D.thousandSeparator,h=D.decimalSeparator,v=r!==0&&t.indexOf(".")!==-1||r&&a,I=bt(t,f),g=I.beforeDecimal,w=I.afterDecimal,C=I.addNegation;return r!==void 0&&(w=Ot(w,r,!!a)),y&&(g=function(p,R,$){var K=function(M){switch(M){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}($),G=p.search(/[1-9]/);return G=G===-1?p.length:G,p.substring(0,G)+p.substring(G,p.length).replace(K,"$1"+R)}(g,y,d)),n&&(g=n+g),l&&(w+=l),C&&(g="-"+g),t=g+(v&&h||"")+w}function gt(t){var e=t.decimalSeparator;e===void 0&&(e=".");var r=t.thousandSeparator,a=t.allowedDecimalSeparators;return r===!0&&(r=","),a||(a=[e,"."]),{decimalSeparator:e,thousandSeparator:r,allowedDecimalSeparators:a}}function Jt(t,e,r){var a;e===void 0&&(e=function(i){return{from:{start:0,end:0},to:{start:0,end:i.length},lastValue:""}}(t));var n=r.allowNegative,l=r.prefix;l===void 0&&(l="");var f=r.suffix;f===void 0&&(f="");var d=r.decimalScale,D=e.from,y=e.to,h=y.start,v=y.end,I=gt(r),g=I.allowedDecimalSeparators,w=I.decimalSeparator,C=t[v]===w;if(ct(t)&&(t===l||t===f)&&e.lastValue==="")return t;if(v-h===1&&g.indexOf(t[h])!==-1){var p=d===0?"":w;t=t.substring(0,h)+p+t.substring(h+1,t.length)}var R=function(i,E,B){var A=!1,k=!1;l.startsWith("-")?A=!1:i.startsWith("--")?(A=!1,k=!0):f.startsWith("-")&&i.length===f.length?A=!1:i[0]==="-"&&(A=!0);var F=A?1:0;return k&&(F=2),F&&(i=i.substring(F),E-=F,B-=F),{value:i,start:E,end:B,hasNegation:A}},$=R(t,h,v),K=$.hasNegation;t=(a=$).value,h=a.start,v=a.end;var G=R(e.lastValue,D.start,D.end),M=G.start,rt=G.end,Y=G.value,V=t.substring(h,v);!(t.length&&Y.length&&(M>Y.length-f.length||rt<l.length))||V&&f.startsWith(V)||(t=Y);var Z=0;t.startsWith(l)?Z+=l.length:h<l.length&&(Z=h),v-=Z;var at=(t=t.substring(Z)).length,H=t.length-f.length;t.endsWith(f)?at=H:(v>H||v>t.length-f.length)&&(at=v),t=t.substring(0,at),t=function(i,E){i===void 0&&(i="");var B=new RegExp("(-)"),A=new RegExp("(-)(.)*(-)"),k=B.test(i),F=A.test(i);return i=i.replace(/-/g,""),k&&!F&&E&&(i="-"+i),i}(K?"-"+t:t,n),t=(t.match(function(i){return new RegExp("(^-)|[0-9]|"+Dt(i),"g")}(w))||[]).join("");var c=t.indexOf(w),s=bt(t=t.replace(new RegExp(Dt(w),"g"),function(i,E){return E===c?".":""}),n),S=s.beforeDecimal,m=s.afterDecimal,O=s.addNegation;return y.end-y.start<D.end-D.start&&S===""&&C&&!parseFloat(m)&&(t=O?"-":""),t}function Qt(t){t=function(c){var s=gt(c),S=s.thousandSeparator,m=s.decimalSeparator,O=c.prefix;O===void 0&&(O="");var i=c.allowNegative;if(i===void 0&&(i=!0),S===m)throw new Error(`
|
2
|
+
Decimal separator can't be same as thousand separator.
|
3
|
+
thousandSeparator: `+S+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
4
|
+
decimalSeparator: `+m+` (default value for decimalSeparator is .)
|
5
|
+
`);return O.startsWith("-")&&i&&(console.error(`
|
6
|
+
Prefix can't start with '-' when allowNegative is true.
|
7
|
+
prefix: `+O+`
|
8
|
+
allowNegative: `+i+`
|
9
|
+
`),i=!1),Object.assign(Object.assign({},c),{allowNegative:i})}(t),t.decimalSeparator,t.allowedDecimalSeparators,t.thousandsGroupStyle;var e=t.suffix,r=t.allowNegative,a=t.allowLeadingZeros,n=t.onKeyDown;n===void 0&&(n=et);var l=t.onBlur;l===void 0&&(l=et);var f=t.thousandSeparator,d=t.decimalScale,D=t.fixedDecimalScale,y=t.prefix;y===void 0&&(y="");var h=t.defaultValue,v=t.value,I=t.valueIsNumericString,g=t.onValueChange,w=wt(t,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),C=gt(t),p=C.decimalSeparator,R=C.allowedDecimalSeparators,$=function(c){return Bt(c,t)},K=function(c,s){return Jt(c,s,t)},G=it(v)?h:v,M=I??function(c,s,S){return c===""||!(s!=null&&s.match(/\d/))&&!(S!=null&&S.match(/\d/))&&typeof c=="string"&&!isNaN(Number(c))}(G,y,e);it(v)?it(h)||(M=M||typeof h=="number"):M=M||typeof v=="number";var rt=function(c){return Nt(c)?c:(typeof c=="number"&&(c=It(c)),M&&typeof d=="number"?Tt(c,d,!!D):c)},Y=Rt(rt(v),rt(h),!!M,$,K,g),V=Y[0],Z=V.numAsString,at=V.formattedValue,H=Y[1];return Object.assign(Object.assign({},w),{value:at,valueIsNumericString:!1,isValidInputCharacter:function(c){return c===p||ct(c)},isCharacterSame:function(c){var s=c.currentValue,S=c.lastValue,m=c.formattedValue,O=c.currentValueIndex,i=c.formattedValueIndex,E=s[O],B=m[i],A=jt(S,s).to,k=function(F){return K(F).indexOf(".")+y.length};return!(v===0&&D&&d&&s[A.start]===p&&k(s)<O&&k(m)>i)&&(!!(O>=A.start&&O<A.end&&R&&R.includes(E)&&B===p)||E===B)},onValueChange:H,format:$,removeFormatting:K,getCaretBoundary:function(c){return function(s,S){var m=S.prefix;m===void 0&&(m="");var O=S.suffix;O===void 0&&(O="");var i=Array.from({length:s.length+1}).map(function(){return!0}),E=s[0]==="-";i.fill(!1,0,m.length+(E?1:0));var B=s.length;return i.fill(!1,B-O.length+1,B+1),i}(c,t)},onKeyDown:function(c){var s=c.target,S=c.key,m=s.selectionStart,O=s.selectionEnd,i=s.value;if(i===void 0&&(i=""),(S==="Backspace"||S==="Delete")&&O<y.length)c.preventDefault();else if(m===O){S==="Backspace"&&i[0]==="-"&&m===y.length+1&&r&&ot(s,1),d&&D&&(S==="Backspace"&&i[m-1]===p?(ot(s,m-1),c.preventDefault()):S==="Delete"&&i[m]===p&&c.preventDefault()),R!=null&&R.includes(S)&&i[m]===p&&ot(s,m+1);var E=f===!0?",":f;S==="Backspace"&&i[m-1]===E&&ot(s,m-1),S==="Delete"&&i[m]===E&&ot(s,m+1),n(c)}else n(c)},onBlur:function(c){var s=Z;if(s.match(/\d/g)||(s=""),a||(s=function(m){if(!m)return m;var O=m[0]==="-";O&&(m=m.substring(1,m.length));var i=m.split("."),E=i[0].replace(/^0+/,"")||"0",B=i[1]||"";return(O?"-":"")+E+(B?"."+B:"")}(s)),D&&d&&(s=Tt(s,d,D)),s!==Z){var S=Bt(s,t);H({formattedValue:S,value:s,floatValue:parseFloat(s)},{event:c,source:lt.event})}l(c)}})}function Xt(t){var e=Qt(t);return ut.createElement(Ht,Object.assign({},e))}function Ft(){var e,r,a;return((a=(r=(e=Intl.NumberFormat())==null?void 0:e.formatToParts(1.1))==null?void 0:r.find(n=>n.type==="decimal"))==null?void 0:a.value)??"."}const Yt=t=>{const{value:e,onChange:r,disabled:a,highlight:n,validatedSelection:l,fixedDecimals:f,allowNegative:d,thousandSeparator:D,decimalSeparator:y}=t,h=j.useRef();return j.useLayoutEffect(()=>{var v;if(l!==void 0){const I=typeof l=="number"?[l,null]:l;(v=h.current)==null||v.setSelectionRange(I[0],I[1])}},[l]),j.createElement(Ut,null,j.createElement(Xt,{autoFocus:!0,getInputRef:h,className:"gdg-input",onFocus:v=>v.target.setSelectionRange(n?0:v.target.value.length,v.target.value.length),disabled:a===!0,decimalScale:f,allowNegative:d,thousandSeparator:D??(Ft()==="."?",":"."),decimalSeparator:y??Ft(),value:Object.is(e,-0)?"-":e??"",onValueChange:r}))};export{Yt as default};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{p as E}from"./chunk-
|
1
|
+
import{p as E}from"./chunk-353BL4L5-Z9QK1Sy2.js";import{_ as c,g as L,s as N,a as P,b as V,q,p as G,l as O,c as I,E as _,I as H,O as J,d as K,y as Q,G as U}from"./mermaid-Bhkvxu54.js";import{p as X}from"./treemap-FKARHQ26-BVbfYHyM.js";import"./transform-CDNfLgV5.js";import{d as W}from"./arc-ZB5pDULS.js";import{o as Y}from"./ordinal-DDUp3AbE.js";import{a as y,t as z,n as Z}from"./step-BwsUM5iJ.js";import"./index-DUfE3Ygv.js";import"./_baseEach-Oq1b6Vj7.js";import"./_baseUniq-B_mvr7GI.js";import"./min-BCL-6Bwx.js";import"./_baseMap-NO7KiGEP.js";import"./clone-DmicZLVp.js";import"./_createAggregator-DYHbrJKw.js";import"./timer-Bqd5yn_a.js";import"./init-DLRA0X12.js";function tt(t,a){return a<t?-1:a>t?1:a>=t?0:NaN}function et(t){return t}var at=U.pie,R={sections:new Map,showData:!1},M=R.sections,F=R.showData,nt=structuredClone(at),j={getConfig:c(()=>structuredClone(nt),"getConfig"),clear:c(()=>{M=new Map,F=R.showData,Q()},"clear"),setDiagramTitle:G,getDiagramTitle:q,setAccTitle:V,getAccTitle:P,setAccDescription:N,getAccDescription:L,addSection:c(({label:t,value:a})=>{M.has(t)||(M.set(t,a),O.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),getSections:c(()=>M,"getSections"),setShowData:c(t=>{F=t},"setShowData"),getShowData:c(()=>F,"getShowData")},rt=c((t,a)=>{E(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),it={parse:c(async t=>{const a=await X("pie",t);O.debug(a),rt(a,j)},"parse")},ot=c(t=>`
|
2
2
|
.pieCircle{
|
3
3
|
stroke: ${t.pieStrokeColor};
|
4
4
|
stroke-width : ${t.pieStrokeWidth};
|